Fix: passe le champ ref à 32 caractères

This commit is contained in:
Regis Houssin 2007-05-18 07:47:46 +00:00
parent af885a7f50
commit dfd0ee4cb9
3 changed files with 6 additions and 4 deletions

View File

@ -444,7 +444,7 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer)
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr>'; print '<tr>';
print '<td width="20%">'.$langs->trans("Ref").'</td><td><input name="ref" size="20" value="'.$product->ref.'">'; print '<td width="20%">'.$langs->trans("Ref").'</td><td><input name="ref" size="40" maxlength="32" value="'.$product->ref.'">';
if ($_error == 1) if ($_error == 1)
{ {
print $langs->trans("RefAlreadyExists"); print $langs->trans("RefAlreadyExists");
@ -833,7 +833,7 @@ if ($_GET["id"] || $_GET["ref"])
print '<input type="hidden" name="id" value="'.$product->id.'">'; print '<input type="hidden" name="id" value="'.$product->id.'">';
print '<input type="hidden" name="canvas" value="'.$product->canvas.'">'; print '<input type="hidden" name="canvas" value="'.$product->canvas.'">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td width="15%">'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" size="20" value="'.$product->ref.'"></td></tr>'; print '<tr><td width="15%">'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" size="40" maxlength="32" value="'.$product->ref.'"></td></tr>';
print '<td>'.$langs->trans("Label").'</td><td><input name="libelle" size="40" value="'.$product->libelle.'"></td></tr>'; print '<td>'.$langs->trans("Label").'</td><td><input name="libelle" size="40" value="'.$product->libelle.'"></td></tr>';
print '<tr><td>'.$langs->trans("VATRate").'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("VATRate").'</td><td colspan="2">';

View File

@ -518,4 +518,6 @@ insert into `llx_menu_const` (`rowid`, `fk_menu`, `fk_constraint`, `user`) value
insert into `llx_menu_const` (`rowid`, `fk_menu`, `fk_constraint`, `user`) values (109, 5001, 6, 2); insert into `llx_menu_const` (`rowid`, `fk_menu`, `fk_constraint`, `user`) values (109, 5001, 6, 2);
ALTER TABLE llx_product ADD COLUMN volume float DEFAULT NULL after weight_units; ALTER TABLE llx_product ADD COLUMN volume float DEFAULT NULL after weight_units;
ALTER TABLE llx_product ADD COLUMN volume_units tinyint DEFAULT NULL after volume; ALTER TABLE llx_product ADD COLUMN volume_units tinyint DEFAULT NULL after volume;
ALTER TABLE llx_product modify ref varchar(32) NOT NULL;

View File

@ -25,7 +25,7 @@ create table llx_product
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime, datec datetime,
tms timestamp, tms timestamp,
ref varchar(16) NOT NULL, ref varchar(32) NOT NULL,
label varchar(255) NOT NULL, label varchar(255) NOT NULL,
description text, description text,
note text, note text,