Browse Source

fix: Fixed customer address variable, sales invoice item field currency issue

(cherry picked from commit 904010ab645fdb16f09072c062269945f7747712)
develop
Subin Tom 3 years ago
committed by mergify-bot
parent
commit
75e9100a53
  1. 4
      erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py
  2. 2
      erpnext/erpnext_integrations/taxjar_integration.py
  3. 4
      erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py

4
erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py

@ -80,9 +80,9 @@ def make_custom_fields(update=True):
dict(fieldname='product_tax_category', fieldtype='Link', insert_after='description', options='Product Tax Category',
label='Product Tax Category', fetch_from='item_code.product_tax_category'),
dict(fieldname='tax_collectable', fieldtype='Currency', insert_after='net_amount',
label='Tax Collectable', read_only=1),
label='Tax Collectable', read_only=1, options='currency'),
dict(fieldname='taxable_amount', fieldtype='Currency', insert_after='tax_collectable',
label='Taxable Amount', read_only=1)
label='Taxable Amount', read_only=1, options='currency')
],
'Item': [
dict(fieldname='product_tax_category', fieldtype='Link', insert_after='item_group', options='Product Tax Category',

2
erpnext/erpnext_integrations/taxjar_integration.py

@ -262,7 +262,7 @@ def get_shipping_address_details(doc):
if doc.shipping_address_name:
shipping_address = frappe.get_doc("Address", doc.shipping_address_name)
elif doc.customer_address:
shipping_address = frappe.get_doc("Address", doc.customer_address_name)
shipping_address = frappe.get_doc("Address", doc.customer_address)
else:
shipping_address = get_company_address_details(doc)

4
erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py

@ -21,9 +21,9 @@ def execute():
dict(fieldname='product_tax_category', fieldtype='Link', insert_after='description', options='Product Tax Category',
label='Product Tax Category', fetch_from='item_code.product_tax_category'),
dict(fieldname='tax_collectable', fieldtype='Currency', insert_after='net_amount',
label='Tax Collectable', read_only=1),
label='Tax Collectable', read_only=1, options='currency'),
dict(fieldname='taxable_amount', fieldtype='Currency', insert_after='tax_collectable',
label='Taxable Amount', read_only=1)
label='Taxable Amount', read_only=1, options='currency')
],
'Item': [
dict(fieldname='product_tax_category', fieldtype='Link', insert_after='item_group', options='Product Tax Category',

Loading…
Cancel
Save