Commit fa4c2a68 authored by bureau.si-pro-dap3 dgfip's avatar bureau.si-pro-dap3 dgfip
Browse files

Upload New File

parent 749cde9b
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "cfe-struc.h"
#define TRUE 1
#define FALSE 0
static double arrondi (double donn)
{
donn=floor(donn + 0.5);
return donn;
}
static double CalcUneecotis(double ebase,double etaux)
{
double prod;
prod=arrondi(ebase*etaux/100000/100);
return prod;
}
short cfecalc2021 (struct e1 *etaux,struct e2 *ebase,struct e3 *eindic,struct s1 *ecotis, FILE *efrescc)
{
double NbAnLis = 5;
double avfr ;
double tp;
double cnp;
double frais;
double zttpxc;
double zztpxc;
double cbmincne;
double zttpxs;
double zztpxs;
double cbminsy;
double zttpxe;
double zztpxe;
double cbminepci;
double zttpxt;
double zztpxt;
double cbmintse;
double cexmapi;
double cexmapicvae;
double cbminmapi;
double cextasa;
double cextasacvae;
double cbmintasa;
double zttpxf;
double zztpxf;
double fraisbmin;
double basemini;
double zonea;
double zoneaC;
double zoneaE;
double zoneavC;
double zoneavE;
double zoneb;
double zonebC;
double zonebE;
double zonebvC;
double zonebvE;
double zonec;
double zoned;
double zonee;
double zonef;
double zoneg;
double zoneh;
double drfixe;
double farexo;
double fdnvexo;
short trace = FALSE;
short corse = FALSE;
short alsace_moselle = FALSE;
short depdom = FALSE;
short moselle = FALSE;
short grand_lyon = FALSE;
short st_mart = FALSE;
short non_auto_entr = FALSE;
short df_seul = FALSE;
double tcm;
double zttpx;
double zztpx;
double F1_cne;
double F2_cne;
double F1_epci;
double F2_epci;
double DegExoC;
double DegExoE;
double DegExocvaeC;
double DegExocvaeE;
char naf[39][6]=
{
"4939C",
"5030Z",
"5110Z",
"5510Z",
"5520Z",
"5530Z",
"5610A",
"5610B",
"5610C",
"5621Z",
"5629A",
"5629B",
"5630Z",
"5911A",
"5911B",
"5911C",
"5914Z",
"7420Z",
"7721Z",
"7911Z",
"7912Z",
"7990Z",
"8230Z",
"8551Z",
"8552Z",
"9001Z",
"9002Z",
"9003A",
"9004Z",
"9102Z",
"9103Z",
"9104Z",
"9311Z",
"9312Z",
"9313Z",
"9319Z",
"9321Z",
"9329Z",
"9604Z"
};
int i;
short DegrevementNaf = FALSE;
const double LimiteCA = 1.50000000e8;
avfr=0;
tp=0;
cnp=0;
frais=0;
if (strncmp(eindic->c_csdi,"2A0",sizeof(eindic->c_csdi)) == 0 ||
strncmp(eindic->c_csdi,"2B0",sizeof(eindic->c_csdi)) == 0 )
{
corse=TRUE;
}
if (strncmp(eindic->c_csdi,"971",sizeof(eindic->c_csdi)) == 0 &&
strncmp(eindic->c_ctcn,"127",sizeof(eindic->c_ctcn)) == 0 )
{
st_mart=TRUE;
}
if (strncmp(eindic->c_csdi,"690",sizeof(eindic->c_csdi)) == 0 &&
strncmp(eindic->c_ctcngr,"300",sizeof(eindic->c_ctcngr)) == 0 )
{
grand_lyon=TRUE;
}
trace = (efrescc && eindic && 1 == eindic->s_zttpzz);
if (strncmp(eindic->c_csdi,"570",sizeof(eindic->c_csdi))==0 ||
strncmp(eindic->c_csdi,"670",sizeof(eindic->c_csdi))==0 ||
strncmp(eindic->c_csdi,"680",sizeof(eindic->c_csdi))==0 )
{
alsace_moselle=TRUE;
}
if (strncmp(eindic->c_csdi,"570",sizeof(eindic->c_csdi))==0 )
{
moselle=TRUE;
}
if (strncmp(eindic->c_csdi,"971",sizeof(eindic->c_csdi))==0 ||
strncmp(eindic->c_csdi,"972",sizeof(eindic->c_csdi))==0 ||
strncmp(eindic->c_csdi,"973",sizeof(eindic->c_csdi))==0 ||
strncmp(eindic->c_csdi,"974",sizeof(eindic->c_csdi))==0 )
{
depdom=TRUE;
}
if ((eindic->s_zteice != 0) || (eindic->d_zteimi == 0 || eindic->c_cieimi != "1"))
{
non_auto_entr=TRUE;
}
if (strncmp(eindic->c_cicos,"1",sizeof(eindic->c_cicos))==0)
{
df_seul=TRUE;
}
for (i=0 ; !DegrevementNaf && i<NbNaf+1 ; i++)
DegrevementNaf = strncmp(eindic->c_cnac3,naf[i],sizeof(eindic->c_cnac3))==0;
DegrevementNaf = DegrevementNaf && (eindic->d_ztet47 < LimiteCA);
if (trace)
{
fprintf (efrescc," [- CFECALC2021.C debut -]\n");
fprintf (efrescc," ************************\n");
if (grand_lyon)
{
fprintf (efrescc,"GRAND LYON\n");
fprintf (efrescc,"DIRECTION\n");
fprintf (efrescc," c_csdi =%s\n",eindic->c_csdi);
fprintf (efrescc,"CTCNGR\n");
fprintf (efrescc," c_ctcngr =%s\n",eindic->c_ctcngr);
}
else
{
fprintf (efrescc,"PAS GRAND LYON\n");
fprintf (efrescc,"DIRECTION\n");
fprintf (efrescc," c_csdi =%s\n",eindic->c_csdi);
fprintf (efrescc,"CTCNGR\n");
fprintf (efrescc," c_ctcngr =%s\n",eindic->c_ctcngr);
}
}
if (df_seul)
{
if (trace)
{
fprintf (efrescc,"********************************\n");
fprintf (efrescc,"B. IMPOSITION AU DROIT FIXE SEUL\n");
fprintf (efrescc,"********************************\n");
fprintf (efrescc," INDICATEUR DROIT FIXE SEUL\n");
fprintf (efrescc," c_cicos=%s\n",eindic->c_cicos);
fprintf (efrescc," CODE DIRECTION\n");
fprintf (efrescc," c_csdi=%s\n",eindic->c_csdi);
}
if (non_auto_entr)
{
ecotis->d_ztchma=etaux->s_ztchdf;
if (trace)
{
fprintf (efrescc," a. Indicateurs auto-entrepreneur(s_zteice)(d_zteimi) (c_cieimi) \n");
fprintf (efrescc," *** \n");
fprintf (efrescc," s_zteice =%d\n",eindic->s_zteice);
fprintf (efrescc," d_zteimi =%.0f\n",eindic->d_zteimi);
fprintf (efrescc," c_cieimi =%s\n",eindic->c_cieimi);
fprintf (efrescc," 1* Non Auto-entrepreneur Montant cotisation avant frais (D_ZTCHMA)\n");
fprintf (efrescc," * \n");
fprintf (efrescc," d_ztchma =(%d)\n",etaux->s_ztchdf);
fprintf (efrescc," D_ZTCHMA =%.0f\n",ecotis->d_ztchma);
}
}
if (!alsace_moselle)
{
ecotis->d_zzchma=arrondi(ecotis->d_ztchma*0.054);
ecotis->d_zzchmd=arrondi(ecotis->d_ztchma*0.036);
if (trace)
{
fprintf (efrescc," FAR TCMA - Autres departements\n");
fprintf (efrescc," FAR TCMA =5,4%% de la cotisation avant frais\n");
fprintf (efrescc," D_ZZCHMA= arrondi(%.0f x 5,4%%)\n",ecotis->d_ztchma);
fprintf (efrescc," FDNV TCMA - Autres departements\n");
fprintf (efrescc," FDNV TCMA =3,6%% de la cotisation avant frais\n");
fprintf (efrescc," D_ZZCHMD= arrondi(%.0f x 3,6%%)\n",ecotis->d_ztchma);
}
}
if (alsace_moselle)
{
ecotis->d_zzchma=arrondi(ecotis->d_ztchma*3/100);
ecotis->d_zzchmd=arrondi(ecotis->d_ztchma*5/100);
if (trace)
{
fprintf (efrescc," FAR TCMA - Departements d'Alsace-Moselle (570,670 et 680)\n");
fprintf (efrescc," *FAR TCMA = 3%% de la cotisation avant frais\n");
fprintf (efrescc," D_ZZCHMA= arrondi(%.0f x 3%%)\n",ecotis->d_ztchma);
fprintf (efrescc," FDNV TCMA - Departements d'Alsace-Moselle (570,670 et 680)\n");
fprintf (efrescc," *FDNV TCMA = 5%% de la cotisation avant frais\n");
fprintf (efrescc," D_ZZCHMD= arrondi(%.0f x 5%%)\n",ecotis->d_ztchma);
}
}
ecotis->d_ztchm=ecotis->d_ztchma+ecotis->d_zzchma+ecotis->d_zzchmd;
ecotis->d_zttpct=ecotis->d_ztchm;
ecotis->d_zttpcp=ecotis->d_ztchm;
if (trace)
{
fprintf (efrescc," c. Montant cotisation apres frais (D_ZTCHM)\n");
fprintf (efrescc," *** \n");
fprintf (efrescc," *cotisation TCM apres frais=somme de la cotisation avant frais et des frais de\n");
fprintf (efrescc," gestion\n");
fprintf (efrescc," D_ZTCHM= %.0f + %.0f + %.0f \n",ecotis->d_ztchma,ecotis->d_zzchma,ecotis->d_zzchmd);
fprintf (efrescc," D_ZTCHM=%.0f\n",ecotis->d_ztchm);
fprintf (efrescc," *cotisation mise en recouvrement=Somme a payer=cotisation apres frais de\n");
fprintf (efrescc," gestion\n");
fprintf (efrescc," D_ZTTPCT=%.0f\n",ecotis->d_zttpct);
fprintf (efrescc," Somme a payer D_ZTTPCP=%.0f\n",ecotis->d_zttpcp);
fprintf (efrescc," FIN \n");
}
return 0;
}
if (trace)
{
fprintf (efrescc,"C. IMPOSITION << NORMALE >>\n");
fprintf (efrescc,"****************************\n");
fprintf (efrescc," *** \n");
}
if (!st_mart)
{
basemini = 0;
if (corse)
{
basemini=arrondi(etaux->d_ztbsbm * 0.75);
if (trace)
{
fprintf (efrescc," a) Departements de Corse (2A0 et 2B0)\n");
fprintf (efrescc," *Base de cotisation minimale=75%% de la base \n");
fprintf (efrescc," d_ztbsbm=arrondi(%.0f x 75%%)\n",etaux->d_ztbsbm);
}
}
else
{
basemini = etaux->d_ztbsbm;
if (trace)
{
fprintf (efrescc," b) Autres departements \n");
fprintf (efrescc," *Base de cotisation minimale=84%% de la base apres base mini\n");
fprintf (efrescc," d_ztbsbm=%.0f \n",etaux->d_ztbsbm);
}
}
zttpxc = 0;
zztpxc = 0;
cbmincne = 0;
ecotis->d_ztcnct=CalcUneecotis(ebase->d_ztbsco,etaux->d_ztcntp);
zttpxc=CalcUneecotis(ebase->d_zzcnex,etaux->d_ztcntp);
zztpxc=CalcUneecotis(ebase->d_zxcnex,etaux->d_ztcntp);
cbmincne=CalcUneecotis(basemini,etaux->d_ztcntp);
if (trace)
{
fprintf (efrescc," *** \n");
fprintf (efrescc," 1. cotisations commune(d_ztcnct),cotisation exoneree commune(zttpxc)\n");
fprintf (efrescc," *** \n");
fprintf (efrescc," * cotisation commune=produit de la ebase taxable commune par le etaux de\n");
fprintf (efrescc," taxation commune divise par 10 000 000\n");
fprintf (efrescc," d_ztcnct=CalcUneecotis(%.0f,%.0f)\n",ebase->d_ztbsco,etaux->d_ztcntp);
fprintf (efrescc," D_ZTCNCT=%.0f\n",ecotis->d_ztcnct);
fprintf (efrescc," * cotisation exoneree commune =produit de la ebase exoneree commune par le etaux de\n");
fprintf (efrescc," taxation commune divise par 10 000 000\n");
fprintf (efrescc," zttpxc=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zzcnex,etaux->d_ztcntp);
fprintf (efrescc," zttpxc=%.0f\n",zttpxc);
fprintf (efrescc," * cotisation exoneree commune CVAE=produit de la ebase exoneree commune CVAE par le etaux \n");
fprintf (efrescc," de taxation commune divise par 10 000 000\n");
fprintf (efrescc," 1. cotisations exoneree commune CVAE(zztpxc)\n");
fprintf (efrescc," zztpxc=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zxcnex,etaux->d_ztcntp);
fprintf (efrescc," zztpxc=%.0f\n",zztpxc);
fprintf (efrescc," * cotisation sur ebase minimum cne =produit de la ebase minimum commune par le etaux de\n");
fprintf (efrescc," taxation commune divise par 10 000 000\n");
fprintf (efrescc," 1. cotisations sur ebase minimum commune(cbmincne)\n");
fprintf (efrescc," cbmincne=CalcUneecotis(%.0f,%.0f)\n",basemini,etaux->d_ztcntp);
fprintf (efrescc," CBMINCNE=%.0f\n",cbmincne);
}
zttpxs = 0;
zztpxs = 0;
cbminsy = 0;
if (etaux->d_ztcnsy > 0)
{
ecotis->d_ztcncs=CalcUneecotis(ebase->d_ztbsco,etaux->d_ztcnsy);
zttpxs=CalcUneecotis(ebase->d_zzcnex,etaux->d_ztcnsy);
zztpxs=CalcUneecotis(ebase->d_zxcnex,etaux->d_ztcnsy);
cbminsy=CalcUneecotis(basemini,etaux->d_ztcnsy);
if (trace)
{
fprintf (efrescc," *** \n");
fprintf (efrescc," 1.2 cotisations syndicat(d_ztcncs),cotisation exoneree syndicat(zttpxs)\n");
fprintf (efrescc," *** \n");
fprintf (efrescc," * cotisation syndicat=produit de la ebase taxable syndicale par le etaux de\n");
fprintf (efrescc," taxation syndicat divise par 10 000 000\n");
fprintf (efrescc," d_ztcncs=CalcUneecotis(%.0f,%.0f)\n",ebase->d_ztbsco,etaux->d_ztcnsy);
fprintf (efrescc," D_ZTCNCS=%.0f\n",ecotis->d_ztcncs);
fprintf (efrescc," * cotisation exoneree syndicat =produit de la ebase exoneree commune par le etaux de\n");
fprintf (efrescc," taxation syndicat divise par 10 000 000\n");
fprintf (efrescc," zttpxs=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zzcnex,etaux->d_ztcnsy);
fprintf (efrescc," zttpxs=%.0f\n",zttpxs);
fprintf (efrescc," * cotisation exoneree syndicat CVAE=produit de la ebase exoneree commune CVAE par le\n");
fprintf (efrescc," etaux de taxation syndicat divise par 10 000 000\n");
fprintf (efrescc," 1. cotisations exoneree syndicat CVAE(zztpxs)\n");
fprintf (efrescc," zztpxs=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zxcnex,etaux->d_ztcnsy);
fprintf (efrescc," zztpxs=%.0f\n",zztpxs);
fprintf (efrescc," *1.3.cotisation sur ebase minimum syndicat =produit de la ebase minimum syndicat par le etaux de\n");
fprintf (efrescc," taxation syndicat divise par 10 000 000\n");
fprintf (efrescc," cbminsy=CalcUneecotis(%.0f,%.0f)\n",basemini,etaux->d_ztcnsy);
fprintf (efrescc," CBMINSY=%.0f\n",cbminsy);
}
}
if (trace)
{
fprintf (efrescc," *** \n");
fprintf (efrescc," *indicateur code TSE(s_ztcnep) \n");
fprintf (efrescc," s_ztcnep=%d\n",eindic->s_ztcnep);
fprintf (efrescc,"******************************************** \n");
}
ecotis->d_ztcnce = 0;
zttpxt = 0;
zztpxt= 0;
ecotis->d_zttpgp = 0;
zttpxt = 0;
zztpxt = 0;
cbmintse = 0;
if (eindic->s_ztcnep == 1)
{
if (trace)
{
fprintf (efrescc," *** \n");
fprintf (efrescc," 2. TAUX TSE (D_ZTCH,)\n");
fprintf (efrescc," *** \n");
fprintf (efrescc," *Taux TSE=Taux TSE - Taux TASARIF\n");
fprintf (efrescc," d_ztch=%.0f-%.0f)\n",etaux->d_ztch,etaux->d_ztcht3);
}
etaux->d_ztch=etaux->d_ztch-etaux->d_ztcht3;
ecotis->d_ztcnce=CalcUneecotis(ebase->d_ztbsts,etaux->d_ztch);
if (trace)
{
fprintf (efrescc," D_ZTCH=%.0f\n",etaux->d_ztch);
fprintf (efrescc," *** \n");
fprintf (efrescc," 2. cotisations TSE (D_ZTCNCE,)\n");
fprintf (efrescc," *** \n");
fprintf (efrescc," * cotisation TSE=produit de la ebase TSE par le etaux de taxation TSE\n");
fprintf (efrescc," divise par 10 000 000\n");
fprintf (efrescc," d_ztcnce=CalcUneecotis(%.0f,%.0f)\n",ebase->d_ztbsts,etaux->d_ztch);
fprintf (efrescc," D_ZTCNCE=%.0f\n",ecotis->d_ztcnce);
}
if (trace)
{
fprintf (efrescc," *** \n");
fprintf (efrescc," cotisations exoneree TSE (zttpxt) \n");
fprintf (efrescc," *** INDICATEURS***\n");
fprintf (efrescc," *****************\n");
fprintf (efrescc," C_CICUU=%s\n",etaux->c_cicuu);
fprintf (efrescc," ***\n");
fprintf (efrescc," *** ZONE ***\n");
fprintf (efrescc," C_CIETZ=%s\n",eindic->c_cietz);
fprintf (efrescc," *****************\n");
}
if ((strncmp(etaux->c_cicuu,"U",sizeof(etaux->c_cicuu)) == 0) || (strncmp(eindic->c_cietz, "Z",sizeof(eindic->c_cietz)) == 0) || (strncmp(eindic->c_cietz, "O",sizeof(eindic->c_cietz)) == 0))
{
zttpxt=CalcUneecotis(ebase->d_zzcuex,etaux->d_ztch);
zztpxt=CalcUneecotis(ebase->d_zxcuex,etaux->d_ztch);
if (trace)
{
fprintf (efrescc," *cotisation exoneree tse =produit de la ebase exoneree epci par le etaux de\n");
fprintf (efrescc," taxation tse divise par 10 000 000\n");
fprintf (efrescc," zttpxt=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zzcuex,etaux->d_ztch);
fprintf (efrescc," zttpxt=%.0f\n",zttpxt);
fprintf (efrescc," *cotisation exoneree tse cvae =produit de la ebase exoneree epci cvae par\n");
fprintf (efrescc," le etaux de taxation tse divise par 10 000 000\n");
fprintf (efrescc," zztpxt=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zxcuex,etaux->d_ztch);
fprintf (efrescc," zztpxt=%.0f\n",zztpxt);
}
}
else
{
zttpxt=CalcUneecotis(ebase->d_zzcnex,etaux->d_ztch);
zztpxt=CalcUneecotis(ebase->d_zxcnex,etaux->d_ztch);
if (trace)
{
fprintf (efrescc," *cotisation exoneree tse =produit de la ebase exoneree epci par le etaux de\n");
fprintf (efrescc," taxation tse divise par 10 000 000\n");
fprintf (efrescc," zttpxt=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zzcnex,etaux->d_ztch);
fprintf (efrescc," zttpxt=%.0f\n",zttpxt);
fprintf (efrescc," *cotisation exoneree tse cvae =produit de la ebase exoneree epci cvae par\n");
fprintf (efrescc," le etaux de taxation tse divise par 10 000 000\n");
fprintf (efrescc," zztpxt=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zxcnex,etaux->d_ztch);
fprintf (efrescc," zztpxt=%.0f\n",zztpxt);
}
}
cbmintse=CalcUneecotis(basemini,etaux->d_ztch);
if (trace)
{
fprintf (efrescc," *cotisation sur ebase minimum TSE =produit de la ebase minimum TSE par le etaux de\n");
fprintf (efrescc," taxation tse divise par 10 000 000\n");
fprintf (efrescc," Cotisations sur ebase minimum TSE(cbmintse)\n");
fprintf (efrescc," cbmintse=CalcUneecotis(%.0f,%.0f)\n",basemini,etaux->d_ztch);
fprintf (efrescc," CBMINTSE=%.0f\n",cbmintse);
}
ecotis->d_zttpgp=CalcUneecotis(ebase->d_ztbsts,etaux->d_ztchgp);
if (trace)
{
fprintf (efrescc," Cotisations TSE Grand Paris (D_ZTTPGP)\n");
fprintf (efrescc," d_zttpgp=CalcUneecotis(%.0f,%.0f)\n",ebase->d_ztbsts,etaux->d_ztchgp);
fprintf (efrescc," D_ZTTPGP=%.0f\n",ecotis->d_zttpgp);
}
}
cextasa = 0;
cextasacvae = 0;
cbmintasa= 0;
cexmapi = 0;
cexmapicvae = 0;
cbminmapi = 0;
if (trace)
{
fprintf (efrescc," *** \n");
fprintf (efrescc," *indicateur code TSE(s_ztcnep) \n");
fprintf (efrescc," s_ztcnep=%d\n",eindic->s_ztcnep);
fprintf (efrescc,"******************************************** \n");
}
if (eindic->s_ztcnep == 1)
{
ecotis->d_ztrgif=CalcUneecotis(ebase->d_ztbsif,etaux->d_ztcht3);
if (trace)
{
fprintf (efrescc," *cotisation TASARIF=produit de la ebase tasarif par le etaux\n");
fprintf (efrescc," de taxation TASARIF divise par 10 000 000\n");
fprintf (efrescc," ecotis->d_ztrgif=CalcUneecotis(%.0f,%.0f)\n",ebase->d_ztbsif,etaux->d_ztcht3);
fprintf (efrescc," D_ZTRGIF=%.0f\n",ecotis->d_ztrgif);
}
if ((strncmp(etaux->c_cicuu,"U",sizeof(etaux->c_cicuu)) == 0) || (strncmp(eindic->c_cietz, "Z",sizeof(eindic->c_cietz)) == 0) || (strncmp(eindic->c_cietz, "O",sizeof(eindic->c_cietz)) == 0))
{
cextasa=CalcUneecotis(ebase->d_zzcuex,etaux->d_ztcht3);
cextasacvae=CalcUneecotis(ebase->d_zxcuex,etaux->d_ztcht3);
if (trace)
{
fprintf (efrescc," *cotisation exoneree TASARIF =produit de la ebase TASARIF par le etaux de\n");
fprintf (efrescc," taxation TASARIF divise par 10 000 000\n");
fprintf (efrescc," cextasa=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zzcuex,etaux->d_ztcht3);
fprintf (efrescc," CEXTASA=%.0f\n",cextasa);
fprintf (efrescc," *cotisation exoneree TASARIF CVAE=produit de la ebase exoneree TASARIF cvae par\n");
fprintf (efrescc," le etaux de taxation TASARIF divise par 10 000 000\n");
fprintf (efrescc," cextasacvae=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zxcuex,etaux->d_ztcht3);
fprintf (efrescc," CEXTASACVAE=%.0f\n",cextasacvae);
}
}
else
{
cextasa=CalcUneecotis(ebase->d_zzcnex,etaux->d_ztcht3);
cextasacvae=CalcUneecotis(ebase->d_zxcnex,etaux->d_ztcht3);
if (trace)
{
fprintf (efrescc," *cotisation exoneree TASARIF =produit de la ebase exoneree commune par le etaux de\n");
fprintf (efrescc," taxation TASARIF divise par 10 000 000\n");
fprintf (efrescc," cextasa=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zzcnex,etaux->d_ztcht3);
fprintf (efrescc," CEXTASA=%.0f\n",cextasa);
fprintf (efrescc," *cotisation exoneree TASARIF cvae=produit de la ebase exoneree commune cvae par le etaux\n");
fprintf (efrescc," de taxation TASARIF divise par 10 000 000\n");
fprintf (efrescc," cextasacvae=CalcUneecotis(%.0f,%.0f)\n",ebase->d_zxcnex,etaux->d_ztcht3);
fprintf (efrescc," CEXTASACVAE=%.0f\n",cextasacvae);
}
}
cbmintasa=CalcUneecotis(basemini,etaux->d_ztcht3);
if (trace)
{
fprintf (efrescc," *cotisation sur ebase minimum TASARIF =produit de la ebase minimum TASARIF par le etaux de\n");
fprintf (efrescc," taxation TASARIF divise par 10 000 000\n");
fprintf (efrescc," Cotisations sur ebase minimum TASARIF(cbmintasa)\n");
fprintf (efrescc," cbmintasa=CalcUneecotis(%.0f,%.0f)\n",basemini,etaux->d_ztcht3);
fprintf (efrescc," CBMINTASA=%.0f\n",cbmintasa);
}
}
if (trace)
{
fprintf (efrescc," ** INDICATEUR Collectivite TGEMAPI **\n");
fprintf (efrescc," C_CITPAI =%s\n",eindic->c_citpai);
}
if ((strncmp(eindic->c_citpai, "E",sizeof(eindic->c_citpai)) == 0) || (strncmp(eindic->c_citpai, "C",sizeof(eindic->c_citpai)) == 0))
{
ecotis->d_ztcuge=CalcUneecotis(ebase->d_ztbsge,etaux->d_ztcht4);
if (trace)
{
fprintf (efrescc," *cotisation TGEMAPI=produit de la ebase tgemapi par le etaux\n");
fprintf (efrescc," de taxation TGMAPI divise par 10 000 000\n");
fprintf (efrescc," ecotis->d_ztcuge=CalcUneecotis(%.0f,%.0f)\n",ebase->d_ztbsge,etaux->d_ztcht4);
fprintf (efrescc," D_ZTCUGE=%.0f\n",ecotis->d_ztcuge);
}
if ((strncmp(etaux->c_cicuu,"U",sizeof(etaux->c_cicuu)) == 0) || (strncmp(eindic->c_cietz, "Z",sizeof(eindic->c_cietz)) == 0) || (strncmp(eindic->c_cietz, "O",sizeof(eindic->c_cietz)) == 0))