Пример #1
0
    $array = $_POST;
    $ledger = new Acc_Ledger($cn, $_REQUEST['p_jrn']);
    $ledger->with_concerned = false;
    try {
        $ledger->save($array);
        $jr_id = $cn->get_value('select jr_id from jrn where jr_internal=$1', array($ledger->internal));
        echo '<h2> Op&eacute;ration enregistr&eacute;e  Piece ' . h($ledger->pj) . '</h2>';
        if (strcmp($ledger->pj, $_POST['e_pj']) != 0) {
            echo '<h3 class="notice">' . _('Attention numéro pièce existante, elle a du être adaptée') . '</h3>';
        }
        printf('<a class="detail" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a><hr>', $jr_id, dossier::id(), $ledger->internal);
        // show feedback
        echo '<div id="jrn_name_div">';
        echo '<h2 id="jrn_name" style="display:inline">' . $ledger->get_name() . '</h2>';
        echo '</div>';
        echo $ledger->confirm($_POST, true);
    } catch (Exception $e) {
        require 'operation_ods_new.inc.php';
        alert($e->getMessage());
    }
    return;
}
/* --------------------------------------------------
 * step 1 if nothing is asked we show the available folders
 */
if ($sa == '') {
    echo '<div class="content">';
    echo '<h1 class="legend"> Etape 1 </h1>';
    echo 'Choisissez le dossier où sont les soldes à importer';
    $avail = $g_user->get_available_folder();
    if (empty($avail)) {