Modèle de Données v7.0

27 entités · Customer étendu (TVA, identifiants légaux FR) · ShipTo étendu (Carrier + N° compte)

~ Customer — +vat_applicable (boolean) · +siren · +siret · +chorus_pro_code (nullables) ~ ShipTo — +carrier · +carrier_account
Classification produit — 2 axes indépendants
🔺 Axe produit — classification (visible site web)
ProductType
Visible sur le site web
SPA EQU OPT SRV
ProductCategory
Rattachée au Type · OBLIGATOIRE
Optics Mechanics Chucks
ProductFamily
Porte l'URL site web · OBLIGATOIRE
Wafer Handling Probe Accessories
▸ short_desc_guide affiché à la création 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 · Présent dans le code MDC (position 2) · Non visible sur le site web
31 Litho 32 Implant 33 Etch
La Division est un critère 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 (v4.0) — texte guide affiché à la création d'un nouveau produit dans la famille.
Division ≠ hiérarchie — visible dans Nexus (codification, sourcing interne) mais absente de la classification produit externe.
Format du code produit MDC (v3.0 — inchangé)
MDC
Préfixe
SPA
Type · 3c
31
Division · 2c
0042
Séquence · 4c
00
Qualité · 2c
MDC-SPA-31-0042-00 → Spare Part · Litho · N°42 · Neuf MDC-EQU-34-0001-00 → Équipement · Épitaxie · Neuf MDC-SRV-00-0001-00 → Service (pas de division)
Entités v7.0 — 27 entités
Acteurs
🏢
Customer
Client MDC (Sold To)
UPD v7
  • idPK
  • namestring
  • vat_numberN° TVA intracommunautaire
  • vat_applicablev7boolean — ex: CERN exonéré
  • bill_toaddress
  • contact_emailstring
  • currencyISO code (CHF/EUR/USD…)
  • incoterm · incoterm_sourceDAP / EXW / DDP…
  • delivery_modetransporteur + n° contrat client
  • payment_term_daysint — délai 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 — délai 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 — libellé site
  • address · city · zipstring
  • country_idFK→ Country
  • carrierv7string — ex: FedEx, DHL
  • carrier_accountv7string — n° compte client transporteur
Règle v7.0 — Hiérarchie Sold To / Bill To / Ship To

Un Customer = un Sold To = 1 Bill To (adresse de facturation sur l'entité Customer) + N Ship To (adresses de livraison distinctes).

Cas concret — ST Micro
Customer: ST Crolles 1 → Bill To: adresse 1 → Ship To A / Ship To Extra
Customer: ST Crolles 2 → Bill To: adresse 2 → Ship To B / Ship To Extra
Ship To Extra = partagé entre les deux entités

Carrier + Carrier Account (v7) : chaque adresse Ship To peut préciser le transporteur habituel et le numéro de compte client — utilisés pour pré-remplir les documents d'expédition.

Hiérarchie produit
🏷️
ProductType
Table de référence
  • 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
📦
Product
Entité centrale
UPD
  • idPK
  • mdc_refMDC-TYP-DIV-SEQ-QAL
  • descriptionstring 256c
  • product_typeSPA/EQU/OPT/SRV
  • quality00/01
  • 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
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 (référent produit)
💰
PriceList
Historique des prix
  • product_id · supplier_idFK
  • poa · pos · currencydecimal
  • valid_from · valid_todate
  • sourceMANUAL/SQ/INVOICE
Référentiels 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 défaut
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 douanières
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'états centrale
UPD
  • op_number · customer_po_refstring
  • customer_idFK
  • quotation_idFKnullable
  • sourcing_strategySTOCK/EX_SUP/VIA_MDC
  • statusmachine d'états
  • 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
Numéro de série par unité
NEW
  • idPK
  • op_line_idFK
  • serial_numberstring
  • noted_atdatetime
  • sourceRMA_CUSTOMER / SUPPLIER_OC / RECEPTION
📦
Stock
Disponibilité temps réel
  • product_idFK
  • on_hand · in_transit_in · reserveddecimal
  • availableCALCon_hand + transit - reserved
Documents
📁
Document
Table unifiée 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-calculées
📋
DocumentLine
Lignes avec infos douanières
NEW
  • idPK
  • document_id · product_id · customs_tariff_id · country_of_origin_idFK
  • quantity · unit_pricedecimal
  • line_total_htCALC
Log & Traçabilité
📝
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 métier — Timeline des statuts

Tout objet ayant un cycle de vie à 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 écrans NEXUS.

[RECEIVED 01/03] → [VALIDATED 02/03] → [PRICED 05/03] → [SHIPPED 18/03] → [INVOICED 20/03]
Règles métier clés — v7.0
RègleDescriptionChamp / Entité
TVA par pays (v7) La TVA est gérée à deux niveaux : Country.default_vat_rate (taux par défaut, ex: France 20 %, Suisse 8,1 %) et Customer.vat_applicable (boolean) qui permet d'exonérer un client spécifique (ex: CERN, organisme international). Le champ vat_number stocke le numéro d'identification TVA intracommunautaire. Customer.vat_applicable · Customer.vat_number · Country.default_vat_rate
Identifiants légaux FR (v7) Pour les clients publics français (type CNRS), trois champs nullables sur Customer : siren (9 caractères), siret (14 caractères), chorus_pro_code (jusqu'à 110 caractères — plateforme dématérialisée factures publiques). Ces champs sont obligatoires sur les factures émises vers ces entités. Customer.siren · Customer.siret · Customer.chorus_pro_code
Carrier sur Ship To (v7) ShipTo.carrier et ShipTo.carrier_account permettent de pré-remplir les documents d'expédition avec le transporteur habituel de l'adresse de livraison et le numéro de compte client chez ce transporteur (facturation directe au client). ShipTo.carrier · ShipTo.carrier_account
Sold To / Bill To / Ship To Un Customer = 1 Sold To (entité légale donneuse d'ordre) = 1 Bill To (adresse facturation sur l'entité Customer) + N Ship To (entités ShipTo). Une même adresse ShipTo peut être partagée entre plusieurs Customers (ex: ST Crolles 1 et ST Crolles 2 partagent un Ship To Extra). 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
Délais de paiement due_date_customer = invoice_date + Customer.payment_term_days. due_date_supplier = invoice_date + Supplier.payment_term_days. Alimentent le Financial Management Dashboard. Document.due_date_customer · Document.due_date_supplier
Alerte EUR1 Si Document.total_ht > 6 000 EUR → bandeau d'alerte UI. EUR1 exigé pour les expéditions hors UE au-delà de ce seuil. Document.eur1_required · Document.total_ht
Relations clés — v7.0
Customer (vat_applicable · siren · siret · chorus_pro_code) ──1:N──> ShipTo (carrier · carrier_account) Customer.bill_to ─────── adresse facturation directe sur l'entité ShipTo ──N:N──> Customer (via table de liaison — ShipTo partageable entre clients) Country (default_vat_rate) ──1:N──> Customer · ShipTo.country_id Customer (payment_term_days) ──1:1──> Document.due_date_customer Supplier (payment_term_days) ──1:1──> Document.due_date_supplier Contact (customer_id OR supplier_id · contact_type) ──> RMA.contact_id (signataire) └──> ProductCustomerCode.contact_id (référent produit) ProductType ──> ProductCategory ──> ProductFamily (short_desc_guide) ──> Product ProductDivision ──> Product.division_id (31=Litho · 35=Déposition · 99=NA/OPT)