cn; $forecast = new Forecast_SQL($cn, $this->get_forecast_id()); $forecast->load(); $str_name = $forecast->getp('f_name'); $str_start = $forecast->getp('f_start_date'); $str_end = $forecast->getp('f_end_date'); $aPeriode = $cn->make_array("select p_id,to_char(p_start,'MM.YYYY') as label from parm_periode where p_start >= (select p_start from parm_periode where p_id=$str_start) and p_end <= (select p_end from parm_periode where p_id=$str_end) order by p_start"); $aPeriode[] = array('value' => 0, 'label' => 'Mensuel'); $category = new ISelect("fc_id"); $category->value = $cn->make_array("select fc_id,fc_desc from forecast_category where f_id=$1 order by 2", 0, [$this->get_forecast_id()]); $category->selected = $object->getp("fc_id"); $amount = new INum("fi_amount"); $amount->value = $object->getp("fi_amount"); $amount->value=($amount->value=="")?0:$amount->value; $forecast_text = new IText("fi_text"); $forecast_text->value = $object->getp("fi_text"); /* Accounting*/ $account = new IPoste('fi_account'); $account->nb_row=3; $account->extra=' style = "margin-left:0px;width:100%;" class="input_text"'; $account->set_attribute('account', 'fi_account'); $account->set_attribute('bracket', 1); $account->set_attribute('no_overwrite', 1); $account->set_attribute('noquery', 1); $account->value = $object->getp("fi_account"); $account->size="80rem"; /*Quick Code */ $qc = new ICard("fi_card"); // If double click call the javascript fill_ipopcard $qc->set_dblclick("fill_ipopcard(this);"); // name of the field to update with the name of the card $qc->set_attribute('label', 'an_label'); // Type of card : all $qc->set_attribute('typecard', 'all'); $qc->set_attribute('jrn', 0); $qc->extra = 'all'; // when value selected in the autcomplete $qc->set_function('fill_data'); if ($object->getp("fi_card") != "") { $qc->value = $cn->get_value("select ad_value from fiche_detail where ad_id=23 and f_id = $1", [$object->getp("fi_card")]); } $isDebit=new ISelect("fi_debit"); $isDebit->value=array( array("label"=>_("Crédit"),"value"=>'C'), array("label"=>_("Débit"),"value"=>'D') ); $isDebit->selected=$object->getp("fi_debit"); $isPeriode = new ISelect('fi_pid'); $isPeriode->value = $aPeriode; $isPeriode->selected = $object->getp("fi_pid"); $amount_initial= new INum("fi_amount_initial"); $amount_initial->value=$object->getp("fi_amount_initial"); $amount_initial->value=($amount_initial->value=='')?0:$amount_initial->value; ?>
| = _("Categorie") ?> | = $category->input(); ?> |
| = _("Periode") ?> | = $isPeriode->input() ?> |
| = _("Intitulé") ?> | = $forecast_text->input(); ?> |
| = _("Fiche") ?> | = $qc->input(); ?>=$qc->search()?> |
| = _("Positif") ?>= Icon_Action::tips(_("Ne concerne que les fiches"))?> | =$isDebit->input(); ?> |
| = _("Formule") ?> ( Aide ) | = $account->input() ?> |
| = _("Montant") ?> | = $amount->input(); ?> |
| =_("Montant initial")?> | =$amount_initial->input()?> |