X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=a3db58f723f993289f28b417f23947614a9e062c;hb=fb4c3b9051c1019c6c24dc92cd7f016484aac711;hp=1ae15b930143da6e79829cdba299e67beddbb7c7;hpb=26004f55ce70242d07fc8de51e24439e783e9e49;p=freeside.git
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi
index 1ae15b930..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"
@@ -266,22 +358,13 @@ 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 $post_fee_callback = sub {
- my( $amountref ) = @_;
-
- return unless $$amountref > 0;
-
- my $conf = new FS::Conf;
-
- my $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage');
- $$amountref += $$amountref * $cc_surcharge_pct/100 if $cc_surcharge_pct > 0;
-
- $$amountref = sprintf("%.2f", $$amountref);
-};
-
my $payunique = "webui-payment-". time. "-$$-". rand() * 2**32;
%init>