margin-bottom:10px;
}
.point-of-sale .order .summary .line{
+ float: right;
margin-right:15px;
+ margin-left: 15px;
padding-top:5px;
border-top: solid 2px;
border-color:#777;
}
+.point-of-sale .order .summary .line .subentry{
+ font-size: 10px;
+ font-weight: normal;
+ text-align: center;
+}
.point-of-sale .order .summary .line.empty{
+ text-align: right;
border-color:#BBB;
color:#999;
}
}), 0);
},
getChange: function() {
- return this.getPaidTotal() - this.getTotal();
+ return this.getPaidTotal() - this.getTotalTaxIncluded();
},
getDueLeft: function() {
- return this.getTotal() - this.getPaidTotal();
+ return this.getTotalTaxIncluded() - this.getPaidTotal();
},
// sets the type of receipt 'receipt'(default) or 'invoice'
set_receipt_type: function(type){
return {
orderlines: orderlines,
paymentlines: paymentlines,
- total_with_tax: this.getTotal(),
+ total_with_tax: this.getTotalTaxIncluded(),
total_without_tax: this.getTotalTaxExcluded(),
total_tax: this.getTax(),
total_paid: this.getPaidTotal(),
return {
name: this.getName(),
amount_paid: this.getPaidTotal(),
- amount_total: this.getTotal(),
+ amount_total: this.getTotalTaxIncluded(),
amount_tax: this.getTax(),
amount_return: this.getChange(),
lines: orderLines,
this.$('#payment-paid-total').html(paidTotal.toFixed(2));
this.$('#payment-remaining').html(remaining.toFixed(2));
this.$('#payment-change').html(change.toFixed(2));
- if((currentOrder.selected_orderline == undefined))
- remaining = 1
+ if(currentOrder.selected_orderline === undefined){
+ remaining = 1; // What is this ?
+ }
if(this.pos_widget.action_bar){
this.pos_widget.action_bar.set_button_disabled('validation', remaining > 0);
}
- this.$('.paymentline-amount input:last').focus();
},
set_numpad_state: function(numpadState) {
if (this.numpadState) {
},
update_summary: function(){
var order = this.pos.get('selectedOrder');
- var subtotal = order ? order.getSubtotal() : 0;
var total = order ? order.getTotalTaxIncluded() : 0;
var taxes = order ? total - order.getTotalTaxExcluded() : 0;
- this.$('.summary .value.subtotal').html(this.format_currency(subtotal));
- this.$('.summary .value.taxes').html(this.format_currency(taxes));
- this.$('.summary .value.total').html(this.format_currency(total));
+ this.$('.summary .total > .value').html(this.format_currency(total));
+ this.$('.summary .total .subentry .value').html(this.format_currency(taxes));
},
set_display_mode: function(mode){
if(this.display_mode !== mode){
</ul>
<div class="summary">
- <span t-attf-class="line #{widget.pos.get('selectedOrder').get('orderLines').length === 0 ? 'empty' : ''}">
- <span class='entry subtotal'>
- <span class="label subtotal">Subtotal:</span> <span class="value subtotal">0.00 €</span>
- </span>
- <span class='entry taxes'>
- <span class="label taxes">Taxes:</span> <span class="value taxes">0.00€</span>
- </span>
- <span class='entry total'>
- <span class="label total">Total:</span> <span class="value total">0.00 €</span>
- </span>
- </span>
+ <div t-attf-class="line #{widget.pos.get('selectedOrder').get('orderLines').length === 0 ? 'empty' : ''}">
+ <div class='entry total'>
+ <span class="label">Total: </span> <span class="value">0.00 €</span>
+ <div class='subentry'>Taxes: <span class="value">0.00€</span></div>
+ </div>
+ </div>
+ <div class='clear'></div>
</div>
</div>
</div>