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 |