[fix] [minor] pos.js

This commit is contained in:
Rushabh Mehta 2017-11-29 16:42:02 +05:30
parent 1b344ca81e
commit 0154538c06
3 changed files with 17 additions and 18 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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'),