Make POS items add at top of grid

Is it possible to have the items add into the grid at the top so the cashier sees the last item scanned first at the top rather than scrolling. We have brought the total up to allow the cashier see the total change as items are added; we will also like to see the items add up from the top. Any help will be appreciated.

I believe this is the part in the pos.js file that renders the items being added:

add_new_item_to_grid: function(item_code, serial_no) {
	var me = this;

	var child = frappe.model.add_child(me.frm.doc, this.frm.doctype + " Item", "items");
	child.item_code = item_code;
	child.qty = 1;

	if (serial_no)
		child.serial_no = serial_no;

	this.frm.script_manager.trigger("item_code", child.doctype, child.name);
	frappe.after_ajax(function() {
		me.frm.script_manager.trigger("qty", child.doctype, child.name);
	})
},

is there a way to make this add from top?

Ok; kept on researching; got something that works; so I’m answering this and hope it helps someone using erpnext for real retail.

Inside the assets folder from /sites/assets/js/pos/ you will find pos.html and pos_bill_item.html. In pos.html look for the div with class “items”; add this to it: style=“transform: scaleY(-1); -webkit-transform: scaleY(-1);”

Inside pos_bill_item; set the first div you see with the same styling as above.

After this; go to frappe-bench from terminal and run

Bench build

Also clear your browsers cache; although a simple refresh after bench build is sufficient.

IMPORTANT! Don’t fiddle with the class names, ids or any other thing; just add this style to the class and it will work; as the js uses these to insert the pos items like item codes, rates etc; touching it recklessly could break your pos.

Coupled with the total on top; this nicely keeps the last scanned item on top so the cashier can see the last item without scrolling.

Hope this helps.

Dear Core team; maybe we can have this role out with the updates; with the total on top as well; maybe.

hiii…
Please see the following ongoing enhancement for POS.
The item section will be scrollable

Ok; thanks; that’s a good one; overall though; once the items pop in on top; its good. The cashiers are super happy with the new look! We have the total on top of the items with a H1 tag and bold; and then the items flying in at the top of the grid. It’s just perfect!

We are taking this route because the new POS, offline; has some shortcomings; like stuck invoices; the need to hit the sync manually rather than auto refresh say every 5 or 10minutes or less; invoice customization is fragile and could damage print functionality and a few others.

For these reasons: we are making the older POS as good as we can make it; and the efforts have really paid off. I’ll share a few screenshots.

Kent@Live Mail