Merge pull request #40187 from GursheenK/valuation-tax-gle-via-lcv

fix: valuation tax entries on LCV after billing PR
This commit is contained in:
ruthra kumar
2024-06-15 20:41:22 +05:30
committed by GitHub
4 changed files with 89 additions and 25 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,11 @@ 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)
if self.doctype == "Purchase Receipt"
else self.get_gl_entries(warehouse_account)
)
make_gl_entries(gl_entries, from_repost=from_repost)
def validate_serialized_batch(self):