How to calculate total quantity in POS ?
For eg:
It would be greatly appreciated if anyone help me to achieve this.
How to calculate total quantity in POS ?
For eg:
It would be greatly appreciated if anyone help me to achieve this.
Hi all,
Any suggestions regarding the above mentioned query ?
Do you want to show the total qty in Print Format? Then create a customized Print Format showing the total qty.
Thanks for the reply @nabinhait
Yes
Thanks for the suggestion. Would you share any specific link to achieve this.
Hi @sethu
The POS print format type is JS, try below code
{% var sum=0.0 %}
{% for item in items %}
{% var sum = sum+item.qty %}
{{ sum }}
{% endfor %}
Hi @rohit_w
Thanks for your reply. And i tried the above mentioned code but it got error. âEncountered unknown tag âvarâ.â
Any help would be greatly appreciated.
Hi @rohit_w
After your fixes, i have updated the code as you mentioned but still i din get the correct value in âTotal qtyâ. And kindly see the image for your reference.
Any suggestions would be very helpful for me.
Thanks!
Hi,
I think total quantity in POS Invoice should be standard and should available from master branch. Isnât on POS Invoice for sure it is must needed for everyone?
Hello Rohit
How do we put basket quantity total on PoS Screen?
Cashiers need to know how many items they have scanned so they can count before bagging the goods.
Regards
Hi - is there a solution to having qty in basket quantity total?
Create a new field in your mother docytype to calcualte your quantity.
Child table = the name of your child table
new_field = this is your new created field.
try this code using custom script
frappe.ui.form.on("child table", "quantity", function(frm, cdt, cdn) {
new_field = 0;
$.each(frm.doc.name of your table || [], function(i, d) {
new_field += flt(d.quantity);
});
frm.set_value("new_field ", new_field );
});