diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-02-22 17:14:07 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-02-22 17:14:07 -0600 |
commit | b1b3d6b3c0db38909b6f569e08877d2678587d22 (patch) | |
tree | 55ab377b72c5d2e3ebba9653024ceb23d75e3dda /httemplate | |
parent | 308694b3b6219171858f336681f4b265327fdc78 (diff) |
RT#39586 Manual check refunds cannot be unapplied [source_paynum field, reason bug fixes, link text]
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/process/cust_refund.cgi | 3 | ||||
-rw-r--r-- | httemplate/view/cust_main/payment_history/credit.html | 12 | ||||
-rw-r--r-- | httemplate/view/cust_main/payment_history/payment.html | 10 |
3 files changed, 10 insertions, 15 deletions
diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi index 6ad468b6c..8977ced20 100755 --- a/httemplate/edit/process/cust_refund.cgi +++ b/httemplate/edit/process/cust_refund.cgi @@ -47,12 +47,11 @@ if ( $error ) { my $refund = "$1$2"; $cgi->param('paynum') =~ /^(\d*)$/ or die "Illegal paynum!"; my $paynum = $1; - my $reason = $cgi->param('reason'); my $paydate = $cgi->param('exp_year'). '-'. $cgi->param('exp_month'). '-01'; $options{'paydate'} = $paydate if $paydate =~ /^\d{2,4}-\d{1,2}-01$/; $error = $cust_main->realtime_refund_bop( $bop, 'amount' => $refund, 'paynum' => $paynum, - 'reason' => $reason, + 'reasonnum' => scalar($cgi->param('reasonnum')), %options ); } else { my %hash = map { diff --git a/httemplate/view/cust_main/payment_history/credit.html b/httemplate/view/cust_main/payment_history/credit.html index 85911a03f..da8ca2e9a 100644 --- a/httemplate/view/cust_main/payment_history/credit.html +++ b/httemplate/view/cust_main/payment_history/credit.html @@ -45,7 +45,7 @@ if ( scalar(@cust_credit_bill) == 0 if ( $opt{total_unapplied_refunds} > 0 ) { $apply.= ' ('. include( '/elements/popup_link.html', - 'label' => emt('apply to refund'), + 'label' => emt('apply refund'), 'action' => "${p}edit/cust_credit_refund.cgi?". $cust_credit->crednum, 'actionlabel' => emt('Apply credit to refund'), @@ -100,7 +100,7 @@ if ( scalar(@cust_credit_bill) == 0 if ( $opt{total_unapplied_refunds} > 0 ) { $apply.= ' ('. include( '/elements/popup_link.html', - 'label' => emt('apply to refund'), + 'label' => emt('apply refund'), 'action' => "${p}edit/cust_credit_refund.cgi?". $cust_credit->crednum, 'actionlabel' => emt('Apply credit to refund'), @@ -141,20 +141,18 @@ $void = ' ('. my $unapply = ''; if ($opt{'Unapply credit'} && !$cust_credit->closed) { - my $refund_to_unapply = $cust_credit->refund_to_unapply; - my $usepre = $refund_to_unapply && @cust_credit_bill; $unapply = areyousure_link("${p}misc/unapply-cust_credit.cgi?".$cust_credit->crednum, emt('Are you sure you want to unapply this credit from invoices?'), emt('Keep this credit, but dissociate it from the invoices it is currently applied against'), - emt('unapply') . ($usepre ? ' ' . emt('invoices') : '') + emt('unapply') ) if @cust_credit_bill; $unapply .= areyousure_link("${p}misc/unapply-cust_credit_refund.cgi?".$cust_credit->crednum, emt('Are you sure you want to unapply this credit from refunds?'), emt('Keep this credit, but dissociate it from the refunds it is currently applied to'), - emt('unapply') . ($usepre ? ' ' . emt('refunds') : '') + emt('unapply refunds') ) - if $refund_to_unapply; + if $cust_credit->refund_to_unapply; } my $reason = $cust_credit->reason; diff --git a/httemplate/view/cust_main/payment_history/payment.html b/httemplate/view/cust_main/payment_history/payment.html index 16b91c2f2..8faed3ca7 100644 --- a/httemplate/view/cust_main/payment_history/payment.html +++ b/httemplate/view/cust_main/payment_history/payment.html @@ -103,7 +103,7 @@ if ($unapplied > 0) { if ( $opt{total_unapplied_refunds} > 0 ) { $apply.= ' ('. include( '/elements/popup_link.html', - 'label' => emt('apply to refund'), + 'label' => emt('apply refund'), 'action' => "${p}edit/cust_pay_refund.cgi?". $cust_pay->paynum, 'actionlabel' => emt('Apply payment to refund'), @@ -198,20 +198,18 @@ $void = ' ('. my $unapply = ''; if ($opt{'Unapply payment'} && !$cust_pay->closed) { - my $refund_to_unapply = $cust_pay->refund_to_unapply; - my $usepre = $refund_to_unapply && @cust_bill_pay; $unapply = areyousure_link("${p}misc/unapply-cust_pay.cgi?".$cust_pay->paynum, emt('Are you sure you want to unapply this payment from invoices?'), emt('Keep this payment, but dissociate it from the invoices it is currently applied against'), - emt('unapply') . ($usepre ? ' ' . emt('invoices') : '') + emt('unapply') ) if @cust_bill_pay; $unapply .= areyousure_link("${p}misc/unapply-cust_pay_refund.cgi?".$cust_pay->paynum, emt('Are you sure you want to unapply this payment from refunds?'), emt('Keep this payment, but dissociate it from the refunds it is currently applied to'), - emt('unapply') . ($usepre ? ' ' . emt('refunds') : '') + emt('unapply refunds') ) - if $refund_to_unapply; + if $cust_pay->refund_to_unapply; } </%init> |