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