phpcompta-contrib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-contrib] Patch pour rendre le listing TVA annuel et non par e


From: Stan Pinte
Subject: [Phpcompta-contrib] Patch pour rendre le listing TVA annuel et non par exercice
Date: Sat, 18 Mar 2006 16:05:44 +0100
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Salut,

mon premier exercice s'étends sur 22 mois (2004-2005), et donc j'ai eu
besoin de faire ce patch pour pouvoir calculer un listing TVA 2005.

Dany, les autres, dites-moi ce que vous en pensez,

Une autre amélioration serait de ne sélectionner les ventes que pour les
clients assujetis à la TVA...(par exemple ayant un numéro de TVA non
null dans leur fiche). Dany, une suggestion pour implémenter cela? Je
crois que tu as des classes utilitaires pour les fiches, non? qui
permettent de retrouver un champ?

puis si tout le monde est d'accord je committe.

Stan;
Index: include/class_customer.php
===================================================================
RCS file: /cvsroot/phpcompta/phpcompta/include/class_customer.php,v
retrieving revision 1.1
diff -u -r1.1 class_customer.php
--- include/class_customer.php  25 Jul 2005 20:56:42 -0000      1.1
+++ include/class_customer.php  18 Mar 2006 14:54:59 -0000
@@ -66,11 +66,8 @@
  *     - array
  */
   function VatListing($p_year) {
-    $cond_sql=" and A.j_tech_per = B.j_tech_per 
-         and A.j_tech_per= any (select p_id 
-             from parm_periode
-              where 
-              p_exercice='$p_year')";
+    $cond_sql=" and A.j_date = B.j_date 
+      and extract(year from A.j_date) ='$p_year'";
     
     // BASE ACCOUNT
     // for belgium
@@ -157,4 +154,4 @@
   }
 }
 
-?>
\ No newline at end of file
+?>
Index: include/impress_listing_client.php
===================================================================
RCS file: /cvsroot/phpcompta/phpcompta/include/impress_listing_client.php,v
retrieving revision 1.3
diff -u -r1.3 impress_listing_client.php
--- include/impress_listing_client.php  30 Oct 2005 21:17:50 -0000      1.3
+++ include/impress_listing_client.php  18 Mar 2006 14:54:59 -0000
@@ -69,7 +69,7 @@
 echo '<TABLE>';
 
 print '<TR>';
-$year=make_array($cn,"select distinct p_exercice,p_exercice from  
parm_periode");
+$year=make_array($cn,"select distinct extract(year from jr_date), extract(year 
from jr_date) from jrn");
 $w->label="Année concernée";
 print $w->IOValue('year',$year);
 print "</TR>";

reply via email to

[Prev in Thread] Current Thread [Next in Thread]