Item Wise TDS Calculation

For calculating Item wise TDS in Purchase Invoice.
This commit is contained in:
niralisatapara
2022-10-03 16:39:35 +05:30
parent ccf2952b76
commit e758a753f8
5 changed files with 1653 additions and 1513 deletions

View File

@@ -58,12 +58,23 @@ class calculate_taxes_and_totals(object):
self.initialize_taxes()
self.determine_exclusive_rate()
self.calculate_net_total()
self.calculate_tax_withholding_net_total()
self.calculate_taxes()
self.manipulate_grand_total_for_inclusive_tax()
self.calculate_totals()
self._cleanup()
self.calculate_total_net_weight()
def calculate_tax_withholding_net_total(self):
if hasattr(self.doc, "tax_withholding_net_total"):
sum_net_amount = 0
for item in self.doc.get("items"):
if hasattr(item, "apply_tds") and item.apply_tds:
sum_net_amount += item.net_amount
self.doc.tax_withholding_net_total = sum_net_amount
def validate_item_tax_template(self):
for item in self.doc.get("items"):
if item.item_code and item.get("item_tax_template"):