|
Lines 59-66
Link Here
|
| 59 |
<h2>Summary</h2> |
59 |
<h2>Summary</h2> |
| 60 |
<ul> |
60 |
<ul> |
| 61 |
[% IF register.last_cashup %] |
61 |
[% IF register.last_cashup %] |
| 62 |
<li>Last cashup: [% register.last_cashup.timestamp | $KohaDates with_hours => 1 %] (<a data-toggle="modal" href="#cashupSummaryModal" class="button">Summary</a>)</li> |
62 |
<li>Last cashup: [% register.last_cashup.timestamp | $KohaDates with_hours => 1 %] (<a data-toggle="modal" data-cashup="[% register.last_cashup.id | html %]" data-register="[% register.description | html %]" href="#cashupSummaryModal" class="button">Summary</a>)</li> |
| 63 |
|
|
|
| 64 |
[% END %] |
63 |
[% END %] |
| 65 |
<li>Float: [% register.starting_float | $Price %]</li> |
64 |
<li>Float: [% register.starting_float | $Price %]</li> |
| 66 |
<li>Total income (cash): [% accountlines.credits_total * -1 | $Price %] ([% accountlines.credits_total(payment_type => 'CASH') * -1 | $Price %])</li> |
65 |
<li>Total income (cash): [% accountlines.credits_total * -1 | $Price %] ([% accountlines.credits_total(payment_type => 'CASH') * -1 | $Price %])</li> |
|
Lines 304-371
Link Here
|
| 304 |
</form> <!-- /#refund_form --> |
303 |
</form> <!-- /#refund_form --> |
| 305 |
</div> <!-- /#issueRefundModal --> |
304 |
</div> <!-- /#issueRefundModal --> |
| 306 |
|
305 |
|
| 307 |
<!-- Cashup summary modal --> |
306 |
[% INCLUDE 'modals/cashup_summary.inc' %] |
| 308 |
[% IF register.last_cashup %] |
|
|
| 309 |
<div class="modal printable" id="cashupSummaryModal" tabindex="-1" role="dialog" aria-labelledby="cashupSummaryLabel"> |
| 310 |
<div class="modal-dialog" role="document"> |
| 311 |
<div class="modal-content"> |
| 312 |
<div class="modal-header"> |
| 313 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 314 |
<h4 class="modal-title" id="cashupSummaryLabel">Cashup summary</h4> |
| 315 |
</div> |
| 316 |
<div class="modal-body"> |
| 317 |
<ul> |
| 318 |
<li>Cash register: [% register.description | html %]</li> |
| 319 |
<li>Period: [% register.last_cashup.cashup_summary.from_date | $KohaDates with_hours => 1 %] to [% register.last_cashup.cashup_summary.to_date | $KohaDates with_hours => 1 %]</li> |
| 320 |
</ul> |
| 321 |
<table> |
| 322 |
<thead> |
| 323 |
<tr> |
| 324 |
<th>Type</th> |
| 325 |
<th>Total</th> |
| 326 |
</tr> |
| 327 |
</thead> |
| 328 |
<tbody> |
| 329 |
[%- FOREACH out IN register.last_cashup.cashup_summary.outgoing -%] |
| 330 |
<tr> |
| 331 |
<td>[%- PROCESS account_type_description account=out -%]</td> |
| 332 |
<td>[% out.total * -1 | $Price %]</td> |
| 333 |
</tr> |
| 334 |
[%- END -%] |
| 335 |
[%- FOREACH in IN register.last_cashup.cashup_summary.income -%] |
| 336 |
<tr> |
| 337 |
<td>[%- PROCESS account_type_description account=in -%]</td> |
| 338 |
<td>[% in.total * -1 | $Price %]</td> |
| 339 |
</tr> |
| 340 |
[%- END -%] |
| 341 |
</tbody> |
| 342 |
<tfoot> |
| 343 |
<tr> |
| 344 |
<td>Total</td> |
| 345 |
<td>[% ( register.last_cashup.cashup_summary.outgoing_transactions.total + register.last_cashup.cashup_summary.income_transactions.total) * -1 | $Price %]</td> |
| 346 |
</tr> |
| 347 |
[% FOREACH pt IN payment_types %] |
| 348 |
<tr> |
| 349 |
<td>[% pt.lib | html %]</td> |
| 350 |
<td>[% ( register.last_cashup.cashup_summary.outgoing_transactions.total( payment_type => pt.authorised_value ) + register.last_cashup.cashup_summary.income_transactions.total( payment_type => pt.authorised_value )) * -1 | $Price %]</td> |
| 351 |
</tr> |
| 352 |
[% END %] |
| 353 |
|
| 354 |
</tfoot> |
| 355 |
</table> |
| 356 |
</div> <!-- /.modal-body --> |
| 357 |
<div class="modal-footer"> |
| 358 |
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
| 359 |
<button type="button" class="printModal btn btn-primary"><i class="fa fa-print"></i> Print</button> |
| 360 |
</div> <!-- /.modal-footer --> |
| 361 |
</div> <!-- /.modal-content --> |
| 362 |
</div> <!-- /.modal-dialog --> |
| 363 |
</div> <!-- /#cashupSummaryModal --> |
| 364 |
[% END %] |
| 365 |
|
307 |
|
| 366 |
[% MACRO jsinclude BLOCK %] |
308 |
[% MACRO jsinclude BLOCK %] |
| 367 |
[% INCLUDE 'datatables.inc' %] |
309 |
[% INCLUDE 'datatables.inc' %] |
| 368 |
[% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] |
310 |
[% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] |
|
|
311 |
[% Asset.js("js/cashup_modal.js") | $raw %] |
| 369 |
[% INCLUDE 'calendar.inc' %] |
312 |
[% INCLUDE 'calendar.inc' %] |
| 370 |
<script> |
313 |
<script> |
| 371 |
var sales_table = $("#sales").dataTable($.extend(true, {}, dataTablesDefaults, { |
314 |
var sales_table = $("#sales").dataTable($.extend(true, {}, dataTablesDefaults, { |