fix: Add child table for tax withheld vouchers
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 534b879..1d59651 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -93,6 +93,8 @@
"taxes_and_charges_added",
"taxes_and_charges_deducted",
"total_taxes_and_charges",
+ "tax_withheld_vouchers_section",
+ "tax_withheld_vouchers",
"section_break_44",
"apply_discount_on",
"base_discount_amount",
@@ -1367,7 +1369,7 @@
"width": "50px"
},
{
- "depends_on": "eval:doc.is_subcontracted",
+ "depends_on": "eval:doc.is_subcontracted",
"fieldname": "supplier_warehouse",
"fieldtype": "Link",
"label": "Supplier Warehouse",
@@ -1426,13 +1428,25 @@
"hidden": 1,
"label": "Is Old Subcontracting Flow",
"read_only": 1
- }
+ },
+ {
+ "fieldname": "tax_withheld_vouchers_section",
+ "fieldtype": "Section Break",
+ "label": "Tax Withheld Vouchers"
+ },
+ {
+ "fieldname": "tax_withheld_vouchers",
+ "fieldtype": "Table",
+ "label": "Tax Withheld Vouchers",
+ "options": "Tax Withheld Vouchers",
+ "read_only": 1
+ }
],
"icon": "fa fa-file-text",
"idx": 204,
"is_submittable": 1,
"links": [],
- "modified": "2022-06-15 15:40:58.527065",
+ "modified": "2022-09-13 16:22:04.103982",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
@@ -1492,6 +1506,7 @@
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "states": [],
"timeline_field": "supplier",
"title_field": "title",
"track_changes": 1
diff --git a/erpnext/accounts/doctype/tax_withheld_vouchers/__init__.py b/erpnext/accounts/doctype/tax_withheld_vouchers/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/accounts/doctype/tax_withheld_vouchers/__init__.py
diff --git a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json
new file mode 100644
index 0000000..cecc6fb
--- /dev/null
+++ b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json
@@ -0,0 +1,48 @@
+{
+ "actions": [],
+ "autoname": "autoincrement",
+ "creation": "2022-09-13 16:18:59.404842",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "voucher_type",
+ "voucher_name",
+ "taxable_amount"
+ ],
+ "fields": [
+ {
+ "fieldname": "voucher_type",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Voucher Type",
+ "options": "DocType"
+ },
+ {
+ "fieldname": "voucher_name",
+ "fieldtype": "Dynamic Link",
+ "in_list_view": 1,
+ "label": "Voucher Name",
+ "options": "voucher_type"
+ },
+ {
+ "fieldname": "taxable_amount",
+ "fieldtype": "Currency",
+ "in_list_view": 1,
+ "label": "Taxable Amount"
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "istable": 1,
+ "links": [],
+ "modified": "2022-09-13 17:31:52.321034",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Tax Withheld Vouchers",
+ "naming_rule": "Autoincrement",
+ "owner": "Administrator",
+ "permissions": [],
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "states": []
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py
new file mode 100644
index 0000000..ea54c54
--- /dev/null
+++ b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.model.document import Document
+
+
+class TaxWithheldVouchers(Document):
+ pass