[-] BO : fixed bug #PSCFV-5610 Credit slip reference is too short
[*] BO : added prefix on credit slip reference
This commit is contained in:
@@ -73,7 +73,7 @@
|
|||||||
{$document->getInvoiceNumberFormatted($current_id_lang)}
|
{$document->getInvoiceNumberFormatted($current_id_lang)}
|
||||||
{/if}
|
{/if}
|
||||||
{elseif get_class($document) eq 'OrderSlip'}
|
{elseif get_class($document) eq 'OrderSlip'}
|
||||||
{l s='#%d' sprintf=$document->id}
|
#{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
|
||||||
{/if} <img src="../img/admin/details.gif" alt="{l s='See the document'}" /></a></td>
|
{/if} <img src="../img/admin/details.gif" alt="{l s='See the document'}" /></a></td>
|
||||||
<td class="document_amount">
|
<td class="document_amount">
|
||||||
{if get_class($document) eq 'OrderInvoice'}
|
{if get_class($document) eq 'OrderInvoice'}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice
|
|||||||
|
|
||||||
// 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 = HTMLTemplateOrderSlip::l('Slip #').sprintf('%06d', (int)$this->order_slip->id);
|
$this->title = HTMLTemplateOrderSlip::l('Slip #').Configuration::get('PS_CREDIT_SLIP_PREFIX', Context::getContext()->language->id).sprintf('%06d', (int)$this->order_slip->id);
|
||||||
|
|
||||||
// footer informations
|
// footer informations
|
||||||
$this->shop = new Shop((int)$this->order->id_shop);
|
$this->shop = new Shop((int)$this->order->id_shop);
|
||||||
@@ -195,10 +195,9 @@ class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$tax_rate = 0;
|
||||||
foreach ($tax_amount as $tax_id => $amount)
|
foreach ($tax_amount as $tax_id => $amount)
|
||||||
{
|
{
|
||||||
$tax_rate = 0;
|
|
||||||
|
|
||||||
$tax = new Tax((int)$tax_id);
|
$tax = new Tax((int)$tax_id);
|
||||||
$tax_rate = $tax->rate;
|
$tax_rate = $tax->rate;
|
||||||
$infos['total_price_tax_excl'] += (float)Tools::ps_round($order_slip_details['amount_tax_excl'], 2);
|
$infos['total_price_tax_excl'] += (float)Tools::ps_round($order_slip_details['amount_tax_excl'], 2);
|
||||||
|
|||||||
@@ -59,6 +59,21 @@ class AdminSlipControllerCore extends AdminController
|
|||||||
$this->_select = 'a.id_order_slip AS id_pdf';
|
$this->_select = 'a.id_order_slip AS id_pdf';
|
||||||
$this->optionTitle = $this->l('Slip');
|
$this->optionTitle = $this->l('Slip');
|
||||||
|
|
||||||
|
$this->fields_options = array(
|
||||||
|
'general' => array(
|
||||||
|
'title' => $this->l('Credit slip options'),
|
||||||
|
'fields' => array(
|
||||||
|
'PS_CREDIT_SLIP_PREFIX' => array(
|
||||||
|
'title' => $this->l('Credit slips prefix:'),
|
||||||
|
'desc' => $this->l('Prefix used for credit slips'),
|
||||||
|
'size' => 6,
|
||||||
|
'type' => 'textLang'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'submit' => array()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,6 +145,7 @@ class AdminSlipControllerCore extends AdminController
|
|||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
$this->content .= $this->renderList();
|
$this->content .= $this->renderList();
|
||||||
$this->content .= $this->renderForm();
|
$this->content .= $this->renderForm();
|
||||||
|
$this->content .= '<br>'.$this->renderOptions();
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'content' => $this->content,
|
||||||
|
|||||||
Reference in New Issue
Block a user