update tax amount after discount amount in purchase cycle

This commit is contained in:
Nabin Hait 2015-05-15 15:15:25 +05:30
parent 53ba64b653
commit b893972486
2 changed files with 18 additions and 1 deletions

View File

@ -153,4 +153,5 @@ execute:frappe.delete_doc("Page", "stock-ledger")
execute:frappe.delete_doc("Page","stock-level")
erpnext.patches.v5_0.reclculate_planned_operating_cost_in_production_order
erpnext.patches.v5_0.repost_requested_qty
erpnext.patches.v5_0.fix_taxes_and_totals_in_party_currency
erpnext.patches.v5_0.fix_taxes_and_totals_in_party_currency
erpnext.patches.v5_0.update_tax_amount_after_discount_in_purchase_cycle

View File

@ -0,0 +1,16 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
def execute():
frappe.db.sql("""
update
`tabPurchase Taxes and Charges`
set
tax_amount_after_discount_amount = tax_amount,
base_tax_amount_after_discount_amount = base_tax_amount
where
ifnull(tax_amount_after_discount_amount, 0) = 0
and ifnull(base_tax_amount_after_discount_amount, 0) = 0
""")