print '<tr><td>' . $langs->trans('BankAccount') . '</td><td colspan="2">'; $form->select_comptes($fk_account, 'fk_account', 0, '', 1); print '</td></tr>'; } // What trigger creation print '<tr><td>' . $langs->trans('Source') . '</td><td>'; $form->selectInputReason('', 'demand_reason_id', "SRC_PROP", 1); print '</td></tr>'; // Delivery delay print '<tr><td>' . $langs->trans('AvailabilityPeriod') . '</td><td colspan="2">'; $form->selectAvailabilityDelay('', 'availability_id', '', 1); print '</td></tr>'; // Shipping Method if (!empty($conf->expedition->enabled)) { print '<tr><td>' . $langs->trans('SendingMethod') . '</td><td colspan="2">'; print $form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1); print '</td></tr>'; } // Delivery date (or manufacturing) print '<tr><td>' . $langs->trans("DeliveryDate") . '</td>'; print '<td colspan="2">'; if ($conf->global->DATE_LIVRAISON_WEEK_DELAY != "") { $tmpdte = time() + 7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY * 24 * 60 * 60; $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); $sday = date("d", $tmpdte); $form->select_date($syear . "-" . $smonth . "-" . $sday, 'date_livraison', '', '', '', "addprop"); } else { $form->select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1); } print '</td></tr>';
function fiche(&$remise, $type, $mode) { global $conf, $langs, $db; $page_name = "RemiseSetup"; llxHeader('', $langs->trans($page_name)); $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>'; print_fiche_titre($langs->trans($page_name), $linkback); // Configuration header $head = remiseAdminPrepareHead(); dol_fiche_head($head, $type, $page_name, 0, "remise@remise"); $form = new TFormCore('auto', 'form1', 'post'); $form->Set_typeaff($mode); echo $form->hidden('type', $type); echo $form->hidden('id', $remise->getId()); echo $form->hidden('action', 'save'); $f = new Form($db); ?> <table class="border" width="100%"> <tr> <td width="20%"><?php echo $langs->trans('Palier'); ?> </td><td><?php echo $form->texte('', 'palier', $remise->palier, 10, 255); ?> </td> </tr> <tr> <td><?php echo $langs->trans('Remise'); ?> </td><td><?php echo $form->texte('', 'remise', $remise->remise, 10, 255); ?> </td> </tr> <tr> <td><?php echo $langs->trans('Zip'); ?> </td><td><?php echo $form->texte('', 'zip', $remise->zip, 5, 255); ?> </td> </tr> <tr> <td><?php echo $langs->trans('ShipmentMode'); ?> </td><td> <?php if ((double) DOL_VERSION >= 3.7) { $f->selectShippingMethod($remise->fk_shipment_mode, 'fk_shipment_mode', '', 1); } else { $query = "SELECT rowid, code, libelle"; $query .= " FROM " . MAIN_DB_PREFIX . "c_shipment_mode"; $query .= " WHERE active = 1"; $query .= " ORDER BY libelle ASC"; $resql = $db->query($query); print '<select id="fk_shipment_mode" class="flat selectshippingmethod" name="fk_shipment_mode"' . ($moreattrib ? ' ' . $moreattrib : '') . '>'; print '<option value="">'; print '</option>'; while ($res = $db->fetch_object($resql)) { $selected = ''; if ($remise->fk_shipment_mode == $res->rowid) { $selected = 'selected="selected"'; } print '<option value="' . $res->rowid . '" ' . $selected . '>'; print $langs->trans("SendingMethod" . strtoupper($res->code)); print '</option>'; } print '</select>'; } ?> </td> </tr> </table> <div class="tabsAction"> <?php echo $form->btsubmit($langs->trans('Save'), 'bt_save'); echo $form->btsubmit($langs->trans('Cancel'), 'bt_cancel', '', 'butAction butActionCancel'); ?> </div> <?php $form->end(); dol_fiche_end(); llxFooter(); }