24 |
include_once('class_fiche.php'); |
include_once('class_fiche.php'); |
25 |
include_once ("postgres.php"); |
include_once ("postgres.php"); |
26 |
include_once("check_priv.php"); |
include_once("check_priv.php"); |
27 |
|
if ( isset ($_REQUEST['with_amount'])) include_once("class_poste.php"); |
28 |
$cn=DbConnect($_SESSION['g_dossier']); |
$cn=DbConnect($_SESSION['g_dossier']); |
29 |
|
|
30 |
$rep=DbConnect(); |
$rep=DbConnect(); |
49 |
if ( $o == 0 ) { |
if ( $o == 0 ) { |
50 |
printf("%s",$attribut->ad_text); |
printf("%s",$attribut->ad_text); |
51 |
$o=1; |
$o=1; |
52 |
}else |
}else { |
53 |
printf(";%s",$attribut->ad_text); |
printf(";%s",$attribut->ad_text); |
54 |
|
if ( $attribut->ad_id == ATTR_DEF_ACCOUNT |
55 |
|
&& isset ($_REQUEST['with_amount'])) |
56 |
|
echo ";debit;credit;solde"; |
57 |
|
} |
58 |
} |
} |
59 |
printf("\n"); |
printf("\n"); |
60 |
$o=0; |
$o=0; |
61 |
// Details |
// Details |
62 |
|
// Save the accounting |
63 |
foreach ($e as $detail) { |
foreach ($e as $detail) { |
64 |
foreach ( $detail->attribut as $dattribut ) { |
foreach ( $detail->attribut as $dattribut ) { |
65 |
if ( $o == 0 ) { |
if ( $o == 0 ) { |
66 |
printf("%s",$dattribut->av_text); |
printf("%s",$dattribut->av_text); |
67 |
$o=1; |
$o=1; |
68 |
} else |
} else { |
69 |
printf (";%s",$dattribut->av_text); |
printf (";%s",$dattribut->av_text); |
70 |
|
// if solde resquested |
71 |
|
//-- |
72 |
|
if ( $dattribut->ad_id == ATTR_DEF_ACCOUNT |
73 |
|
&& isset ($_REQUEST['with_amount'])) { |
74 |
|
$account=new poste ($cn,$dattribut->av_text); |
75 |
|
$solde=$account->GetSoldeDetail("j_tech_per between ".$_REQUEST['from_periode']. |
76 |
|
" and ". |
77 |
|
$_REQUEST['to_periode']); |
78 |
|
|
79 |
|
printf(";% 10.2f;% 10.2f;% 10.2f", |
80 |
|
$solde['debit'], |
81 |
|
$solde['credit'], |
82 |
|
$solde['solde'] |
83 |
|
); |
84 |
|
|
85 |
|
|
86 |
|
} |
87 |
|
} |
88 |
} |
} |
89 |
printf("\n"); |
printf("\n"); |
90 |
$o=0; |
$o=0; |