コード例 #1
0
ファイル: balance.inc.php プロジェクト: Kloadut/noalyss_ynh
$input_to->type = ALL;
$input_to->cn = $cn;
$input_to->user = $g_user;
echo "  " . _('jusque') . ' :' . $input_to->input();
echo '<br>';
echo HtmlInput::button_action(_('Avancé'), " if (\$('balance_advanced_div').style.display=='none') { \$('balance_advanced_div').show();} else { \$('balance_advanced_div').hide();}");
//-------------------------------------------------
echo '<div id="balance_advanced_div" style="display:none">';
/*  add a all ledger choice */
echo _('Filtre') . " ";
$rad = new IRadio();
$array_ledger = $g_user->get_ledger('ALL', 3);
$array = get_array_column($array_ledger, 'jrn_def_id');
$selected = isset($_GET['r_jrn']) ? $_GET['r_jrn'] : null;
$select_cat = isset($_GET['r_cat']) ? $_GET['r_cat'] : null;
$array_cat = Acc_Ledger::array_cat();
echo '<ul style="list-style-type:none">';
if (!isset($_GET['p_filter']) || $_GET['p_filter'] == 0) {
    $rad->selected = 't';
} else {
    $rad->selected = false;
}
echo '<li>' . $rad->input('p_filter', 0) . _('Aucun filtre, tous les journaux') . '</li>';
if (isset($_GET['p_filter']) && $_GET['p_filter'] == 1) {
    $rad->selected = 't';
} else {
    $rad->selected = false;
}
echo '<li>' . $rad->input('p_filter', 1) . _('Filtré par journal');
echo HtmlInput::button_choice_ledger(array('div' => '', 'type' => 'ALL', 'all_type' => 1));
echo '</li>';
コード例 #2
0
 /**
  * set the $this->jrn to the cat
  * @todo Cette function semble ne pas fonctionner correctement
  */
 function filter_cat($p_array)
 {
     if (empty($p_array)) {
         $this->jrn = null;
         return;
     }
     /* get the list of jrn of the cat. */
     $array = Acc_Ledger::array_cat();
     $jrn = array();
     for ($e = 0; $e < count($array); $e++) {
         if (isset($p_array[$e])) {
             $t_a = $this->db->get_array('select jrn_def_id from jrn_def where jrn_def_type=$1', array($array[$e]['cat']));
             for ($f = 0; $f < count($t_a); $f++) {
                 $this->jrn[] = $t_a[$f]['jrn_def_id'];
             }
         }
     }
 }
コード例 #3
0
 /**
  * @covers Acc_Ledger::array_cat
  * @todo   Implement testArray_cat().
  */
 public function testArray_cat()
 {
     $array = Acc_Ledger::array_cat();
     $this->assertEquals(4, count($array));
 }