167 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			167 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
| <!DOCTYPE html>
 | |
| <html>
 | |
| <head>
 | |
|     <title>Institution Memebership Bill</title>
 | |
|     <link rel="icon" href="/static/homepage/assets/img/apple-touch-icon.png">
 | |
|     <link rel="icon" href="/static/homepage/assets/logos/MNF-Logo-Final.png">
 | |
|  
 | |
|     <style>
 | |
|         /* Add your CSS styling here */
 | |
|         body {
 | |
|             font-family: Arial, sans-serif;
 | |
|             margin-top: 100px !important;
 | |
|         }
 | |
|         .d-flex {
 | |
|             display: flex;
 | |
|         }
 | |
|         .justify-content-center {
 | |
|             justify-content: center;
 | |
|         }
 | |
|         .button {
 | |
|             background-color: blue;
 | |
|             color: white;
 | |
|             border: none;
 | |
|             padding: 10px 20px;
 | |
|             cursor: pointer;
 | |
|             margin-right: 10px;
 | |
|         }
 | |
|         .button.print {
 | |
|             background-color: green;
 | |
|         }
 | |
|         h1, h3 {
 | |
|             text-align: center;
 | |
|         }
 | |
|         table {
 | |
|             width: 80%;
 | |
|             margin: 20px auto;
 | |
|             border-collapse: collapse;
 | |
|         }
 | |
|         th, td {
 | |
|             border: 1px solid black;
 | |
|             padding: 8px;
 | |
|             text-align: left;
 | |
|         }
 | |
|         th {
 | |
|             background-color: #f2f2f2;
 | |
|         }
 | |
|         strong {
 | |
|             font-weight: bold;
 | |
|         }
 | |
|     </style>
 | |
| </head>
 | |
| <body>
 | |
| 
 | |
| 
 | |
| 
 | |
| <h1>INSTITUTION MEMBERSHIP BILL</h1>
 | |
| 
 | |
| <table>
 | |
|     <thead>
 | |
|         <tr>
 | |
|             <th scope="col">Name</th>
 | |
|             <th scope="col">Total usage in amount</th>
 | |
|         </tr>
 | |
|     </thead>
 | |
|     <tbody>
 | |
|         <tr>
 | |
|             <td>{{institute.name}}[Main admin account]</td>
 | |
|             <td>$  {{ institute.used_credit_point}}</td>
 | |
|         </tr>
 | |
|         {% for i in affiliated_students %}
 | |
|         <tr>
 | |
|             <td>{{i.name}}</td>
 | |
|             <td>$  {{i.used_credit_point}}</td>
 | |
|         </tr>
 | |
|         {% endfor %}
 | |
|         <tr>
 | |
|             <td><strong>Total Payable</strong></td>
 | |
|             <td><strong>$  {{total_payable}}<strong></td>
 | |
|         </tr>
 | |
|         <tr>{{discount_percentage}}
 | |
|             <td><strong>Discount[{{discount_percentage}}%]</strong></td>
 | |
|             <td><strong>$  {{discount_value}}<strong></td>
 | |
|         </tr>
 | |
|         <tr>
 | |
|             <td><strong>Final Payable</strong></td>
 | |
|             <td><strong>$  {{final_payable}}<strong></td>
 | |
|         </tr>
 | |
|     </tbody>
 | |
| </table>
 | |
| 
 | |
| <h3>USAGE RECORDS</h3>
 | |
| <div id="full_usage_record">
 | |
|   <div id='member_usage_record'>
 | |
|     <table>
 | |
|       <caption>Records of {{institute.name}}</caption>
 | |
|       <thead>
 | |
|           <tr>
 | |
|               <th scope="col">Date</th>
 | |
|               <th scope="col">ID</th>
 | |
|               <th scope="col">Service</th>
 | |
|               <th scope="col">Amount</th>
 | |
|           </tr>
 | |
|       </thead>
 | |
|       <tbody>
 | |
|         {% for transaction in transactions %}
 | |
|           <tr>
 | |
|             <td>{{transaction.date}}</td>
 | |
|             <td>{{transaction.transaction_uuid}}</td>
 | |
|             <td>{{transaction.service_type}}</td>
 | |
|             <td>$  {{transaction.amount}}</td>
 | |
|           </tr>
 | |
|         {% endfor %}
 | |
|       </tbody>
 | |
|     </table>
 | |
|   </div>
 | |
|   <div id='users_usage_record'>
 | |
|     {% for user_id, user_data in affiliated_student_transactions.items %}
 | |
|       <table>
 | |
|         <caption>Records of {{ user_data.name }}</caption>
 | |
|         <thead>
 | |
|             <tr>
 | |
|                 <th scope="col">Date</th>
 | |
|                 <th scope="col">ID</th>
 | |
|                 <th scope="col">Service</th>
 | |
|                 <th scope="col">Amount</th>
 | |
|             </tr>
 | |
|         </thead>
 | |
|         <tbody>
 | |
|           {% if user_data.transactions %}
 | |
|             {% for transaction in user_data.transactions %}
 | |
|                 <tr>
 | |
|                     <td>{{ transaction.date }}</td>
 | |
|                     <td>{{ transaction.transaction_uuid }}</td>
 | |
|                     <td>{{ transaction.service_type }}</td>
 | |
|                     <td>$ {{ transaction.amount }}</td>
 | |
|                 </tr>
 | |
|             {% endfor %}
 | |
|         {% else %}
 | |
|             <tr>
 | |
|               <td colspan="4" style="text-align: center;">No records found</td>
 | |
|             </tr>
 | |
|         {% endif %}
 | |
|         </tbody>
 | |
|       </table>
 | |
|     {% endfor %}
 | |
| </div>
 | |
| 
 | |
| </div>
 | |
| <div class="d-flex justify-content-center">
 | |
|     <button class="button" onclick="goBack()">Go Back</button>
 | |
|     <button class="button print" onclick="printPage()">Print Page</button>
 | |
| </div>
 | |
| <script>
 | |
| // Function to go back to the previous page
 | |
| function goBack() {
 | |
|     window.history.back();
 | |
| }
 | |
| 
 | |
| // Function to print the current page
 | |
| function printPage() {
 | |
|     window.print();
 | |
| }
 | |
| </script>
 | |
| 
 | |
| </body>
 | |
| </html>
 |