eureka2 / G6K

Generator of calculation simulator (calculator)
MIT License
20 stars 19 forks source link

Differenc between browser view and API result #11

Closed nliprandi closed 5 years ago

nliprandi commented 5 years ago

Hi

I'm making some test with the API on the simulator provided here : https://www.data.gouv.fr/fr/datasets/simulateur-de-cout-du-certificat-dimmatriculation-carte-grise/

capture d ecran 2018-11-22 a 16 09 42

here is the same request's result using API version

"attributes": { "demarche": "1", "franceOuImport": "1", "typeVehicule": "1", "declareVehiculeDemonstration": "2", "puissanceAdministrative": "50", "energie": "1", "invalidite": "2", "receptionCommunautaire": "1", "tauxCO2": "350", "departement": "92", "taxeRegionaleY1": "2308.00", "taxeAdditionnelleFortePuissance": "0.00", "taxeFormationProfessionnelleY2": "0.00", "Y3_taxe": "0.00", "Y3_Malus": "10500.00", "taxeGestionY4": "4.00", "redevanceAcheminementY5": "2.76", "taxesAPayerY6": "12814.76" },

As you can see, the Y1 bis fileds is set but in the API result, it's still at 0 (: "taxeAdditionnelleFortePuissance": "0.00",

Thanks for your time

Nicolas

eureka2 commented 5 years ago

Hi,

You must add 'declareVehiculeDeCollection=2' in the API request:

api?demarche=1&franceOuImport=1&typeVehicule=1&declareVehiculeDemonstration=2&puissanceAdministrative=52&energie=1&invalidite=2&receptionCommunautaire=1&tauxCO2=350&departement=92&declareVehiculeDeCollection=2

Best regards

nliprandi commented 5 years ago

Hi

You rock, thanks a lot for your help

Best

Ironika commented 5 years ago

Hi

I have the same kind of issue

on simulator, it's ok capture d ecran 2019-01-03 a 10 48 43

but when i call api with this params api?demarche=1&franceOuImport=1&typeVehicule=1&declareVehiculeDemonstration=2&puissanceAdministrative=8&energie=2&invalidite=2&receptionCommunautaire=1&tauxCO2=125&departement=92&declareVehiculeDeCollection=2

result give me capture d ecran 2019-01-03 a 10 43 45

Y3 is equal to "", so the taxeY6 is not calculate, any help ? i missing some params ?

Thanks for your time Kevin Hoquet

Ironika commented 5 years ago

ok the issue come to datas that are not valid for 2019 yet.

eureka2 commented 5 years ago

Hi,

Yes, your database does not seem to contain data for this new year

Best regards