forked from frappe/erpnext
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Taxjar Integration update (frappe#27143)
* feat: Taxjar Integration update * added taxable_amount,taxable_amount fields in setup.py * Update taxjar_integration.py Sider issues fix * Sider issues fix * Sider issues fix * sider issue fix: unused import * sider issue fix * Update erpnext/erpnext_integrations/taxjar_integration.py Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> * Removed permission for 'All' Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
- Loading branch information
1 parent
14274a3
commit 4c4505f
Showing
10 changed files
with
4,321 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from __future__ import unicode_literals | ||
import frappe | ||
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields | ||
from erpnext.regional.united_states.setup import add_permissions | ||
|
||
def execute(): | ||
company = frappe.get_all('Company', filters = {'country': 'United States'}, fields=['name']) | ||
if not company: | ||
return | ||
|
||
frappe.reload_doc("regional", "doctype", "product_tax_category") | ||
|
||
custom_fields = { | ||
'Sales Invoice Item': [ | ||
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), | ||
dict(fieldname='taxable_amount', fieldtype='Currency', insert_after='tax_collectable', | ||
label='Taxable Amount', read_only=1) | ||
], | ||
'Item': [ | ||
dict(fieldname='product_tax_category', fieldtype='Link', insert_after='item_group', options='Product Tax Category', | ||
label='Product Tax Category') | ||
] | ||
} | ||
create_custom_fields(custom_fields, update=True) | ||
add_permissions() | ||
frappe.enqueue('erpnext.regional.united_states.setup.add_product_tax_categories', now=True) |
Empty file.
8 changes: 8 additions & 0 deletions
8
erpnext/regional/doctype/product_tax_category/product_tax_category.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on('Product Tax Category', { | ||
// refresh: function(frm) { | ||
|
||
// } | ||
}); |
70 changes: 70 additions & 0 deletions
70
erpnext/regional/doctype/product_tax_category/product_tax_category.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"actions": [], | ||
"autoname": "field:product_tax_code", | ||
"creation": "2021-08-23 12:33:37.910225", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"product_tax_code", | ||
"column_break_2", | ||
"category_name", | ||
"section_break_4", | ||
"description" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "product_tax_code", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Product Tax Code", | ||
"reqd": 1, | ||
"unique": 1 | ||
}, | ||
{ | ||
"fieldname": "description", | ||
"fieldtype": "Small Text", | ||
"label": "Description" | ||
}, | ||
{ | ||
"fieldname": "category_name", | ||
"fieldtype": "Data", | ||
"label": "Category Name", | ||
"length": 255 | ||
}, | ||
{ | ||
"fieldname": "column_break_2", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "section_break_4", | ||
"fieldtype": "Section Break" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"links": [], | ||
"modified": "2021-08-24 09:10:25.313642", | ||
"modified_by": "Administrator", | ||
"module": "Regional", | ||
"name": "Product Tax Category", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"write": 1 | ||
} | ||
], | ||
"quick_entry": 1, | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"title_field": "category_name", | ||
"track_changes": 1 | ||
} |
8 changes: 8 additions & 0 deletions
8
erpnext/regional/doctype/product_tax_category/product_tax_category.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
class ProductTaxCategory(Document): | ||
pass |
8 changes: 8 additions & 0 deletions
8
erpnext/regional/doctype/product_tax_category/test_product_tax_category.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
import unittest | ||
|
||
class TestProductTaxCategory(unittest.TestCase): | ||
pass |
Oops, something went wrong.