validation modèle de données
This commit is contained in:
parent
52717dbb65
commit
00f532c436
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/receptiondet_extrafields.php
|
||||
* \file htdocs/admin/commandefournisseurdispatch_extrafields.php
|
||||
* \ingroup reception
|
||||
* \brief Page to setup extra fields of reception
|
||||
*/
|
||||
@ -52,7 +52,7 @@ foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$attrname=GETPOST('attrname', 'alpha');
|
||||
$elementtype='receptiondet'; //Must be the $table_element of the class that manage extrafield
|
||||
$elementtype='commande_fournisseur_dispatch'; //Must be the $table_element of the class that manage extrafield
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@ -85,7 +85,7 @@ function reception_admin_prepare_head()
|
||||
|
||||
if (! empty($conf->global->MAIN_SUBMODULE_RECEPTION))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/receptiondet_extrafields.php';
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsLines");
|
||||
$head[$h][2] = 'attributeslines_reception';
|
||||
$h++;
|
||||
|
||||
@ -16,4 +16,6 @@
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_commande (fk_commande);
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_commande (fk_commande);
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_reception (fk_reception);
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch ADD CONSTRAINT fk_commande_fournisseur_dispatch_fk_reception FOREIGN KEY (fk_reception) REFERENCES llx_reception (rowid);
|
||||
@ -26,6 +26,7 @@ create table llx_commande_fournisseur_dispatch
|
||||
fk_product integer,
|
||||
fk_commandefourndet integer,
|
||||
fk_projet integer DEFAULT NULL,
|
||||
fk_reception integer DEFAULT NULL,
|
||||
qty float, -- qty
|
||||
fk_entrepot integer,
|
||||
fk_user integer,
|
||||
|
||||
@ -17,4 +17,4 @@
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_receptiondet_extrafields ADD INDEX idx_receptiondet_extrafields (fk_object);
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch_extrafields ADD INDEX idx_commande_fournisseur_dispatch_extrafields (fk_object);
|
||||
@ -16,7 +16,7 @@
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_receptiondet_extrafields
|
||||
create table llx_commande_fournisseur_dispatch_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
@ -1,22 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2008 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_receptiondet ADD INDEX idx_receptiondet_fk_reception (fk_reception);
|
||||
ALTER TABLE llx_receptiondet ADD CONSTRAINT fk_receptiondet_fk_reception FOREIGN KEY (fk_reception) REFERENCES llx_reception (rowid);
|
||||
@ -1,29 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2008 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
-- Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_receptiondet
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_reception integer NOT NULL,
|
||||
fk_origin_line integer, -- Correspondance de la ligne avec le document d'origine (propal, commande)
|
||||
fk_entrepot integer, -- Entrepot de depart du produit
|
||||
qty real, -- Quantity
|
||||
rang integer DEFAULT 0
|
||||
)ENGINE=innodb;
|
||||
@ -1,20 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
ALTER TABLE llx_receptiondet_batch ADD INDEX idx_fk_receptiondet (fk_receptiondet);
|
||||
ALTER TABLE llx_receptiondet_batch ADD CONSTRAINT fk_receptiondet_batch_fk_receptiondet FOREIGN KEY (fk_receptiondet) REFERENCES llx_receptiondet(rowid);
|
||||
@ -1,27 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ============================================================================
|
||||
CREATE TABLE llx_receptiondet_batch (
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_receptiondet int NOT NULL,
|
||||
eatby date DEFAULT NULL,
|
||||
sellby date DEFAULT NULL,
|
||||
batch varchar(30) DEFAULT NULL,
|
||||
qty double NOT NULL DEFAULT '0',
|
||||
fk_origin_stock integer NOT NULL
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
@ -47,7 +47,7 @@ if (is_resource($handle))
|
||||
{
|
||||
if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file) && !preg_match('/\.key\.sql$/i', $file))
|
||||
{
|
||||
if (strpos($file, 'reception') !== false){
|
||||
if (strpos($file, 'reception') !== false || strpos($file, 'commande_fournisseur_dispatch') !== false){
|
||||
$tablefound++;
|
||||
$tabledata[] = $file;
|
||||
}
|
||||
@ -160,7 +160,7 @@ if (is_resource($handle))
|
||||
{
|
||||
if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file) && preg_match('/\.key\.sql$/i', $file))
|
||||
{
|
||||
if (strpos($file, 'reception') !== false){
|
||||
if (strpos($file, 'reception') !== false || strpos($file, 'commande_fournisseur_dispatch') !== false){
|
||||
$tablefound++;
|
||||
$tabledata[] = $file;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user