Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 27 Jul 2012 13:16:07 +0000 (15:16 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 27 Jul 2012 13:16:07 +0000 (15:16 +0200)
SL/Controller/CsvImport/CustomerVendor.pm
SL/DB/MetaSetup/Customer.pm
SL/DB/MetaSetup/Vendor.pm
bin/mozilla/ic.pl
bin/mozilla/invoice_io.pl
sql/Pg-upgrade2/customer_vendor_phone_no_limits.sql [new file with mode: 0644]
templates/webpages/ct/form_header.html

index c0d9ca2..02d8483 100644 (file)
@@ -182,7 +182,6 @@ sub field_lengths {
            city           => 75,
            country        => 75,
            contact        => 75,
-           phone          => 30,
            fax            => 30,
            account_number => 15,
            bank_code      => 10,
index 8735268..722ff9d 100644 (file)
@@ -19,7 +19,7 @@ __PACKAGE__->meta->setup(
     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' },
index 6511ea2..387b2d8 100644 (file)
@@ -19,7 +19,7 @@ __PACKAGE__->meta->setup(
     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' },
index 249c99e..0eb7995 100644 (file)
@@ -1752,8 +1752,11 @@ sub update {
   # 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};
index 5f6c141..843a32f 100644 (file)
@@ -224,8 +224,11 @@ sub display_form {
       $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";
diff --git a/sql/Pg-upgrade2/customer_vendor_phone_no_limits.sql b/sql/Pg-upgrade2/customer_vendor_phone_no_limits.sql
new file mode 100644 (file)
index 0000000..30998ea
--- /dev/null
@@ -0,0 +1,7 @@
+-- @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;
index 8263d87..bdf22df 100644 (file)
 
      <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>