Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
5936 มุมมอง

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
5270
2
เม.ย. 16
3800
4
ม.ค. 16
5940
Issue while printing Sales Details แก้ไขแล้ว
1
มิ.ย. 17
6088
1
ส.ค. 24
8004