<!-- Orderlines -->
- <div line-ratio='0.6'>
+ <div class='orderlines' line-ratio='0.6'>
<t t-foreach='receipt.orderlines' t-as='line'>
<t t-set='simple' t-value='line.discount === 0 and line.unit_name === "Unit(s)" and line.quantity === 1' />
<t t-if='simple'>
<!-- Total -->
<line><right>--------</right></line>
- <line size='double-height'>
+ <line class='total' size='double-height'>
<left><pre> TOTAL</pre></left>
<right><value><t t-esc='receipt.total_with_tax' /></value></right>
</line>
</t>
</t>
+ <div class='before-footer' />
+
<!-- Footer -->
<t t-if='receipt.footer_xml'>
<t t-raw='receipt.footer_xml' />
<br/>
</t>
+ <div class='after-footer' />
+
<br/>
<div font='b'>
<div><t t-esc='receipt.name' /></div>
},
export_for_printing: function(){
var json = _super.prototype.export_for_printing.apply(this,arguments);
- json.loyalty_points = this.get_new_points();
+ if (this.pos.loyalty && this.get_client()) {
+ json.loyalty = {
+ rounding: this.pos.loyalty.rounding || 1,
+ name: this.pos.loyalty.name,
+ client: this.get_client().name,
+ points_won : this.get_won_points(),
+ points_spent: this.get_spent_points(),
+ points_total: this.get_new_total_points(),
+ };
+ }
return json;
},
export_as_JSON: function(){
</t>
</t>
+ <t t-extend="XmlReceipt">
+ <t t-jquery='.before-footer' t-operation='append'>
+ <t t-if='receipt.loyalty'>
+ <div class='loyalty' value-decimals='2' value-autoint='on'>
+ <div>--------------------------------</div>
+ <br/>
+ <div size='double-height'><t t-esc='receipt.loyalty.name'/></div>
+ <br />
+ <div><t t-esc='receipt.loyalty.client' /></div>
+ <br/>
+ <t t-if='receipt.loyalty.points_won'>
+ <line><left>Points Won</left><right><value><t t-esc='receipt.loyalty.points_won' /></value></right></line>
+ </t>
+ <t t-if='receipt.loyalty.points_spent'>
+ <line><left>Points Spent</left><right><value><t t-esc='receipt.loyalty.points_spent' /></value></right></line>
+ </t>
+ <t t-if='receipt.loyalty.points_total'>
+ <line><left>Total Points</left><right><value><t t-esc='receipt.loyalty.points_total' /></value></right></line>
+ </t>
+ <br />
+ </div>
+ </t>
+ </t>
+ </t>
+
<t t-extend='ClientDetails'>
<t t-jquery='.client-details-right' t-operation='prepend'>
<div class='client-detail'>