POS customization


Hi! Can anyone help me with this? Thanks a lot :slight_smile:

@sheerland this is not customizable out of the box



Thanks @rmehta for the reply. But @khushal_t added a batch no. function link to batch. I want also to add the same function but instead of batch no. It will be linked to my Doctype Pharmacist Assistant where I can see who created the POS(POS Profile) and select in my Pharmacy assistant(User) who assisted the customer on buying medicine.

You need to write Jquery code to achieve this, it can’t be possible by adding just custom field. Also you need to make changes in the core file of pos(which will break after new updates) or copy existing code in new file of your custom app and make changes according to your requirement. Check existing code of how to use frappe.ui.form.make_control to add new field on the page.

Can you provide a example for all of us? Thanks a lot. @rohit_w

Check below files, this examples are just for reference

https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/page/pos/pos.js#L430-L452

Thanks but how about for the html file? Thanks @rohit_w

Did you checked existing POS?
In frappe.ui.form.make_control, pass class element dom to the parent field.
For better you can take help from service provider

Thanks. Now I understand. Thanks @rohit_w


Hi @rohit_w and @rmehta, Done customizing the POS. But how can I display the Pharmacy Assistant into my Sales Invoice from POS? Any idea or example? Thanks :slight_smile:

make_user: function () {
var me = this;
this.print_format_input = frappe.ui.form.make_control({
parent: this.page.main.find(“.pos-bill-toolbar-user”),
df: {
fieldtype: “Link”,
options: “User”,
fieldname: “ph_assistant”,
placeholder:“Select Pharmacy Assistant”,
only_select: true
},
parent: this.page.wrapper.find(“.party-area-user”),
render_input: true
});

},

Hi you might get something out of my code. I put a tax related field on POS and gets its value for the invoice. This code is been awhile, I couldnt actually remember the lines where I put my customization, so I’m sharing the files.

HTML:

JS:

When i customize pos.js and pos.html it effect nothing.
i use bench build and bench watch too.
i am using erpnext v.11.x.x developer

@Abbas_Ali_1460-FBAS

It works without bench build, seems there is issue with your code. Using debugger you can debug your code, also check the POS you’re using is offline or not because for online POS you need to make changes in the point_of_sale.js file

Thanks point_of_sale.js wroking :smiley:

hello, how did you do it in the online pos? thank you

hi rohit, how to do it on online pos? thank you