[IMP] point_of_sale : display change amount after print if not 0
This commit is contained in:
parent
2596f39eef
commit
46ad2ac70f
|
@ -946,7 +946,8 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
||||||
|
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
|
||||||
if (!this.pos.get('selectedOrder')._printed) {
|
if (!this.pos.get('selectedOrder')._printed &&
|
||||||
|
!this.pos.config.iface_print_via_proxy) {
|
||||||
this.print();
|
this.print();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1327,13 +1328,21 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
||||||
});
|
});
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.pos.push_order(currentOrder)
|
this.pos.push_order(currentOrder);
|
||||||
|
var cO = this.pos.get('selectedOrder');
|
||||||
|
var isChange = cO.getPaidTotal() > cO.getTotalTaxIncluded();
|
||||||
|
|
||||||
if(this.pos.config.iface_print_via_proxy){
|
if(this.pos.config.iface_print_via_proxy){
|
||||||
var receipt = currentOrder.export_for_printing();
|
var receipt = currentOrder.export_for_printing();
|
||||||
this.pos.proxy.print_receipt(QWeb.render('XmlReceipt',{
|
this.pos.proxy.print_receipt(QWeb.render('XmlReceipt',{
|
||||||
receipt: receipt, widget: self,
|
receipt: receipt, widget: self,
|
||||||
}));
|
}));
|
||||||
this.pos.get('selectedOrder').destroy(); //finish order and go back to scan screen
|
if(isChange) {
|
||||||
|
this.pos_widget.screen_selector.set_current_screen(this.next_screen);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.pos.get('selectedOrder').destroy(); //finish order and go back to scan screen
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
this.pos_widget.screen_selector.set_current_screen(this.next_screen);
|
this.pos_widget.screen_selector.set_current_screen(this.next_screen);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue