Selaa lähdekoodia

[FIX] modificacion de vista

Rodney Elpidio Enciso Arias 6 vuotta sitten
vanhempi
commit
bddc2131ff
1 muutettua tiedostoa jossa 59 lisäystä ja 88 poistoa
  1. 59 88
      static/src/xml/pos_receipt.xml

+ 59 - 88
static/src/xml/pos_receipt.xml

@@ -4,102 +4,73 @@
         <t t-jquery="div.pos-sale-ticket" t-operation="replace">
             <div class="pos-sale-ticket" style='font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 15px;'>
 
-            <div class="pos-center-align"><t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate + ' ' +
-                Date.CultureInfo.formatPatterns.longTime)"/> 
+                <div class="pos-center-align"><t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate + ' ' +
+                    Date.CultureInfo.formatPatterns.longTime)"/> 
+                    <br/>
+                    <t t-esc="order.get('name')"/></div>
                 <br/>
-                <t t-esc="order.get('name')"/></div>
-            <br/>
-            <t t-if="widget.pos.config.receipt_header">
-                <div style='text-align:center;font-size: 20px;'>
-                    <t t-esc="widget.pos.config.receipt_header" />
-                </div>
-                <br />
-            </t>
-            <p>=============================</p>
-            <!-- <br/> -->
-            Tel: <t t-esc="widget.pos.company.phone || ''"/> <br/>
-            Vendedor: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/>
-            <t t-if="order.attributes.client">
-                <br/>
-                <p>=============================</p>
-                Cliente: <t t-esc="order.attributes.client.name ? order.attributes.client.name : ''"/><br/>
-                Tel: <t t-esc="order.attributes.client.phone ? order.attributes.client.phone : ''"/><br/><br/>
-            </t>
-            <p>=============================</p>
-            <!-- <br/> -->
-            <table class="table table-condensed">
-                <!-- <thead>
+                <p>=======================================</p>
+                Tel: <t t-esc="widget.pos.company.phone || ''"/> <br/>
+                Vendedor: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/>
+                <t t-if="order.attributes.client">
+                    <br/>
+                    <p>=======================================</p>
+                    Cliente: <t t-esc="order.attributes.client.name ? order.attributes.client.name : ''"/><br/>
+                    Tel: <t t-esc="order.attributes.client.phone ? order.attributes.client.phone : ''"/><br/><br/>
+                </t>
+                <p>=======================================</p>
+                <table class="table table-condensed">
+                    <tbody>
+                        <tr t-foreach="orderlines" t-as="orderline">
+                            <p>
+                                <t t-esc="orderline.get_product().display_name"/>
+                                <span>&amp;nbsp;&amp;nbsp;</span>
+                                <t t-esc="orderline.get_quantity_str_with_unit()"/>
+                                <span>&amp;nbsp;&amp;nbsp;</span>
+                                <t t-esc="widget.format_currency(orderline.get_display_price())"/>
+                            </p>
+                        </tr>
+                    </tbody>
+                </table>
+                <p>=======================================</p>
+                <table>
                     <tr>
-                        <th>Producto    </th>
-                        <th class="text-right">Cant.    </th>
-                        <th class="text-right">Precio    </th>
+                        <p>
+                            Subtotal:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
+                            <t t-esc="widget.format_currency(order.getTotalTaxExcluded())"/>    
+                        </p>
+                    </tr>
+                    <t t-foreach="order.getTaxDetails()" t-as="taxdetail">
+                        <tr>
+                            <p>
+                                <t t-esc="taxdetail.name"/>: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
+                                <t t-esc="widget.format_currency(taxdetail.amount)"/>
+                            </p>
+                        </tr>
+                    </t>
+                    <tr class="emph">
+                        <p>
+                            Total: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
+                            <t t-esc="widget.format_currency(order.getTotalTaxIncluded())"/>    
+                        </p>
                     </tr>
-                </thead> -->
-                <tbody>
-                    <tr t-foreach="orderlines" t-as="orderline">
+                </table>
+                <p>=======================================</p>
+                <table>
+                    <tr t-foreach="paymentlines" t-as="line">
                         <td>
-                            <t t-esc="orderline.get_product().display_name"/>
-                            <span>&amp;nbsp;&amp;nbsp;</span>
-                        <!-- </td>
-                        <td> -->
-                            <t t-esc="orderline.get_quantity_str_with_unit()"/>
-                            <span>&amp;nbsp;&amp;nbsp;</span>
-                        <!-- </td>
-                        <td class="pos-right-align"> -->
-                            <t t-esc="widget.format_currency(orderline.get_display_price())"/>
+                            <t t-esc="line.name"/>
                         </td>
-                        
-                        <!-- <br/> -->
-                    </tr>
-                </tbody>
-            </table>
-            <!-- <br /> -->
-            <p>=============================</p>
-            <!-- <br/> -->
-            <table>
-                <tr>
-                    <td>Subtotal:   </td>
-                    <td class="pos-right-align">
-                        <t t-esc="widget.format_currency(order.getTotalTaxExcluded())"/>
-                    </td>
-                </tr>
-                <t t-foreach="order.getTaxDetails()" t-as="taxdetail">
-                    <tr>
-                        <td><t t-esc="taxdetail.name" />:   </td>
                         <td class="pos-right-align">
-                            <t t-esc="widget.format_currency(taxdetail.amount)"/>
+                            <t t-esc="widget.format_currency(line.get_amount())"/>
                         </td>
                     </tr>
-                </t>
-                <tr class="emph">
-                    <td>Total:   </td>
-                    <td class="pos-right-align" style='font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 20px;'>
-                        <t t-esc="widget.format_currency(order.getTotalTaxIncluded())"/>
-                    </td>
-                </tr>
-            </table>
-            <p>=============================</p>
-            <table>
-                <tr t-foreach="paymentlines" t-as="line">
-                    <td>
-                        <t t-esc="line.name"/>
-                    </td>
-                    <td class="pos-right-align">
-                        <t t-esc="widget.format_currency(line.get_amount())"/>
-                    </td>
-                </tr>
-            </table>
-            <table>
-                <tr><td>Change:   </td><td class="pos-right-align">
-                    <t t-esc="widget.format_currency(order.getChange())"/>
-                    </td></tr>
-            </table>
-            <t t-if="widget.pos.config.receipt_footer">
-                <br />
-                <div style='text-align:center'>
-                    <t t-esc="widget.pos.config.receipt_footer" />
-                </div>
-            </t>
+                </table>
+                <table>
+                    <tr><td>Change:   </td><td class="pos-right-align">
+                        <t t-esc="widget.format_currency(order.getChange())"/>
+                        </td></tr>
+                </table>
             </div>
         </t>
     </t>