mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-22 06:28:09 +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
|
ORDER BY m.artnoid, m.datmvt DESC, af.no_id DESC
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
lr.codefou AS code,
|
lr.codefou AS code,
|
||||||
MAX(f.raisonsociale)::text AS nom,
|
MAX(CASE WHEN lr.codefou = 'D005' THEN 'Dépôt'
|
||||||
|
ELSE f.raisonsociale END)::text AS nom,
|
||||||
m.site,
|
m.site,
|
||||||
TO_CHAR(m.datmvt, 'YYYY-MM') AS mois,
|
TO_CHAR(m.datmvt, 'YYYY-MM') AS mois,
|
||||||
SUM(-m.mntmvtttc)::float AS ca_ttc
|
SUM(-m.mntmvtttc)::float AS ca_ttc
|
||||||
|
|||||||
Reference in new issue
Block a user