Browse Source

[FIX] modificacion en los datos del cliente dentro del ticket

Rodney Elpidio Enciso Arias 7 years ago
parent
commit
805c7eabb8
1 changed files with 14 additions and 13 deletions
  1. 14 13
      static/src/xml/pos_receipt.xml

+ 14 - 13
static/src/xml/pos_receipt.xml

@@ -18,12 +18,16 @@
                 </div>
                 </div>
                 <br />
                 <br />
             </t>
             </t>
-            Phone: <t t-esc="widget.pos.company.phone || ''"/><br />
-            User: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/><br />
-            <p>--------------------------------------------</p>
-            Cliente: <t t-esc="order.changed.client.name"/><br/>
-            Teléfono: <t t-esc="order.changed.client.phone"/><br/>
-            Dirección: <t t-esc="order.changed.client.address"/><br/>
+            Phone: <t t-esc="widget.pos.company.phone || ''"/>
+            <br/>
+            User: <t t-esc="widget.pos.cashier ? widget.pos.cashier.name : widget.pos.user.name"/>
+            <br/>
+            <t t-if="order.attributes.client">
+                <p>--------------------------------------------</p>
+                Cliente: <t t-esc="order.attributes.client.name ? order.attributes.client.name : ''"/><br />
+                Teléfono: <t t-esc="order.attributes.client.phone ? order.attributes.client.phone : ''"/><br />
+                Dirección: <t t-esc="order.attributes.client.address ? order.attributes.client.address : ''"/>
+            </t>
             <p>--------------------------------------------</p>
             <p>--------------------------------------------</p>
             <table class="table table-condensed">
             <table class="table table-condensed">
                 <thead>
                 <thead>
@@ -35,9 +39,9 @@
                 </thead>
                 </thead>
                 <tbody>
                 <tbody>
                     <colgroup>
                     <colgroup>
-                        <col width='50%' />
-                        <col width='20%' />
-                        <col width='30%' />
+                        <col width='50%'/>
+                        <col width='20%'/>
+                        <col width='30%'/>
                     </colgroup>
                     </colgroup>
                     <tr t-foreach="orderlines" t-as="orderline">
                     <tr t-foreach="orderlines" t-as="orderline">
                         <td>
                         <td>
@@ -87,7 +91,6 @@
                     </td>
                     </td>
                 </tr>
                 </tr>
             </table>
             </table>
-            <!-- <br /> -->
             <p>--------------------------------------------</p>
             <p>--------------------------------------------</p>
             <table>
             <table>
                 <tr t-foreach="paymentlines" t-as="line">
                 <tr t-foreach="paymentlines" t-as="line">
@@ -105,9 +108,7 @@
                     <t t-esc="widget.format_currency(order.getChange())"/>
                     <t t-esc="widget.format_currency(order.getChange())"/>
                     </td></tr>
                     </td></tr>
             </table>
             </table>
-
-            <!--  -->
-            <br />
+            <br/>
             <t t-if="widget.pos.config.receipt_footer">
             <t t-if="widget.pos.config.receipt_footer">
                 <br />
                 <br />
                 <div style='text-align:center'>
                 <div style='text-align:center'>