Пример #1
0
        echo $export_csv;
        $a_cat = $cn->get_array("select fd_id from vw_fiche_def where ad_id=" . ATTR_DEF_ACCOUNT . " order by fd_label asc");
        $nb_cat = count($a_cat);
        for ($i = 0; $i < $nb_cat; $i++) {
            $bal->display_category($_GET['start'], $a_cat[$i]['fd_id'], 'let');
        }
        echo $export_csv;
    }
    return;
}
/*************************************************************************************************************************
 * Balance en-cours
/*************************************************************************************************************************/
if ($_GET['histo'] == 7) {
    require_once NOALYSS_INCLUDE . '/class_balance_age.php';
    $bal = new Balance_Age($cn);
    $export_csv = '<FORM METHOD="get" ACTION="export.php" style="display:inline">';
    $export_csv .= HtmlInput::request_to_hidden(array('gDossier', 'ac', 'p_let', 'p_date_start'));
    $export_csv .= HtmlInput::hidden('p_date_start', $_GET['start']);
    $export_csv .= HtmlInput::hidden('act', 'CSV:balance_age');
    $export_csv .= HtmlInput::hidden('p_let', 'unlet');
    $export_csv .= HtmlInput::hidden('p_type', 'X');
    $export_csv .= HtmlInput::hidden('cat', $_GET['cat']);
    $export_csv .= HtmlInput::hidden('all', $allcard);
    $export_csv .= HtmlInput::submit('csv', _('Export CSV'));
    $export_csv .= '</FORM><p></p>';
    if ($allcard == 0) {
        echo $export_csv;
        $bal->display_category($_GET['start'], $_GET['cat'], 'unlet');
        echo $export_csv;
    } else {
$export_csv = '<FORM METHOD="get" ACTION="export.php" style="display:inline">';
$export_csv .= HtmlInput::request_to_hidden(array('gDossier', 'ac'));
$export_csv .= HtmlInput::hidden('p_date_start', '01.01.2000');
$export_csv .= HtmlInput::hidden('act', 'CSV:balance_age');
$export_csv .= HtmlInput::hidden('p_let', $let);
$export_csv .= HtmlInput::hidden('p_type', 'U');
$export_csv .= HtmlInput::hidden('fiche', $_GET['f_id']);
$export_csv .= HtmlInput::submit('csv', _('Export CSV'));
$export_csv .= '</FORM>';
?>
<form method="get">
    <?php 
echo "Tout";
?>
<input type="checkbox" name="p_let" value="1">
    <?php 
echo HtmlInput::request_to_hidden(array('ac', 'gDossier', 'sb', 'sc', 'f_id'));
?>
    <input type="submit" class="smallbutton" value="<?php 
echo _('Valider');
?>
">
</form>   
<?php 
echo '<div class="content" style="width:98%;margin-left:1%">';
echo $export_csv;
$fiche = new Fiche($cn, $_GET['f_id']);
$bal = new Balance_Age($cn);
$bal->display_card('01.01.2000', $fiche->id, $let);
echo $export_csv;
echo '</div>';
Пример #3
0
echo _("Type de tiers") . " " . $w_select->input();
?>
   <?php 
echo HtmlInput::submit("view", _('Valider'));
?>
</form>

<?php 
if (!isset($_GET['view'])) {
    html_page_stop();
    return;
}
?>
<form method="get" action="export.php">
    <?php 
echo HtmlInput::request_to_hidden(array('gDossier', 'ac', 'p_type', 'p_let', 'p_date_start'));
echo HtmlInput::hidden('act', 'CSV:balance_age');
echo HtmlInput::submit('csv', _('export CSV'));
?>
</form>
<?php 
require_once 'class_balance_age.php';
$balance = new Balance_Age($cn);
$type = HtmlInput::default_value_get('p_type', 'C');
$let = HtmlInput::default_value_get('p_let', 'unlet');
$date = HtmlInput::default_value_get('p_date_start', date('d.m.Y'));
if ($type == "C") {
    $balance->display_sale($date, $let);
} else {
    $balance->display_purchase($date, $let);
}
 * @brief Export an ageing balance
 * @param p_date_start considered writing after this date
 * @param p_let lettered or not value (all): let or  only unlettered value:unlet
 * @param p_type
 *  - C customer
 *  - F supplier
 *  - U only a card 
 *  - X a category 
 * @param cat only if p_type = X it that case contains the category id (fiche_def.fd_id)
 * @param fiche only if p_type = U in that case contains the card id (fiche.f_id)
 * @param all Ony with p_type = X all the customer / supplier cards
 */
/*
 * Retrieve card
 */
$bal = new Balance_Age($cn);
$p_type = HtmlInput::default_value_get('p_type', "-");
$p_date = HtmlInput::default_value_get('p_date_start', "-");
$p_let = HtmlInput::default_value_get('p_let', "let");
$cat = HtmlInput::default_value_get('cat', "");
$fiche = HtmlInput::default_value_get('fiche', "0");
$all = HtmlInput::default_value_get('all', "0");
switch ($p_type) {
    case 'C':
        $bal->get_array_card('C');
        $bal->export_csv($p_date, $p_let);
        break;
    case 'F':
        $bal->get_array_card('F');
        $bal->export_csv($p_date, $p_let);
        break;