Custom Script being override by POS Profile

For custom script, by right it should override everything else.

However, I realised some error as following

  • I tried to pull the correct Cost Center , Letter Head and Naming Series if the users select the Delivery Warehouse.

  • Everything works fine if there’s no POS Profile Involve.

  • The POS Profile will OVERRIDE the custom script if there’s default pos profile being set under the POS Profile List.

  • This only happened when Convert the Sales Order to Sales Invoice, if directly Created Sales Invoice, it’s ok.

I’m wondering where went wrong on this part, To Create Invoice from Sales Order and Create Invoice works differently for the same script.

Anyone have any idea ?

Hi @alan

If you’re making the invoice with Include Payment (POS) then system always pulls the data from the respective POS Profile. If you want to change this behaviour you have to make changes in the core code.

You need to remove True from the method get_pos_profile_item_details

The weird things is it only happened as following

  1. If direct from Sales Invoice, Include POS, the custom script works perfectly.

  2. If Create from Sales Order to Sales Invoice, it have problems.

  3. For (2) also, if I remove all users from POS Profile, it still pull from POS. But If I add one dummy user, other users will works correctly according to the custom script.

So I’m wondering modify this works. Kindly comment.

can you share your custom script?