[minor] fixes + patch (#14937)
This commit is contained in:
parent
3c9839f832
commit
69fa808def
@ -288,6 +288,9 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
setTimeout(() => frappe.set_route('List', 'POS Profile'), 2000);
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -1187,7 +1190,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
message: __('Discount amount cannot be greater than 100%')
|
||||
});
|
||||
me.update_discount(item_code, discount);
|
||||
}else{
|
||||
}else{
|
||||
me.update_discount(item_code, discount);
|
||||
me.update_value();
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ def execute():
|
||||
if not company:
|
||||
return
|
||||
|
||||
make_custom_fields()
|
||||
make_custom_fields(update=False)
|
@ -10,12 +10,12 @@ def execute():
|
||||
frappe.db.sql("""delete from `tabCustom Field` where dt = %s
|
||||
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""", doctype)
|
||||
|
||||
make_custom_fields()
|
||||
make_custom_fields(update=False)
|
||||
|
||||
frappe.db.sql("""
|
||||
update `tabCustom Field`
|
||||
set reqd = 0, `default` = ''
|
||||
where fieldname = 'reason_for_issuing_document'
|
||||
""")
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -6,4 +6,6 @@ def execute():
|
||||
if not company:
|
||||
return
|
||||
|
||||
frappe.reload_doc('hr', 'doctype', 'Employee Tax Exemption Declaration')
|
||||
frappe.reload_doc('hr', 'doctype', 'Employee Tax Exemption Proof Submission')
|
||||
make_custom_fields()
|
@ -81,7 +81,7 @@ def add_print_formats():
|
||||
frappe.db.sql(""" update `tabPrint Format` set disabled = 0 where
|
||||
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',
|
||||
fieldtype='Data', options='item_code.gst_hsn_code', insert_after='description',
|
||||
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):
|
||||
docs = []
|
||||
|
@ -511,6 +511,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
if(!r.exc) {
|
||||
if (!this.frm.doc.pos_profile) {
|
||||
frappe.dom.unfreeze();
|
||||
setTimeout(() => frappe.set_route('List', 'POS Profile'), 2000);
|
||||
frappe.throw(__("POS Profile is required to use Point-of-Sale"));
|
||||
}
|
||||
this.frm.script_manager.trigger("update_stock");
|
||||
|
Loading…
x
Reference in New Issue
Block a user