Skip to content

Commit

Permalink
Fix: Nb of orders to process was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 14, 2009
1 parent cf474fb commit 14704c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ For users:
- New: Add stock in product lists.
- New: Can filter list of stock movement on date or product.
- New: Added a link from product list to their stock movements.
- Fix: Nb of orders to process was wrong.
- Fix: Customer code was not correct on PDF it if contains special
characters.
- Fix: Can update price even with "NPR" VAT rates.
Expand Down
8 changes: 4 additions & 4 deletions htdocs/commande/commande.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Commande extends CommonObject
var $contactid;
var $projet_id;
var $statut; // -1=Annulee, 0=Brouillon, 1=Validee, 2=Acceptee, 3=Envoyee/Recue (facturee ou non)
var $facturee;
var $facturee; // Facturee ou non
var $brouillon;
var $cond_reglement_id;
var $cond_reglement_code;
Expand Down Expand Up @@ -278,7 +278,7 @@ function valid($user)
{
$mouvP = new MouvementStock($this->db);
// We decrement stock of product (and sub-products)
$entrepot_id = "1"; // TODO ajouter possibilité de choisir l'entrepot
$entrepot_id = "1"; // TODO ajouter possibilit� de choisir l'entrepot
// TODO Add price of product in method or '' to update PMP
$result=$mouvP->livraison($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty);
if ($result < 0) { $error++; }
Expand Down Expand Up @@ -1889,7 +1889,7 @@ function load_board($user)
$this->nbtodo=$this->nbtodolate=0;
$clause = " WHERE";

$sql = "SELECT c.rowid, c.date_creation as datec";
$sql = "SELECT c.rowid, c.date_creation as datec, c.fk_statut";
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
Expand All @@ -1907,7 +1907,7 @@ function load_board($user)
while ($obj=$this->db->fetch_object($resql))
{
$this->nbtodo++;
if ($this->db->jdate($obj->datec) < ($now - $conf->commande->traitement->warning_delay)) $this->nbtodolate++;
if ($obj->fk_statut != 3 && $this->db->jdate($obj->datec) < ($now - $conf->commande->traitement->warning_delay)) $this->nbtodolate++;
}
return 1;
}
Expand Down

0 comments on commit 14704c9

Please sign in to comment.