Company field removed from Item Taxes Table
This commit is contained in:
parent
ad3d44d622
commit
261ecba3d6
@ -6,8 +6,7 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"item_tax_template",
|
"item_tax_template",
|
||||||
"tax_category",
|
"tax_category",
|
||||||
"valid_from",
|
"valid_from"
|
||||||
"company"
|
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -34,20 +33,11 @@
|
|||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Valid From"
|
"label": "Valid From"
|
||||||
},
|
|
||||||
{
|
|
||||||
"fetch_from": "item_tax_template.company",
|
|
||||||
"fieldname": "company",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Company",
|
|
||||||
"options": "Company",
|
|
||||||
"read_only": 1
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2020-06-18 22:53:44.546967",
|
"modified": "2020-06-25 01:40:28.859752",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Item Tax",
|
"name": "Item Tax",
|
||||||
|
|||||||
@ -442,7 +442,8 @@ def _get_item_tax_template(args, taxes, out={}, for_validate=False):
|
|||||||
taxes_with_no_validity = []
|
taxes_with_no_validity = []
|
||||||
|
|
||||||
for tax in taxes:
|
for tax in taxes:
|
||||||
if tax.valid_from and tax.company == args['company']:
|
tax_company = frappe.get_value("Item Tax Template", tax.item_tax_template, 'company')
|
||||||
|
if tax.valid_from and tax_company == args['company']:
|
||||||
# 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
|
||||||
validation_date = args.get('transaction_date') or args.get('bill_date') or args.get('posting_date')
|
validation_date = args.get('transaction_date') or args.get('bill_date') or args.get('posting_date')
|
||||||
@ -450,7 +451,7 @@ def _get_item_tax_template(args, taxes, out={}, for_validate=False):
|
|||||||
if getdate(tax.valid_from) <= getdate(validation_date):
|
if getdate(tax.valid_from) <= getdate(validation_date):
|
||||||
taxes_with_validity.append(tax)
|
taxes_with_validity.append(tax)
|
||||||
else:
|
else:
|
||||||
if tax.company == args['company']:
|
if tax_company == args['company']:
|
||||||
taxes_with_no_validity.append(tax)
|
taxes_with_no_validity.append(tax)
|
||||||
|
|
||||||
if taxes_with_validity:
|
if taxes_with_validity:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user