Skip to content

Commit

Permalink
Revert "Fix: define new ref before trigger"
Browse files Browse the repository at this point in the history
This reverts commit 6ab4176.
  • Loading branch information
eldy committed Aug 19, 2014
1 parent a26a7ce commit a220634
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions htdocs/commande/class/commande.class.php
@@ -1,15 +1,15 @@
<?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU *General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
Expand Down Expand Up @@ -301,13 +301,6 @@ function valid($user, $idwarehouse=0)
}
}

// Set new ref and current status
if (! $error)
{
$this->ref = $num;
$this->statut = 1;
}

if (! $error)
{
// Call trigger
Expand All @@ -316,6 +309,13 @@ function valid($user, $idwarehouse=0)
// End call triggers
}

// Set new ref and current status
if (! $error)
{
$this->ref = $num;
$this->statut = 1;
}

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

0 comments on commit a220634

Please sign in to comment.