function display_form($p_filter_year = "")
 {
     $r = "";
     $r .= dossier::hidden();
     $r .= '<TABLE>';
     $r .= '<TR>';
     // filter on the current year
     $w = new ISelect();
     $w->table = 1;
     $periode_start = $this->db->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode {$p_filter_year} order by p_start,p_end");
     $periode_end = $this->db->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode {$p_filter_year} order by p_end,p_start");
     $w->label = _("Depuis");
     $w->value = $this->from;
     $w->selected = $this->from;
     $r .= td($w->input('from_periode', $periode_start));
     $w->label = _(" jusque ");
     $w->value = $this->to;
     $w->selected = $this->to;
     $r .= td($w->input('to_periode', $periode_end));
     $r .= "</TR>";
     $r .= "<tr>";
     $mod = new ISelect();
     $mod->table = 1;
     $mod->value = $this->db->make_array("select b_id, b_name from bilan order by b_name");
     $mod->label = _("Choix du bilan");
     $r .= td($mod->input('b_id'));
     $r .= "</tr>";
     $r .= '</TABLE>';
     return $r;
 }
 /**
  *@brief display form to get the parameter
  *  - card_poste 1 by card, 2 by account
  *  - from_poste
  *  - to_poste
  *  - from from date
  *  - to until date
  *  - pa_id Analytic plan to use
  */
 function display_form($p_hidden = '')
 {
     $r = parent::display_form($p_hidden);
     $icard = new ISelect('card_poste');
     $icard->value = array(array('value' => 1, 'label' => 'Par fiche /Activité'), array('value' => 2, 'label' => 'Par poste comptable/Activité'), array('value' => 3, 'label' => 'Par activité/Fiche'), array('value' => 4, 'label' => 'Par activité/Poste Comptable'));
     $icard->selected = $this->card_poste;
     $r .= $icard->input();
     $r .= HtmlInput::request_to_hidden(array('ac'));
     return $r;
 }
	    </table>
	</fieldset>
	<?php 
if ($inside_dossier) {
    /* Pref for welcome page */
    echo '<fieldset style="margin: 1%">';
    echo '<legend>' . _('Options pour la page d\'accueil') . '</legend>';
    echo _('Mini-Rapport : ');
    $rapport = new Acc_Report($cn);
    $aRapport = $rapport->make_array();
    $aRapport[] = array("value" => 0, "label" => _('Aucun mini rapport'));
    $wRapport = new ISelect();
    $wRapport->name = "minirap";
    $wRapport->selected = $g_user->get_mini_report();
    $wRapport->value = $aRapport;
    echo $wRapport->input();
    echo '<span class="notice">' . _('Le mini rapport est un rapport qui s\'affiche  sur votre page d\'accueil') . '</span>';
    echo '</fieldset>';
}
echo '<fieldset  style="margin: 1%">';
echo '<legend>' . _('Langue') . '</legend>';
echo _('Selectionnez votre langue');
$aLang = array(array(_('Français'), 'fr_FR.utf8'), array(_('Anglais'), 'en_US.utf8'), array(_('Néerlandais'), 'nl_NL.utf8'));
echo '<select name="lang" id="l">';
for ($i = 0; $i < count($aLang); $i++) {
    $sel = "";
    if ($aLang[$i][1] == $_SESSION['g_lang']) {
        $sel = " selected ";
    }
    printf('<option value="%s" %s>%s</option>', $aLang[$i][1], $sel, $aLang[$i][0]);
}
 /**
  * @brief show the form for loading a template
  * @param p_action for the field action = destination url
  *
  *
  * @return string containing the forms
  */
 function form()
 {
     $r = '<p class="notice">';
     $r .= 'Veuillez introduire les mod&egrave;les servant à g&eacute;n&eacute;rer vos documents';
     $r .= '</p>';
     $r .= '<form enctype="multipart/form-data"  method="post">';
     $r .= dossier::hidden();
     // we need to add the sub action as hidden
     $h = new IHidden();
     $h->name = "sa";
     $h->value = "add_document";
     $r .= $h->input();
     $r .= '<table>';
     $t = new IText();
     $t->name = "md_name";
     $r .= "<tr><td> Nom </td><td>" . $t->input() . "</td>";
     $r .= "</tr>";
     $r .= "<tr><td>Catégorie de document </td>";
     $w = new ISelect();
     $w->name = "md_type";
     $w->value = $this->cn->make_array('select dt_id,dt_value from document_type order by dt_value');
     $r .= "<td>" . $w->input() . "</td></tr>";
     $r .= '<tr>';
     $r .= td(_('Affectation'));
     $waffect = new ISelect();
     $waffect->name = 'md_affect';
     $waffect->value = array(array('value' => 'ACH', 'label' => _('Uniquement journaux achat')), array('value' => 'VEN', 'label' => _('Uniquement journaux vente')), array('value' => 'GES', 'label' => _('Partie gestion')));
     $r .= td($waffect->input());
     $r .= '</tr>';
     $f = new IFile();
     $f->name = "doc";
     $r .= "<tr><td>fichier</td><td> " . $f->input() . "</td></tr>";
     $start = new IText();
     $start->name = "start_seq";
     $start->size = 9;
     $start->value = "0";
     $r .= "<tr><td> Numerotation commence a</td><td> " . $start->input() . "</td>";
     $r .= '<td class="notice">Si vous laissez &agrave; 0, la num&eacute;rotation ne changera pas, la prochaine facture sera n+1, n étant le n° que vous avez donn&eacute;</td>';
     $r .= "</tr>";
     $r .= '</table>';
     $r .= HtmlInput::submit('add_document', 'Ajout');
     $r .= "</form></p>";
     return $r;
 }
Beispiel #5
0
    echo $href;
    ?>
">
	<?php 
    echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
    echo dossier::hidden();
    $a = isset($_GET['query']) ? $_GET['query'] : "";
    printf(_('Recherche') . ' <input class="input_text" type="text" name="query" value="%s">', $a);
    echo HtmlInput::request_to_hidden(array('ac'));
    $choice_cat = HtmlInput::default_value_request("choice_cat", 1);
    if ($choice_cat == 1) {
        $sel_card = new ISelect('cat');
        $sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' . ' where  frd_id=$1 ' . ' order by fd_label ', 1, array(FICHE_TYPE_ADM_TAX));
        $sel_card->selected = isset($_GET['cat']) ? $_GET['cat'] : -1;
        $sel_card->javascript = ' onchange="submit(this);"';
        echo _('Catégorie :') . $sel_card->input();
    } else {
        $cat = HtmlInput::default_value_request('cat', '');
        echo HtmlInput::hidden("cat", $cat);
        echo HtmlInput::hidden('choice_cat', 0);
    }
    echo Dossier::hidden();
    ?>
    <input type="submit" class="button" name="submit_query" value="<?php 
    echo _('recherche');
    ?>
">
	 <input type="hidden" name="p_action" value="adm">
                                                                     </form>
                                                                     </div>
                                                                     <?php 
	<div id="jrn_name_div">
	<h2  id="jrn_name"> <?php 
echo $this->get_name();
?>
</h2>
</div>
<legend><?php 
echo $f_legend;
?>
 </legend>
<?php 
$wchdate = new ISelect('chdate');
$wchdate->value = array(array('value' => 1, 'label' => _("Avec date d'extrait")), array('value' => 2, 'label' => _("Avec date opérations")));
$wchdate->selected = isset($chdate) ? $chdate : 1;
$wchdate->javascript = 'onchange="show_fin_chdate(\'chdate\')"';
echo $wchdate->input();
?>
<span id="chdate_ext">
   <?php 
echo _('Date') . ' ' . $f_date;
?>
</span>

<?php 
echo $f_period;
?>
<br>
<?php 
echo $f_jrn;
?>
<br>
 function form($p_table = true)
 {
     $wType = new ISelect();
     $wType->name = 'p_type';
     $wType->value = self::$type;
     if (!$p_table) {
         $ret = '    <TR>
              <TD>
              <INPUT TYPE="TEXT" NAME="p_val" SIZE=7>
              </TD>
              <TD>
              <INPUT TYPE="TEXT" NAME="p_lib" size=50>
              </TD>
              <TD>
              <INPUT TYPE="TEXT" NAME="p_parent" size=5>
              </TD>
              <TD>';
         $ret .= $wType->input() . '</TD>';
         return $ret;
     } else {
         $ret = '<TABLE><TR>';
         $ret .= sprintf('<TD>' . _('Numéro de classe') . ' </TD><TD><INPUT TYPE="TEXT" name="p_val" value="%s"></TD>', $this->pcm_val);
         $ret .= "</TR><TR>";
         $ret .= sprintf('<TD>' . _('Libellé') . ' </TD><TD><INPUT TYPE="TEXT" size="70" NAME="p_lib" value="%s"></TD>', h($this->pcm_lib));
         $ret .= "</TR><TR>";
         $ret .= sprintf('<TD>' . _('Classe Parent') . '</TD><TD><INPUT TYPE="TEXT" name="p_parent" value="%s"></TD>', $this->pcm_val_parent);
         $ret .= '</tr><tr>';
         $wType->selected = $this->pcm_type;
         $ret .= "<td> Type de poste </td>";
         $ret .= '<td>' . $wType->input() . '</td>';
         $ret .= "</TR> </TABLE>";
         $ret .= dossier::hidden();
         return $ret;
     }
 }
Beispiel #8
0
     echo '<TR> ';
     if ($i == 0) {
         echo '<TD class="num"> <B> Journal </B> </TD>';
     } else {
         echo "<TD></TD>";
     }
     echo "<TD class=\"num\"> {$l_line['jrn_def_name']} </TD>";
     $jrn_priv->name = 'jrn_act' . $l_line['jrn_def_id'];
     $jrn_priv->value = $array;
     if ($admin != 1) {
         $jrn_priv->selected = $sec_User->get_ledger_access($l_line['jrn_def_id']);
     } else {
         $jrn_priv->selected = 'W';
     }
     echo '<td>';
     echo $jrn_priv->input();
     echo '</td>';
     echo '</tr>';
 }
 echo '</table>';
 echo '</fieldset>';
 //**********************************************************************
 // Show Priv. for actions
 //**********************************************************************
 echo '<fieldset> <legend>Actions </legend>';
 include 'template/security_list_action.php';
 echo '</fieldset>';
 echo HtmlInput::button('Imprime', 'imprime', "onclick=\"window.open('" . $sHref . "');\"");
 echo HtmlInput::submit('ok', 'Sauve');
 echo HtmlInput::reset('Annule');
 echo $return;
 function display_form($p_string = '')
 {
     $r = parent::display_form($p_string);
     // show the second plan
     $r .= '<span style="padding:5px;margin:5px;border:2px double  blue;display:block;">';
     $plan = new Anc_Plan($this->db);
     $plan_id = new ISelect("pa_id2");
     $plan_id->value = $this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name");
     $plan_id->selected = $this->pa_id2;
     $r .= "Plan Analytique :" . $plan_id->input();
     $r .= HtmlInput::request_to_hidden(array('ac'));
     $poste = new IText();
     $poste->size = 10;
     $r .= "Entre le poste " . $poste->input("from_poste2", $this->from_poste2);
     $choose = new IButton();
     $choose->name = "Choix Poste";
     $choose->label = _("Recherche");
     $choose->javascript = "onClick=search_ca(" . dossier::id() . ",'from_poste2','pa_id2')";
     $r .= $choose->input();
     $r .= " et le poste " . $poste->input("to_poste2", $this->to_poste2);
     $choose->javascript = "onClick=search_ca(" . dossier::id() . ",'to_poste2','pa_id2')";
     $r .= $choose->input();
     $r .= '<span class="notice" style="display:block">' . _('Selectionnez le plan qui vous int&eacute;resse avant de cliquer sur Recherche') . '</span>';
     $r .= '</span>';
     $r .= HtmlInput::submit('Affiche', _('Rechercher'));
     return $r;
 }
Beispiel #10
0
    ?>
            <?php 
    echo HtmlInput::hidden('p_order', 10);
    ?>
            <?php 
    echo HtmlInput::hidden('me_code_dep', '');
    ?>
            <?php 
    echo HtmlInput::hidden('p_type', 'PR');
    ?>
            <?php 
    echo HtmlInput::hidden('add_impress', 1);
    ?>
            <table>
                <tr>
                    <td><?php 
    echo _("Code");
    ?>
</td>
                    <td><?php 
    echo $me_code->input();
    ?>
</td>
                </tr>

            </table>
            <?php 
    echo HtmlInput::submit('add_impressbt', _("Valider"));
    echo '</form>';
    return;
}
Beispiel #11
0
Ce code n'est là QUE pour expliquer le concept
*/
// se connecter au dossier courant
$cn = new Database(dossier::id());
// dans extension.php on vérifie la sécurité, en ajoutez une ici n'est en général
// pas nécessaire
// Ce form permet de choisir dans quel cat de fiche je veux intégrer les
// enregistrements.
echo '<form METHOD="get" action="extension.php">';
echo dossier::hidden();
// Ceci vous permet de revenir ici (voir extension.php)
echo HtmlInput::extension();
echo "Choix de la catégorie de fiche";
$select_cat = new ISelect('fd_id');
$select_cat->value = $cn->make_array('select fd_id,fd_label from fiche_def where frd_id=' . FICHE_TYPE_CLIENT);
echo $select_cat->input();
echo HtmlInput::submit('display_prop', 'Afficher les propriétés');
echo '</FORM>';
// on choisit d'afficher les propriétés avant de confirmer l'import
// get parce qu'on interroge
if (isset($_GET['display_prop'])) {
    $a = new Fiche($cn);
    $prop = $a->to_array($_GET['fd_id']);
    foreach ($prop as $key => $value) {
        echo "Index : {$key} valeur {$value} <br/>";
    }
    echo '<form method="POST" action="extension.php"  enctype="multipart/form-data">';
    echo dossier::hidden();
    echo HtmlInput::extension();
    echo HtmlInput::hidden('fd_id', $_GET['fd_id']);
    $file = new IFile('fichier_csv');
Beispiel #12
0
echo $select_actif->input();
?>
            </td>
        </tr>
        <tr>
            <td>
                <?php 
echo _('Type');
?>
            </td>
            <td>
                <?php 
$select_admin = new ISelect('Admin');
$select_admin->value = array(array('value' => 0, 'label' => _('Utilisateur normal')), array('value' => 1, 'label' => _('Administrateur')));
$select_admin->selected = $UserChange->admin;
echo $select_admin->input();
?>
            </td>
        </tr>
    </table>
    <input type="hidden" name="sbaction" id="sbaction" value="">
        <input type="Submit" class="button" NAME="SAVE" VALUE="Sauver les changements" onclick="$('sbaction').value='save';return confirm_box('user_detail_frm','Confirmer changement ?');">

        <input type="Submit"  class="button" NAME="DELETE" VALUE="Effacer" onclick="$('sbaction').value='delete';return confirm_box('user_detail_frm','Confirmer effacement ?');" >

</FORM>
<?php 
if ($UserChange->admin == 0) {
    ?>
        <!-- Show all database and rights -->
        <H2 class="info"> Accès aux dossiers</H2>
Beispiel #13
0
">
		<?php 
    echo dossier::hidden();
    $a = isset($_GET['query']) ? $_GET['query'] : "";
    printf(_('Recherche') . HtmlInput::filter_table("contact_tb", "0,1,2,3,4,5,6", 1));
    $sel_card = new ISelect('cat');
    $sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' . ' where  frd_id=' . FICHE_TYPE_CONTACT . ' order by fd_label ', 1);
    $sel_card->selected = isset($_GET['cat']) ? $_GET['cat'] : -1;
    $sel_card->javascript = ' onchange="submit(this);"';
    echo _('Catégorie :') . $sel_card->input();
    $sl_company = new ISelect("sel_company");
    $sl_company->value = $cn->make_array('select distinct ad_value,ad_value from fiche_detail as fd' . ' join fiche as f1 on (f1.f_id=fd.f_id) join fiche_def as fdf on (f1.fd_id=fdf.fd_id)
				where
				ad_id=' . ATTR_DEF_COMPANY . " and frd_id= " . FICHE_TYPE_CONTACT . ' order by 1', 1);
    $sl_company->selected = isset($_GET['sel_company']) ? $_GET['sel_company'] : '';
    echo _('Société :') . $sl_company->input();
    ?>
    	    <input type="submit" class="button" name="submit_query" value="<?php 
    echo _('recherche');
    ?>
">
    	    <input type="hidden" name="ac" value="<?php 
    echo $_REQUEST['ac'];
    ?>
">
    	</form>
        </div>
	<?php 
    $client = new contact($cn);
    $search = isset($_GET['query']) ? $_GET['query'] : "";
    $sql = "";
 /**
  * display screen to enter a new ledger
  */
 function input_new()
 {
     $retry = HtmlInput::default_value_post("sa", "");
     //            if ( $retry == "add") {
     $default_type = HtmlInput::default_value_post("p_jrn_type", -1);
     $previous_jrn_def_pj_pref = HtmlInput::default_value_post("jrn_def_pj_pref", "");
     $previous_p_description = HtmlInput::default_value_post("p_description", "");
     $previous_p_jrn_name = HtmlInput::default_value_post('p_jrn_name', '');
     $previous_p_jrn_type = HtmlInput::default_value_post("p_jrn_type", "");
     //            }
     global $g_user;
     $f_add_button = new ISmallButton('add_card');
     $f_add_button->label = _('Créer une nouvelle fiche');
     $f_add_button->tabindex = -1;
     $f_add_button->set_attribute('jrn', -1);
     $f_add_button->javascript = " this.jrn=-1;select_card_type({type_cat:4});";
     $str_add_button = "";
     if ($g_user->check_action(FICADD) == 1) {
         $str_add_button = $f_add_button->input();
     }
     $wSearch = new IPoste();
     $wSearch->table = 3;
     $wSearch->set_attribute('ipopup', 'ipop_account');
     $wSearch->set_attribute('account', 'p_jrn_class_deb');
     $wSearch->set_attribute('no_overwrite', '1');
     $wSearch->set_attribute('noquery', '1');
     $wSearch->name = "p_jrn_class_deb";
     $wSearch->size = 20;
     $search = $wSearch->input();
     // default for ACH
     $default_deb_purchase = $this->get_default_card('ACH', 'D');
     $default_cred_purchase = $this->get_default_card('ACH', 'C');
     // default for VEN
     $default_deb_sale = $this->get_default_card('VEN', 'D');
     $default_cred_sale = $this->get_default_card('VEN', 'C');
     // default for FIN
     $default_fin = $this->get_default_card("FIN", "");
     //default ods
     $default_ods = $this->get_default_card("ODS", "");
     /* construct all the hidden */
     $hidden = HtmlInput::hidden('p_jrn', -1);
     $hidden .= HtmlInput::hidden('p_action', 'jrn');
     $hidden .= HtmlInput::hidden('sa', 'add');
     $hidden .= dossier::hidden();
     $hidden .= HtmlInput::hidden('p_jrn_deb_max_line', 10);
     $hidden .= HtmlInput::hidden('p_ech_lib', 'echeance');
     /* properties of the ledger */
     $name = $previous_p_jrn_name;
     $code = "";
     $wType = new ISelect();
     $a_jrn = $this->db->make_array("select '-1',' -- " . _("choix du type de journal") . " -- ' union select jrn_type_id,jrn_desc from jrn_type");
     $wType->selected = '-1';
     $wType->value = $a_jrn;
     $wType->name = "p_jrn_type";
     $wType->id = "p_jrn_type_select_id";
     $wType->javascript = ' onchange="show_ledger_div()"';
     $wType->selected = $default_type;
     $type = $wType->input();
     $rcred = $rdeb = array();
     $wPjPref = new IText();
     $wPjPref->name = 'jrn_def_pj_pref';
     $wPjPref->value = $previous_jrn_def_pj_pref;
     $pj_pref = $wPjPref->input();
     $pj_seq = '';
     $last_seq = 0;
     $new = 1;
     $description = new ITextarea('p_description');
     $description->style = 'class="itextarea" style="margin:0px;"';
     $description->value = $previous_p_description;
     $str_description = $description->input();
     /* bank card */
     $qcode_bank = '';
     /* Numbering (only FIN) */
     $num_op = new ICheckBox('numb_operation');
     echo dossier::hidden();
     echo HtmlInput::hidden('ac', $_REQUEST['ac']);
     echo $hidden;
     $cn = $this->db;
     $min_row = new INum("min_row", MAX_ARTICLE);
     $min_row->prec = 0;
     require_once NOALYSS_INCLUDE . '/template/param_jrn.php';
 }
 /**
  *@brief return an html with a form to add a new middle of payment
  */
 public function blank()
 {
     //label
     $lib = new IText('mp_lib');
     $f_lib = $lib->input();
     $ledger_source = new ISelect('jrn_def_id');
     $ledger_source->value = $this->cn->make_array("select jrn_def_id,jrn_Def_name from\n                              jrn_def where jrn_def_type  in ('ACH','VEN') order by jrn_def_name");
     $f_source = $ledger_source->input();
     // type of card
     $tcard = new ISelect('mp_fd_id');
     $tcard->value = $this->cn->make_array('select fd_id,fd_label from fiche_def join fiche_def_ref ' . ' using (frd_id) where frd_id in (25,4) order by fd_label');
     $f_type_fiche = $tcard->input();
     $ledger_record = new ISelect('mp_jrn_def_id');
     $ledger_record->value = $this->cn->make_array("select jrn_def_id,jrn_Def_name from\n                              jrn_def where jrn_def_type  in ('ODS','FIN')");
     $f_ledger_record = $ledger_record->input();
     // the card
     $qcode = new ICard();
     $qcode->noadd = true;
     $qcode->name = 'mp_qcode';
     $list = $this->cn->make_list('select fd_id from fiche_def where frd_id in (25,4)');
     $qcode->typecard = $list;
     $qcode->dblclick = 'fill_ipopcard(this);';
     $f_qcode = $qcode->input();
     $msg = "Ajout d'un nouveau moyen de paiement";
     ob_start();
     require_once NOALYSS_INCLUDE . '/template/new_mod_payment.php';
     $r = ob_get_contents();
     ob_end_clean();
     return $r;
 }
$r .= td($start->input());
echo tr($r);
$end = new IDate('end');
$end->value = isset($_GET['end']) ? $_GET['end'] : $last_per->last_day();
$r = td(_('Date fin'));
$r .= td($end->input());
echo tr($r);
// type of lettering : all, lettered, not lettered
$sel = new ISelect('type_let');
$sel->value = array(array('value' => 0, 'label' => _('Toutes opérations')), array('value' => 1, 'label' => _('Opérations lettrées')), array('value' => 2, 'label' => _('Opérations NON lettrées')));
if (isset($_GET['type_let'])) {
    $sel->selected = $_GET['type_let'];
} else {
    $sel->selected = 1;
}
$r = td("Filtre ") . td($sel->input());
echo tr($r);
echo '</table>';
echo '<br>';
echo HtmlInput::submit("seek", _('Recherche'));
echo '</FORM>';
echo '</div>';
//if (! isset($_REQUEST['seek'])) exit;
echo '<hr>';
//--------------------------------------------------------------------------------
// record the data
//--------------------------------------------------------------------------------
if (isset($_POST['record'])) {
    $letter = new Lettering_Account($cn);
    $letter->save($_POST);
}
Beispiel #17
0
    function display_form($p_hidden = "")
    {
        /* if there is no analytic plan return */
        $pa = new Anc_Plan($this->db);
        if ($pa->count() == 0) {
            echo '<div class="content">';
            echo '<h2 class="error">' . _('Aucun plan défini') . '</h2>';
            echo '</div>';
            return;
        }
        $from = new IDate('from', 'from');
        $from->size = 10;
        $from->value = $this->from;
        $to = new IDate('to', 'to');
        $to->value = $this->to;
        $to->size = 10;
        $from_poste = new IAncCard('from_poste', 'from_poste');
        $from_poste->size = 10;
        $from_poste->plan_ctl = 'pa_id';
        $from_poste->value = $this->from_poste;
        $to_poste = new IAncCard('to_poste', 'to_poste');
        $to_poste->value = $this->to_poste;
        $to_poste->size = 10;
        $hidden = new IHidden();
        $r = dossier::hidden();
        $r .= $hidden->input("result", "1");
        $r .= HtmlInput::request_to_hidden(array('ac'));
        $r .= $p_hidden;
        $plan = new Anc_Plan($this->db);
        $plan_id = new ISelect("pa_id");
        $plan_id->value = $this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name");
        $plan_id->selected = $this->pa_id;
        $choose_from = new IButton();
        $choose_from->name = _("Choix Poste");
        $choose_from->label = _("Recherche");
        $choose_from->javascript = "onClick=search_ca(" . dossier::id() . ",'from_poste','pa_id')";
        $choose_to = new IButton();
        $choose_to->name = _("Choix Poste");
        $choose_to->label = _("Recherche");
        $choose_to->javascript = "onClick=search_ca(" . dossier::id() . ",'to_poste','pa_id')";
        $r .= HtmlInput::request_to_hidden(array('ac'));
        ob_start();
        ?>
<table>
    <tr>
        <td>
            <?php 
        echo _('Depuis');
        echo HtmlInput::infobulle(37);
        ?>
        </td>
        <td>
            <?php 
        echo $from->input();
        ?>
        </td>
    </tr>
    <tr>
        <td>
            <?php 
        echo _('Jusque');
        echo HtmlInput::infobulle(37);
        ?>
        </td>
        <td>
            <?php 
        echo $to->input();
        ?>
        </td>
    </tr>
    
</table>
<span style="padding:5px;margin:5px;display:block;">
    <?php 
        echo _("Plan Analytique :") . $plan_id->input();
        echo HtmlInput::infobulle(42);
        ?>
</span>

<?php 
        $r .= ob_get_clean();
        $r .= _("Entre l'activité ") . $from_poste->input();
        $r .= $choose_from->input();
        $r .= _(" et l'activité ") . $to_poste->input();
        $r .= $choose_to->input();
        $r .= '</span>';
        return $r;
    }
echo _("Impression");
?>
        </li>
        <li>
            <?php 
$radio->value = "ST";
$radio->selected = false;
echo $radio->input();
?>
            <?php 
echo _("Changement des états");
?>
            <?php 
$etat = new ISelect('ag_state');
$etat->value = $cn->make_array('select s_id,s_value from document_state order by s_value');
echo $etat->input();
?>
        </li>
        <li>
            <?php 
$radio->value = "ETIADD";
echo $radio->input();
?>
            <?php 
echo _("Ajout d'étiquettes");
?>
            <?php 
echo Tag::button_search('add');
?>
            <?php 
echo Tag::add_clear_button('add');
Beispiel #19
0
$iperiode = new Periode($cn);
list($first, $last) = $iperiode->get_limit($exercice);
$periode_start = new IDate('start');
$periode_end = new IDate('end');
$periode_start->value = isset($_GET['start']) ? $_GET['start'] : $first->first_day();
$periode_end->value = isset($_GET['end']) ? $_GET['end'] : $last->last_day();
$str_start = $periode_start->input();
$str_end = $periode_end->input();
/* histo ou summary */
$histo = new ISelect('histo');
$histo->value = array(array('value' => -1, 'label' => _('Liste')), array('value' => 0, 'label' => _('Historique')), array('value' => 1, 'label' => _('Historique Lettré')), array('value' => 6, 'label' => _('Historique Lettré et montants différents')), array('value' => 2, 'label' => _('Historique non Lettré')), array('value' => 3, 'label' => _('Résumé')), array('value' => 4, 'label' => _('Balance')), array('value' => 6, 'label' => _('Balance âgée')), array('value' => 7, 'label' => _('Balance âgée en-cours')), array('value' => 5, 'label' => _('Balance non soldée')));
$histo->javascript = 'onchange="if (this.value==3 || this.value==-1) {
                   g(&quot;trstart&quot;).style.display=&quot;none&quot;;g(&quot;trend&quot;).style.display=&quot;none&quot;;g(&quot;allcard&quot;).style.display=&quot;none&quot;;}
                   else  {g(&quot;trstart&quot;).style.display=&quot;&quot;;g(&quot;trend&quot;).style.display=&quot;&quot;;g(&quot;allcard&quot;).style.display=&quot;&quot;;}"';
$histo->selected = isset($_GET['histo']) ? $_GET['histo'] : -1;
$str_histo = $histo->input();
echo '<div class="content">';
echo '<FORM method="GET">';
echo dossier::hidden();
echo HtmlInput::hidden('ac', $_GET['ac']);
require_once NOALYSS_INCLUDE . '/template/impress_cat_card.php';
echo HtmlInput::submit('cat_display', _('Recherche'));
echo '</FORM>';
$search_card = new IText('card_search');
$search_card_js = sprintf('onclick="boxsearch_card(\'%d\')"', dossier::id());
?>
<div id="box_search_card">

		<?php 
echo _('Recherche de fiche');
?>
Beispiel #20
0
 $r = '';
 $r .= td(HtmlInput::hidden('ad_id[]', $row->get_parameter('id')) . $row->get_parameter('id'));
 $select_type->selected = $row->get_parameter('type');
 $desc->value = $row->get_parameter('desc');
 $size->value = $row->get_parameter('size');
 $extra->value = $row->get_parameter('extra');
 $remove = new IButton('rmfa' . $e);
 $remove->label = _('Effacer');
 if ($row->get_parameter('id') >= 9000) {
     $select_type->readOnly = false;
     $desc->readOnly = false;
     $size->readOnly = false;
     $extra->readOnly = false;
     $desc->style = ' class="input_text" ';
     $r .= td($desc->input());
     $r .= td($select_type->input());
     $r .= td($size->input());
     $r .= td($extra->input());
     $remove->javascript = sprintf('confirm_box(\'tb_rmfa\',\'Vous  confirmez ?\',function() { removeCardAttribut(%d,%d,\'tb_rmfa\',$(\'rmfa%d\') );})', $row->get_parameter('id'), $gDossier, $e);
     $msg = '<span class="notice">' . _("Attention : effacera les données qui y sont liées") . ' </span>';
     $r .= td($remove->input() . $msg);
 } else {
     $select_type->readOnly = true;
     $desc->readOnly = true;
     $size->readOnly = true;
     $extra->readOnly = true;
     $r .= td($desc->input() . HtmlInput::hidden('type[]', ''));
     $r .= td($select_type->input());
     $r .= td($size->input());
     $r .= td($extra->input());
     $r .= td("");
Beispiel #21
0
 static function test_me()
 {
     require_once NOALYSS_INCLUDE . '/class_iselect.php';
     $select = new ISelect('a');
     $select->value = array(array('value' => 0, 'label' => 'Première valeur'), array('value' => 0, 'label' => 'Première valeur'), array('value' => 0, 'label' => 'Première valeur'));
     for ($e = 0; $e < 5; $e++) {
         echo $select->input();
         if ($e % 10 == 0) {
             echo '<hr>';
         }
     }
     $a = new IPopup('pop1');
     $a->value = "";
     for ($e = 0; $e < 500; $e++) {
         $a->value .= "<p>Il etait une fois dans  un pays vraiment lointain où même plus loin que ça</p>";
     }
     echo $a->input();
     echo '
     <input type="button" onclick="hide(\'pop1\');hide(\'pop1_border\')" value="cacher">
                                  <input type="button" onclick="showIPopup(\'pop1\')" value="montrer">
           ';
     $a = new IPopup('pop2');
     $a->value = '';
     $a->title = "Retrouvez une saucisse";
     echo $a->input();
     echo '
     <input type="button" onclick="hide(\'pop2\');hide(\'pop2_border\')" value="cacher">
                     <input type="button" onclick="showIPopup(\'pop2\')" value="montrer">
           ';
 }
Beispiel #22
0
    $hid->name = "ac";
    $hid->value = $_REQUEST['ac'];
    echo $hid->input();
    $hid->name = "see";
    $hid->value = "";
    echo $hid->input();
    $w = new ISelect();
    $w->name = "p_periode";
    // filter on the current year
    $filter_year = " where p_exercice='" . $g_user->get_exercice() . "'";
    $periode_start = $cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode {$filter_year} order by  p_start,p_end", 1);
    $g_user = new User($cn);
    $current = isset($_GET['p_periode']) ? $_GET['p_periode'] : $g_user->get_periode();
    $w->value = $periode_start;
    $w->selected = $current;
    echo _('Filtrer par période') . ":" . $w->input() . HtmlInput::submit('gl_submit', 'Valider') . '</form>';
    echo '<hr>';
    echo '<div class="content" >';
    echo $a->html_table($current);
    echo '</div>';
    return;
}
if (isset($_POST['save'])) {
    // record the operation and exit
    // and exit
    //-----------------------------
    echo '<div class="redcontent" >' . _('Opération sauvée');
    $a = new Anc_Group_Operation($cn);
    $a->get_from_array($_POST);
    $a->save();
    echo $a->show();
Beispiel #23
0
 */
$date_start = HtmlInput::default_value_get('p_date_start', '01.01.' . $g_user->get_exercice());
$w_date_start = new IDate('p_date_start', $date_start);
$w_select = new ISelect('p_type');
$w_select->value = array(array('value' => 'C', 'label' => _('Client')), array('value' => 'F', 'label' => _('Fournisseur')));
$w_select->selected = HtmlInput::default_value_get('p_type', 'C');
$w_lettre = new ISelect('p_let');
$w_lettre->value = array(array('value' => 'let', 'label' => _('lettrées et non lettrées')), array('value' => 'unlet', 'label' => _('non lettrées')));
$w_lettre->selected = HtmlInput::default_value_get('p_let', 'unlet');
?>
<form method="GET">
    <?php 
echo HtmlInput::request_to_hidden(array('gDossier', 'ac'));
?>
    <?php 
printf(_(' Opérations après la date %s qui sont %s '), $w_date_start->input(), $w_lettre->input());
?>
 
   <?php 
echo _("Type de tiers") . " " . $w_select->input();
?>
   <?php 
echo HtmlInput::submit("view", _('Valider'));
?>
</form>

<?php 
if (!isset($_GET['view'])) {
    html_page_stop();
    return;
}
Beispiel #24
0
echo "<tr>" . td(_('Nom société'), 'style="text-align:right"') . $all->input("p_name", $my->MY_NAME) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Téléphone"), 'style="text-align:right"') . $all->input("p_tel", $my->MY_TEL) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Fax"), 'style="text-align:right"') . $all->input("p_fax", $my->MY_FAX) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Rue "), 'style="text-align:right"') . $all->input("p_street", $my->MY_STREET) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Numéro"), 'style="text-align:right"') . $all->input("p_no", $my->MY_NUMBER) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Code Postal"), 'style="text-align:right"') . $all->input("p_cp", $my->MY_CP) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Commune"), 'style="text-align:right"') . $all->input("p_Commune", $my->MY_COMMUNE) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Pays"), 'style="text-align:right"') . $all->input("p_pays", $my->MY_PAYS) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Numéro de Tva"), 'style="text-align:right"') . $all->input("p_tva", $my->MY_TVA) . "</tr>";
echo "<tr>" . td(_("Utilisation de la compta. analytique"), 'style="text-align:right"') . $compta->input("p_compta", $array) . "</tr>";
echo "<tr>" . td(_("Utilisation des stocks"), 'style="text-align:right"') . $stock->input() . "</tr>";
echo "<tr>" . td(_("Utilisation du mode strict "), 'style="text-align:right"') . $strict->input("p_strict", $strict_array) . "</tr>";
echo "<tr>" . td(_("Assujetti à la tva"), 'style="text-align:right"') . $tva_use->input("p_tva_use", $strict_array) . "</tr>";
echo "<tr>" . td(_("Suggérer le numéro de pièce justificative"), 'style="text-align:right"') . $pj_suggest->input("p_pj", $strict_array) . "</tr>";
echo "<tr>" . td(_("Suggérer la date"), 'style="text-align:right"') . $date_suggest->input("p_date_suggest", $strict_array) . "</tr>";
echo '<tr>' . td(_('Afficher la période comptable pour éviter les erreurs de date'), 'style="text-align:right"') . $check_periode->input('p_check_periode', $strict_array) . '</tr>';
echo '<tr>' . td(_('Utilisez des postes comptables alphanumérique'), 'style="text-align:right"') . $alpha_num->input('p_alphanum') . '</tr>';
echo '<tr>' . td(_('Changer le libellé des détails'), 'style="text-align:right"') . $updlab->input('p_updlab') . '</tr>';
echo "</table>";
echo HtmlInput::submit("record_company", _("Sauve"));
echo "</form>";
echo '</div>';
return;
 function show_button()
 {
     $select = new ISelect();
     $value = $this->db->make_array("select od_id,od_name from op_predef " . " where jrn_def_id=" . $this->p_jrn . " and od_direct ='" . $this->od_direct . "'" . " order by od_name");
     if (empty($value) == true) {
         return "";
     }
     $select->value = $value;
     $r = $select->input("pre_def");
     return $r;
 }
Beispiel #26
0
$iselect->value = array(array("value" => '', "label" => _("Tout")), array("value" => 'ME', "label" => _("Menu")), array("value" => 'PR', "label" => _("Impression")), array("value" => 'PL', "label" => _("Extension / Plugin")), array("value" => 'SP', "label" => _("Valeurs spéciales")));
$iselect->selected = isset($_REQUEST['p_type']) ? $_REQUEST['p_type'] : '';
$sql = "";
if ($iselect->selected != '') {
    $sql = "where me_type='" . sql_string($_REQUEST['p_type']) . "'  ";
}
$menu = new Menu_Ref_sql($cn);
$ret = $menu->seek($sql . $order);
?>
<fieldset><legend><?php 
echo _('Recherche');
?>
</legend>
<form method="GET">
	<?php 
echo $iselect->input();
?>
	<?php 
echo HtmlInput::submit("search", _("Recherche"));
?>
	<?php 
echo HtmlInput::request_to_hidden(array('ac', 'gDossier', 'ord'));
?>
</form>
     <?php 
echo _('Filtre'), HtmlInput::filter_table('menu_tb', '0,1,2,4', '1');
?>
</fieldset>
<?php 
$gDossier = Dossier::id();
echo HtmlInput::button("Add_plugin", _("Ajout d'un plugin"), "onclick=add_plugin({$gDossier})");
 function display_form_plan($p_array, $p_null, $p_mode, $p_seq, $p_amount, $p_id = '', $p_add_button = true)
 {
     if ($p_array != null) {
         extract($p_array);
     }
     $result = "";
     $plan = new Anc_Plan($this->db);
     $a_plan = $plan->get_list(" order by pa_id ");
     if (empty($a_plan)) {
         return "";
     }
     $table_id = "t" . $p_seq;
     $hidden = new IHidden();
     $readonly = $p_mode == 1 ? false : true;
     $result .= $hidden->input('amount_' . $table_id, $p_amount);
     if ($p_mode == 1) {
         $result .= '<table id="' . $p_id . $table_id . '">';
     } else {
         $result .= '<table>';
     }
     $result .= "<tr>" . $plan->header() . "<th>montant</th></tr>";
     /* compute the number of rows */
     $nb_row = isset($val[$p_seq]) ? count($val[$p_seq]) : 1;
     $count = 0;
     $remain = abs($p_amount);
     $ctrl_remain = "remain" . $this->in_div . $table_id;
     for ($i = 0; $i < $nb_row; $i++) {
         $result .= '<tr>';
         foreach ($a_plan as $r_plan) {
             $array = $this->db->make_array("select po_id as value," . " html_quote(po_name) as label from poste_analytique " . " where pa_id = " . $r_plan['id'] . " order by po_name", $p_null);
             $select = new ISelect("hplan[" . $p_seq . "][]", $array);
             $select->table = 0;
             // view only or editables
             if ($p_mode == 1) {
                 // editable
                 $select->readonly = false;
                 if (isset($hplan) && isset($hplan[$p_seq][$count])) {
                     $select->selected = $hplan[$p_seq][$count];
                 }
             } else {
                 if (isset($hplan) && isset($hplan[$p_seq][$count])) {
                     $select->selected = $hplan[$p_seq][$count];
                 }
                 // view only
                 $select->readOnly = true;
             }
             if ($p_mode == 1) {
                 $result .= '<td>' . $select->input() . '</td>';
             } else {
                 $result .= '<td>' . $select->display() . '</td>';
             }
             $count++;
         }
         $value = new INum();
         $value->javascript = 'onchange="format_number(this);anc_refresh_remain(\'' . $this->in_div . $table_id . '\',\'' . $p_seq . '\')"';
         $value->name = "val[" . $p_seq . "][]";
         $value->size = 6;
         $value->value = isset($val[$p_seq][$i]) ? $val[$p_seq][$i] : abs($p_amount);
         $value->readOnly = $p_mode == 1 ? false : true;
         $remain = bcsub($remain, $value->value);
         $result .= '<td>' . $value->input() . '</td>';
         $result .= "</tr>";
     }
     $result .= "</table>";
     if ($p_add_button && $p_mode == 1) {
         $style_remain = $remain == 0 ? 'style="color:green"' : ' style="color:red"';
         $result .= " Reste à imputer =  " . '<span class="remain" ' . $style_remain . ' id="' . $ctrl_remain . '">' . $remain . '</span>';
         // add a button to add a row
         $button = new IButton();
         $button->javascript = "add_row('" . $p_id . "{$table_id}',{$p_seq});";
         $button->name = "js" . $p_id . $p_seq;
         $button->label = _("Nouvelle ligne");
         $result .= "<br>" . $button->input();
         /**
          * Add a button for distribution key
          * 
          */
         $ledger = HtmlInput::default_value_post("p_jrn", 0);
         if ($ledger == 0) {
             $ledger = $this->db->get_value('select j_jrn_def from jrnx where j_id=$1', array($this->j_id));
         }
         $gDossier = Dossier::id();
         $button_key = new IButton();
         $button_key->javascript = "anc_key_choice(" . $gDossier . ",'" . $p_id . "{$table_id}',{$p_amount},'" . $ledger . "');";
         $button_key->name = "js" . $p_id . $p_seq;
         $button_key->label = _("Clef");
         $result .= $button_key->input();
     }
     return $result;
 }
$all->disabled = false;
$all->selected = isset($_REQUEST['poste_fille']) ? true : false;
echo $all->input("poste_fille");
echo '</TD></TR><TR><TD>';
$detail = new ICheckBox();
$detail->label = "D&eacute;tail des op&eacute;rations";
$detail->disabled = false;
$detail->selected = isset($_REQUEST['oper_detail']) ? true : false;
echo $detail->input("oper_detail");
echo '</td></tr>';
$a_let = array(array('value' => 0, 'label' => 'Toutes les opérations'), array('value' => 1, 'label' => ' Opérations lettrées'), array('value' => 2, 'label' => ' Opérations non lettrées'));
echo '</TABLE>';
$salet = new ISelect('ople');
$salet->value = $a_let;
$salet->selected = isset($_GET['ople']) ? $_GET['ople'] : 0;
echo $salet->input();
print HtmlInput::submit('bt_html', 'Visualisation');
echo '</FORM>';
echo '<hr>';
echo '</div>';
//-----------------------------------------------------
// If print is asked
// First time in html
// after in pdf or cvs
//-----------------------------------------------------
if (isset($_REQUEST['bt_html'])) {
    if (isDate($_REQUEST['from_periode']) == null || isDate($_REQUEST['to_periode']) == null) {
        echo alert(_('Date malformée, désolée'));
        return;
    }
    require_once NOALYSS_INCLUDE . '/class_acc_account_ledger.php';
Beispiel #29
0
</td>
</tr>
<tr>
<td>
<?php 
echo _("Affectation");
?>
</td>
<td>
<?php 
$waffect = new ISelect();
$waffect->name = 'md_affect';
$waffect->value = array(array('value' => 'ACH', 'label' => _('Uniquement journaux achat')), array('value' => 'VEN', 'label' => _('Uniquement journaux vente')), array('value' => 'GES', 'label' => _('Partie gestion')));
$waffect->selected = $doc->md_affect;
echo $waffect->input();
?>
</td>
</tr>
<tr>

<tr>
<td>
<?php 
echo _("Fichier");
$s = dossier::get();
echo '<A HREF="show_document_modele.php?md_id=' . $doc->md_id . '&' . $s . '">(fichier actuel)</a>';
?>
</td>
<td>
<?php 
Beispiel #30
0
 /**
  * @brief zoom the calendar
  */
 function zoom_calendar($notitle)
 {
     global $g_user;
     $exercice_user = $g_user->get_exercice();
     /* day */
     $cell = array();
     for ($i = 0; $i < 42; $i++) {
         $cell[$i] = "";
     }
     $this->set_month_year();
     /* weekday */
     $week = array(_('Dimanche'), _('Lundi'), _('Mardi'), _('Mercredi'), _('Jeudi'), _('Vendredi'), _('Samedi'));
     $this->fill_from_action($cell, "long");
     $this->fill_from_todo($cell, "long");
     $wMonth = new ISelect('per_div');
     $cn = new Database(dossier::id());
     $wMonth->value = $cn->make_array("select p_id,to_char(p_start,'MM/YYYY') from parm_periode where p_exercice = '{$exercice_user}' order by p_start");
     $wMonth->selected = $this->default_periode;
     $wMonth->javascript = sprintf("onchange=calendar_zoom({gDossier:%d,invalue:'%s',outvalue:'%s',distype:'%s',notitle:%d})", dossier::id(), 'per_div', 'calendar_zoom_div', 'cal', $notitle);
     $wMonth->set_attribute('gDossier', dossier::id());
     $month_year = $wMonth->input() . $wMonth->get_js_attr();
     ob_start();
     $zoom = 1;
     $notitle = HtmlInput::default_value_get('notitle', 0);
     require_once NOALYSS_INCLUDE . '/template/calendar.php';
     if (count($this->action_div) > 0) {
         foreach ($this->action_div as $day) {
             echo $day;
         }
     }
     $ret = ob_get_contents();
     ob_end_clean();
     return $ret;
 }