From a7e8f31f5605c85f79069f62f46078a79e93039d Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Wed, 4 Mar 2026 14:20:14 +0530 Subject: [PATCH] fix: skip asset sale processing for internal transfer invoices (cherry picked from commit 9cb3dad079a4c06637091b20388464cad8f1e435) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 802705f3470..cf4377bd0df 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1199,6 +1199,9 @@ class SalesInvoice(SellingController): throw(_("Delivery Note {0} is not submitted").format(d.delivery_note)) def process_asset_depreciation(self): + if self.is_internal_transfer(): + return + if (self.is_return and self.docstatus == 2) or (not self.is_return and self.docstatus == 1): self.depreciate_asset_on_sale() else: