Print improvements
This commit is contained in:
		
							parent
							
								
									b038ce1d94
								
							
						
					
					
						commit
						aff75a66eb
					
				
					 3 changed files with 97 additions and 46 deletions
				
			
		|  | @ -25,51 +25,55 @@ | |||
| 
 | ||||
| <p>This invoice has been issued as a result of an application to attend {% conference_name %}. All amounts are in New Zealand Dollars (NZD).</p> | ||||
| 
 | ||||
| <table class="table table-striped"> | ||||
|   <tr> | ||||
|     <th>Description</th> | ||||
|     <th class="text-right">Quantity</th> | ||||
|     <th class="text-right">Price/Unit</th> | ||||
|     <th class="text-right">Total</th> | ||||
|   </tr> | ||||
|   {% for line_item in invoice.lineitem_set.all %} | ||||
| <table class="table table-striped my-4"> | ||||
|   <thead> | ||||
|     <tr> | ||||
|       <td>{{ line_item.description }}</td> | ||||
|       <td class="text-right">{{ line_item.quantity }}</td> | ||||
|       <td class="text-right">${{ line_item.price }}</td> | ||||
|       <td class="text-right">${{ line_item.total_price }}</td> | ||||
|       <th>Description</th> | ||||
|       <th class="text-right">Quantity</th> | ||||
|       <th class="text-right">Price/Unit</th> | ||||
|       <th class="text-right">Total</th> | ||||
|     </tr> | ||||
|   {% endfor %} | ||||
|   </thead> | ||||
|   <tbody> | ||||
|     {% for line_item in invoice.lineitem_set.all %} | ||||
|       <tr> | ||||
|         <td>{{ line_item.description }}</td> | ||||
|         <td class="text-right">{{ line_item.quantity }}</td> | ||||
|         <td class="text-right">${{ line_item.price }}</td> | ||||
|         <td class="text-right">${{ line_item.total_price }}</td> | ||||
|       </tr> | ||||
|     {% endfor %} | ||||
| 
 | ||||
|   <tr><th colspan="4"></th></tr> | ||||
|     <tr><th colspan="4"></th></tr> | ||||
| 
 | ||||
|   <tr> | ||||
|     <th colspan="3">Includes 15% New Zealand Goods and Services Tax</th> | ||||
|     <td class="text-right">${{ invoice.value|gst}}</td> | ||||
|   </tr> | ||||
| 
 | ||||
|   <tr> | ||||
|     <th colspan="3">Total</th> | ||||
|     <td class="text-right">${{ invoice.value }}</td> | ||||
|   </tr> | ||||
| 
 | ||||
|   <tr><th colspan="4"></th></tr> | ||||
| 
 | ||||
|   <tr> | ||||
|     <th colspan="3">Total payments received:</th> | ||||
|     <td class="text-right">${{ invoice.total_payments }}</td> | ||||
|   </tr> | ||||
|   {% if invoice.is_unpaid or invoice.is_paid %} | ||||
|     <tr> | ||||
|       <th colspan="3">Balance due:</th> | ||||
|       <td class="text-right">${{ invoice.balance_due }}</td> | ||||
|       <th colspan="3">Includes 15% New Zealand Goods and Services Tax</th> | ||||
|       <td class="text-right">${{ invoice.value|gst}}</td> | ||||
|     </tr> | ||||
|   {% endif %} | ||||
| 
 | ||||
|     <tr> | ||||
|       <th colspan="3">Total</th> | ||||
|       <td class="text-right">${{ invoice.value }}</td> | ||||
|     </tr> | ||||
| 
 | ||||
|     <tr><th colspan="4"></th></tr> | ||||
| 
 | ||||
|     <tr> | ||||
|       <th colspan="3">Total payments received:</th> | ||||
|       <td class="text-right">${{ invoice.total_payments }}</td> | ||||
|     </tr> | ||||
|     {% if invoice.is_unpaid or invoice.is_paid %} | ||||
|       <tr> | ||||
|         <th colspan="3">Balance due:</th> | ||||
|         <td class="text-right">${{ invoice.balance_due }}</td> | ||||
|       </tr> | ||||
|     {% endif %} | ||||
|   </tbody> | ||||
| </table> | ||||
| 
 | ||||
| {% if invoice.paymentbase_set.all %} | ||||
|   <hr /> | ||||
|   <h3>Payments received</h3> | ||||
|   <div class="page-break"></div> | ||||
|   <h3 class="pt-4">Payments received</h3> | ||||
|   {% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %} | ||||
| {% endif %} | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,16 +1,20 @@ | |||
| {% if payments %} | ||||
| <table class="table table-striped"> | ||||
|   <tr> | ||||
|     <th>Payment time</th> | ||||
|     <th>Reference</th> | ||||
|     <th>Amount</th> | ||||
|   </tr> | ||||
|   {% for payment in payments %} | ||||
|   <thead> | ||||
|     <tr> | ||||
|       <td>{{payment.time}}</td> | ||||
|       <td>{{payment.reference}}</td> | ||||
|       <td>{{payment.amount}}</td> | ||||
|       <th>Payment time</th> | ||||
|       <th>Reference</th> | ||||
|       <th>Amount</th> | ||||
|     </tr> | ||||
|   {% endfor %} | ||||
|   </thead> | ||||
|   <tbody> | ||||
|     {% for payment in payments %} | ||||
|       <tr> | ||||
|         <td>{{payment.time}}</td> | ||||
|         <td>{{payment.reference}}</td> | ||||
|         <td>{{payment.amount}}</td> | ||||
|       </tr> | ||||
|     {% endfor %} | ||||
|   </tbody> | ||||
| </table> | ||||
| {% endif %} | ||||
|  |  | |||
|  | @ -459,6 +459,49 @@ hr { | |||
|     .hidden-print { | ||||
|         display: none !important | ||||
|     } | ||||
| 
 | ||||
|     .page-break { | ||||
|         page-break-after: always; | ||||
|     } | ||||
| 
 | ||||
|     .jumbotron { | ||||
|         font-size: 8pt; | ||||
|         padding: 0; | ||||
|         background-color: white; | ||||
|         border: none; | ||||
|         color: #000; | ||||
| 
 | ||||
|         h3 { | ||||
|             margin-top: 4rem; | ||||
|         } | ||||
| 
 | ||||
|         h4 { | ||||
|             margin-top: 2rem; | ||||
|         } | ||||
| 
 | ||||
|         table { | ||||
|             margin-top: 2rem; | ||||
|             border: none !important; | ||||
| 
 | ||||
|             th, td { | ||||
|                 padding: 0.75rem 0; | ||||
|                 border: none; | ||||
|             } | ||||
| 
 | ||||
|             thead th { | ||||
|                 border-bottom: 1px solid black; | ||||
|             } | ||||
| 
 | ||||
|             th[colspan="4"] { | ||||
|                 display: none; | ||||
| 
 | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     footer { | ||||
|         display: none !important; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| .card-group.key-dates { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Tobias
						Tobias