Bug 6273: (follow-up) fix various issues
This patch fixes various issues that prevented the account type from being set correctly when recording SIP2 payments: - the fixed fields in the fee paid message were not getting parsed correclty - accountlines.accounttype is only five characters wide, so SIP2 payments are now records as 'Pay00', 'Pay02', etc. rather than 'Pay-00'. - removed regression on bug 2546 and made the new payment types translatable Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
c8e99f313f
commit
0456f6ade0
5 changed files with 13 additions and 6 deletions
|
@ -147,14 +147,12 @@ sub recordpayment {
|
|||
my $usth = $dbh->prepare(
|
||||
"INSERT INTO accountlines
|
||||
(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id)
|
||||
VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?)"
|
||||
VALUES (?,?,now(),?,'',?,?,?)"
|
||||
);
|
||||
|
||||
my $payment_description = "Payment, thanks";
|
||||
$payment_description .= " (via SIP2)" if defined $sip_paytype;
|
||||
my $paytype = "Pay";
|
||||
$paytype .= "-$sip_paytype" if defined $sip_paytype;
|
||||
$usth->execute( $borrowernumber, $nextaccntno, 0 - $data, $payment_description, $paytype, 0 - $amountleft, $manager_id );
|
||||
$paytype .= $sip_paytype if defined $sip_paytype;
|
||||
$usth->execute( $borrowernumber, $nextaccntno, 0 - $data, $paytype, 0 - $amountleft, $manager_id );
|
||||
$usth->finish;
|
||||
|
||||
UpdateStats( $branch, 'payment', $data, '', '', '', $borrowernumber, $nextaccntno );
|
||||
|
|
|
@ -1054,7 +1054,7 @@ sub handle_end_patron_session {
|
|||
sub handle_fee_paid {
|
||||
my ($self, $server) = @_;
|
||||
my $ils = $server->{ils};
|
||||
my ($trans_date, $fee_type, $pay_type, $currency) = $self->{fixed_fields};
|
||||
my ($trans_date, $fee_type, $pay_type, $currency) = @{ $self->{fixed_fields} };
|
||||
my $fields = $self->{fields};
|
||||
my ($fee_amt, $inst_id, $patron_id, $terminal_pwd, $patron_pwd);
|
||||
my ($fee_id, $trans_id);
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
<td>
|
||||
[% SWITCH account.accounttype %]
|
||||
[% CASE 'Pay' %]Payment,thanks
|
||||
[% CASE 'Pay00' %]Payment,thanks (cash via SIP2)
|
||||
[% CASE 'Pay01' %]Payment,thanks (VISA via SIP2)
|
||||
[% CASE 'Pay02' %]Payment,thanks (credit card via SIP2)
|
||||
[% CASE 'N' %]New Card
|
||||
[% CASE 'F' %]Fine
|
||||
[% CASE 'A' %]Account management fee
|
||||
|
|
|
@ -116,6 +116,9 @@ function enableCheckboxActions(){
|
|||
<td>
|
||||
[% SWITCH line.accounttype %]
|
||||
[% CASE 'Pay' %]Payment,thanks
|
||||
[% CASE 'Pay00' %]Payment,thanks (cash via SIP2)
|
||||
[% CASE 'Pay01' %]Payment,thanks (VISA via SIP2)
|
||||
[% CASE 'Pay02' %]Payment,thanks (credit card via SIP2)
|
||||
[% CASE 'N' %]New Card
|
||||
[% CASE 'F' %]Fine
|
||||
[% CASE 'A' %]Account management fee
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
<td>
|
||||
[% SWITCH ACCOUNT_LINE.accounttype %]
|
||||
[% CASE 'Pay' %]Payment,thanks
|
||||
[% CASE 'Pay00' %]Payment,thanks (cash via SIP2)
|
||||
[% CASE 'Pay01' %]Payment,thanks (VISA via SIP2)
|
||||
[% CASE 'Pay02' %]Payment,thanks (credit card via SIP2)
|
||||
[% CASE 'N' %]New Card
|
||||
[% CASE 'F' %]Fine
|
||||
[% CASE 'A' %]Account management fee
|
||||
|
|
Loading…
Reference in a new issue