Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
5949 Widoki

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?

Awatar
Odrzuć
Autor Najlepsza odpowiedź


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;

                }

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

Could you share the codes how to limit it to 5000

Powiązane posty Odpowiedzi Widoki Czynność
1
mar 17
5276
2
kwi 16
3803
4
sty 16
5946
1
cze 17
6090
1
sie 24
8007