noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
ledger_detail_fin.php
Go to the documentation of this file.
00001 <?php
00002 //This file is part of NOALYSS and is under GPL 
00003 //see licence.txt
00004 $str_anc="";
00005 ?><?php require_once('template/ledger_detail_top.php'); ?>
00006 <div class="content" style="padding:0;">
00007 <?php 
00008   require_once('class_own.php');
00009   $owner=new Own($cn);
00010 require_once ('class_anc_plan.php');
00011 require_once('class_anc_operation.php');
00012 
00013 ?>
00014     <?php if ( $access=='W') : ?>
00015 <form class="print" onsubmit="return op_save(this);">
00016    <?php endif; ?>
00017 
00018     <?php echo HtmlInput::hidden('whatdiv',$div).HtmlInput::hidden('jr_id',$jr_id).dossier::hidden();?>
00019             <table style="width:100%"><tr><td>
00020 <table>
00021 <tr>
00022 <?php
00023 $date=new IDate('p_date');
00024 $date->value=format_date($obj->det->jr_date);
00025  echo td(_('Date')).td($date->input());
00026 
00027  ?>
00028 
00029 </tr>
00030 
00031 <tr>
00032 <?php 
00033 $bk=new Fiche($cn,$obj->det->array[0]['qf_bank']);
00034 $view_card_detail=HtmlInput::card_detail($bk->get_quick_code(),h($bk->getName()), ' class="line" ');
00035 echo td(_('Compte en banque')).td($view_card_detail).td();;
00036 
00037 ?>
00038 </tr>
00039 <tr>
00040 <?php 
00041 
00042 $bk=new Fiche($cn,$obj->det->array[0]['qf_other']);
00043 $view_card_detail=HtmlInput::card_detail($bk->get_quick_code(),h($bk->getName()), ' class="line" ');
00044 
00045 echo td(_('Tiers')).td($view_card_detail);
00046 ?>
00047 </tr>
00048 
00049 <tr>
00050 <?php 
00051   $itext=new IText('lib');
00052   $itext->value=strip_tags($obj->det->jr_comment);
00053   $itext->size=40;
00054   echo td(_('Libellé')).td($itext->input(),' colspan="2" style="width:auto"');
00055 
00056 
00057 ?>
00058 </tr>
00059 <tr>
00060 <?php echo td(_('montant')).td(nbm($obj->det->array[0]['qf_amount']),' class="inum"');?>
00061 </tr>
00062 <tr>
00063 <?php 
00064 $itext=new IText('npj');
00065 $itext->value=strip_tags($obj->det->jr_pj_number);
00066 echo td(_('Pièce')).td($itext->input());
00067 ?>
00068 
00069 </tr>
00070 </table>
00071 </td>
00072                 <td style="width:50%;height:100%;vertical-align:top;text-align: center">
00073                     <table style="width:99%;height:8rem;vertical-align:top;">
00074                         <tr style="height: 5%">
00075                             <td style="text-align:center;vertical-align: top">
00076                                 Note
00077                             </td></tr>
00078                         <tr>
00079                             <td style="text-align:center;vertical-align: top">
00080                                 <?php
00081                                 $inote = new ITextarea('jrn_note');
00082                                 $inote->style=' class="itextarea" style="width:90%;height:100%;"';
00083                                 $inote->value = strip_tags($obj->det->note);
00084                                 echo $inote->input();
00085                                 ?>
00086 
00087                             </td>
00088                         </tr>
00089                     </table>
00090                 </td>
00091 
00092 </tr>
00093 </table>
00094 
00095 </td>
00096 <div class="myfieldset">
00097 <?php 
00098   $detail=new Acc_Misc($cn,$obj->jr_id);
00099   $detail->get();
00100 ?>
00101 <?php 
00102  if ($owner->MY_ANALYTIC != 'nu' /*&& $div == 'popup'*/){
00103       $anc=new Anc_Plan($cn);
00104       $a_anc=$anc->get_list(' order by pa_id ');
00105       $x=count($a_anc);
00106       /* set the width of the col */
00107       $str_anc .= '<th colspan="'.$x.'" style="width:auto;text-align:center">'._('Compt. Analytique').'</th>';
00108 
00109       /* add hidden variables pa[] to hold the value of pa_id */
00110       $str_anc .= Anc_Plan::hidden($a_anc);
00111     }
00112     bcscale(2);
00113   for ($e=0;$e<count($detail->det->array);$e++) {
00114     $row=''; $q=$detail->det->array;
00115     $fiche=new Fiche($cn);
00116     $fiche->get_by_qcode($q[$e]['j_qcode']);
00117    /* Analytic accountancy */
00118     if ( $owner->MY_ANALYTIC != "nu" /*&& $div == 'popup'*/)
00119       {
00120         $poste=$fiche->strAttribut(ATTR_DEF_ACCOUNT);
00121         if ( preg_match('/^(6|7)/',$q[$e]['j_poste']))
00122           {
00123             $qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE);
00124             $anc_op=new Anc_Operation($cn);
00125             $anc_op->j_id=$q[$e]['j_id'];
00126             $anc_op->in_div=$div;
00127             $str_anc.='<tr>';
00128             $str_anc.=td($poste);
00129             $str_anc.=td($qcode);
00130             $str_anc.=td(nbm($q[$e]['j_montant']));
00131             $str_anc.='<td>';
00132             $str_anc.= HtmlInput::hidden('op[]',$anc_op->j_id);
00133             $montant=($q[$e]['j_debit'] == "t")?$q[$e]['j_montant']:bcmul($q[$e]['j_montant'], -1);
00134             $str_anc.=$anc_op->display_table(1,$montant,$div);
00135             $str_anc.='</td>';
00136             $str_anc.='</tr>';
00137 
00138           } 
00139       }
00140   }
00141 ?>
00142 </div>
00143 <?php 
00144 require_once 'ledger_detail_bottom.php';
00145 ?>
00146 </div>
 All Data Structures Namespaces Files Functions Variables Enumerations