diff --git a/client/src/components/CustomerOrderForm.tsx b/client/src/components/CustomerOrderForm.tsx index 9bffb40..338e818 100644 --- a/client/src/components/CustomerOrderForm.tsx +++ b/client/src/components/CustomerOrderForm.tsx @@ -176,7 +176,7 @@ export function CustomerOrderForm({ setArticleNotFound(false); form.setValue("productName", article.libelle1, { shouldValidate: true }); if (article.gtin) form.setValue("gencode", article.gtin, { shouldValidate: true }); - if (article.codein) form.setValue("productReference", article.codein, { shouldValidate: true }); + if (article.ref_fou_principale) form.setValue("productReference", article.ref_fou_principale, { shouldValidate: true }); // Fournisseur : dernière entrée en stock en priorité let codefouToMatch = article.codefou_principal; diff --git a/client/src/pages/mobile/CustomerOrdersPage.tsx b/client/src/pages/mobile/CustomerOrdersPage.tsx index 4ec112f..20ffa6b 100644 --- a/client/src/pages/mobile/CustomerOrdersPage.tsx +++ b/client/src/pages/mobile/CustomerOrdersPage.tsx @@ -178,7 +178,7 @@ export default function MobileCustomerOrdersPage() { setArticleNotFound(false); form.setValue("productName", article.libelle1, { shouldValidate: true }); if (article.gtin) form.setValue("gencode", article.gtin, { shouldValidate: true }); - if (article.codein) form.setValue("productReference", article.codein, { shouldValidate: true }); + if (article.ref_fou_principale) form.setValue("productReference", article.ref_fou_principale, { shouldValidate: true }); let codefouToMatch = article.codefou_principal; try {