// add delivery slip
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11693 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+36
-10
@@ -36,6 +36,7 @@ $functionArray = array(
|
||||
'pdf' => 'generateInvoicePDF',
|
||||
'id_order_slip' => 'generateOrderSlipPDF',
|
||||
'id_delivery' => 'generateDeliverySlipPDF',
|
||||
'delivery' => 'generateDeliverySlipPDF',
|
||||
'invoices' => 'generateInvoicesPDF',
|
||||
'invoices2' => 'generateInvoicesPDF2',
|
||||
'slips' => 'generateOrderSlipsPDF',
|
||||
@@ -66,10 +67,10 @@ function generateSupplyOrderFormPDF()
|
||||
|
||||
function generateInvoicePDF()
|
||||
{
|
||||
if (Tools::isSubmit('id_order'))
|
||||
generateInvoicePDFByIdOrder(Tools::getValue('id_order'));
|
||||
elseif (Tools::isSubmit('id_order_invoice'))
|
||||
generateInvoicePDFByIdOrderInvoice(Tools::getValue('id_order_invoice'));
|
||||
if (Tools::isSubmit('id_order'))
|
||||
generateInvoicePDFByIdOrder(Tools::getValue('id_order'));
|
||||
elseif (Tools::isSubmit('id_order_invoice'))
|
||||
generateInvoicePDFByIdOrderInvoice(Tools::getValue('id_order_invoice'));
|
||||
else
|
||||
die (Tools::displayError('Missing order ID or invoice order ID'));
|
||||
exit;
|
||||
@@ -110,11 +111,37 @@ function generateOrderSlipPDF()
|
||||
|
||||
function generateDeliverySlipPDF()
|
||||
{
|
||||
$order = Order::getByDelivery((int)($_GET['id_delivery']));
|
||||
if (!Validate::isLoadedObject($order))
|
||||
die(Tools::displayError('Cannot find order in database'));
|
||||
if (Tools::isSubmit('id_order'))
|
||||
generateDeliverySlipPDFByIdOrder(Tools::getValue('id_order'));
|
||||
elseif (Tools::isSubmit('id_order_invoice'))
|
||||
generateDeliverySlipPDFByIdOrderInvoice(Tools::getValue('id_order_invoice'));
|
||||
elseif (Tools::isSubmit('id_delivery'))
|
||||
{
|
||||
$order = Order::getByDelivery(Tools::getValue('id_delivery'));
|
||||
generateDeliverySlipPDFByIdOrder($order->id);
|
||||
}
|
||||
else
|
||||
die (Tools::displayError('Missing order ID or invoice order ID'));
|
||||
exit;
|
||||
}
|
||||
|
||||
generatePDF($order, PDF::TEMPLATE_DELIVERY_SLIP);
|
||||
function generateDeliverySlipPDFByIdOrder($id_order)
|
||||
{
|
||||
$order = new Order($id_order);
|
||||
if (!Validate::isLoadedObject($order))
|
||||
throw new PrestashopException('Can\'t load Order object');
|
||||
|
||||
$order_invoice_collection = $order->getInvoicesCollection();
|
||||
generatePDF($order_invoice_collection, PDF::TEMPLATE_DELIVERY_SLIP);
|
||||
}
|
||||
|
||||
function generateDeliverySlipPDFByIdOrderInvoice($id_order_invoice)
|
||||
{
|
||||
$order_invoice = new OrderInvoice($id_order_invoice);
|
||||
if (!Validate::isLoadedObject($order_invoice))
|
||||
throw new PrestashopException('Can\'t load Order Invoice object');
|
||||
|
||||
generatePDF($order_invoice, PDF::TEMPLATE_DELIVERY_SLIP);
|
||||
}
|
||||
|
||||
function generateInvoicesPDF()
|
||||
@@ -175,5 +202,4 @@ function generatePDF($object, $template)
|
||||
global $smarty;
|
||||
$pdf = new PDF($object, $template, $smarty);
|
||||
$pdf->render();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,32 +12,67 @@
|
||||
{foreach from=$order->getDocuments() item=document}
|
||||
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
<tr class="invoice_line" id="delivery_{$document->id}">
|
||||
{else}
|
||||
<tr class="invoice_line" id="invoice_{$document->id}">
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<tr class="invoice_line" id="orderslip_{$document->id}">
|
||||
{/if}
|
||||
|
||||
<td class="document_date">{dateFormat date=$document->date_add}</td>
|
||||
<td class="document_type">{if get_class($document) eq 'OrderInvoice'}Invoice{elseif get_class($document) eq 'OrderSlip'}Credit Slip{/if}</td>
|
||||
<td class="document_number"><a target="_blank" href="{if get_class($document) eq 'OrderInvoice'}pdf.php?pdf&id_order_invoice={$document->id}{elseif get_class($document) eq 'OrderSlip'}pdf.php?id_order_slip={$document->id}{/if}">{if get_class($document) eq 'OrderInvoice'}{$document->getInvoiceNumberFormatted($current_id_lang)}{elseif get_class($document) eq 'OrderSlip'}{l s='#'}{'%06d'|sprintf:$document->id}{/if} <img src="../img/admin/details.gif" alt="{l s='See the invoice'}" /></a></td>
|
||||
<td class="document_type">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
{l s='Delivery slip'}
|
||||
{else}
|
||||
{l s='Invoice'}
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{l s='Credit Slip'}
|
||||
{/if}</td>
|
||||
<td class="document_number">
|
||||
<a target="_blank" href="
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
pdf.php?{if isset($document->is_delivery)}delivery{else}pdf{/if}&id_order_invoice={$document->id}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
pdf.php?id_order_slip={$document->id}
|
||||
{/if}">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
#{Configuration::get('PS_DELIVERY_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->delivery_number}
|
||||
{else}
|
||||
{$document->getInvoiceNumberFormatted($current_id_lang)}
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{l s='#'}{'%06d'|sprintf:$document->id}
|
||||
{/if} <img src="../img/admin/details.gif" alt="{l s='See the document'}" /></a></td>
|
||||
<td class="document_amount">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getRestPaid()}
|
||||
<span style="color:red;font-weight:bold;">({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})</span>
|
||||
{if isset($document->is_delivery)}
|
||||
--
|
||||
{else}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getRestPaid()}
|
||||
<span style="color:red;font-weight:bold;">({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="right document_action">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if $document->getRestPaid()}
|
||||
<a href="#" class="js-set-payment" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}"><img src="../img/admin/money_add.png" alt="{l s='Set payment form'}" /></a>
|
||||
{if !isset($document->is_delivery)}
|
||||
{if $document->getRestPaid()}
|
||||
<a href="#" class="js-set-payment" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}"><img src="../img/admin/money_add.png" alt="{l s='Set payment form'}" /></a>
|
||||
{/if}
|
||||
<a href="#" onclick="$('#invoiceNote{$document->id}').show(); return false;" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}"><img src="../img/admin/note.png" alt="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}"{if $document->note eq ''} class="js-disabled-action"{/if} /></a>
|
||||
{/if}
|
||||
<a href="#" onclick="$('#invoiceNote{$document->id}').show(); return false;" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}"><img src="../img/admin/note.png" alt="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}"{if $document->note eq ''} class="js-disabled-action"{/if} /></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if !isset($document->is_delivery)}
|
||||
<tr id="invoiceNote{$document->id}" style="display:none" class="current-edit">
|
||||
<td colspan="5">
|
||||
<form action="{$currentIndex}&viewOrder&id_order={$smarty.get.id_order|escape:'htmlall':'UTF-8'}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}" method="post">
|
||||
@@ -53,6 +88,7 @@
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{foreachelse}
|
||||
<tr>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
{* Generate HTML code for printing Delivery Icon with link *}
|
||||
<span style="width:20px;">
|
||||
{if ($order_state->delivery && $order->delivery_number)}
|
||||
<a target="_blank" href="pdf.php?id_delivery={$order->delivery_number}"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
||||
<a target="_blank" href="pdf.php?id_order={$order->id}&delivery"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
|
||||
@@ -63,13 +63,13 @@
|
||||
<fieldset style="width:98%; margin-bottom: 10px;">
|
||||
<div style="width:50%; float: left;">
|
||||
{if (count($invoices_collection))}
|
||||
<a href="pdf.php?id_order={$order->id}&pdf"><img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}</a>
|
||||
<a href="pdf.php?id_order={$order->id}&pdf" target="_blank"><img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}</a>
|
||||
{else}
|
||||
<img src="../img/admin/charged_ko.gif" alt="{l s='No invoice'}" /> {l s='No invoice'}
|
||||
{/if}
|
||||
-
|
||||
{if ($currentState->delivery || $order->delivery_number)}
|
||||
<a target="_blank" href="pdf.php?id_delivery={$order->delivery_number}"><img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}</a>
|
||||
<a href="pdf.php?id_order={$order->id}&delivery" target="_blank"><img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}</a>
|
||||
{else}
|
||||
<img src="../img/admin/delivery_ko.gif" alt="{l s='No delivery slip'}" /> {l s='No delivery slip'}
|
||||
{/if}
|
||||
|
||||
+49
-14
@@ -1117,16 +1117,28 @@ class OrderCore extends ObjectModel
|
||||
|
||||
public function setDelivery()
|
||||
{
|
||||
// Set delivery number
|
||||
$number = (int)(Configuration::get('PS_DELIVERY_NUMBER'));
|
||||
if (!(int)($number))
|
||||
die(Tools::displayError('Invalid delivery number'));
|
||||
$this->delivery_number = $number;
|
||||
Configuration::updateValue('PS_DELIVERY_NUMBER', $number + 1);
|
||||
// Get all invoice
|
||||
$order_invoice_collection = $this->getInvoicesCollection();
|
||||
foreach($order_invoice_collection as $order_invoice)
|
||||
{
|
||||
$number = (int)Configuration::get('PS_DELIVERY_NUMBER');
|
||||
if (!$number)
|
||||
throw new PrestashopException('Invalid delivery number');
|
||||
|
||||
// Set delivery number on invoice
|
||||
$order_invoice->delivery_number = $number;
|
||||
$order_invoice->delivery_date = date('Y-m-d H:i:s');
|
||||
// Update Order Invoice
|
||||
$order_invoice->update();
|
||||
|
||||
// Keep for backward compatibility
|
||||
$this->delivery_number = $number;
|
||||
Configuration::updateValue('PS_DELIVERY_NUMBER', $number + 1);
|
||||
}
|
||||
|
||||
// Keep it for backward compatibility, to remove on 1.6 version
|
||||
// Set delivery date
|
||||
$this->delivery_date = date('Y-m-d H:i:s');
|
||||
|
||||
// Update object
|
||||
$this->update();
|
||||
}
|
||||
@@ -1156,7 +1168,7 @@ class OrderCore extends ObjectModel
|
||||
$sql = 'SELECT id_order
|
||||
FROM `'._DB_PREFIX_.'orders`
|
||||
WHERE `delivery_number` = '.(int)($id_delivery).'
|
||||
'.Context::getContext()->shop->addSqlRestriction();
|
||||
'.Context::getContext()->shop->addSqlRestriction();
|
||||
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
|
||||
return new Order((int)($res['id_order']));
|
||||
}
|
||||
@@ -1395,14 +1407,24 @@ class OrderCore extends ObjectModel
|
||||
public function getDocuments()
|
||||
{
|
||||
$invoices = $this->getInvoicesCollection()->getResults();
|
||||
$delivery_slips = $this->getDeliverySlipsCollection()->getResults();
|
||||
// @TODO review
|
||||
foreach($delivery_slips as $delivery)
|
||||
{
|
||||
$delivery->is_delivery = true;
|
||||
$delivery->date_add = $delivery->delivery_date;
|
||||
}
|
||||
$order_slips = $this->getOrderSlipsCollection()->getResults();
|
||||
$documents = array_merge($invoices, $order_slips);
|
||||
|
||||
// @TODO review
|
||||
function sortDocuments($a, $b)
|
||||
{
|
||||
if ($a->date_add == $b->date_add)
|
||||
return 0;
|
||||
return ($a->date_add < $b->date_add) ? -1 : 1;
|
||||
if ($a->date_add == $b->date_add)
|
||||
return 0;
|
||||
return ($a->date_add < $b->date_add) ? -1 : 1;
|
||||
}
|
||||
|
||||
$documents = array_merge($invoices, $order_slips, $delivery_slips);
|
||||
usort($documents, "sortDocuments");
|
||||
|
||||
return $documents;
|
||||
@@ -1436,7 +1458,7 @@ class OrderCore extends ObjectModel
|
||||
/**
|
||||
*
|
||||
* Get all order_slips for the current order
|
||||
* @since 1.5.0.1
|
||||
* @since 1.5.0.2
|
||||
* @return Collection of Order slip
|
||||
*/
|
||||
public function getOrderSlipsCollection()
|
||||
@@ -1446,7 +1468,6 @@ class OrderCore extends ObjectModel
|
||||
return $order_slips;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all invoices for the current order
|
||||
@@ -1460,6 +1481,20 @@ class OrderCore extends ObjectModel
|
||||
return $order_invoices;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all delivery slips for the current order
|
||||
* @since 1.5.0.2
|
||||
* @return Collection of Order invoice
|
||||
*/
|
||||
public function getDeliverySlipsCollection()
|
||||
{
|
||||
$order_invoices = new Collection('OrderInvoice');
|
||||
$order_invoices->where('id_order', '=', $this->id);
|
||||
$order_invoices->where('delivery_number', '!=', '0');
|
||||
return $order_invoices;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all not paid invoices for the current order
|
||||
* @since 1.5.0.2
|
||||
|
||||
@@ -33,6 +33,12 @@ class OrderInvoiceCore extends ObjectModel
|
||||
/** @var integer */
|
||||
public $number;
|
||||
|
||||
/** @var integer */
|
||||
public $delivery_number;
|
||||
|
||||
/** @var integer */
|
||||
public $delivery_date;
|
||||
|
||||
/** @var float */
|
||||
public $total_discount_tax_excl;
|
||||
|
||||
@@ -81,6 +87,8 @@ class OrderInvoiceCore extends ObjectModel
|
||||
'fields' => array(
|
||||
'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'delivery_number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'delivery_date' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
'total_discount_tax_excl' =>array('type' => self::TYPE_FLOAT),
|
||||
'total_discount_tax_incl' =>array('type' => self::TYPE_FLOAT),
|
||||
'total_paid_tax_excl' => array('type' => self::TYPE_FLOAT),
|
||||
|
||||
@@ -32,17 +32,18 @@ class HTMLTemplateDeliverySlipCore extends HTMLTemplate
|
||||
{
|
||||
public $order;
|
||||
|
||||
public function __construct(Order $order, $smarty)
|
||||
public function __construct(OrderInvoice $order_invoice, $smarty)
|
||||
{
|
||||
$this->order = $order;
|
||||
$this->smarty = $smarty;
|
||||
$this->order_invoice = $order_invoice;
|
||||
$this->order = new Order($this->order_invoice->id_order);
|
||||
$this->smarty = $smarty;
|
||||
|
||||
// header informations
|
||||
$this->date = Tools::displayDate($order->invoice_date, (int)$order->id_lang);
|
||||
$this->title = 'Invoice '.Configuration::get('PS_INVOICE_PREFIX').sprintf('%06d', $order->invoice_number);
|
||||
$this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang);
|
||||
$this->title = self::l('Delivery').' #'.Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id).sprintf('%06d', $this->order_invoice->delivery_number);
|
||||
|
||||
// footer informations
|
||||
$shop = new Shop((int)$order->id_shop);
|
||||
$shop = new Shop((int)$this->order->id_shop);
|
||||
$this->address = $shop->getAddress();
|
||||
}
|
||||
|
||||
@@ -68,9 +69,10 @@ class HTMLTemplateDeliverySlipCore extends HTMLTemplate
|
||||
|
||||
$this->smarty->assign(array(
|
||||
'order' => $this->order,
|
||||
'order_details' => $this->order->getProducts(),
|
||||
'order_details' => $this->order_invoice->getProducts(),
|
||||
'delivery_address' => $formatted_delivery_address,
|
||||
'invoice_address' => $formatted_invoice_address,
|
||||
'order_invoice' => $this->order_invoice
|
||||
));
|
||||
|
||||
return $this->smarty->fetch(_PS_THEME_DIR_.'/pdf/delivery-slip.tpl');
|
||||
|
||||
@@ -42,7 +42,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
|
||||
// header informations
|
||||
$this->date = Tools::displayDate($order_invoice->date_add, (int)$this->order->id_lang);
|
||||
$this->title = self::l('Invoice ').Configuration::get('PS_INVOICE_PREFIX').sprintf('%06d', $order_invoice->number);
|
||||
$this->title = self::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', Context::getContext()->language->id).sprintf('%06d', $order_invoice->number);
|
||||
|
||||
// footer informations
|
||||
$shop = new Shop((int)$this->order->id_shop);
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6844 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
function add_order_carrier()
|
||||
{
|
||||
$orders = Db::getInstance()->executeS('
|
||||
SELECT DISTINCT o.`id_order`, o.`shipping_number`, o.`id_carrier`, od.`id_order_invoice`, od.`product_weight`, o.`total_shipping_tax_incl`, o.`total_shipping_tax_excl`, o.`date_add`
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order` = o.`id_order`)
|
||||
WHERE 1');
|
||||
if (count($orders) && is_array($orders))
|
||||
{
|
||||
$i = 0;
|
||||
$sql = 'INSERT INTO `'._DB_PREFIX_.'order_carrier` (`id_order_carrier`, `id_order`, `id_carrier`, `id_order_invoice`, `weight`, `shipping_cost_tax_excl`, `shipping_cost_tax_incl`, `date_add`) VALUES ';
|
||||
foreach ($orders as $order)
|
||||
$sql .= '(NULL, '.(int)$order['id_order'].', '.(int)$order['id_carrier'].', '.(int)$order['id_order_invoice'].', '.(float)$order['product_weight'].', '.(float)$order['total_shipping_tax_excl'].', '.(float)$order['total_shipping_tax_incl'].', "'.pSQL($order['date_add']).'"),';
|
||||
// removing last comma to avoid SQL error
|
||||
$sql = substr($sql, 0, strlen($sql) - 1);
|
||||
Db::getInstance()->execute($sql);
|
||||
}
|
||||
}
|
||||
@@ -1069,6 +1069,8 @@ CREATE TABLE `PREFIX_order_invoice` (
|
||||
`id_order_invoice` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`id_order` int(11) NOT NULL,
|
||||
`number` int(11) NOT NULL,
|
||||
`delivery_number` int(11) NOT NULL,
|
||||
`delivery_date` datetime,
|
||||
`total_discount_tax_excl` decimal(17,2) NOT NULL DEFAULT '0.00',
|
||||
`total_discount_tax_incl` decimal(17,2) NOT NULL DEFAULT '0.00',
|
||||
`total_paid_tax_excl` decimal(17,2) NOT NULL DEFAULT '0.00',
|
||||
|
||||
@@ -312,7 +312,6 @@ ADD `total_shipping_price_tax_excl` DECIMAL(20, 6) NOT NULL AFTER `total_shippi
|
||||
ADD `purchase_supplier_price` DECIMAL(20, 6) NOT NULL AFTER `total_shipping_price_tax_excl`,
|
||||
ADD `original_product_price` DECIMAL(20, 6) NOT NULL AFTER `purchase_supplier_price`;
|
||||
|
||||
|
||||
ALTER TABLE `PREFIX_orders`
|
||||
ADD `total_discount_tax_excl` decimal(17,2) NOT NULL AFTER `total_discounts`,
|
||||
ADD `total_discount_tax_incl` decimal(17,2) NOT NULL AFTER `total_discount_tax_excl`,
|
||||
@@ -351,6 +350,9 @@ CREATE TABLE IF NOT EXISTS `PREFIX_linksmenutop_lang` (
|
||||
INDEX ( `id_link` , `id_lang`, `id_shop`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `PREFIX_order_invoice` ADD `delivery_number` int(0) NOT NULL DEFAULT '0' AFTER `number`;
|
||||
ALTER TABLE `PREFIX_order_invoice` ADD `delivery_date` datetime AFTER `delivery_number`;
|
||||
|
||||
INSERT INTO `PREFIX_order_invoice` (`id_order`, `number`, `total_discount_tax_excl`, `total_discount_tax_incl`, `total_paid_tax_excl`, `total_paid_tax_incl`, `total_products`, `total_products_wt`, `total_shipping_tax_excl`, `total_shipping_tax_incl`, `total_wrapping_tax_excl`, `total_wrapping_tax_incl`, `note`, `date_add`) (
|
||||
SELECT `id_order`, `invoice_number`, `total_discount_tax_excl`, `total_discount_tax_incl`, `total_paid_tax_excl`, `total_paid_tax_incl`, `total_products`, `total_products_wt`, `total_shipping_tax_excl`, `total_shipping_tax_incl`, `total_wrapping_tax_excl`, `total_wrapping_tax_incl`, '', `invoice_date`
|
||||
FROM `PREFIX_orders`
|
||||
|
||||
@@ -81,7 +81,18 @@
|
||||
{$order->date_add|date_format:"%d-%m-%Y %H:%M"}<br />
|
||||
<br />
|
||||
<b>{l s='Payment Method:' pdf='true'}</b><br />
|
||||
{$order->payment}<br />
|
||||
<table style="width: 100%;">
|
||||
{foreach from=$order_invoice->getOrderPaymentCollection() item=payment}
|
||||
<tr>
|
||||
<td style="width: 50%">{$payment->payment_method}</td>
|
||||
<td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td>
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td>{l s='No payment'}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<br />
|
||||
<!-- / CUSTOMER INFORMATIONS -->
|
||||
</td>
|
||||
|
||||
@@ -182,14 +182,14 @@ $_LANGADM['AdminAttributeGenerator42dc1497090b299a41c64d1389e6ca8c'] = 'HT :';
|
||||
$_LANGADM['AdminAttributeGenerator419cdd539861e743b872b2c959629a54'] = 'TTC :';
|
||||
$_LANGADM['AdminAttributeGenerator18c17dae7b84c21b38873e823af2bcfe'] = 'produit(s) créé(s) avec succès.';
|
||||
$_LANGADM['AdminAttributeGenerator81315cfd898aada1e99e0034b4b078c3'] = 'Générateur de déclinaisons de produits';
|
||||
$_LANGADM['AdminAttributeGeneratorec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter';
|
||||
$_LANGADM['AdminAttributeGeneratorf2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer';
|
||||
$_LANGADM['AdminAttributeGeneratorbbfdf55069aaebae3825be9d4425ce2a'] = 'Ajoutez ou modifiez les attributs pour le produit :';
|
||||
$_LANGADM['AdminAttributeGenerator694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité';
|
||||
$_LANGADM['AdminAttributeGenerator63d5049791d9d79d86e9a108b0a999ca'] = 'Référence';
|
||||
$_LANGADM['AdminAttributeGenerator32b919d18cfaca89383f6000dcc9c031'] = 'Générer';
|
||||
$_LANGADM['AdminAttributeGenerator233c543a23378c4ffd0e1efb17408510'] = 'Impact sur le prix :';
|
||||
$_LANGADM['AdminAttributeGenerator792467936100838046f749e63dadfbdb'] = 'Impact sur le poids :';
|
||||
$_LANGADM['AdminAttributeGeneratorec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter';
|
||||
$_LANGADM['AdminAttributeGeneratorf2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer';
|
||||
$_LANGADM['AdminRangeWeightd3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection';
|
||||
$_LANGADM['AdminRangeWeighte25f0ecd41211b01c83e5fec41df4fe7'] = 'Supprimer les éléments sélectionnés ?';
|
||||
$_LANGADM['AdminRangeWeightb718adec73e04ce3ec720dd11a06a308'] = 'ID';
|
||||
@@ -1182,8 +1182,8 @@ $_LANGADM['AdminEmployeesff37db4701ba8f1a289fc2f81cc43f9d'] = 'Autoriser les emp
|
||||
$_LANGADM['AdminEmployeesbafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
|
||||
$_LANGADM['AdminEmployees93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
|
||||
$_LANGADM['AdminEmployeeseb626c94531ec554f93b2b78a77c8b1b'] = 'Employés';
|
||||
$_LANGADM['AdminEmployeesbe5e0b5d50d48b049bd0f7b57cd163f9'] = 'Nom :';
|
||||
$_LANGADM['AdminEmployees668a8d8d7ffe5da112b266e46b79b685'] = 'Prénom :';
|
||||
$_LANGADM['AdminEmployeesbe5e0b5d50d48b049bd0f7b57cd163f9'] = 'Nom :';
|
||||
$_LANGADM['AdminEmployeesb341a59d5636ed3d6a819137495b08a0'] = 'Mot de passe :';
|
||||
$_LANGADM['AdminEmployeesdc5e055e0c66ae48929d03a327972a58'] = 'Laisser blanc si vous ne souhaitez pas changer votre mot de passe';
|
||||
$_LANGADM['AdminEmployees2467bfdbc86d3cc7aab2130f56ce6978'] = 'Minimum 8 caractères, uniquement lettres, nombres ou tirets';
|
||||
@@ -2327,8 +2327,6 @@ $_LANGADM['AdminPreferencesdc58d598b2b22e50c5af01134305a4fb'] = 'Active l\'aide
|
||||
$_LANGADM['AdminPreferencesc87330f475e4384552c0077927d26e1a'] = 'Durée de vie du cookie Front Office';
|
||||
$_LANGADM['AdminPreferences6d964e25aa6aa88c8353880e00202cf4'] = 'Indiquez le nombre d\'heures';
|
||||
$_LANGADM['AdminPreferencese673b146824251548feecf1f3929aceb'] = 'Durée de vie du cookie Back Office';
|
||||
$_LANGADM['AdminPreferencesc760118c537146713521758269a44bd3'] = 'Activer le B2B';
|
||||
$_LANGADM['AdminPreferences3009d174d7831e0445125204c567d195'] = 'Activer ou désactiver le mode B2B. Lorsque cette option est activer certaines fonctions B2B apparaissent.';
|
||||
$_LANGADM['AdminPreferences59aad85b376259844b471a758908a3c1'] = 'Type de processus de commande';
|
||||
$_LANGADM['AdminPreferences6c9f73b6b5d16baa641cf8343348eb8d'] = 'Vous pouvez choisir le type de processus de commande, standard (5 étapes, 5 pages) ou \"One Page Checkout\" (5 étapes au sein d\'une même page)';
|
||||
$_LANGADM['AdminPreferencesa2c3880e68cde73646da32ea19e17ab8'] = 'Autoriser l\'envoi multiple';
|
||||
@@ -3490,6 +3488,7 @@ $_LANGADM['AdminOrdersec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter';
|
||||
$_LANGADM['AdminOrdersea4788705e6873b424c65e91c2846b19'] = 'Annuler';
|
||||
$_LANGADM['AdminOrders0945359809dad1fbf3dea1c95a0da951'] = 'Document';
|
||||
$_LANGADM['AdminOrdersb2ee912b91d69b435159c7c3f6df7f5f'] = 'Numéro';
|
||||
$_LANGADM['AdminOrders01abfc750a0c942167651c40d088531d'] = 'n°';
|
||||
$_LANGADM['AdminOrders605d06666aea39d2546be167abbbb4c9'] = 'Voir la facture';
|
||||
$_LANGADM['AdminOrdersc12a553ab6ad810580afa3f07aa9f51f'] = 'non payé';
|
||||
$_LANGADM['AdminOrders8b3e7bc0ed634c2bc8ac54a4cc2e781f'] = 'Mise en place d\'une formulaire de paiment';
|
||||
@@ -3518,7 +3517,7 @@ $_LANGADM['AdminOrdersf2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer';
|
||||
$_LANGADM['AdminOrders0d8d58008ef5dd7afce337373ef73993'] = 'Date';
|
||||
$_LANGADM['AdminOrders914419aa32f04011357d3b604a86d7eb'] = 'Transporteur';
|
||||
$_LANGADM['AdminOrders8c489d0946f66d17d73f26366a4bf620'] = 'Poid';
|
||||
$_LANGADM['AdminOrders552a0d8c17d95d5dbdc0c28217024f5a'] = 'Coup du transport';
|
||||
$_LANGADM['AdminOrders552a0d8c17d95d5dbdc0c28217024f5a'] = 'Coût du transport';
|
||||
$_LANGADM['AdminOrders5068c162a60b5859f973f701333f45c5'] = 'Numéro de suivi';
|
||||
$_LANGADM['AdminOrders36b4b6df120354132139341e28a3f283'] = 'Montrer les paniers et commandes pour ce client';
|
||||
$_LANGADM['AdminOrders9aff554dd26baa786f105ec17fdcaac1'] = 'Cacher les paniers et commandes pour ce client';
|
||||
@@ -3593,7 +3592,6 @@ $_LANGADM['AdminOrders78e731027d8fd50ed642340b7c9a63b3'] = 'message';
|
||||
$_LANGADM['AdminOrders86024cad1e83101d97359d7351051156'] = 'produits';
|
||||
$_LANGADM['AdminOrdersf5bf48aa40cad7891eb709fcf1fde128'] = 'produit';
|
||||
$_LANGADM['AdminOrders1d949d2235747b894bbaae35fbf44f1d'] = 'Informations client';
|
||||
$_LANGADM['AdminOrders01abfc750a0c942167651c40d088531d'] = 'n°';
|
||||
$_LANGADM['AdminOrders08907d6524467f598eaeeb0ec85fa715'] = 'Cette commande a été passé par un';
|
||||
$_LANGADM['AdminOrders084e0343a0486ff05530df6c705c8bb4'] = 'compte invité';
|
||||
$_LANGADM['AdminOrders80e915c39ca9254655d2802979aa698b'] = 'Transformer en compte client';
|
||||
@@ -3671,8 +3669,6 @@ $_LANGADM['AdminOrdersdc5f499e83aef4f6811faa4081631740'] = 'Le';
|
||||
$_LANGADM['AdminOrdersd98a07f84921b24ee30f86fd8cd85c3c'] = 'de';
|
||||
$_LANGADM['AdminOrders73bd682c8a8613f6c009f1b802dc2cef'] = 'Privé :';
|
||||
$_LANGADM['AdminOrders20d1f35b42c6d4939d789a775880ba21'] = 'Une fois le message lu, merci de cliquer sur l\'encoche verte';
|
||||
$_LANGADM['AdminOrderscf3bae95c5f6023d5a10fe415b205a45'] = 'Avoirs';
|
||||
$_LANGADM['AdminOrders8986eb49c98d0bc7867e0a5ecfefc4d7'] = 'Aucun avoir pour cette commande.';
|
||||
$_LANGADM['AdminOrders630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste';
|
||||
$_LANGADM['AdminOrders7feecca20c2ba1e6c33be4a50594d860'] = 'Détail de paiement';
|
||||
$_LANGADM['AdminOrdersa79821638598539551d5e0423df9ba8f'] = 'Définir l\'ID de la transaction';
|
||||
|
||||
Reference in New Issue
Block a user