<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_saleslines">
    <t t-call="report.html_container">
        <t t-foreach="docs" t-as="o">
            <t t-call="report.internal_layout">
                <div class="page">
                    <h2>POS Lines</h2>

                    <div class="row mt32 mb32">
                        <div class="col-xs-3">
                            <strong>Company</strong>:<br/>
                            <span t-field="res_company.name"/>
                        </div>
                        <div class="col-xs-3">
                            <strong>Print date</strong>:<br/>
                            <t t-esc="formatLang(time.strftime('%Y-%m-%d'), date=True)"/>
                        </div>
                        <div class="col-xs-3">
                            <strong>No. Of Articles</strong>:<br/>
                            <t t-esc="total_quantity(o)"/>
                        </div>
                    </div>

                    <table class="table table-condensed">
                        <thead>
                            <tr>
                                <th><strong>Description</strong></th>
                                <th><strong>Tax</strong></th>
                                <th class="text-right"><strong>Quantity</strong></th>
                                <th class="text-right"><strong>Unit Price</strong></th>
                                <th class="text-right" groups="sale.group_discount_per_so_line"><strong>Disc. (%)</strong></th>
                                <th class="text-right"><strong>Price</strong></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr t-foreach="o.lines" t-as="l">
                                <td>
                                    <t t-if="l.product_id and l.product_id.code">
                                        [<span t-field="l.product_id.code"/>]
                                    </t>
                                    <span t-field="l.product_id.name"/>
                                </td>
                                <td>
                                    <t t-esc="taxes(l)"/>
                                </td>
                                <td class="text-right">
                                    <span t-field="l.qty"/>
                                    <span t-field="l.product_id.uom_id.name" groups="product.group_uom"/>
                                </td>
                                <td class="text-right">
                                    <span t-field="l.price_unit"/>
                                </td>
                                <td class="text-right" groups="sale.group_discount_per_so_line">
                                    <span t-field="l.discount"/>
                                </td>
                                <td class="text-right">
                                    <span t-field="l.price_subtotal" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
                                </td>
                           </tr>
                        </tbody>
                    </table>

                    <div class="row">
                        <div class="col-xs-4 pull-right">
                            <table class="table table-condensed">
                                <tr class="border-black">
                                    <td><strong>Total Without Taxes</strong></td>
                                    <td class="text-right">
                                        <span t-esc="o.amount_total - o.amount_tax"
                                            t-esc-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Taxes</td>
                                    <td class="text-right">
                                        <span t-field="o.amount_tax"
                                            t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
                                    </td>
                                </tr>
                                <tr class="border-black">
                                    <td><strong>Total</strong></td>
                                    <td class="text-right">
                                        <span t-field="o.amount_total"
                                            t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
            </t>
        </t>
    </t>
</template>
</data>
</openerp>
