fix: add LCV flag to determine negative expenses

(cherry picked from commit baa3fee1bf)

# Conflicts:
#	erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py
This commit is contained in:
Gursheen Anand
2024-02-29 09:04:24 +05:30
committed by Mergify
parent 69de359728
commit 83ccb32be6
3 changed files with 20 additions and 16 deletions

View File

@@ -97,7 +97,7 @@ class StockController(AccountsController):
)
)
def make_gl_entries(self, gl_entries=None, from_repost=False):
def make_gl_entries(self, gl_entries=None, from_repost=False, via_landed_cost_voucher=False):
if self.docstatus == 2:
make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
@@ -118,7 +118,7 @@ class StockController(AccountsController):
if self.docstatus == 1:
if not gl_entries:
gl_entries = self.get_gl_entries(warehouse_account)
gl_entries = self.get_gl_entries(warehouse_account, via_landed_cost_voucher)
make_gl_entries(gl_entries, from_repost=from_repost)
def validate_serialized_batch(self):