Beispiel #1
0
    echo HtmlInput::hidden('ac', $_REQUEST['ac']);
    echo dossier::hidden();
    echo "</form>";
    echo HtmlInput::button_anchor('Retour', $back . '&sa=step2&f=' . $_REQUEST['f']);
    exit(0);
}
/* --------------------------------------------------
 * Step 4 we import data from the selected folder and year and
 * transform it into a misc operation
 */
if ($sa == 'step4') {
    echo '<div class="content">';
    echo '<div><h1 class="legend"> Dernière étape</h1>';
    $cn_target = new Database($_REQUEST['f']);
    $saldo = new Acc_Ledger($cn_target, 0);
    $array = $saldo->get_saldo_exercice($_REQUEST['p_periode']);
    /*  we need to transform the array into a Acc_Ledger array */
    $result = array();
    $result['desc'] = 'Ecriture d\'ouverture';
    $result['nb_item'] = sizeof($array);
    $result['p_jrn'] = $_REQUEST['p_jrn'];
    $idx = 0;
    foreach ($array as $row) {
        $qcode = 'qc_' . $idx;
        $poste = 'poste' . $idx;
        $amount = 'amount' . $idx;
        $ck = 'ck' . $idx;
        $result[$qcode] = $row['j_qcode'];
        if (trim($row['j_qcode']) == '') {
            $result[$poste] = $row['j_poste'];
        }