<?xml version="1.0" encoding="UTF-8" ?>
<!--Copyright 2014-2015 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
    Copyright 2018-2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
    License MIT (https://opensource.org/licenses/MIT). -->
<templates id="template" xml:space="preserve">
    <t t-extend="Product">
        <t t-jquery=".product-img" t-operation="append">
            <t t-if="widget.pos.config.show_qtys &amp;&amp; product.type == 'product'">
                <span
                    t-attf-class="qty-tag #{product.qty_available lte 0 ? 'not-available':''}"
                >
                    <t t-esc="product.rounded_qty()" />
                </span>
            </t>
        </t>
    </t>
    <t t-extend="Orderline">
        <t t-jquery=".info-list>t:first-child">
            this.attr('t-if', "line.get_quantity_str() !== '1' || line.selected || line.get_product().qty_available lt line.quantity ");
        </t>
        <t t-jquery="t[t-esc='line.get_quantity_str()']" t-operation="after">
            <t
                t-if="widget.pos.config.show_qtys &amp;&amp; line.get_product().type == 'product'"
            >
                <t t-set='qty_available' t-value='line.get_product().qty_available' />
                (of <span
                    t-attf-class="qty-info #{qty_available lt line.quantity ? 'not-available':''}"
                >
                    <t t-esc="line.get_product().rounded_qty()" />
                </span>)
            </t>
        </t>
    </t>
</templates>
