$html .= $langs->trans("AddToDraftProposals") . '</td><td colspan="2">'; $html .= $form->selectarray("propalid", $otherprop, 0, 1); $html .= '</td></tr>'; } else { $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftProposals") . '</td><td colspan="2">'; $html .= $langs->trans("NoDraftProposals"); $html .= '</td></tr>'; } } // Commande if (!empty($conf->commande->enabled) && $user->rights->commande->creer) { $commande = new Commande($db); $langs->load("orders"); $var = true; $othercom = $commande->liste_array(2, 1, null); if (is_array($othercom) && count($othercom)) { $var = !$var; $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftOrders") . '</td><td colspan="2">'; $html .= $form->selectarray("commandeid", $othercom, 0, 1); $html .= '</td></tr>'; } else { $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftOrders") . '</td><td colspan="2">'; $html .= $langs->trans("NoDraftOrders"); $html .= '</td></tr>'; } } // Factures if (!empty($conf->facture->enabled) && $user->rights->facture->creer) {
print $langs->trans("NoOpenedOrders"); print '</td></tr>'; } print "</table>"; $db->free($result); } print '</td>'; if ($user->rights->societe->client->voir) { // Liste de "Other orders" print '<td width="50%" valign="top">'; $var=true; $othercom = $commande->liste_array(1, $user); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="nobordernopadding" width="100%">'; if (is_array($othercom) && sizeof($othercom)) { $var=!$var; print '<tr '.$bc[$var].'><td colspan="3">'; print '<input type="hidden" name="action" value="addincommande">'; print $langs->trans("OtherOrders").'</td><td>'; print $html->selectarray("commandeid", $othercom); print '</td></tr>'; print '<tr '.$bc[$var].'><td colspan="2">'.$langs->trans("Qty"); print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td nowrap>'.$langs->trans("ReductionShort"); print '<input type="text" class="flat" name="remise_percent" size="1" value="0">%'; print '</td><td align="right">';