Commit Graph
23 Commits
Author SHA1 Message Date
Michael 30440be275 fix: use IS NOT FALSE to keep suppliers without foucad entry in commandes-auto 2026-04-24 12:16:13 +02:00
Michael 6d7b1fb44d fix: exclude suppliers with foucad.actif=false from commandes-auto 2026-04-24 12:13:35 +02:00
Michael a68e706805 feat: add GET /api/fournisseurs/:code/franco endpoint 2026-04-24 12:05:47 +02:00
Michael 7312b84233 fix: resolve duplicate rows in commandes-auto caused by fouport multi-site join 2026-04-24 11:44:26 +02:00
Michael 2f920d8623 fix: use fouident.nom instead of FOUADR1.RAISONSOCIALE for supplier names in articles routes 2026-04-24 11:06:34 +02:00
Michael e15852a6aa feat: implement API routes for article search, details, and movement history 2026-04-24 10:54:11 +02:00
Michael 6f2b98864e feat: implement express route handlers for movements, articles, and suppliers data retrieval 2026-04-24 10:49:53 +02:00
Michael 204fd97d7d Merge branch 'main' of https://github.com/R0m1k3/Apiflow 2026-04-24 10:05:39 +02:00
Michael d3052a6235 feat: implement movement and article route handlers and register them in the main application entry point 2026-04-24 10:05:37 +02:00
MichaelandClaude Sonnet 4.6 c75fd5c56d fix: utiliser FOUPORT2.SEUIL comme source principale du franco fournisseur
FOUCAD ne couvre que 53/153 fournisseurs actifs (commande auto uniquement).
FOUPORT2.SEUIL est la source officielle de l'ERP et couvre 108 fournisseurs.
4 fournisseurs dans COMMANDE_AUTO_QTEPROPO n'avaient pas de franco visible
(IMDIFA, MYCANDYSHOP, PTIT CLOWN, PUCKATOR BV).

- Sync : ajout de FOUPORT et FOUPORT2 dans le pipeline de synchronisation
- API : franco = COALESCE(fouport2.seuil, foucad.franco) dans les deux routes
- Schema PG : création des tables fouport et fouport2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:58:15 +02:00
MichaelandClaude Sonnet 4.6 6e5bc3bc07 feat: ajout endpoint /api/commandes-auto avec franco fournisseur
- Nouvelle route GET /api/commandes-auto : propositions par site et fournisseur
  avec comparaison au franco (franco_atteint, ecart_franco)
- Nouvelle route GET /api/commandes-auto/:codefou : détail articles d'un fournisseur
- Sync FOUCAD (config commande auto + franco) vers PostgreSQL
- Ajout table foucad dans init.sql

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 15:24:51 +02:00
Michael 9e993b3559 feat: implement advertising data synchronization and API endpoints for performance tracking 2026-04-07 10:34:36 +02:00
Michael 7df3025fd8 feat: add performance route for sales analytics, hit parades, and dashboard metrics 2026-04-01 09:56:05 +02:00
Michael 5fb99dc7f5 feat: add performance analytics routes for sales, hit parades, and dashboard metrics 2026-04-01 09:31:13 +02:00
Michael 371f80c844 Dashboard top10: rank per site instead of global 2026-03-21 11:50:23 +01:00
Michael 9675a243b7 feat: Implement initial API backend with a comprehensive PostgreSQL schema, Express application, and data synchronization for articles and ranking. 2026-03-21 10:01:02 +01:00
MichaelandClaude Opus 4.6 792ddc71d2 feat: add ranking table sync and API endpoints
Sync Ranking table from SQL Server to PostgreSQL with ranking_ca,
ranking_qte, ranking_mag_* metrics. Expose via /api/ranking and
integrate into /api/articles/:id/referentiel response.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:54:04 +01:00
Michael 8cafc196cf feat: add API routes for sales performance metrics including turnover, hit parade, nomenclature, and product range analysis. 2026-03-19 10:30:56 +01:00
MichaelandClaude Sonnet 4.6 9bc372c959 fix: taux_marge toujours 0 - MntMvtTTC négatif pour les ventes, utiliser ABS(MntMvtHt)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:42:58 +01:00
MichaelandClaude Sonnet 4.6 f052529db6 fix: mouvements/types - grouper par GenreMvt uniquement (évite 28MB pour les tickets)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 16:52:45 +01:00
Michael c98f6834a8 feat: Implement article list, detail, and referential endpoints, and document the monthly article analysis endpoint. 2026-03-18 16:46:46 +01:00
Michael 2101606bb4 feat: implement stock management API endpoints and update the API documentation. 2026-03-18 12:03:18 +01:00
MichaelandClaude Sonnet 4.6 d565ed9f10 Initial commit : API Node.js + PostgreSQL + sync service Docker
- API Express/pg connectée à PostgreSQL (converti depuis mssql)
- 8 routes : articles, fournisseurs, commandes, stock, mouvements, performance, schema, sync
- Service sync nightly (mssql → pg, cron 3h00)
- Docker Compose : postgres + api + sync + frpc (tunnel sortant)
- Schéma PostgreSQL 17 tables dans postgres/init.sql

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 10:10:47 +01:00