<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>
[% END %]
<li>Float: [% register.starting_float | $Price %]</li>
- <li>Total income (cash): [% accountlines.credits_total * -1 | $Price %] ([% accountlines.credits_total(payment_type => 'CASH') * -1 | $Price %])</li>
- <li>Total outgoing (cash): [% accountlines.debits_total * -1 | $Price %] ([% accountlines.debits_total( payment_type => 'CASH') * -1 | $Price %])</li>
- <li>Total bankable: [% accountlines.total( payment_type => 'CASH') * -1 | $Price %]</li>
+ <li>Total income (cash): [% accountlines.credits_total * -1 | $Price %] ([% accountlines.credits_total(payment_type => [ 'CASH', 'SIP00' ]) * -1 | $Price %])</li>
+ <li>Total outgoing (cash): [% accountlines.debits_total * -1 | $Price %] ([% accountlines.debits_total( payment_type => [ 'CASH', 'SIP00' ]) * -1 | $Price %])</li>
+ <li>Total bankable: [% accountlines.total( payment_type => [ 'CASH', 'SIP00' ]) * -1 | $Price %]</li>
</ul>
[% IF register.last_cashup %]
<td>[% accountline.accountlines_id | html %]</td>
<td>{ "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]", "timestamp": "[% accountline.timestamp | $KohaDates with_hours => 1 %]" }</td>
<td></td>
- <td>[%- PROCESS account_type_description account=debit.credit -%]</td>
<td>
+ [%- PROCESS account_type_description account=debit.credit -%]
[%- IF debit.credit.description %][% debit.credit.description | html %][%- END -%]
[%- IF ( debit.credit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>)[%- END -%]
</td>
<td>[% debit.credit.amount | $Price %]</td>
<td></td>
+ <td>
+ [%- IF debit.credit.credit_type_code == 'REFUND' -%]<a href="/cgi-bin/koha/members/accountline-details.pl?accountlines_id=[% debit.credit.accountlines_id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>[%- END -%]
+ </td>
</tr>
[% END %]
[% END %]
<ol>
<li>
<label for="trange_f">From: </label>
- <input type="text" size="10" id="from" class="datepickerfrom" name="trange_f" value="[% trange_f | html %]"/>
+ <input type="text" size="10" id="from" class="flatpickr" data-date_to="to" name="trange_f" value="[% trange_f | html %]"/>
<label class="inline" for="trange_t">To: </label>
- <input type="text" size="10" id="to" class="datepickerto" name="trange_t" value="[% trange_t | html %]" />
+ <input type="text" size="10" id="to" class="flatpickr" name="trange_t" value="[% trange_t | html %]" />
<span class="hint">[% INCLUDE 'date-format.inc' %]</span>
</li>
</ol>
<td>[% accountline.accountlines_id | html %]</td>
<td>{ "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]", "timestamp": "[% accountline.timestamp | $KohaDates with_hours => 1 %]" }</td>
<td></td>
- <td>[%- PROCESS account_type_description account=debit.credit -%]</td>
<td>
+ [%- PROCESS account_type_description account=debit.credit -%]
[%- IF debit.credit.description %][% debit.credit.description | html %][%- END -%]
[%- IF ( debit.credit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>)[%- END -%]
</td>
<td>[% debit.credit.amount | $Price %]</td>
<td></td>
+ <td>
+ [%- IF debit.credit.credit_type_code == 'REFUND' -%]<a href="/cgi-bin/koha/members/accountline-details.pl?accountlines_id=[% debit.credit.accountlines_id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>[%- END -%]
+ </td>
</tr>
[% END %]
[% END %]
<h4 class="modal-title" id="confirmCashupLabel">Confirm cashup of <em>[% register.description | html %]</em></h4>
</div>
<div class="modal-body">
- Please confirm that you have removed [% accountlines.total( payment_type => 'CASH') * -1 | $Price %] from the cash register and left a float of [% register.starting_float | $Price %].
+ Please confirm that you have removed [% accountlines.total( payment_type => [ 'CASH', 'SIP00' ]) * -1 | $Price %] from the cash register and left a float of [% register.starting_float | $Price %].
</div> <!-- /.modal-body -->
<div class="modal-footer">
<a href="/cgi-bin/koha/pos/register.pl?op=cashup" class="btn btn-default" id="pos_cashup_confirm">Confirm</a>
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
+ [% INCLUDE 'format_price.inc' %]
[% Asset.js("js/cashup_modal.js") | $raw %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'js-date-format.inc' %]
$("#returned, #refund_type").focus();
});
- $(".printReceipt").click(function() {
+ $("body").on('click', ".printReceipt", function() {
var accountlines_id = $(this).data('accountline');
var win = window.open('/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=' + accountlines_id, '_blank');
win.focus();
});
- $('.modal.printable').on('shown.bs.modal', function() {
- $('.modal-dialog', this).addClass('focused');
- $('body').addClass('modalprinter');
-
- if ($(this).hasClass('autoprint')) {
- window.print();
- }
- }).on('hidden.bs.modal', function () {
- $('.modal-dialog', this).removeClass('focused');
- $('body').removeClass('modalprinter');
- });
-
- $('.printModal').click(function() {
- window.print();
- });
-
-
var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?";
- var cashups_table = $("#table_cashups").api({
+ var cashups_table = $("#table_cashups").kohaTable({
"ajax": {
"url": cashups_table_url
},
}
]
}, [], 1);
-
- $(document).ready(function() {
- // http://jqueryui.com/demos/datepicker/#date-range
- var dates = $( "#from, #to" ).datepicker({
- changeMonth: true,
- numberOfMonths: 1,
- onSelect: function( selectedDate ) {
- var option = this.id == "from" ? "minDate" : "maxDate",
- instance = $( this ).data( "datepicker" );
- date = $.datepicker.parseDate(
- instance.settings.dateFormat ||
- $.datepicker._defaults.dateFormat,
- selectedDate, instance.settings );
- dates.not( this ).datepicker( "option", option, date );
- }
- });
- });
</script>
[% END %]