get_first('ODS'); $ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger; // check if we can write in the ledger if ( $g_user->check_jrn($ledger->id)=='X') { alert(_("Vous ne pouvez pas écrire dans ce journal, contactez votre administrateur")); return; } echo '
'; echo '
'; echo '

' . $ledger->get_name() . '

'; echo '
'; // Show the predef operation // Don't forget the p_jrn $p_post=$_POST; if ( isset ($_GET['action']) && ! isset($_POST['correct']) && ! isset($correct) ) { if ( $_GET['action']=='use_opd') { // get data from predef. operation $op=new Pre_op_advanced($cn); $p_post=null; if ( isset($_REQUEST['pre_def']) && $_REQUEST['pre_def'] != '') { $op->set_od_id($_REQUEST['pre_def']); $p_post=$op->compute_array(); } } } $p_msg=(isset($p_msg))?$p_msg:""; print '

'.$p_msg.'

'; echo '
'; echo dossier::hidden(); echo HtmlInput::request_to_hidden(array('ac','jr_optype')); echo $ledger->input($p_post); echo '
'; echo ''. ''.td(_('Débit')) . '' . td(_('Crédit')) . ' ' . td(_('Difference')) . ' '; echo '
'; echo '
'; $iconcerned=new IConcerned('jrn_concerned'); $iconcerned->amount_id="totalDeb"; echo "Opération rapprochée : ".$iconcerned->input(); echo '

'; echo HtmlInput::button('add', _('Ajout d\'une ligne'), 'onClick="quick_writing_add_row()"'); echo HtmlInput::submit('summary', _('Sauvez')); echo '

'; echo '
'; echo ""; echo create_script(" update_name()"); if (!isset($_REQUEST['e_date']) && $g_parameter->MY_DATE_SUGGEST=='Y') { echo create_script(" get_last_date()"); } echo '
'; ?>