$nb_line = Database::num_row($res); if ($write != 1 || $allcard != 0) { $str_add_card = ""; } require_once NOALYSS_INCLUDE . '/template/fiche_list.php'; echo '<hr>' . $bar; return; } /* * ********************************************************************************************************************************* * Summary * * ******************************************************************************************************************************** */ if ($_GET['histo'] == 3) { $cat_card = new Fiche_Def($cn); $cat_card->id = $_GET['cat']; $aHeading = $cat_card->getAttribut(); if ($allcard == 0) { echo $str_add_card; } require_once NOALYSS_INCLUDE . '/template/result_cat_card_summary.php'; $hid = new IHidden(); echo '<form method="GET" ACTION="export.php">' . dossier::hidden() . HtmlInput::submit('bt_csv', "Export CSV") . HtmlInput::hidden('act', "CSV:fiche") . $hid->input("type", "fiche") . $hid->input("ac", $_REQUEST['ac']) . $hid->input("fd_id", $_REQUEST['cat']); echo "</form>"; return; } $export_pdf = '<FORM METHOD="get" ACTION="export.php" style="display:inline">'; $export_pdf .= HtmlInput::hidden('cat', $_GET['cat']); $export_pdf .= HtmlInput::hidden('act', "PDF:fiche_balance") . ($export_pdf .= HtmlInput::hidden('start', $_GET['start'])); $export_pdf .= HtmlInput::hidden('end', $_GET['end']); $export_pdf .= HtmlInput::hidden('histo', $_GET['histo']); $export_pdf .= HtmlInput::request_to_hidden(array('allcard'));
function blank($p_fiche_def) { // array = array of attribute object sorted on ad_id $f = new Fiche_Def($this->cn, $p_fiche_def); $f->get(); $array = $f->getAttribut(); $r = h2(_('Catégorie') . ' ' . $f->label, ""); $r .= '<table style="width:98%;margin:1%">'; foreach ($array as $attr) { $table = 0; $msg = ""; $bulle = ''; if ($attr->ad_id == ATTR_DEF_ACCOUNT) { $w = new IPoste("av_text" . $attr->ad_id); $w->set_attribute('ipopup', 'ipop_account'); $w->set_attribute('account', "av_text" . $attr->ad_id); $w->dbl_click_history(); // account created automatically $sql = "select account_auto({$p_fiche_def})"; $ret_sql = $this->cn->exec_sql($sql); $a = Database::fetch_array($ret_sql, 0); $label = new ISpan(); $label->name = "av_text" . $attr->ad_id . "_label"; if ($a['account_auto'] == 't') { $msg .= $label->input() . " <span style=\"color:red\">" . _("Rappel: Poste créé automatiquement à partir de ") . $f->class_base . " </span> "; } else { // if there is a class base in fiche_def_ref, this account will be the // the default one if (strlen(trim($f->class_base)) != 0) { $msg .= "<TD>" . $label->input() . " <span style=\"color:red\">" . _("Rappel: Poste par défaut sera ") . $f->class_base . " !</span> "; $w->value = $f->class_base; } } $r .= "<TR>" . td(_("Poste Comptable"), ' class="input_text" ') . td($w->input() . $msg) . "</TR>"; continue; } elseif ($attr->ad_id == ATTR_DEF_TVA) { $w = new ITva_Popup('popup_tva'); $w->table = 1; } else { switch ($attr->ad_type) { case 'text': $w = new IText(); $w->css_size = "100%"; break; case 'numeric': $w = new INum(); $w->prec = $attr->ad_extra == "" ? 2 : $attr->ad_extra; $w->size = $attr->ad_size; break; case 'date': $w = new IDate(); break; case 'zone': $w = new ITextArea(); $w->style = ' class="itextarea" style="margin:0px;width:100%"'; break; case 'poste': $w = new IPoste("av_text" . $attr->ad_id); $w->set_attribute('ipopup', 'ipop_account'); $w->set_attribute('account', "av_text" . $attr->ad_id); $w->table = 1; $bulle = HtmlInput::infobulle(14); break; case 'select': $w = new ISelect("av_text" . $attr->ad_id); $w->value = $this->cn->make_array($attr->ad_extra); $w->style = 'style="width:100%"'; break; case 'card': $w = new ICard("av_text" . $attr->ad_id); // filter on frd_id $w->extra = $attr->ad_extra; $w->extra2 = 0; $label = new ISpan(); $label->name = "av_text" . $attr->ad_id . "_label"; $w->set_attribute('ipopup', 'ipopcard'); $w->set_attribute('typecard', $attr->ad_extra); $w->set_attribute('inp', "av_text" . $attr->ad_id); $w->set_attribute('label', "av_text" . $attr->ad_id . "_label"); $msg = $w->search(); $msg .= $label->input(); break; } $w->table = 0; } $w->table = $table; $w->label = $attr->ad_text; $w->name = "av_text" . $attr->ad_id; if ($attr->ad_id == 21 || $attr->ad_id == 22 || $attr->ad_id == 20 || $attr->ad_id == 31) { $bulle = HtmlInput::infobulle(21); } $r .= "<TR>" . td(_($w->label) . " {$bulle}", ' class="input_text" ') . td($w->input() . " {$msg}") . " </TR>"; } $r .= '</table>'; return $r; }