콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
6075 화면

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

관련 게시물 답글 화면 활동
1
3월 17
5411
2
4월 16
3915
4
1월 16
6066
1
6월 17
6180
1
8월 24
8148