function print_form_filter($userid) { global $db, $langs; $langs->load('users'); $form = new Form($db); print '<form name="filter" methode="GET" action="' . $_SERVER['PHP_SELF'] . '">'; print $langs->trans('HierarchicalResponsible'); print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', '', 1); print '<br /><br />'; $date_deb = explode('/', $_REQUEST['date_deb']); $date_deb = implode('/', array_reverse($date_deb)); $date_fin = explode('/', $_REQUEST['date_fin']); $date_fin = implode('/', array_reverse($date_fin)); print 'Du '; $form->select_date(strtotime($date_deb), 'date_deb'); print 'Au '; $form->select_date(strtotime($date_fin), 'date_fin'); print '<input type="SUBMIT" class="butAction" value="Filtrer" />'; print '</form>'; print '<br />'; }
$totalvalue = $totalvalue + $product->pmp * $obj->reel; $totalvaluesell = $totalvaluesell + $product->price * $obj->reel; //Batch Detail if (!empty($conf->productbatch->enabled) && $product->hasbatch()) { $details = Productbatch::findAll($db, $obj->product_stock_id); if ($details < 0) { dol_print_error($db); } foreach ($details as $pdluo) { if ($action == 'editline' && GETPOST('lineid', 'int') == $pdluo->id) { //Current line edit print "\n" . '<tr><td colspan="9">'; print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST"><input type="hidden" name="pdluoid" value="' . $pdluo->id . '"><input type="hidden" name="action" value="updateline"><input type="hidden" name="id" value="' . $id . '"><table class="noborder" width="100%"><tr><td width="10%"></td>'; print '<td align="right" width="10%"><input type="text" name="batch_number" value="' . $pdluo->batch . '"></td>'; print '<td align="center" width="10%">'; $form->select_date($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0, 1); print '</td>'; print '<td align="center" width="10%">'; $form->select_date($pdluo->sellby, 'sellby', '', '', 1, '', 1, 0, 1); print '</td>'; print '<td align="right" width="10%">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>'; print '<td colspan="4"><input type="submit" class="button" id="savelinebutton" name="save" value="' . $langs->trans("Save") . '">'; print '<input type="submit" class="button" id="cancellinebutton" name="Cancel" value="' . $langs->trans("Cancel") . '"></td></tr>'; print '</table></form>'; } else { print "\n" . '<tr><td align="right">'; print img_picto($langs->trans("Tranfer"), 'uparrow', 'class="hideonsmartphone"') . ' '; print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $product->id . '&action=transfert&pdluoid=' . $pdluo->id . '">' . $langs->trans("StockMovement") . '</a>'; // Disabled, because edition of stock content must use the "Correct stock menu". // Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ... //print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=editline&lineid='.$pdluo->id.'#'.$pdluo->id.'">';
/** * Return HTML string to put an input field into a page * * @param string $key Key of attribute * @param string $value Value to show (for date type it must be in timestamp format) * @param string $moreparam To add more parametes on html input tag * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names) * @param string $keysuffix Suffix string to add into name and id of field (can be used to avoid duplicate names) * @param int $showsize Value for size attributed * @param int $objectid Current object id * @return string */ function showInputField($key, $value, $moreparam = '', $keyprefix = '', $keysuffix = '', $showsize = 0, $objectid = 0) { global $conf, $langs; $label = $this->attribute_label[$key]; $type = $this->attribute_type[$key]; $size = $this->attribute_size[$key]; $elementtype = $this->attribute_elementtype[$key]; $unique = $this->attribute_unique[$key]; $required = $this->attribute_required[$key]; $param = $this->attribute_param[$key]; $perms = $this->attribute_perms[$key]; $list = $this->attribute_list[$key]; if (empty($showsize)) { if ($type == 'date') { $showsize = 10; } elseif ($type == 'datetime') { $showsize = 19; } elseif (in_array($type, array('int', 'double'))) { $showsize = 10; } else { $showsize = round($size); if ($showsize > 48) { $showsize = 48; } } } if (in_array($type, array('date', 'datetime'))) { $tmp = explode(',', $size); $newsize = $tmp[0]; $showtime = in_array($type, array('datetime')) ? 1 : 0; // Do not show current date when field not required (see select_date() method) if (!$required && $value == '') { $value = '-1'; } require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; global $form; if (!is_object($form)) { $form = new Form($this->db); } // TODO Must also support $moreparam $out = $form->select_date($value, $keysuffix . 'options_' . $key . $keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); } elseif (in_array($type, array('int'))) { $tmp = explode(',', $size); $newsize = $tmp[0]; $out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="' . $showsize . '" maxlength="' . $newsize . '" value="' . $value . '"' . ($moreparam ? $moreparam : '') . '>'; } elseif ($type == 'varchar') { $out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="' . $showsize . '" maxlength="' . $size . '" value="' . $value . '"' . ($moreparam ? $moreparam : '') . '>'; } elseif ($type == 'text') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; $doleditor = new DolEditor($keysuffix . 'options_' . $key . $keyprefix, $value, '', 200, 'dolibarr_notes', 'In', false, false, !empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE, 5, 100); $out = $doleditor->Create(1); } elseif ($type == 'boolean') { $checked = ''; if (!empty($value)) { $checked = ' checked value="1" '; } else { $checked = ' value="1" '; } $out = '<input type="checkbox" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" ' . $checked . ' ' . ($moreparam ? $moreparam : '') . '>'; } elseif ($type == 'mail') { $out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="32" value="' . $value . '" ' . ($moreparam ? $moreparam : '') . '>'; } elseif ($type == 'phone') { $out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="20" value="' . $value . '" ' . ($moreparam ? $moreparam : '') . '>'; } elseif ($type == 'price') { $out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="6" value="' . price($value) . '" ' . ($moreparam ? $moreparam : '') . '> ' . $langs->getCurrencySymbol($conf->currency); } elseif ($type == 'double') { if (!empty($value)) { $value = price($value); } $out = '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="6" value="' . $value . '" ' . ($moreparam ? $moreparam : '') . '> '; } elseif ($type == 'select') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; $out .= ajax_combobox($keysuffix . 'options_' . $key . $keyprefix, array(), 0); } $out .= '<select class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" id="options_' . $key . $keyprefix . '" ' . ($moreparam ? $moreparam : '') . '>'; $out .= '<option value="0"> </option>'; foreach ($param['options'] as $key => $val) { list($val, $parent) = explode('|', $val); $out .= '<option value="' . $key . '"'; $out .= $value == $key ? ' selected' : ''; $out .= !empty($parent) ? ' parent="' . $parent . '"' : ''; $out .= '>' . $val . '</option>'; } $out .= '</select>'; } elseif ($type == 'sellist') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; $out .= ajax_combobox($keysuffix . 'options_' . $key . $keyprefix, array(), 0); } $out .= '<select class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" id="options_' . $key . $keyprefix . '" ' . ($moreparam ? $moreparam : '') . '>'; if (is_array($param['options'])) { $param_list = array_keys($param['options']); $InfoFieldList = explode(":", $param_list[0]); // 0 : tableName // 1 : label field name // 2 : key fields name (if differ of rowid) // 3 : key field parent (for dependent lists) // 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value $keyList = empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2] . ' as rowid'; if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) { list($parentName, $parentField) = explode('|', $InfoFieldList[3]); $keyList .= ', ' . $parentField; } if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) { if (strpos($InfoFieldList[4], 'extra.') !== false) { $keyList = 'main.' . $InfoFieldList[2] . ' as rowid'; } else { $keyList = $InfoFieldList[2] . ' as rowid'; } } $fields_label = explode('|', $InfoFieldList[1]); if (is_array($fields_label)) { $keyList .= ', '; $keyList .= implode(', ', $fields_label); } $sqlwhere = ''; $sql = 'SELECT ' . $keyList; $sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList[0]; if (!empty($InfoFieldList[4])) { // can use SELECT request if (strpos($InfoFieldList[4], '$SEL$') !== false) { $InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]); } // current object id can be use into filter if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) { $InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]); } else { $InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]); } //We have to join on extrafield table if (strpos($InfoFieldList[4], 'extra') !== false) { $sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList[0] . '_extrafields as extra'; $sqlwhere .= ' WHERE extra.fk_object=main.' . $InfoFieldList[2] . ' AND ' . $InfoFieldList[4]; } else { $sqlwhere .= ' WHERE ' . $InfoFieldList[4]; } } else { $sqlwhere .= ' WHERE 1'; } // Some tables may have field, some other not. For the moment we disable it. if (in_array($InfoFieldList[0], array('tablewithentity'))) { $sqlwhere .= ' AND entity = ' . $conf->entity; } $sql .= $sqlwhere; //print $sql; $sql .= ' ORDER BY ' . implode(', ', $fields_label); dol_syslog(get_class($this) . '::showInputField type=sellist', LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $out .= '<option value="0"> </option>'; $num = $this->db->num_rows($resql); $i = 0; while ($i < $num) { $labeltoshow = ''; $obj = $this->db->fetch_object($resql); // Several field into label (eq table:code|libelle:rowid) $fields_label = explode('|', $InfoFieldList[1]); if (is_array($fields_label)) { $notrans = true; foreach ($fields_label as $field_toshow) { $labeltoshow .= $obj->{$field_toshow} . ' '; } } else { $labeltoshow = $obj->{$InfoFieldList}[1]; } $labeltoshow = dol_trunc($labeltoshow, 45); if ($value == $obj->rowid) { foreach ($fields_label as $field_toshow) { $translabel = $langs->trans($obj->{$field_toshow}); if ($translabel != $obj->{$field_toshow}) { $labeltoshow = dol_trunc($translabel, 18) . ' '; } else { $labeltoshow = dol_trunc($obj->{$field_toshow}, 18) . ' '; } } $out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>'; } else { if (!$notrans) { $translabel = $langs->trans($obj->{$InfoFieldList}[1]); if ($translabel != $obj->{$InfoFieldList}[1]) { $labeltoshow = dol_trunc($translabel, 18); } else { $labeltoshow = dol_trunc($obj->{$InfoFieldList}[1], 18); } } if (empty($labeltoshow)) { $labeltoshow = '(not defined)'; } if ($value == $obj->rowid) { $out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>'; } if (!empty($InfoFieldList[3])) { $parent = $parentName . ':' . $obj->{$parentField}; } $out .= '<option value="' . $obj->rowid . '"'; $out .= $value == $obj->rowid ? ' selected' : ''; $out .= !empty($parent) ? ' parent="' . $parent . '"' : ''; $out .= '>' . $labeltoshow . '</option>'; } $i++; } $this->db->free($resql); } else { print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>'; } } $out .= '</select>'; } elseif ($type == 'checkbox') { $out = ''; $value_arr = explode(',', $value); foreach ($param['options'] as $keyopt => $val) { $out .= '<input class="flat" type="checkbox" name="' . $keysuffix . 'options_' . $key . $keyprefix . '[]" ' . ($moreparam ? $moreparam : ''); $out .= ' value="' . $keyopt . '"'; if (is_array($value_arr) && in_array($keyopt, $value_arr)) { $out .= 'checked'; } else { $out .= ''; } $out .= '/>' . $val . '<br>'; } } elseif ($type == 'radio') { $out = ''; foreach ($param['options'] as $keyopt => $val) { $out .= '<input class="flat" type="radio" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" ' . ($moreparam ? $moreparam : ''); $out .= ' value="' . $keyopt . '"'; $out .= $value == $keyopt ? 'checked' : ''; $out .= '/>' . $val . '<br>'; } } elseif ($type == 'chkbxlst') { if (is_array($value)) { $value_arr = $value; } else { $value_arr = explode(',', $value); } if (is_array($param['options'])) { $param_list = array_keys($param['options']); $InfoFieldList = explode(":", $param_list[0]); // 0 : tableName // 1 : label field name // 2 : key fields name (if differ of rowid) // 3 : key field parent (for dependent lists) // 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value $keyList = empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2] . ' as rowid'; if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) { list($parentName, $parentField) = explode('|', $InfoFieldList[3]); $keyList .= ', ' . $parentField; } if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) { if (strpos($InfoFieldList[4], 'extra.') !== false) { $keyList = 'main.' . $InfoFieldList[2] . ' as rowid'; } else { $keyList = $InfoFieldList[2] . ' as rowid'; } } $fields_label = explode('|', $InfoFieldList[1]); if (is_array($fields_label)) { $keyList .= ', '; $keyList .= implode(', ', $fields_label); } $sqlwhere = ''; $sql = 'SELECT ' . $keyList; $sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList[0]; if (!empty($InfoFieldList[4])) { // can use SELECT request if (strpos($InfoFieldList[4], '$SEL$') !== false) { $InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]); } // current object id can be use into filter if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) { $InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]); } else { $InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]); } // We have to join on extrafield table if (strpos($InfoFieldList[4], 'extra') !== false) { $sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList[0] . '_extrafields as extra'; $sqlwhere .= ' WHERE extra.fk_object=main.' . $InfoFieldList[2] . ' AND ' . $InfoFieldList[4]; } else { $sqlwhere .= ' WHERE ' . $InfoFieldList[4]; } } else { $sqlwhere .= ' WHERE 1'; } // Some tables may have field, some other not. For the moment we disable it. if (in_array($InfoFieldList[0], array('tablewithentity'))) { $sqlwhere .= ' AND entity = ' . $conf->entity; } // $sql.=preg_replace('/^ AND /','',$sqlwhere); // print $sql; $sql .= $sqlwhere; dol_syslog(get_class($this) . '::showInputField type=chkbxlst', LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); $i = 0; while ($i < $num) { $labeltoshow = ''; $obj = $this->db->fetch_object($resql); // Several field into label (eq table:code|libelle:rowid) $fields_label = explode('|', $InfoFieldList[1]); if (is_array($fields_label)) { $notrans = true; foreach ($fields_label as $field_toshow) { $labeltoshow .= $obj->{$field_toshow} . ' '; } } else { $labeltoshow = $obj->{$InfoFieldList}[1]; } $labeltoshow = dol_trunc($labeltoshow, 45); if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) { foreach ($fields_label as $field_toshow) { $translabel = $langs->trans($obj->{$field_toshow}); if ($translabel != $obj->{$field_toshow}) { $labeltoshow = dol_trunc($translabel, 18) . ' '; } else { $labeltoshow = dol_trunc($obj->{$field_toshow}, 18) . ' '; } } $out .= '<input class="flat" type="checkbox" name="' . $keysuffix . 'options_' . $key . $keyprefix . '[]" ' . ($moreparam ? $moreparam : ''); $out .= ' value="' . $obj->rowid . '"'; $out .= 'checked'; $out .= '/>' . $labeltoshow . '<br>'; } else { if (!$notrans) { $translabel = $langs->trans($obj->{$InfoFieldList}[1]); if ($translabel != $obj->{$InfoFieldList}[1]) { $labeltoshow = dol_trunc($translabel, 18); } else { $labeltoshow = dol_trunc($obj->{$InfoFieldList}[1], 18); } } if (empty($labeltoshow)) { $labeltoshow = '(not defined)'; } if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) { $out .= '<input class="flat" type="checkbox" name="' . $keysuffix . 'options_' . $key . $keyprefix . '[]" ' . ($moreparam ? $moreparam : ''); $out .= ' value="' . $obj->rowid . '"'; $out .= 'checked'; $out .= ''; $out .= '/>' . $labeltoshow . '<br>'; } if (!empty($InfoFieldList[3])) { $parent = $parentName . ':' . $obj->{$parentField}; } $out .= '<input class="flat" type="checkbox" name="' . $keysuffix . 'options_' . $key . $keyprefix . '[]" ' . ($moreparam ? $moreparam : ''); $out .= ' value="' . $obj->rowid . '"'; $out .= is_array($value_arr) && in_array($obj->rowid, $value_arr) ? ' checked ' : ''; $out .= ''; $out .= '/>' . $labeltoshow . '<br>'; } $i++; } $this->db->free($resql); } else { print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>'; } } $out .= '</select>'; } elseif ($type == 'link') { $out = ''; $param_list = array_keys($param['options']); // 0 : ObjectName // 1 : classPath $InfoFieldList = explode(":", $param_list[0]); dol_include_once($InfoFieldList[1]); if ($InfoFieldList[0] && class_exists($InfoFieldList[0])) { $object = new $InfoFieldList[0]($this->db); $object->fetch($value); $valuetoshow = $object->ref; if ($object->element == 'societe') { $valuetoshow = $object->name; } // Special case for thirdparty because ref is id because name is not unique $out .= '<input type="text" class="flat" name="' . $keysuffix . 'options_' . $key . $keyprefix . '" size="20" value="' . $valuetoshow . '" >'; } else { dol_syslog('Error bad setup of extrafield', LOG_WARNING); $out .= 'Error bad setup of extrafield'; } } /* Add comments if ($type == 'date') $out.=' (YYYY-MM-DD)'; elseif ($type == 'datetime') $out.=' (YYYY-MM-DD HH:MM:SS)'; */ return $out; }
if ($user->rights->banque->modifier && $action == 'addline') { print load_fiche_titre($langs->trans("AddBankRecordLong"), '', ''); print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td>' . $langs->trans("Date") . '</td>'; print '<td> </td>'; print '<td>' . $langs->trans("Type") . '</td>'; print '<td>' . $langs->trans("Numero") . '</td>'; print '<td colspan="2">' . $langs->trans("Description") . '</td>'; print '<td align=right>' . $langs->trans("Debit") . '</td>'; print '<td align=right>' . $langs->trans("Credit") . '</td>'; print '<td colspan="2" align="center"> </td>'; print '</tr>'; print '<tr ' . $bc[false] . '>'; print '<td class="nowrap" colspan="2">'; $form->select_date($dateop, 'op', 0, 0, 0, 'transaction'); print '</td>'; print '<td class="nowrap">'; $form->select_types_paiements(GETPOST('operation') ? GETPOST('operation') : ($object->courant == 2 ? 'LIQ' : ''), 'operation', '1,2', 2, 1); print '</td><td>'; print '<input name="num_chq" class="flat" type="text" size="4" value="' . GETPOST("num_chq") . '"></td>'; print '<td colspan="2">'; print '<input name="label" class="flat" type="text" size="24" value="' . GETPOST("label") . '">'; if ($nbcategories) { print '<br>' . $langs->trans("Rubrique") . ': <select class="flat" name="cat1">' . $options . '</select>'; } print '</td>'; print '<td align=right><input name="debit" class="flat" type="text" size="4" value="' . GETPOST("debit") . '"></td>'; print '<td align=right><input name="credit" class="flat" type="text" size="4" value="' . GETPOST("credit") . '"></td>'; print '<td colspan="2" align="center">'; print '<input type="submit" name="save" class="button" value="' . $langs->trans("Add") . '"><br>';
} print '<form id="payment_form" name="add_paiement" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="action" value="add_paiement">'; print '<input type="hidden" name="facid" value="' . $facture->id . '">'; print '<input type="hidden" name="socid" value="' . $facture->socid . '">'; print '<input type="hidden" name="type" value="' . $facture->type . '">'; print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="' . dol_escape_htmltag($facture->client->name) . '">'; print '<table class="border" width="100%">'; // Third party print '<tr><td><span class="fieldrequired">' . $langs->trans('Company') . '</span></td><td colspan="2">' . $facture->client->getNomUrl(4) . "</td></tr>\n"; // Date payment print '<tr><td><span class="fieldrequired">' . $langs->trans('Date') . '</span></td><td>'; $datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datepayment = $datepayment == '' ? empty($conf->global->MAIN_AUTOFILL_DATE) ? -1 : 0 : $datepayment; $html->select_date($datepayment, '', '', '', 0, "add_paiement", 1, 1); print '</td>'; print '<td>' . $langs->trans('Comments') . '</td></tr>'; $rowspan = 5; if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT)) { $rowspan++; } // Payment mode print '<tr><td><span class="fieldrequired">' . $langs->trans('PaymentMode') . '</span></td><td>'; $html->select_types_paiements(GETPOST('paiementcode') ? GETPOST('paiementcode') : $facture->mode_reglement_code, 'paiementcode', '', 2); print "</td>\n"; print '<td rowspan="' . $rowspan . '" valign="top">'; print '<textarea name="comment" wrap="soft" cols="60" rows="' . ROWS_4 . '">' . (empty($_POST['comment']) ? '' : $_POST['comment']) . '</textarea></td>'; print '</tr>'; // Payment amount if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT)) {
$default = empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT) ? '' : $conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT; $formactions->select_type_actions(GETPOST("actioncode") ? GETPOST("actioncode") : ($object->type_code ? $object->type_code : $default), "actioncode", "systemauto", 0, -1); print '</td></tr>'; } // Title print '<tr><td' . (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? ' class="fieldrequired"' : '') . '>' . $langs->trans("Title") . '</td><td><input type="text" id="label" name="label" size="60" value="' . GETPOST('label') . '"></td></tr>'; // Full day print '<tr><td>' . $langs->trans("EventOnFullDay") . '</td><td><input type="checkbox" id="fullday" name="fullday" ' . (GETPOST('fullday') ? ' checked' : '') . '></td></tr>'; // Date start $datep = $datep ? $datep : $object->datep; if (GETPOST('datep', 'int', 1)) { $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0); } print '<tr><td width="30%" class="nowrap"><span class="fieldrequired">' . $langs->trans("DateActionStart") . '</span></td><td>'; if (GETPOST("afaire") == 1) { $form->select_date($datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 0, 'fulldayend'); } else { if (GETPOST("afaire") == 2) { $form->select_date($datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 0, 'fulldayend'); } else { $form->select_date($datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 0, 'fulldaystart'); } } print '</td></tr>'; // Date end $datef = $datef ? $datef : $object->datef; if (GETPOST('datef', 'int', 1)) { $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0); } if (empty($datef) && !empty($datep) && !empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS)) { $datef = dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h');
/* */ /* ************************************************************************** */ if ($action == 'create') { print_fiche_titre($langs->trans("AddDonation")); dol_htmloutput_errors($mesg, $mesgs); print '<form name="add" action="fiche.php" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<table class="border" width="100%">'; print '<input type="hidden" name="action" value="add">'; $nbrows = 11; if (!empty($conf->projet->enabled)) { $nbrows++; } // Date print '<tr><td class="fieldrequired">' . $langs->trans("Date") . '</td><td>'; $form->select_date($donation_date ? $donation_date : -1, '', '', '', '', "add", 1, 1); print '</td>'; print '<td rowspan="' . $nbrows . '" valign="top">' . $langs->trans("Comments") . ' :<br>'; print "<textarea name=\"note_private\" wrap=\"soft\" cols=\"40\" rows=\"15\">" . GETPOST("note_private") . "</textarea></td>"; print "</tr>"; // Amount print "<tr>" . '<td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input type="text" name="amount" value="' . $_POST["amount"] . '" size="10"> ' . $langs->trans("Currency" . $conf->currency) . '</td></tr>'; print '<tr><td class="fieldrequired">' . $langs->trans("PublicDonation") . "</td><td>"; print $form->selectyesno("public", isset($_POST["public"]) ? $_POST["public"] : 1, 1); print "</td></tr>\n"; print "<tr>" . '<td>' . $langs->trans("Company") . '</td><td><input type="text" name="societe" value="' . $_POST["societe"] . '" size="40"></td></tr>'; print "<tr>" . '<td>' . $langs->trans("Firstname") . '</td><td><input type="text" name="firstname" value="' . $_POST["firstname"] . '" size="40"></td></tr>'; print "<tr>" . '<td>' . $langs->trans("Lastname") . '</td><td><input type="text" name="lastname" value="' . $_POST["lastname"] . '" size="40"></td></tr>'; print "<tr>" . '<td>' . $langs->trans("Address") . '</td><td>'; print '<textarea name="address" wrap="soft" cols="40" rows="3">' . $_POST["address"] . '</textarea></td></tr>'; // Zip / Town
} $datesp = dol_mktime(0, 0, 0, $datespmonth, $datespday, $datespyear); $dateep = dol_mktime(23, 59, 59, $dateepmonth, $dateepday, $dateepyear); if (empty($datesp) || empty($dateep)) { $datesp = dol_get_first_day($pastmonthyear, $pastmonth, false); $dateep = dol_get_last_day($pastmonthyear, $pastmonth, false); } print '<form name="salary" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="action" value="add">'; print_fiche_titre($langs->trans("NewSalaryPayment"), '', 'title_accountancy.png'); dol_fiche_head('', ''); print '<table class="border" width="100%">'; print "<tr>"; print '<td class="fieldrequired">' . $langs->trans("DatePayment") . '</td><td>'; print $form->select_date(empty($datep) ? -1 : $datep, "datep", '', '', '', 'add', 1, 1); print '</td></tr>'; print '<tr><td>' . $langs->trans("DateValue") . '</td><td>'; print $form->select_date(empty($datev) ? -1 : $datev, "datev", '', '', '', 'add', 1, 1); print '</td></tr>'; // Employee print "<tr>"; print '<td class="fieldrequired">' . $langs->trans("Employee") . '</td><td>'; print $form->select_dolusers(GETPOST('fk_user', 'int'), 'fk_user', 1); print '</td></tr>'; // Label print '<tr><td class="fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="40" value="' . ($_POST["label"] ? $_POST["label"] : $langs->trans("SalaryPayment")) . '"></td></tr>'; print "<tr>"; print '<td class="fieldrequired">' . $langs->trans("DateStartPeriod") . '</td><td>'; print $form->select_date($datesp, "datesp", '', '', '', 'add'); print '</td></tr>';
} print '</td><td colspan="3">'; print $object->ref_client; print '</td>'; print '</tr>'; // Tiers print '<tr><td class="fieldrequired">' . $langs->trans('Company') . '</td>'; print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>'; print '</tr>'; // Date delivery planned print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>'; print '<td colspan="3">'; //print dol_print_date($object->date_livraison,"day"); // date_livraison come from order and will be stored into date_delivery planed. $date_delivery = $date_delivery ? $date_delivery : $object->date_livraison; // $date_delivery comes from GETPOST print $form->select_date($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); print "</td>\n"; print '</tr>'; // Note Public print '<tr><td>' . $langs->trans("NotePublic") . '</td>'; print '<td colspan="3">'; $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print "</td></tr>"; // Note Private if ($object->note_private && !$user->societe_id) { print '<tr><td>' . $langs->trans("NotePrivate") . '</td>'; print '<td colspan="3">'; $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print "</td></tr>";
print '<input type="hidden" name="ref" value="' . ($_POST["ref"] ? $_POST["ref"] : $defaultref) . '">'; print '<tr><td><span class="fieldrequired">' . $langs->trans("Ref") . '</span></td><td>' . ($_POST["ref"] ? $_POST["ref"] : $defaultref) . '</td></tr>'; print '<tr><td class="fieldrequired">' . $langs->trans("Label") . '</td><td>'; print '<input type="text" size="25" name="label" class="flat" value="' . $label . '">'; print '</td></tr>'; // List of projects print '<tr><td class="fieldrequired">' . $langs->trans("ChildOfTask") . '</td><td>'; print $formother->selectProjectTasks(GETPOST('task_parent'), $projectid ? $projectid : $object->id, 'task_parent', 0, 0, 1, 1); print '</td></tr>'; print '<tr><td>' . $langs->trans("AffectedTo") . '</td><td>'; $contactsofproject = !empty($object->id) ? $object->getListContactId('internal') : ''; $form->select_users($user->id, 'userid', 0, '', 0, '', $contactsofproject); print '</td></tr>'; // Date start print '<tr><td>' . $langs->trans("DateStart") . '</td><td>'; print $form->select_date($date_start ? $date_start : '', 'dateo', 1, 1, 0, '', 1, 1); print '</td></tr>'; // Date end print '<tr><td>' . $langs->trans("DateEnd") . '</td><td>'; print $form->select_date($date_end ? $date_end : -1, 'datee', 1, 1, 0, '', 1, 1); print '</td></tr>'; // planned workload print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; print $form->select_duration('planned_workload', $planned_workload ? $planned_workload : $object->planned_workload, 0, 'text'); print '</td></tr>'; // Progress print '<tr><td>' . $langs->trans("ProgressDeclared") . '</td><td colspan="3">'; print $formother->select_percent($progress, 'progress'); print '</td></tr>'; // Description print '<tr><td valign="top">' . $langs->trans("Description") . '</td>';
print $langs->trans("DateDue"); print '</td><td align="left">'; print ' '; print '</td>'; print "</tr>\n"; print '<tr ' . $bc[$var] . ' valign="top">'; print '<td> </td>'; // Label print '<td align="left"><input type="text" size="34" name="label" class="flat" value="' . GETPOST('label') . '"></td>'; // Type print '<td align="left">'; $formsocialcontrib->select_type_socialcontrib(GETPOST("actioncode") ? GETPOST("actioncode") : '', 'actioncode', 1); print '</td>'; // Date end period print '<td align="center">'; print $form->select_date(!empty($dateperiod) ? $dateperiod : '-1', 'period', 0, 0, 0, 'charge', 1); print '</td>'; print '<td align="right"><input type="text" size="6" name="amount" class="flat" value="' . GETPOST('amount') . '"></td>'; print '<td align="center">'; print $form->select_date(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1); print '</td>'; print '<td align="center"><input type="submit" class="button" value="' . $langs->trans("Add") . '"></td>'; print '</tr>'; print '</table>'; print '</form>'; } /* *************************************************************************** */ /* */ /* Mode fiche */ /* */ /* *************************************************************************** */
} else { print $langs->trans("CompanyHasNoAbsoluteDiscount"); } print '.'; print '</td></tr>'; } // Commercial suivi print '<tr><td width="20%" class="nowrap"><span class="fieldrequired">' . $langs->trans("TypeContact_contrat_internal_SALESREPFOLL") . '</span></td><td>'; print $form->select_dolusers(GETPOST("commercial_suivi_id") ? GETPOST("commercial_suivi_id") : $user->id, 'commercial_suivi_id', 1, ''); print '</td></tr>'; // Commercial signature print '<tr><td width="20%" class="nowrap"><span class="fieldrequired">' . $langs->trans("TypeContact_contrat_internal_SALESREPSIGN") . '</span></td><td>'; print $form->select_dolusers(GETPOST("commercial_signature_id") ? GETPOST("commercial_signature_id") : $user->id, 'commercial_signature_id', 1, ''); print '</td></tr>'; print '<tr><td><span class="fieldrequired">' . $langs->trans("Date") . '</span></td><td>'; $form->select_date($datecontrat, '', 0, 0, '', "contrat"); print "</td></tr>"; if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); print '<tr><td>' . $langs->trans("Project") . '</td><td>'; $formproject->select_projects($soc->id, $projectid, "projectid"); print "</td></tr>"; } print '<tr><td>' . $langs->trans("NotePublic") . '</td><td valign="top">'; $doleditor = new DolEditor('note_public', $note_public, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, 70); print $doleditor->Create(1); if (empty($user->societe_id)) { print '<tr><td>' . $langs->trans("NotePrivate") . '</td><td valign="top">'; $doleditor = new DolEditor('note_private', $note_private, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, 70); print $doleditor->Create(1); print '</td></tr>';
print '<input type="hidden" name="action" value="addtimespent">'; print '<input type="hidden" name="id" value="' . $object->id . '">'; print '<input type="hidden" name="withproject" value="' . $withproject . '">'; print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td width="100">' . $langs->trans("Date") . '</td>'; print '<td>' . $langs->trans("By") . '</td>'; print '<td>' . $langs->trans("Note") . '</td>'; print '<td align="right">' . $langs->trans("Duration") . '</td>'; print '<td width="80"> </td>'; print "</tr>\n"; print '<tr ' . $bc[false] . '>'; // Date print '<td class="nowrap">'; $newdate = dol_mktime(12, 0, 0, $_POST["timemonth"], $_POST["timeday"], $_POST["timeyear"]); print $form->select_date($newdate, 'time', '', '', '', "timespent_date"); print '</td>'; // Contributor print '<td class="nowrap">'; $restrictaddtimetocontactoftask = 0; if (empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS)) { $restrictaddtimetocontactoftask = $object->getListContactId('internal'); } print img_object('', 'user'); print $form->select_dolusers($_POST["userid"] ? $_POST["userid"] : $user->id, 'userid', 0, '', 0, '', $restrictaddtimetocontactoftask); // Note: If user is not allowed it will be disabled into combo list and userid not posted print '</td>'; // Note print '<td class="nowrap">'; print '<textarea name="timespent_note" cols="80" rows="' . ROWS_3 . '">' . ($_POST['timespent_note'] ? $_POST['timespent_note'] : '') . '</textarea>'; print '</td>';
print ' '; print $langs->trans("Payment"); print '</label>'; print ' '; print '<label for="radiorefund">'; print '<input type="radio" id="radiorefund" data-label="' . $langs->trans('VATRefund') . '" class="flat" name="refund" value="1"' . ($refund ? ' checked="checked"' : '') . '>'; print ' '; print $langs->trans("Refund"); print '</label>'; print '</div>'; print "<br>\n"; dol_fiche_head(); print '<table class="border" width="100%">'; print "<tr>"; print '<td class="fieldrequired">' . $langs->trans("DatePayment") . '</td><td>'; print $form->select_date($datep, "datep", '', '', '', 'add'); print '</td></tr>'; print '<tr><td class="fieldrequired">' . $langs->trans("DateValue") . '</td><td>'; print $form->select_date($datev, "datev", '', '', '', 'add'); print '</td></tr>'; // Label if ($refund == 1) { $label = $langs->trans("VATRefund"); } else { $label = $langs->trans("VATPayment"); } print '<tr><td class="fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" id="label" size="40" value="' . ($_POST["label"] ? $_POST["label"] : $label) . '"></td></tr>'; // Amount print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . $_POST["amount"] . '"></td></tr>'; if (!empty($conf->banque->enabled)) { print '<tr><td class="fieldrequired">' . $langs->trans("Account") . '</td><td>';
print "</tr>\n"; // Ref client print '<tr><td>'; print $langs->trans('RefCustomer') . '</td><td colspan="3">'; print $object->ref_client; print '</td>'; print '</tr>'; // Tiers print '<tr><td class="fieldrequired">' . $langs->trans('Company') . '</td>'; print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>'; print '</tr>'; // Date delivery planned print '<tr><td class="fieldrequired">' . $langs->trans("DateDeliveryPlanned") . '</td>'; print '<td colspan="3">'; //print dol_print_date($object->date_livraison,"day"); // date_livraison come from order and will be stored into date_delivery planed. print $html->select_date($object->date_livraison ? $object->date_livraison : -1, 'date_delivery', 1, 1); print "</td>\n"; print '</tr>'; // Delivery address if ($origin == 'commande' && $conf->global->COMMANDE_ADD_DELIVERY_ADDRESS || $origin == 'propal' && $conf->global->PROPAL_ADD_DELIVERY_ADDRESS) { print '<tr><td>' . $langs->trans('DeliveryAddress') . '</td>'; print '<td colspan="3">'; if (!empty($object->fk_delivery_address)) { $html->form_address($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_delivery_address, $_GET['socid'], 'none', 'commande', $object->id); } print '</td></tr>' . "\n"; } // Note if ($object->note && !$user->societe_id) { print '<tr><td>' . $langs->trans("NotePrivate") . '</td>'; print '<td colspan="3">' . nl2br($object->note) . "</td></tr>";
$picto = 'calendarweek'; $nav .= ' <form name="dateselect" action="' . $_SERVER["PHP_SELF"] . '?action=show_peruser' . $param . '">'; $nav .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; $nav .= '<input type="hidden" name="action" value="' . $action . '">'; $nav .= '<input type="hidden" name="usertodo" value="' . $filtert . '">'; $nav .= '<input type="hidden" name="usergroup" value="' . $usergroup . '">'; $nav .= '<input type="hidden" name="actioncode" value="' . $actioncode . '">'; $nav .= '<input type="hidden" name="status" value="' . $status . '">'; $nav .= '<input type="hidden" name="socid" value="' . $socid . '">'; $nav .= '<input type="hidden" name="projectid" value="' . $projectid . '">'; $nav .= '<input type="hidden" name="begin_h" value="' . $begin_h . '">'; $nav .= '<input type="hidden" name="end_h" value="' . $end_h . '">'; $nav .= '<input type="hidden" name="begin_d" value="' . $begin_d . '">'; $nav .= '<input type="hidden" name="end_d" value="' . $end_d . '">'; $nav .= '<input type="hidden" name="showbirthday" value="' . $showbirthday . '">'; $nav .= $form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav .= ' <input type="submit" name="submitdateselect" class="button" value="' . $langs->trans("Refresh") . '">'; $nav .= '</form>'; // Must be after the nav definition $param .= '&year=' . $year . '&month=' . $month . ($day ? '&day=' . $day : ''); //print 'x'.$param; $tabactive = ''; if ($action == 'show_month') { $tabactive = 'cardmonth'; } if ($action == 'show_week') { $tabactive = 'cardweek'; } if ($action == 'show_day') { $tabactive = 'cardday'; }
print '</td></tr>'; // Status if ($status != '') { print '<tr><td>' . $langs->trans("Status") . '</td><td>'; print '<input type="hidden" name="status" value="' . $status . '">'; print $object->LibStatut($status, 4); print '</td></tr>'; } // Public print '<tr><td>' . $langs->trans("Visibility") . '</td><td>'; $array = array(0 => $langs->trans("PrivateProject"), 1 => $langs->trans("SharedProject")); print $form->selectarray('public', $array, $object->public); print '</td></tr>'; // Date start print '<tr><td>' . $langs->trans("DateStart") . '</td><td>'; print $form->select_date($date_start ? $date_start : '', 'projectstart', 0, 0, 0, '', 1, 0, 1); print '</td></tr>'; // Date end print '<tr><td>' . $langs->trans("DateEnd") . '</td><td>'; print $form->select_date($date_end ? $date_end : -1, 'projectend', 0, 0, 0, '', 1, 0, 1); print '</td></tr>'; if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Opportunity status print '<tr><td>' . $langs->trans("OpportunityStatus") . '</td>'; print '<td>'; print $formproject->selectOpportunityStatus('opp_status', $object->opp_status); print '</tr>'; // Opportunity amount print '<tr><td>' . $langs->trans("OpportunityAmount") . '</td>'; print '<td><input size="4" type="text" name="opp_amount" value="' . (GETPOST('opp_amount') != '' ? price(GETPOST('opp_amount')) : '') . '"></td>'; print '</tr>';
print "</tr>"; // Transmitter print "<tr><td>" . $langs->trans("CheckTransmitter") . "</td>"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; print '<input type="text" class="flat" size="40" name="emetteur" value="' . (empty($objp->emetteur) ? '' : stripslashes($objp->emetteur)) . '">'; print '</td>'; } else { print '<td colspan="' . ($rowspan ? '3' : '4') . '">' . $objp->emetteur . '</td>'; } print "</tr>"; // Date ope print '<tr><td>' . $langs->trans("DateOperation") . '</td>'; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; print $form->select_date($db->jdate($objp->do), 'dateo', '', '', '', 'update', 1, 0, 1, $objp->rappro); print '</td>'; } else { print '<td colspan="' . ($rowspan ? '3' : '4') . '">'; print dol_print_date($db->jdate($objp->do), "day"); print '</td>'; } print '</tr>'; // Value date print "<tr><td>" . $langs->trans("DateValue") . "</td>"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; print $form->select_date($db->jdate($objp->dv), 'datev', '', '', '', 'update', 1, 0, 1, $objp->rappro); if (!$objp->rappro) { print ' '; print '<a href="' . $_SERVER['PHP_SELF'] . '?action=dvprev&id=' . $id . '&rowid=' . $objp->rowid . '">';
$datec = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n"; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="action" value="add">'; print '<table class="border" width="100%">'; print "<tr>"; print '<td width="25%" class="fieldrequired">' . $langs->trans("Type") . '</td><td>'; $form->select_type_fees(GETPOST('type', 'int'), 'type', 1); print '</td></tr>'; print "<tr>"; print '<td class="fieldrequired">' . $langs->trans("Person") . '</td><td>'; print $form->select_dolusers(GETPOST('fk_user', 'int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '</td></tr>'; print "<tr>"; print '<td class="fieldrequired">' . $langs->trans("Date") . '</td><td>'; print $form->select_date($datec ? $datec : -1, '', '', '', '', 'add', 1, 1, 1); print '</td></tr>'; // Km print '<tr><td class="fieldrequired">' . $langs->trans("FeesKilometersOrAmout") . '</td><td><input name="km" size="10" value="' . GETPOST("km") . '"></td></tr>'; // Company print "<tr>"; print '<td>' . $langs->trans("CompanyVisited") . '</td><td>'; print $form->select_company(GETPOST('socid', 'int'), 'socid', '', 1); print '</td></tr>'; // Public note print '<tr>'; print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>'; print '<td valign="top" colspan="2">'; $doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100); print $doleditor->Create(1); print '</td></tr>';
$showdatefilter = 0; foreach ($listofreferent as $key => $value) { $title = $value['title']; $classname = $value['class']; $tablename = $value['table']; $datefieldname = $value['datefieldname']; $qualified = $value['test']; if ($qualified) { if (!$showdatefilter) { print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $projectid . '" method="post">'; print '<input type="hidden" name="tablename" value="' . $tablename . '">'; print '<input type="hidden" name="action" value="view">'; print '<table><tr>'; //print '<td>'.$langs->trans("Filter").':</td>'; print '<td>' . $langs->trans("From") . ' '; print $form->select_date($dates, 'dates', 0, 0, 1); print '</td>'; print '<td>' . $langs->trans("to") . ' '; print $form->select_date($datee, 'datee', 0, 0, 1); print '</td>'; print '<td>'; print '<input type="submit" name="refresh" value="' . $langs->trans("Refresh") . '" class="button">'; print '</td>'; print '</tr></table>'; print '</form><br>'; $showdatefilter++; } print '<br>'; print_titre($langs->trans($title)); $selectList = $formproject->select_element($tablename, $project->thirdparty->id); if (!$selectList || $selectList < 0) {
} else { print ''; } print '</td></tr>'; } // EMail print '<tr><td>' . $langs->trans("Email") . ' <FONT COLOR="red">*</FONT></td><td><input type="text" name="email" size="40" value="' . dol_escape_htmltag(GETPOST('email')) . '"></td></tr>' . "\n"; // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { print '<tr><td>' . $langs->trans("Login") . ' <FONT COLOR="red">*</FONT></td><td><input type="text" name="login" size="20" value="' . dol_escape_htmltag(GETPOST('login')) . '"></td></tr>' . "\n"; print '<tr><td>' . $langs->trans("Password") . ' <FONT COLOR="red">*</FONT></td><td><input type="password" name="pass1" size="20" value="' . GETPOST("pass1") . '"></td></tr>' . "\n"; print '<tr><td>' . $langs->trans("PasswordAgain") . ' <FONT COLOR="red">*</FONT></td><td><input type="password" name="pass2" size="20" value="' . GETPOST("pass2") . '"></td></tr>' . "\n"; } // Birthday print '<tr id="trbirth" class="trbirth"><td>' . $langs->trans("DateToBirth") . '</td><td>'; print $form->select_date($birthday, 'birth', 0, 0, 1, "newmember"); print '</td></tr>' . "\n"; // Photo print '<tr><td>' . $langs->trans("URLPhoto") . '</td><td><input type="text" name="photo" size="40" value="' . dol_escape_htmltag(GETPOST('photo')) . '"></td></tr>' . "\n"; // Public print '<tr><td>' . $langs->trans("Public") . '</td><td><input type="checkbox" name="public" value="1" checked></td></tr>' . "\n"; // Extrafields foreach ($extrafields->attribute_label as $key => $value) { print "<tr><td>" . $value . "</td><td>"; print $extrafields->showInputField($key, GETPOST('options_' . $key)); print "</td></tr>\n"; } // Comments print '<tr>'; print '<td valign="top">' . $langs->trans("Comments") . '</td>'; print '<td valign="top"><textarea name="comment" wrap="soft" cols="60" rows="' . ROWS_4 . '">' . dol_escape_htmltag(GETPOST('comment')) . '</textarea></td>';
// Third party print '<td>' . $langs->trans("ThirdParty") . '</td><td colspan="3">'; if ($projectstatic->societe->id) { print $projectstatic->societe->getNomUrl(1); } else { print ' '; } print '</td></tr>'; } // Task parent print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>'; print $formother->selectProjectTasks($object->fk_task_parent, $projectstatic->id, 'task_parent', $user->admin ? 0 : 1, 0, 0, 0, $object->id); print '</td></tr>'; // Date start print '<tr><td>' . $langs->trans("DateStart") . '</td><td>'; print $form->select_date($object->date_start, 'dateo', 1, 1); print '</td></tr>'; // Date end print '<tr><td>' . $langs->trans("DateEnd") . '</td><td>'; print $form->select_date($object->date_end ? $object->date_end : -1, 'datee', 1, 1); print '</td></tr>'; // Planned workload print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; print $form->select_duration('planned_workload', $object->planned_workload, 0, 'text'); print '</td></tr>'; // Progress declared print '<tr><td>' . $langs->trans("ProgressDeclared") . '</td><td colspan="3">'; print $formother->select_percent($object->progress, 'progress'); print '</td></tr>'; // Description print '<tr><td valign="top">' . $langs->trans("Description") . '</td>';
print ' <a href="' . DOL_URL_ROOT . '/comm/remise.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">(' . $langs->trans("EditRelativeDiscount") . ')</a>'; print '. '; print '<br>'; if ($absolute_discount) { print $langs->trans("CompanyHasAbsoluteDiscount", '<a href="' . DOL_URL_ROOT . '/comm/remx.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">' . price($absolute_discount) . '</a>', $langs->trans("Currency" . $conf->currency)); } else { print $langs->trans("CompanyHasNoAbsoluteDiscount"); } print ' <a href="' . DOL_URL_ROOT . '/comm/remx.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?socid=' . $soc->id . '&action=' . $action . '&origin=' . GETPOST('origin') . '&originid=' . GETPOST('originid')) . '">(' . $langs->trans("EditGlobalDiscounts") . ')</a>'; print '.'; print '</td></tr>'; } // Date invoice print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">'; $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); print $form->select_date($datefacture ? $datefacture : $dateinvoice, '', '', '', '', "add", 1, 1, 1); print '</td></tr>'; // Payment term print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">'; $form->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id'); print '</td></tr>'; // Payment mode print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td colspan="2">'; $form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id', 'CRDT'); print '</td></tr>'; // Bank Account if (isset($_POST['fk_account'])) { $fk_account = $_POST['fk_account']; } print '<tr><td>' . $langs->trans('BankAccount') . '</td><td colspan="2">'; $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
print_fiche_titre($text); // Show tabs $head = marges_prepare_head($user); $titre = $langs->trans("Margins"); $picto = 'margin'; dol_fiche_head($head, 'agentMargins', $titre, 0, $picto); print '<form method="post" name="sel" action="' . $_SERVER['PHP_SELF'] . '">'; print '<table class="border" width="100%">'; print '<tr><td width="20%">' . $langs->trans('SalesRepresentative') . '</td>'; print '<td colspan="4">'; print $form->select_dolusers($agentid, 'agentid', 1); print '</td></tr>'; // Start date print '<td>' . $langs->trans('StartDate') . ' (' . $langs->trans("DateValidation") . ')</td>'; print '<td width="20%">'; $form->select_date($startdate, 'startdate', '', '', 1, "sel", 1, 1); print '</td>'; print '<td width="20%">' . $langs->trans('EndDate') . ' (' . $langs->trans("DateValidation") . ')</td>'; print '<td width="20%">'; $form->select_date($enddate, 'enddate', '', '', 1, "sel", 1, 1); print '</td>'; print '<td style="text-align: center;">'; print '<input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans('Launch')) . '" />'; print '</td></tr>'; print "</table>"; print '</form>'; $sql = "SELECT"; if ($agentid > 0) { $sql .= " s.rowid as socid, s.nom, s.code_client, s.client,"; } $sql .= " u.rowid as agent, u.login, u.lastname, u.firstname,";
print '<input type="text" class="flat" size="3" name="search_contract" value="' . dol_escape_htmltag($search_contract) . '">'; print '</td>'; // Service label print '<td class="liste_titre">'; print '<input type="text" class="flat" size="12" name="search_service" value="' . dol_escape_htmltag($search_service) . '">'; print '</td>'; // Third party print '<td class="liste_titre">'; print '<input type="text" class="flat" size="12" name="search_name" value="' . dol_escape_htmltag($search_name) . '">'; print '</td>'; print '<td class="liste_titre" align="center">'; $arrayofoperators = array('<' => '<', '>' => '>'); print $form->selectarray('filter_op1', $arrayofoperators, $filter_op1, 1); print ' '; $filter_date1 = dol_mktime(0, 0, 0, $op1month, $op1day, $op1year); print $form->select_date($filter_date1, 'op1', 0, 0, 1, '', 1, 0, 1); print '</td>'; print '<td class="liste_titre" align="center">'; $arrayofoperators = array('<' => '<', '>' => '>'); print $form->selectarray('filter_op2', $arrayofoperators, $filter_op2, 1); print ' '; $filter_date2 = dol_mktime(0, 0, 0, $op2month, $op2day, $op2year); print $form->select_date($filter_date2, 'op2', 0, 0, 1, '', 1, 0, 1); print '</td>'; print '<td align="right">'; $arrayofstatus = array('0' => $langs->trans("ServiceStatusInitial"), '4' => $langs->trans("ServiceStatusRunning"), '4&filter=notexpired' => $langs->trans("ServiceStatusNotLate"), '4&filter=expired' => $langs->trans("ServiceStatusLate"), '5' => $langs->trans("ServiceStatusClosed")); print $form->selectarray('search_status', $arrayofstatus, strstr($search_status, ',') ? -1 : $search_status, 1); print '</td>'; print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">'; print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">'; print "</td></tr>\n";
$objsoc->fetch($object->socid); print '<tr><td>' . $langs->trans("Company") . '</td><td colspan="3">' . $objsoc->getNomUrl(1) . '</td>'; } else { print '<tr><td>' . $langs->trans("Company") . '</td><td colspan="3">'; print $langs->trans("ContactNotLinkedToCompany"); print '</td></tr>'; } } // Civility print '<tr><td>' . $langs->trans("UserTitle") . '</td><td colspan="3">'; print $object->getCivilityLabel(); print '</td></tr>'; // Date To Birth print '<tr><td>' . $langs->trans("DateToBirth") . '</td><td>'; $form = new Form($db); print $form->select_date($object->birthday, 'birthday', 0, 0, 1, "perso"); print '</td>'; print '<td colspan="2">' . $langs->trans("Alert") . ': '; if (!empty($object->birthday_alert)) { print '<input type="checkbox" name="birthday_alert" checked="checked"></td>'; } else { print '<input type="checkbox" name="birthday_alert"></td>'; } print '</tr>'; print "</table><br>"; print '<center>'; print '<input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '">'; print ' '; print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">'; print '</center>'; print "</form>";
$helpurl = 'EN:Module_DoliPos|FR:Module_DoliPos_FR|ES:Módulo_DoliPos'; llxHeader('', '', $helpurl); $html = new Form($db); print_fiche_titre($langs->trans("BankTransfer")); dol_htmloutput_events(); print $langs->trans("TransferDesc"); print "<br><br>"; print "<form name='add' method=\"post\" action=\"transfers.php\">"; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="action" value="add">'; print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td>' . $langs->trans("TransferFrom") . '</td><td>' . $langs->trans("TransferTo") . '</td><td>' . $langs->trans("Date") . '</td><td>' . $langs->trans("Description") . '</td><td>' . $langs->trans("Amount") . '</td>'; print '</tr>'; $var = false; print '<tr ' . $bc[$var] . '><td>'; print $html->select_comptes('', 'account_from', 0, '', 1); print "</td>"; print "<td>\n"; print $html->select_comptes('', 'account_to', 0, '', 1); print "</td>\n"; print "<td>"; $html->select_date($dateo, '', '', '', '', 'add'); print "</td>\n"; print '<td><input name="label" class="flat" type="text" size="40" value=""></td>'; print '<td><input name="amount" class="flat" type="text" size="8" value=""></td>'; print "</table>"; print '<br><center><input type="submit" class="button" value="' . $langs->trans("Add") . '"></center>'; print "</form>"; llxFooter(); $db->close();
print '<table class="border" width="100%">'; print "<tr>"; print '<td width="25%" class="fieldrequired">'.$langs->trans("Type").'</td><td>'; print $html->select_type_fees($_POST["type"]?$_POST["type"]:$_GET["type"],'type',1); print '</td></tr>'; print "<tr>"; print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>'; print $html->select_users($_POST["fk_user"]?$_POST["fk_user"]:$_GET["fk_user"],'fk_user',1); print '</td></tr>'; print "<tr>"; print '<td class="fieldrequired">'.$langs->trans("Date").'</td><td>'; print $html->select_date($datec?$datec:-1,'','','','','add',1,1); print '</td></tr>'; // Km print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" size="10" value="'.($_POST["km"]?$_POST["km"]:'').'"></td></tr>'; // Company print "<tr>"; print '<td>'.$langs->trans("CompanyVisited").'</td><td>'; print $html->select_societes($_POST["socid"]?$_POST["socid"]:$_GET["socid"],'socid','',1); print '</td></tr>'; print '</table>'; print '<br><center><input class="button" type="submit" value="'.$langs->trans("Save").'"> '; print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></center';
$invoice_supplier = new FactureFournisseur($db); $product_static = new Product($db); $payment_static = new Paiement($db); $paymentfourn_static = new PaiementFourn($db); //print load_fiche_titre($langs->trans("VAT"),""); //$fsearch.='<br>'; $fsearch .= ' <input type="hidden" name="year" value="' . $year . '">'; $fsearch .= ' <input type="hidden" name="modetax" value="' . $modetax . '">'; //$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': '; //$fsearch.=' <input type="text" name="min" value="'.$min.'">'; // Affiche en-tete du rapport if ($modetax == 1) { $nom = $langs->trans("VATReportByQuartersInDueDebtMode"); $calcmode = $langs->trans("CalcModeVATDebt"); $calcmode .= '<br>(' . $langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT . '/admin/taxes.php') . ')'; $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $prevyear = $year_start; $prevquarter = $q; if ($prevquarter > 1) { $prevquarter--; } else { $prevquarter = 4; $prevyear--; } $nextyear = $year_start; $nextquarter = $q; if ($nextquarter < 4) { $nextquarter++; } else { $nextquarter = 1; $nextyear++;
} } dol_htmloutput_errors($mesg); $accounts = array(); if ($action == 'new') { $lines = array(); $now = dol_now(); print $langs->trans("SelectChequeTransactionAndGenerate") . '<br><br>' . "\n"; print '<form class="nocellnopadd" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; print '<input type="hidden" name="action" value="new">'; //print '<fieldset><legend>aaa</legend>'; print '<table class="border" width="100%">'; //print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dol_print_date($now,'day').'</td></tr>'; // Filter print '<tr><td width="200">' . $langs->trans("DateChequeReceived") . '</td><td>'; print $form->select_date($filterdate, 'fd', 0, 0, 1, '', 1, 1); print '</td></tr>'; print '<tr><td>' . $langs->trans("BankAccount") . '</td><td>'; print $form->select_comptes($filteraccountid, 'accountid', 0, 'courant <> 2', 1); print '</td></tr>'; print '</table>'; print '<center>'; print '<input type="submit" class="button" name="filter" value="' . dol_escape_htmltag($langs->trans("ToFilter")) . '">'; if ($filterdate || $filteraccountid > 0) { print ' '; print '<input type="submit" class="button" name="removefilter" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">'; } print '</center>'; //print '</fieldset>'; print '</form>'; print '<br>';