'; echo '
'; $sel=new ISelect(); $sel->name="jrn"; $sel->value=$cn->make_array("select jrn_def_id,jrn_def_name from ". " jrn_def where jrn_def_type in ('VEN','ACH','ODS') order by jrn_def_name"); // Show a list of ledger $sel->selected=$request_jrn; echo 'Choisissez un journal '.$sel->input(); echo dossier::hidden(); $hid=new IHidden(); echo $hid->input("sa","jrn"); echo $hid->input("ac",$request_ac); echo '
'; echo HtmlInput::submit('Accepter','Accepter'); echo '
'; // if $_REQUEST[sa] == del delete the predefined operation if ( $request_sa == 'del') { $op=new Pre_operation($cn); $op->od_id=$_REQUEST['od_id']; $op->delete(); $request_sa='jrn'; } // if $_REQUEST[sa] == jrn show the predefined operation for this // ledger if ( $request_sa== 'jrn' ) { $op=new Pre_operation($cn); $op->set_jrn($get_jrn); $is_ods = $cn->get_value("select count(*) from jrn_def where jrn_def_id=$1 and jrn_def_type='ODS'", array($get_jrn)); $op->od_direct = ($is_ods > 0) ? 't' : 'f'; $array = $op->get_list_ledger(); if (empty($array) == true) { echo _("Aucun enregistrement"); return; } echo ''; $count=0; foreach ($array as $row ) { if ( $count %2 == 0 ) echo ''; else echo ''; $count++; echo ''; echo ''; echo ''; $b=HtmlInput::button('mod'.$row['od_id'],"Modifier","onclick=\"mod_predf_op('".dossier::id()."','".$row['od_id']."');\""); echo td($b); echo ''; } echo '
'.h($row['od_name']).''.h($row['od_description']).''; echo '
'; echo dossier::hidden(); echo $hid->input("sa","del"); echo $hid->input("ac",$request_ac); echo $hid->input("del",""); echo $hid->input("od_id",$row['od_id']); echo $hid->input("jrn",$get_jrn); $b=''; echo $b; echo '
'; echo '
'; } echo ''; ?>