Fixed: Remove additional code
This commit is contained in:
@@ -255,7 +255,7 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
} elseif ($granularity == 'month') {
|
||||
$sales = array();
|
||||
if ($result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(
|
||||
'SELECT LEFT(`invoice_date`, 7) AS date, SUM(total_paid_tax_excl / o.`conversion_rate`) AS sales
|
||||
'SELECT LEFT(`invoice_date`, 7) AS date, SUM(total_paid_tax_excl / o.conversion_rate) AS sales
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON o.current_state = os.id_order_state
|
||||
WHERE os.logable = 1'. (($date_from && $date_to) ? ' AND `invoice_date` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59"' : '').'
|
||||
@@ -466,7 +466,7 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
LEFT JOIN (
|
||||
SELECT pr.`id_product`,
|
||||
IFNULL(SUM(cp.`product_quantity`), 0) AS totalQuantitySold,
|
||||
IFNULL(SUM(cp.`product_price` * cp.`product_quantity`), 0) / o.`conversion_rate` AS totalPriceSold
|
||||
IFNULL(SUM(cp.`product_price` * cp.`product_quantity`), 0) / o.conversion_rate AS totalPriceSold
|
||||
FROM `'._DB_PREFIX_.'product` pr
|
||||
LEFT OUTER JOIN `'._DB_PREFIX_.'order_detail` cp ON pr.`id_product` = cp.`product_id`
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = cp.`id_order`
|
||||
@@ -712,8 +712,8 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
$orders = Db::getInstance()->ExecuteS('
|
||||
SELECT
|
||||
LEFT(`invoice_date`, 10) as date,
|
||||
total_paid_tax_incl / o.`conversion_rate` as total_paid_tax_incl,
|
||||
total_shipping_tax_excl / o.`conversion_rate` as total_shipping_tax_excl,
|
||||
total_paid_tax_incl / o.conversion_rate as total_paid_tax_incl,
|
||||
total_shipping_tax_excl / o.conversion_rate as total_shipping_tax_excl,
|
||||
o.module,
|
||||
ad.id_country,
|
||||
o.id_currency,
|
||||
|
||||
@@ -4454,7 +4454,7 @@ class HotelBookingDetail extends ObjectModel
|
||||
|
||||
/**
|
||||
* Refunded booking rows in a date range, one row per booking (requires ORDER RETURN record).
|
||||
* A booking only appears here once it has a matching order_return_detail row.
|
||||
* QloApps sets is_refunded=1 on all freed/refunded rooms; is_cancelled is not reliably set.
|
||||
* Refund report filters this further to refunded_amount > 0 in the caller; Cancellation report shows all rows.
|
||||
*
|
||||
* @param array $params date_from, date_to, id_hotel, id_customer, id_product, detailed_info
|
||||
|
||||
@@ -121,7 +121,7 @@ class StatsBestVouchers extends ModuleGrid
|
||||
public function getData()
|
||||
{
|
||||
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
$this->query = 'SELECT SQL_CALC_FOUND_ROWS ocr.id_cart_rule, cr.code, ocr.name, COUNT(ocr.id_cart_rule) as total, ROUND(SUM(o.total_paid_real) / o.`conversion_rate`,2) as ca
|
||||
$this->query = 'SELECT SQL_CALC_FOUND_ROWS ocr.id_cart_rule, cr.code, ocr.name, COUNT(ocr.id_cart_rule) as total, ROUND(SUM(o.total_paid_real) / o.conversion_rate,2) as ca
|
||||
FROM '._DB_PREFIX_.'order_cart_rule ocr
|
||||
LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = ocr.id_order
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule cr ON cr.id_cart_rule = ocr.id_cart_rule
|
||||
|
||||
@@ -716,7 +716,7 @@ class StatsForecast extends Module
|
||||
WHERE l.active = 1';
|
||||
$languages = Db::getInstance()->executeS($sql);
|
||||
foreach ($languages as $language) {
|
||||
$lang_values .= 'SUM(IF(o.id_lang = '.(int)$language['id_lang'].', total_paid_tax_excl / o.`conversion_rate`, 0)) as '.pSQL($language['iso_code']).',';
|
||||
$lang_values .= 'SUM(IF(o.id_lang = '.(int)$language['id_lang'].', total_paid_tax_excl / o.conversion_rate, 0)) as '.pSQL($language['iso_code']).',';
|
||||
}
|
||||
$lang_values = rtrim($lang_values, ',');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user