// Normalize
This commit is contained in:
@@ -89,7 +89,7 @@ abstract class HTMLTemplateCore
|
|||||||
{
|
{
|
||||||
$shop_address_obj = $this->shop->getAddress();
|
$shop_address_obj = $this->shop->getAddress();
|
||||||
if (isset($shop_address_obj) && $shop_address_obj instanceof Address)
|
if (isset($shop_address_obj) && $shop_address_obj instanceof Address)
|
||||||
$shop_address = AddressFormat::generateAddress($shop_address_obj, array(), ' - ', ' ');return $shop_address;
|
$shop_address = AddressFormat::generateAddress($shop_address_obj, array(), ' - ', ' ');
|
||||||
return $shop_address;
|
return $shop_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ abstract class HTMLTemplateCore
|
|||||||
if (@!include(_PS_THEME_DIR_.'pdf/lang/'.$iso.'.php'))
|
if (@!include(_PS_THEME_DIR_.'pdf/lang/'.$iso.'.php'))
|
||||||
die('Cannot include PDF translation language file : '._PS_THEME_DIR_.'pdf/lang/'.$iso.'.php');
|
die('Cannot include PDF translation language file : '._PS_THEME_DIR_.'pdf/lang/'.$iso.'.php');
|
||||||
|
|
||||||
if (!isset($_LANGPDF) OR !is_array($_LANGPDF))
|
if (!isset($_LANGPDF) || !is_array($_LANGPDF))
|
||||||
return str_replace('"', '"', $string);
|
return str_replace('"', '"', $string);
|
||||||
$key = md5(str_replace('\'', '\\\'', $string));
|
$key = md5(str_replace('\'', '\\\'', $string));
|
||||||
$str = (key_exists('PDF'.$key, $_LANGPDF) ? $_LANGPDF['PDF'.$key] : $string);
|
$str = (key_exists('PDF'.$key, $_LANGPDF) ? $_LANGPDF['PDF'.$key] : $string);
|
||||||
|
|||||||
@@ -87,8 +87,8 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
|||||||
{
|
{
|
||||||
$invoice_address = new Address((int)$this->order->id_address_invoice);
|
$invoice_address = new Address((int)$this->order->id_address_invoice);
|
||||||
$tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT')
|
$tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT')
|
||||||
AND !empty($invoiceAddress->vat_number)
|
&& !empty($invoiceAddress->vat_number)
|
||||||
AND $invoiceAddress->id_country != Configuration::get('VATNUMBER_COUNTRY');
|
&& $invoiceAddress->id_country != Configuration::get('VATNUMBER_COUNTRY');
|
||||||
|
|
||||||
$this->smarty->assign(array(
|
$this->smarty->assign(array(
|
||||||
'tax_exempt' => $tax_exempt,
|
'tax_exempt' => $tax_exempt,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class HTMLTemplateOrderReturnCore extends HTMLTemplate
|
|||||||
|
|
||||||
// header informations
|
// header informations
|
||||||
$this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang);
|
$this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang);
|
||||||
$this->title = HTMLTemplateOrderReturn::l('Order Return '.sprintf('%06d', $this->order_return->id); // TODO
|
$this->title = HTMLTemplateOrderReturn::l('Order Return '.sprintf('%06d', $this->order_return->id)); // TODO
|
||||||
|
|
||||||
// footer informations
|
// footer informations
|
||||||
$this->shop = new Shop((int)$this->order->id_shop);
|
$this->shop = new Shop((int)$this->order->id_shop);
|
||||||
|
|||||||
+3
-3
@@ -194,7 +194,7 @@ class TaxCore extends ObjectModel
|
|||||||
* @param id_address
|
* @param id_address
|
||||||
* @return float $tax_rate
|
* @return float $tax_rate
|
||||||
*/
|
*/
|
||||||
public static function getProductEcotaxRate($id_address = NULL)
|
public static function getProductEcotaxRate($id_address = null)
|
||||||
{
|
{
|
||||||
$address = Address::initialize($id_address);
|
$address = Address::initialize($id_address);
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ class TaxCore extends ObjectModel
|
|||||||
* @param id_address
|
* @param id_address
|
||||||
* @return float $tax_rate
|
* @return float $tax_rate
|
||||||
*/
|
*/
|
||||||
public static function getCarrierTaxRate($id_carrier, $id_address = NULL)
|
public static function getCarrierTaxRate($id_carrier, $id_address = null)
|
||||||
{
|
{
|
||||||
$address = Address::initialize($id_address);
|
$address = Address::initialize($id_address);
|
||||||
$id_tax_rules = (int)Carrier::getIdTaxRulesGroupByIdCarrier((int)$id_carrier);
|
$id_tax_rules = (int)Carrier::getIdTaxRulesGroupByIdCarrier((int)$id_carrier);
|
||||||
@@ -250,7 +250,7 @@ class TaxCore extends ObjectModel
|
|||||||
* @param integer $id_country
|
* @param integer $id_country
|
||||||
* @return Tax
|
* @return Tax
|
||||||
*/
|
*/
|
||||||
public static function getProductTaxRate($id_product, $id_address = NULL)
|
public static function getProductTaxRate($id_product, $id_address = null)
|
||||||
{
|
{
|
||||||
$address = Address::initialize($id_address);
|
$address = Address::initialize($id_address);
|
||||||
$id_tax_rules = (int)Product::getIdTaxRulesGroupByIdProduct($id_product);
|
$id_tax_rules = (int)Product::getIdTaxRulesGroupByIdProduct($id_product);
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ abstract class TaxManagerModuleCore extends Module
|
|||||||
|
|
||||||
public function hookTaxManager($args)
|
public function hookTaxManager($args)
|
||||||
{
|
{
|
||||||
|
$class_file = _PS_MODULE_DIR_.'/'.$this->name.'/'.$this->tax_manager_class.'.php';
|
||||||
$class_file =_PS_MODULE_DIR_.'/'.$this->name.'/'.$this->tax_manager_class.'.php';
|
|
||||||
|
|
||||||
if (!isset($this->tax_manager_class) || !file_exists($class_file))
|
if (!isset($this->tax_manager_class) || !file_exists($class_file))
|
||||||
die(Tools::displayError('Incorrect Tax Manager class ['.$this->tax_manager_class.']'));
|
die(Tools::displayError('Incorrect Tax Manager class ['.$this->tax_manager_class.']'));
|
||||||
|
|||||||
Reference in New Issue
Block a user