minor fix
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index 62d8247..1031b77 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -19,7 +19,7 @@
erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
init: function (wrapper) {
- this.page_len = 2;
+ this.page_len = 20;
this.page = wrapper.page;
this.wrapper = $(wrapper).find('.page-content');
this.set_indicator();
@@ -442,8 +442,7 @@
me.toggle_more_btn();
this.wrapper.on("click", ".btn-more", function() {
- console.log('asdf')
- me.page_len += 2;
+ me.page_len += 20;
me.items = me.get_items();
me.make_item_list();
me.toggle_more_btn();
@@ -580,10 +579,7 @@
// this.list_customers.empty();
this.si_docs = this.get_doc_from_localstorage();
- if (!this.si_docs.length) {fv
- this.list_customers.append(
- '<div style="padding: 12px; margin-left:-12px;">' + __("No offline records.") + '</div>'
- )
+ if (!this.si_docs.length) {
return;
}
@@ -752,7 +748,13 @@
.on('focus', function (e) {
$(e.target).val('').trigger('input');
me.toggle_edit_button(false);
- me.toggle_list_customer(true);
+ if(me.frm.doc.items.length){
+ me.toggle_list_customer(false)
+ me.toggle_item_cart(true)
+ } else {
+ me.toggle_list_customer(true)
+ me.toggle_item_cart(false)
+ }
})
.on("awesomplete-selectcomplete", function (e) {
var item = me.party_field.awesomeplete
@@ -772,6 +774,10 @@
this.list_customers.toggle(flag);
},
+ toggle_item_cart: function(flag) {
+ this.wrapper.find('.pos-bill-wrapper').toggle(flag);
+ },
+
add_customer: function() {
this.frm.doc.customer = "";
this.update_customer()
@@ -965,15 +971,6 @@
`);
me.toggle_more_btn();
- // $(frappe.render_template("pos_item", {
- // item_code: 'btn_more',
- // item_price: format_currency(me.price_list_data[obj.name], me.frm.doc.currency),
- // item_name: obj.name === obj.item_name ? "" : obj.item_name,
- // item_image: obj.image,
- // color: frappe.get_palette(obj.item_name),
- // abbr: frappe.get_abbr(obj.item_name)
- // })).tooltip().appendTo($wrap);
-
} else {
$("<p class='text-muted small' style='padding-left: 10px'>"
+__("Not items found")+"</p>").appendTo($wrap)
@@ -1376,7 +1373,7 @@
set_primary_action: function () {
var me = this;
- this.page.set_primary_action(__("Add Customer"), function () {
+ this.page.set_primary_action(__("New Order"), function () {
me.save_previous_entry();
me.create_new();
me.refresh();
@@ -1391,7 +1388,7 @@
// me.make_payment();
// }, "fa fa-credit-card");
} else if (this.frm.doc.docstatus == 1) {
- this.page.set_primary_action(__("Print"), function () {
+ this.page.set_secondary_action(__("Print"), function () {
html = frappe.render(me.print_template_data, me.frm.doc)
me.print_document(html)
})
diff --git a/erpnext/public/css/erpnext.css b/erpnext/public/css/erpnext.css
index f59883d..c58733a 100644
--- a/erpnext/public/css/erpnext.css
+++ b/erpnext/public/css/erpnext.css
@@ -334,10 +334,13 @@
position: relative;
}
.pos .item-list .price-info {
+ width: 99%;
+ text-align: center;
position: absolute;
right: 0;
bottom: 0;
- background-color: rgba(0, 0, 0, 0.1);
+ margin: 2px 1px 2px 2px;
+ background-color: rgba(162, 161, 161, 0.1);
padding: 9px 15px;
}
.pos-bill-toolbar {
diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less
index 214130b..0635539 100644
--- a/erpnext/public/less/erpnext.less
+++ b/erpnext/public/less/erpnext.less
@@ -400,10 +400,13 @@
}
.price-info {
+ width: 99%;
+ text-align: center;
position: absolute;
right: 0;
bottom: 0;
- background-color: rgba(0, 0, 0, 0.1);
+ margin: 2px 1px 2px 2px;
+ background-color: rgba(162, 161, 161, 0.1);
padding: 9px 15px;
}
}