this._super();
var self = this;
- if(this.pos.iface_cashdrawer){
- this.pos.proxy.open_cashbox();
+ if( this.pos.iface_cashdrawer && this.pos.get('selectedOrder').get('paymentLines').find( function(pl){ return pl.cashregister.get('journal').type === 'cash'; })){
+ this.pos.proxy.open_cashbox();
}
this.set_numpad_state(this.pos_widget.numpad.state);
});
}
+ if( this.pos.iface_cashdrawer ){
+ this.add_action_button({
+ label: _t('Cash'),
+ name: 'cashbox',
+ icon: '/point_of_sale/static/src/img/open-cashbox.png',
+ click: function(){
+ self.pos.proxy.open_cashbox();
+ },
+ });
+ }
+
this.updatePaymentSummary();
this.line_refocus();
},