Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
5974 Представления

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?

Аватар
Отменить
Автор Лучший ответ


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;

                }

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Автор

Could you share the codes how to limit it to 5000

Related Posts Ответы Просмотры Активность
1
мар. 17
5303
2
апр. 16
3811
4
янв. 16
5993
1
июн. 17
6106
1
авг. 24
8041