chore: fix tests
This commit is contained in:
@@ -375,6 +375,9 @@ def get_deducted_tax(taxable_vouchers, tax_details):
|
|||||||
|
|
||||||
def get_tds_amount(ldc, parties, inv, tax_details, tax_deducted, vouchers):
|
def get_tds_amount(ldc, parties, inv, tax_details, tax_deducted, vouchers):
|
||||||
tds_amount = 0
|
tds_amount = 0
|
||||||
|
supp_credit_amt = 0.0
|
||||||
|
supp_jv_credit_amt = 0.0
|
||||||
|
|
||||||
invoice_filters = {"name": ("in", vouchers), "docstatus": 1, "apply_tds": 1}
|
invoice_filters = {"name": ("in", vouchers), "docstatus": 1, "apply_tds": 1}
|
||||||
|
|
||||||
field = "sum(net_total)"
|
field = "sum(net_total)"
|
||||||
@@ -383,6 +386,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, tax_deducted, vouchers):
|
|||||||
invoice_filters.pop("apply_tds", None)
|
invoice_filters.pop("apply_tds", None)
|
||||||
field = "sum(grand_total)"
|
field = "sum(grand_total)"
|
||||||
|
|
||||||
|
if vouchers:
|
||||||
supp_credit_amt = frappe.db.get_value("Purchase Invoice", invoice_filters, field) or 0.0
|
supp_credit_amt = frappe.db.get_value("Purchase Invoice", invoice_filters, field) or 0.0
|
||||||
|
|
||||||
supp_jv_credit_amt = (
|
supp_jv_credit_amt = (
|
||||||
@@ -396,8 +400,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, tax_deducted, vouchers):
|
|||||||
},
|
},
|
||||||
"sum(credit_in_account_currency)",
|
"sum(credit_in_account_currency)",
|
||||||
)
|
)
|
||||||
or 0.0
|
) or 0.0
|
||||||
)
|
|
||||||
|
|
||||||
supp_credit_amt += supp_jv_credit_amt
|
supp_credit_amt += supp_jv_credit_amt
|
||||||
supp_credit_amt += inv.net_total
|
supp_credit_amt += inv.net_total
|
||||||
|
|||||||
Reference in New Issue
Block a user