mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
Merge pull request #20239 from deepeshgarg007/hsn_template_v12
fix: Item tax template fetching from HSN Code
This commit is contained in:
@@ -136,8 +136,8 @@ frappe.ui.form.on("Item", {
|
|||||||
frm.toggle_reqd('customer', frm.doc.is_customer_provided_item ? 1:0);
|
frm.toggle_reqd('customer', frm.doc.is_customer_provided_item ? 1:0);
|
||||||
},
|
},
|
||||||
|
|
||||||
gst_hsn_code: function(frm){
|
gst_hsn_code: function(frm) {
|
||||||
if(!frm.doc.taxes.length) {
|
if(!frm.doc.taxes || !frm.doc.taxes.length) {
|
||||||
frappe.db.get_doc("GST HSN Code", frm.doc.gst_hsn_code).then(hsn_doc => {
|
frappe.db.get_doc("GST HSN Code", frm.doc.gst_hsn_code).then(hsn_doc => {
|
||||||
$.each(hsn_doc.taxes || [], function(i, tax) {
|
$.each(hsn_doc.taxes || [], function(i, tax) {
|
||||||
let a = frappe.model.add_child(frm.doc, 'Item Tax', 'taxes');
|
let a = frappe.model.add_child(frm.doc, 'Item Tax', 'taxes');
|
||||||
|
|||||||
Reference in New Issue
Block a user