コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2481 ビュー

it is possible to make it mandatory to choose a customer before validating the payment in POS?

アバター
破棄
最善の回答

Hi 

Try this code:

    const PaymentScreen = require('point_of_sale.PaymentScreen');

    const Registries = require('point_of_sale.Registries');


    const PosDeResPaymentScreen = PaymentScreen => class extends PaymentScreen {

        //@Override

        async validateOrder(isForceValidate) {const currentPartner = this.currentOrder.get_client();

        if (currentPartner == null) {

                    await this.showPopup('ErrorPopup', {

   title: _t('Unknown'),

   body: _t("Choose Customer First."),

                });


        }

                await super.validateOrder(...arguments);

    }, Registries.Component.extend(PaymentScreen, PosDeResPaymentScreen);


    return PaymentScreen;

});


Hope it helps

アバター
破棄
関連投稿 返信 ビュー 活動
3
9月 25
375
0
10月 24
1799
1
11月 22
5727
1
3月 15
5218
1
2月 22
6784