Ejemplo n.º 1
0
 if ($user->rights->fournisseur->commande->commander && $object->statut == 2) {
     /*
      * Commander (action=commande)
      */
     print '<br>';
     print '<form name="commande" action="fiche.php?id=' . $object->id . '&amp;action=commande" method="post">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden"	name="action" value="commande">';
     print '<table class="border" width="100%">';
     print '<tr class="liste_titre"><td colspan="2">' . $langs->trans("ToOrder") . '</td></tr>';
     print '<tr><td>' . $langs->trans("OrderDate") . '</td><td>';
     $date_com = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
     print $form->select_date($date_com, '', '', '', '', "commande");
     print '</td></tr>';
     print '<tr><td>' . $langs->trans("OrderMode") . '</td><td>';
     $formorder->selectInputMethod(GETPOST('methodecommande'), "methodecommande", 1);
     print '</td></tr>';
     print '<tr><td>' . $langs->trans("Comment") . '</td><td><input size="40" type="text" name="comment" value="' . GETPOST('comment') . '"></td></tr>';
     print '<tr><td align="center" colspan="2"><input type="submit" class="button" value="' . $langs->trans("ToOrder") . '"></td></tr>';
     print '</table>';
     print '</form>';
 }
 if ($user->rights->fournisseur->commande->receptionner && ($object->statut == 3 || $object->statut == 4)) {
     /*
      * Receptionner (action=livraison)
      */
     print '<br>';
     print '<form action="fiche.php?id=' . $object->id . '" method="post">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden"	name="action" value="livraison">';
     print '<table class="border" width="100%">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_GRAPEFRUIT_SUPPLIER_ORDER_CLASSIFY_RECEIPT_ORDER">';
    echo ajax_constantonoff('GRAPEFRUIT_SUPPLIER_ORDER_CLASSIFY_RECEIPT_ORDER');
    print '</form>';
    print '</td></tr>';
}
$formorder = new FormOrder($db);
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->trans("set_GRAPEFRUIT_AUTO_ORDER_ON_SUPPLIERORDER_VALIDATION_WITH_METHOD") . '</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="300">';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />';
print '<input type="hidden" name="action" value="set_GRAPEFRUIT_AUTO_ORDER_ON_SUPPLIERORDER_VALIDATION_WITH_METHOD" />';
$formorder->selectInputMethod($conf->global->GRAPEFRUIT_AUTO_ORDER_ON_SUPPLIERORDER_VALIDATION_WITH_METHOD, "GRAPEFRUIT_AUTO_ORDER_ON_SUPPLIERORDER_VALIDATION_WITH_METHOD", 1);
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</form>';
print '</td></tr>';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("CustomerOrder") . '</td>' . "\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">' . $langs->trans("Value") . '</td>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->trans("set_GRAPEFRUIT_ORDER_CONTACT_SHIP_ADDRESS") . '</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="300">';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_GRAPEFRUIT_ORDER_CONTACT_SHIP_ADDRESS">';