I am having a problem configuring my the POS. With respect to the photo, these are some problems im getting:
-
I have an item “Automobile lying board”, it’s in an Item Group “Automobile Tools”. When I search the product in the textbox “Search by item code…”, i cannot find it, I can find it only when I select the right Item group. I want to be able to write search a product independently of the item group.
-
I want to be able to enter the discount as an amount not as a percentage.
Hi @Mohammad_Noorani_Bak,
Thanks for sharing the details and the screenshot! Let me address both of your concerns:
1. Search not working unless correct Item Group is selected
You’re right — currently in ERPNext POS, item search is scoped by default to the selected Item Group. This is expected behavior for performance reasons (especially with large item lists), but you can modify this behavior.
Possible Solutions:
- Temporary workaround: Select “All Item Groups” in the filter to search across all items.
- Custom fix (if needed): You can customize the POS page or override the JS to remove group-specific filtering during search. If you’re comfortable with Frappe/JS, I can guide you on this.
2. Discount as Amount Instead of Percentage
Out of the box, ERPNext POS allows discount input only as a percentage. However, there are a few ways around this:
Option A: Use “Price List” to pre-set discounted prices
You can set special discounted prices for certain items in a separate Price List and apply that in POS.
Option B: Customization (if you want a discount field in currency)
You can extend the POS interface to support a fixed discount amount field. This requires JS customization in your POS app. Again, if you’d like help writing that, I’d be happy to assist!
Let me know which direction you’d like to go in, and I can help you further. You’re not alone — many users have had similar requirements, and ERPNext is quite flexible to adapt to them with a bit of customization.
@Rahul123, thanks for your detailed answer,
-
For this, i would prefer going for the Temporary Workaround but I cannot find All Item Groups in the filter, it’s only showing the individual item groups
-
For this, Option B would be better
@Rahul123 can I get the help regarding Option B:Customization.
Noor
Sure! Let’s help Noor with Option B: Customization — adding a fixed discount amount field (instead of percentage) in ERPNext POS.
Goal:
Allow the user to enter a discount as a fixed amount in currency, instead of a percentage.
Step-by-Step Guide for Option B: Customization
1. Add a Custom Field in POS Item
This allows entry of discount per item directly.
2. Write a Client Script (POS Invoice)
To apply the fixed discount dynamically during billing:
frappe.ui.form.on('POS Invoice Item', {
fixed_discount: function(frm, cdt, cdn) {
let row = locals[cdt][cdn];
// Adjust the rate based on fixed discount
if (row.fixed_discount && row.qty) {
let base_rate = row.price_list_rate || row.rate;
row.rate = (base_rate * row.qty - row.fixed_discount) / row.qty;
frappe.model.set_value(cdt, cdn, 'rate', row.rate);
}
frm.refresh_field('items');
}
});
This script automatically reduces the item’s rate when fixed_discount
is entered.
3. Show Total Discount on Invoice (Optional)
You can add a read-only field on the main POS Invoice form:
- Fieldtype: Currency
- Field Label: Total Fixed Discount
- Fieldname:
total_fixed_discount
Then add this script:
frappe.ui.form.on('POS Invoice', {
validate(frm) {
let total_discount = 0;
frm.doc.items.forEach(item => {
total_discount += item.fixed_discount || 0;
});
frm.set_value('total_fixed_discount', total_discount);
}
});
Notes:
- This approach adjusts
rate
internally and respects the total bill correctly.
- It doesn’t interfere with ERPNext’s percentage discount logic — it’s a parallel system.
- Works in standard Sales Invoice too if applied similarly.
After doing the above, I can see the Fixed Discount only in POS Invoice, im looking for this in the POS, that is check the screenshot in the question, is this possible?