${r}Contact name (last, first) |
-END
-
-print < ,
-
-END
-
-print <SS# | |
-Company | |
-${r}Address | |
- | |
-${r}City | | ${r}State/Country | | ${r}Zip | | !;
+ die "access denied"
+ unless $curuser->access_right($custnum ? 'Edit customer' : 'New customer');
-my($daytime,$night,$fax)=(
- $cust_main->daytime,
- $cust_main->night,
- $cust_main->fax,
-);
+ @invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') );
+ $cust_main->setfield( 'paid' => scalar($cgi->param('paid')) )
+ if $cgi->param('paid');
+ $ss = $cust_main->ss; # don't mask an entered value on errors
+ $stateid = $cust_main->stateid; # don't mask an entered value on errors
+ $payinfo = $cust_main->payinfo; # don't mask an entered value on errors
-print <Day Phone | |
-Night Phone | |
-Fax | |
-END
+ $cust_main->national_id( $cgi->param('national_id1') || $cgi->param('national_id2') );
-print "$r required fields ";
+ $prospectnum = $cgi->param('prospectnum') || '';
-# service address
+ $pkgpart_svcpart = $cgi->param('pkgpart_svcpart') || '';
-if ( defined $cust_main->dbdef_table->column('ship_last') ) {
+ $locationnum = $cgi->param('locationnum') || '';
- print "\n", <
- function changed(what) {
- what.form.same.checked = false;
- }
- function samechanged(what) {
- if ( what.checked ) {
-END
-print " what.form.ship_$_.value = what.form.$_.value;\n"
- for (qw( last first company address1 address2 city zip daytime night fax ));
-print <
-END
-
- print ' Service address ',
- '(ship_last ) {
- print ' CHECKED';
- foreach (
- qw( last first company address1 address2 city state zip daytime night fax)
- ) {
- $cust_main->set("ship_$_", $cust_main->get($_) );
- }
- }
- print '>same as billing address) ';
-
- my($ship_last,$ship_first,$ship_company,$ship_address1,$ship_address2,$ship_city,$ship_zip)=(
- $cust_main->ship_last,
- $cust_main->ship_first,
- $cust_main->ship_company,
- $cust_main->ship_address1,
- $cust_main->ship_address2,
- $cust_main->ship_city,
- $cust_main->ship_zip,
- );
-
- print &itable("#cccccc"), <${r}Contact name (last, first) |
-END
-
- print < ,
-
-END
-
- print <
- Company | |
- ${r}Address | |
- | |
- ${r}City | | ${r}State/Country | | ${r}Zip | | !;
-
- my($ship_daytime,$ship_night,$ship_fax)=(
- $cust_main->ship_daytime,
- $cust_main->ship_night,
- $cust_main->ship_fax,
- );
- print <Day Phone | |
- Night Phone | |
- Fax | |
-END
+ #svc_phone
+ $svc_phone{$_} = $cgi->param($_)
+ foreach qw( countrycode phonenum sip_password pin phone_name );
- print "$r required fields ";
+ #svc_dsl (phonenum came in with svc_phone)
+ $svc_phone{$_} = $cgi->param($_)
+ foreach qw( password isp_chg isp_prev vendor_qual_id );
-}
+} elsif ( $cgi->keywords ) { #editing
-# billing info
-
-sub expselect {
- my $prefix = shift;
- my( $m, $y ) = (0, 0);
- if ( scalar(@_) ) {
- my $date = shift || '01-2000';
- if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format
- ( $m, $y ) = ( $2, $1 );
- } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) {
- ( $m, $y ) = ( $1, $3 );
- } else {
- die "unrecognized expiration date format: $date";
- }
- }
+ die "access denied"
+ unless $curuser->access_right('Edit customer');
- my $return = qq! | |