diff --git a/html/poste_pdf.php b/html/poste_pdf.php index a80851f1b..e6c5bff8a 100644 --- a/html/poste_pdf.php +++ b/html/poste_pdf.php @@ -101,7 +101,37 @@ foreach ($a_poste as $poste) $pdf->ln(); $tot_deb+=$row['deb_montant']; $tot_cred+=$row['cred_montant']; - + /* -------------------------------------- */ + /* if details are asked we show them here */ + /* -------------------------------------- */ + if ( isset($_GET['oper_detail'])){ + $detail=new Acc_Operation($cn); + $detail->jr_id=$row['jr_id']; + $a_detail=$detail->get_jrnx_detail(); + for ($f=0;$fCell($size[$l],6,'',0,0,$align[$l]);$l++; + $pdf->Cell($size[$l],6,$a_detail[$f]['j_qcode'],0,0,$align[$l]);$l++; + $pdf->Cell($size[$l],6,$a_detail[$f]['j_poste'],0,0,$align[$l]);$l++; + if ( $a_detail[$f]['j_qcode']=='') + $lib=$a_detail[$f]['pcm_lib']; + else + { + $f_id=$cn->get_value('select f_id from vw_poste_qcode where j_qcode=$1',array($a_detail[$f]['j_qcode'])) ; + $lib=$cn->get_value('select av_text from jnt_fic_att_value join attr_value using (jft_id) where ad_id=$1 and f_id=$2', + array(ATTR_DEF_NAME,$f_id)); + } + $pdf->Cell($size[$l],6,$lib,0,0,$align[$l]);$l++; + $pdf->Cell($size[$l],6,(($a_detail[$f]['letter']!=-1)?$a_detail[$f]['letter']:''),0,0,$align[$l]);$l++; + + $deb=($a_detail[$f]['debit']=='D')?$a_detail[$f]['j_montant']:''; + $cred=($a_detail[$f]['debit']=='C')?$a_detail[$f]['j_montant']:''; + + $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$deb)),0,0,$align[$l]);$l++; + $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$cred)),0,0,$align[$l]);$l++; + $pdf->ln(); + } + } } $str_debit=sprintf("% 12.2f €",$tot_deb); $str_credit=sprintf("% 12.2f €",$tot_cred); diff --git a/html/quick_code_pdf.php b/html/quick_code_pdf.php index f924ca090..fbde96bb6 100644 --- a/html/quick_code_pdf.php +++ b/html/quick_code_pdf.php @@ -86,7 +86,38 @@ $pdf->Ln(); $pdf->ln(); $tot_deb+=$row['deb_montant']; $tot_cred+=$row['cred_montant']; - + /* -------------------------------------- */ + /* if details are asked we show them here */ + /* -------------------------------------- */ + if ( isset($_GET['oper_detail'])){ + $detail=new Acc_Operation($cn); + $detail->jr_id=$row['jr_id']; + $a_detail=$detail->get_jrnx_detail(); + for ($f=0;$fCell($size[$l],6,'',0,0,$align[$l]);$l++; + $pdf->Cell($size[$l],6,$a_detail[$f]['j_qcode'],0,0,'L');$l++; + $pdf->Cell($size[$l],6,$a_detail[$f]['j_poste'],0,0,'R');$l++; + if ( $a_detail[$f]['j_qcode']=='') + $lib=$a_detail[$f]['pcm_lib']; + else + { + $f_id=$cn->get_value('select f_id from vw_poste_qcode where j_qcode=$1',array($a_detail[$f]['j_qcode'])) ; + $lib=$cn->get_value('select av_text from jnt_fic_att_value join attr_value using (jft_id) where ad_id=$1 and f_id=$2', + array(ATTR_DEF_NAME,$f_id)); + } + $pdf->Cell($size[$l],6,$lib,0,0,$align[$l]);$l++; + $pdf->Cell($size[$l],6,(($a_detail[$f]['letter']!=-1)?$a_detail[$f]['letter']:''),0,0,$align[$l]);$l++; + + $deb=($a_detail[$f]['debit']=='D')?$a_detail[$f]['j_montant']:''; + $cred=($a_detail[$f]['debit']=='C')?$a_detail[$f]['j_montant']:''; + + $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$deb)),0,0,$align[$l]);$l++; + $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$cred)),0,0,$align[$l]);$l++; + $pdf->ln(); + } + } + } $str_debit=sprintf("% 12.2f €",$tot_deb); $str_credit=sprintf("% 12.2f €",$tot_cred); diff --git a/include/impress.inc.php b/include/impress.inc.php index 6b1d1b60a..6e1b1be7f 100644 --- a/include/impress.inc.php +++ b/include/impress.inc.php @@ -34,7 +34,7 @@ $p_array=array(array ("?p_action=impress&type=jrn&".$str_dossier,_("Journaux")), array("?p_action=impress&type=poste&".$str_dossier,_("Poste")), array("?p_action=impress&type=fiche&".$str_dossier,_("Catégorie de fiche")), array("?p_action=impress&type=rapport&".$str_dossier,_("Rapport")), - array("?p_action=impress&type=rec&".$str_dossier,_("Réconciliation")), + array("?p_action=impress&type=rec&".$str_dossier,_("Rapprochement")), array('?p_action=impress&type=bal&'.$str_dossier,_('Balance des comptes')), array("?p_action=impress&type=bilan&".$str_dossier,_("Bilan")) ); diff --git a/include/impress_poste.inc.php b/include/impress_poste.inc.php index 026c6f630..6e312b421 100644 --- a/include/impress_poste.inc.php +++ b/include/impress_poste.inc.php @@ -34,18 +34,7 @@ require_once('class_acc_operation.php'); // Show the jrn and date //----------------------------------------------------- require_once('class_database.php'); -echo JS_LEDGER; -echo JS_PROTOTYPE; -echo JS_INFOBULLE; require_once('class_ipopup.php'); -echo js_include('accounting_item.js'); -echo js_include('prototype.js'); -echo js_include('scriptaculous.js'); -echo js_include('effects.js'); -echo js_include('controls.js'); -echo js_include('dragdrop.js'); -echo js_include('card.js'); -echo js_include('acc_ledger.js'); echo IPoste::ipopup('ipop_account'); echo ICard::ipopup('ipopcard'); @@ -175,13 +164,13 @@ if ( isset( $_REQUEST['bt_html'] ) ) { if ( empty($Poste->row)) exit(); $Poste->load(); echo ''; - echo ''; + echo ''; /* avoid duplicates */ $old=array(); foreach ($Poste->row as $detail) { if ( in_array($detail['jr_id'],$old) == TRUE ) continue; $old[]=$detail['jr_id']; - echo ''; + echo ''; $op=new Acc_Operation($cn); $op->jr_id=$detail['jr_id']; @@ -240,14 +229,14 @@ if ( isset( $_REQUEST['bt_html'] ) ) { // Detail //---------------------------------------------------------------------- echo Acc_Account_Ledger::HtmlTableHeader(); - echo '

'. $_GET['poste_id'].' '.h($Poste->label).'

'. $_GET['poste_id'].' '.h($Poste->label).'

'.$detail['j_date'].' '.$detail['jr_internal'].h($detail['description']).'
'.$detail['j_date'].' '.$detail['jr_internal'].h($detail['description']).'
'; + echo '
'; foreach ($a_poste as $poste_id ) { $Poste=new Acc_Account_Ledger ($cn,$poste_id['pcm_val']); $Poste->load(); $Poste->get_row_date( $_GET['from_periode'], $_GET['to_periode']); if ( empty($Poste->row)) continue; - echo ''; + echo ''; $detail=$Poste->row[0]; @@ -257,7 +246,7 @@ if ( isset( $_REQUEST['bt_html'] ) ) { /* avoid duplicates */ if ( in_array($detail['jr_id'],$old) == TRUE ) continue; $old[]=$detail['jr_id']; - echo ''; + echo ''; $op=new Acc_Operation($cn); $op->poste=$poste_id['pcm_val']; diff --git a/include/impress_rec.inc.php b/include/impress_rec.inc.php index 376b9105a..1e8c49975 100644 --- a/include/impress_rec.inc.php +++ b/include/impress_rec.inc.php @@ -35,6 +35,7 @@ echo load_all_script(); *@file *@todo add the export to PDF */ +echo '
'; echo '
'; $rjrn=''; $radio=new IRadio('choice'); @@ -45,22 +46,23 @@ echo dossier::hidden().HtmlInput::hidden('p_action','impress').HtmlInput::hidden echo '
    '; $radio->selected=($choice==0)?true:false;$radio->value=0; -echo '
  1. '.$radio->input().'Opérations réconcilées'.'
  2. '; +echo '
  3. '.$radio->input().'Opérations rapprochées'.'
  4. '; $radio->selected=($choice==1)?true:false;$radio->value=1; -echo '
  5. '.$radio->input().'Opérations réconcilées avec des montants différents'.'
  6. '; +echo '
  7. '.$radio->input().'Opérations rapprochées avec des montants différents'.'
  8. '; $radio->selected=($choice==2)?true:false;$radio->value=2; -echo '
  9. '.$radio->input().'Opérations réconcilées avec des montants identiques'.'
  10. '; +echo '
  11. '.$radio->input().'Opérations rapprochées avec des montants identiques'.'
  12. '; $radio->selected=($choice==3)?true:false;$radio->value=3; -echo '
  13. '.$radio->input().'Opérations non réconcilées'.'
  14. '; +echo '
  15. '.$radio->input().'Opérations non rapprochées'.'
  16. '; echo '
  17. '.HtmlInput::submit('vis',_('Visualisation')).'
  18. '; -echo ''; +echo '
'; echo ''; echo '
'; echo '
'; +echo '
'; echo '
'; if ( ! isset($_GET['vis'])) exit(); $a=new Acc_Reconciliation($cn);

'. $poste_id['pcm_val'].' '.h($Poste->label).'

'. $poste_id['pcm_val'].' '.h($Poste->label).'

'. $detail['j_date'].' '.$detail['jr_internal'].' '.hb($detail['description']).' '.hi($detail['jr_pj_number']).'
'. $detail['j_date'].' '.$detail['jr_internal'].' '.hb($detail['description']).' '.hi($detail['jr_pj_number']).'