fix: add LCV flag to determine negative expenses

This commit is contained in:
Gursheen Anand
2024-02-29 09:04:24 +05:30
parent 6f5815e44f
commit baa3fee1bf
3 changed files with 16 additions and 17 deletions

View File

@@ -84,7 +84,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)
@@ -105,7 +105,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):