From 3c93aac071f9db205603ef375a65df233af7a9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Thu, 1 Aug 2013 15:03:34 +0200 Subject: [PATCH] init cond_reglement_id and mode_reglement_id to 0 in orders creations to avoid SQL errors --- htdocs/product/stock/replenish.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index dfa764b615c..6b442f763f7 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -124,6 +124,8 @@ if ($action == 'order') { foreach ($supplier['lines'] as $line) { $order->lines[] = $line; } + $order->cond_reglement_id = 0; + $order->mode_reglement_id = 0; $id = $order->create($user); if ($id < 0) { $fail++;