Community mailing list archives

community@mail.odoo.com

Re: POS payment screen amount input field

by
Mohamed Hagag
- 08/23/2016 15:41:11

Thanks Mario, I modified it to work on v8 in the same file screens.js but code is like below:

in function update_payment_summary appended :

if (dueTotal * 10 < paidTotal) {
           this.pos_widget.screen_selector.show_popup('error',{
               'message':_t('Error: Very Huge Payment for this order.'),
               'comment':_t('Plz Check if you entered a barcode !!')});
           return;
            }


and it's working fine.

Regards,


On 08/23/2016 06:27 PM, Mario Arias wrote:
if (!force_validation && (order.get_total_with_tax() * 1000 < order.get_total_paid())) {
            this.gui.show_popup('confirm',{
                title: _t('Please Confirm Large Amount'),
                body:  _t('Are you sure that the customer wants to  pay') +
                       ' ' +
                       this.format_currency(order.get_total_paid()) +
                       ' ' +
                       _t('for an order of') +
                       ' ' +
                       this.format_currency(order.get_total_with_tax()) +
                       ' ' +
                       _t('? Clicking "Confirm" will validate the payment.'),
                confirm: function() {
                    self.validate_order('confirm');
                },
            });
            return;
        }