Merge branch 'ticket-8039' into develop
This commit is contained in:
commit
62009ba633
19
adm/pdf.php
19
adm/pdf.php
@ -138,7 +138,8 @@ function generateInvoicesPDFPrivateSales48hBis()
|
||||
die (Tools::displayError('No invoices found'));
|
||||
}
|
||||
|
||||
$orders2 = Db::getInstance()->ExecuteS('
|
||||
$orders2 = array();
|
||||
foreach (Db::getInstance()->ExecuteS('
|
||||
SELECT DISTINCT od.`id_order`
|
||||
FROM `'._DB_PREFIX_.'order_detail` od
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_ps_cache` c ON (c.`id_product` = od.`product_id`)
|
||||
@ -146,16 +147,22 @@ function generateInvoicesPDFPrivateSales48hBis()
|
||||
WHERE od.`id_order` IN ('.implode(',', $orders).')
|
||||
AND od.`product_quantity` - od.`product_quantity_return` != 0
|
||||
AND (s.delivery_delay != 2 AND s.delivery_delay != 6)
|
||||
');
|
||||
') as $row){
|
||||
$orders2[] = (int)$row['id_order'];
|
||||
}
|
||||
if (!empty($orders2)) {
|
||||
foreach ($orders2 as $key => $order) {
|
||||
if (in_array($order, $orders)) {
|
||||
unset($orders2[$key]);
|
||||
foreach ($orders as $key => $order) {
|
||||
if (in_array($order, $orders2)) {
|
||||
unset($orders[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PDF::multipleInvoices2($orders, $orders2, true, true);
|
||||
if (!empty($orders2)) {
|
||||
PDF::multipleInvoices2($orders, $orders2, true, true);
|
||||
} else {
|
||||
PDF::multipleInvoices($orders, false, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -892,14 +892,28 @@ class AdminBulkUpdate extends AdminTab {
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = od.`id_order`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_ps_cache` psc ON (psc.`id_product` = od.`product_id`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'address` a ON (a.`id_address` = o.`id_address_delivery`)
|
||||
WHERE o.`date_add` BETWEEN "'. $date_start .' 00:00:00" AND "'. $date_end .' 00:00:00"
|
||||
WHERE
|
||||
o.date_add >= "'.$date_start.' 00:00:00"
|
||||
AND o.date_add <= "'.$date_end.' 23:59:59"
|
||||
AND a.`id_country` IN (3,6)
|
||||
AND (
|
||||
SELECT `id_order_state`
|
||||
FROM `'._DB_PREFIX_.'order_history`
|
||||
WHERE `id_order`=od.`id_order`
|
||||
ORDER BY `date_add` DESC LIMIT 1
|
||||
) NOT IN (1,6,8,9,10,11,14,15,18)
|
||||
AND
|
||||
(o.valid = 1
|
||||
OR (
|
||||
o.valid = 0
|
||||
AND (
|
||||
(SELECT h.id_order_state FROM `'._DB_PREFIX_.'order_history` h WHERE h.id_order = o.id_order ORDER BY h.date_add DESC LIMIT 1) = 6
|
||||
OR (SELECT h.id_order_state FROM `'._DB_PREFIX_.'order_history` h WHERE h.id_order = o.id_order ORDER BY h.date_add DESC LIMIT 1) = 7
|
||||
OR (SELECT h.id_order_state FROM `'._DB_PREFIX_.'order_history` h WHERE h.id_order = o.id_order ORDER BY h.date_add DESC LIMIT 1) = 11
|
||||
)
|
||||
))
|
||||
AND (SELECT h.id_order_state FROM `'._DB_PREFIX_.'order_history` h WHERE h.id_order = o.id_order ORDER BY h.date_add DESC LIMIT 1) != 14
|
||||
-- o.`date_add` BETWEEN "'. $date_start .' 00:00:00" AND "'. $date_end .' 00:00:00
|
||||
-- AND (
|
||||
-- SELECT `id_order_state`
|
||||
-- FROM `'._DB_PREFIX_.'order_history`
|
||||
-- WHERE `id_order`=od.`id_order`
|
||||
-- ORDER BY `date_add` DESC LIMIT 1
|
||||
-- ) NOT IN (1,6,8,9,10,11,14,15,18)
|
||||
ORDER BY od.`product_id` ASC
|
||||
');
|
||||
|
||||
|
@ -13,6 +13,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
'liston' => array($this->l('Listing image (on)'), '380x178'),
|
||||
'listoff' => array($this->l('Listing image (off)'), '380x178'),
|
||||
'fb' => array($this->l('Facebook image'), '100x100'),
|
||||
'salebg' => array($this->l('Sale background'), '*x*'),
|
||||
'trailerbg' => array($this->l('Trailer background'), '*x*'),
|
||||
'trailercenter' => array($this->l('Trailer center background'), '560x*'),
|
||||
);
|
||||
|
@ -1,7 +1,9 @@
|
||||
{*{if isset($sale) && $sale}
|
||||
{if isset($sale) && $sale}
|
||||
<style type="text/css">{literal}
|
||||
#columns {
|
||||
background-image: url("{/literal}{$link->getCatImageLink($sale->alias[$cookie->id_lang], $sale->id_category, 'privatesales')}{literal}");
|
||||
body#category #columns {
|
||||
/* background-image: url("{/literal}{$link->getCatImageLink($sale->alias[$cookie->id_lang], $sale->id_category, 'privatesales')}{literal}"); */
|
||||
/* background: url("https://static.bebeboutik.com{$path}img/{$sale->id}/salebg_{/literal}{$cookie->id_lang}{literal}.jpg")no-repeat fixed center 0; */
|
||||
background: url("{/literal}{$path}{literal}/modules/privatesales/img/{/literal}{$sale->id}{literal}/salebg_{/literal}{$cookie->id_lang}{literal}.jpg") no-repeat fixed center 0;
|
||||
}
|
||||
{/literal}</style>
|
||||
{/if}*}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user