|
Lines 101-264
Link Here
|
| 101 |
<th class="no-sort no-export">Actions</th> |
101 |
<th class="no-sort no-export">Actions</th> |
| 102 |
</tr> |
102 |
</tr> |
| 103 |
</thead> |
103 |
</thead> |
| 104 |
|
104 |
<tbody> |
| 105 |
<!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed --> |
105 |
<!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed --> |
| 106 |
[% FOREACH account IN accounts %] |
106 |
[% FOREACH account IN accounts %] |
| 107 |
<tr> |
107 |
<tr> |
| 108 |
<td data-order="[% account.date | html %]">[% account.date | $KohaDates %]</td> |
108 |
<td data-order="[% account.date | html %]">[% account.date | $KohaDates %]</td> |
| 109 |
<td data-order="[% account.timestamp | html %]">[% account.timestamp | $KohaDates with_hours = 1 %]</td> |
109 |
<td data-order="[% account.timestamp | html %]">[% account.timestamp | $KohaDates with_hours = 1 %]</td> |
| 110 |
<td>[% account.credit_number | html %]</td> |
110 |
<td>[% account.credit_number | html %]</td> |
| 111 |
<td>[% PROCESS account_type_description account=account %]</td> |
111 |
<td>[% PROCESS account_type_description account=account %]</td> |
| 112 |
<td> |
112 |
<td> |
| 113 |
[%- IF account.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %] |
113 |
[%- IF account.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %] |
| 114 |
[%- IF account.description %][% account.description | html %][% END %] |
114 |
[%- IF account.description %][% account.description | html %][% END %] |
| 115 |
[% IF ( account.itemnumber ) %] |
115 |
[% IF ( account.itemnumber ) %] |
| 116 |
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a> |
116 |
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a> |
| 117 |
[% END %]</td |
117 |
[% END %]</td |
| 118 |
> |
118 |
> |
| 119 |
<td |
119 |
<td |
| 120 |
>[% IF ( account.itemnumber ) %] |
120 |
>[% IF ( account.itemnumber ) %] |
| 121 |
<a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% account.itemnumber | uri %]&biblionumber=[% account.item.biblionumber | uri %]#item[% account.itemnumber | uri %]" |
121 |
<a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% account.itemnumber | uri %]&biblionumber=[% account.item.biblionumber | uri %]#item[% account.itemnumber | uri %]" |
| 122 |
>[% account.item.barcode | html %]</a |
122 |
>[% account.item.barcode | html %]</a |
| 123 |
> |
123 |
> |
| 124 |
[% END %]</td |
124 |
[% END %]</td |
| 125 |
> |
125 |
> |
| 126 |
<td>[% IF ( account.itemnumber ) %][% account.item.itemcallnumber | html %][% END %]</td> |
126 |
<td>[% IF ( account.itemnumber ) %][% account.item.itemcallnumber | html %][% END %]</td> |
| 127 |
<td>[% IF ( account.issue_id ) || (account.old_issue_id) %][% account.checkout.date_due | $KohaDates as_due_date => 1 %][% END %]</td> |
127 |
<td>[% IF ( account.issue_id ) || (account.old_issue_id) %][% account.checkout.date_due | $KohaDates as_due_date => 1 %][% END %]</td> |
| 128 |
<td>[% IF ( account.issue_id ) || (account.old_issue_id) %][% account.checkout.returndate | $KohaDates with_hours => 1 %][% END %]</td> |
128 |
<td>[% IF ( account.issue_id ) || (account.old_issue_id) %][% account.checkout.returndate | $KohaDates with_hours => 1 %][% END %]</td> |
| 129 |
<td>[% IF ( account.issue_id ) || (account.old_issue_id) %][% account.checkout.issuedate | $KohaDates %][% END %]</td> |
129 |
<td>[% IF ( account.issue_id ) || (account.old_issue_id) %][% account.checkout.issuedate | $KohaDates %][% END %]</td> |
| 130 |
<td class="checked_out_from"> |
130 |
<td class="checked_out_from"> |
| 131 |
[% IF ( account.issue_id ) || (account.old_issue_id) && account.checkout.library %] |
131 |
[% IF ( account.issue_id ) || (account.old_issue_id) && account.checkout.library %] |
| 132 |
[% account.checkout.library.branchname | html %] |
132 |
[% account.checkout.library.branchname | html %] |
| 133 |
[% END %] |
|
|
| 134 |
</td> |
| 135 |
<td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td> |
| 136 |
<td> |
| 137 |
[% account.note | html_line_break %] |
| 138 |
[% IF CAN_user_updatecharges_edit_accountline_notes %] |
| 139 |
<button |
| 140 |
type="button" |
| 141 |
class="btn btn-default btn-xs edit-action" |
| 142 |
data-bs-toggle="modal" |
| 143 |
data-bs-target="#editNoteModal" |
| 144 |
data-accountline="[% account.accountlines_id | html %]" |
| 145 |
data-note="[% account.note | html %]" |
| 146 |
data-member="[% account.borrowernumber | html %]" |
| 147 |
><i class="fa-solid fa-pen"></i> Edit</button |
| 148 |
> |
| 149 |
[% END %] |
| 150 |
</td> |
| 151 |
[% IF account.amount <= 0 %] |
| 152 |
[% SET td_class="credit" %] |
| 153 |
[% ELSE %] |
| 154 |
[% SET td_class="debig" %] |
| 155 |
[% END %] |
| 156 |
<td class="[% td_class | html %]" style="text-align: right;">[% account.amount | $Price %]</td> |
| 157 |
<td class="[% td_class | html %]" style="text-align: right;">[% account.amountoutstanding | $Price %]</td> |
| 158 |
<td class="actions"> |
| 159 |
[% IF ( account.is_credit ) %] |
| 160 |
[% IF patron.notice_email_address %] |
| 161 |
<div class="btn-group dropup"> |
| 162 |
<button class="btn btn-xs btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa fa-receipt"></i> Receipt</button> |
| 163 |
<ul class="dropdown-menu dropdown-menu-end"> |
| 164 |
<li |
| 165 |
><a target="_blank" href="printfeercpt.pl?accountlines_id=[% account.accountlines_id | uri %]" class="receipt-print-action dropdown-item"><i class="fa fa-print"></i> Print</a></li |
| 166 |
> |
| 167 |
<li> |
| 168 |
<form method="post" action="/cgi-bin/koha/members/boraccount.pl"> |
| 169 |
[% INCLUDE 'csrf-token.inc' %] |
| 170 |
<input type="hidden" name="op" value="cud-send_receipt" /> |
| 171 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]" /> |
| 172 |
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]" /> |
| 173 |
</form> |
| 174 |
<a href="#" class="receipt-email-action dropdown-item"><i class="fa fa-envelope"></i> Email</a> |
| 175 |
</li> |
| 176 |
</ul> |
| 177 |
</div> |
| 178 |
[% ELSE %] |
| 179 |
<a target="_blank" href="printfeercpt.pl?action=print&accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs receipt-print-action"><i class="fa fa-print"></i> Print</a> |
| 180 |
[% END %] |
133 |
[% END %] |
|
|
134 |
</td> |
| 135 |
<td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td> |
| 136 |
<td> |
| 137 |
[% account.note | html_line_break %] |
| 138 |
[% IF CAN_user_updatecharges_edit_accountline_notes %] |
| 139 |
<button |
| 140 |
type="button" |
| 141 |
class="btn btn-default btn-xs edit-action" |
| 142 |
data-bs-toggle="modal" |
| 143 |
data-bs-target="#editNoteModal" |
| 144 |
data-accountline="[% account.accountlines_id | html %]" |
| 145 |
data-note="[% account.note | html %]" |
| 146 |
data-member="[% account.borrowernumber | html %]" |
| 147 |
><i class="fa-solid fa-pen"></i> Edit</button |
| 148 |
> |
| 149 |
[% END %] |
| 150 |
</td> |
| 151 |
[% IF account.amount <= 0 %] |
| 152 |
[% SET td_class="credit" %] |
| 181 |
[% ELSE %] |
153 |
[% ELSE %] |
| 182 |
<a target="_blank" href="printinvoice.pl?action=print&accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs invoice-print-action"><i class="fa fa-print"></i> Print</a> |
154 |
[% SET td_class="debig" %] |
| 183 |
[% END %] |
|
|
| 184 |
<a href="accountline-details.pl?accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs details-action"><i class="fa fa-list"></i> Details</a> |
| 185 |
[% IF account.is_debit && account.amountoutstanding > 0 %] |
| 186 |
<form method="get" action="/cgi-bin/koha/members/paycollect.pl"> |
| 187 |
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]" /> |
| 188 |
<input type="hidden" name="pay_individual" value="1" /> |
| 189 |
<input type="hidden" name="debit_type_code" value="[% account.debit_type_code | html %]" /> |
| 190 |
<input type="hidden" name="amount" value="[% account.amount | html %]" /> |
| 191 |
<input type="hidden" name="amountoutstanding" value="[% account.amountoutstanding | html %]" /> |
| 192 |
<input type="hidden" name="description" value="[% account.description | html %]" /> |
| 193 |
<input type="hidden" name="itemnumber" value="[% account.itemnumber | html %]" /> |
| 194 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]" /> |
| 195 |
<button type="submit" class="btn btn-default btn-xs pay-action"> <i class="fa-solid fa-money-bill-1"></i> Pay </button> |
| 196 |
</form> |
| 197 |
[% END %] |
| 198 |
[% IF account.is_credit && account.status != 'VOID' %] |
| 199 |
<button |
| 200 |
type="button" |
| 201 |
data-bs-toggle="modal" |
| 202 |
data-bs-target="#voidPaymentModal" |
| 203 |
data-accountline="[% account.accountlines_id | html %]" |
| 204 |
data-member="[% account.borrowernumber | html %]" |
| 205 |
class="btn btn-default btn-xs void-action" |
| 206 |
><i class="fa fa-ban"></i> Void payment</button |
| 207 |
> |
| 208 |
[% END %] |
| 209 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
| 210 |
<button |
| 211 |
type="button" |
| 212 |
data-bs-toggle="modal" |
| 213 |
data-bs-target="#cancelChargeModal" |
| 214 |
data-accountlines_id="[% account.accountlines_id | html %]" |
| 215 |
data-borrowernumber="[% patron.borrowernumber | html %]" |
| 216 |
class="btn btn-default btn-xs void-action" |
| 217 |
><i class="fa fa-ban"></i> Cancel charge</button |
| 218 |
> |
| 219 |
[% END %] |
| 220 |
[% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %] |
| 221 |
<button |
| 222 |
type="button" |
| 223 |
data-bs-toggle="modal" |
| 224 |
data-bs-target="#issuePayoutModal" |
| 225 |
data-account="[%- PROCESS account_type_description account=account -%]" |
| 226 |
data-accountline="[% account.accountlines_id | html %]" |
| 227 |
data-amount="[% account.amountoutstanding | $Price on_editing => 1 %]" |
| 228 |
class="btn btn-default btn-xs payout-action" |
| 229 |
><i class="fa-solid fa-money-bill-1"></i> Issue payout</button |
| 230 |
> |
| 231 |
[% END %] |
155 |
[% END %] |
| 232 |
[% IF CAN_user_updatecharges_refund && account.is_debit && ( account.amountoutstanding != account.amount ) && !(account.status == 'REFUNDED') && !(account.debit_type_code == 'PAYOUT') && !(account.debit_type_code == 'VOID') %] |
156 |
<td class="[% td_class | html %]" style="text-align: right;">[% account.amount | $Price %]</td> |
| 233 |
<button |
157 |
<td class="[% td_class | html %]" style="text-align: right;">[% account.amountoutstanding | $Price %]</td> |
| 234 |
type="button" |
158 |
<td class="actions"> |
| 235 |
class="btn btn-default btn-xs refund-action" |
159 |
[% IF ( account.is_credit ) %] |
| 236 |
data-bs-toggle="modal" |
160 |
[% IF patron.notice_email_address %] |
| 237 |
data-bs-target="#issueRefundModal" |
161 |
<div class="btn-group dropup"> |
| 238 |
data-item="[%- PROCESS account_type_description account=account -%]" |
162 |
<button class="btn btn-xs btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa fa-receipt"></i> Receipt</button> |
| 239 |
data-accountline="[% account.accountlines_id | html %]" |
163 |
<ul class="dropdown-menu dropdown-menu-end"> |
| 240 |
data-amount="[% account.amount | $Price on_editing => 1 %]" |
164 |
<li |
| 241 |
data-amountoutstanding="[% account.amountoutstanding | $Price on_editing => 1 %]" |
165 |
><a target="_blank" href="printfeercpt.pl?accountlines_id=[% account.accountlines_id | uri %]" class="receipt-print-action dropdown-item"><i class="fa fa-print"></i> Print</a></li |
| 242 |
data-member="[% account.borrowernumber | html %]" |
166 |
> |
| 243 |
><i class="fa-solid fa-money-bill-1"></i> Issue refund</button |
167 |
<li> |
| 244 |
> |
168 |
<form method="post" action="/cgi-bin/koha/members/boraccount.pl"> |
| 245 |
[% END %] |
169 |
[% INCLUDE 'csrf-token.inc' %] |
| 246 |
[% IF CAN_user_updatecharges_discount && account.is_debit && ( account.amountoutstanding == account.amount ) && !(account.debit_type_code == 'PAYOUT') && !(account.debit_type_code == 'VOID') %] |
170 |
<input type="hidden" name="op" value="cud-send_receipt" /> |
| 247 |
<button |
171 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]" /> |
| 248 |
type="button" |
172 |
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]" /> |
| 249 |
data-bs-toggle="modal" |
173 |
</form> |
| 250 |
data-bs-target="#applyDiscountModal" |
174 |
<a href="#" class="receipt-email-action dropdown-item"><i class="fa fa-envelope"></i> Email</a> |
| 251 |
data-item="[%- PROCESS account_type_description account=account -%]" |
175 |
</li> |
| 252 |
data-accountline="[% account.accountlines_id | html %]" |
176 |
</ul> |
| 253 |
data-amount="[% account.amount | $Price on_editing => 1 %]" |
177 |
</div> |
| 254 |
data-amountoutstanding="[% account.amountoutstanding | $Price on_editing => 1 %]" |
178 |
[% ELSE %] |
| 255 |
class="btn btn-default btn-xs discount-action" |
179 |
<a target="_blank" href="printfeercpt.pl?action=print&accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs receipt-print-action" |
| 256 |
>Apply discount</button |
180 |
><i class="fa fa-print"></i> Print</a |
| 257 |
> |
181 |
> |
| 258 |
[% END %] |
182 |
[% END %] |
| 259 |
</td> |
183 |
[% ELSE %] |
| 260 |
</tr> |
184 |
<a target="_blank" href="printinvoice.pl?action=print&accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs invoice-print-action"><i class="fa fa-print"></i> Print</a> |
| 261 |
[% END %] |
185 |
[% END %] |
|
|
186 |
<a href="accountline-details.pl?accountlines_id=[% account.accountlines_id | uri %]" class="btn btn-default btn-xs details-action"><i class="fa fa-list"></i> Details</a> |
| 187 |
[% IF account.is_debit && account.amountoutstanding > 0 %] |
| 188 |
<form method="get" action="/cgi-bin/koha/members/paycollect.pl"> |
| 189 |
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]" /> |
| 190 |
<input type="hidden" name="pay_individual" value="1" /> |
| 191 |
<input type="hidden" name="debit_type_code" value="[% account.debit_type_code | html %]" /> |
| 192 |
<input type="hidden" name="amount" value="[% account.amount | html %]" /> |
| 193 |
<input type="hidden" name="amountoutstanding" value="[% account.amountoutstanding | html %]" /> |
| 194 |
<input type="hidden" name="description" value="[% account.description | html %]" /> |
| 195 |
<input type="hidden" name="itemnumber" value="[% account.itemnumber | html %]" /> |
| 196 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]" /> |
| 197 |
<button type="submit" class="btn btn-default btn-xs pay-action"> <i class="fa-solid fa-money-bill-1"></i> Pay </button> |
| 198 |
</form> |
| 199 |
[% END %] |
| 200 |
[% IF account.is_credit && account.status != 'VOID' %] |
| 201 |
<button |
| 202 |
type="button" |
| 203 |
data-bs-toggle="modal" |
| 204 |
data-bs-target="#voidPaymentModal" |
| 205 |
data-accountline="[% account.accountlines_id | html %]" |
| 206 |
data-member="[% account.borrowernumber | html %]" |
| 207 |
class="btn btn-default btn-xs void-action" |
| 208 |
><i class="fa fa-ban"></i> Void payment</button |
| 209 |
> |
| 210 |
[% END %] |
| 211 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
| 212 |
<button |
| 213 |
type="button" |
| 214 |
data-bs-toggle="modal" |
| 215 |
data-bs-target="#cancelChargeModal" |
| 216 |
data-accountlines_id="[% account.accountlines_id | html %]" |
| 217 |
data-borrowernumber="[% patron.borrowernumber | html %]" |
| 218 |
class="btn btn-default btn-xs void-action" |
| 219 |
><i class="fa fa-ban"></i> Cancel charge</button |
| 220 |
> |
| 221 |
[% END %] |
| 222 |
[% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %] |
| 223 |
<button |
| 224 |
type="button" |
| 225 |
data-bs-toggle="modal" |
| 226 |
data-bs-target="#issuePayoutModal" |
| 227 |
data-account="[%- PROCESS account_type_description account=account -%]" |
| 228 |
data-accountline="[% account.accountlines_id | html %]" |
| 229 |
data-amount="[% account.amountoutstanding | $Price on_editing => 1 %]" |
| 230 |
class="btn btn-default btn-xs payout-action" |
| 231 |
><i class="fa-solid fa-money-bill-1"></i> Issue payout</button |
| 232 |
> |
| 233 |
[% END %] |
| 234 |
[% IF CAN_user_updatecharges_refund && account.is_debit && ( account.amountoutstanding != account.amount ) && !(account.status == 'REFUNDED') && !(account.debit_type_code == 'PAYOUT') && !(account.debit_type_code == 'VOID') %] |
| 235 |
<button |
| 236 |
type="button" |
| 237 |
class="btn btn-default btn-xs refund-action" |
| 238 |
data-bs-toggle="modal" |
| 239 |
data-bs-target="#issueRefundModal" |
| 240 |
data-item="[%- PROCESS account_type_description account=account -%]" |
| 241 |
data-accountline="[% account.accountlines_id | html %]" |
| 242 |
data-amount="[% account.amount | $Price on_editing => 1 %]" |
| 243 |
data-amountoutstanding="[% account.amountoutstanding | $Price on_editing => 1 %]" |
| 244 |
data-member="[% account.borrowernumber | html %]" |
| 245 |
><i class="fa-solid fa-money-bill-1"></i> Issue refund</button |
| 246 |
> |
| 247 |
[% END %] |
| 248 |
[% IF CAN_user_updatecharges_discount && account.is_debit && ( account.amountoutstanding == account.amount ) && !(account.debit_type_code == 'PAYOUT') && !(account.debit_type_code == 'VOID') %] |
| 249 |
<button |
| 250 |
type="button" |
| 251 |
data-bs-toggle="modal" |
| 252 |
data-bs-target="#applyDiscountModal" |
| 253 |
data-item="[%- PROCESS account_type_description account=account -%]" |
| 254 |
data-accountline="[% account.accountlines_id | html %]" |
| 255 |
data-amount="[% account.amount | $Price on_editing => 1 %]" |
| 256 |
data-amountoutstanding="[% account.amountoutstanding | $Price on_editing => 1 %]" |
| 257 |
class="btn btn-default btn-xs discount-action" |
| 258 |
>Apply discount</button |
| 259 |
> |
| 260 |
[% END %] |
| 261 |
</td> |
| 262 |
</tr> |
| 263 |
[% END %] |
| 264 |
</tbody> |
| 262 |
<tfoot> |
265 |
<tfoot> |
| 263 |
<tr> |
266 |
<tr> |
| 264 |
<td colspan="14">Total due</td> |
267 |
<td colspan="14">Total due</td> |