mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
[minor] fixes + patch (#14937)
This commit is contained in:
committed by
Nabin Hait
parent
3c9839f832
commit
69fa808def
@@ -288,6 +288,9 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
error: () => {
|
||||||
|
setTimeout(() => frappe.set_route('List', 'POS Profile'), 2000);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ def execute():
|
|||||||
if not company:
|
if not company:
|
||||||
return
|
return
|
||||||
|
|
||||||
make_custom_fields()
|
make_custom_fields(update=False)
|
||||||
@@ -10,7 +10,7 @@ def execute():
|
|||||||
frappe.db.sql("""delete from `tabCustom Field` where dt = %s
|
frappe.db.sql("""delete from `tabCustom Field` where dt = %s
|
||||||
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""", doctype)
|
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""", doctype)
|
||||||
|
|
||||||
make_custom_fields()
|
make_custom_fields(update=False)
|
||||||
|
|
||||||
frappe.db.sql("""
|
frappe.db.sql("""
|
||||||
update `tabCustom Field`
|
update `tabCustom Field`
|
||||||
|
|||||||
@@ -6,4 +6,6 @@ def execute():
|
|||||||
if not company:
|
if not company:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
frappe.reload_doc('hr', 'doctype', 'Employee Tax Exemption Declaration')
|
||||||
|
frappe.reload_doc('hr', 'doctype', 'Employee Tax Exemption Proof Submission')
|
||||||
make_custom_fields()
|
make_custom_fields()
|
||||||
@@ -81,7 +81,7 @@ def add_print_formats():
|
|||||||
frappe.db.sql(""" update `tabPrint Format` set disabled = 0 where
|
frappe.db.sql(""" update `tabPrint Format` set disabled = 0 where
|
||||||
name in('GST POS Invoice', 'GST Tax Invoice') """)
|
name in('GST POS Invoice', 'GST Tax Invoice') """)
|
||||||
|
|
||||||
def make_custom_fields():
|
def make_custom_fields(update=True):
|
||||||
hsn_sac_field = dict(fieldname='gst_hsn_code', label='HSN/SAC',
|
hsn_sac_field = dict(fieldname='gst_hsn_code', label='HSN/SAC',
|
||||||
fieldtype='Data', options='item_code.gst_hsn_code', insert_after='description',
|
fieldtype='Data', options='item_code.gst_hsn_code', insert_after='description',
|
||||||
allow_on_submit=1, print_hide=1)
|
allow_on_submit=1, print_hide=1)
|
||||||
@@ -241,7 +241,7 @@ def make_custom_fields():
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
create_custom_fields(custom_fields, ignore_validate = frappe.flags.in_patch)
|
create_custom_fields(custom_fields, ignore_validate = frappe.flags.in_patch, update=update)
|
||||||
|
|
||||||
def make_fixtures(company=None):
|
def make_fixtures(company=None):
|
||||||
docs = []
|
docs = []
|
||||||
|
|||||||
@@ -511,6 +511,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
|||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
if (!this.frm.doc.pos_profile) {
|
if (!this.frm.doc.pos_profile) {
|
||||||
frappe.dom.unfreeze();
|
frappe.dom.unfreeze();
|
||||||
|
setTimeout(() => frappe.set_route('List', 'POS Profile'), 2000);
|
||||||
frappe.throw(__("POS Profile is required to use Point-of-Sale"));
|
frappe.throw(__("POS Profile is required to use Point-of-Sale"));
|
||||||
}
|
}
|
||||||
this.frm.script_manager.trigger("update_stock");
|
this.frm.script_manager.trigger("update_stock");
|
||||||
|
|||||||
Reference in New Issue
Block a user