diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index f56d78075c6..5cb55955cc2 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -100,8 +100,8 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || ! empty($ref)) { - $ret = $object->fetch($id, $ref); - if ($ret < 0) dol_print_error($db,$object->error); + $ret = $object->fetch($id, $ref); + if ($ret < 0) dol_print_error($db,$object->error); $ret = $object->fetch_thirdparty(); if ($ret < 0) dol_print_error($db,$object->error); } @@ -1600,6 +1600,7 @@ elseif (! empty($object->id)) $res=$object->fetch_optionals($object->id,$extralabels); + $head = ordersupplier_prepare_head($object); $title=$langs->trans("SupplierOrder"); @@ -1608,9 +1609,7 @@ elseif (! empty($object->id)) $formconfirm=''; - /* - * Confirmation de la suppression de la commande - */ + // Confirmation de la suppression de la commande if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2); @@ -1629,9 +1628,7 @@ elseif (! empty($object->id)) } - /* - * Confirmation de la validation - */ + // Confirmation de la validation if ($action == 'valid') { $object->date_commande=dol_now(); @@ -1663,9 +1660,7 @@ elseif (! empty($object->id)) } } - /* - * Confirm approval - */ + // Confirm approval if ($action == 'approve' || $action == 'approve2') { $qualified_for_stock_change=0; @@ -1703,27 +1698,21 @@ elseif (! empty($object->id)) $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("ApproveThisOrder"), $text, "confirm_".$action, $formquestion, 1, 1, 240); } - /* - * Confirmation de la desapprobation - */ + // Confirmation de la desapprobation if ($action == 'refuse') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1); } - /* - * Confirmation de l'annulation - */ + // Confirmation de l'annulation if ($action == 'cancel') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("Cancel"),$langs->trans("ConfirmCancelThisOrder",$object->ref),"confirm_cancel", '', 0, 1); } - /* - * Confirmation de l'envoi de la commande - */ + // Confirmation de l'envoi de la commande if ($action == 'commande') { $date_com = dol_mktime(GETPOST('rehour'),GETPOST('remin'),GETPOST('resec'),GETPOST("remonth"),GETPOST("reday"),GETPOST("reyear")); @@ -1803,37 +1792,6 @@ elseif (! empty($object->id)) print ''; - // Ref - /* - print ''; - print ''; - print '';*/ - - // Ref supplier - /* - print ''; - - // Fournisseur - print '"; - print ''; - print ''; - */ - - // Statut - /* - print ''; - print ''; - print '"; - */ - // Date if ($object->methode_commande_id > 0) { @@ -1988,31 +1946,6 @@ elseif (! empty($object->id)) print ''; print ''; - // Project - /* - if (! empty($conf->projet->enabled)) - { - $langs->load('projects'); - print ''; - print ''; - }*/ - // Incoterms if (!empty($conf->incoterm->enabled)) { @@ -2707,8 +2640,6 @@ elseif (! empty($object->id)) print ""; } - print "
"; - print '
'; @@ -2727,7 +2658,7 @@ elseif (! empty($object->id)) $somethingshown=$formfile->numoffiles; // Show links to link elements - $linktoelem = $form->showLinkToObjectBlock($object, null, array('order_supplier')); + $linktoelem = $form->showLinkToObjectBlock($object, null, array('supplier_order','order_supplier')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); print '
';
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); - print '
'; - print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->fournisseur->commande->creer); - print ''; - print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->fournisseur->commande->creer); - print '
'.$langs->trans("Supplier")."'.$object->thirdparty->getNomUrl(1,'supplier').'
'.$langs->trans("Status").''; - print $object->getLibStatut(4); - print "
'.$object->getMaxDeliveryTimeDay($langs).'
'; - print ''; - if ($action != 'classify') print ''; - print '
'; - print $langs->trans('Project'); - print ''.img_edit($langs->trans('SetProject')).'
'; - print '
'; - //print "$object->id, $object->socid, $object->fk_project"; - if ($action == 'classify') - { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:-1), $object->fk_project, 'projectid', 0, 0, 1); - } - else - { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0); - } - print '