Modif de la requête pour ano 0000030
This commit is contained in:
@@ -16,11 +16,10 @@ class AdminOrdersController extends AdminOrdersControllerCore
|
|||||||
|
|
||||||
AdminController::__construct();
|
AdminController::__construct();
|
||||||
|
|
||||||
$this->_select = '
|
$this->_select = '
|
||||||
a.id_currency,
|
a.id_currency,
|
||||||
a.id_order AS id_pdf,
|
a.id_order AS id_pdf,
|
||||||
a.id_carrier,
|
ca.name as crname,
|
||||||
carrier.name as crname,
|
|
||||||
CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
|
CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
|
||||||
osl.`name` AS `osname`,
|
osl.`name` AS `osname`,
|
||||||
os.`color`,
|
os.`color`,
|
||||||
@@ -32,7 +31,7 @@ $this->_select = '
|
|||||||
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)
|
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)
|
||||||
INNER JOIN `'._DB_PREFIX_.'address` address ON address.id_address = a.id_address_delivery
|
INNER JOIN `'._DB_PREFIX_.'address` address ON address.id_address = a.id_address_delivery
|
||||||
|
|
||||||
INNER JOIN `'._DB_PREFIX_.'carrier` carrier ON carrier.id_carrier = a.id_carrier
|
INNER JOIN `'._DB_PREFIX_.'carrier` ca ON ca.id_carrier = a.id_carrier
|
||||||
|
|
||||||
INNER JOIN `'._DB_PREFIX_.'country` country ON address.id_country = country.id_country
|
INNER JOIN `'._DB_PREFIX_.'country` country ON address.id_country = country.id_country
|
||||||
INNER JOIN `'._DB_PREFIX_.'country_lang` country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = '.(int)$this->context->language->id.')
|
INNER JOIN `'._DB_PREFIX_.'country_lang` country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = '.(int)$this->context->language->id.')
|
||||||
@@ -42,7 +41,6 @@ $this->_select = '
|
|||||||
$this->_orderWay = 'DESC';
|
$this->_orderWay = 'DESC';
|
||||||
$this->_use_found_rows = true;
|
$this->_use_found_rows = true;
|
||||||
|
|
||||||
|
|
||||||
$statuses = OrderState::getOrderStates((int)$this->context->language->id);
|
$statuses = OrderState::getOrderStates((int)$this->context->language->id);
|
||||||
foreach ($statuses as $status) {
|
foreach ($statuses as $status) {
|
||||||
$this->statuses_array[$status['id_order_state']] = $status['name'];
|
$this->statuses_array[$status['id_order_state']] = $status['name'];
|
||||||
@@ -146,14 +144,14 @@ $this->_select = '
|
|||||||
|
|
||||||
if (Country::isCurrentlyUsed('carrier', true)) {
|
if (Country::isCurrentlyUsed('carrier', true)) {
|
||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||||
SELECT DISTINCT c.id_carrier, c.`name`
|
SELECT DISTINCT c.`name`
|
||||||
FROM `'._DB_PREFIX_.'carrier` c
|
FROM `'._DB_PREFIX_.'carrier` c
|
||||||
WHERE active = 1 and deleted=0
|
WHERE active = 1 and deleted=0
|
||||||
ORDER BY c.name ASC');
|
ORDER BY c.name ASC');
|
||||||
|
|
||||||
$carrier_array = array();
|
$carrier_array = array();
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$carrier_array[$row['id_carrier']] = $row['name'];
|
$carrier_array[$row['name']] = $row['name'];
|
||||||
}
|
}
|
||||||
$part1 = array_slice($this->fields_list, 0, 3);
|
$part1 = array_slice($this->fields_list, 0, 3);
|
||||||
$part2 = array_slice($this->fields_list, 3);
|
$part2 = array_slice($this->fields_list, 3);
|
||||||
@@ -161,8 +159,8 @@ $this->_select = '
|
|||||||
'title' => $this->trans('Carrier', array(), 'Admin.Global'),
|
'title' => $this->trans('Carrier', array(), 'Admin.Global'),
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'list' => $carrier_array,
|
'list' => $carrier_array,
|
||||||
'filter_key' => 'carrier!id_carrier',
|
'filter_key' => 'ca!name',
|
||||||
'filter_type' => 'int',
|
'filter_type' => 'string',
|
||||||
'order_key' => 'crname'
|
'order_key' => 'crname'
|
||||||
);
|
);
|
||||||
$this->fields_list = array_merge($part1, $part2);
|
$this->fields_list = array_merge($part1, $part2);
|
||||||
|
|||||||
Reference in New Issue
Block a user