Merge pull request #16142 from OPEN-DSI/fix_erreur_facture_fourn

FIX: Select transport mode function when create a supplier invoice and add unique key to the table llx_c_transport_mode in migrate sql
This commit is contained in:
Laurent Destailleur 2021-02-03 20:24:44 +01:00 committed by GitHub
commit 3b8b0d59ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -2095,7 +2095,7 @@ if ($action == 'create')
{
$langs->loadLangs(array("intracommreport"));
print '<tr><td>'.$langs->trans('IntracommReportTransportMode').'</td><td>';
$form->selectModeTransport(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id');
$form->selectTransportMode(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id');
print '</td></tr>';
}

View File

@ -123,6 +123,7 @@ CREATE TABLE llx_c_transport_mode (
label varchar(255) NOT NULL,
active tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;
ALTER TABLE llx_c_transport_mode ADD UNIQUE INDEX uk_c_transport_mode (code, entity);
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1);
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1);