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