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> | <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"> | <table class="table table-striped my-4"> | ||||||
|   <tr> |   <thead> | ||||||
|     <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 %} |  | ||||||
|     <tr> |     <tr> | ||||||
|       <td>{{ line_item.description }}</td> |       <th>Description</th> | ||||||
|       <td class="text-right">{{ line_item.quantity }}</td> |       <th class="text-right">Quantity</th> | ||||||
|       <td class="text-right">${{ line_item.price }}</td> |       <th class="text-right">Price/Unit</th> | ||||||
|       <td class="text-right">${{ line_item.total_price }}</td> |       <th class="text-right">Total</th> | ||||||
|     </tr> |     </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> |     <tr> | ||||||
|       <th colspan="3">Balance due:</th> |       <th colspan="3">Includes 15% New Zealand Goods and Services Tax</th> | ||||||
|       <td class="text-right">${{ invoice.balance_due }}</td> |       <td class="text-right">${{ invoice.value|gst}}</td> | ||||||
|     </tr> |     </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> | </table> | ||||||
| 
 | 
 | ||||||
| {% if invoice.paymentbase_set.all %} | {% if invoice.paymentbase_set.all %} | ||||||
|   <hr /> |   <div class="page-break"></div> | ||||||
|   <h3>Payments received</h3> |   <h3 class="pt-4">Payments received</h3> | ||||||
|   {% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %} |   {% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %} | ||||||
| {% endif %} | {% endif %} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,16 +1,20 @@ | ||||||
| {% if payments %} | {% if payments %} | ||||||
| <table class="table table-striped"> | <table class="table table-striped"> | ||||||
|   <tr> |   <thead> | ||||||
|     <th>Payment time</th> |  | ||||||
|     <th>Reference</th> |  | ||||||
|     <th>Amount</th> |  | ||||||
|   </tr> |  | ||||||
|   {% for payment in payments %} |  | ||||||
|     <tr> |     <tr> | ||||||
|       <td>{{payment.time}}</td> |       <th>Payment time</th> | ||||||
|       <td>{{payment.reference}}</td> |       <th>Reference</th> | ||||||
|       <td>{{payment.amount}}</td> |       <th>Amount</th> | ||||||
|     </tr> |     </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> | </table> | ||||||
| {% endif %} | {% endif %} | ||||||
|  |  | ||||||
|  | @ -459,6 +459,49 @@ hr { | ||||||
|     .hidden-print { |     .hidden-print { | ||||||
|         display: none !important |         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 { | .card-group.key-dates { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Tobias
						Tobias