X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=90b03c7e87b465b40e7daaa2490eb763eade2eba;hb=028c83edfa000f6bdbcd32ee3ffd5ee5561110d2;hp=2d7307233c680c2743316bd434a05c35c5daec55;hpb=0d8eb2d4d4a372680d0fa564fbfcba0d6674b259;p=freeside.git diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 2d7307233..90b03c7e8 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -12,17 +12,20 @@ <& /elements/tr-amount_fee.html, 'amount' => $amount, - 'process-pkgpart' => scalar($conf->config('manual_process-pkgpart')), + 'process-pkgpart' => + scalar($conf->config('manual_process-pkgpart', $cust_main->agentnum)), 'process-display' => scalar($conf->config('manual_process-display')), 'process-skip_first' => $conf->exists('manual_process-skip_first'), 'num_payments' => scalar($cust_main->cust_pay), 'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')), &> - <& /elements/tr-select-discount_term.html, - 'custnum' => $custnum, - 'amount_id' => 'amount', - &> +% if ( $conf->exists('part_pkg-term_discounts') ) { + <& /elements/tr-select-discount_term.html, + 'custnum' => $custnum, + 'amount_id' => 'amount', + &> +% } % if ( $payby eq 'CARD' ) { % @@ -78,7 +81,7 @@ <& /elements/location.html, - 'object' => $cust_main, #XXX errors??? + 'object' => $cust_main->bill_location, 'no_asterisks' => 1, 'address1_label' => emt('Card billing address'), &> @@ -251,6 +254,10 @@ my $custnum = $1; my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } ); die "unknown custnum $custnum" unless $cust_main; +my $location = $cust_main->bill_location; +# no proper error handling on this anyway, but when we have it, +# remember to repopulate fields in $location + my $balance = $cust_main->balance; my $payinfo = '';