diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 13864a37183..e4dead271f4 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -6,6 +6,7 @@ * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2011 Philippe Grand * Copyright (C) 2011 Remy Younes + * Copyright (C) 2012 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -338,18 +339,23 @@ if ($id == 11) $langs->load("propal"); $langs->load("bills"); $langs->load("interventions"); - $elementList = array("commande"=>$langs->trans("Order"), - "order_supplier"=>$langs->trans("SupplierOrder"), - "contrat"=>$langs->trans("Contract"), - "project"=>$langs->trans("Project"), - "project_task"=>$langs->trans("Task"), - "propal"=>$langs->trans("Propal"), - "facture"=>$langs->trans("Bill"), - "facture_fourn"=>$langs->trans("SupplierBill"), - "fichinter"=>$langs->trans("InterventionCard")); - if (! empty($conf->global->MAIN_SUPPORT_CONTACT_TYPE_FOR_THIRDPARTIES)) $elementList["societe"]=$langs->trans("ThirdParty"); - $sourceList = array("internal"=>$langs->trans("Internal"), - "external"=>$langs->trans("External")); + $elementList = array( + 'commande' => $langs->trans('Order'), + 'invoice_supplier' => $langs->trans('SupplierBill'), + 'order_supplier' => $langs->trans('SupplierOrder'), + 'contrat' => $langs->trans('Contract'), + 'project' => $langs->trans('Project'), + 'project_task' => $langs->trans('Task'), + 'propal' => $langs->trans('Proposal'), + 'facture' => $langs->trans('Bill'), + 'facture_fourn' => $langs->trans('SupplierBill'), + 'fichinter' => $langs->trans('InterventionCard') + ); + if (! empty($conf->global->MAIN_SUPPORT_CONTACT_TYPE_FOR_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty'); + $sourceList = array( + 'internal' => $langs->trans('Internal'), + 'external' => $langs->trans('External') + ); } $msg=''; @@ -380,9 +386,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $fieldnamekey=$listfield[$f]; // We take translate key of field if ($fieldnamekey == 'libelle') $fieldnamekey='Label'; + if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments'; if ($fieldnamekey == 'nbjour') $fieldnamekey='NbOfDays'; if ($fieldnamekey == 'decalage') $fieldnamekey='Offset'; if ($fieldnamekey == 'module') $fieldnamekey='Module'; + if ($fieldnamekey == 'code') $fieldnamekey = 'Code'; + $msg.=$langs->trans("ErrorFieldRequired",$langs->transnoentities($fieldnamekey)).'
'; } } @@ -827,7 +836,15 @@ if ($id) { $showfield=1; $valuetoshow=$obj->$fieldlist[$field]; - if ($valuetoshow=='all') { + if ($value == 'element') + { + $valuetoshow = $elementList[$valuetoshow]; + } + else if ($value == 'source') + { + $valuetoshow = $sourceList[$valuetoshow]; + } + else if ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } else if ($fieldlist[$field]=='pays') { @@ -910,6 +927,17 @@ if ($id) $key=$langs->trans("SendingMethod".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; } + else if ($fieldlist[$field] == 'libelle' && $tabname[$_GET['id']]==MAIN_DB_PREFIX.'c_paper_format') + { + $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); + $valuetoshow = ($obj->code && ($key != 'PaperFormat'.strtoupper($obj->code))) ? $key : $obj->$fieldlist[$field]; + } + else if ($fieldlist[$field] == 'libelle' && $tabname[$_GET['id']] == MAIN_DB_PREFIX.'c_type_fees') + { + $langs->load('trips'); + $key = $langs->trans(strtoupper($obj->code)); + $valuetoshow = ($obj->code && ($key != strtoupper($obj->code))) ? $key : $obj->$fieldlist[$field]; + } else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { $showfield=0; } diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index 52a58a2bad8..49e99bd0d9c 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -1,6 +1,7 @@ * Copyright (C) 2011 Laurent Destailleur + * Copyright (C) 2012 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +19,7 @@ include_once(DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'); $langs->load("main"); +$langs->load('cashdesk'); header("Content-type: text/html; charset=".$conf->file->character_set_client); $facid=GETPOST('facid','int'); @@ -27,7 +29,7 @@ $object->fetch($facid); ?> -Print ticket +<?php echo $langs->trans('PrintTicket') ?>