View | Details | Raw Unified | Return to bug 31036
Collapse All | Expand All

(-)a/Koha/Account.pm (-4 / +4 lines)
Lines 209-215 sub add_credit { Link Here
209
    Koha::Exceptions::Account::RegisterRequired->throw()
209
    Koha::Exceptions::Account::RegisterRequired->throw()
210
      if ( C4::Context->preference("UseCashRegisters")
210
      if ( C4::Context->preference("UseCashRegisters")
211
        && defined($payment_type)
211
        && defined($payment_type)
212
        && ( $payment_type eq 'CASH' )
212
        && ( $payment_type eq 'CASH' || $payment_type eq 'SIP00' )
213
        && !defined($cash_register) );
213
        && !defined($cash_register) );
214
214
215
    my $line;
215
    my $line;
Lines 338-344 sub payin_amount { Link Here
338
    Koha::Exceptions::Account::RegisterRequired->throw()
338
    Koha::Exceptions::Account::RegisterRequired->throw()
339
      if ( C4::Context->preference("UseCashRegisters")
339
      if ( C4::Context->preference("UseCashRegisters")
340
        && defined( $params->{payment_type} )
340
        && defined( $params->{payment_type} )
341
        && ( $params->{payment_type} eq 'CASH' )
341
        && ( $params->{payment_type} eq 'CASH' || $params->{payment_type} eq 'SIP00' )
342
        && !defined($params->{cash_register}) );
342
        && !defined($params->{cash_register}) );
343
343
344
    # amount should always be passed as a positive value
344
    # amount should always be passed as a positive value
Lines 436-442 sub add_debit { Link Here
436
    Koha::Exceptions::Account::RegisterRequired->throw()
436
    Koha::Exceptions::Account::RegisterRequired->throw()
437
      if ( C4::Context->preference("UseCashRegisters")
437
      if ( C4::Context->preference("UseCashRegisters")
438
        && defined( $params->{transaction_type} )
438
        && defined( $params->{transaction_type} )
439
        && ( $params->{transaction_type} eq 'CASH' )
439
        && ( $params->{transaction_type} eq 'CASH' || $params->{payment_type} eq 'SIP00' )
440
        && !defined( $params->{cash_register} ) );
440
        && !defined( $params->{cash_register} ) );
441
441
442
    # amount should always be a positive value
442
    # amount should always be a positive value
Lines 570-576 sub payout_amount { Link Here
570
    # Check for mandatory register
570
    # Check for mandatory register
571
    Koha::Exceptions::Account::RegisterRequired->throw()
571
    Koha::Exceptions::Account::RegisterRequired->throw()
572
      if ( C4::Context->preference("UseCashRegisters")
572
      if ( C4::Context->preference("UseCashRegisters")
573
        && ( $params->{payout_type} eq 'CASH' )
573
        && ( $params->{payout_type} eq 'CASH' || $params->{payout_type} eq 'SIP00' )
574
        && !defined($params->{cash_register}) );
574
        && !defined($params->{cash_register}) );
575
575
576
    # Amount should always be passed as a positive value
576
    # Amount should always be passed as a positive value
(-)a/Koha/Account/Line.pm (-1 / +1 lines)
Lines 758-764 sub payout { Link Here
758
    Koha::Exceptions::Account::RegisterRequired->throw()
758
    Koha::Exceptions::Account::RegisterRequired->throw()
759
      if ( C4::Context->preference("UseCashRegisters")
759
      if ( C4::Context->preference("UseCashRegisters")
760
        && defined( $params->{payout_type} )
760
        && defined( $params->{payout_type} )
761
        && ( $params->{payout_type} eq 'CASH' )
761
        && ( $params->{payout_type} eq 'CASH' || $params->{payout_type} eq 'SIP00' )
762
        && !defined( $params->{cash_register} ) );
762
        && !defined( $params->{cash_register} ) );
763
763
764
    my $payout;
764
    my $payout;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-4 / +4 lines)
Lines 76-84 Link Here
76
                <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>
76
                <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>
77
                [% END %]
77
                [% END %]
78
                <li>Float: [% register.starting_float | $Price %]</li>
78
                <li>Float: [% register.starting_float | $Price %]</li>
79
                <li>Total income (cash): [% accountlines.credits_total * -1 | $Price %] ([% accountlines.credits_total(payment_type => 'CASH') * -1 | $Price %])</li>
79
                <li>Total income (cash): [% accountlines.credits_total * -1 | $Price %] ([% accountlines.credits_total(payment_type => [ 'CASH', 'SIP00' ]) * -1 | $Price %])</li>
80
                <li>Total outgoing (cash): [% accountlines.debits_total * -1 | $Price %] ([% accountlines.debits_total( payment_type => 'CASH') * -1 | $Price %])</li>
80
                <li>Total outgoing (cash): [% accountlines.debits_total * -1 | $Price %] ([% accountlines.debits_total( payment_type => [ 'CASH', 'SIP00' ]) * -1 | $Price %])</li>
81
                <li>Total bankable: [% accountlines.total( payment_type => 'CASH') * -1 | $Price %]</li>
81
                <li>Total bankable: [% accountlines.total( payment_type => [ 'CASH', 'SIP00' ]) * -1 | $Price %]</li>
82
            </ul>
82
            </ul>
83
83
84
            [% IF register.last_cashup %]
84
            [% IF register.last_cashup %]
Lines 278-284 Link Here
278
                    <h4 class="modal-title" id="confirmCashupLabel">Confirm cashup of <em>[% register.description | html %]</em></h4>
278
                    <h4 class="modal-title" id="confirmCashupLabel">Confirm cashup of <em>[% register.description | html %]</em></h4>
279
                </div>
279
                </div>
280
                <div class="modal-body">
280
                <div class="modal-body">
281
                    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 %].
281
                    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 %].
282
                </div> <!-- /.modal-body -->
282
                </div> <!-- /.modal-body -->
283
                <div class="modal-footer">
283
                <div class="modal-footer">
284
                    <a href="/cgi-bin/koha/pos/register.pl?op=cashup" class="btn btn-default" id="pos_cashup_confirm">Confirm</a>
284
                    <a href="/cgi-bin/koha/pos/register.pl?op=cashup" class="btn btn-default" id="pos_cashup_confirm">Confirm</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt (-4 / +3 lines)
Lines 96-115 Link Here
96
                                </td>
96
                                </td>
97
                                <td>[% register.starting_float | $Price %]</td>
97
                                <td>[% register.starting_float | $Price %]</td>
98
                                <td>
98
                                <td>
99
                                    [% SET rbankable = ( register.outstanding_accountlines.total( payment_type => 'CASH') * -1 ) %]
99
                                    [% SET rbankable = ( register.outstanding_accountlines.total( payment_type => [ 'CASH', 'SIP00' ]) * -1 ) %]
100
                                    [% SET bankable = bankable + rbankable %]
100
                                    [% SET bankable = bankable + rbankable %]
101
                                    [% rbankable | $Price %]
101
                                    [% rbankable | $Price %]
102
                                </td>
102
                                </td>
103
                                <td>
103
                                <td>
104
                                    [% SET rctotal = ( register.outstanding_accountlines.credits_total * -1 ) %]
104
                                    [% SET rctotal = ( register.outstanding_accountlines.credits_total * -1 ) %]
105
                                    [% SET rcctotal = ( register.outstanding_accountlines.credits_total( payment_type => 'CASH') * -1 ) %]
105
                                    [% SET rcctotal = ( register.outstanding_accountlines.credits_total( payment_type => [ 'CASH', 'SIP00' ]) * -1 ) %]
106
                                    [% rctotal | $Price %] ([% rcctotal | $Price %])
106
                                    [% rctotal | $Price %] ([% rcctotal | $Price %])
107
                                    [% SET ctotal = ctotal + rctotal %]
107
                                    [% SET ctotal = ctotal + rctotal %]
108
                                    [% SET cctotal = cctotal + rcctotal %]
108
                                    [% SET cctotal = cctotal + rcctotal %]
109
                                </td>
109
                                </td>
110
                                <td>
110
                                <td>
111
                                    [% SET rdtotal = ( register.outstanding_accountlines.debits_total * -1 ) %]
111
                                    [% SET rdtotal = ( register.outstanding_accountlines.debits_total * -1 ) %]
112
                                    [% SET rcdtotal = ( register.outstanding_accountlines.debits_total( payment_type => 'CASH') * -1 ) %]
112
                                    [% SET rcdtotal = ( register.outstanding_accountlines.debits_total( payment_type => [ 'CASH', 'SIP00' ]) * -1 ) %]
113
                                    [% rdtotal | $Price %] ([% rcdtotal | $Price %])
113
                                    [% rdtotal | $Price %] ([% rcdtotal | $Price %])
114
                                    [% SET dtotal = dtotal + rdtotal %]
114
                                    [% SET dtotal = dtotal + rdtotal %]
115
                                    [% SET cdtotal = cdtotal + rcdtotal %]
115
                                    [% SET cdtotal = cdtotal + rcdtotal %]
116
- 

Return to bug 31036