Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix set status on order Receipt when no dispatch #15075

Merged
merged 3 commits into from Oct 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions htdocs/fourn/class/fournisseur.commande.class.php
Expand Up @@ -2298,8 +2298,7 @@ public function Livraison($user, $date, $type, $comment)

// TODO LDR01 Add a control test to accept only if ALL predefined products are received (same qty).


if (!$error)
if (empty($error))
{
$this->db->begin();

Expand All @@ -2312,17 +2311,18 @@ public function Livraison($user, $date, $type, $comment)
$resql = $this->db->query($sql);
if ($resql)
{
$result = 0;
$result = 1;
$old_statut = $this->statut;
$this->statut = $statut;
$this->actionmsg2 = $comment;

// Call trigger
$result = $this->call_trigger('ORDER_SUPPLIER_RECEIVE', $user);
if ($result < 0) $error++;
$result_trigger = $this->call_trigger('ORDER_SUPPLIER_RECEIVE', $user);
if ($result_trigger < 0) $error++;
else $result += (int) $result_trigger;
// End call triggers

if (!$error)
if (empty($error))
{
$this->db->commit();
}
Expand Down