tds not calculated appropriately

This commit is contained in:
Zlash65 2018-11-01 11:39:55 +05:30
parent 9f931780a2
commit ab9852d31a

View File

@ -61,11 +61,11 @@ class PurchaseInvoice(BuyingController):
self.validate_posting_time()
super(PurchaseInvoice, self).validate()
# apply tax withholding only if checked and applicable
self.set_tax_withholding()
super(PurchaseInvoice, self).validate()
if not self.is_return:
self.po_required()
self.pr_required()
@ -839,6 +839,9 @@ class PurchaseInvoice(BuyingController):
if not accounts or tax_withholding_details.get("account_head") not in accounts:
self.append("taxes", tax_withholding_details)
# calculate totals again after applying TDS
self.calculate_taxes_and_totals()
@frappe.whitelist()
def make_debit_note(source_name, target_doc=None):
from erpnext.controllers.sales_and_purchase_return import make_return_doc