Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
5989 Zobrazení

Is there a way to do a validation at POS when accepting a payment, Let say to limit it to an amount less than 5000?

Avatar
Zrušit
Autor Nejlepší odpověď


Added the following at validate_order function 

if (plines[i].get_type() === 'cash' && plines[i].get_amount() > 10000) {

                    this.pos_widget.screen_selector.show_popup('error',{

                        'message': _t('Invalid Payment'),

                        'comment': _t(plines[i].get_amount()),

                    });

                    return;

                }

Avatar
Zrušit
Nejlepší odpověď

Hi JC,

To change the working of the Validate button and to add a validation as said above , you have to make necessary changes in the function validate_order in the screen.js in the point_of_sale module, either you can done inside the code or you can do it by custom module. custom module will be better.

Inside the function you can add the code to check the payment amount and validate it

Thank You

Avatar
Zrušit
Autor

Could you share the codes how to limit it to 5000

Related Posts Odpovědi Zobrazení Aktivita
1
bře 17
5311
2
dub 16
3820
4
led 16
6006
1
čvn 17
6116
1
srp 24
8053