Add: ajout du champs tms
This commit is contained in:
parent
199aebc5cb
commit
39dea64297
@ -157,6 +157,8 @@ if (isset($_POST['action']) && $_POST['action'] == 'upgrade')
|
||||
migrate_contracts_date2($db,$langs,$conf);
|
||||
|
||||
migrate_contracts_date3($db,$langs,$conf);
|
||||
|
||||
migrate_fichinter_date1($db,$langs,$conf);
|
||||
|
||||
migrate_contracts_open($db,$langs,$conf);
|
||||
|
||||
@ -712,6 +714,34 @@ function migrate_contracts_date3($db,$langs,$conf)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
/*
|
||||
* Mise a jour des dates tms de fiche d'intervention
|
||||
*/
|
||||
function migrate_fichinter_date1($db,$langs,$conf)
|
||||
{
|
||||
print '<tr><td colspan="4">';
|
||||
|
||||
print '<br>';
|
||||
print '<b>'.$langs->trans('MigrationFichinterIncoherentTmsDateUpdate')."</b><br>\n";
|
||||
|
||||
$sql1="update llx_fichinter set tms=datec where tms < datec";
|
||||
$resql1 = $db->query($sql1);
|
||||
if (! $resql1) dolibarr_print_error($db);
|
||||
if ($db->affected_rows() > 0)
|
||||
print $langs->trans('MigrationFchinterIncoherentTmsDateUpdateSuccess')."<br>\n";
|
||||
else
|
||||
print $langs->trans('MigrationFichinterIncoherentTmsDateNothingToUpdate')."<br>\n";
|
||||
$sql2="update llx_fichinter set tms=date_valid where tms < date_valid";
|
||||
$resql2 = $db->query($sql2);
|
||||
if (! $resql2) dolibarr_print_error($db);
|
||||
if ($db->affected_rows() > 0)
|
||||
print $langs->trans('MigrationFchinterIncoherentTmsDateUpdateSuccess')."<br>\n";
|
||||
else
|
||||
print $langs->trans('MigrationFichinterIncoherentTmsDateNothingToUpdate')."<br>\n";
|
||||
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Reouverture des contrats qui ont au moins une ligne non fermée
|
||||
|
||||
@ -684,4 +684,5 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v
|
||||
|
||||
ALTER TABLE llx_fichinter CHANGE note description text DEFAULT NULL;
|
||||
ALTER TABLE llx_fichinter ADD COLUMN note_private text DEFAULT NULL after description;
|
||||
ALTER TABLE llx_fichinter ADD COLUMN note_public text DEFAULT NULL after note_private;
|
||||
ALTER TABLE llx_fichinter ADD COLUMN note_public text DEFAULT NULL after note_private;
|
||||
ALTER TABLE llx_fichinter ADD COLUMN tms timestamp after ref;
|
||||
@ -26,6 +26,7 @@ create table llx_fichinter
|
||||
fk_soc integer NOT NULL,
|
||||
fk_projet integer DEFAULT 0, -- projet auquel est rattache la fiche
|
||||
ref varchar(30) NOT NULL, -- number
|
||||
tms timestamp,
|
||||
datec datetime, -- date de creation
|
||||
date_valid datetime, -- date de validation
|
||||
datei date, -- date de l'intervention
|
||||
|
||||
@ -32,7 +32,7 @@ create table llx_societe
|
||||
code_client varchar(15), -- code client
|
||||
code_fournisseur varchar(15), -- code founisseur
|
||||
code_compta varchar(15), -- code compta client
|
||||
code_compta_fournisseur varchar(15), -- code compta founisseur
|
||||
code_compta_fournisseur varchar(15), -- code compta founisseur
|
||||
address varchar(255), -- company adresse
|
||||
cp varchar(10), -- zipcode
|
||||
ville varchar(50), -- town
|
||||
|
||||
Loading…
Reference in New Issue
Block a user