示例#1
0
     echo '</form>';
     $content = ob_get_clean();
     $status = 'OK';
 } else {
     if ($op == 'modele_drop') {
         // ask to confirm the removal a folder
         $cn = new Database();
         $name = $cn->get_value('select mod_name from modeledef where mod_id=$1', array($dossier));
         ob_start();
         echo HtmlInput::title_box(_('Efface'), 'folder_admin_div');
         echo '<form  action="admin_repo.php" method="post">';
         echo HtmlInput::hidden('m', $dossier);
         echo HtmlInput::hidden('sa', 'remove');
         echo HtmlInput::hidden('action', 'modele_mgt');
         echo '<h2 class="error">' . _('Etes vous sure et certain de vouloir effacer ') . $name . ' ?</h2>';
         $confirm = new ICheckBox();
         $confirm->name = "p_confirm";
         echo '<p>';
         echo _('Cochez la case si vous êtes sûr de vouloir effacer ce modèle');
         echo $confirm->input();
         echo '</p>';
         echo '<p style="text-align:center">';
         echo HtmlInput::submit('remove', 'Effacer');
         echo '</p>';
         echo '</form>';
         $content = ob_get_clean();
         $status = 'OK';
     } else {
         if ($op == 'modele_modify') {
             // Modify the description or the name of a template
             $cn = new Database();
示例#2
0
}
require_once NOALYSS_INCLUDE . '/class_database.php';
require_once NOALYSS_INCLUDE . '/class_fiche.php';
require_once NOALYSS_INCLUDE . '/class_lettering.php';
$gDossier = dossier::id();
$cn = new Database($gDossier);
global $g_user, $g_failed;
/**
 * Show first the form
 */
/* category */
$categorie = new ISelect('cat');
$categorie->value = $cn->make_array('select fd_id,fd_label from fiche_def order by fd_label');
$categorie->selected = isset($_GET['cat']) ? $_GET['cat'] : 0;
$str_categorie = $categorie->input();
$icall = new ICheckBox("allcard", 1);
$icall->selected = isset($_GET['allcard']) ? 1 : 0;
$str_icall = $icall->input();
/* periode */
$exercice = $g_user->get_exercice();
$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')));
?>
		</th>
	</tr>
<?php 
for ($i = 0; $i < $limit; $i++) {
    ?>
	<?php 
    $class = $i % 2 == 0 ? ' class="odd" ' : ' class="even"';
    ?>
	<tr  <?php 
    echo $class;
    ?>
>
		<td>
			<?php 
    $ck = new ICheckBox('ag_id[]');
    $ck->value = $a_row[$i]['ag_id'];
    echo $ck->input();
    ?>
		</td>
		<td >
			<?php 
    echo h($a_row[$i]['my_date']);
    ?>
		</td>
		<td>
			<?php 
    echo h($a_row[$i]['ag_ref']);
    ?>
		</td>
		<td>
示例#4
0
 /**
  *create a hidden plus button to select the cat of ledger
  *@note the selected value is stored in the array p_cat
  */
 static function select_cat($array_cat)
 {
     ob_start();
     $ledger = new ISmallButton('l');
     $ledger->label = _("Catégorie");
     $ledger->javascript = " show_cat_choice()";
     echo $ledger->input();
     /* create a hidden div for the ledger */
     echo '<div id="div_cat">';
     echo '<h2 class="info">' . _('Choix des categories') . '</h2>';
     $selected = isset($_GET['r_cat']) ? $_GET['r_cat'] : null;
     echo '<ul>';
     for ($e = 0; $e < count($array_cat); $e++) {
         $row = $array_cat[$e];
         $re = new ICheckBox('r_cat[' . $e . ']', $row['cat']);
         if ($selected != null && isset($selected[$e])) {
             $re->selected = true;
         }
         echo '<li style="list-style-type: none;">' . $re->input() . $row['name'] . '(' . $row['cat'] . ')</li>';
     }
     echo '</ul>';
     $hide = new IButton('l2');
     $hide->label = _("Valider");
     $hide->javascript = " hide_cat_choice() ";
     echo $hide->input();
     echo '</div>';
     $r = ob_get_contents();
     ob_end_clean();
     return $r;
 }
示例#5
0
 function input_base()
 {
     $r = "";
     $r .= _('Label');
     $label = new IText('label', $this->label);
     $r .= $label->input();
     $r .= '<br>';
     /* the accounting item */
     $class_base = new IPoste('class_base', $this->class_base);
     $class_base->set_attribute('ipopup', 'ipop_account');
     $class_base->set_attribute('account', 'class_base');
     $class_base->set_attribute('label', 'acc_label');
     $fd_description = new ITextarea('fd_description', $this->fd_description);
     $fd_description->width = 80;
     $fd_description->heigh = 4;
     $fd_description->style = 'class="itextarea" style="margin-left:0px;vertical-align:text-top"';
     $r .= _('Poste Comptable de base') . ' : ';
     $r .= $class_base->input();
     $r .= '<span id="acc_label"></span><br>';
     $r .= '<br/>';
     $r .= " Description " . $fd_description->input();
     /* auto Create */
     $r .= '<br/>';
     $ck = new ICheckBox('create');
     $ck->selected = $this->create_account == 'f' ? false : true;
     $r .= _('Chaque fiche aura automatiquement son propre poste comptable : ');
     $r .= $ck->input();
     return $r;
 }
示例#6
0
        $ame_code = $cn->make_array("\nselect me_code,me_code||' '||coalesce(me_menu,'')||' '||coalesce(me_description,'')\n\t||'('|| case when me_type='SP' then 'Special'\n\t\twhen me_type='PL' then 'Plugin'\n\t\twhen me_type='ME' and me_file is null and me_javascript is null and me_url is null then 'Module - Menu principal'\n\t\twhen me_type='ME' then 'Menu'\n\t\telse\n\t\tme_type\n\t\tend||')'\n\tfrom\n\tmenu_ref\n        where\n        me_type<>'PR'\n\torder by 1\n\t");
    } elseif ($p_level == 1) {
        // dependency is in dep
        // Menu which can be added
        $ame_code = $cn->make_array("\nselect me_code,me_code||' '||coalesce(me_menu,'')||' '||coalesce(me_description,'')\n\t||'('|| case when me_type='SP' then 'Special'\n\t\twhen me_type='PL' then 'Plugin'\n\t\twhen me_type='ME' and me_file is null and me_javascript is null and me_url is null then 'Module - Menu principal'\n\t\twhen me_type='ME' then 'Menu'\n\t\telse\n\t\tme_type\n\t\tend||')'\n\tfrom\n\tmenu_ref\n        where\n        me_type<>'PR'\n\torder by 1\n\t");
    } elseif ($p_level == 2) {
        // menu can *NOT* have submenu
        // Menu which can be added
        $ame_code = $cn->make_array("\nselect me_code,me_code||' '||coalesce(me_menu,'')||' '||coalesce(me_description,'')\n\t||'('|| case when me_type='SP' then 'Special'\n\t\twhen me_type='PL' then 'Plugin'\n\t\twhen me_type='ME' and me_file is null and me_javascript is null and me_url is null then 'Module - Menu principal'\n\t\twhen me_type='ME' then 'Menu'\n\t\telse\n\t\tme_type\n\t\tend||')'\n\tfrom\n\tmenu_ref\n        where\n        me_type<>'PR' and\n       (\n          coalesce(me_file,'') <> '' or\n          coalesce(me_url,'') <> '' or\n          coalesce(me_javascript,'') <> ''\n        )\n\torder by 1\n\t");
    } else {
        throw new Exception('LEVEL ERROR');
    }
    $p_order = new INum("p_order", "10");
    $me_code = new ISelect('me_code');
    $me_code->value = $ame_code;
    $pm_default = new ICheckBox('pm_default');
    echo HtmlInput::title_box(_("Nouveau"), $ctl);
    ?>
    <form method="POST" id="menu_new_frm" onsubmit="return confirm_box('menu_new_frm','<?php 
    echo _('Vous confirmez');
    ?>
 ?')">
        <?php 
    echo HtmlInput::hidden('tab', 'profile_menu_div');
    ?>
        <?php 
    echo HtmlInput::hidden('p_id', $p_id);
    ?>
        <?php 
    echo HtmlInput::hidden('add_menu', 1);
    ?>
echo '</p>';
echo '<p>';
echo _('Filtre') . HtmlInput::infobulle(25);
echo HtmlInput::filter_table("t_rec_bk", "0,1,2,3", "1");
echo '</p>';
echo HtmlInput::submit('save', 'Mettre à jour le n° de relevé bancaire');
echo '<span style="display:block">';
echo '</span>';
echo '<table id="t_rec_bk" class="sortable" style="width:90%;margin-left:5%">';
$r = '<th class=" sorttable_sorted_reverse">' . 'Date ' . HtmlInput::infobulle(17) . '<span id="sorttable_sortrevind">&nbsp;&blacktriangle;</span>' . '</th>';
$r .= th('Libellé');
$r .= th('N° interne');
$r .= th('Montant', ' style="text-align:right"');
$r .= th('Selection', ' style="text-align:center" ');
echo tr($r);
$iradio = new ICheckBox('op[]');
$tot_not_reconcilied = 0;
$diff = 0;
for ($i = 0; $i < count($operation); $i++) {
    $row = $operation[$i];
    $r = '';
    $js = HtmlInput::detail_op($row['jr_id'], $row['jr_internal']);
    $r .= '<td sorttable_customkey="' . $row['raw_date'] . '">' . $row['fmt_date'] . '</td>';
    $r .= td($row['jr_comment']);
    $r .= td($js);
    $amount = $cn->get_value('select qf_amount from quant_fin where jr_id=$1', array($row['jr_id']));
    $r .= '<td class="num" class="sorttable_numeric" sorttable_customkey="' . $amount . '" style="text-align:right">' . nbm($amount) . '</td>';
    $diff = bcadd($diff, $amount);
    $tot_not_reconcilied += $row['jr_montant'];
    $iradio->value = $row['jr_id'];
    $iradio->selected = false;
示例#8
0
    ?>
        <?php 
    /*
     * Display only the last ac
     */
    $a_code = explode('/', $a_bookmark[$i]['b_action']);
    $idx = count($a_code);
    $code = $a_code[$idx - 1];
    ?>
        <tr class="<?php 
    echo $i % 2 == 0 ? 'odd' : 'even';
    ?>
">
            <td>
                <?php 
    $ch = new ICheckBox('book[]');
    $ch->value = $a_bookmark[$i]['b_id'];
    echo $ch->input();
    ?>
            </td>
            <td>
                <a class='mtitle' style='text-decoration: underline' href="<?php 
    echo $url . "&ac=" . $a_bookmark[$i]['b_action'];
    ?>
">
                <?php 
    echo $code;
    ?>
                </a>
            </td>
            <td>
示例#9
0
    ?>
</td>
        </tr>
        <tr>
    	<td  align="right">Poste comptable utilisés format :debit,credit</td>

    	<td> <?php 
    $w = new IText();
    $w->size = 20;
    echo $w->input('tva_poste', $tva_array[$index]['tva_poste']);
    ?>
</td>
        </Tr>
        <tr>
    	<td  align="right">Utilisé au débit et au crédit afin d'annuler cette tva </td>
    	<td> <?php 
    $w = new ICheckBox("both", $tva_array[$index]['tva_both_side']);
    $w->selected = $tva_array[$index]['tva_both_side'];
    $w->size = 20;
    echo $w->input('both', '');
    ?>
</td>
        </Tr>
    </table>
    <input type="submit" class="button" value="Confirme" name="confirm_mod">
    <input type="submit" class="button" value="Cancel" name="no">
    </FORM>
    </fieldset>
    <?php 
}
echo '</div>';
示例#10
0
    echo '<h2>' . _("Exercice") . " " . $g_user->get_exercice() . '</h2>';
    $a = isset($_GET['query']) ? $_GET['query'] : "";
    printf(_('Recherche') . ' <input class="input_text" type="text" name="query" value="%s">', $a);
    $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_FIN));
        $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);
    }
    $nooperation = new ICheckBox('noop');
    $nooperation->selected = isset($_GET['noop']) ? true : false;
    echo _('Inclure les banques sans opération :') . $nooperation->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 
    $supplier = new Bank($cn);
 function form($p_readonly = 0)
 {
     $wDate = new IDate("pdate", $this->date);
     $wDate->table = 1;
     $wDate->size = 10;
     $wDate->readonly = $p_readonly;
     $wDescription = new IText("pdesc");
     $wDescription->table = 0;
     $wDescription->size = 80;
     $wDescription->readonly = $p_readonly;
     // Show an existing operation
     //
     if (isset($this->a_operation[0])) {
         $wDate->value = $this->a_operation[0]->oa_date;
         $wDescription->value = $this->a_operation[0]->oa_description;
     }
     $ret = "";
     $ret .= '<table style="result"	>';
     $ret .= "<TR>" . $wDate->input() . "</tr>";
     $ret .= '<tr><td>Description</td>' . '<td colspan="3">' . $wDescription->input() . "</td></tr>";
     $Plan = new Anc_Plan($this->db);
     $aPlan = $Plan->get_list();
     $max = count($this->a_operation) < $this->nMaxRow ? $this->nMaxRow : count($this->a_operation);
     $ret .= '</table><table  id="ago" style="width: 100%;">';
     /* show 10 rows */
     $ret .= "<tr>";
     foreach ($aPlan as $d) {
         $idx = $d['id'];
         /* array of possible value for the select */
         $aPoste[$idx] = $this->db->make_array("select po_id as value," . " po_name||':'||coalesce(po_description,'-') as label " . " from poste_analytique " . " where pa_id = " . $idx . " order by po_name ");
         $ret .= "<th> Poste </th>";
     }
     $ret .= "<th></th>" . "<th> Montant</th>" . "<th>D&eacute;bit</th>" . "</tr>";
     for ($i = 0; $i < $max; $i++) {
         $ret .= "<tr>";
         foreach ($aPlan as $d) {
             $idx = $d['id'];
             // init variable
             $wSelect = new ISelect("pop" . $i . "plan" . $idx);
             $wSelect->value = $aPoste[$idx];
             $wSelect->size = 12;
             $wSelect->readOnly = $p_readonly;
             if (isset($this->a_operation[$i])) {
                 $wSelect->selected = $this->a_operation[$i]->po_id;
             }
             $ret .= td($wSelect->input());
         }
         $wAmount = new INum("pamount{$i}", 0.0);
         $wAmount->size = 12;
         $wAmount->table = 1;
         $wAmount->javascript = " onChange=format_number(this);caod_checkTotal()";
         $wAmount->readOnly = $p_readonly;
         $wDebit = new ICheckBox("pdeb{$i}");
         $wDebit->readOnly = $p_readonly;
         $wDebit->javascript = " onChange=caod_checkTotal()";
         if (isset($this->a_operation[$i])) {
             $wSelect->selected = $this->a_operation[$i]->po_id;
             $wAmount->value = $this->a_operation[$i]->oa_amount;
             $wDebit->value = $this->a_operation[$i]->oa_debit;
             if ($wDebit->value == 't') {
                 $wDebit->selected = true;
             }
         }
         // build the table
         $ret .= "<TD></TD>";
         $ret .= $wAmount->input();
         $ret .= td($wDebit->input());
         $ret .= "</tr>";
     }
     $ret .= "</table>";
     if ($p_readonly == false) {
         $add_row = new IButton('Ajouter');
         $add_row->label = _('Ajouter une ligne');
         $add_row->javascript = 'anc_add_row(\'ago\');';
         $ret .= HtmlInput::hidden('nbrow', $max);
         $ret .= $add_row->input();
     }
     return $ret;
 }
示例#12
0
 function display_form_periode()
 {
     $str_dossier = dossier::get();
     if ($this->jrn_def_id == 0) {
         $Res = $this->cn->exec_sql("select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,p_central,p_closed,p_exercice,\n                                     (select count(jr_id) as count_op from jrn where jr_tech_per = p_id) as count_op\n                                     from parm_periode\n                                     order by p_start,p_end");
         $Max = Database::num_row($Res);
         echo '<form id="periode_frm" method="POST" onsubmit="return confirm_box(this,\'Confirmez-vous la fermeture des périodes choisies ?\')" >';
         echo HtmlInput::array_to_hidden(array('ac', 'gDossier', 'jrn_def_id', 'choose'), $_REQUEST);
         echo '<TABLE ALIGN="CENTER">';
         echo "</TR>";
         echo '<th>' . ICheckBox::toggle_checkbox("per_toggle", "periode_frm") . "</th>";
         echo '<TH> Date d&eacute;but </TH>';
         echo '<TH> Date fin </TH>';
         echo '<TH> Exercice </TH>';
         echo "</TR>";
         for ($i = 0; $i < $Max; $i++) {
             $l_line = Database::fetch_array($Res, $i);
             $class = "even";
             if ($i % 2 == 0) {
                 $class = "odd";
             }
             $style = '';
             if ($l_line['p_closed'] == 't') {
                 $style = "color:red";
             }
             echo '<TR class="' . $class . '" style="' . $style . '">';
             echo '<td>';
             if ($l_line['p_closed'] == 'f') {
                 $per_to_close = new ICheckBox('sel_per_close[]');
                 $per_to_close->value = $l_line['p_id'];
                 echo $per_to_close->input();
             }
             echo '</td>';
             echo '<TD ALIGN="CENTER"> ' . $l_line['date_start'] . '</TD>';
             echo '<TD  ALIGN="CENTER"> ' . $l_line['date_end'] . '</TD>';
             echo '<TD  ALIGN="CENTER"> ' . $l_line['p_exercice'] . '</TD>';
             if ($l_line['p_closed'] == 't') {
                 $closed = $l_line['p_central'] == 't' ? '<TD>Centralis&eacute;e</TD>' : '<TD>Ferm&eacute;e</TD>';
                 $change = '<TD></TD>';
                 $remove = sprintf(_('Nombre opérations %d'), $l_line['count_op']);
                 $remove = td($remove, ' class="mtitle" ');
                 $change = td('<A class="mtitle" HREF="javascript:void(0)"' . ' onclick="return confirm_box(null,\'' . _('Confirmez Réouverture') . ' ?\',function() {window.location=\'do.php?ac=' . $_REQUEST['ac'] . '&action=reopen&p_per=' . $l_line['p_id'] . '&' . $str_dossier . '\';} )"> Réouverture</A>', ' class="mtitle"');
             } else {
                 if ($l_line['count_op'] == 0) {
                     $change = HtmlInput::display_periode($l_line['p_id']);
                 } else {
                     $change = "Non modifiable";
                 }
                 $change = td($change, ' class="mtitle" ');
                 $reopen = td("");
                 $remove = '<TD class="mtitle">';
                 if ($l_line['count_op'] == 0) {
                     $go = 'do.php?' . http_build_query(array('ac' => $_REQUEST['ac'], 'action' => 'delete_per', 'p_per' => $l_line['p_id'], 'gDossier' => Dossier::id()));
                     $remove .= '<A class="mtitle" HREF="javascript:void(0)" ' . 'onclick="return confirm_box (null,\'' . _('Confirmez effacement ?') . '\',function() { window.location=\'' . $go . '\'});" >' . ' Efface</A>';
                 } else {
                     $remove .= sprintf(_('Nombre opérations %d'), $l_line['count_op']);
                 }
                 $remove .= '</td>';
             }
             echo $change;
             echo $remove;
             echo '</TR>';
         }
         echo '</table>';
         echo '<p style="text-align:center">';
         echo HtmlInput::hidden("close_per", 1);
         echo HtmlInput::submit('close_per_bt', 'Fermeture des périodes sélectionnées');
         echo '</p>';
         echo '</form>';
         $but = new IButton('show_per_add', 'Ajout d\'une période');
         $but->javascript = "\$('periode_add_div').show();";
         echo $but->input();
         echo '<div class="inner_box" style="width:40%;" id="periode_add_div">';
         echo HtmlInput::title_box("Ajout d'une période", "periode_add_div", "hide");
         echo '<FORM  METHOD="POST">';
         echo dossier::hidden();
         $istart = new IDate('p_date_start');
         $iend = new IDate('p_date_end');
         $iexercice = new INum('p_exercice');
         $iexercice->size = 5;
         echo '<table>';
         echo '<TR> ';
         echo td('Date de début');
         echo td($istart->input());
         echo '</tr><tr>';
         echo td('Date de fin');
         echo td($iend->input());
         echo '</tr><tr>';
         echo td('Exercice');
         echo td($iexercice->input());
         echo '</TABLE>';
         echo HtmlInput::submit('add_per', 'Valider');
         echo '</FORM>';
         echo '</div>';
         echo create_script("\$('periode_add_div').hide();new Draggable('periode_add_div',{starteffect:function()\n                                  {\n                                     new Effect.Highlight(obj.id,{scroll:window,queue:'end'});\n                                  }}\n                         );");
     } else {
         $Res = $this->cn->exec_sql("select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,status,p_exercice\n                                     from parm_periode join jrn_periode using (p_id) where jrn_def_id=" . $this->jrn_def_id . "\n                                     order by p_start,p_end");
         $Max = Database::num_row($Res);
         $r = $this->cn->exec_sql('select jrn_Def_name from jrn_Def where jrn_Def_id=' . $this->jrn_def_id);
         $jrn_name = Database::fetch_result($r, 0, 0);
         echo '<h2> Journal ' . $jrn_name . '</h2>';
         echo '<form id="periode_frm" method="POST" onsubmit="return confirm_box(this,\'Confirmez-vous la fermeture des périodes choisies ?\')" >';
         echo HtmlInput::array_to_hidden(array('ac', 'gDossier', 'jrn_def_id', 'choose'), $_REQUEST);
         echo '<TABLE ALIGN="CENTER">';
         echo "</TR>";
         echo '<th>' . ICheckBox::toggle_checkbox("per_toggle", "periode_frm") . "</th>";
         echo '<TH> Date d&eacute;but </TH>';
         echo '<TH> Date fin </TH>';
         echo '<TH> Exercice </TH>';
         echo "</TR>";
         for ($i = 0; $i < $Max; $i++) {
             $l_line = Database::fetch_array($Res, $i);
             if ($l_line['status'] != 'OP') {
                 echo '<TR style="COLOR:RED">';
             } else {
                 echo '<TR>';
             }
             echo '<td>';
             if ($l_line['status'] == 'OP') {
                 $per_to_close = new ICheckBox('sel_per_close[]');
                 $per_to_close->value = $l_line['p_id'];
                 echo $per_to_close->input();
             }
             echo '</td>';
             echo '<TD ALIGN="CENTER"> ' . $l_line['date_start'] . '</TD>';
             echo '<TD  ALIGN="CENTER"> ' . $l_line['date_end'] . '</TD>';
             echo '<TD  ALIGN="CENTER"> ' . $l_line['p_exercice'] . '</TD>';
             $closed = "";
             if ($l_line['status'] != 'OP') {
                 $go = 'do.php?' . http_build_query(array('ac' => $_REQUEST['ac'], 'action' => 'reopen', 'p_per' => $l_line['p_id'], 'gDossier' => Dossier::id(), 'jrn_def_id' => $this->jrn_def_id));
                 $closed = td('<A class="mtitle" HREF="javascript:void(0)" ' . 'onclick="return confirm_box(null,\'' . _('Confirmez Réouverture') . ' ?\',function() {window.location=\'' . $go . '\';} );"> Réouverture</A>', ' class="mtitle"');
             }
             echo "{$closed}";
             echo '</TR>';
         }
         echo '</TABLE>';
         echo '<p style="text-align:center">';
         echo HtmlInput::submit('close_per', 'Fermeture des périodes sélectionnées');
         echo '</p>';
         echo '</form>';
     }
 }
示例#13
0
    $jrn = $cn->get_array('select kl_id,jrn_def_id,jrn_def_name,jrn_def_description 
                                            from jrn_def 
                                            left join key_distribution_ledger using (jrn_def_id)
                                            where kd_id=$1 or kd_id is null
                                            order by jrn_def_name ', array($this->key->getp('id')));
}
$post_jrn = HtmlInput::default_value_post("jrn", -1);
?>
                <table id="jrn_def_tb" class="result">
                    <?php 
for ($i = 0; $i < count($jrn); $i++) {
    ?>
                        <tr>
                            <td>
                                <?php 
    $checkbox = new ICheckBox("jrn[]");
    ?>
                                <?php 
    $checkbox->value = $jrn[$i]['jrn_def_id'];
    ?>
                                <?php 
    $checkbox->selected = false;
    if ($post_jrn == -1 && $jrn[$i]['kl_id'] != "" || is_array($post_jrn) && in_array($jrn[$i]['jrn_def_id'], $post_jrn)) {
        $checkbox->selected = true;
    }
    ?>
                                <?php 
    echo $checkbox->input();
    ?>
                            </td>
                            <td>
示例#14
0
 static function toggle_checkbox($p_name, $p_form)
 {
     $a = new ICheckBox($p_name);
     $a->javascript = 'onclick="toggle_checkbox(\'' . $p_form . '\')"';
     return $a->input();
 }
echo _("Extourne");
?>
"  onclick="unselect_other_tab(this.parentNode.parentNode);this.parentNode.className='tabs_selected';show_tabs(a_tab,'reverse_div_id')"> <?php 
echo _('Extourne');
?>
 </a></li>
</ul>
    <div id="modele_div_id">
        <?php 
echo Pre_operation::save_propose();
?>
    </div>
    <div id="reverse_div_id" style="display:none;height:185px;height:10rem">
    <?php 
$reverse_date = new IDate('reverse_date');
$reverse_ck = new ICheckBox('reverse_ck');
echo _('Extourne opération') . " " . $reverse_ck->input() . " ";
echo $reverse_date->input();
?>
    </div>
    <div id="document_div_id" style="display:none;height:185px;height:10rem">
      <?php 
$file = new IFile();
$file->table = 0;
echo '<p class="decale">';
echo _("Ajoutez une pièce justificative ");
echo $file->input("pj", "");
echo '</p>';
?>
    </div>
</div>
 function display($p_array)
 {
     global $g_parameter, $g_user;
     require_once NOALYSS_INCLUDE . '/class_acc_ledger.php';
     $legder = new Acc_Ledger($this->db, $this->jrn_def_id);
     $legder->nb = $legder->get_min_row();
     if ($p_array != null) {
         extract($p_array);
     }
     $add_js = "";
     $ret = "";
     if ($g_user->check_action(FICADD) == 1) {
         /* Add button */
         $f_add_button = new IButton('add_card');
         $f_add_button->label = _('Créer une nouvelle fiche');
         $f_add_button->set_attribute('ipopup', 'ipop_newcard');
         $f_add_button->set_attribute('jrn', $legder->id);
         $f_add_button->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);";
         $f_add_button->input();
     }
     $nb_row = isset($nb_item) ? $nb_item : $legder->nb;
     $ret .= HtmlInput::hidden('nb_item', $nb_row);
     $ret .= HtmlInput::hidden('p_jrn', $this->jrn_def_id);
     $ret .= dossier::hidden();
     $ret .= dossier::hidden();
     $ret .= HtmlInput::hidden('jrn_type', $legder->get_type());
     $info = HtmlInput::infobulle(0);
     $info_poste = HtmlInput::infobulle(9);
     if ($g_user->check_action(FICADD) == 1) {
         $ret .= $f_add_button->input();
     }
     $ret .= '<table id="quick_item" style="width:100%">';
     $ret .= '<tr>' . '<th style="text-align:left">Quickcode' . $info . '</th>' . '<th style="text-align:left">' . _('Poste') . $info_poste . '</th>' . '<th style="text-align:left">' . _('Libellé') . '</th>' . '<th style="text-align:left">' . _('Montant') . '</th>' . '<th style="text-align:left">' . _('Débit') . '</th>' . '</tr>';
     for ($i = 0; $i < $nb_row; $i++) {
         // Quick Code
         $quick_code = new ICard('qc_' . $i);
         $quick_code->set_dblclick("fill_ipopcard(this);");
         $quick_code->set_attribute('ipopup', 'ipopcard');
         // name of the field to update with the name of the card
         $quick_code->set_attribute('label', "ld" . $i);
         $quick_code->set_attribute('jrn', $legder->id);
         // name of the field to update with the name of the card
         $quick_code->set_attribute('typecard', 'filter');
         // Add the callback function to filter the card on the jrn
         $quick_code->set_callback('filter_card');
         $quick_code->set_function('fill_data');
         $quick_code->javascript = sprintf(' onchange="fill_data_onchange(\'%s\');" ', $quick_code->name);
         $quick_code->jrn = $legder->id;
         $quick_code->value = isset(${'qc_' . $i}) ? ${'qc_' . $i} : "";
         $label = '';
         if ($quick_code->value != '') {
             $Fiche = new Fiche($legder->db);
             $Fiche->get_by_qcode($quick_code->value);
             $label = $Fiche->strAttribut(ATTR_DEF_NAME);
         }
         // Account
         $poste = new IPoste();
         $poste->name = 'poste' . $i;
         $poste->set_attribute('jrn', $legder->id);
         $poste->set_attribute('ipopup', 'ipop_account');
         $poste->set_attribute('label', 'ld' . $i);
         $poste->set_attribute('account', 'poste' . $i);
         $poste->set_attribute('dossier', Dossier::id());
         $poste->value = isset(${'poste' . $i}) ? ${"poste" . $i} : '';
         $poste->dbl_click_history();
         if ($poste->value != '') {
             $Poste = new Acc_Account($legder->db);
             $Poste->set_parameter('value', $poste->value);
             $label = $Poste->get_lib();
         }
         // Description of the line
         $line_desc = new IText();
         $line_desc->name = 'ld' . $i;
         $line_desc->size = 30;
         $line_desc->value = isset(${"ld" . $i}) ? ${"ld" . $i} : $label;
         // Amount
         $amount = new INum();
         $amount->size = 10;
         $amount->name = 'amount' . $i;
         $amount->value = isset(${'amount' . $i}) ? ${"amount" . $i} : '';
         $amount->javascript = ' onChange="format_number(this);checkTotalDirect()"';
         // D/C
         $deb = new ICheckBox();
         $deb->name = 'ck' . $i;
         $deb->selected = isset(${'ck' . $i}) ? true : false;
         $deb->javascript = ' onChange="checkTotalDirect()"';
         $ret .= '<tr>';
         $ret .= '<td>' . $quick_code->input() . $quick_code->search() . '</td>';
         $ret .= '<td>' . $poste->input() . '<script> document.getElementById(\'poste' . $i . '\').onblur=function(){ if (trim(this.value) !=\'\') {document.getElementById(\'qc_' . $i . '\').value="";}}</script>' . '</td>';
         $ret .= '<td>' . $line_desc->input() . '</td>';
         $ret .= '<td>' . $amount->input() . '</td>';
         $ret .= '<td>' . $deb->input() . '</td>';
         $ret .= '</tr>';
         // If readonly == 1 then show CA
     }
     $ret .= '</table>';
     return $ret;
 }
 function display_html()
 {
     $r = "";
     //---Html
     $array = $this->load();
     if (is_array($array) == false || empty($array)) {
         return 0;
     }
     $r .= '<table class="result" style="width:100%">';
     $ix = 0;
     $prev = 'xx';
     $idx = 0;
     $tot_deb = $tot_cred = 0;
     bcscale(2);
     foreach ($array as $row) {
         if ($prev != $row['po_name']) {
             if ($ix > 0) {
                 $r .= '<tr>';
                 $tot_solde = bcsub($tot_cred, $tot_deb);
                 $sign = " " . ($tot_solde > 0) ? 'C' : 'D';
                 $r .= td('') . td('') . td('');
                 $r .= td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . $sign, ' class="num notice"');
             }
             $r .= '<tr>' . '<td colspan="7" style="width:auto">' . '<h2>' . h($row['po_name'] . ' ' . $row['po_description']) . '</td></tr>';
             $r .= '<tr>' . '<th>' . '</th>' . '<th>' . _('Date') . '</th>' . '<th>' . _('Poste') . '</th>' . '<th>' . _('Quick_code') . '</th>' . '<th>' . _('Libellé') . '</th>' . '<th>' . '</th>' . '<th>' . _('Pièce') . '</th>' . '<th>' . _('Interne') . '</th>' . '<th style="text-align:right">' . _('Débit') . '</th>' . '<th style="text-align:right">' . _('Crédit') . '</th>' . '<th style="text-align:right">' . _('Prog.') . '</th>' . '</tr>';
             $tot_deb = $tot_cred = 0;
             $prev = $row['po_name'];
             $ix++;
         }
         $class = $idx % 2 == 0 ? 'even' : 'odd';
         $idx++;
         $r .= '<tr class="' . $class . '">';
         $detail = $row['jr_id'] != null ? HtmlInput::detail_op($row['jr_id'], $row['jr_internal']) : '';
         $post_detail = $row['j_poste'] != null ? HtmlInput::history_account($row['j_poste'], $row['j_poste']) : '';
         $card_detail = $row['f_id'] != null ? HtmlInput::history_card($row['f_id'], $row['qcode']) : '';
         $amount_deb = $row['oa_debit'] == 't' ? $row['oa_amount'] : 0;
         $amount_cred = $row['oa_debit'] == 'f' ? $row['oa_amount'] : 0;
         $tot_deb = bcadd($tot_deb, $amount_deb);
         $tot_cred = bcadd($tot_cred, $amount_cred);
         $tot_solde = bcsub($tot_cred, $tot_deb);
         /*
          * Checked button
          */
         $str_ck = "";
         $str_document = "";
         if ($row['jr_id'] != null) {
             /*
              * Get receipt info  
              */
             $str_document = HtmlInput::show_receipt_document($row['jr_id']);
             if ($str_document != "") {
                 $ck = new ICheckBox('ck[]', $row['jr_id']);
                 $str_ck = $ck->input();
             }
         }
         $r .= '<td>' . $str_ck . '</td>' . '<td>' . $row['oa_date'] . '</td>' . td($post_detail) . td($card_detail) . td($row['jr_comment']) . '<td>' . $str_document . '</td>' . td($row['jr_pj_number']) . '<td>' . $detail . '</td>' . '<td class="num">' . nbm($amount_deb) . '</td>' . '<td class="num">' . nbm($amount_cred) . '</td>' . '<td class="num">' . nbm($tot_solde) . '</td>';
         $r .= '</tr>';
     }
     $r .= '<tr>';
     $tot_solde = bcsub($tot_cred, $tot_deb);
     $sign = $tot_solde > 0 ? 'C' : 'D';
     $r .= td('') . td('') . td('');
     $r .= td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . $sign, '  class="num notice"');
     $r .= '</table>';
     return $r;
 }
 function myList()
 {
     $s = dossier::get();
     $sql = "select md_id,md_name,md_affect,dt_value from document_modele join document_type on(dt_id=md_type) order by md_name";
     $Res = $this->cn->exec_sql($sql);
     $all = Database::fetch_all($Res);
     $r = '';
     if (Database::num_row($Res) != 0) {
         $r .= '<p><form method="post">';
         $r .= dossier::hidden();
         $r .= "<table>";
         $r .= "<tr> ";
         $r .= th(_('Nom'));
         $r .= th(_('Catégorie'));
         $r .= th(_('Affect.'));
         $r .= th(_('Fichier'));
         $r .= th(_('Effacer'));
         $r .= "</tr>";
         foreach ($all as $row) {
             $r .= "<tr>";
             $r .= "<td>";
             $r .= h($row['md_name']);
             $r .= "</td>";
             $r .= "<td>";
             $r .= $row['dt_value'];
             $r .= "</td>";
             $r .= td(h($row['md_affect']));
             $r .= "<td>";
             $r .= '<A HREF="show_document_modele.php?md_id=' . $row['md_id'] . '&' . $s . '">Document</a>';
             $r .= "</td>";
             $r .= "<TD>";
             $c = new ICheckBox();
             $c->name = "dm_remove_" . $row['md_id'];
             $r .= $c->input();
             $r .= "</td>";
             $r .= td(HtmlInput::detail_modele_document($row['md_id'], 'Modifier'));
             $r .= "</tr>";
         }
         $r .= "</table>";
         // need hidden parameter for subaction
         $a = new IHidden();
         $a->name = "sa";
         $a->value = "rm_template";
         $r .= $a->input();
         $r .= HtmlInput::submit("rm_template", "Effacer la sélection");
     }
     $b = new IButton('show');
     $b->label = "Ajout d'un document";
     $b->javascript = "\$('add_modele').style.display='block';new Draggable('add_modele',{starteffect:function(){\n                      new Effect.Highlight(obj.id,{scroll:window,queue:'end'});}});";
     $r .= $b->input();
     $r .= "</form></p>";
     return $r;
 }
$grandLivre = new Anc_Grandlivre($cn);
$grandLivre->get_request();
/*
 * Form
 */
echo '<form method="get" >';
echo $grandLivre->display_form();
echo '<p>' . HtmlInput::submit('Recherche', _('Rechercher')) . '</p>';
echo HtmlInput::request_to_hidden(array('sa', 'ac', 'gDossier'));
echo '</form>';
$result = HtmlInput::default_value_request('result', null);
if ($result != null) {
    $result = $grandLivre->display_html();
    if ($grandLivre->has_data != 0) {
        echo '<span style="display:block">';
        echo _('Tout sélectionner') . " " . ICheckBox::toggle_checkbox('export_pdf_bt1', 'export_anc_receipt_pdf');
        echo '</span>';
        echo $grandLivre->show_button();
        echo '<form method="GET" id="export_anc_receipt_pdf" action="export.php" style="display:inline">';
        echo $grandLivre->button_export_pdf();
        echo $grandLivre->display_html();
        echo $grandLivre->button_export_pdf();
        echo HtmlInput::get_to_hidden(array('ac', 'gDossier', 'sa'));
        echo '</form>';
        echo $grandLivre->show_button();
    } else {
        echo '<p class="notice">';
        echo _('Aucune donnée trouvée');
        echo '</p>';
    }
}
示例#20
0
echo _("Description");
?>
</td>
		<td><?php 
echo $me_description->input();
?>
</td>
	</tr>
	<tr>
		<TD><?php 
echo _("Fichier");
?>
</td>
		<td><?php 
echo $me_file->input();
?>
</td>
	</tr>
</table>
	<?php 
if ($new == 1) {
    echo HtmlInput::hidden('save_plugin', 1);
    echo HtmlInput::submit("save_plugin_sbt", _("Ajouter ce plugin"));
} else {
    $delete = new ICheckBox('delete_pl');
    echo "<p>" . _("Voulez-vous effacer ce plugin ?") . " " . $delete->input() . "</p>";
    echo HtmlInput::hidden('mod_plugin', 1);
    echo HtmlInput::submit("mod_plugin_sbt", _("Modifier ce plugin"));
}
?>
</form>
示例#21
0
"><a href="javascript:void(0)"  onclick="unselect_other_tab(this.parentNode.parentNode);this.parentNode.className='tabs_selected';profile_show('profile_repo_div')"><?php 
    echo _('Dépôts');
    ?>
</a>&nbsp;
</ul>
<?php 
}
?>

<?php 
$id = HtmlInput::hidden('p_id', $profile->p_id);
$name = new IText("p_name", $profile->p_name);
$desc = new IText("p_desc", $profile->p_desc);
$with_calc = new ICheckBox("with_calc", "t");
$with_calc->set_check($profile->with_calc);
$with_direct_form = new ICheckBox("with_direct_form", "t");
$with_direct_form->set_check($profile->with_direct_form);
// If $p_id == -1 it is a new profile
if ($p_id > 0) {
    echo '<div style="display:none" id="profile_gen_div">';
} else {
    echo '<div  class="myfieldset" id="profile_gen_div">';
}
echo '<form method="POST" id="profile_save_name_frm" onsubmit="return confirm_box(this,\'vous confirmez\')">';
echo HtmlInput::hidden('tab', 'profile_gen_div');
echo HtmlInput::hidden('p_id', $profile->p_id);
echo HtmlInput::hidden('save_name', 1);
require_once "template/profile.php";
echo HtmlInput::submit("save_namebt", _("Modifier"));
echo '</form>';
if ($profile->p_id > 0) {
示例#22
0
 /**
  * @brief Show the form to encode your operation
  * @param$p_array if you correct or use a predef operation (default = null)
  * @param$p_readonly 1 for readonly 0 for writable (default 0)
  *@exception if ledger not found
  * \return a string containing the form
  */
 function input($p_array = null, $p_readonly = 0)
 {
     global $g_parameter, $g_user;
     $this->nb = $this->get_min_row();
     if ($p_readonly == 1) {
         return $this->confirm($p_array);
     }
     if ($p_array != null) {
         extract($p_array);
     }
     $add_js = "";
     if ($g_parameter->MY_PJ_SUGGEST == 'Y') {
         $add_js = "update_pj();";
     }
     if ($g_parameter->MY_DATE_SUGGEST == 'Y') {
         $add_js .= 'get_last_date();';
     }
     $add_js .= 'update_row("quick_item");';
     $ret = "";
     if ($g_user->check_action(FICADD) == 1) {
         /* Add button */
         $f_add_button = new IButton('add_card');
         $f_add_button->label = _('Créer une nouvelle fiche');
         $f_add_button->set_attribute('ipopup', 'ipop_newcard');
         $f_add_button->set_attribute('jrn', $this->id);
         $f_add_button->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);";
         $f_add_button->input();
     }
     $wLedger = $this->select_ledger('ODS', 2);
     if ($wLedger == null) {
         throw new Exception(_('Pas de journal disponible'));
     }
     $wLedger->javascript = "onChange='update_name();update_predef(\"ods\",\"t\",\"" . $_REQUEST['ac'] . "\");{$add_js}'";
     $label = " Journal " . HtmlInput::infobulle(2);
     $ret .= $label . $wLedger->input();
     // Load the javascript
     //
     $ret .= "<table>";
     $ret .= '<tr ><td colspan="2" style="width:auto">';
     $wDate = new IDate('e_date');
     $wDate->readonly = $p_readonly;
     $e_date = isset($e_date) && trim($e_date) != '' ? $e_date : '';
     $wDate->value = $e_date;
     $ret .= _("Date") . ' : ' . $wDate->input();
     $ret .= '</td>';
     /* insert periode if needed */
     // Periode
     //--
     if ($this->check_periode() == true) {
         $l_user_per = $g_user->get_periode();
         $def = isset($periode) ? $periode : $l_user_per;
         $period = new IPeriod("period");
         $period->user = $g_user;
         $period->cn = $this->db;
         $period->value = $def;
         $period->type = OPEN;
         try {
             $l_form_per = $period->input();
         } catch (Exception $e) {
             if ($e->getCode() == 1) {
                 echo _("Aucune période ouverte");
                 exit;
             }
         }
         $label = HtmlInput::infobulle(3);
         $f_periode = _("Période comptable") . " {$label} " . $l_form_per;
         $ret .= td($f_periode);
     }
     $wPJ = new IText('e_pj');
     $wPJ->readonly = false;
     $wPJ->size = 10;
     /* suggest PJ ? */
     $default_pj = '';
     if ($g_parameter->MY_PJ_SUGGEST == 'Y') {
         $default_pj = $this->guess_pj();
     }
     $wPJ->value = isset($e_pj) ? $e_pj : $default_pj;
     $ret .= '</tr>';
     $ret .= '<tr >';
     $ret .= '<td colspan="2" style="width:auto"> ' . _('Pièce') . ' : ' . $wPJ->input();
     $ret .= HtmlInput::hidden('e_pj_suggest', $default_pj);
     $ret .= '</tr>';
     $ret .= '</td>';
     $ret .= '<tr>';
     $ret .= '<td colspan="2" style="width:auto">';
     $ret .= _('Libellé');
     $wDescription = new IText('desc');
     $wDescription->readonly = $p_readonly;
     $wDescription->size = "50";
     $wDescription->value = isset($desc) ? $desc : '';
     $ret .= $wDescription->input();
     $ret .= '</td>';
     $ret .= '</tr>';
     $ret .= '</table>';
     $nb_row = isset($nb_item) ? $nb_item : $this->nb;
     $ret .= HtmlInput::hidden('nb_item', $nb_row);
     $ret .= dossier::hidden();
     $ret .= dossier::hidden();
     $ret .= HtmlInput::hidden('jrn_type', $this->get_type());
     $info = HtmlInput::infobulle(0);
     $info_poste = HtmlInput::infobulle(9);
     if ($g_user->check_action(FICADD) == 1) {
         $ret .= $f_add_button->input();
     }
     $ret .= '<table id="quick_item" style="position:float;width:100%">';
     $ret .= '<tr>' . '<th style="text-align:left">Quickcode' . $info . '</th>' . '<th style="text-align:left">' . _('Poste') . $info_poste . '</th>' . '<th style="text-align:left">' . _('Libellé') . '</th>' . '<th style="text-align:left">' . _('Montant') . '</th>' . '<th style="text-align:left">' . _('Débit') . '</th>' . '</tr>';
     for ($i = 0; $i < $nb_row; $i++) {
         // Quick Code
         $quick_code = new ICard('qc_' . $i);
         $quick_code->set_dblclick("fill_ipopcard(this);");
         $quick_code->set_attribute('ipopup', 'ipopcard');
         // name of the field to update with the name of the card
         $quick_code->set_attribute('label', "ld" . $i);
         // name of the field to update with the name of the card
         $quick_code->set_attribute('typecard', 'filter');
         // Add the callback function to filter the card on the jrn
         $quick_code->set_callback('filter_card');
         $quick_code->set_function('fill_data');
         $quick_code->javascript = sprintf(' onchange="fill_data_onchange(\'%s\');" ', $quick_code->name);
         $quick_code->value = isset(${'qc_' . $i}) ? ${'qc_' . $i} : "";
         $quick_code->readonly = $p_readonly;
         $label = '';
         if ($quick_code->value != '') {
             $Fiche = new Fiche($this->db);
             $Fiche->get_by_qcode($quick_code->value);
             $label = $Fiche->strAttribut(ATTR_DEF_NAME);
         }
         // Account
         $poste = new IPoste();
         $poste->name = 'poste' . $i;
         $poste->set_attribute('jrn', $this->id);
         $poste->set_attribute('ipopup', 'ipop_account');
         $poste->set_attribute('label', 'ld' . $i);
         $poste->set_attribute('account', 'poste' . $i);
         $poste->set_attribute('dossier', Dossier::id());
         $poste->value = isset(${'poste' . $i}) ? ${"poste" . $i} : '';
         $poste->dbl_click_history();
         $poste->readonly = $p_readonly;
         if ($poste->value != '') {
             $Poste = new Acc_Account($this->db);
             $Poste->set_parameter('value', $poste->value);
             $label = $Poste->get_lib();
         }
         // Description of the line
         $line_desc = new IText();
         $line_desc->name = 'ld' . $i;
         $line_desc->size = 30;
         $line_desc->value = isset(${"ld" . $i}) ? ${"ld" . $i} : $label;
         // Amount
         $amount = new INum();
         $amount->size = 10;
         $amount->name = 'amount' . $i;
         $amount->value = isset(${'amount' . $i}) ? ${"amount" . $i} : '';
         $amount->readonly = $p_readonly;
         $amount->javascript = ' onChange="format_number(this);checkTotalDirect()"';
         // D/C
         $deb = new ICheckBox();
         $deb->name = 'ck' . $i;
         $deb->selected = isset(${'ck' . $i}) ? true : false;
         $deb->readonly = $p_readonly;
         $deb->javascript = ' onChange="checkTotalDirect()"';
         $ret .= '<tr>';
         $ret .= '<td>' . $quick_code->input() . $quick_code->search() . '</td>';
         $ret .= '<td>' . $poste->input() . '<script> document.getElementById(\'poste' . $i . '\').onblur=function(){ if (trim(this.value) !=\'\') {document.getElementById(\'qc_' . $i . '\').value="";}}</script>' . '</td>';
         $ret .= '<td>' . $line_desc->input() . '</td>';
         $ret .= '<td>' . $amount->input() . '</td>';
         $ret .= '<td>' . $deb->input() . '</td>';
         $ret .= '</tr>';
         // If readonly == 1 then show CA
     }
     $ret .= '</table>';
     if (isset($this->with_concerned) && $this->with_concerned == true) {
         $oRapt = new Acc_Reconciliation($this->db);
         $w = $oRapt->widget();
         $w->name = 'jrn_concerned';
         $w->value = isset($jrn_concerned) ? $jrn_concerned : "";
         $ret .= "R&eacute;conciliation/rapprochements : " . $w->input();
     }
     $ret .= create_script("\$('" . $wDate->id . "').focus()");
     return $ret;
 }
示例#23
0
$w_poste->set_dblclick("fill_ipopcard(this);");
$w_poste->value = isset($_REQUEST['f_id']) ? $_REQUEST['f_id'] : "";
print td($w_poste->input() . $w_poste->search());
echo td($span->input('f_id_label'));
print '</TR>';
print '<TR>';
$date_from = new IDate('from_periode');
$date_to = new IDate('to_periode');
$year = $g_user->get_exercice();
$date_from->value = isset($_REQUEST['from_periode']) ? $_REQUEST['from_periode'] : "01.01." . $year;
$date_to->value = isset($_REQUEST['to_periode']) ? $_REQUEST['to_periode'] : "31.12." . $year;
echo td(_('Depuis') . $date_from->input());
echo td(_('Jusque ') . $date_to->input());
//
print "<TR><TD>";
$all = new ICheckBox();
$all->label = "Tous les postes qui en dépendent";
$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;
示例#24
0
    echo h($a_plugin[$e]->me_description);
    ?>
            </td>
            <td>
                <?php 
    echo h($a_plugin[$e]->me_file);
    ?>
            </td>
            <td>
                <?php 
    for ($w = 0; $w < $nb_profile; $w++) {
        ?>
                    <span style="display:block">
                    
                    <?php 
        $a = new ICheckBox('plugin[' . $a_plugin[$e]->me_code . '][' . $a_profile[$w]['p_id'] . ']');
        if ($a_profile[$w]['cnt'] > 0) {
            $a->selected = true;
        }
        echo $a->input();
        echo $a_profile[$w]['p_name'];
        ?>
                    </span>
                    <?php 
    }
    ?>
            </td>
        </tr>
        
        <?php 
}
示例#25
0
                <?php 
    echo $p_array[$i]['use_login'];
    ?>
            </td>
            <td>
                <?php 
    echo $p_array[$i]['use_name'];
    ?>
            </td>
            <td>
                <?php 
    echo $p_array[$i]['use_first_name'];
    ?>
            </td>
            <td>
            <?php 
    $check = new ICheckBox('use_login' . $p_array[$i]['use_login'] . "_" . $this->tl_id);
    if ($this->is_shared_with($p_array[$i]['use_login']) != 0) {
        $check->selected = true;
    }
    $check->javascript = " onclick=\"todo_list_set_share({$this->tl_id},'{$p_array[$i]['use_login']}','{$dossier}')\"";
    echo $check->input();
    ?>
            </td>
        </tr>
        <?php 
}
?>
        
    </tr>
</table>   
示例#26
0
if (HtmlInput::default_value('lvl2', false, $_GET) !== false) {
    $ck_lev2->selected = true;
}
if (HtmlInput::default_value('lvl3', false, $_GET) !== false) {
    $ck_lev3->selected = true;
}
echo '<li>' . $ck_lev1->input() . _('Niveau 1') . '</li>';
echo '<li>' . $ck_lev2->input() . _('Niveau 2') . '</li>';
echo '<li>' . $ck_lev3->input() . _('Niveau 3') . '</li>';
echo '</ul>';
$unsold = new ICheckBox('unsold');
if (HtmlInput::default_value('unsold', false, $_GET) !== false) {
    $unsold->selected = true;
}
// previous exercice if checked
$previous_exc = new ICheckBox('previous_exc');
if (HtmlInput::default_value('previous_exc', false, $_GET) !== false) {
    $previous_exc->selected = true;
}
$from_poste = new IPoste();
$from_poste->name = "from_poste";
$from_poste->set_attribute('ipopup', 'ipop_account');
$from_poste->set_attribute('label', 'from_poste_label');
$from_poste->set_attribute('account', 'from_poste');
$from_poste->value = isset($_GET['from_poste']) ? $_GET['from_poste'] : "";
$from_span = new ISpan("from_poste_label", "");
$to_poste = new IPoste();
$to_poste->name = "to_poste";
$to_poste->set_attribute('ipopup', 'ipop_account');
$to_poste->set_attribute('label', 'to_poste_label');
$to_poste->set_attribute('account', 'to_poste');
示例#27
0
 * @brief 
 * @param type $name Descriptionara
 */
echo HtmlInput::title_box("Poste comptable", "acc_update", "hide");
?>
<span id="acc_update_info" class="notice"></span>
<form method="post" id="acc_update_frm_id" onsubmit="pcmn_save();return false;">

<table style="width:100%">
<?php 
$r = td(_('Poste comptable'), 'style="width:20em;width:15rem;text-align:right"') . td($val->input());
echo tr($r);
$r = td(_('Description'), 'style="width:auto;text-align:right"') . td($lib->input());
echo tr($r);
$r = td(_('Parent'), 'style="width:auto;text-align:right"') . td($parent->input());
echo tr($r);
$r = td(_('Type'), 'style="width:auto;text-align:right"') . td($type->input());
echo tr($r);
?>
</table>
<?php 
echo HtmlInput::hidden('p_oldu', $pcmn_val);
echo HtmlInput::hidden('p_action', $action);
echo dossier::hidden();
$checkbox = new ICheckBox("delete_acc");
echo _('Cocher pour effacer') . " " . $checkbox->input();
echo '<hr>';
echo HtmlInput::submit('update', _('Sauve'));
echo HtmlInput::button('hide', _('Annuler'), 'onClick="$(\'acc_update\').hide();return true;"');
?>
</form>
示例#28
0
    echo dossier::hidden();
    $a = isset($_GET['query']) ? $_GET['query'] : "";
    printf(_('Recherche') . ' <input class="input_text" type="text" name="query" value="%s">', $a);
    $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=' . FICHE_TYPE_FOURNISSEUR . ' 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();
    } else {
        $cat = HtmlInput::default_value_request('cat', '');
        echo HtmlInput::hidden("cat", $cat);
        echo HtmlInput::hidden('choice_cat', 0);
    }
    $nooperation = new ICheckBox('noop');
    $nooperation->selected = isset($_GET['noop']) ? true : false;
    echo _('Inclure les fournisseurs sans opération :') . $nooperation->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 
    $supplier = new Supplier($cn);
示例#29
0
                        <tr>
                            <td>
                                <?php 
$itext = new IText('lib');
$itext->value = strip_tags($obj->det->jr_comment);
$itext->size = 40;
echo td(_('Libellé')) . td($itext->input(), ' colspan="2" ');
?>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>Payé</td>
                            <td>
                                <?php 
$ipaid = new ICheckBox("ipaid", 'paid');
$ipaid->selected = $obj->det->jr_rapt == 'paid';
echo $ipaid->input();
?>
                            </td>
                        </tr>

                    </table>
                </td>
                <td style="width:50%;height:100%;vertical-align:top;text-align: center">
                    <table style="width:99%;height:8rem;vertical-align:top;">
                        <tr style="height: 5%">
                            <td style="text-align:center;vertical-align: top">
                                Note
                            </td></tr>
                        <tr>
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
$profile = $cn->get_value("select p_id from profile_menu where pm_id=\$1", array($pm_id));
$a_value = $cn->make_array("select me_code,me_code||' '||me_menu||' '||coalesce(me_description,'') from menu_ref", 0);
$array = $cn->get_array("select p_id,pm_id,me_code,me_code_dep,p_order,p_type_display,pm_default\n\tfrom profile_menu\n\twhere pm_id=\$1", array($pm_id));
if (empty($array)) {
    alert("Code invalide");
    exit;
}
echo HtmlInput::title_box($array[0]['me_code'], 'divdm' . $pm_id);
$me_code = new ISelect('me_code');
$me_code->value = $a_value;
$me_code->selected = $array[0]['me_code'];
$p_order = new Inum('p_order', $array[0]['p_order']);
$pm_default = new ICheckBox('pm_default', '1');
$pm_default->set_check($array[0]['pm_default']);
?>
<form method="POST" id="ajax_get_menu_detail_frm" onsubmit="return confirm_box(this,'<?php 
echo _("Vous confirmez");
?>
 ?')">
	<?php 
echo HtmlInput::hidden('pm_id', $array[0]['pm_id']);
?>
	<?php 
echo HtmlInput::hidden('p_id', $array[0]['p_id']);
?>
	<?php 
echo HtmlInput::hidden('tab', "profile_menu_div");
?>