Browse Source

Add total without tax in invoice pdf

dam 8 years ago
parent
commit
321751aa44
1 changed files with 15 additions and 3 deletions
  1. 15 3
      coin/billing/templates/billing/invoice_pdf.html

+ 15 - 3
coin/billing/templates/billing/invoice_pdf.html

@@ -82,6 +82,7 @@
   .cell-label {width: 70%;}
   .cell-quantity {width: 5%;}
   .cell-amount {width: 10%;}
+  .cell-tax {width: 5%;}
   .cell-total {width: 15%;}
 
   /* details cell style */
@@ -91,8 +92,10 @@
   .cell-quantity {
     text-align: center;
   }
-  .cell--money {
+  .cell--money, 
+  .cell-tax {
     text-align: right;
+    white-space: nowrap;
   }
 
   .cell-label p + p {
@@ -158,7 +161,8 @@
       <tr>
         <th class="cell-label cell--empty"></th>
         <th class="cell-quantity">Quantité</th>
-        <th class="cell-amount cell--money">PU</th>
+        <th class="cell-amount cell--money">PU (HT)</th>
+        <th class="cell-label cell-tax">TVA</th>
         <th class="cell-total cell--money">Total</th>
       </tr>
     </thead>
@@ -181,14 +185,22 @@
         </td>
         <td class="cell-quantity">{{ detail.quantity }}</td>
         <td class="cell-amount cell--money">{{ detail.amount }}€</td>
+        <td class="cell-tax">{{ detail.tax }}%</td>
         <td class="cell-total cell--money">{{ detail.total }}€</td>
       </tr>
       {% endfor %}
+      
       <tr>
         <td class="cell-result cell--empty"></td>
-        <td class="cell-result result-label" colspan="2">Total TTC</td>
+        <td class="result-label " colspan="3">Total HT</td>
+        <td class="cell--money ">{{ invoice.amount_before_tax }}€</td>
+      </tr>
+      <tr>
+        <td class="cell-result cell--empty"></td>
+        <td class="cell-result result-label" colspan="3">Total TTC</td>
         <td class="cell-result result-total cell--money">{{ invoice.amount }}€</td>
       </tr>
+       
     </tbody>
   </table>