Länge des UStId-Feldes bei Kunden/Lieferanten auf 14 erweitern bzw in der Maske darau...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Sat, 13 Jan 2007 10:58:28 +0000 (10:58 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Sat, 13 Jan 2007 10:58:28 +0000 (10:58 +0000)
bin/mozilla/ct.pl
sql/Pg-upgrade2/customer_vendor_ustid_length.sql [new file with mode: 0644]

index fed9c44..896bc4a 100644 (file)
@@ -964,7 +964,7 @@ sub form_header {
          <th align=right>| . $locale->text('Tax Number / SSN') . qq|</th>
          <td><input name=taxnumber size=20 value="$form->{taxnumber}"></td>
           <th align=right>| . $locale->text('USt-IdNr.') . qq|</th>
-         <td><input name="ustid" maxlength="12" size="20" value="$form->{ustid}"></td>
+         <td><input name="ustid" maxlength="14" size="20" value="$form->{ustid}"></td>
           $customer
        </tr>
         <tr>
diff --git a/sql/Pg-upgrade2/customer_vendor_ustid_length.sql b/sql/Pg-upgrade2/customer_vendor_ustid_length.sql
new file mode 100644 (file)
index 0000000..dd68bcd
--- /dev/null
@@ -0,0 +1,12 @@
+-- @tag: customer_vendor_ustid_length
+-- @description: Setzt das Feld &quot;ustid&quot; in den Tabellen &quot;customer&quot; und &quot;vendor&quot; auf 14 Zeichen: zwei Zeichen L&auml;nderk&uuml;rzel und bis zu zw&ouml;lf Zeichen f&uuml;r die Nummer.
+-- @depends:
+ALTER TABLE customer ADD COLUMN tmp varchar(14);
+UPDATE customer SET tmp = ustid;
+ALTER TABLE customer DROP COLUMN ustid;
+ALTER TABLE customer RENAME tmp TO ustid;
+
+ALTER TABLE vendor ADD COLUMN tmp varchar(14);
+UPDATE vendor SET tmp = ustid;
+ALTER TABLE vendor DROP COLUMN ustid;
+ALTER TABLE vendor RENAME tmp TO ustid;