diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index d5ace69a09f..c88886de649 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -347,28 +347,41 @@ if ($id > 0 || ! empty($ref)) print ''.$objp->qty.''; print ''.$products_dispatched[$objp->rowid].''; - if ( !(empty($conf->productbatch->enabled)) && $objp->tobatch==1) { - print ''.img_picto_common($langs->trans('AddDispatchBatchLine'),'treemenu/plustop2.gif','onClick="AddLineBatch('.$i.')"').''; + if (! empty($conf->productbatch->enabled) && $objp->tobatch==1) + { + print ''.img_picto($langs->trans('AddDispatchBatchLine'),'split.png','onClick="addLineBatch('.$i.')"').''; // Dispatch column + print ''; // Warehouse column print ''; - print ''; - print ''; - print ''; - print ''; - $form->select_date('','dlc'.$suffix,'','',1,""); - print ''; - $form->select_date('','dluo'.$suffix,'','',1,""); - print ''; - print ''; - print ''; - print ' '; - } else { - print ''; + + print ''; + print ''; print ''; + print ''; print ''; + print ''; + + print ''; + $form->select_date('','dlc'.$suffix,'','',1,""); + print ''; + print ''; + $form->select_date('','dluo'.$suffix,'','',1,""); + print ''; + print ''; + print ''; + print ''; + print ' '; // Qty ordered + qty already dispatached } // Dispatch - print ''; + print ''; + if (empty($conf->productbatch->enabled) || $objp->tobatch!=1) + { + print ''; + print ''; + print ''; + } + print ''; + print ''; // Warehouse print ''; diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index dc912be4286..2efb6996993 100755 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -1161,4 +1161,4 @@ ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_b UPDATE llx_bank_url set url = REPLACE( url, 'fiche.php', 'card.php'); -- Add id commandefourndet in llx_commande_fournisseur_dispatch to correct /fourn/commande/dispatch.php display when several times same product in supplier order -ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_commandefourndet INT(11) NOT NULL DEFAULT '0' AFTER fk_product; +ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_commandefourndet INTEGER NOT NULL DEFAULT 0 AFTER fk_product;