Merge branch 'fix-SaleClass' into develop

This commit is contained in:
Marion Muszynski 2017-11-13 15:29:01 +01:00
commit 0ea19438a0
2 changed files with 15 additions and 5 deletions

View File

@ -249,12 +249,12 @@
}
}
} else {
$message = "Commande : ".$order."\r\n Produit : ".$key."\r\n Quantity to sent : ".$product['quantity_to_sent']."\r\n Quantity : ".$details[(int)$order][$key]['quantity'];
mail('marion@antadis.com', '[BBB] Erreurs quantity expe Philea', $message);
// $message = "Commande : ".$order."\r\n Produit : ".$key."\r\n Quantity to sent : ".$product['quantity_to_sent']."\r\n Quantity : ".$details[(int)$order][$key]['quantity'];
// mail('marion@antadis.com', '[BBB] Erreurs quantity expe Philea', $message);
}
} else {
$message = "Commande : ".$order."\r\n Produit : ".$key."\r\n Produit non présent dans le fichier expe philea";
mail('marion@antadis.com', '[BBB] Erreurs produit expe Philea', $message);
// $message = "Commande : ".$order."\r\n Produit : ".$key."\r\n Produit non présent dans le fichier expe philea";
// mail('marion@antadis.com', '[BBB] Erreurs produit expe Philea', $message);
}
}
}
@ -357,6 +357,15 @@
') as $row) {
$sent_products[(int) $row['id_order_detail']] = (int) $row['quantity'];
}
foreach(Db::getInstance()->ExecuteS('
SELECT l.`id_order_detail`, SUM(l.`quantity`) AS `quantity`
FROM `'._DB_PREFIX_.'ant_dropshipping_parcel` l
LEFT JOIN `'._DB_PREFIX_.'order_detail` d ON (l.`id_order_detail` = d.`id_order_detail`)
WHERE d.`id_order` IN ('.implode(', ', $id_orders).')
GROUP BY l.`id_order_detail`
') as $row) {
$sent_products[(int) $row['id_order_detail']] = (int) $row['quantity'];
}
$orders_to_send = array();
$orders_list = array();

View File

@ -1883,7 +1883,8 @@ class Sale {
}
public function getProducts($order = FALSE) {
$categories = Sale::flatRecurseCategory($this->id_category);
//$categories = Sale::flatRecurseCategory($this->id_category);
$categories = Sale::getCategoriesFromCache($this->id);
$products = array();
foreach(Db::getInstance()->ExecuteS('