function test_me()
 {
     $cn = new Database(dossier::id());
     $anco = new Anc_Operation($cn);
     $j_id = 200;
     $anco->j_id = $j_id;
     $array = $anco->get_by_jid($j_id);
     $a = $anco->to_request($array, 1);
     echo '<form>';
     echo dossier::hidden();
     echo HtmlInput::hidden('j_id', $j_id);
     echo HtmlInput::hidden('test_select', $_REQUEST['test_select']);
     echo $anco->display_table(1, 15002, 0);
     echo '<input type="submit" name="save">';
     echo '</form>';
     if (isset($_REQUEST['save'])) {
         echo "to_save";
         var_dump($_REQUEST);
     }
     var_dump($a);
 }
    $montant = td(nbm($q[$e]['j_montant']), 'class="num"');
    $row .= $q[$e]['j_debit'] == 't' ? $montant : td('');
    $row .= $q[$e]['j_debit'] == 'f' ? $montant : td('');
    /* Analytic accountancy */
    if ($owner->MY_ANALYTIC != "nu") {
        if (preg_match('/^(6|7)/', $q[$e]['j_poste'])) {
            echo HtmlInput::hidden("amount_t" . $amount_idx, $q[$e]['j_montant']);
            $anc_op = new Anc_Operation($cn);
            $anc_op->j_id = $q[$e]['j_id'];
            $anc_op->in_div = $div;
            $str_anc .= '<tr>';
            $str_anc .= HtmlInput::hidden('op[]', $anc_op->j_id);
            $str_anc .= td($q[$e]['j_qcode']);
            $str_anc .= td($q[$e]['j_poste']);
            $str_anc .= td($q[$e]['j_montant']);
            $str_anc .= $anc_op->display_table(1, $q[$e]['j_montant'], $div);
            $str_anc .= '</tr>';
            $amount_idx++;
        } else {
            $row .= td('');
        }
    }
    $class = $e % 2 == 0 ? ' class="even"' : 'class="odd"';
    echo tr($row, $class);
}
?>
</table>
</div>
<?php 
require_once NOALYSS_INCLUDE . '/template/ledger_detail_bottom.php';
?>
示例#3
0
    $total_tvac = bcadd($total_tvac, $tvac);
    $total_htva = bcadd($htva, $total_htva);
    /* Analytic accountancy */
    if ($owner->MY_ANALYTIC != "nu") {
        $poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
        if (preg_match('/^(6|7)/', $poste)) {
            $anc_op = new Anc_Operation($cn);
            $anc_op->j_id = $q['j_id'];
            $anc_op->in_div = $div;
            echo HtmlInput::hidden('op[]', $anc_op->j_id);
            /* compute total price */
            bcscale(2);
            $str_anc .= '<tr>';
            $str_anc .= td($qcode);
            $str_anc .= td(nbm($htva));
            $str_anc .= $anc_op->display_table(1, $htva, $div);
        } else {
            $row .= td('');
        }
    }
    $class = $e % 2 == 0 ? ' class="even"' : 'class="odd"';
    echo tr($row, $class);
}
if ($owner->MY_TVA_USE == 'Y') {
    $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"');
} else {
    $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"');
}
$row .= td(nbm($total_htva), 'class="num" style="font-style:italic;font-weight: bolder;"');
if ($owner->MY_TVA_USE == 'Y') {
    $row .= td("") . td("") . td(nbm($total_tvac), 'class="num" style="font-style:italic;font-weight: bolder;"');
示例#4
0
    $row = '';
    $q = $detail->det->array;
    $fiche = new Fiche($cn);
    $fiche->get_by_qcode($q[$e]['j_qcode']);
    /* Analytic accountancy */
    if ($owner->MY_ANALYTIC != "nu") {
        $poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
        if (preg_match('/^(6|7)/', $q[$e]['j_poste'])) {
            $qcode = $fiche->strAttribut(ATTR_DEF_QUICKCODE);
            $anc_op = new Anc_Operation($cn);
            $anc_op->j_id = $q[$e]['j_id'];
            $anc_op->in_div = $div;
            $str_anc .= '<tr>';
            $str_anc .= td($poste);
            $str_anc .= td($qcode);
            $str_anc .= td(nbm($q[$e]['j_montant']));
            $str_anc .= '<td>';
            $str_anc .= HtmlInput::hidden('op[]', $anc_op->j_id);
            $montant = $q[$e]['j_debit'] == "t" ? $q[$e]['j_montant'] : bcmul($q[$e]['j_montant'], -1);
            $str_anc .= $anc_op->display_table(1, $montant, $div);
            $str_anc .= '</td>';
            $str_anc .= '</tr>';
        }
    }
}
?>
</div>
<?php 
require_once NOALYSS_INCLUDE . '/template/ledger_detail_bottom.php';
?>
</div>