'.
'
Etape 3 '.
''.dossier::name($_REQUEST['f']).' '.
'";
echo widget::button_href('Retour',$back);
exit(0);
}
/* --------------------------------------------------
* Step 4 we import data from the selected folder and year and
* transform it into a misc operation
*/
if ( $sa=='step4') {
echo '';
echo '
Dernière étape ';
$cn_target=DbConnect($_REQUEST['f']);
$saldo=new Acc_Ledger($cn_target,0);
$array=$saldo->get_saldo_exercice($_REQUEST['p_periode']);
/* we need to transform the array into a Acc_Ledger array */
$result=array();
$result['desc']='Ecriture d\'ouverture';
$result['nb_item']=sizeof($array);
$result['p_jrn']=$_REQUEST['p_jrn'];
$idx=0;
foreach ($array as $row ) {
$qcode='qc_'.$idx;
$poste='poste'.$idx;
$amount='amount'.$idx;
$ck='ck'.$idx;
$result[$qcode] = $row['j_qcode'];
if ( $row['j_qcode']=='')
$result[$poste] = $row['j_poste'];
$result[$amount] = abs($row['solde']);
if ( $row['solde'] > 0 ) $result[$ck]='on';
$idx++;
}
$cn=DbConnect(dossier::id());
$User=new User($cn);
$jrn=new Acc_Ledger($cn,$_REQUEST['p_jrn']);
echo '';
echo widget::button_href('Retour',$back);
echo ' ';
}