Beispiel #1
0
$ord = isset($_REQUEST['ord']) ? $_REQUEST['ord'] : 'na';
$sql_order = $header->get_sql_order($ord);
$Res = $cn->exec_sql("select mod_id,mod_name,mod_desc from\n                   modeledef {$sql_order}");
$count = Database::num_row($Res);
echo '<div class="content" style="width:80%;margin-left:10%">';
echo "<H2>" . _('Modèles') . "</H2>";
if ($sa == 'list') {
    echo '<p>';
    echo HtmlInput::button(_('Ajouter'), _('Ajouter un modèle'), " onclick=\$('folder_add_id').show()");
    echo '</p>';
    if ($count == 0) {
        echo _("Aucun modèle disponible");
    } else {
        echo '<span style="display:block;margin-top:10">';
        echo _('Filtre') . HtmlInput::infobulle(23);
        echo HtmlInput::filter_table("t_modele", "0,1,2", "1");
        echo '</span>';
        echo '<table id="t_modele" class="table_large" style="border-spacing:10;border-collapse:separate" >';
        echo "<TR>" . "<TH>" . $header->get_header(0) . "</TH>" . "<TH>" . $header->get_header(1) . "</TH>" . "<TH>" . $header->get_header(2) . "</TH>" . "<TH>" . _('Nom base de données') . "</TH>" . "<th> </th>" . "<th> </th>" . "</TR>";
        for ($i = 0; $i < $count; $i++) {
            $mod = Database::fetch_array($Res, $i);
            $class = $i % 2 == 0 ? "odd" : "even";
            $str_name = domaine . 'mod' . $mod['mod_id'];
            printf('<TR class="' . $class . '" style="vertical-align:top">' . '<TD>%d </td><td><b> %s</b> </TD>' . '<TD><I> %s </I></TD>' . '<td>' . $str_name . '</td>' . '<td> ' . HtmlInput::anchor(_('Effacer'), '?action=modele_mgt&sa=del&m=' . $mod['mod_id'], " onclick = \"modele_drop('{$mod['mod_id']}') \"") . '</td>' . '</td>' . '<td>' . HtmlInput::anchor(_('Modifie'), '?action=modele_mgt&sa=mod&m=' . $mod['mod_id'], " onclick = \"modele_modify('{$mod['mod_id']}') \"") . '</td>' . '</td>' . '<td>' . HtmlInput::anchor(_('Backup'), 'backup.php?action=backup&sa=b&t=m&d=' . $mod['mod_id']) . '</td>' . '</TR>', $mod['mod_id'], $mod['mod_name'], $mod['mod_desc']);
        }
        // for
        echo "</table>";
    }
    // if count = 0
    echo "<p class=\"notice\">" . _("Si vous voulez r&eacute;cup&eacute;rer toutes les adaptations d'un dossier " . " dans un autre dossier, vous pouvez en faire un modèle." . " Seules les fiches, la structure des journaux, les p&eacute;riodes,... seront reprises " . "et aucune donn&eacute;e du dossier sur lequel le dossier est bas&eacute;. Les données contenues dans les extensions ne sont pas effacées") . "</p>";
}
Beispiel #2
0
        echo '</form>';
        echo '</div>';
    }
}
/* * ********************************************************************
 * Display menu
 *
 *
 * ******************************************************************** */
// display button add and list of forecast to display
if ($sa == 'list') {
    $aForecast = Forecast::load_all($cn);
    $menu = array();
    $get_dossier = dossier::get();
    echo '<div class="content">';
    echo _('Filtre') . " " . HtmlInput::filter_table("forecast_table_id", '0', 1);
    echo '<TABLE id="forecast_table_id" class="vert_mtitle">';
    $href = "?ac=" . $_REQUEST['ac'] . "&sa=new&" . $get_dossier;
    echo '<TR><TD class="first"><A HREF="' . $href . '">' . _("Ajout d'une prévision") . '</A></TD></TR>';
    $def = isset($_REQUEST['f_id']) ? $_REQUEST['f_id'] : -1;
    for ($i = 0; $i < count($aForecast); $i++) {
        $href = "?ac=" . $_REQUEST['ac'] . "&sa=vw&" . $get_dossier . '&f_id=' . $aForecast[$i]['f_id'];
        $name = h($aForecast[$i]['f_name']);
        $menu[] = array($href, $name, $name, $aForecast[$i]['f_id']);
        echo '<TR><TD><A HREF="' . $href . '">' . h($name) . '</A></TD></TR>';
    }
    echo "</TABLE>";
    echo '</div>';
    return;
}
?>
Beispiel #3
0
<?php

//This file is part of NOALYSS and is under GPL
//see licence.txt
$max = $this->cn->count($ret);
echo HtmlInput::filter_table("tag_tb", '0,1', '1');
?>
<table id="tag_tb">
    <tr>
        <th>
            <?php 
echo _("Tag");
?>
        </th>
        <th>
            <?php 
echo _("Description");
?>
        </th>
    </tr>
<?php 
$gDossier = Dossier::id();
$ac = $_REQUEST['ac'];
for ($i = 0; $i < $max; $i++) {
    $row = Database::fetch_array($ret, $i);
    ?>
    <tr class="<?php 
    echo $i % 2 == 0 ? 'even' : 'odd';
    ?>
">
        <td>
//This file is part of NOALYSS and is under GPL
//see licence.txt
?>
<div class="content">
<?php 
echo _("Filtre");
?>
 :    
    <?php 
$col = "";
$sp = "";
for ($e = 0; $e < count($aHeading); $e++) {
    $col .= $sp . $e;
    $sp = ",";
}
echo HtmlInput::filter_table("fiche_tb_id", $col, '1');
?>
<table id="fiche_tb_id" class="sortable">
<tr>
<?php 
echo th(_('Détail'));
for ($i = 0; $i < count($aHeading); $i++) {
    $span = "";
    $sort = "";
    if ($i == 0) {
        $span = '<span id="sorttable_sortfwdind">&nbsp;&nbsp;&#x25BE;</span>';
        $sort = 'class="sorttable_sorted"';
    }
    echo '<th ' . $sort . '>' . $aHeading[$i]->ad_text . $span . '</th>';
}
?>
Beispiel #5
0
 } else {
     $afiche[0] = array('fd_id' => $_REQUEST['cat']);
 }
 for ($e = 0; $e < count($afiche); $e++) {
     $ret = $cn->exec_sql("select f_id,ad_value from fiche join fiche_detail using(f_id) where fd_id=\$1 and ad_id=1 order by 2 ", array($afiche[$e]['fd_id']));
     if ($cn->count() == 0) {
         if ($allcard == 0) {
             echo _("Aucune fiche trouvée");
             return;
         } else {
             continue;
         }
     }
     echo '<h2>' . $cn->get_value("select fd_label from fiche_def where fd_id=\$1", array($afiche[$e]['fd_id'])) . '</h2>';
     $id = "table_" . $afiche[$e]['fd_id'] . "_id";
     echo _('Filtre rapide:') . HtmlInput::filter_table($id, '0,1,2', '1');
     echo '<table class="sortable" id="' . $id . '" class="result" >';
     echo tr(th('Quick Code') . th('Libellé') . '<th>Poste' . HtmlInput::infobulle(27) . '</th>' . th('Débit', 'style="text-align:right"') . th('Crédit', 'style="text-align:right"') . th('Solde', 'style="text-align:right"') . th('D/C', 'style="text-align:right"'));
     $idx = 0;
     $sum_deb = 0;
     $sum_cred = 0;
     $sum_solde = 0;
     bcscale(4);
     for ($i = 0; $i < Database::num_row($ret); $i++) {
         $filter = " (j_date >= to_date('" . $_REQUEST['start'] . "','DD.MM.YYYY') " . " and  j_date <= to_date('" . $_REQUEST['end'] . "','DD.MM.YYYY')) ";
         $aCard = Database::fetch_array($ret, $i);
         $oCard = new Fiche($cn, $aCard['f_id']);
         $solde = $oCard->get_solde_detail($filter);
         if ($solde['debit'] == 0 && $solde['credit'] == 0) {
             continue;
         }
 /**
  * return the html code to create an hidden div and a button
  * to show this DIV. This contains all the available ledgers
  * for the user in READ or RW
  *@param $selected is an array of checkbox
  *@param $div div suffix
  *@note the choosen ledger are stored in the array r_jrn (_GET)
  */
 static function select_ledger($p_type, $p_selected, $div = '')
 {
     global $g_user;
     $r = '';
     /* security : filter ledger on user */
     $p_array = $g_user->get_ledger($p_type, 3);
     ob_start();
     /* create a hidden div for the ledger */
     echo '<div id="div_jrn' . $div . '" >';
     echo HtmlInput::title_box(_("Journaux"), $div . "jrn_search");
     echo '<div style="padding:5px">';
     echo '<form method="GET" id="' . $div . 'search_frm" onsubmit="return hide_ledger_choice(\'' . $div . 'search_frm\')">';
     echo HtmlInput::hidden('nb_jrn', count($p_array));
     echo _('Filtre ') . HtmlInput::filter_table($div . 'tb_jrn', '0,1,2', 2);
     echo '<table class="result" id="' . $div . 'tb_jrn">';
     echo '<tr>';
     echo th(_('Nom'));
     echo th(_('Description'));
     echo th(_('Type'));
     echo '</tr>';
     echo '<tr>';
     echo '<td>';
     echo HtmlInput::button('sel_' . $div, _('Inverser la sélection'), ' onclick = "toggle_checkbox(\'' . "{$div}search_frm" . '\')"');
     echo '</td>';
     echo '</tr>';
     for ($e = 0; $e < count($p_array); $e++) {
         $row = $p_array[$e];
         $r = new ICheckBox($div . 'r_jrn' . $e, $row['jrn_def_id']);
         $idx = $row['jrn_def_id'];
         if ($p_selected != null && in_array($row['jrn_def_id'], $p_selected)) {
             $r->selected = true;
         }
         $class = $e % 2 == 0 ? ' class="even" ' : ' class="odd" ';
         echo '<tr ' . $class . '>';
         echo '<td style="white-space: nowrap">' . $r->input() . $row['jrn_def_name'] . '</td>';
         echo '<td >' . $row['jrn_def_description'] . '</td>';
         echo '<td >' . $row['jrn_def_type'] . '</td>';
         echo '</tr>';
     }
     echo '</table>';
     echo HtmlInput::hidden('div', $div);
     echo HtmlInput::submit('save', _('Valider'));
     echo HtmlInput::button_close($div . "jrn_search");
     echo '</form>';
     echo '</div>';
     echo '</div>';
     $ret = ob_get_contents();
     ob_end_clean();
     return $ret;
 }
<?php

//This file is part of NOALYSS and is under GPL
//see licence.txt
echo HtmlInput::title_box('Tag', $p_prefix . 'tag_div');
$max = $this->cn->count($ret);
if ($max == 0) {
    echo h2(_("Aucune étiquette disponible"), ' class="notice"');
    return;
}
?>
Filtrer = <?php 
echo HtmlInput::filter_table($p_prefix . 'tag_tb_id', '0,1', 1);
?>
<table class="result" id="<?php 
echo $p_prefix;
?>
tag_tb_id">
    <tr>
        <th>
            <?php 
echo _("Tag");
?>
        </th>
        <th>
            <?php 
echo _("Description");
?>
        </th>
    </tr>
<?php 
Beispiel #8
0
</data>
EOF;
        return;
        break;
    case 'mod_cat_doc':
        require_once NOALYSS_INCLUDE . '/template/document_mod_change.php';
        break;
    case 'dsp_tva':
        $cn = new Database($gDossier);
        $Res = $cn->exec_sql("select * from tva_rate order by tva_rate desc");
        $Max = Database::num_row($Res);
        $r = "";
        $r = HtmlInput::anchor_close('tva_select');
        $r .= h2(_('Choisissez la TVA '), 'class="title"');
        $r .= '<div >';
        $r .= _('Filter') . " " . HtmlInput::filter_table("tva_select_table", '0,1,2,3', 1);
        $r .= '<TABLE style="width:100%" id="tva_select_table">';
        $r .= th(_('code'));
        $r .= th(_('Taux'));
        $r .= th(_('Symbole'));
        $r .= th(_('Explication'));
        for ($i = 0; $i < $Max; $i++) {
            $row = Database::fetch_array($Res, $i);
            if (!isset($compute)) {
                if (!isset($code)) {
                    $script = "onclick=\"\$('{$ctl}').value='" . $row['tva_id'] . "';removeDiv('tva_select');\"";
                } else {
                    $script = "onclick=\"\$('{$ctl}').value='" . $row['tva_id'] . "';set_value('{$code}','" . $row['tva_label'] . "');removeDiv('tva_select');\"";
                }
            } else {
                if (!isset($code)) {
Beispiel #9
0
 if (empty($array)) {
     $html .= _("Aucune catégorie de fiche ne correspond  à" . " votre demande");
     if (DEBUG) {
         $html .= $sql;
     }
 } else {
     $r = '';
     $r .= '<p  style="padding-left:2em">';
     $r .= _("Choisissez la catégorie de fiche à laquelle vous aimeriez ajouter une fiche") . '</p>';
     $r .= '<div style="text-align:center">';
     $msg = _('Choisissez une catégorie svp');
     $r .= '<form id="sel_type" method="GET" onsubmit="this.ipopup=' . $ctl . ";if (\$('fd_id').value != 0 ) {dis_blank_card(this);return false;} else " . "{ \$('error_cat').innerHTML='" . $msg . "'; return false;}\">";
     $r .= '<span id="error_cat" class="notice"></span>';
     $r .= dossier::hidden();
     $r .= isset($ref) ? HtmlInput::hidden('ref', 1) : '';
     $r .= _('Filtrer') . ' ' . HtmlInput::filter_table("cat_card_table", '0,1', 0);
     $r .= '<table id="cat_card_table" class="result">';
     for ($i = 0; $i < count($array); $i++) {
         $class = $i % 2 == 0 ? ' class="even" ' : ' class="odd" ';
         $r .= '<tr ' . $class . ' id="select_cat_row_' . $array[$i]['fd_id'] . '">';
         $r .= '<td >';
         $r .= '<a href="javascript:void(0)" onclick="select_cat(\'' . $array[$i]['fd_id'] . '\')">' . h($array[$i]['fd_label']) . '</a>';
         $r .= '</td>';
         $r .= '<td>';
         $r .= '<a href="javascript:void(0)" onclick="select_cat(\'' . $array[$i]['fd_id'] . '\')">' . h($array[$i]['fd_description']) . '</a>';
         $r .= '</td>';
         $r .= "</tr>";
     }
     $r .= '</table>';
     $r .= HtmlInput::hidden('fd_id', 0);
     $r .= '<p style="text-align:center">';
Beispiel #10
0
 function Summary($p_search = "", $p_action = "", $p_sql = "", $p_amount = false)
 {
     global $g_user;
     $bank = new Acc_Parm_Code($this->cn, 'BANQUE');
     $cash = new Acc_Parm_Code($this->cn, 'CAISSE');
     $cc = new Acc_Parm_Code($this->cn, 'COMPTE_COURANT');
     bcscale(4);
     $gDossier = dossier::id();
     $p_search = sql_string($p_search);
     $script = $_SERVER['PHP_SELF'];
     // Creation of the nav bar
     // Get the max numberRow
     $filter_amount = '';
     global $g_user;
     $filter_year = "  j_tech_per in (select p_id from parm_periode " . "where p_exercice='" . $g_user->get_exercice() . "')";
     if ($p_amount) {
         $filter_amount = ' and f_id in (select f_id from jrnx where  ' . $filter_year . ')';
     }
     $all_tiers = $this->count_by_modele($this->fiche_def_ref, "", $p_sql . $filter_amount);
     // Get offset and page variable
     $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
     $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1;
     $bar = navigation_bar($offset, $all_tiers, $_SESSION['g_pagesize'], $page);
     // set a filter ?
     $search = $p_sql;
     $exercice = $g_user->get_exercice();
     $tPeriode = new Periode($this->cn);
     list($max, $min) = $tPeriode->get_limit($exercice);
     if (trim($p_search) != "") {
         $search .= " and f_id in\n                     (select distinct f_id from fiche_detail\n                     where\n                     ad_id in (1,32,30,23,18,13) and ad_value ~* '{$p_search}')";
     }
     // Get The result Array
     $step_tiers = $this->get_by_category($offset, $search . $filter_amount, 'name');
     if ($all_tiers == 0 || count($step_tiers) == 0) {
         return "";
     }
     $r = "";
     $r .= _("Filtre rapide ") . HtmlInput::filter_table("tiers_tb", '0,1,2', 1);
     $r .= $bar;
     $r .= '<table  id="tiers_tb" class="sortable"  style="width:90%;margin-left:5%">
         <TR >
         <TH>' . _('Quick Code') . HtmlInput::infobulle(17) . '</TH>' . '<th>' . _('Poste comptable') . '</th>' . '<th  class="sorttable_sorted_reverse">' . _('Nom') . '<span id="sorttable_sortrevind">&nbsp;&blacktriangle;</span>' . '</th>
         <th>' . _('Adresse') . '</th>
         <th style="text-align:right">' . _('Total débit') . '</th>
         <th style="text-align:right">' . _('Total crédit') . '</th>
         <th style="text-align:right">' . _('Solde') . '</th>';
     $r .= '</TR>';
     if (sizeof($step_tiers) == 0) {
         return $r;
     }
     $i = 0;
     $deb = 0;
     $cred = 0;
     foreach ($step_tiers as $tiers) {
         $i++;
         /* Filter on the default year */
         $amount = $tiers->get_solde_detail($filter_year);
         /* skip the tiers without operation */
         if ($p_amount && $amount['debit'] == 0 && $amount['credit'] == 0 && $amount['solde'] == 0) {
             continue;
         }
         $odd = "";
         $odd = $i % 2 == 0 ? ' odd ' : ' even ';
         $accounting = $tiers->strAttribut(ATTR_DEF_ACCOUNT);
         if ($p_action == 'bank' && $amount['debit'] < $amount['credit']) {
             if (strpos($accounting, $bank->p_value) === 0 || strpos($accounting, $cash->p_value) === 0 || strpos($accounting, $cc->p_value) === 0) {
                 //put in red if c>d
                 $odd .= " notice ";
             }
         }
         $odd = ' class="' . $odd . '"';
         $r .= "<TR {$odd}>";
         $url_detail = $script . '?' . http_build_query(array('sb' => 'detail', 'sc' => 'sv', 'ac' => $_REQUEST['ac'], 'f_id' => $tiers->id, 'gDossier' => $gDossier));
         $e = sprintf('<A HREF="%s" title="Détail" class="line"> ', $url_detail);
         $r .= "<TD> {$e}" . $tiers->strAttribut(ATTR_DEF_QUICKCODE) . "</A></TD>";
         $r .= "<TD> {$e}" . $accounting . "</TD>";
         $r .= "<TD>" . h($tiers->strAttribut(ATTR_DEF_NAME)) . "</TD>";
         $r .= "<TD>" . h($tiers->strAttribut(ATTR_DEF_ADRESS) . " " . $tiers->strAttribut(ATTR_DEF_CP) . " " . $tiers->strAttribut(ATTR_DEF_PAYS)) . "</TD>";
         $str_deb = $amount['debit'] == 0 ? 0 : nbm($amount['debit']);
         $str_cred = $amount['credit'] == 0 ? 0 : nbm($amount['credit']);
         $str_solde = nbm($amount['solde']);
         $r .= '<TD sorttable_customkey="' . $amount['debit'] . '" align="right"> ' . $str_deb . '</TD>';
         $r .= '<TD sorttable_customkey="' . $amount['credit'] . '" align="right"> ' . $str_cred . '</TD>';
         $side = $amount['debit'] > $amount['credit'] ? 'D' : 'C';
         $side = $amount['debit'] == $amount['credit'] ? '=' : $side;
         $red = "";
         if ($p_action == 'customer' && $amount['debit'] < $amount['credit']) {
             //put in red if d>c
             $red = " notice ";
         }
         if ($p_action == 'supplier' && $amount['debit'] > $amount['credit']) {
             //put in red if c>d
             $red = " notice ";
         }
         $r .= '<TD class="' . $red . '" sorttable_customkey="' . $amount['solde'] . '" align="right"> ' . $str_solde . "{$side} </TD>";
         $deb = bcadd($deb, $amount['debit']);
         $cred = bcadd($cred, $amount['credit']);
         $r .= "</TR>";
     }
     $r .= "<tfoot >";
     $solde = abs(bcsub($deb, $cred));
     $side = $deb > $cred ? 'Débit' : 'Crédit';
     $r .= '<tr class="highlight">';
     $r .= td("") . td("") . td("") . td("Totaux") . td(nbm($deb), 'class="num"') . td(nbm($cred), 'class="num"') . td(" {$side} " . nbm($solde), 'class="num"');
     $r .= '</tr>';
     $r .= "</tfoot>";
     $r .= "</TABLE>";
     $r .= $bar;
     return $r;
 }
Beispiel #11
0
<?php

//This file is part of NOALYSS and is under GPL
//see licence.txt
echo HtmlInput::title_box('Tag', 'tag_div');
$max = $this->cn->count($ret);
if ($max == 0) {
    echo h2(_("Aucune étiquette disponible"), ' class="notice"');
    return;
}
?>
Filtrer = <?php 
echo HtmlInput::filter_table('tag_tb_id', '0,1', 1);
?>
<table class="result"  id="tag_tb_id">
    <tr>
        <th>
            <?php 
echo _("Tag");
?>
        </th>
        <th>
            <?php 
echo _("Description");
?>
        </th>
    </tr>
<?php 
$gDossier = Dossier::id();
if (isNumber($_REQUEST['ag_id']) == 0) {
    die('ERROR : parameters invalid');
Beispiel #12
0
        echo HtmlInput::hidden("action", "record");
        echo HtmlInput::submit("update", _("Mise a jour"));
        echo HtmlInput::submit("del_form", _("Effacement"));
        echo '</form>';
        echo '<form method="get" action="export.php" style="display:inline">';
        echo dossier::hidden();
        echo HtmlInput::hidden("act", "CSV:reportinit");
        echo HtmlInput::hidden('f', $rap->id);
        echo HtmlInput::submit('bt_csv', "Export CSV");
        echo HtmlInput::request_to_hidden(array('ac', 'action', 'p_action', 'fr_id'));
        $href = http_build_query(array('ac' => $_REQUEST['ac'], 'gDossier' => $_REQUEST['gDossier']));
        echo '<a style="display:inline" class="smallbutton" href="do.php?' . $href . '">' . _('Retour') . '</a>';
        echo '</form>';
        echo '<span class="notice">' . _("Les lignes vides seront effacées") . '</span>';
        echo "</DIV>";
    }
} else {
    $lis = $rap->get_list();
    $ac = "&ac=" . $_REQUEST['ac'];
    $p_action = 'p_action=defreport';
    echo '<div class="content">';
    echo _('Filtre') . " " . HtmlInput::filter_table("rapport_table_id", '0', 1);
    echo '<TABLE id="rapport_table_id" class="vert_mtitle">';
    echo '<TR><TD class="first"><A HREF="?' . $p_action . $ac . '&action=add&' . $str_dossier . '">Ajout</A></TD></TR>';
    foreach ($lis as $row) {
        printf('<TR><TD><A  HREF="?' . $p_action . $ac . '&action=view&fr_id=%s&%s">%s</A></TD></TR>', $row->id, $str_dossier, $row->name);
    }
    echo "</TABLE>";
    echo '</div>';
}
html_page_stop();
/**\file
 *
 *
 * \brief show bank saldo
 *
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_acc_parm_code.php';
echo '<div class="content">';
$fiche = new Fiche($cn);
$array = $fiche->get_bk_account();
echo '<div class="content">';
echo dossier::hidden();
echo _('Filtre :') . HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3', '1');
echo '<table class="sortable"  style="margin-left:10%;width:80%" class="result" id="fin_saldo_tb">';
echo tr(th('Quick Code', ' class=" sorttable_sorted_reverse"', HtmlInput::infobulle(17) . '<span id="sorttable_sortrevind">&nbsp;&blacktriangle;</span>') . th('Compte en banque', ' style="text-align:left"') . th('Journal', ' style="text-align:center"') . th('Description', ' style="text-align:center"') . th('solde opération', ' style="text-align:right" class="sorttable_numeric"') . th('solde extrait/relevé', ' style="text-align:right" class="sorttable_numeric"') . th('différence', ' style="text-align:right" class="sorttable_numeric"'));
// Filter the saldo
//  on the current year
$filter_year = "  j_tech_per in (select p_id from parm_periode where  p_exercice='" . $g_user->get_exercice() . "')";
// for highligting tje line
$idx = 0;
bcscale(2);
$tot_extrait = 0;
$tot_diff = 0;
$tot_operation = 0;
// for each account
for ($i = 0; $i < count($array); $i++) {
    if ($array[$i]->id == 0) {
        echo '<tr >';
Beispiel #14
0
?>
</div>

<DIV CLASS="myfieldset" style="width:auto">
<?php 
$Ret = $cn->exec_sql("select pcm_val,pcm_lib,pcm_val_parent,pcm_type,array_to_string(array_agg(j_qcode) , ',') as acode\n\tfrom tmp_pcmn left join vw_poste_qcode on (j_poste=pcm_val) where substr(pcm_val::text,1,1)='" . $g_start . "'" . "  group by pcm_val,pcm_lib,pcm_val_parent, pcm_type  order by pcm_val::text");
$MaxRow = Database::num_row($Ret);
?>
<span style="display:inline;margin: 15px 15px 15px 15px">
<input type="button" id="pcmn_update_add_bt" class="smallbutton" value="<?php 
echo _('Ajout poste comptable');
?>
">
</span>
<?php 
echo _('Filtre') . " " . HtmlInput::filter_table("account_tbl_id", "0,1,2,3,4", 1);
?>
             <?php 
echo HtmlInput::hidden('p_action', 'pcmn');
//echo HtmlInput::hidden('sa','detail');
echo dossier::hidden();
$limite = MAX_QCODE;
?>
<TABLE  id="account_tbl_id" class="result">
     <TR>
     <TH> <?php 
echo _('Poste comptable');
?>
 </TH>
     <TH> <?php 
echo _('Libellé');
$nstart_extrait = new INum('start_extrait');
if (isset($_POST['start_extrait'])) {
    $nstart_extrait->value = $_POST['start_extrait'];
}
$nend_extrait = new INum('end_extrait');
if (isset($_POST['end_extrait'])) {
    $nend_extrait->value = $_POST['end_extrait'];
}
echo "Extrait / relevé :" . $iextrait->input();
echo 'solde Début' . $nstart_extrait->input();
echo 'solde Fin' . $nend_extrait->input();
echo IButton::tooggle_checkbox('rec1');
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++) {
Beispiel #16
0
 *   along with NOALYSS; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
/* $Revision$ */
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/**
 * @file
 * @brief show all the categories of card fiche_def
 *
 */
$max = Database::num_row($res);
?>
<div id="list_cat_div" class="content">
	<?php 
echo "Filtre";
echo HtmlInput::filter_table("fiche_def_tb", "0,1,2,3,4", "1");
?>
<table id="fiche_def_tb" class="result">
	<tR>
		<th>
			<?php 
echo $tab->get_header(0);
?>
		</th>
		<th>
			<?php 
echo $tab->get_header(1);
?>
		</th>
		<th>
			<?php 
Beispiel #17
0
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})");
echo HtmlInput::button("Add_menu", _("Ajout d'un menu"), "onclick=create_menu({$gDossier})");
echo '<table class="result" id="menu_tb">';
echo '<tr>';
echo '<th>' . $table->get_header(0) . '</th>';
echo '<th>' . $table->get_header(1) . '</th>';
echo '<th>' . $table->get_header(2) . '</th>';
echo '<th>' . $table->get_header(3) . HtmlInput::infobulle(33) . '</th>';
echo '<th>' . $table->get_header(4) . '</th>';
echo '<th>' . $table->get_header(5) . '</th>';
echo '<th>' . $table->get_header(6) . '</th>';
 /**
  * @brief listing of all ledgers
  * @return HTML string
  */
 function listing()
 {
     $str_dossier = dossier::get();
     $base_url = "?" . dossier::get() . "&ac=" . $_REQUEST['ac'];
     $r = "";
     $r .= _('Filtre') . " " . HtmlInput::filter_table("cfgledger_table_id", "0", "1");
     $r .= '<TABLE id="cfgledger_table_id" class="vert_mtitle">';
     $r .= '<TR><TD class="first"><A HREF="' . $base_url . '&sa=add">' . _('Ajout journal') . ' </A></TD></TR>';
     $ret = $this->db->exec_sql("select distinct jrn_def_id,jrn_def_name,\n                       jrn_def_class_deb,jrn_def_class_cred,jrn_def_type\n                       from jrn_def order by jrn_def_name");
     $Max = Database::num_row($ret);
     for ($i = 0; $i < $Max; $i++) {
         $l_line = Database::fetch_array($ret, $i);
         $url = $base_url . "&sa=detail&p_jrn=" . $l_line['jrn_def_id'];
         $r .= sprintf('<TR><TD><A HREF="%s">%s</A></TD></TR>', $url, h($l_line['jrn_def_name']) . ' (' . $l_line['jrn_def_type'] . ')');
     }
     $r .= "</TABLE>";
     return $r;
 }
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

* 
*/
/**
 * @brief display all the user for the todo_list.
 * @see Todo_List::display_user
 * @param $p_array array of user who can access this folder
 * @param Object Todo_List
 * @param $dossier = Dossier::id()
 * 
 */
echo _('Filtre') . " " . HtmlInput::filter_table("todo_user_table", "0,1,2", 1);
?>

<table id="todo_user_table<?php 
echo $this->tl_id;
?>
" class="result">
    <tr>
        <th>
            <?php 
echo _('Login');
?>
        </th>
        <th>
            <?php 
echo _('Nom ');
Beispiel #20
0
 }
 $bal->from_poste = $_GET['from_poste'];
 $bal->to_poste = $_GET['to_poste'];
 if (isset($_GET['unsold'])) {
     $bal->unsold = true;
 }
 $previous = isset($_GET['previous_exc']) ? 1 : 0;
 $row = $bal->get_row($_GET['from_periode'], $_GET['to_periode'], $previous);
 $previous = isset($row[0]['sum_cred_previous']) ? 1 : 0;
 $periode = new Periode($cn);
 $a = $periode->get_date_limit($_GET['from_periode']);
 $b = $periode->get_date_limit($_GET['to_periode']);
 echo "<h2 class=\"info\"> période du " . $a['p_start'] . " au " . $b['p_end'] . "</h2>";
 echo '<span style="display:block">';
 echo _('Filtre') . HtmlInput::infobulle(24);
 echo HtmlInput::filter_table("t_balance", "0,1", "1");
 echo '</span>';
 echo '<table id="t_balance" width="100%">';
 echo '<th>Poste Comptable</th>';
 echo '<th>Libell&eacute;</th>';
 if ($previous == 1) {
     echo '<th>D&eacute;bit N-1</th>';
     echo '<th>Cr&eacute;dit N-1</th>';
     echo '<th>Solde D&eacute;biteur N-1</th>';
     echo '<th>Solde Cr&eacute;diteur N-1</th>';
     if (isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3'])) {
         echo '<th>Solde  N-1</th>';
     }
 }
 echo '<th>D&eacute;bit</th>';
 echo '<th>Cr&eacute;dit</th>';
echo HtmlInput::title_box(_("Résultat recherche"), "boxsearch_card_div");
$max = count($array) > MAX_CARD_SEARCH ? MAX_CARD_SEARCH : count($array);
if (count($array) > MAX_CARD_SEARCH) {
    ?>
<h2 class="notice"><?php 
    printf(_("Résultat limité à %d , %d nombre de fiches trouvées"), MAX_CARD_SEARCH, count($array));
    ?>
 </h2>

<?php 
}
echo _('Filtre');
?>
 <?php 
echo HtmlInput::infobulle(26);
echo HtmlInput::filter_table("tb_fiche", "0,1,2,3,4,5", 1);
?>
 :
<table id="tb_fiche" class="sorttable" style="width:100%">
	<tr>
		<th>
			<?php 
echo _("Quick Code");
?>
 <?php 
echo HtmlInput::infobulle(17);
?>
		</th>
		<th class=" sorttable_sorted">
			Nom
		<span id="sorttable_sortfwdind">&nbsp;&#x25BE;</span>
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
/* * *
 * @file
 * @brief display a table with the list of available keys for all ledgers
 * @see Anc_Key::display_list
 */
global $g_succeed, $g_failed;
?>
<div class="content">
    <?php 
echo _('Filtre') . " " . HtmlInput::filter_table("anc_key_table_id", '0,1', 0);
?>

<table id="anc_key_table_id" class="result">
    <?php 
for ($i = 0; $i < count($a_key); $i++) {
    $onclick = http_build_query(array('gDossier' => Dossier::id(), 'ac' => $_REQUEST['ac'], 'op' => 'consult', 'key' => $a_key[$i]['kd_id']));
    $class = $i % 2 == 0 ? 'class="even"' : 'class="odd"';
    ?>
        <tr <?php 
    echo $class;
    ?>
>
            <td>
                <a class="line" href="do.php?<?php 
    echo $onclick;
Beispiel #23
0
 $header = new Sort_Table();
 $url = $_SERVER['PHP_SELF'] . "?sa=list&action=" . $_REQUEST['action'];
 $header->add(_("id"), $url, " order by dos_id asc", " order by dos_id desc", "da", "dd");
 $header->add(_("Nom"), $url, " order by dos_name asc", " order by dos_name desc", "na", "nd");
 $header->add(_("Description"), $url, " order by dos_description asc", " order by dos_description  desc", "da", "dd");
 $repo = new Dossier(0);
 $repocn = new Database();
 $ord = isset($_REQUEST['ord']) ? $_REQUEST['ord'] : 'na';
 $sql_order = $header->get_sql_order($ord);
 $Res = $repocn->get_array("select *  from ac_dossier {$sql_order}");
 $compteur = 1;
 $template = "";
 echo '<div class="content">';
 echo '<span style="display:block">';
 echo _('Filtre') . HtmlInput::infobulle(23);
 echo HtmlInput::filter_table("t_dossier", "0,1,2", "1");
 echo '</span>';
 echo '<TABLE id="t_dossier" class="table_large" >';
 $r = "";
 $r .= '<th>' . $header->get_header(0) . '</td>';
 $r .= '<th>' . $header->get_header(1) . '</td>';
 $r .= '<th>' . $header->get_header(2) . '</td>';
 $r .= th(_('Taille')) . th(_('Nom base de données'));
 $r = tr($r);
 echo $r;
 // show all dossiers
 if ($Res != null) {
     foreach ($Res as $Dossier) {
         if ($compteur % 2 == 0) {
             $cl = 'class="odd"';
         } else {
Beispiel #24
0
$result .= '<TR>';
if ($User->Admin() == 1) {
    $result .= "<TD  class=\"tool\" ><A class=\"cell\" HREF=\"admin_repo.php\"> Administration  </A></TD>";
}
$result .= '<TD class="tool">';
$result .= '<a onclick="set_preference(0)" title="Préférence" href="javascript:void(0)" class="cell">' . _('Préférence') . '</a>';
$result .= '</TD>';
$result .= '<TD  class="tool" ><A class="cell" HREF="logout.php" >' . _('Deconnexion') . '</a></TD>';
$result .= "</TR>";
$result .= "</table>";
echo '<div id="module">' . $result . '</div>';
echo '</div>';
?>
<div class="foldercontent">
	<span style="display:block;margin:2%">
 <?php 
echo _('Filtre') . HtmlInput::infobulle(23);
echo HtmlInput::filter_table("folder", '1,2', 1);
?>
</span>
<?php 
// If admin show everything otherwise only the available dossier
$res = $User->show_dossier("");
echo $res;
?>
<P>

</P>
</div>
<?php 
html_page_stop();
 function show_button($p_url)
 {
     $value = $this->db->get_array("select od_id,od_name,od_description from op_predef " . " where jrn_def_id=\$1" . " and od_direct =\$2" . " order by od_name", array($this->jrn_def_id, $this->od_direct));
     if ($this->jrn_def_id == '') {
         $value = array();
     }
     $r = "";
     $r .= '<h2>' . _("Choisissez un modèle") . '</h2>';
     $r .= _('Filtrer') . ' ' . HtmlInput::filter_table('modele_op_tab', '0', '0');
     $r .= '<table style="width:100%" id="modele_op_tab">';
     for ($i = 0; $i < count($value); $i++) {
         $r .= '<tr class="' . ($i % 2 == 0 ? "even" : "odd") . '">';
         $r .= '<td style="font-weight:bold;vertical-align:top;text-decoration:underline">';
         $r .= sprintf('<a href="%s&pre_def=%s" onclick="waiting_box()">%s</a> ', $p_url, $value[$i]['od_id'], $value[$i]['od_name']);
         $r .= '</td>';
         $r .= '<td>' . h($value[$i]['od_description']) . '</td>';
         $r .= '</tr>';
     }
     $r .= '</table>';
     return $r;
 }
Beispiel #26
0
}
//-----------------------------------------------------
//    list of contact
//-----------------------------------------------------
if ($low_action == "list") {
    ?>
    <div class="content">
        <div>
    	<form method="get" action="<?php 
    echo $href;
    ?>
">
		<?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');
    ?>
Beispiel #27
0
// Detail of a user
/******************************************************/
$compteur = 0;
$header = new Sort_Table();
$url = basename($_SERVER['PHP_SELF']) . "?action=" . $_REQUEST['action'];
$header->add(_("Login"), $url, " order by use_login asc", "order by use_login desc", "la", "ld");
$header->add(_("Nom"), $url, " order by use_name asc,use_first_name asc", "order by use_name desc,use_first_name desc", "na", "nd");
$header->add(_('Dossier'), $url, ' order by ag_dossier asc', 'order by ag_dossier desc', 'da', 'dd');
$header->add(_("Actif"), $url, " order by use_active asc", "order by  use_active desc", "aa", "ad");
$ord = isset($_REQUEST['ord']) ? $_REQUEST['ord'] : 'la';
$sql = $header->get_sql_order($ord);
$a_user = $repo->get_user_folder($sql);
if (!empty($a_user)) {
    echo '<span style="display:block">';
    echo _('Filtre') . HtmlInput::infobulle(22);
    echo HtmlInput::filter_table("user", "0,1,2,5", "1");
    echo '</span>';
    echo '<table id="user" class="result">';
    echo '<tr>';
    echo '<th>' . $header->get_header(0) . '</th>';
    echo '<th>' . $header->get_header(1) . '</th>';
    echo th(_("Prénom"));
    echo '<th>' . $header->get_header(3) . '</th>';
    echo "<th>" . _('Type') . "</th>";
    echo '<th>' . $header->get_header(2) . '</th>';
    echo '</tr>';
    foreach ($a_user as $r_user) {
        $compteur++;
        $class = $compteur % 2 == 0 ? "odd" : "even";
        echo "<tr class=\"{$class}\">";
        if ($r_user['use_active'] == 0) {
Beispiel #28
0
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
echo HtmlInput::title_box(_("Navigateur"), "navi_div");
$sql = "\n    select distinct code, me_code,me_description,coalesce(me_description_etendue,me_description) as me_description_etendue,v1menu,v2menu,v3menu,p_type_display,\n    javascript\n    from \n    v_menu_description\n    where user_name=\$1\n    order by 2 ";
$a_menu = $cn->get_array($sql, array($_SESSION['g_user']));
?>
<div class="content">
    <p>
        <?php 
echo _("Vous permet d'accèder rapidement au menu qui vous intéresse, utiliser le filtre pour trouver plus rapidement");
?>
    </p>
    <p style='margin-left: 5%'>
    Filtre : <?php 
echo HtmlInput::filter_table("navi_tb", "0,1,2", '1');
?>
    </p>
    <table id="navi_tb" class="sortable" >
        <tr>
            <th class='sorttable_sorted'>
                Code AD 
                <?php 
echo HtmlInput::infobulle(34);
?>
                <span id="sorttable_sortfwdind">&nbsp;&blacktriangledown;</span>
            </th>
            <th>
                <?php 
echo _("Chemin");
?>