/[phpcompta]/phpcompta/include/user_common.php
ViewVC logotype

Diff of /phpcompta/include/user_common.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.38 by sparkyx, Fri Jun 17 10:44:40 2005 UTC revision 1.39 by sparkyx, Fri Jun 17 10:50:52 2005 UTC
# Line 341  function ListJrn($p_cn,$p_jrn,$p_where=" Line 341  function ListJrn($p_cn,$p_jrn,$p_where="
341    $r.="<th>Op. Concernée</th>";    $r.="<th>Op. Concernée</th>";
342    $r.="<th>Document</th>";    $r.="<th>Document</th>";
343    $r.="</tr>";    $r.="</tr>";
   // Get the jrn type  
344    
   $jrn_prop=($p_jrn == 0 )?0:$jrn_prop=GetJrnProp($p_cn,$p_jrn,1);    
345    for ($i=0; $i < $Max;$i++) {    for ($i=0; $i < $Max;$i++) {
346      $row=pg_fetch_array($Res,$i);      $row=pg_fetch_array($Res,$i);
347            
# Line 373  function ListJrn($p_cn,$p_jrn,$p_where=" Line 371  function ListJrn($p_cn,$p_jrn,$p_where="
371  // Amount  // Amount
372          // If the ledger is financial :          // If the ledger is financial :
373          // the credit must be negative and written in red          // the credit must be negative and written in red
374            // Get the jrn type
375            $jrn_prop=GetJrnProp($p_cn,$row['jrn_def_id'],1);  
376          $positive=0;          $positive=0;
377          if ( $p_jrn !=0 && $jrn_prop['jrn_def_type'] == 'FIN' ) {          if ( $jrn_prop['jrn_def_type'] == 'FIN' ) {
378            $positive = CountSql($p_cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ".            $positive = CountSql($p_cn,"select * from jrn inner join jrnx on jr_grpt_id=j_grpt ".
379                     " where jr_id=".$row['jr_id']." and (j_poste like '55%' or j_poste like '57%' )".                     " where jr_id=".$row['jr_id']." and (j_poste like '55%' or j_poste like '57%' )".
380                                 " and j_debit='f'");                                 " and j_debit='f'");

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26