Commit 2f747415 authored by bMancone's avatar bMancone

// AdminProductsController: added new array to translate tabs name. Added...

// AdminProductsController: added new array to translate tabs name. Added translations of fr/admin & SupplyOrderForm(PDF)
parent be8784fc
......@@ -85,7 +85,7 @@ class HTMLTemplateSupplyOrderForm extends HTMLTemplate
*/
public function getFilename()
{
return ($this->l('SupplyOrderForm').sprintf('_%s', $this->supply_order->reference).'.pdf');
return (self::l('SupplyOrderForm').sprintf('_%s', $this->supply_order->reference).'.pdf');
}
protected function getTaxOrderSummary()
......@@ -122,8 +122,8 @@ class HTMLTemplateSupplyOrderForm extends HTMLTemplate
if (isset($this->address) && $this->address instanceof Address)
$shop_address = AddressFormat::generateAddress($this->address, array(), ' - ', ' ');
$free_text = $this->l('DE: Discount excluded ');
$free_text .= $this->l(' DI: Discount included');
$free_text = self::l('DE: Discount excluded ');
$free_text .= self::l(' DI: Discount included');
$this->smarty->assign(array(
'shop_address' => $shop_address,
......
......@@ -49,6 +49,8 @@ class AdminProductsControllerCore extends AdminController
'Accounting'
);
protected $available_tabs_lang = array ();
protected $tabs_toolbar_save_buttons = array(
'Informations' => true,
'Images' => true,
......@@ -93,6 +95,21 @@ class AdminProductsControllerCore extends AdminController
'align' => 'center', 'position' => 'position'),
);
// @since 1.5 : translations for tabs
$this->available_tabs_lang = array (
'Informations' => $this->l('Informations'),
'Images' => $this->l('Images'),
'Prices' => $this->l('Prices'),
'Combinations' => $this->l('Combinations'),
'Features' => $this->l('Features'),
'Customization' => $this->l('Customization'),
'Attachments' => $this->l('Attachments'),
'Quantities' => $this->l('Quantities'),
'Suppliers' => $this->l('Suppliers'),
'Warehouses' => $this->l('Warehouses'),
'Accounting' => $this->l('Accounting')
);
/* Join categories table */
if ($id_category = Tools::getvalue('id_category'))
$this->_category = new Category($id_category);
......@@ -1594,17 +1611,16 @@ class AdminProductsControllerCore extends AdminController
$action = $this->action;
if (empty($action) || !method_exists($this, 'initForm'.$action))
$action = 'Informations';
if(Tools::getValue('id_product'))
if (Tools::getValue('id_product'))
{
// i is used as producttab id
// i is used as product_tab id
$i = 0;
foreach($this->available_tabs as $product_tab)
foreach ($this->available_tabs as $product_tab)
{
$product_tabs[$product_tab] = array(
'id' => ++$i.'-'.$product_tab,
'selected' => (strtolower($product_tab) == strtolower($action)),
// @todo $this->l() instead of product_tab
'name' => $product_tab,
'name' => $this->available_tabs_lang[$product_tab],
'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.Tools::getValue('id_product').'&action='.$product_tab,
);
}
......
......@@ -1012,7 +1012,7 @@ INSERT INTO `PREFIX_tab_lang` (`id_lang`, `id_tab`, `name`) VALUES
(2, 96, 'Entrepôts'),
(2, 97, 'Gestion du stock'),
(2, 98, 'Etat instantané du stock'),
(2, 99, 'Couverture de stock'),
(2, 99, 'Couverture du stock'),
(2, 100, 'Commandes fournisseurs'),
(2, 101, 'Générateur de combinaisons'),
(2, 102, 'Comptabilité'),
......
......@@ -3,6 +3,11 @@
global $_LANGPDF;
$_LANGPDF = array();
$_LANGPDF['PDF6c2fbe34c186a6b5725d212ad8cd2432'] = 'Facture';
$_LANGPDF['PDFf771e4a4df40bf061607fdb8e3f140dc'] = 'Bon de commande';
$_LANGPDF['PDF1755ce0e3fd8c2d1a1ca1bbf34048b59'] = 'BonDeCommande';
$_LANGPDF['PDF3a80d6ec5285dd5d3930db30d04e2b9e'] = 'HR : hors remise';
$_LANGPDF['PDFa58b1c9575ab07c5be819243c96d9c0e'] = 'RC : remise comprise';
$_LANGPDF['PDF2f2f0f119a907c6c67a3c6fcde0193ab'] = 'Addresse de Livraison';
$_LANGPDF['PDF28a59051cd90053f87bacd5f1ffbc0b8'] = 'Adresse de Paiement';
$_LANGPDF['PDFe2f324b87eac820c81e4d4a1105dcddf'] = 'Adresse de Paiement & Livraison';
$_LANGPDF['PDFd8b2145d049378e78bd41e65b31213f0'] = 'Num. commande :';
......@@ -20,7 +25,6 @@ $_LANGPDF['PDF22caf639b05c0fa192e81d58c553c89a'] = 'Total HT';
$_LANGPDF['PDFb602e0d0c6a72053d0a5be60cb2f8126'] = 'Total Taxes';
$_LANGPDF['PDF068f80c7519d0528fb08e82137a72131'] = 'Produits';
$_LANGPDF['PDFea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Transport';
$_LANGPDF['PDF2f2f0f119a907c6c67a3c6fcde0193ab'] = 'Addresse de Livraison';
$_LANGPDF['PDF2b56b5ec383be252fe778c4c6066b2fb'] = 'Adresse de Paiement & Livraison';
$_LANGPDF['PDF1a22913fb1b16ada25c2637af9d44013'] = 'Produit / Référence';
$_LANGPDF['PDF197101c4a1b1fc503dcd6ebee127aa10'] = 'Prix Unitaire';
......@@ -31,8 +35,25 @@ $_LANGPDF['PDF96b0141273eabab320119c467cdcaf17'] = 'Total';
$_LANGPDF['PDF7926243ab60a08b15932021bf108c578'] = 'Total Produits HT';
$_LANGPDF['PDF984a93f9899bf0b0a250ba66f022c630'] = 'Total Produits TTC';
$_LANGPDF['PDF5082245495aa792b3d0874088d2b111b'] = 'Total Produits';
$_LANGPDF['PDF3796bba38e4bc7dbc3ec97d73be42328'] = '\r\n ';
$_LANGPDF['PDF67606e3dd25c5effeb991c704b96d19c'] = '\r\n ';
$_LANGPDF['submitTranslationsPdf'] = 'Update translations';
$_LANGPDF['PDF0d8d58008ef5dd7afce337373ef73993'] = 'Date :';
$_LANGPDF['PDF3796bba38e4bc7dbc3ec97d73be42328'] = 'rn ';
$_LANGPDF['PDF67606e3dd25c5effeb991c704b96d19c'] = 'rn ';
$_LANGPDF['PDF66f6e4bbd0a0af1af6b54763871dd280'] = 'Produits commandés :';
$_LANGPDF['PDF63d5049791d9d79d86e9a108b0a999ca'] = 'Référence';
$_LANGPDF['PDFf107f5a9ee4ecea58d0f29ae7959baa8'] = 'Nom';
$_LANGPDF['PDFc8ba77264f6e923f5ee35abf3108ae7c'] = 'P.U HT';
$_LANGPDF['PDF9b8362e5321f70746e9cb8f615c28d05'] = 'Prix HT (HR)';
$_LANGPDF['PDF6703aa9936582b4381418f7d523370b4'] = 'Taux de remise';
$_LANGPDF['PDFa86dc2fff006afd2deb243d7e26b30e7'] = 'Prix HT (RC)';
$_LANGPDF['PDF20a34c4e30c5bbe1d3f870ac55f0d831'] = 'Taux TVA';
$_LANGPDF['PDFfa2ce544158555e8f06c69dd9e681832'] = 'Prix TTC';
$_LANGPDF['PDF716be2c7de31f063369ca297a9928403'] = 'Taxes :';
$_LANGPDF['PDFf4a232c48df10124ee867767a4e7280e'] = 'Base HT';
$_LANGPDF['PDF01a2436b8e3782c1f99e6b26adf901b2'] = 'Montant TVA';
$_LANGPDF['PDF290612199861c31d1036b185b4e69b75'] = 'Résumé';
$_LANGPDF['PDF6b9e9f2472786ed1e76005bfc37bc8af'] = 'Remise globale';
$_LANGPDF['PDF699e6bd4690ed3bd5f658052e12aba04'] = 'Montant TVA';
$_LANGPDF['PDF448634536559b1f8aaa975e0aa12b930'] = 'NET A PAYER';
$_LANGPDF['submitTranslationsPdf'] = 'Enregistrer les modifications';
?>
\ No newline at end of file
......@@ -61,20 +61,20 @@
<tr><td style="line-height: 8px">&nbsp;</td></tr>
</table>
{l s='Products ordered:'}
{l s='Products ordered:' pdf='true'}
<!-- PRODUCTS -->
<div style="font-size: 6pt;">
<table style="width: 100%;">
<tr style="line-height:6px; border: none">
<td style="width: 9%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Reference'}</td>
<td style="width: 31%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Designation'}</td>
<td style="width: 4%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Qty'}</td>
<td style="width: 9%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Unit Price TE'}</td>
<td style="width: 11%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Total TE (DE)'}</td>
<td style="width: 10%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Discount Rate'}</td>
<td style="width: 10%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Total TE (DI)'}</td>
<td style="width: 7%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Tax rate'}</td>
<td style="width: 9%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Total TI'}</td>
<td style="width: 9%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Reference' pdf='true'}</td>
<td style="width: 31%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Designation' pdf='true'}</td>
<td style="width: 4%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Qty' pdf='true'}</td>
<td style="width: 9%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Unit Price TE' pdf='true'}</td>
<td style="width: 11%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Total TE (DE)' pdf='true'}</td>
<td style="width: 10%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Discount Rate' pdf='true'}</td>
<td style="width: 10%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Total TE (DI)' pdf='true'}</td>
<td style="width: 7%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Tax rate' pdf='true'}</td>
<td style="width: 9%; text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Total TI' pdf='true'}</td>
</tr>
{* for each product ordered *}
{foreach $supply_order_details as $supply_order_detail}
......@@ -98,14 +98,14 @@
<tr><td style="line-height: 8px">&nbsp;</td></tr>
</table>
{l s='Taxes:'}
{l s='Taxes:' pdf='true'}
<!-- PRODUCTS TAXES -->
<div style="font-size: 6pt;">
<table style="width: 30%;">
<tr style="line-height:6px; border: none">
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Base TE'}</td>
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Tax Rate'}</td>
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Tax Value'}</td>
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Base TE' pdf='true'}</td>
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Tax Rate' pdf='true'}</td>
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 5px; font-weight: bold;">{l s='Tax Value' pdf='true'}</td>
</tr>
{foreach $tax_order_summary as $entry}
<tr style="line-height:6px; border: none">
......@@ -122,7 +122,7 @@
<tr><td style="line-height: 8px">&nbsp;</td></tr>
</table>
{l s='Summary'}
{l s='Summary' pdf='true'}
<!-- TOTAL -->
<div style="font-size: 6pt;">
<table style="width: 30%;">
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment