Merge branch 'release' of https://github.com/PrestaShop/PrestaShop into release
This commit is contained in:
commit
9e64ecc887
7 files changed
+22
-11
No files matched your search
+2
-1
@@ -3160,8 +3160,9 @@ class ProductCore extends ObjectModel
|
|||||||
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (p.`id_manufacturer`= m.`id_manufacturer`)
|
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (p.`id_manufacturer`= m.`id_manufacturer`)
|
||||||
'.Product::sqlStock('p', 0).'
|
'.Product::sqlStock('p', 0).'
|
||||||
WHERE `id_product_1` = '.(int)$this->id.
|
WHERE `id_product_1` = '.(int)$this->id.
|
||||||
($active ? ' AND product_shop.`active` = 1' : '').'
|
($active ? ' AND product_shop.`active` = 1 AND product_shop.`visibility` != \'none\'' : '').'
|
||||||
GROUP BY product_shop.id_product';
|
GROUP BY product_shop.id_product';
|
||||||
|
|
||||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql))
|
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql))
|
||||||
return false;
|
return false;
|
||||||
foreach ($result as &$row)
|
foreach ($result as &$row)
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class ProductSaleCore
|
|||||||
LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = tr.`id_tax`)
|
LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = tr.`id_tax`)
|
||||||
'.Product::sqlStock('p').'
|
'.Product::sqlStock('p').'
|
||||||
WHERE product_shop.`active` = 1
|
WHERE product_shop.`active` = 1
|
||||||
AND p.`visibility` != \'none\'
|
AND product_shop.`visibility` != \'none\'
|
||||||
AND p.`id_product` IN (
|
AND p.`id_product` IN (
|
||||||
SELECT cp.`id_product`
|
SELECT cp.`id_product`
|
||||||
FROM `'._DB_PREFIX_.'category_group` cg
|
FROM `'._DB_PREFIX_.'category_group` cg
|
||||||
@@ -156,7 +156,7 @@ class ProductSaleCore
|
|||||||
ON cl.`id_category` = product_shop.`id_category_default`
|
ON cl.`id_category` = product_shop.`id_category_default`
|
||||||
AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').'
|
AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').'
|
||||||
WHERE product_shop.`active` = 1
|
WHERE product_shop.`active` = 1
|
||||||
AND p.`visibility` != \'none\'
|
AND product_shop.`visibility` != \'none\'
|
||||||
AND p.`id_product` IN (
|
AND p.`id_product` IN (
|
||||||
SELECT cp.`id_product`
|
SELECT cp.`id_product`
|
||||||
FROM `'._DB_PREFIX_.'category_group` cg
|
FROM `'._DB_PREFIX_.'category_group` cg
|
||||||
|
|||||||
@@ -654,7 +654,7 @@ class AdminControllerCore extends Controller
|
|||||||
'export_content' => $content
|
'export_content' => $content
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->layout = 'layout-export.tpl';
|
$this->layout = 'layout-export.tpl';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2112,6 +2112,7 @@ class AdminControllerCore extends Controller
|
|||||||
*/
|
*/
|
||||||
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
|
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!isset($this->list_id))
|
if (!isset($this->list_id))
|
||||||
$this->list_id = $this->table;
|
$this->list_id = $this->table;
|
||||||
|
|
||||||
@@ -2166,6 +2167,9 @@ class AdminControllerCore extends Controller
|
|||||||
$order_by = $this->fields_list[$order_by]['order_key'];
|
$order_by = $this->fields_list[$order_by]['order_key'];
|
||||||
|
|
||||||
/* Determine offset from current page */
|
/* Determine offset from current page */
|
||||||
|
if (isset($this->context->cookie->{$this->list_id.'_page'}))
|
||||||
|
$start = $this->context->cookie->{$this->list_id.'_page'};
|
||||||
|
|
||||||
if ((isset($_POST['submitFilter'.$this->list_id]) ||
|
if ((isset($_POST['submitFilter'.$this->list_id]) ||
|
||||||
isset($_POST['submitFilter'.$this->list_id.'_x']) ||
|
isset($_POST['submitFilter'.$this->list_id.'_x']) ||
|
||||||
isset($_POST['submitFilter'.$this->list_id.'_y'])) &&
|
isset($_POST['submitFilter'.$this->list_id.'_y'])) &&
|
||||||
@@ -2173,6 +2177,8 @@ class AdminControllerCore extends Controller
|
|||||||
is_numeric($_POST['submitFilter'.$this->list_id]))
|
is_numeric($_POST['submitFilter'.$this->list_id]))
|
||||||
$start = ((int)$_POST['submitFilter'.$this->list_id] - 1) * $limit;
|
$start = ((int)$_POST['submitFilter'.$this->list_id] - 1) * $limit;
|
||||||
|
|
||||||
|
$this->context->cookie->{$this->list_id.'_page'} = $start;
|
||||||
|
|
||||||
/* Cache */
|
/* Cache */
|
||||||
$this->_lang = (int)$id_lang;
|
$this->_lang = (int)$id_lang;
|
||||||
$this->_orderBy = $order_by;
|
$this->_orderBy = $order_by;
|
||||||
@@ -2241,8 +2247,6 @@ class AdminControllerCore extends Controller
|
|||||||
$having_clause .= $this->_having.' ';
|
$having_clause .= $this->_having.' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->_listsql = '
|
$this->_listsql = '
|
||||||
SELECT SQL_CALC_FOUND_ROWS
|
SELECT SQL_CALC_FOUND_ROWS
|
||||||
'.($this->_tmpTableFilter ? ' * FROM (SELECT ' : '');
|
'.($this->_tmpTableFilter ? ' * FROM (SELECT ' : '');
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class ModuleFrontControllerCore extends FrontController
|
|||||||
elseif (Tools::file_exists_cache($this->getTemplatePath().$template))
|
elseif (Tools::file_exists_cache($this->getTemplatePath().$template))
|
||||||
$this->template = $this->getTemplatePath().$template;
|
$this->template = $this->getTemplatePath().$template;
|
||||||
else
|
else
|
||||||
throw new PrestaShopException("Template '$template'' not found");
|
throw new PrestaShopException("Template '$template' not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ class OrderInvoiceCore extends ObjectModel
|
|||||||
WHERE od.`id_order` = '.(int)$this->id_order.'
|
WHERE od.`id_order` = '.(int)$this->id_order.'
|
||||||
AND od.`id_order_invoice` = '.(int)$this->id.'
|
AND od.`id_order_invoice` = '.(int)$this->id.'
|
||||||
AND od.`tax_computation_method` = '.(int)TaxCalculator::ONE_AFTER_ANOTHER_METHOD
|
AND od.`tax_computation_method` = '.(int)TaxCalculator::ONE_AFTER_ANOTHER_METHOD
|
||||||
);
|
) || Configuration::get('PS_INVOICE_TAXES_BREAKDOWN');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -301,7 +301,7 @@ class OrderInvoiceCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
// sum by order details in order to retrieve real taxes rate
|
// sum by order details in order to retrieve real taxes rate
|
||||||
$taxes_infos = Db::getInstance()->executeS('
|
$taxes_infos = Db::getInstance()->executeS('
|
||||||
SELECT odt.`id_order_detail`, t.`rate` AS `name`, SUM(od.`total_price_tax_excl`) AS total_price_tax_excl, SUM(t.`rate`) AS rate, SUM(`total_amount`) AS `total_amount`, od.`ecotax`, od.`ecotax_tax_rate`, od.`product_quantity`
|
SELECT odt.`id_order_detail`, t.`rate` AS `name`, od.`total_price_tax_excl` AS total_price_tax_excl, SUM(t.`rate`) AS rate, SUM(`total_amount`) AS `total_amount`, od.`ecotax`, od.`ecotax_tax_rate`, od.`product_quantity`
|
||||||
FROM `'._DB_PREFIX_.'order_detail_tax` odt
|
FROM `'._DB_PREFIX_.'order_detail_tax` odt
|
||||||
LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = odt.`id_tax`)
|
LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = odt.`id_tax`)
|
||||||
LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = odt.`id_order_detail`)
|
LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = odt.`id_order_detail`)
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
'input' => array(
|
'input' => array(
|
||||||
array(
|
array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'label' => $this->l('Attribute type:'),
|
'label' => $this->l('Attribute group:'),
|
||||||
'name' => 'id_attribute_group',
|
'name' => 'id_attribute_group',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
@@ -272,7 +272,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
'id' => 'id_attribute_group',
|
'id' => 'id_attribute_group',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
),
|
),
|
||||||
'desc' => $this->l('Choose the type of the attribute')
|
'desc' => $this->l('Choose the group of the attribute')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
|
|||||||
@@ -42,6 +42,12 @@ class AdminInvoicesControllerCore extends AdminController
|
|||||||
'cast' => 'intval',
|
'cast' => 'intval',
|
||||||
'type' => 'bool'
|
'type' => 'bool'
|
||||||
),
|
),
|
||||||
|
'PS_INVOICE_TAXES_BREAKDOWN' => array(
|
||||||
|
'title' => $this->l('Enable the breakdown of taxes on the invoice:'),
|
||||||
|
'desc' => $this->l('Enable the breakdown of taxes on the invoice when there are computed (like in QC)'),
|
||||||
|
'cast' => 'intval',
|
||||||
|
'type' => 'bool'
|
||||||
|
),
|
||||||
'PS_INVOICE_PREFIX' => array(
|
'PS_INVOICE_PREFIX' => array(
|
||||||
'title' => $this->l('Invoice prefix:'),
|
'title' => $this->l('Invoice prefix:'),
|
||||||
'desc' => $this->l('Prefix used for invoice name (e.g. IN00001)'),
|
'desc' => $this->l('Prefix used for invoice name (e.g. IN00001)'),
|
||||||
|
|||||||
Reference in new issue
Block a user