Przeglądaj źródła

[FIX] modificacion en la cantidad

Rodney Elpidio Enciso Arias 6 lat temu
rodzic
commit
3fb2cd7bcf
1 zmienionych plików z 11 dodań i 6 usunięć
  1. 11 6
      static/src/xml/pos_receipt.xml

+ 11 - 6
static/src/xml/pos_receipt.xml

@@ -5,7 +5,7 @@
             <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)"/> 
+                    Date.CultureInfo.formatPatterns.longTime)"/>
                     <br/>
                     <t t-esc="order.get('name')"/></div>
                 <br/>
@@ -32,7 +32,12 @@
                         <tr t-foreach="orderlines" t-as="orderline">
                             <p>
                             	<t t-esc="orderline.get_product().display_name"/> <br/>
-                                <t t-esc="orderline.get_quantity_str_with_unit()"/>
+                                <t t-set="qty" t-value="orderline.quantity"/>
+                                <t t-js="ctx">
+                                    ctx.qty = accounting.formatNumber(ctx.qty,0,'.',',');
+                                </t>
+                                <t t-esc="qty"/>
+                                <!-- <t t-esc="orderline.get_quantity_str_with_unit()"/> -->
                                 <span>
                                     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
                                     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
@@ -47,7 +52,7 @@
                     <tr>
                         <p>
                             Subtotal:&amp;nbsp;&amp;nbsp;
-                            <t t-esc="widget.format_currency(order.getTotalTaxExcluded())"/>    
+                            <t t-esc="widget.format_currency(order.getTotalTaxExcluded())"/>
                         </p>
                     </tr>
                     <t t-foreach="order.getTaxDetails()" t-as="taxdetail">
@@ -61,7 +66,7 @@
                     <tr class="emph">
                         <p>
                             Total: &amp;nbsp;&amp;nbsp;
-                            <t t-esc="widget.format_currency(order.getTotalTaxIncluded())"/>    
+                            <t t-esc="widget.format_currency(order.getTotalTaxIncluded())"/>
                         </p>
                     </tr>
                 </table>
@@ -76,7 +81,7 @@
                     <tr>
                         <p>
                             Cambio: &amp;nbsp;&amp;nbsp;
-                            <t t-esc="widget.format_currency(order.getChange())"/> 
+                            <t t-esc="widget.format_currency(order.getChange())"/>
                         </p>
                     </tr>
                 </table>
@@ -90,4 +95,4 @@
             </div>
         </t>
     </t>
-</templates>
+</templates>