From 6bbcb376b175b6ac1a592680cb8205de3085475f Mon Sep 17 00:00:00 2001 From: simnandez Date: Fri, 28 Sep 2012 15:55:50 +0200 Subject: [PATCH 1/6] Trad: Add missing translations --- htdocs/langs/ca_ES/admin.lang | 4 +++- htdocs/langs/ca_ES/orders.lang | 2 ++ htdocs/langs/es_ES/admin.lang | 5 ++++- htdocs/langs/es_ES/holiday.lang | 3 ++- htdocs/langs/es_ES/orders.lang | 2 ++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index fbf6cf10de2..0a18dbf18ed 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -82,7 +82,7 @@ UserSetup=Configuració gestió dels usuaris MenuSetup=Administració dels menús per base de dades MenuLimits=Límits i precisió MenuIdParent=Id del menú pare -DetailMenuIdParent=IDr del menú pare (0 per a un menú superior) +DetailMenuIdParent=IDr del menú pare (buit per a un menú superior) DetailPosition=Número d'ordre per a la posició del menú PersonalizedMenusNotSupported=Menús personalitzats no generats AllMenus=Tots @@ -1304,6 +1304,8 @@ Sell=Venda InvoiceDateUsed=Data utilitzada de factura YourCompanyDoesNotUseVAT=La seva empresa està configurada com no subjecta a l'IVA (Inici - Configuració - Empresa/Institució), per la qual cosa no hi ha opció per a la parametrització de l'IVA. AccountancyCode=Codi comptable +AccountancyCodeSell=Codi comptable vendes +AccountancyCodeBuy=Codi comptable compres ##### Agenda ##### AgendaSetup=Mòdul configuració d'accions i agenda PasswordTogetVCalExport=Clau d'autorització vCal export link diff --git a/htdocs/langs/ca_ES/orders.lang b/htdocs/langs/ca_ES/orders.lang index a5185f4e48f..ef2f9e43efa 100644 --- a/htdocs/langs/ca_ES/orders.lang +++ b/htdocs/langs/ca_ES/orders.lang @@ -141,6 +141,8 @@ OrderSource6=Revistes QtyOrdered=Qt. demanda AddDeliveryCostLine=Afegir una línia de despeses de ports indicant el pes de la comanda SetDemandReason=Indicar origen de la comanda +CreateInvoiceForThisCustomer=Crear una factura a partir de diverses comandes d'aquest client +CloseProcessedOrdersAutomatically=Classificar automàticament com "Processades" les comandes seleccionades. # Document models PDFEinsteinDescription=Model de comanda complet (logo...) diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 58005491211..c05c4c50ea8 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -83,7 +83,7 @@ UserSetup=Configuración gestión de los usuarios MenuSetup=Administración de los menús por base de datos MenuLimits=Límites y precisión MenuIdParent=Id del menú padre -DetailMenuIdParent=ID del menú padre (0 para un menú superior) +DetailMenuIdParent=ID del menú padre (vacío para un menú superior) DetailPosition=Número de orden para la posición del menú PersonalizedMenusNotSupported=Menús personalizados no generados AllMenus=Todos @@ -1308,7 +1308,10 @@ InvoiceDateUsed=Fecha usada de factura YourCompanyDoesNotUseVAT=Su empresa está configurada como no sujeta al IVA (Inicio - Configuración - Empresa/Institución), por lo que no hay opción para la paremetrización del IVA. AccountancyCode=Código contable Deductible=Deducible +AccountancyCodeSell=Código contable ventas +AccountancyCodeBuy=Código contable compras ##### Agenda ##### + AgendaSetup=Módulo configuración de acciones y agenda PasswordTogetVCalExport=Clave de autorización vcal export link PastDelayVCalExport=No exportar los eventos de más de diff --git a/htdocs/langs/es_ES/holiday.lang b/htdocs/langs/es_ES/holiday.lang index 5e8e1f71d07..4d7344cc10c 100644 --- a/htdocs/langs/es_ES/holiday.lang +++ b/htdocs/langs/es_ES/holiday.lang @@ -84,7 +84,8 @@ NewSoldeCP=Nuevo saldo alreadyCPexist=Ya se ha efectuado una petición de vacaciones para este periodo. UserName=Nombre Apellidos Employee=Empleado - +FirstDayOfHoliday=Primer día libre +LastDayOfHoliday=Último día libre ## Configuration du Module ## ConfCP=Configuración del módulo Vacaciones diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang index 70a226023e8..06a662847c6 100644 --- a/htdocs/langs/es_ES/orders.lang +++ b/htdocs/langs/es_ES/orders.lang @@ -141,6 +141,8 @@ OrderSource6=Revistas QtyOrdered=Cant. pedida AddDeliveryCostLine=Añadir una línea de gastos de portes indicando el peso del pedido SetDemandReason=Indicar origen del pedido +CreateInvoiceForThisCustomer=Crear una factura a partir de varios pedidos de este cliente +CloseProcessedOrdersAutomatically=Clasificar automáticamente como "Procesados" los pedidos seleccionados. # Document models PDFEinsteinDescription=Modelo de pedido completo (logo...) From 422f028ac9d4b4c747ccb07b75bdecb33893c846 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 29 Sep 2012 12:07:07 +0200 Subject: [PATCH 2/6] Fix: use ADHERENT_BANK_USE for check or not bank via invoice Fix: code optimizing --- htdocs/adherents/card_subscriptions.php | 69 +++++++++++-------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 400e386ef8e..6972f32113d 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -1,7 +1,8 @@ - * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2012 Laurent Destailleur +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2002-2003 Jean-Louis Bergamo + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin * * 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 @@ -40,6 +41,7 @@ $langs->load("mails"); $action=GETPOST('action','alpha'); +$confirm=GETPOST('confirm','alpha'); $rowid=GETPOST('rowid','int'); $typeid=GETPOST('typeid','int'); @@ -87,7 +89,7 @@ if ($rowid) */ // Create third party from a member -if ($action == 'confirm_create_thirdparty' && $_POST["confirm"] == 'yes' && $user->rights->societe->creer) +if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) { if ($result > 0) { @@ -589,10 +591,10 @@ if ($rowid) print ''; - if ($_GET['action'] != 'editlogin' && $user->rights->adherent->creer) print ''; + if ($action != 'editlogin' && $user->rights->adherent->creer) print ''; print '
'; print $langs->trans("LinkedToDolibarrUser"); print 'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'
'; print ''; - if ($_GET['action'] == 'editlogin') + if ($action == 'editlogin') { /*$include=array(); if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only @@ -748,49 +750,40 @@ if ($rowid) if ($conf->use_javascript_ajax) { print "\n".''."\n"; } // Confirm create third party - if ($_GET["action"] == 'create_thirdparty') + if ($action == 'create_thirdparty') { $name = $object->getFullName($langs); if (! empty($name)) @@ -803,14 +796,14 @@ if ($rowid) } // Create a form array - $formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); + $formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); if ($ret == 'html') print '
'; } - print '
'; + print ''; print ''; print ''; print ''; @@ -888,15 +881,15 @@ if ($rowid) print ''.$langs->trans('MoreActions'); print ''; print ''; - print ' '.$langs->trans("None").'
'; + print ' '.$langs->trans("None").'
'; if (! empty($conf->banque->enabled)) { - print ' '.$langs->trans("MoreActionBankDirect").'
'; } if (! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) { - print 'global->ADHERENT_BANK_USE) || $invoiceonly?' checked="checked"':''); if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"'; print '> '.$langs->trans("MoreActionInvoiceOnly"); if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')'; @@ -911,7 +904,7 @@ if ($rowid) } if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) { - print 'global->ADHERENT_BANK_USE)?' checked="checked"':''); if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"'; print '> '.$langs->trans("MoreActionBankViaInvoice"); if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')'; From d23188c64abc2953e31704e19c2c4ed741d6bad4 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 30 Sep 2012 20:49:13 +0200 Subject: [PATCH 3/6] Fix: doxygen --- htdocs/compta/facture/class/facture-rec.class.php | 1 + htdocs/compta/facture/class/facture.class.php | 2 ++ htdocs/core/class/commondocgenerator.class.php | 11 ++++++----- htdocs/core/lib/member.lib.php | 3 +-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 95fd10c7068..02c765ba131 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -410,6 +410,7 @@ class FactureRec extends Facture * @param int $type Type of line (0=product, 1=service) * @param int $rang Position of line * @param int $special_code Special code + * @param string $label Label of the line * @return int <0 if KO, Id of line if OK */ function addline($facid, $desc, $pu_ht, $qty, $txtva, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='') diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 6db8f202fd4..c37e464514b 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1880,6 +1880,7 @@ class Facture extends CommonInvoice * @param int $fk_parent_line Id of parent line * @param int $fk_fournprice To calculate margin * @param int $pa_ht Buying price of line + * @param string $label Label of the line * @return int <0 if KO, Id of line if OK */ function addline($facid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='') @@ -2035,6 +2036,7 @@ class Facture extends CommonInvoice * @param int $skip_update_total ??? * @param int $fk_fournprice To calculate margin * @param int $pa_ht Buying price of line + * @param string $label Label of the line * @return int < 0 if KO, > 0 if OK */ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='') diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 5007dca817f..bf3e8e98ddf 100755 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -168,13 +168,14 @@ abstract class CommonDocGenerator /** * Rect pdf * - * @param unknown_type $pdf - * @param unknown_type $x - * @param unknown_type $y - * @param unknown_type $l - * @param unknown_type $h + * @param PDF $pdf Object PDF + * @param float $x Abscissa of first point + * @param float $y Ordinate of first point + * @param float $l ?? + * @param float $h ?? * @param int $hidetop Hide top * @param int $hidebottom Hide bottom + * @return void */ function printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0) { diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 15ada8ed4c0..c3314bb3087 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -103,8 +103,7 @@ function member_prepare_head($object) /** * Return array head with list of tabs to view object informations * - * @param Object $object Member - * @return array head + * @return array head */ function member_admin_prepare_head() { From bcf46d00f0abcd7a2fbec2a8dcddda11105f8f79 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 30 Sep 2012 21:26:58 +0200 Subject: [PATCH 4/6] Fix: convert line delimiters !! --- htdocs/adherents/index.php | 10 +- htdocs/adherents/liste.php | 12 +-- htdocs/admin/menus/edit.php | 24 ++--- htdocs/admin/system/phpinfo.php | 32 +++--- htdocs/commande/orderstoinvoice.php | 8 +- htdocs/compta/facture.php | 4 +- htdocs/compta/recap-compta.php | 2 +- htdocs/core/boxes/box_members.php | 12 +-- htdocs/core/class/extrafields.class.php | 14 +-- htdocs/core/lib/usergroups.lib.php | 30 +++--- htdocs/fourn/facture/fiche.php | 4 +- htdocs/holiday/admin/holiday.php | 2 +- htdocs/holiday/fiche.php | 6 +- htdocs/holiday/index.php | 2 +- htdocs/holiday/month_report.php | 2 +- htdocs/user/perms.php | 132 ++++++++++++------------ 16 files changed, 148 insertions(+), 148 deletions(-) diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 11acc1914a1..7827abad53a 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -294,12 +294,12 @@ if ($resql) $staticmember->id=$obj->rowid; $staticmember->lastname=$obj->lastname; $staticmember->firstname=$obj->firstname; - if (! empty($obj->fk_soc)) { - $staticmember->socid = $obj->fk_soc; + if (! empty($obj->fk_soc)) { + $staticmember->socid = $obj->fk_soc; $staticmember->fetch_thirdparty(); - $staticmember->name=$staticmember->thirdparty->name; - } else { - $staticmember->name=$obj->company; + $staticmember->name=$staticmember->thirdparty->name; + } else { + $staticmember->name=$obj->company; } $staticmember->ref=$staticmember->getFullName($langs); print ''.$subscriptionstatic->getNomUrl(1).''; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 4752a36a65a..075510fa915 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -268,12 +268,12 @@ if ($resql) $memberstatic->lastname=$objp->lastname; $memberstatic->firstname=$objp->firstname; - if (! empty($objp->fk_soc)) { - $memberstatic->socid = $objp->fk_soc; - $memberstatic->fetch_thirdparty(); - $companyname=$memberstatic->thirdparty->name; - } else { - $companyname=$objp->company; + if (! empty($objp->fk_soc)) { + $memberstatic->socid = $objp->fk_soc; + $memberstatic->fetch_thirdparty(); + $companyname=$memberstatic->thirdparty->name; + } else { + $companyname=$objp->company; } $var=!$var; diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index fff20023c05..3e747760544 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -116,18 +116,18 @@ if ($action == 'add') $leftmenu=''; $mainmenu=''; if (! empty($_POST['menuId']) && ! is_numeric($_POST['menuId'])) { - $tmp=explode('&',$_POST['menuId']); - foreach($tmp as $s) - { - if (preg_match('/fk_mainmenu=/',$s)) - { - $mainmenu=preg_replace('/fk_mainmenu=/','',$s); - } - if (preg_match('/fk_leftmenu=/',$s)) - { - $leftmenu=preg_replace('/fk_leftmenu=/','',$s); - } - } + $tmp=explode('&',$_POST['menuId']); + foreach($tmp as $s) + { + if (preg_match('/fk_mainmenu=/',$s)) + { + $mainmenu=preg_replace('/fk_mainmenu=/','',$s); + } + if (preg_match('/fk_leftmenu=/',$s)) + { + $leftmenu=preg_replace('/fk_leftmenu=/','',$s); + } + } } $langs->load("errors"); diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index 13b7cef0c09..4167f943d32 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -23,7 +23,7 @@ */ require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->load("admin"); @@ -40,22 +40,22 @@ llxHeader(); $title='InfoPHP'; -if (isset($title)) -{ - print_fiche_titre($langs->trans($title), '', 'setup'); -} +if (isset($title)) +{ + print_fiche_titre($langs->trans($title), '', 'setup'); +} -// Get php_info array +// Get php_info array $phparray=phpinfo_array(); foreach($phparray as $key => $value) { //print_titre($key); - print ''; - print ''; + print '
'; + print ''; //print ''; - print ''; - print ''; - print "\n"; + print ''; + print ''; + print "\n"; $var=true; //var_dump($value); @@ -65,10 +65,10 @@ foreach($phparray as $key => $value) { $var=!$var; print ''; - print ''; + print ''; $valtoshow=$keyvalue; if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80); - print ''; + print ''; print ''; } else @@ -77,13 +77,13 @@ foreach($phparray as $key => $value) print ''; print ''; $i=0; - foreach($keyvalue as $keyparam2 => $keyvalue2) + foreach($keyvalue as $keyparam2 => $keyvalue2) { print ''; } @@ -92,7 +92,7 @@ foreach($phparray as $key => $value) } print '
'.$langs->trans("Parameter").''.$key.''.$langs->trans("Value").'
'.$key.''.$langs->trans("Value").'
'.$keyparam.''.$keyparam.''.$valtoshow.''.$valtoshow.'
'.$keyparam.''; $valtoshow=$keyvalue2; if ($keyparam == 'disable_functions') $valtoshow=join(', ',explode(',',trim($valtoshow))); //print $keyparam2.' = '; - print $valtoshow; + print $valtoshow; $i++; print '

'; } - + llxFooter(); diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 60ce5d3b11b..5d9a6b5855a 100755 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -40,12 +40,12 @@ $langs->load('orders'); $langs->load('deliveries'); $langs->load('companies'); -if (! $user->rights->facture->creer) +if (! $user->rights->facture->creer) accessforbidden(); -$id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility -$ref = GETPOST('ref','alpha'); -$action = GETPOST('action','alpha'); +$id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility +$ref = GETPOST('ref','alpha'); +$action = GETPOST('action','alpha'); $confirm = GETPOST('confirm','alpha'); $sref = GETPOST('sref'); $sref_client = GETPOST('sref_client'); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 60b9ba8ad4c..18364723a90 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1856,8 +1856,8 @@ if ($action == 'create') { $newinvoice_static->id=$key; $newinvoice_static->ref=$valarray['ref']; - $newinvoice_static->statut=$valarray['status']; - $newinvoice_static->type=$valarray['type']; + $newinvoice_static->statut=$valarray['status']; + $newinvoice_static->type=$valarray['type']; $newinvoice_static->paye=$valarray['paye']; $optionsav.='