예제 #1
0
            }
            $a_row = array();
            for ($j = 0; $j < count($row) / 2; $j++) {
                $a_row[] = $row[$j];
            }
            fputcsv($output, $a_row, ';');
            unset($a_row);
        }
    }
}
//-----------------------------------------------------------------------------
// Detailled printing
// For miscellaneous legder or all ledgers
//-----------------------------------------------------------------------------
if ($get_option == 0) {
    $Jrn->get_row($get_from_periode, $get_to_periode);
    if (count($Jrn->row) == 0) {
        exit;
    }
    foreach ($Jrn->row as $op) {
        // should clean description : remove <b><i> tag and '; char
        $desc = $op['description'];
        $desc = str_replace("<b>", "", $desc);
        $desc = str_replace("</b>", "", $desc);
        $desc = str_replace("<i>", "", $desc);
        $desc = str_replace("</i>", "", $desc);
        $desc = str_replace('"', "'", $desc);
        $desc = str_replace(";", ",", $desc);
        printf("\"%s\";\"%s\";\"%s\";\"%s\";\"%s\";\"%s\";%s;%s\n", $op['j_id'], $op['jr_pj_number'], $op['internal'], $op['j_date'], $op['poste'], $desc, nb($op['deb_montant']), nb($op['cred_montant']));
    }
    exit;
예제 #2
0
print HtmlInput::submit('bt_html', 'Visualisation');
echo '</FORM>';
echo '<hr>';
//-----------------------------------------------------
// If print is asked
// First time in html
// after in pdf or cvs
//-----------------------------------------------------
if (isset($_REQUEST['bt_html'])) {
    require_once NOALYSS_INCLUDE . '/class_acc_ledger.php';
    $d = var_export($_GET, true);
    $Jrn = new Acc_Ledger($cn, $_GET['jrn_id']);
    $Jrn->get_name();
    switch ($_GET['p_simple']) {
        case "0":
            $Row = $Jrn->get_row($_GET['from_periode'], $_GET['to_periode']);
            break;
        case "1":
            $Row = $Jrn->get_rowSimple($_GET['from_periode'], $_GET['to_periode']);
            break;
        case "2":
            $Row = $Jrn->get_rowSimple($_GET['from_periode'], $_GET['to_periode']);
            break;
        default:
            var_dump($_GET['p_simple']);
            die(__FILE__ . ":" . __LINE__ . " error unknown style ");
    }
    $rep = "";
    $hid = new IHidden();
    echo '<div class="content">';
    echo '<h2 class="info">' . h($Jrn->name) . '</h2>';