Espace client

Modele de Donnees v8.0

29 entites · 2 nouvelles entites : ProductLink (Sales BOM / substitution) + QualityLevel (referentiel configurable) · Product.quality pointe sur QualityLevel · Ship To ST Crolles x 4 confirmes · Reclassification Mercury spare vials en SPA

+ ProductLink — Sales BOM · substitution · Mere/Composant + QualityLevel — referentiel qualite configurable (remplace quality enum fixe) ~ Product — quality_level_id FK (remplace quality enum) · Sales BOM via ProductLink
Classification produit — 2 axes independants
Axe produit — classification (visible site web)
ProductType
Visible sur le site web
SPA EQU OPT SRV
ProductCategory
Rattachee au Type · OBLIGATOIRE
Optics Mechanics Chucks
ProductFamily
Porte l'URL site web · OBLIGATOIRE
Wafer Handling Probe Accessories
short_desc_guide affiche a la creation produit
Product
Feuille de la classification
MDC-SPA-31-0042-00
Axe code — Division (interne uniquement, dans le code MDC)
ProductDivision
Atelier de fabrication client · Present dans le code MDC (position 2) · Non visible sur le site web
31 Litho 32 Implant 33 Etch
La Division est un critere de codification, pas de classification.
MDC-SPA-31-0042-00
ProductFamily porte l'URL — liaison directe Nexus / site web. Ex: /products/spares/optics/wafer-handling
short_desc_guide — texte guide affiche a la creation d'un nouveau produit dans la famille.
Division ≠ hierarchie — visible dans Nexus (codification, sourcing interne) mais absente de la classification produit externe.
Format du code produit MDC (v3.0 — inchange)
MDC
Prefixe
SPA
Type · 3c
31
Division · 2c
0042
Sequence · 4c
00
Qualite · 2c
MDC-SPA-31-0042-00 → Spare Part · Litho · N°42 · Neuf MDC-EQU-34-0001-00 → Equipement · Epitaxie · Neuf MDC-SRV-00-0001-00 → Service (pas de division) MDC-SPA-37-0015-00 → Mercury spare vial · Metrologie · Neuf (reclassifie SPA en v8)
Entites v8.0 — 29 entites
Acteurs
🏢
Customer
Client MDC (Sold To)
UPD v7
  • idPK
  • namestring
  • vat_numberN° TVA intracommunautaire
  • vat_applicablev7boolean — ex: CERN exonere
  • bill_toaddress
  • contact_emailstring
  • currencyISO code (CHF/EUR/USD...)
  • payment_term_daysint — delai paiement (jours)
  • sirenv7string(9) — nullable
  • siretv7string(14) — nullable
  • chorus_pro_codev7string(110) — nullable
🏭
Supplier
Fournisseur
  • idPK
  • namestring
  • default_incotermEXW/CIF/DDP
  • default_discountdecimal %
  • payment_term_daysint — delai paiement (jours)
👤
Contact
Interlocuteur client ou fournisseur
UPD
  • idPK
  • customer_idFK→ Customer (nullable)
  • supplier_idFK→ Supplier (nullable)
  • contact_typeCUSTOMER / SUPPLIER / BOTH
  • first_name · last_namestring
  • email · phonestring
  • rolestring
Adresses de livraison
📦
ShipTo
Adresse de livraison (enrichie v7)
UPD v7
  • idPK
  • customer_idFK→ Customer (nullable — N:N possible)
  • labelstring — libelle site
  • address · city · zipstring
  • country_idFK→ Country
  • incotermv7.1string — ex: DDP, DAP, EXW (nullable)
  • incoterm_sourcev7.1string — lieu d'origine (nullable)
  • carrierv7string — ex: FedEx, DHL
  • carrier_accountv7string — n° compte client transporteur
Regle v7.0 — Hierarchie Sold To / Bill To / Ship To

Un Customer = un Sold To = 1 Bill To + N Ship To. Une meme adresse ShipTo peut etre partagee entre plusieurs Customers (N:N).

Cas confirme en v8 — ST Crolles x 4
ST Crolles 1 → Bill To A → ShipTo Crolles 1 / ShipTo ECTRA (partage)
ST Crolles 2 → Bill To B → ShipTo Crolles 2 / ShipTo ECTRA (partage)
ST Montrouge → Bill To C → ShipTo Montrouge (DAP)
ST ECTRA → Bill To D → ShipTo ECTRA (EXW Geneva) — partage ST Crolles 1+2
ShipTo ECTRA = partage entre ST Crolles 1 et ST Crolles 2

Incoterm + Carrier (v7.1) : chaque ShipTo porte ses conditions logistiques. Modifiables a la generation via Document.carrier_override et Document.incoterm_override.

Hierarchie produit
🏷️
ProductType
Table de reference
  • codePKstring(3)
  • labelstring
  • site_urlstring
🏭
ProductDivision
Ateliers fabrication
UPD
  • division_codePKint
  • division_namestring
📂
ProductCategory
Sous le Type
  • idPK
  • product_type_codeFK→ ProductType
  • code · labelstring
🔗
ProductFamily
Porte l'URL site web
UPD
  • idPK
  • category_idFK→ Category
  • labelstring
  • site_urlstring
  • short_desc_guidestring — guide nommage
QualityLevel
Referentiel qualite configurable
NEW v8
  • idPK
  • codev8string(2) — ex: 00, 01, 02
  • labelv8string — ex: Neuf, Reconditionne, Grade B
  • descriptionv8text nullable — detail du niveau qualite
  • is_activev8boolean
  • sort_orderv8int — ordre d'affichage
📦
Product
Entite centrale — mise a jour v8
UPD v8
  • idPK
  • mdc_refMDC-TYP-DIV-SEQ-QAL
  • description_shortstring 64c
  • description_longtext 1000c
  • product_typeSPA/EQU/OPT/SRV
  • quality_level_idFKv8→ QualityLevel (remplace quality enum)
  • division_idFK→ Division
  • category_idFK→ Category
  • product_family_idFK→ Family
  • oem_refoptionnel
  • sourcing_originTRADING/MDC_DE/COPE
  • customs_tariff_idFK→ CustomsTariff
  • country_of_origin_idFK→ Country
  • shipping_containerCARTON/PALETTE
  • unit · weightstring / decimal
  • statusACTIVE/INACTIVE/OBSOLETE
Sales BOM & Substitutions — NEW v8
🧩
ProductLink
Lien inter-produits (Sales BOM)
NEW v8
  • idPK
  • parent_product_idFKv8→ Product (produit mere)
  • child_product_idFKv8→ Product (composant / substitut)
  • link_typev8enum: COMPONENT / SUBSTITUTE / ACCESSORY
  • quantityv8decimal nullable — qte composant (ex: 1 vial / Mercury Probe)
  • notesv8text nullable
  • is_activev8boolean
Regle v8.0 — Sales BOM et reclassification Mercury spare vials

Contexte atelier 7 : Les flacons de mercure (spare vials) pour Mercury Probe sont des Spare Parts (SPA), pas des Options logistiques. Ils ont ete reclassifies SPA en v8. La relation mere/composant est maintenant capturee dans ProductLink.

Cas concret — Mercury Probe
Product: Mercury Probe (MDC-EQU-37-0001-00)
↳ ProductLink (COMPONENT): spare vial (MDC-SPA-37-0015-00) · qty=1
↳ ProductLink (ACCESSORY): Quik Chuck (MDC-EQU-37-0002-00)
link_type=SUBSTITUTE : propose un produit alternatif en cas de rupture
COMPONENT
Composant vendu avec le produit mere (spare vial → Mercury Probe)
SUBSTITUTE
Alternative proposee si le produit est indisponible (meme fonction)
ACCESSORY
Accessoire complementaire propose lors de la commande
Mapping codes
🔄
ProductSupplierCode
Mapping codes fournisseurs
UPD
  • idPK
  • product_idFK→ Product
  • supplier_idFK→ Supplier
  • supplier_refstring
  • supplier_descriptionstring
  • matching_statusAUTO/MANUAL/UNMATCHED
  • is_primaryboolean
  • country_of_origin_idFK→ Country
🤝
ProductCustomerCode
Mapping codes clients
UPD
  • idPK
  • product_idFK→ Product
  • customer_idFK→ Customer
  • customer_refstring
  • customer_descriptionstring
  • matching_statusAUTO/MANUAL/UNMATCHED
  • is_primary · is_pseudoboolean
  • logistics_remarktext
  • contact_idFK→ Contact (referent produit)
💰
PriceList
Historique des prix
  • product_id · supplier_idFK
  • poa · pos · currencydecimal
  • valid_from · valid_todate
  • sourceMANUAL/SQ/INVOICE
Referentiels douaniers & financiers — v4.0
🛃
CustomsTariff
Codes TARES douaniers
NEW
  • idPK
  • tariff_codestring — code TARES
  • descriptionstring
  • vat_ratedecimal %
  • eur1_applicableboolean
🌍
Country
Pays d'origine · TVA par defaut
NEW
  • idPK
  • iso_codestring(2) — ISO 3166
  • namestring
  • eur1_eligibleboolean
  • default_vat_ratev7decimal % — ex: FR 20 % · CH 8,1 %
💱
Currency
Devises
NEW
  • idPK
  • codestring(3) — ISO 4217
  • name · symbolstring
  • is_activeboolean
🏦
BankAccount
IBAN par devise
NEW
  • idPK
  • currency_idFK→ Currency
  • iban · bic_swift · bank_namestring
  • is_defaultboolean
📊
FinancialConfig
Dashboard couverture
NEW
  • idPK
  • config_key · config_valuestring
  • description · updated_atstring / datetime
📋
DocumentLine
Lignes factures douanieres
NEW
  • idPK
  • document_idFK→ Document
  • product_id · customs_tariff_id · country_of_origin_idFK
  • quantity · unit_pricedecimal
  • line_total_htCALC
Transactions & Workflow
↩️
RMA
Return Authorization
UPD
  • rma_numberRMA-2026-0001
  • typePRE_QUOTE / POST_PO
  • quotation_id · order_processing_idFKnullable
  • contact_idFK→ Contact (signataire RMA)
  • statusDRAFT→ANALYSED
  • vat_recoverableboolean
📄
Quotation
Devis client
  • quotation_numberDEVIS-2026-0001
  • versionA / B / C ...
  • customer_idFK
  • statusDRAFT→QUOTED
  • q_rma_switch · q_supplier_quote_switchboolean
📩
SupplierQuotation
Cotation fournisseur
  • quotation_idFK→ Quotation
  • supplier_idFK
  • statusRECEIVED / VALIDATED
SUPPLIER QUOTATION LINE
  • poa · discount_pct · discounted_priceCALC
  • matching_statusAUTO/MANUAL/UNMATCH
⚙️
OrderProcessing
Machine d'etats centrale
UPD
  • op_number · customer_po_refstring
  • customer_idFK
  • quotation_idFKnullable
  • sourcing_strategySTOCK/EX_SUP/VIA_MDC
  • statusmachine d'etats
  • op_quotation_switch · op_rma_switchbool
  • customer_paid · supplier_paidboolean
  • transport_out_of_mdc · vat_recoverableboolean
  • OP LINE
  • qty_ordered · poa · pos · supplier_idFK
  • serial_numbers→ SerialNumber (0:N)
🔢
SerialNumber
Numero de serie par unite
NEW
  • idPK
  • op_line_idFK
  • serial_numberstring
  • noted_atdatetime
  • sourceRMA_CUSTOMER / SUPPLIER_OC / RECEPTION
📦
Stock
Disponibilite temps reel
  • product_idFK
  • on_hand · in_transit_in · reserveddecimal
  • availableCALCon_hand + transit - reserved
Documents
📁
Document
Table unifiee tous PDFs
UPD
  • typeSUPPLIER_PO · SUPPLIER_OC
  • CUSTOMER_INVOICE · DELIVERY_NOTICE
  • directionINBOUND / OUTBOUND
  • op_id · quotation_idFK
  • invoice_number · invoice_datestring / date
  • currency_id · bank_account_idFK
  • eur1_required · vat_recoverableboolean
  • total_htCALC
  • due_date_supplier · due_date_customerdate auto-calculees
  • carrier_overridev7.1string nullable
  • incoterm_overridev7.1string nullable
  • origin_statementv7.1string nullable — texte bas de facture
📋
DocumentLine
Lignes avec infos douanieres
NEW
  • idPK
  • document_id · product_id · customs_tariff_id · country_of_origin_idFK
  • quantity · unit_pricedecimal
  • line_total_htCALC
Log & Tracabilite
📝
StatusHistory
Journal des transitions
NEW
  • idPK
  • entity_typeOrderProcessing · RMA · Quotation
  • entity_idFKUUID de l'objet
  • status_from · status_tostring
  • changed_at · changed_by · notesdatetime / string / text
Principe metier — Timeline des statuts

Tout objet ayant un cycle de vie a statuts (OrderProcessing, RMA, Quotation) enregistre chaque changement de statut avec sa date et l'auteur. Log immuable permettant de reconstituer la timeline de vie dans les ecrans NEXUS.

[RECEIVED 01/03] → [VALIDATED 02/03] → [PRICED 05/03] → [SHIPPED 18/03] → [INVOICED 20/03]
Regles metier cles — v8.0
RegleDescriptionChamp / Entite
QualityLevel configurable (v8) L'enum quality fixe (00=Neuf, 01=Reconditionne) est remplace par un referentiel editable QualityLevel. MDC peut ajouter de nouveaux niveaux de qualite (ex: Grade B, Repare) sans modification du schema. Product.quality_level_id pointe sur ce referentiel. Les codes mdc_ref existants restent valides — le suffixe -QAL correspond au code QualityLevel. QualityLevel · Product.quality_level_id
Sales BOM / ProductLink (v8) ProductLink capture les relations inter-produits : COMPONENT (composant vendu avec le produit mere, ex: spare vial avec Mercury Probe), SUBSTITUTE (alternative en cas de rupture), ACCESSORY (produit complementaire propose a la vente). Permet l'affichage "produits associes" sur l'ecran devis et la gestion des gammes d'accessoires Bart H. ProductLink.parent_product_id · ProductLink.child_product_id · ProductLink.link_type
Reclassification Mercury spare vials (v8) Les flacons de mercure (spare vials) pour Mercury Probe sont des Spare Parts SPA (division 37 — Metrologie), pas des OPT logistiques. Corriges dans l'outil de codification v2.6. La relation au produit mere Mercury Probe est capturee dans ProductLink (COMPONENT, qty=1). Product.product_type = SPA · ProductLink (COMPONENT)
TVA par pays (v7) Country.default_vat_rate (taux par defaut, ex: France 20 %, Suisse 8,1 %) + Customer.vat_applicable (boolean) pour les exonerations (CERN, organismes internationaux). Customer.vat_applicable · Country.default_vat_rate
Incoterm sur Ship To (v7.1) ShipTo.incoterm et ShipTo.incoterm_source portent les conditions de livraison par adresse. Pré-remplissent le document — modifiables via Document.incoterm_override et Document.carrier_override (nullable). ST Crolles x 4 confirmes en v8 avec leurs incoterms respectifs. ShipTo.incoterm · ShipTo.carrier · Document.incoterm_override · Document.carrier_override
Sold To / Bill To / Ship To Un Customer = 1 Sold To = 1 Bill To + N Ship To. ShipTo partageable entre clients (N:N). Confirme en v8 avec ST Crolles x 4 dont ShipTo ECTRA partage entre ST Crolles 1 et ST Crolles 2. Customer.bill_to · ShipTo (N:N via table liaison)
Codes sur les documents Devis / Facture client / OC / Delivery notice → ProductCustomerCode.customer_ref. PO fournisseur → ProductSupplierCode.supplier_ref. Usage interne → Product.mdc_ref. ProductCustomerCode · ProductSupplierCode · Product
Alerte EUR1 Si Document.total_ht > 6 000 EUR → bandeau d'alerte UI. EUR1 exige pour les expeditions hors UE au-dela de ce seuil. Document.eur1_required · Document.total_ht
Relations cles — v8.0
Customer (vat_applicable · siren · siret · chorus_pro_code) ──1:N──> ShipTo (incoterm · incoterm_source · carrier · carrier_account) ShipTo ──N:N──> Customer (partage — ex: ST Crolles 1+2 partagent ShipTo ECTRA) Country (default_vat_rate) ──1:N──> Customer · ShipTo.country_id ProductType ──> ProductCategory ──> ProductFamily (short_desc_guide) ──> Product ProductDivision ──> Product.division_id Product.quality_level_id ──> QualityLevel.code [v8 — remplace quality enum] Product (parent) ──> ProductLink (COMPONENT / SUBSTITUTE / ACCESSORY) ──> Product (child) [v8 — Sales BOM] Contact (customer_id OR supplier_id · contact_type) ──> RMA.contact_id (signataire) └──> ProductCustomerCode.contact_id (referent produit) Customer (payment_term_days) ──1:1──> Document.due_date_customer Supplier (payment_term_days) ──1:1──> Document.due_date_supplier