X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=a3db58f723f993289f28b417f23947614a9e062c;hb=a181b24a0050bfca2ec220421f4cbc347533119f;hp=f99f2f068b979eaea3ba2ae5fbb38dcc9df2c6c6;hpb=f49f11d4c3c4ba9480cc5c9acfaa606a5ba73ad1;p=freeside.git
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi
index f99f2f068..a3db58f72 100644
--- a/httemplate/misc/payment.cgi
+++ b/httemplate/misc/payment.cgi
@@ -1,220 +1,328 @@
-<% include( '/elements/header.html', "Process $type{$payby} payment" ) %>
-<% include( '/elements/small_custview.html', $cust_main, '', '', popurl(2) . "view/cust_main.cgi" ) %>
+<& /elements/header.html, mt("Process [_1] payment",$type{$payby}) &>
+<& /elements/small_custview.html, $cust_main, '', '', popurl(2) . "view/cust_main.cgi" &>
+
+
-<% include('/elements/footer.html') %>
+<& /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"
@@ -239,16 +347,24 @@ my $balance = $cust_main->balance;
my $payinfo = '';
-#false laziness w/selfservice make_payment.html shortcut for one-country
my $conf = new FS::Conf;
+
+#false laziness w/selfservice make_payment.html shortcut for one-country
my %states = map { $_->state => 1 }
qsearch('cust_main_county', {
'country' => $conf->config('countrydefault') || 'US'
} );
my @states = sort { $a cmp $b } keys %states;
+my $amount = '';
+if ( $balance > 0 ) {
+ # 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;
%init>
-
-