);
$credit_type can be any of:
- - 'credit'
+ - 'CREDIT'
- 'payment'
- 'forgiven'
- 'lost_item_return'
=cut
our $offset_type = {
- 'credit' => 'Manual Credit',
+ 'CREDIT' => 'Manual Credit',
'forgiven' => 'Writeoff',
'lost_item_return' => 'Lost Item',
'payment' => 'Payment',
=cut
our $account_type_credit = {
- 'credit' => 'C',
+ 'CREDIT' => 'CREDIT',
'forgiven' => 'FOR',
'lost_item_return' => 'LOST_RETURN',
'payment' => 'Pay',
{
amount => $new_outstanding * -1,
description => 'Overpayment refund',
- type => 'credit',
+ type => 'CREDIT',
interface => $interface,
( $update_type eq 'overdue_update' ? ( item_id => $self->itemnumber ) : ()),
}
"properties": {
"credit_type": {
"type": "string",
- "description": "Type of credit ('credit', 'forgiven', 'lost_item_return', 'payment', 'writeoff' )"
+ "description": "Type of credit ('CREDIT', 'forgiven', 'lost_item_return', 'payment', 'writeoff' )"
},
"amount": {
"type": "number",
('W', 'Writeoff', 0, 1),
('WO', 'Writeoff', 0, 1),
('FOR', 'Forgiven', 1, 1),
-('C', 'Credit', 1, 1),
+('CREDIT', 'Credit', 1, 1),
('LOST_RETURN', 'Lost item fee refund', 0, 1);
('W', 'Writeoff', 0, 1),
('WO', 'Writeoff', 0, 1),
('FOR', 'Forgiven', 1, 1),
- ('C', 'Credit', 1, 1),
+ ('CREDIT', 'Credit', 1, 1),
('LOST_RETURN', 'Lost item fee refund', 0, 1)
}
);
}
);
+ # Update accountype 'C' to 'CREDIT'
+ $dbh->do(
+ qq{
+ UPDATE accountlines SET accounttype = 'CREDIT' WHERE accounttype = 'C' OR accounttype = 'CR'
+ }
+ );
+
# Populating credit_type_code
$dbh->do(
qq{
[%- CASE 'FOR' -%]Forgiven
[%- CASE 'PAY' -%]Payment
[%- CASE 'WO' -%]Writeoff
- [%- CASE 'C' -%]Credit
+ [%- CASE 'CREDIT' -%]Credit
[%- CASE 'LOST_RETURN' -%]Lost item fee refund
[%- CASE -%][% account.credit_type.description | html %]
[%- END -%]
[%- CASE 'FOR' -%]Forgiven
[%- CASE 'PAY' -%]Payment
[%- CASE 'WO' -%]Writeoff
- [%- CASE 'C' -%]Credit
+ [%- CASE 'CREDIT' -%]Credit
[%- CASE 'LOST_RETURN' -%]Lost item fee refund
[%- CASE -%][% account.credit_type.description | html %]
[%- END -%]
if ($transaction_type eq 'ALL') { #All Transactons
$whereTType = q{};
} elsif ($transaction_type eq 'ACT') { #Active
- $whereTType = q{ AND credit_type_code IN ('Pay','C') };
+ $whereTType = q{ AND credit_type_code IN ('Pay','CREDIT') };
} elsif ($transaction_type eq 'FORW') {
$whereTType = q{ AND credit_type_code IN ('FOR','W') };
} else {