Line 0
Link Here
|
|
|
1 |
[% USE raw %] |
2 |
[% USE Asset %] |
3 |
[% USE Koha %] |
4 |
[% USE KohaDates %] |
5 |
[% USE AuthorisedValues %] |
6 |
[% USE Price %] |
7 |
[% SET footerjs = 1 %] |
8 |
[% PROCESS 'accounts.inc' %] |
9 |
[% INCLUDE 'doc-head-open.inc' %] |
10 |
<title>Koha › Cashup</title> |
11 |
[% INCLUDE 'doc-head-close.inc' %] |
12 |
</head> |
13 |
|
14 |
<body id="register" class="pos"> |
15 |
[% INCLUDE 'header.inc' %] |
16 |
[% INCLUDE 'circ-search.inc' %] |
17 |
|
18 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/pos/pay.pl">Point of sale</a> › Register details</div> |
19 |
|
20 |
<div class="main container-fluid"> |
21 |
<div class="row"> |
22 |
<div class="col-sm-10 col-sm-push-2"> |
23 |
|
24 |
[% IF ( error_registers ) %] |
25 |
<div id="error_message" class="dialog alert"> |
26 |
You must have at least one cash register associated with this branch before you can record payments. |
27 |
</div> |
28 |
[% ELSE %] |
29 |
<div id="toolbar" class="btn-toolbar"> |
30 |
<a id="cashup" href="/cgi-bin/koha/pos/register.pl?op=cashup" class="btn btn-default"><i class="fa fa-money"></i> Record cashup</a> |
31 |
</div> |
32 |
|
33 |
<h1>Register transaction details for [% register.name | html %]</h1> |
34 |
|
35 |
<h2>Summary</h2> |
36 |
<ul> |
37 |
[% IF register.last_cashup %] |
38 |
<li>Last cashup: [% register.last_cashup.timestamp | $KohaDates with_hours => 1 %]</li> |
39 |
[% END %] |
40 |
<li>Float: [% register.starting_float | $Price %]</li> |
41 |
<li>Total income (cash): [% accountlines.credits_total * -1 | $Price %] ([% accountlines.credits_total(payment_type => 'CASH') * -1 | $Price %])</li> |
42 |
<li>Total outgoing (cash): [% accountlines.debits_total * -1 | $Price %] ([% accountlines.debits_total( payment_type => 'CASH') * -1 | $Price %])</li> |
43 |
<li>Total bankable: [% accountlines.total( payment_type => 'CASH') * -1 | $Price %]</li> |
44 |
</ul> |
45 |
|
46 |
[% IF register.last_cashup %] |
47 |
<h2>Transactions since [% register.last_cashup.timestamp | $KohaDates with_hours => 1 %]</h2> |
48 |
[% ELSE %] |
49 |
<h2>Transactions to date</h2> |
50 |
[% END %] |
51 |
<table id="sales" class="table_sales"> |
52 |
<thead> |
53 |
<th> |
54 |
Receipt ID |
55 |
</th> |
56 |
<th> |
57 |
Description of charges |
58 |
</th> |
59 |
<th> |
60 |
Item |
61 |
</th> |
62 |
<th> |
63 |
Transaction |
64 |
</th> |
65 |
<th> |
66 |
Actions |
67 |
</th> |
68 |
</thead> |
69 |
<tbody> |
70 |
[% FOREACH accountline IN accountlines %] |
71 |
[% IF accountline.is_credit %] |
72 |
<tr class="credit"> |
73 |
<td>[% accountline.accountlines_id %]</td> |
74 |
<td> |
75 |
[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %]) |
76 |
</td> |
77 |
<td></td> |
78 |
<td> |
79 |
[% accountline.amount * -1 | $Price %] |
80 |
</td> |
81 |
<td> |
82 |
<button class="printReceipt" data-accountline="[%- accountline.accountlines_id | html -%]"><i class="fa fa-print"></i> Print receipt</button> |
83 |
</td> |
84 |
</tr> |
85 |
[% FOREACH credit IN accountline.credit_offsets %] |
86 |
<tr> |
87 |
<td>[% accountline.accountlines_id %]</td> |
88 |
<td>[%- PROCESS account_type_description account=credit.debit -%]</td> |
89 |
<td>[% credit.debit.amount | $Price %]</td> |
90 |
<td></td> |
91 |
<td></td> |
92 |
</tr> |
93 |
[% END %] |
94 |
[% END %] |
95 |
[% END %] |
96 |
</tbody> |
97 |
<tfoot> |
98 |
<tr> |
99 |
<td colspan="3">Total income: </td> |
100 |
<td>[% accountlines.total * -1 | $Price %]</td> |
101 |
<td></td> |
102 |
</tr> |
103 |
</tfoot> |
104 |
</table> |
105 |
[% END %] |
106 |
</div> |
107 |
|
108 |
<div class="col-sm-2 col-sm-pull-10"> |
109 |
<aside> |
110 |
[% INCLUDE 'pos-menu.inc' %] |
111 |
</aside> |
112 |
</div> |
113 |
</div><!-- /.row --> |
114 |
|
115 |
[% MACRO jsinclude BLOCK %] |
116 |
<script> |
117 |
$(".printReceipt").click(function() { |
118 |
var accountlines_id = $(this).data('accountline'); |
119 |
var win = window.open('/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=' + accountlines_id, '_blank'); |
120 |
win.focus(); |
121 |
}); |
122 |
</script> |
123 |
[% END %] |
124 |
|
125 |
[% INCLUDE 'intranet-bottom.inc' %] |