X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=a3db58f723f993289f28b417f23947614a9e062c;hb=fb4c3b9051c1019c6c24dc92cd7f016484aac711;hp=5b9f63dc0950f3ac2e24aa8d41194c2aa324fa05;hpb=2b10c0594ff2ab9ce37d9f8af9c154d3bedde731;p=freeside.git
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi
index 5b9f63dc0..a3db58f72 100644
--- a/httemplate/misc/payment.cgi
+++ b/httemplate/misc/payment.cgi
@@ -1,5 +1,7 @@
<& /elements/header.html, mt("Process [_1] payment",$type{$payby}) &>
<& /elements/small_custview.html, $cust_main, '', '', popurl(2) . "view/cust_main.cgi" &>
+
+
<& /elements/footer.html &>
+<%once>
+
+my %weight = (
+ 1 => 'Primary',
+ 2 => 'Secondary',
+ 3 => 'Tertiary',
+ 4 => 'Fourth',
+ 5 => 'Fifth',
+ 6 => 'Sixth',
+ 7 => 'Seventh',
+);
+
+%once>
<%init>
die "access denied"
@@ -252,10 +343,6 @@ 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 = '';
@@ -271,7 +358,11 @@ my @states = sort { $a cmp $b } keys %states;
my $amount = '';
if ( $balance > 0 ) {
- $amount = $balance;
+ # when configured to do so, amount will only auto-fill with balance
+ # if balance represents a single invoice
+ $amount = $balance
+ unless $conf->exists('manual_process-single_invoice_amount')
+ && ($cust_main->open_cust_bill != 1);
}
my $payunique = "webui-payment-". time. "-$$-". rand() * 2**32;