';
echo HtmlInput::hidden('p_jrn_predef', $ledger->id);
$op = new Pre_op_ods($cn);
$op->set('ledger', $ledger->id);
$op->set('ledger_type', "ODS");
$op->set('direct', 't');
$url=http_build_query(array('action'=>'use_opd','p_jrn_predef'=>$ledger->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id()));
echo $op->form_get('do.php?'.$url);
echo '
';
echo '';
echo '
';
// Show the predef operation
// Don't forget the p_jrn
$p_post=$_POST;
if ( isset ($_GET['action']) && ! isset($_POST['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 '' . $ledger->get_name() . '
'; echo ''.$p_msg.'
'; echo ''; echo ""; echo create_script(" update_name()"); if ($g_parameter->MY_DATE_SUGGEST=='Y') { echo create_script(" get_last_date()"); } echo '