mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-13 09:43:49 +00:00
fix: do not fetch disabled item tax template
(cherry picked from commit b10cf4a928)
# Conflicts:
# erpnext/public/js/controllers/transaction.js
# erpnext/stock/get_item_details.py
This commit is contained in:
@@ -2200,10 +2200,19 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
return doc.company ? {filters: {company: doc.company}} : {};
|
return doc.company ? {filters: {company: doc.company}} : {};
|
||||||
} else {
|
} else {
|
||||||
let filters = {
|
let filters = {
|
||||||
|
<<<<<<< HEAD
|
||||||
'item_code': item.item_code,
|
'item_code': item.item_code,
|
||||||
'valid_from': ["<=", doc.transaction_date || doc.bill_date || doc.posting_date],
|
'valid_from': ["<=", doc.transaction_date || doc.bill_date || doc.posting_date],
|
||||||
'item_group': item.item_group,
|
'item_group': item.item_group,
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
item_code: item.item_code,
|
||||||
|
valid_from: ["<=", doc.transaction_date || doc.bill_date || doc.posting_date],
|
||||||
|
item_group: item.item_group,
|
||||||
|
base_net_rate: item.base_net_rate,
|
||||||
|
disabled: 0,
|
||||||
|
};
|
||||||
|
>>>>>>> b10cf4a928 (fix: do not fetch disabled item tax template)
|
||||||
|
|
||||||
if (doc.tax_category)
|
if (doc.tax_category)
|
||||||
filters['tax_category'] = doc.tax_category;
|
filters['tax_category'] = doc.tax_category;
|
||||||
|
|||||||
@@ -635,8 +635,15 @@ def _get_item_tax_template(args, taxes, out=None, for_validate=False):
|
|||||||
taxes_with_no_validity = []
|
taxes_with_no_validity = []
|
||||||
|
|
||||||
for tax in taxes:
|
for tax in taxes:
|
||||||
|
<<<<<<< HEAD
|
||||||
tax_company = frappe.get_cached_value("Item Tax Template", tax.item_tax_template, "company")
|
tax_company = frappe.get_cached_value("Item Tax Template", tax.item_tax_template, "company")
|
||||||
if tax_company == args["company"]:
|
if tax_company == args["company"]:
|
||||||
|
=======
|
||||||
|
disabled, tax_company = frappe.get_cached_value(
|
||||||
|
"Item Tax Template", tax.item_tax_template, ["disabled", "company"]
|
||||||
|
)
|
||||||
|
if not disabled and tax_company == ctx["company"]:
|
||||||
|
>>>>>>> b10cf4a928 (fix: do not fetch disabled item tax template)
|
||||||
if tax.valid_from or tax.maximum_net_rate:
|
if tax.valid_from or tax.maximum_net_rate:
|
||||||
# In purchase Invoice first preference will be given to supplier invoice date
|
# In purchase Invoice first preference will be given to supplier invoice date
|
||||||
# if supplier date is not present then posting date
|
# if supplier date is not present then posting date
|
||||||
|
|||||||
Reference in New Issue
Block a user