[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-contrib] mes cogitations sur la foncti on "decl de TVA mensue
From: |
Stan Pinte |
Subject: |
[Phpcompta-contrib] mes cogitations sur la foncti on "decl de TVA mensuelle" ... à suivre. |
Date: |
Fri, 24 Jun 2005 11:27:07 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
- déclaration de TVA mensuelle.
* sommer le total des ventes à 21% - à 12% - à 6%
* sommer le total des achats (idéalement splitté en matières premières,
biens d'invest et ...cf la fiche associée à l'achat, si c'est une fiche
marchandise ou une fiche S&B divers)
simple: faire un select des achats
select * from jrnx where j_grpt in (select jr_grpt_id from jrn where
jr_def_id=3and jr_date<'2003-01-31'
and jr_date>'2003-01-01') and ('' || j_poste) LIKE '61%'
problème: comment lie-t'on un poste à une fiche????
je comprends enfin un peu plus la structure des fiches...faudrait qu'on
fasse un schéma de la DB!!! avec des explications. Ce serait plus simple.
select jnt_fic_att_value.f_id from jnt_fic_att_value, attr_value
where jnt_fic_att_value.ad_id=5
and attr_value.jft_id = jnt_fic_att_value.jft_id
and attr_value.av_text = '610001'
--> écrire une fonction si yen a pas.
maintenant trouver la classe de base d'une fiche.
* sommer la TVA due
* sommer la TVA à récup
-- tva à 21%
select sum(j_montant) from jrnx where j_poste = 4113
and j_date<'2003-01-31'
and j_date>'2003-01-01'
* TVA nette: (positif = due, négatif=à récup)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-contrib] mes cogitations sur la foncti on "decl de TVA mensuelle" ... à suivre.,
Stan Pinte <=