[feature] [refactor] Shipping Rule for Buying + Refactor (#11628)
* Shipping rule for Buying * [refactor] shipping rule
This commit is contained in:
@@ -233,7 +233,8 @@ class calculate_taxes_and_totals(object):
|
||||
# if tax/charges is for deduction, multiply by -1
|
||||
if getattr(tax, "category", None):
|
||||
tax_amount = 0.0 if (tax.category == "Valuation") else tax_amount
|
||||
tax_amount *= -1.0 if (tax.add_deduct_tax == "Deduct") else 1.0
|
||||
if self.doc.doctype in ["Purchase Order", "Purchase Invoice", "Purchase Receipt", "Supplier Quotation"]:
|
||||
tax_amount *= -1.0 if (tax.add_deduct_tax == "Deduct") else 1.0
|
||||
return tax_amount
|
||||
|
||||
def set_cumulative_total(self, row_idx, tax):
|
||||
|
||||
Reference in New Issue
Block a user