diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 2305ebbb417..2d2e219f2ad 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -187,12 +187,12 @@ if ($id > 0 || ! empty($ref)) } print ''; print ''; - + // Third party print ''.$langs->trans('Company').''; print ''.$soc->getNomUrl(1).''; print ''; - + // Discounts for third party print ''.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); @@ -234,13 +234,13 @@ if ($id > 0 || ! empty($ref)) } print ''; print ''; - + // Date de livraison print ''; print ''; - + if ($_GET['action'] != 'editdate_livraison' && $commande->brouillon) print ''; print '
'; print $langs->trans('DeliveryDate'); print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'),1).'
'; print ''; @@ -261,17 +261,17 @@ if ($id > 0 || ! empty($ref)) print nl2br($commande->note_public); print ''; print ''; - + // Adresse de livraison print ''; print ''; - + if ($_GET['action'] != 'editdelivery_adress' && $commande->brouillon) print ''; print '
'; print $langs->trans('DeliveryAddress'); print 'socid.'&id='.$commande->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).'
'; print ''; - + if ($_GET['action'] == 'editdelivery_adress') { $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id); @@ -281,13 +281,13 @@ if ($id > 0 || ! empty($ref)) $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id); } print ''; - + // Conditions et modes de réglement print ''; print ''; - + if ($_GET['action'] != 'editconditions' && $commande->brouillon) print ''; print '
'; print $langs->trans('PaymentConditionsShort'); print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'
'; print ''; @@ -358,9 +358,9 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans('Status').''; print ''.$commande->getLibStatut(4).''; print ''; - + print '
'; - + /** * Lignes de commandes avec quantité livrées et reste à livrer @@ -376,7 +376,7 @@ if ($id > 0 || ! empty($ref)) // $sql.= " AND p.fk_product_type <> 1"; Why this line ? $sql.= " GROUP by cd.rowid, cd.fk_product"; $sql.= " ORDER BY cd.rowid"; - + //print $sql; dolibarr_syslog("commande.php sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); @@ -405,9 +405,9 @@ if ($id > 0 || ! empty($ref)) while ($i < $num) { $product = new Product($db); - + $objp = $db->fetch_object($resql); - + $var=!$var; print ""; if ($objp->fk_product > 0) @@ -470,7 +470,7 @@ if ($id > 0 || ! empty($ref)) print ""; // associations sous produits - if ($objp->fk_product > 0) + if (! empty($conf->global->PRODUIT_SOUSPRODUITS) && $objp->fk_product > 0) { $product->get_sousproduits_arbo (); $prods_arbo = $product->get_arbo_each_prod($qtyProdCom); @@ -482,7 +482,7 @@ if ($id > 0 || ! empty($ref)) } } } - + $i++; } $db->free($resql); @@ -512,11 +512,11 @@ if ($id > 0 || ! empty($ref)) // Bouton expedier sans gestion des stocks if (! $conf->stock->enabled && ! $commande->brouillon) - { + { if ($user->rights->expedition->creer) { print ''.$langs->trans("NewSending").''; - if ($reste_a_livrer_total <= 0) + if ($reste_a_livrer_total <= 0) { print ' '.img_warning($langs->trans("WarningNoQtyLeftToSend")); } @@ -536,21 +536,21 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->expedition->creer) { print_titre($langs->trans("NewSending")); - + print '
'; print ''; print ''; print ''; print ''; print ''; - + $entrepot = new Entrepot($db); $langs->load("stocks"); - + print ''; print ''; print ''; - + print "
'.$langs->trans("Warehouse").''; - + if (sizeof($user->entrepots) === 1) { $uentrepot = array(); @@ -561,25 +561,25 @@ if ($id > 0 || ! empty($ref)) { $html->select_array("entrepot_id",$entrepot->list_array()); } - + if (sizeof($entrepot->list_array()) <= 0) { print '   No warehouse defined, add one'; } print ''; print ''; - if ($reste_a_livrer_total <= 0) + if ($reste_a_livrer_total <= 0) { print ' '.img_warning($langs->trans("WarningNoQtyLeftToSend")); } print '
"; print "
\n"; print '
'; - + $somethingshown=1; - + } else {