diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index a7c4ef4b424..d9bd0be1471 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1619,6 +1619,18 @@ else } } + // Créer commande fournisseur + if ($commande->statut > 0 && $commande->statut < 3 && $user->rights->fournisseur->commande->creer) + { + print ''.$langs->trans('Commande PCB').''; + } + + // Créer commande fournisseur + if ($commande->statut > 0 && $commande->statut < 3 && $user->rights->fournisseur->commande->creer) + { + print ''.$langs->trans('Commande ACD').''; + } + // Edit if ($commande->statut == 1) { diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index d82f7610cd0..c650de045a1 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -37,6 +37,7 @@ $user->getrights("fournisseur"); if (!$user->rights->fournisseur->commande->lire) accessforbidden(); +$comclientid = isset($_GET["comid"])?$_GET["comid"]:''; // Sécurité accés client $socid=0; @@ -239,6 +240,12 @@ if ($_GET["action"] == 'create') if ($fourn->create_commande($user) > 0) { $idc = $fourn->single_open_commande; + + if ($comclientid != '') + { + $fourn->updateFromCommandeClient($user,$idc,$comclientid); + } + Header("Location:fiche.php?id=".$idc); exit; } @@ -437,8 +444,11 @@ if ($_GET["id"] > 0) */ print '
| '.$langs->trans("Ref").' | '; + print ''.$langs->trans("Label").' | '; print ''.$langs->trans("Description").' | '; print ''.$langs->trans("VAT").' | '; print ''.$langs->trans("Qty").' | '; @@ -466,6 +477,7 @@ if ($_GET["id"] > 0) $objp = $db->fetch_object($resql); print "
| '.img_object($langs->trans("ShowProduct"),'product').' '.$objp->ref.' | '; + print "".$objp->label." | "; print "".nl2br($objp->description)." | "; print ''.$objp->tva_tx.'% | '; print ''.$objp->qty.' | ';