[FIX] point_of_sale: add subtotal to printed ticket
bzr revid: fva@openerp.com-20130124162225-wv0vgody2xtx2hog
This commit is contained in:
parent
8ca77e464b
commit
4c1016415c
|
@ -351,7 +351,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
||||||
},
|
},
|
||||||
// sets a discount [0,100]%
|
// sets a discount [0,100]%
|
||||||
set_discount: function(discount){
|
set_discount: function(discount){
|
||||||
console.log('set_discount: ',discount);
|
|
||||||
var disc = Math.min(Math.max(parseFloat(discount) || 0, 0),100);
|
var disc = Math.min(Math.max(parseFloat(discount) || 0, 0),100);
|
||||||
this.discount = disc;
|
this.discount = disc;
|
||||||
this.discountStr = '' + disc;
|
this.discountStr = '' + disc;
|
||||||
|
@ -371,7 +370,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
||||||
// product's unity of measure properties. Quantities greater than zero will not get
|
// product's unity of measure properties. Quantities greater than zero will not get
|
||||||
// rounded to zero
|
// rounded to zero
|
||||||
set_quantity: function(quantity){
|
set_quantity: function(quantity){
|
||||||
console.log('set_quantity: ',quantity);
|
|
||||||
if(quantity === 'remove'){
|
if(quantity === 'remove'){
|
||||||
this.order.removeOrderline(this);
|
this.order.removeOrderline(this);
|
||||||
return;
|
return;
|
||||||
|
@ -472,7 +470,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
||||||
},
|
},
|
||||||
// changes the base price of the product for this orderline
|
// changes the base price of the product for this orderline
|
||||||
set_unit_price: function(price){
|
set_unit_price: function(price){
|
||||||
console.log('set_price: ',price);
|
|
||||||
this.price = round(parseFloat(price) || 0, 2);
|
this.price = round(parseFloat(price) || 0, 2);
|
||||||
this.trigger('change');
|
this.trigger('change');
|
||||||
},
|
},
|
||||||
|
@ -738,10 +735,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
||||||
return {
|
return {
|
||||||
orderlines: orderlines,
|
orderlines: orderlines,
|
||||||
paymentlines: paymentlines,
|
paymentlines: paymentlines,
|
||||||
|
subtotal: this.getSubtotal(),
|
||||||
total_with_tax: this.getTotalTaxIncluded(),
|
total_with_tax: this.getTotalTaxIncluded(),
|
||||||
total_without_tax: this.getTotalTaxExcluded(),
|
total_without_tax: this.getTotalTaxExcluded(),
|
||||||
total_tax: this.getTax(),
|
total_tax: this.getTax(),
|
||||||
total_paid: this.getPaidTotal(),
|
total_paid: this.getPaidTotal(),
|
||||||
|
total_discount: this.getDiscountTotal(),
|
||||||
change: this.getChange(),
|
change: this.getChange(),
|
||||||
name : this.getName(),
|
name : this.getName(),
|
||||||
client: client ? client.name : null ,
|
client: client ? client.name : null ,
|
||||||
|
|
|
@ -600,6 +600,9 @@
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<table>
|
<table>
|
||||||
|
<tr><td>Subtotal:</td><td class="pos-right-align">
|
||||||
|
<t t-esc="widget.format_currency(widget.currentOrder.getSubtotal())"/>
|
||||||
|
</td></tr>
|
||||||
<tr><td>Tax:</td><td class="pos-right-align">
|
<tr><td>Tax:</td><td class="pos-right-align">
|
||||||
<t t-esc="widget.format_currency(widget.currentOrder.getTax())"/>
|
<t t-esc="widget.format_currency(widget.currentOrder.getTax())"/>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
Loading…
Reference in New Issue