city => 75,
country => 75,
contact => 75,
- phone => 30,
fax => 30,
account_number => 15,
bank_code => 10,
city => { type => 'varchar', length => 75 },
country => { type => 'varchar', length => 75 },
contact => { type => 'text' },
- phone => { type => 'varchar', length => 30 },
+ phone => { type => 'text' },
fax => { type => 'varchar', length => 30 },
homepage => { type => 'text' },
email => { type => 'text' },
city => { type => 'varchar', length => 75 },
country => { type => 'varchar', length => 75 },
contact => { type => 'varchar', length => 75 },
- phone => { type => 'varchar', length => 30 },
+ phone => { type => 'text' },
fax => { type => 'varchar', length => 30 },
homepage => { type => 'text' },
email => { type => 'text' },
# parse pricegroups. and no, don't rely on check_form for this...
map { $form->{"price_$_"} = $form->parse_amount(\%myconfig, $form->{"price_$_"}) } 1 .. $form->{price_rows};
- # same for lastcosts
- map { $form->{"lastcost_$_"} = $form->parse_amount(\%myconfig, $form->{"lastcost_$_"}) } 1 .. $form->{"makemodel_rows"};
+ # same for makemodel lastcosts
+ # but parse_amount not necessary for assembly component lastcosts
+ unless ($form->{item} eq "assembly") {
+ map { $form->{"lastcost_$_"} = $form->parse_amount(\%myconfig, $form->{"lastcost_$_"}) } 1 .. $form->{"makemodel_rows"};
+ };
if ($form->{item} eq "assembly") {
my $i = $form->{assembly_rows};
$numrows = ++$form->{makemodel_rows};
$subroutine = "makemodel_row";
+ # assemblies are built from components, they aren't purchased from a vendor
+ # also the lastcost_$i from makemodel conflicted with the component lastcost_$i
+ # so we don't need the makemodel rows for assemblies
# create makemodel rows
- &{$subroutine}($numrows);
+ # &{$subroutine}($numrows);
$numrows = ++$form->{assembly_rows};
$subroutine = "assembly_row";
--- /dev/null
+-- @tag: customer_vendor_phone_no_limits
+-- @description: Keine Längenbeschränkung für Spalte phone in den Tabellen customer und vendor.
+-- @depends: release_2_7_0
+-- @charset: utf-8
+
+ALTER TABLE customer ALTER COLUMN phone TYPE text;
+ALTER TABLE vendor ALTER COLUMN phone TYPE text;
<tr>
<th align="right" nowrap>[% 'Phone' | $T8 %]</th>
- <td><input name="phone" size="30" maxlength="30" value="[% HTML.escape(phone) %]"></td>
+ <td><input name="phone" size="30" value="[% HTML.escape(phone) %]"></td>
</tr>
<tr>