[freeside-commits] freeside/httemplate/edit/cust_main billing.html,
1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Fri Oct 21 08:21:39 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/edit/cust_main
In directory wavetail:/tmp/cvs-serv1308/httemplate/edit/cust_main
Modified Files:
billing.html
Log Message:
add CASH and WEST payment types (payments only, not cust_main.payby)
Index: billing.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/billing.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- billing.html 24 Aug 2005 13:47:09 -0000 1.2
+++ billing.html 21 Oct 2005 15:21:37 -0000 1.3
@@ -4,6 +4,11 @@
my $conf = new FS::Conf;
my $payby_default = $conf->config('payby-default');
+my @payby = $conf->config('payby');
+#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP ))
+ at payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP ))
+ unless grep /\w/, @payby;
+
if ( $payby_default eq 'HIDE' ) {
$cust_main->payby('BILL') unless $cust_main->payby;
@@ -294,15 +299,60 @@
'</TABLE>',
+ 'CASH' =>
+
+ '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
+
+ qq!<TR><TD ALIGN="right" WIDTH="200">${r}Amount </TD>!.
+ qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="paid" VALUE="!. ( $payby eq 'CASH' ? $cust_main->paid : '' ). qq!"></TD></TR>!.
+
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+
+ '</TABLE>',
+
+ 'WEST' =>
+
+ '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
+
+ qq!<TR><TD ALIGN="right" WIDTH="200">${r}Amount </TD>!.
+ qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="paid" VALUE="!. ( $payby eq 'WEST' ? $cust_main->paid : '' ). qq!"></TD></TR>!.
+
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+ '<TR><TD> </TD></TR>'.
+
+ '</TABLE>',
+
);
- tie my %options, 'Tie::IxHash',
+
+ my %allopt = (
'CARD' => 'Credit card',
'CHEK' => 'Electronic check',
'LECB' => 'Phone bill billing',
'BILL' => 'Billing',
+ 'CASH' => 'Cash', # initial payment, then billing',
+ 'WEST' => 'Western Union', # initial payment, then billing',
'COMP' => 'Complimentary',
- ;
+ );
+ if ( $cust_main->custnum ) { #don't offer CASH and WEST initial payment types
+ # when editing customer
+ delete $allopt{$_} for qw(CASH WEST);
+ }
+
+ tie my %options, 'Tie::IxHash',
+ map { $_ => $allopt{$_} }
+ grep { exists $allopt{$_} }
+ @payby;
+
my %payby2option = (
( map { $_ => $_ } keys %options ),
'DCRD' => 'CARD',
More information about the freeside-commits
mailing list