Skip to content

Commit

Permalink
// company_address to shop_address
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Apr 28, 2015
1 parent 1a040e6 commit 25c1374
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions classes/order/OrderInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class OrderInvoiceCore extends ObjectModel
/** @var float */
public $total_wrapping_tax_incl;

/** @var string note */
public $company_address;
/** @var string shop address */
public $shop_address;

/** @var string note */
public $note;
Expand Down Expand Up @@ -112,7 +112,7 @@ class OrderInvoiceCore extends ObjectModel
'shipping_tax_computation_method' => array('type' => self::TYPE_INT),
'total_wrapping_tax_excl' =>array('type' => self::TYPE_FLOAT),
'total_wrapping_tax_incl' =>array('type' => self::TYPE_FLOAT),
'company_address' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'size' => 1000),
'shop_address' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'size' => 1000),
'note' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 65000),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
),
Expand All @@ -128,7 +128,7 @@ public function add($autodate = true, $null_values = false)
$address->city = Configuration::get('PS_SHOP_CITY');
$address->phone = Configuration::get('PS_SHOP_PHONE');

$this->company_address = AddressFormat::generateAddress($address, array(), '<br />', ' ');
$this->shop_address = AddressFormat::generateAddress($address, array(), '<br />', ' ');

return parent::add();
}
Expand Down
2 changes: 1 addition & 1 deletion install-dev/data/db_structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ CREATE TABLE `PREFIX_order_invoice` (
`shipping_tax_computation_method` int(10) unsigned NOT NULL,
`total_wrapping_tax_excl` decimal(20, 6) NOT NULL DEFAULT '0.00',
`total_wrapping_tax_incl` decimal(20, 6) NOT NULL DEFAULT '0.00',
`company_address` text DEFAULT NULL,
`shop_address` text DEFAULT NULL,
`note` text,
`date_add` datetime NOT NULL,
PRIMARY KEY (`id_order_invoice`),
Expand Down
2 changes: 1 addition & 1 deletion install-dev/upgrade/sql/1.6.1.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,6 @@ ALTER TABLE `PREFIX_configuration_kpi` CHANGE `name` `name` varchar(64);
ALTER TABLE `PREFIX_smarty_lazy_cache` CHANGE `cache_id` `cache_id` varchar(255) NOT NULL DEFAULT '';
TRUNCATE TABLE `PREFIX_smarty_lazy_cache`;

ALTER TABLE `PREFIX_order_invoice` ADD `company_address` TEXT DEFAULT NULL AFTER `total_wrapping_tax_incl`;
ALTER TABLE `PREFIX_order_invoice` ADD `shop_address` TEXT DEFAULT NULL AFTER `total_wrapping_tax_incl`;

INSERT INTO `PREFIX_hook` (`name`, `title`, `description`) VALUES ('displayInvoiceLegalFreeText', 'PDF Invoice - Legal Free Text', 'This hook allows you to modify the legal free text on PDF invoices');
2 changes: 1 addition & 1 deletion pdf/invoice.addresses-tab.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<table id="addresses-tab">
<tr>
<td width="33%">
<p class="small">{$order_invoice->company_address}</p>
<p class="small">{$order_invoice->shop_address}</p>
</td>
<td width="33%">
{if $delivery_address}
Expand Down

0 comments on commit 25c1374

Please sign in to comment.