mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-11 17:26:32 +02:00
fix: override D005 display name from 'BAZAR 5000' to 'Dépôt'
D005 is the main active supplier (95k+ articles, fournisseur principal) but its historical name in the FF Nancy ERP is 'BAZAR 5000' since 2004. The store no longer associates this code with BAZAR 5000 — it is their Dépôt. Override via CASE WHEN in SQL since the ERP name cannot be changed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
cfd3a7e601
commit
853a36cb97
1 file changed
+3
-2
@@ -660,8 +660,9 @@ export async function pgGetCaByFournisseur(
|
||||
ORDER BY m.artnoid, m.datmvt DESC, af.no_id DESC
|
||||
)
|
||||
SELECT
|
||||
lr.codefou AS code,
|
||||
MAX(f.raisonsociale)::text AS nom,
|
||||
lr.codefou AS code,
|
||||
MAX(CASE WHEN lr.codefou = 'D005' THEN 'Dépôt'
|
||||
ELSE f.raisonsociale END)::text AS nom,
|
||||
m.site,
|
||||
TO_CHAR(m.datmvt, 'YYYY-MM') AS mois,
|
||||
SUM(-m.mntmvtttc)::float AS ca_ttc
|
||||
|
||||
Reference in new issue
Block a user