mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-27 07:01:13 +01:00
fix: TDS amount calculation post LDC breach
(cherry picked from commit 1f9ef6c48f)
This commit is contained in:
@@ -573,7 +573,9 @@ def get_tds_amount_from_ldc(ldc, parties, tax_details, posting_date, net_total):
|
|||||||
"supplier": ("in", parties),
|
"supplier": ("in", parties),
|
||||||
"apply_tds": 1,
|
"apply_tds": 1,
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
|
"tax_withholding_category": ldc.tax_withholding_category,
|
||||||
"posting_date": ("between", (ldc.valid_from, ldc.valid_upto)),
|
"posting_date": ("between", (ldc.valid_from, ldc.valid_upto)),
|
||||||
|
"company": ldc.company,
|
||||||
},
|
},
|
||||||
"sum(tax_withholding_net_total)",
|
"sum(tax_withholding_net_total)",
|
||||||
)
|
)
|
||||||
@@ -603,7 +605,7 @@ def is_valid_certificate(
|
|||||||
):
|
):
|
||||||
valid = False
|
valid = False
|
||||||
|
|
||||||
available_amount = flt(certificate_limit) - flt(deducted_amount) - flt(current_amount)
|
available_amount = flt(certificate_limit) - flt(deducted_amount)
|
||||||
|
|
||||||
if (getdate(valid_from) <= getdate(posting_date) <= getdate(valid_upto)) and available_amount > 0:
|
if (getdate(valid_from) <= getdate(posting_date) <= getdate(valid_upto)) and available_amount > 0:
|
||||||
valid = True
|
valid = True
|
||||||
|
|||||||
Reference in New Issue
Block a user