mirror of
https://github.com/bringout/oca-ocb-pos.git
synced 2026-04-24 15:22:04 +02:00
Initial commit: Pos packages
This commit is contained in:
commit
95dfb9edb0
1301 changed files with 264148 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PromoCodeButton" owl="1">
|
||||
<span class="control-button">
|
||||
<i class="fa fa-barcode"></i>
|
||||
<span> </span>
|
||||
<span>Enter Code</span>
|
||||
</span>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="ResetProgramsButton" owl="1">
|
||||
<span class="control-button">
|
||||
<i class="fa fa-star"></i>
|
||||
<span> </span>
|
||||
<span>Reset Programs</span>
|
||||
</span>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="RewardButton" owl="1">
|
||||
<span class="control-button" t-att-class="hasClaimableRewards() ? 'highlight' : ''">
|
||||
<i class="fa fa-star"></i>
|
||||
<span> </span>
|
||||
<span>Reward</span>
|
||||
</span>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="point_of_sale.eWalletButton" owl="1">
|
||||
<t t-set="_order" t-value="env.pos.get_order()" />
|
||||
<t t-set="_orderTotal" t-value="_order.get_total_with_tax()" />
|
||||
<t t-set="_eWalletPrograms" t-value="_getEWalletPrograms()" />
|
||||
<t t-set="_eWalletRewards" t-value="_getEWalletRewards(_order)" />
|
||||
<span class="control-button" t-att-class="_shouldBeHighlighted(_orderTotal, _eWalletPrograms, _eWalletRewards) ? 'highlight' : ''" t-on-click="_onClickWalletButton">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span> </span>
|
||||
<span><t t-esc="_getText(_orderTotal, _eWalletPrograms, _eWalletRewards)" /></span>
|
||||
</span>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="pos_coupon.OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//div[hasclass('pos-receipt')]//div[hasclass('before-footer')]" position="inside">
|
||||
<t t-if='receipt.loyaltyStats'>
|
||||
<t t-foreach="receipt.loyaltyStats" t-as="_loyaltyStat" t-key="_loyaltyStat.couponId">
|
||||
<!-- Show only if portal_visible. -->
|
||||
<div t-if="_loyaltyStat.program.portal_visible and (_loyaltyStat.points.won || _loyaltyStat.points.spent)" class='loyalty'>
|
||||
<span class="pos-receipt-center-align">
|
||||
<div>--------------------------------</div>
|
||||
<br/>
|
||||
<div t-esc='_loyaltyStat.program.name' class="pos-receipt-title" />
|
||||
|
||||
<br />
|
||||
</span>
|
||||
<t t-if='_loyaltyStat.points.won'>
|
||||
<div><t t-esc="_loyaltyStat.points.name"/> Won: <span t-esc='_loyaltyStat.points.won' class="pos-receipt-right-align"/></div>
|
||||
</t>
|
||||
<t t-if='_loyaltyStat.points.spent'>
|
||||
<div><t t-esc="_loyaltyStat.points.name"/> Spent: <span t-esc='_loyaltyStat.points.spent' class="pos-receipt-right-align"/></div>
|
||||
</t>
|
||||
<!-- Don't use points.total, it's wrong in this context (after the order synced). -->
|
||||
<!-- Show balance as it's updated during _postPushOrderResolve. -->
|
||||
<t t-if='_loyaltyStat.points.balance'>
|
||||
<div>Balance <t t-esc="_loyaltyStat.points.name"/>: <span t-esc='_loyaltyStat.points.balance' class="pos-receipt-right-align"/></div>
|
||||
</t>
|
||||
<br />
|
||||
</div>
|
||||
</t>
|
||||
<br/>
|
||||
<div>Customer <span t-esc='receipt.partner.name' class='pos-receipt-right-align'/></div>
|
||||
</t>
|
||||
<t t-if="receipt.new_coupon_info and receipt.new_coupon_info.length !== 0">
|
||||
<div class="pos-coupon-rewards">
|
||||
<div>------------------------</div>
|
||||
<br/>
|
||||
<div>
|
||||
Coupon Codes
|
||||
</div>
|
||||
<t t-foreach="receipt.new_coupon_info" t-as="coupon_info" t-key="coupon_info.code">
|
||||
<div class="coupon-container">
|
||||
<div style="font-size: 110%;">
|
||||
<t t-esc="coupon_info['program_name']"/>
|
||||
</div>
|
||||
<div>
|
||||
<span>Valid until: </span>
|
||||
<t t-if="coupon_info['expiration_date']">
|
||||
<t t-esc="coupon_info['expiration_date']"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
no expiration
|
||||
</t>
|
||||
</div>
|
||||
<div>
|
||||
<img t-att-src="'/report/barcode/Code128/'+coupon_info['code']" style="width:200px;height:50px" alt="Barcode"/>
|
||||
</div>
|
||||
<div>
|
||||
<t t-esc="coupon_info['code']"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="OrderSummary" t-inherit="point_of_sale.OrderSummary" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//div[hasclass('summary')]" position="after">
|
||||
<div class="summary clearfix">
|
||||
<t t-set="_loyaltyStats" t-value="getLoyaltyPoints()"/>
|
||||
<t t-foreach="_loyaltyStats" t-as="_loyaltyStat" t-key="_loyaltyStat.couponId">
|
||||
<t t-if="_loyaltyStat.points.won || _loyaltyStat.points.spent">
|
||||
<div class='loyalty-points'>
|
||||
<div class='loyalty-points-title'>
|
||||
<t t-esc="_loyaltyStat.points.name"/>
|
||||
</div>
|
||||
<t t-if='_loyaltyStat.points.balance'>
|
||||
<div class="loyalty-points-balance">
|
||||
<span class='value'><t t-esc='_loyaltyStat.points.balance'/></span>
|
||||
</div>
|
||||
</t>
|
||||
<div>
|
||||
<t t-if='_loyaltyStat.points.won'>
|
||||
<span class="value loyalty-points-won">+<t t-esc='_loyaltyStat.points.won'/></span>
|
||||
</t>
|
||||
<t t-if='_loyaltyStat.points.spent'>
|
||||
<span class="value loyalty-points-spent">-<t t-esc='_loyaltyStat.points.spent'/></span>
|
||||
</t>
|
||||
</div>
|
||||
<div class='loyalty-points-total'>
|
||||
<span class='value'><t t-esc='_loyaltyStat.points.total'/></span>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div></div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="pos_loyalty.Orderline" t-inherit="point_of_sale.Orderline" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//ul[hasclass('info-list')]" position="attributes">
|
||||
<attribute name="t-if">!_isGiftCardOrEWalletReward()</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//ul[hasclass('info-list')]" position="after">
|
||||
<ul t-else="" class="info-list">
|
||||
Current Balance: <span t-esc="_getGiftCardOrEWalletBalance()"/>
|
||||
</ul>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="pos_loyalty.PartnerLine" t-inherit="point_of_sale.PartnerLine" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//td[hasclass('partner-line-balance')]" position="inside">
|
||||
<t t-set="_loyaltyCards" t-value="env.pos.getLoyaltyCards(props.partner)" />
|
||||
<t t-foreach="_loyaltyCards" t-as="_loyaltyCard" t-key="_loyaltyCard.id">
|
||||
<div class="pos-right-align">
|
||||
<t t-esc="_getLoyaltyPointsRepr(_loyaltyCard)"/>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Loading…
Add table
Add a link
Reference in a new issue