'daytime', 'varchar', 'NULL', 20, '', '',
'night', 'varchar', 'NULL', 20, '', '',
'fax', 'varchar', 'NULL', 12, '', '',
+ 'mobile', 'varchar', 'NULL', 12, '', '',
'ship_last', 'varchar', 'NULL', 2*$char_d, '', '',
# 'ship_middle', 'varchar', 'NULL', $char_d, '', '',
'ship_first', 'varchar', 'NULL', $char_d, '', '',
'ship_daytime', 'varchar', 'NULL', 20, '', '',
'ship_night', 'varchar', 'NULL', 20, '', '',
'ship_fax', 'varchar', 'NULL', 12, '', '',
+ 'ship_mobile', 'varchar', 'NULL', 12, '', '',
'payby', 'char', '', 4, '', '',
'payinfo', 'varchar', 'NULL', 512, '', '',
'paycvv', 'varchar', 'NULL', 512, '', '',
[ 'last' ], [ 'company' ],
[ 'county' ], [ 'state' ], [ 'country' ],
[ 'zip' ],
- [ 'daytime' ], [ 'night' ], [ 'fax' ],
+ [ 'daytime' ], [ 'night' ], [ 'fax' ], [ 'mobile' ],
#shipping
[ 'ship_last' ], [ 'ship_company' ],
[ 'ship_county' ], [ 'ship_state' ], [ 'ship_country' ],
[ 'ship_zip' ],
- [ 'ship_daytime' ], [ 'ship_night' ], [ 'ship_fax' ],
+ [ 'ship_daytime' ], [ 'ship_night' ], [ 'ship_fax' ], [ 'ship_mobile' ]
],
},
phone (optional)
+=item mobile
+
+phone (optional)
+
=item ship_first
Shipping first name
phone (optional)
+=item ship_mobile
+
+phone (optional)
+
=item payby
Payment Type (See L<FS::payinfo_Mixin> for valid payby values)
}
$error =
- $self->ut_phonen('daytime', $self->country)
- || $self->ut_phonen('night', $self->country)
- || $self->ut_phonen('fax', $self->country)
+ $self->ut_phonen('daytime', $self->country)
+ || $self->ut_phonen('night', $self->country)
+ || $self->ut_phonen('fax', $self->country)
+ || $self->ut_phonen('mobile', $self->country)
;
return $error if $error;
}
if ( $conf->exists('cust_main-require_phone')
- && ! length($self->daytime) && ! length($self->night)
+ && ! length($self->daytime) && ! length($self->night) && ! length($self->mobile)
) {
my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
? 'Night Phone'
: FS::Msgcat::_gettext('night');
-
- return "$daytime_label or $night_label is required"
+
+ my $mobile_label = FS::Msgcat::_gettext('mobile') =~ /^(mobile)?$/
+ ? 'Mobile Phone'
+ : FS::Msgcat::_gettext('mobile');
+
+ return "$daytime_label, $night_label or $mobile_label is required"
}
#eofalse
$error =
- $self->ut_phonen('ship_daytime', $self->ship_country)
- || $self->ut_phonen('ship_night', $self->ship_country)
- || $self->ut_phonen('ship_fax', $self->ship_country)
+ $self->ut_phonen('ship_daytime', $self->ship_country)
+ || $self->ut_phonen('ship_night', $self->ship_country)
+ || $self->ut_phonen('ship_fax', $self->ship_country)
+ || $self->ut_phonen('ship_mobile', $self->ship_country)
;
return $error if $error;
sub addr_fields {
qw( last first company
address1 address2 city county state zip country
- daytime night fax
+ daytime night fax mobile
);
}
% push @ship_style, 'background-color:#dddddd';
% foreach (
% qw( last first company address1 address2 city county state zip country
-% daytime night fax )
+% daytime night fax mobile )
% ) {
% $cust_main->set("ship_$_", $cust_main->get($_) );
% }
<SCRIPT>
function bill_changed(what) {
if ( what.form.same.checked ) {
-% for (qw( last first company address1 address2 city zip daytime night fax )) {
+% for (qw( last first company address1 address2 city zip daytime night fax mobile )) {
what.form.ship_<%$_%>.value = what.form.<%$_%>.value;
% }
if ( what.checked ) {
bill_changed(what);
-% my @fields = qw( last first company address1 address2 city city_select county state zip country daytime night fax );
+% my @fields = qw( last first company address1 address2 city city_select county state zip country daytime night fax mobile );
% for (@fields) {
what.form.ship_<%$_%>.disabled = true;
what.form.ship_<%$_%>.style.backgroundColor = '#dddddd';
</TD>
</TR>
+<TR>
+ <TD ALIGN="right"><% $mobile_label %></TD>
+ <TD COLSPAN=5>
+ <INPUT TYPE="text" NAME="<%$pre%>mobile" VALUE="<% $cust_main->get($pre.'mobile') %>" SIZE=18 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
+ </TD>
+</TR>
+
<TR>
<TD ALIGN="right"><% mt('Fax') |h %></TD>
<TD COLSPAN=5>
</TD>
</TR>
+<TR>
+ <TD ALIGN="right"><% $mobile_label %></TD>
+ <TD COLSPAN=5>
+ <INPUT TYPE="text" NAME="<%$pre%>mobile" VALUE="<% $cust_main->get($pre.'mobile') %>" SIZE=18 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
+ </TD>
+</TR>
+
<& /elements/location.html,
'prefix' => $pre,
'object' => $cust_main,
}
my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
- ? 'Day Phone'
- : FS::Msgcat::_gettext('daytime');
-my $night_label = FS::Msgcat::_gettext('night') =~/^(night)?$/
- ? 'Night Phone'
- : FS::Msgcat::_gettext('night') || 'Night Phone';
+ ? 'Day Phone'
+ : FS::Msgcat::_gettext('daytime');
+my $night_label = FS::Msgcat::_gettext('night') =~/^(night)?$/
+ ? 'Night Phone'
+ : FS::Msgcat::_gettext('night') || 'Night Phone';
+my $mobile_label = FS::Msgcat::_gettext('mobile') =~/^(mobile)?$/
+ ? 'Mobile Phone'
+ : FS::Msgcat::_gettext('mobile') || 'Mobile Phone';
+
my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
? 'Driver’s License'
: FS::Msgcat::_gettext('stateid') || 'Driver’s License';
&>
</TD>
</TR>
+<TR>
+ <TD ALIGN="right"><% $mobile_label %></TD>
+ <TD COLSPAN=3 BGCOLOR="#ffffff">
+ <& /elements/phonenumber.html,
+ $cust_main->get("${pre}mobile"),
+ 'callable'=>1
+ &>
+ </TD>
+</TR>
<TR>
<TD ALIGN="right"><% mt('Fax') |h %></TD>
<TD COLSPAN=3 BGCOLOR="#ffffff">
my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
? 'Day Phone'
: FS::Msgcat::_gettext('daytime');
-my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
+my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
? 'Night Phone'
: FS::Msgcat::_gettext('night');
+my $mobile_label = FS::Msgcat::_gettext('mobile') =~ /^(mobile)?$/
+ ? 'Mobile Phone'
+ : FS::Msgcat::_gettext('Mobile');
+
my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
? 'Driver’s License'
: FS::Msgcat::_gettext('stateid');