[fix] [minor] pos.js
This commit is contained in:
parent
1b344ca81e
commit
0154538c06
@ -34,7 +34,7 @@
|
||||
margin-left: 15px;
|
||||
}
|
||||
.cart-wrapper {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.cart-wrapper .list-item__content:not(:first-child) {
|
||||
justify-content: flex-end;
|
||||
@ -121,7 +121,6 @@ input[type=number]::-webkit-outer-spin-button {
|
||||
border-collapse: collapse;
|
||||
cursor: pointer;
|
||||
display: table;
|
||||
margin: auto;
|
||||
}
|
||||
.num-row {
|
||||
display: table-row;
|
||||
|
@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
.cart-wrapper {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 12px;
|
||||
.list-item__content:not(:first-child) {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
@ -155,7 +155,6 @@ input[type=number]::-webkit-outer-spin-button {
|
||||
border-collapse: collapse;
|
||||
cursor: pointer;
|
||||
display: table;
|
||||
margin: auto;
|
||||
}
|
||||
.num-row {
|
||||
display: table-row;
|
||||
|
@ -321,19 +321,17 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
|
||||
make_new_invoice() {
|
||||
return frappe.run_serially([
|
||||
() => this.make_sales_invoice_frm(),
|
||||
() => this.set_pos_profile_data(),
|
||||
() => {
|
||||
this.make_sales_invoice_frm()
|
||||
.then(() => this.set_pos_profile_data())
|
||||
.then(() => {
|
||||
if (this.cart) {
|
||||
this.cart.frm = this.frm;
|
||||
this.cart.reset();
|
||||
} else {
|
||||
this.make_items();
|
||||
this.make_cart();
|
||||
}
|
||||
this.toggle_editing(true);
|
||||
})
|
||||
if (this.cart) {
|
||||
this.cart.frm = this.frm;
|
||||
this.cart.reset();
|
||||
} else {
|
||||
this.make_items();
|
||||
this.make_cart();
|
||||
}
|
||||
this.toggle_editing(true);
|
||||
},
|
||||
]);
|
||||
}
|
||||
@ -376,7 +374,10 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
this.frm.script_manager.trigger("update_stock");
|
||||
frappe.model.set_default_values(this.frm.doc);
|
||||
this.frm.cscript.calculate_taxes_and_totals();
|
||||
this.frm.meta.default_print_format = r.message ? r.message.print_format : 'POS Invoice';
|
||||
|
||||
if (r.message) {
|
||||
this.frm.meta.default_print_format = r.message.print_format || 'POS Invoice';
|
||||
}
|
||||
}
|
||||
|
||||
resolve();
|
||||
@ -915,7 +916,7 @@ class POSItems {
|
||||
this.search_field = frappe.ui.form.make_control({
|
||||
df: {
|
||||
fieldtype: 'Data',
|
||||
label: 'Search Item ( Ctrl + i )',
|
||||
label: 'Search Item (Ctrl + i)',
|
||||
placeholder: 'Search by item code, serial number, batch no or barcode'
|
||||
},
|
||||
parent: this.wrapper.find('.search-field'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user