From 15b1507c84e899a79c300426ee67017450fa6233 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 20 Oct 2013 20:58:38 +0200 Subject: [PATCH 01/48] Update html.formfile.class.php Add subfolders feature in GED managment --- htdocs/core/class/html.formfile.class.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9f0f9089e76..9dac82d5a06 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -2,6 +2,7 @@ /* Copyright (c) 2008-2013 Laurent Destailleur * Copyright (C) 2010-2012 Regis Houssin * Copyright (c) 2010 Juanjo Menent + * Copyright (c) 2013 Charles-Fr BENKE * * 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 @@ -717,8 +718,16 @@ class FormFile print ''; + //print '&file='.urlencode($relativepath.$file['name']).'">'; + if ($file['level1name'] <> $object->id) + $filepath=urlencode($object->id.'/'.$file['level1name'].'/'.$file['name']); + else + $filepath=urlencode($object->id.'/'.$file['name']); + print '&file='.$filepath.'">'; + print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' '; + if ($file['level1name'] <> $object->id) + print $file['level1name'].'/'; print dol_trunc($file['name'],$maxlength,'middle'); print ''; print "\n"; @@ -738,7 +747,14 @@ class FormFile // ($param must start with &) print ''; if ($useinecm) print ''.img_view().'   '; - if ($permtodelete) print ''.img_delete().''; + if ($permtodelete) + { + if ($file['level1name'] <> $object->id) + $filepath=urlencode($file['level1name'].'/'.$file['name']); + else + $filepath=urlencode($file['name']); + print ''.img_delete().''; + } else print ' '; print ""; print "\n"; From ad2a8d39c5c42a03baa6f40d24cf222eb49fb542 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sun, 27 Oct 2013 13:30:35 +0100 Subject: [PATCH 02/48] Add nl_NL margin translation --- htdocs/langs/nl_NL/margins.lang | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 htdocs/langs/nl_NL/margins.lang diff --git a/htdocs/langs/nl_NL/margins.lang b/htdocs/langs/nl_NL/margins.lang new file mode 100644 index 00000000000..3494ca6d643 --- /dev/null +++ b/htdocs/langs/nl_NL/margins.lang @@ -0,0 +1,52 @@ +# Dolibarr language file - en_US - marges +CHARSET=UTF-8 + +Margin=Marge +Margins=Marges +TotalMargin=Marge Totaal +MarginOnProducts=Marge / Training +MarginOnServices=Marge / Dienst +MarginRate=Marge verhouding +MarkRate=Markerings verhouding +DisplayMarginRates=Toon Marge Verhouding +DisplayMarkRates=Toon Markeringsverhouding +InputPrice=Voer Prijs in + +margin=Winst marge management +margesSetup=Winst marge management setup + +MarginDetails=Marge details + +ProductMargins=Product marge +CustomerMargins=Klant marges +AgentMargins=Acc. Manager marges + +ProductService=Trainning of Dienst +AllProducts=Alle Trainingen en Diensten +ChooseProduct/Service=Kies Training of Dienst +CommercialAgent=Commerciel Agent + +StartDate=Start datum +EndDate=Eind datum +Launch=Start + +ForceBuyingPriceIfNull=Forceer een inkoopprijs indien null +ForceBuyingPriceIfNullDetails=indien "ON", marge wodt nul (inkoopprijs = verkoopprijs), anders("OFF"), marge is gelijk verkoopprijs (inkoopprijs = 0) +MARGIN_METHODE_FOR_DISCOUNT=Marge methode voor globale discounts +UseDiscountAsProduct=Als een training +UseDiscountAsService=Als een dienst +UseDiscountOnTotal=Op subtotaal +MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Definieert als een globale discount wordt behandelt als een training, een dienst, of alleen een subtotaal voor marge berekening. + +MARGIN_TYPE=Marge type +MargeBrute=Groffe marge +MargeNette=Netto marge +MARGIN_TYPE_DETAILS=Groffe marge : Verkoopprijs - Inkoopprijs
Netto marge : Verkoopprijs - Kostprijs + +CostPrice=Kostprijs +BuyingCost=Kostprijs +UnitCharges=Unit toeslag +Charges=Toeslag + +AgentContactType=Contact type used voor commissie +AgentContactTypeDetails=Definieer het contact type (gelinked op facturen) wordt geassocieerd met commercieel agent \ No newline at end of file From ea5619a58a3dc4cbd76316565e1105e56f8c1cb6 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sun, 27 Oct 2013 14:31:42 +0100 Subject: [PATCH 03/48] Add NL_nl translation for category contact --- htdocs/langs/nl_NL/categories.lang | 8 ++++---- htdocs/langs/nl_NL/mails.lang | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/langs/nl_NL/categories.lang b/htdocs/langs/nl_NL/categories.lang index 915dc750fc6..77a031c79b2 100644 --- a/htdocs/langs/nl_NL/categories.lang +++ b/htdocs/langs/nl_NL/categories.lang @@ -50,12 +50,12 @@ SupplierIsInCategories=Klant is eigenaar van de volgende leverancierscategorieë CompanyIsInCustomersCategories=Deze Klant is eigenaar van de volgende afnemers- / prospectencategorieën CompanyIsInSuppliersCategories=Deze Klant is eigenaar van de volgende leverancierscategorieën MemberIsInCategories=Dit lid is eigenaar van de volgende ledencategorieën -# ContactIsInCategories=This contact owns to following contacts categories +ContactIsInCategories=Dit contact kent de volgende contacts Categorieën ProductHasNoCategory=Dit product / dienst behoort tot geen enkele categorie SupplierHasNoCategory=Deze leverancier behoort tot geen enkele categorie CompanyHasNoCategory=Dit bedrijf behoort tot geen enkele categorie MemberHasNoCategory=Dit lid behoort tot geen enkele categorie -# ContactHasNoCategory=This contact is not in any categories +ContactHasNoCategory=Dit contact is niet in een Categorieën onderverdeeld ClassifyInCategory=Classificeren naar categorie NoneCategory=Geen # NotCategorized=Without category @@ -81,7 +81,7 @@ CustomersCategoriesShort=Afnemerscategorie CustomersProspectsCategoriesShort=Afnemers- / Prospectencategorie ProductsCategoriesShort=Productencategorie MembersCategoriesShort=Ledencategorie -# ContactCategoriesShort=Contacts categories +ContactCategoriesShort=Contact Categorieën ThisCategoryHasNoProduct=Deze categorie bevat geen producten. ThisCategoryHasNoSupplier=Deze categorie bevat geen enkele leverancier. ThisCategoryHasNoCustomer=Deze categorie bevat geen enkele afnemer. @@ -96,7 +96,7 @@ CatSupList=Leverancierscategorieënlijst CatCusList=afnemers- / prospectencategorieënlijst CatProdList=productencategorieënlijst CatMemberList=Ledencategorieënlijst -# CatContactList=List of contact categories and contact +CatContactList=Lijst van Categorieën van Contacten # CatSupLinks=Links between suppliers and categories # CatCusLinks=Links between customers/prospects and categories # CatProdLinks=Links between products/services and categories diff --git a/htdocs/langs/nl_NL/mails.lang b/htdocs/langs/nl_NL/mails.lang index 70e208c255e..aabc90b5f12 100644 --- a/htdocs/langs/nl_NL/mails.lang +++ b/htdocs/langs/nl_NL/mails.lang @@ -89,7 +89,7 @@ MailingModuleDescEmailsFromFile=E-mails van een tekstbestand (e-mail;achternaam; MailingModuleDescContactsCategories=Contacten van alle derde partijen (Door categorie) MailingModuleDescDolibarrContractsLinesExpired=Derde partijen met verlopen contractregels MailingModuleDescContactsByCompanyCategory=Contacten van derden (door derden categorie) -# MailingModuleDescContactsByCategory=Contacts/addresses of third parties by category +MailingModuleDescContactsByCategory=Voeg een contact toe per Categorieën MailingModuleDescMembersCategories=Stichting leden (per categorie) MailingModuleDescContactsByFunction=Contacten van derden (door de positie / functie) From 207f3932531ffb14c8fb8fc897f3761e997945f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 29 Oct 2013 10:12:56 +0100 Subject: [PATCH 04/48] CRLF fix --- htdocs/langs/cs_CZ/printipp.lang | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/langs/cs_CZ/printipp.lang b/htdocs/langs/cs_CZ/printipp.lang index e8aac6b848f..7ef2cd5649d 100644 --- a/htdocs/langs/cs_CZ/printipp.lang +++ b/htdocs/langs/cs_CZ/printipp.lang @@ -1,18 +1,18 @@ -/* - * Language code: cs_CZ - * Automatic generated via autotranslator.php tool - * Generation date 2013-10-26 11:58:10 - */ - - -// START - Lines generated via autotranslator.php tool (2013-10-26 11:58:10). -// Reference language: en_US -> cs_CZ -PrintIPPSetup=Nastavení modulu Přímý tisk -PrintIPPDesc=Ce modul Permet d'un ajouter Bouton d'dojem přímé des dokumenty vers votre imprimante. Il requiert un systeme Linux Equipe de poháry. -PRINTIPP_ENABLED=Zobrazit Piktogram "Přímý tisk" do seznamu dokumentů -PRINTIPP_HOST=Tiskový server -PRINTIPP_PORT=Přístav -PRINTIPP_USER=Přihlášení -PRINTIPP_PASSWORD=Heslo -NoPrinterFound=Žádné tiskárny nalezeny (zkontrolujte poháry Nasta) -// STOP - Lines generated via autotranslator.php tool (2013-10-26 12:39:36). +/* + * Language code: cs_CZ + * Automatic generated via autotranslator.php tool + * Generation date 2013-10-26 11:58:10 + */ + + +// START - Lines generated via autotranslator.php tool (2013-10-26 11:58:10). +// Reference language: en_US -> cs_CZ +PrintIPPSetup=Nastavení modulu Přímý tisk +PrintIPPDesc=Ce modul Permet d'un ajouter Bouton d'dojem přímé des dokumenty vers votre imprimante. Il requiert un systeme Linux Equipe de poháry. +PRINTIPP_ENABLED=Zobrazit Piktogram "Přímý tisk" do seznamu dokumentů +PRINTIPP_HOST=Tiskový server +PRINTIPP_PORT=Přístav +PRINTIPP_USER=Přihlášení +PRINTIPP_PASSWORD=Heslo +NoPrinterFound=Žádné tiskárny nalezeny (zkontrolujte poháry Nasta) +// STOP - Lines generated via autotranslator.php tool (2013-10-26 12:39:36). From fa5ff000602f9d80222122ae36abd041859f982a Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 30 Oct 2013 09:15:36 +0100 Subject: [PATCH 05/48] Put scroolbar on autocomplete ul/li and not on main windows as before --- .../jquery/css/smoothness/jquery-ui-latest.custom.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/includes/jquery/css/smoothness/jquery-ui-latest.custom.css b/htdocs/includes/jquery/css/smoothness/jquery-ui-latest.custom.css index 1b3742a683b..6c7542d9010 100644 --- a/htdocs/includes/jquery/css/smoothness/jquery-ui-latest.custom.css +++ b/htdocs/includes/jquery/css/smoothness/jquery-ui-latest.custom.css @@ -53,6 +53,13 @@ position: absolute; top: 0; /* #8656 */ cursor: default; + max-height: 400px; + overflow-y: auto; + /* prevent horizontal scrollbar */ + overflow-x: hidden; + /* add padding to account for vertical scrollbar */ + padding-right: 20px; + } /* workarounds */ From 0ae489aee7f4db2578b40151d0b8ebbca37402cd Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Wed, 30 Oct 2013 09:34:59 +0100 Subject: [PATCH 06/48] missing GETPOST --- htdocs/comm/action/document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 3b655f726f7..7f50eaabd7e 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -93,7 +93,7 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ($action == 'delete') { $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid); - $file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). + $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $ret=dol_delete_file($file,0,0,0,$act); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); From 64745ecefecb254cc825d2ba89f3f63eb7879bf5 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 30 Oct 2013 09:52:39 +0100 Subject: [PATCH 07/48] Add function field into webservice contact --- htdocs/webservices/server_contact.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index cfe25afbe4c..a4538772e1a 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -112,7 +112,8 @@ $contact_fields = array( 'ref_propal' => array('name'=>'ref_propal','type'=>'xsd:string'), 'user_id' => array('name'=>'user_id','type'=>'xsd:string'), 'user_login' => array('name'=>'user_login','type'=>'xsd:string'), - 'civility_id' => array('name'=>'civility_id','type'=>'xsd:string') + 'civility_id' => array('name'=>'civility_id','type'=>'xsd:string'), + 'poste' => array('name'=>'poste','type'=>'xsd:string') //... ); //Retreive all extrafield for contact @@ -300,7 +301,8 @@ function getContact($authentication,$id,$ref='',$ref_ext='') 'ref_propal' => $contact->ref_propal, 'user_id' => $contact->user_id, 'user_login' => $contact->user_login, - 'civilite_id' => $contact->civility_id + 'civilite_id' => $contact->civility_id, + 'poste' => $contact->poste ); //Retreive all extrafield for thirdsparty @@ -409,6 +411,7 @@ function createContact($authentication,$contact) $newobject->ref_propal=$contact['ref_propal']; $newobject->user_id=$contact['user_id']; $newobject->user_login=$contact['user_login']; + $newobject->poste=$contact['poste']; //Retreive all extrafield for thirdsparty // fetch optionals attributes and labels @@ -654,6 +657,7 @@ function updateContact($authentication,$contact) $object->email=$contact['email']; $object->civilite_id=$contact['civility_id']; + $object->poste=$contact['poste']; //Retreive all extrafield for contact From e89c3fa0749ae3ef5119987f2b5cc212d02fa30e Mon Sep 17 00:00:00 2001 From: braito4 Date: Wed, 30 Oct 2013 11:51:23 +0100 Subject: [PATCH 08/48] Update list.php sql error. --- htdocs/comm/propal/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 834c651c2be..58aee255312 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -141,8 +141,8 @@ if (! $sortorder) $sortorder='DESC'; $limit = $conf->liste_limit; -$sql = 'SELECT s.rowid, s.nom, s.town, s.client, s.code_client'; -$sql.= 'p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,'; +$sql = 'SELECT s.rowid, s.nom, s.town, s.client, s.code_client,'; +$sql.= ' p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; $sql.= ' u.login'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'propal as p'; From f512ef344a5fc2877d43b393c513999246b6b738 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 30 Oct 2013 12:24:51 +0100 Subject: [PATCH 09/48] Better managent of contact status and fix COMPANY_DONOTSEARCH_ANYWHERE use every where before SOCIETE_DONOTSEARCH_ANYWHERE was used --- htdocs/admin/user.php | 35 +++++++++++++++ htdocs/contact/class/contact.class.php | 44 ++++++++----------- htdocs/contact/fiche.php | 1 + htdocs/contact/list.php | 14 +++--- htdocs/core/class/html.form.class.php | 2 + htdocs/install/mysql/tables/llx_socpeople.sql | 2 +- htdocs/langs/bg_BG/admin.lang | 2 +- htdocs/langs/ca_ES/admin.lang | 2 +- htdocs/langs/cs_CZ/admin.lang | 2 +- htdocs/langs/el_GR/admin.lang | 2 +- htdocs/langs/en_US/admin.lang | 2 +- htdocs/langs/es_ES/admin.lang | 2 +- htdocs/langs/et_EE/admin.lang | 2 +- htdocs/langs/fr_FR/admin.lang | 2 +- htdocs/langs/he_IL/admin.lang | 2 +- htdocs/langs/hu_HU/admin.lang | 2 +- htdocs/langs/ja_JP/admin.lang | 2 +- htdocs/langs/ko_KR/admin.lang | 2 +- htdocs/langs/nl_BE/admin.lang | 2 +- htdocs/langs/nl_NL/admin.lang | 2 +- htdocs/langs/sl_SI/admin.lang | 2 +- htdocs/langs/tr_TR/admin.lang | 2 +- htdocs/langs/vi_VN/admin.lang | 2 +- htdocs/langs/zh_CN/admin.lang | 4 +- htdocs/langs/zh_TW/admin.lang | 2 +- htdocs/societe/ajaxcompanies.php | 2 +- htdocs/societe/commerciaux.php | 3 +- 27 files changed, 89 insertions(+), 54 deletions(-) diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index cc666f4c35b..f0ceb6dedea 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -70,7 +70,21 @@ if (preg_match('/del_(.*)/',$action,$reg)) dol_print_error($db); } } +//Set hide closed customer into combox or select +if ($action == 'sethideinactiveuser') +{ + $status = GETPOST('status','alpha'); + if (dolibarr_set_const($db, "USER_HIDE_INACTIVE_IN_COMBOBOX",$status,'chaine',0,'',$conf->entity) > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + dol_print_error($db); + } +} /* * View @@ -121,6 +135,27 @@ else } print ''; +/* +// USER_USE_SEARCH_TO_SELECT +$var=!$var; +print ""; +print ''.$langs->trans("HideClosedUserComboBox").''; +print ' '; +if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) +{ + print ''; + print img_picto($langs->trans("Activated"),'switch_on'); + print ''; +} +else +{ + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); + print ''; +} +print ''; +*/ + print ''; dol_fiche_end(); diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 61f722a1773..1a1049c8bcc 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -58,7 +58,7 @@ class Contact extends CommonObject var $country; // Label of country var $socid; // fk_soc - var $statut; // 0=brouillon, 1=4=actif, 5=inactif + var $statut; // 0=inactif, 1=actif var $code; var $email; @@ -125,6 +125,7 @@ class Contact extends CommonObject $sql.= ", firstname"; $sql.= ", fk_user_creat"; $sql.= ", priv"; + $sql.= ", statut"; $sql.= ", canvas"; $sql.= ", entity"; $sql.= ", import_key"; @@ -136,6 +137,7 @@ class Contact extends CommonObject $sql.= "'".$this->db->escape($this->firstname)."',"; $sql.= " ".($user->id > 0 ? "'".$user->id."'":"null").","; $sql.= " ".$this->priv.","; + $sql.= " ".$this->statut.","; $sql.= " ".(! empty($this->canvas)?"'".$this->canvas."'":"null").","; $sql.= " ".$conf->entity.","; $sql.= " ".(! empty($this->import_key)?"'".$this->import_key."'":"null"); @@ -229,6 +231,7 @@ class Contact extends CommonObject $this->town=(empty($this->town)?'':$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->country_id); $this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement); + if (empty($this->statut)) $this->statut = 0; $this->db->begin(); @@ -253,6 +256,7 @@ class Contact extends CommonObject $sql .= ", phone_mobile = ".(isset($this->phone_mobile)?"'".$this->db->escape($this->phone_mobile)."'":"null"); $sql .= ", jabberid = ".(isset($this->jabberid)?"'".$this->db->escape($this->jabberid)."'":"null"); $sql .= ", priv = '".$this->priv."'"; + $sql .= ", statut = ".$this->statut; $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"NULL"); $sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"NULL"); $sql .= ", no_email=".($this->no_email?"'".$this->no_email."'":"0"); @@ -933,45 +937,35 @@ class Contact extends CommonObject if ($mode == 0) { - if ($statut==0) return $langs->trans('StatusContactDraft'); - elseif ($statut==1) return $langs->trans('StatusContactValidated'); - elseif ($statut==4) return $langs->trans('StatusContactValidated'); - elseif ($statut==5) return $langs->trans('StatusContactValidated'); + if ($statut==0) return $langs->trans('Disabled'); + elseif ($statut==1) return $langs->trans('Enabled'); } elseif ($mode == 1) { - if ($statut==0) return $langs->trans('StatusContactDraftShort'); - elseif ($statut==1) return $langs->trans('StatusContactValidatedShort'); - elseif ($statut==4) return $langs->trans('StatusContactValidatedShort'); - elseif ($statut==5) return $langs->trans('StatusContactValidatedShort'); + if ($statut==0) return $langs->trans('Disabled'); + elseif ($statut==1) return $langs->trans('Enabled'); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans('StatusContactDraftShort'),'statut0').' '.$langs->trans('StatusContactDraft'); - elseif ($statut==1) return img_picto($langs->trans('StatusContactValidatedShort'),'statut1').' '.$langs->trans('StatusContactValidated'); - elseif ($statut==4) return img_picto($langs->trans('StatusContactValidatedShort'),'statut4').' '.$langs->trans('StatusContactValidated'); - elseif ($statut==5) return img_picto($langs->trans('StatusContactValidatedShort'),'statut5').' '.$langs->trans('StatusContactValidated'); + if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1').' '.$langs->trans('Disabled'); + elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); + } elseif ($mode == 3) { - if ($statut==0) return img_picto($langs->trans('StatusContactDraft'),'statut0'); - elseif ($statut==1) return img_picto($langs->trans('StatusContactValidated'),'statut1'); - elseif ($statut==4) return img_picto($langs->trans('StatusContactValidated'),'statut4'); - elseif ($statut==5) return img_picto($langs->trans('StatusContactValidated'),'statut5'); + if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1'); + elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4'); + } elseif ($mode == 4) { - if ($statut==0) return img_picto($langs->trans('StatusContactDraft'),'statut0').' '.$langs->trans('StatusContactDraft'); - elseif ($statut==1) return img_picto($langs->trans('StatusContactValidated'),'statut1').' '.$langs->trans('StatusContactValidated'); - elseif ($statut==4) return img_picto($langs->trans('StatusContactValidated'),'statut4').' '.$langs->trans('StatusContactValidated'); - elseif ($statut==5) return img_picto($langs->trans('StatusContactValidated'),'statut5').' '.$langs->trans('StatusContactValidated'); + if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1').' '.$langs->trans('StatusContactDraft'); + elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); } elseif ($mode == 5) { - if ($statut==0) return ''.$langs->trans('StatusContactDraftShort').' '.img_picto($langs->trans('StatusContactDraftShort'),'statut0'); - elseif ($statut==1) return ''.$langs->trans('StatusContactValidatedShort').' '.img_picto($langs->trans('StatusContactValidatedShort'),'statut1'); - elseif ($statut==4) return ''.$langs->trans('StatusContactValidatedShort').' '.img_picto($langs->trans('StatusContactValidatedShort'),'statut4'); - elseif ($statut==5) return ''.$langs->trans('StatusContactValidatedShort').' '.img_picto($langs->trans('StatusContactValidatedShort'),'statut5'); + if ($statut==0) return ''.$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut1'); + elseif ($statut==1) return ''.$langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4'); } } diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index b678d38c3b0..9b6f4819d8d 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -178,6 +178,7 @@ if (empty($reshook)) $object->priv = $_POST["priv"]; $object->note_public = GETPOST("note_public"); $object->note_private = GETPOST("note_private"); + $object->status = 1; //Defult status to Actif // Note: Correct date should be completed with location to have exact GM time of birth. $object->birthday = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 686e8766b44..529b9cb69b9 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -283,7 +283,7 @@ if ($result) print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder); print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder); - + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder); print ' '; print "\n"; @@ -321,6 +321,7 @@ if ($result) $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('search_priv',$selectarray,$search_priv,1); print ''; + print ' '; print ''; print ''; print '  '; @@ -332,10 +333,8 @@ if ($result) while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); - - if ($obj->statut == 1) - { - $var=!$var; + + $var=!$var; print ""; // Name @@ -343,6 +342,7 @@ if ($result) $contactstatic->lastname=$obj->lastname; $contactstatic->firstname=''; $contactstatic->id=$obj->cidp; + $contactstatic->statut=$obj->statut; print $contactstatic->getNomUrl(1,'',20); print ''; @@ -382,6 +382,9 @@ if ($result) // Private/Public print ''.$contactstatic->LibPubPriv($obj->priv).''; + + // Status + print ''.$contactstatic->getLibStatut(3).''; // Links Add action and Export vcard print ''; @@ -392,7 +395,6 @@ if ($result) print ''; print "\n"; - } $i++; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f8949593e43..4d2d6a2e04c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -975,6 +975,7 @@ class Form } $sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")"; if ($socid > 0) $sql.= " AND sp.fk_soc=".$socid; + if (! empty($conf->global->CONTACT_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND sp.statut<>0 "; $sql.= " ORDER BY sp.lastname ASC"; dol_syslog(get_class($this)."::select_contacts sql=".$sql); @@ -1141,6 +1142,7 @@ class Form if (! empty($user->societe_id)) $sql.= " AND u.fk_societe = ".$user->societe_id; if (is_array($exclude) && $excludeUsers) $sql.= " AND u.rowid NOT IN ('".$excludeUsers."')"; if (is_array($include) && $includeUsers) $sql.= " AND u.rowid IN ('".$includeUsers."')"; + if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND u.statut<>0 "; $sql.= " ORDER BY u.lastname ASC"; dol_syslog(get_class($this)."::select_dolusers sql=".$sql); diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index c46a7ef3aca..00e6f50f61b 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -51,5 +51,5 @@ create table llx_socpeople default_lang varchar(6), canvas varchar(32), -- type of canvas if used (null by default) import_key varchar(14), - statut tinyint + statut tinyint DEFAULT 1 NOT NULL )ENGINE=innodb; diff --git a/htdocs/langs/bg_BG/admin.lang b/htdocs/langs/bg_BG/admin.lang index 1ef41fc0c56..3dc0904561f 100644 --- a/htdocs/langs/bg_BG/admin.lang +++ b/htdocs/langs/bg_BG/admin.lang @@ -49,7 +49,7 @@ Dictionnary=Речници # ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=Изключване на JavaScript и Ajax функции ConfirmAjax=Използвайте Аякс потвърждение изскачащи прозорци -UseSearchToSelectCompany=Използвайте Автоматично завършване на полета, за да изберете трети страни (вместо да използвате списъчно поле).

Също така, ако имате голям брой трети страни (> 100 000), можете да увеличите скоростта чрез създаване на постоянна SOCIETE_DONOTSEARCH_ANYWHERE 1 в Setup->. Търсене след това ще бъдат ограничени до началото на низ. +UseSearchToSelectCompany=Използвайте Автоматично завършване на полета, за да изберете трети страни (вместо да използвате списъчно поле).

Също така, ако имате голям брой трети страни (> 100 000), можете да увеличите скоростта чрез създаване на постоянна COMPANY_DONOTSEARCH_ANYWHERE 1 в Setup->. Търсене след това ще бъдат ограничени до началото на низ. ActivityStateToSelectCompany= Добавяне на филтър опция за показване / скриване на thirdparties, които в момента са в дейност или е престанала # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=Филтрите за търсене опции diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 856995336a3..afe3157eb13 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -49,7 +49,7 @@ ErrorReservedTypeSystemSystemAuto=L'ús del tipus 'system' i 'systemauto' està ErrorCodeCantContainZero=El codi no pot contenir el valor 0 DisableJavascript=Desactivar les funcions Javascript ConfirmAjax=Utilitzar els popups de confirmació Ajax -UseSearchToSelectCompany=Utilitzar un formulari de cerca per buscar tercers (en comptes de llista desplegable)

Tingueu en compte que si té un gran nombre de productes o serveis (> 100 000), pot millorar el rendiment mitjançant la constant SOCIETE_DONOTSEARCH_ANYWHERE a 1 a Configuració-> Varis. La recerca es limitarà llavors a l'inici de la cadena. +UseSearchToSelectCompany=Utilitzar un formulari de cerca per buscar tercers (en comptes de llista desplegable)

Tingueu en compte que si té un gran nombre de productes o serveis (> 100 000), pot millorar el rendiment mitjançant la constant COMPANY_DONOTSEARCH_ANYWHERE a 1 a Configuració-> Varis. La recerca es limitarà llavors a l'inici de la cadena. ActivityStateToSelectCompany= Afegir un filtre en la recerca per mostrar/ocultar els tercers en actiu o que hagin deixat d'exercir UseSearchToSelectContact=Utilitzar un formulari de cerca (en lloc d'una llista desplegable).
Tingueu en compte que si té un gran nombre de contactes (> 100 000), pot millorar el rendiment mitjançant la constant CONTACT_DONOTSEARCH_ANYWHERE a 1 a Configuració-> Diversos. La recerca es limitarà llavors a l'inici de la cadena. SearchFilter=Opcions filtres de cerca diff --git a/htdocs/langs/cs_CZ/admin.lang b/htdocs/langs/cs_CZ/admin.lang index df6858d353b..70ec831c7dd 100644 --- a/htdocs/langs/cs_CZ/admin.lang +++ b/htdocs/langs/cs_CZ/admin.lang @@ -49,7 +49,7 @@ ErrorReservedTypeSystemSystemAuto=Hodnota "systém" a "systemauto ErrorCodeCantContainZero=Kód může obsahovat hodnotu 0 DisableJavascript=Zakázat JavaScript a Ajax funkce ConfirmAjax=Použití Ajax potvrzení vyskakovací okna -UseSearchToSelectCompany=Používejte automatické doplňování polí vybrat třetí strany (namísto použití pole se seznamem).

Také, pokud máte velký počet třetích stran (> 100 000), můžete zvýšit rychlost nastavením konstantní SOCIETE_DONOTSEARCH_ANYWHERE na 1 v Nastavení-> Ostatní. Vyhledávání pak bude omezen na začátek řetězce. +UseSearchToSelectCompany=Používejte automatické doplňování polí vybrat třetí strany (namísto použití pole se seznamem).

Také, pokud máte velký počet třetích stran (> 100 000), můžete zvýšit rychlost nastavením konstantní COMPANY_DONOTSEARCH_ANYWHERE na 1 v Nastavení-> Ostatní. Vyhledávání pak bude omezen na začátek řetězce. ActivityStateToSelectCompany= Přidat možnost filtru pro zobrazení / skrytí thirdparties, které jsou v současné době v činnosti nebo přestal ji UseSearchToSelectContact=Používejte automatické doplňování polí vyberte kontakt (namísto použití pole se seznamem).

Také, pokud máte velký počet třetích stran (> 100 000), můžete zvýšit rychlost nastavením konstantní CONTACT_DONOTSEARCH_ANYWHERE na 1 v Nastavení-> Ostatní. Vyhledávání pak bude omezen na začátek řetězce. SearchFilter=Hledat filtry možnosti diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index 654047ac05a..7efb26f9beb 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -49,7 +49,7 @@ ErrorReservedTypeSystemSystemAuto=Αξία «system» και «systemauto» γι ErrorCodeCantContainZero=Κώδικας δεν μπορεί να περιέχει την τιμή 0 DisableJavascript=Απενεργοποίηση συναρτήσεων JavaScript και Ajax ConfirmAjax=Χρήση διαλόγων επιβεβαίωσης Ajax -UseSearchToSelectCompany=Χρήση φόρμας αναζήτησης για επιλογή εταιρίας (αντί χρήσης πλαισίων λίστας). Αν έχετε μεγάλο αριθμό στοιχείων (>100000) μπορείτε να αυξήσετε την ταχύτητα θέτοντας την μεταβλητή SOCIETE_DONOTSEARCH_ANYWHERE σε 1 στο μενού Ρυθμίσεις -> Άλλες Ρυθμίσεις +UseSearchToSelectCompany=Χρήση φόρμας αναζήτησης για επιλογή εταιρίας (αντί χρήσης πλαισίων λίστας). Αν έχετε μεγάλο αριθμό στοιχείων (>100000) μπορείτε να αυξήσετε την ταχύτητα θέτοντας την μεταβλητή COMPANY_DONOTSEARCH_ANYWHERE σε 1 στο μενού Ρυθμίσεις -> Άλλες Ρυθμίσεις ActivityStateToSelectCompany= Προσθέστε μια επιλογή φίλτρου για εμφάνιση / απόκρυψη τρίτα μέρη τα οποία βρίσκονται σε λειτουργία ή έχει παύσει UseSearchToSelectContact=Χρησιμοποιήστε τα πεδία αυτόματης συμπλήρωσης για να επιλέξετε επαφή (αντί να χρησιμοποιήσετε ένα πλαίσιο λίστας).

Επίσης, αν έχετε ένα μεγάλο αριθμό τρίτων (> 100 000), μπορείτε να αυξήσετε την ταχύτητα με τη σταθερή CONTACT_DONOTSEARCH_ANYWHERE στο 1 στην Εγκατάσταση->Άλλα. Η αναζήτηση μετά θα περιορίζεται απο την έναρξη της συμβολοσειράς. SearchFilter=Αναζήτηση επιλογές φίλτρων diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index e7235011263..3aaba60e9e0 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -49,7 +49,7 @@ ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is re ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=Disable JavaScript and Ajax functions ConfirmAjax=Use Ajax confirmation popups -UseSearchToSelectCompany=Use autocompletion fields to choose third parties (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant SOCIETE_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. +UseSearchToSelectCompany=Use autocompletion fields to choose third parties (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. ActivityStateToSelectCompany= Add a filter option to show/hide thirdparties which are currently in activity or has ceased it UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=Search filters options diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 086ee40962c..6ad5e2f2005 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -49,7 +49,7 @@ ErrorReservedTypeSystemSystemAuto=El uso del tipo 'system' y 'systemauto' está ErrorCodeCantContainZero=El código no puede contener el valor 0 DisableJavascript=Desactivar las funciones Javascript ConfirmAjax=Utilizar los popups de confirmación Ajax -UseSearchToSelectCompany=Utilizar un formulario de búsqueda para buscar terceros (en vez de lista desplegable)

Tenga en cuenta que si tiene un gran número de productos o servicios (>100 000), puede mejorar el rendimiento mediante la constante SOCIETE_DONOTSEARCH_ANYWHERE a 1 en Configuración->Varios. La búsqueda se limitará entonces al inicio de la cadena. +UseSearchToSelectCompany=Utilizar un formulario de búsqueda para buscar terceros (en vez de lista desplegable)

Tenga en cuenta que si tiene un gran número de productos o servicios (>100 000), puede mejorar el rendimiento mediante la constante COMPANY_DONOTSEARCH_ANYWHERE a 1 en Configuración->Varios. La búsqueda se limitará entonces al inicio de la cadena. ActivityStateToSelectCompany= Agregar un filtro en la búsqueda para mostrar/ocultar los terceros en activo o que hayan dejado de ejercer UseSearchToSelectContact=Utilizar un formulario de búsqueda (en vez de una lista desplegable).
Tenga en cuenta que si tiene un gran número de contactos (>100 000), puede mejorar el rendimiento mediante la constante CONTACT_DONOTSEARCH_ANYWHERE a 1 en Configuración->Varios. La búsqueda se limitará entonces al inicio de la cadena. SearchFilter=Opciones filtros de búsqueda diff --git a/htdocs/langs/et_EE/admin.lang b/htdocs/langs/et_EE/admin.lang index 167f89b8dd3..f2da96455e8 100644 --- a/htdocs/langs/et_EE/admin.lang +++ b/htdocs/langs/et_EE/admin.lang @@ -49,7 +49,7 @@ DictionnarySetup=Dictionary setup # ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=Keela JavaScript ja Ajax funktsioonid ConfirmAjax=Kasuta Ajax kinnituse hüpikaknad -UseSearchToSelectCompany=Kasuta sõnalõpetusteks väljad valida kolmandate isikute (selle asemel loendiboksis).

Samuti kui teil on suur hulk kolmandaid isikuid (> 100 000), saate suurendada kiirust, millega pidev SOCIETE_DONOTSEARCH_ANYWHERE kuni 1 aasta Setup-> Teised. Otsi siis piirdub algus string. +UseSearchToSelectCompany=Kasuta sõnalõpetusteks väljad valida kolmandate isikute (selle asemel loendiboksis).

Samuti kui teil on suur hulk kolmandaid isikuid (> 100 000), saate suurendada kiirust, millega pidev COMPANY_DONOTSEARCH_ANYWHERE kuni 1 aasta Setup-> Teised. Otsi siis piirdub algus string. ActivityStateToSelectCompany= Lisa filter võimalus näidata / peita thirdparties mis on praegu tegevust või lõpetas ta # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=Otsi filtrite valikud diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 9984beaf503..1c27019bce1 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -49,7 +49,7 @@ ErrorReservedTypeSystemSystemAuto=Erreur, les valeurs 'system' et 'systemauto' s ErrorCodeCantContainZero=Erreur, le code ne peut contenir la valeur 0 DisableJavascript=Désactiver les fonctions Javascript et Ajax ConfirmAjax=Utiliser les fenêtres de confirmation Ajax -UseSearchToSelectCompany=Utiliser un champ avec autocomplétion pour choisir un tiers (plutôt qu'une liste déroulante).

Notez que si vous avez un nombre important de tiers (> 100 000), vous pouvez améliorer les performances en définissant la constante SOCIETE_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limitée au début de la chaîne. +UseSearchToSelectCompany=Utiliser un champ avec autocomplétion pour choisir un tiers (plutôt qu'une liste déroulante).

Notez que si vous avez un nombre important de tiers (> 100 000), vous pouvez améliorer les performances en définissant la constante COMPANY_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limitée au début de la chaîne. ActivityStateToSelectCompany= Ajouter une option de filtrage lors des recherches pour afficher/masquer les tiers en exercice ou ayant cessé d'exercer UseSearchToSelectContact=Utiliser un champ avec autocomplétion pour choisir un contact (plutôt qu'une liste déroulante).

Notez que si vous avez un nombre important de contacts (> 100 000), vous pouvez améliorer les performances en définissant la constante CONTACT_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limitée au début de la chaîne. SearchFilter=Options des filtres de recherche diff --git a/htdocs/langs/he_IL/admin.lang b/htdocs/langs/he_IL/admin.lang index 061a1f23e44..bdb2ef07c6a 100644 --- a/htdocs/langs/he_IL/admin.lang +++ b/htdocs/langs/he_IL/admin.lang @@ -49,7 +49,7 @@ DictionnarySetup=הגדרת מילון # ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=בטל פונקציונליות של JavaScript ו Ajax ConfirmAjax=השתמש קופצים אייאקס אישור -UseSearchToSelectCompany=להשתמש בשדות השלמה אוטומטית לבחור צדדים שלישיים (ולא באמצעות תיבת רשימה).

גם אם יש לך מספר רב של צדדים שלישיים (> 100 000), תוכל להגדיל את המהירות על ידי הגדרת SOCIETE_DONOTSEARCH_ANYWHERE מתמיד 1 בהתקנת-> אחר. חיפוש לאחר מכן ניתן יהיה להתחיל מוגבל של מחרוזת. +UseSearchToSelectCompany=להשתמש בשדות השלמה אוטומטית לבחור צדדים שלישיים (ולא באמצעות תיבת רשימה).

גם אם יש לך מספר רב של צדדים שלישיים (> 100 000), תוכל להגדיל את המהירות על ידי הגדרת COMPANY_DONOTSEARCH_ANYWHERE מתמיד 1 בהתקנת-> אחר. חיפוש לאחר מכן ניתן יהיה להתחיל מוגבל של מחרוזת. ActivityStateToSelectCompany= הוספת אפשרות סינון להראות / להסתיר thirdparties שהם כיום בפעילות או חדל זה # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=מסננים אפשרויות חיפוש diff --git a/htdocs/langs/hu_HU/admin.lang b/htdocs/langs/hu_HU/admin.lang index 72e0eb88bc7..4bae391a48d 100644 --- a/htdocs/langs/hu_HU/admin.lang +++ b/htdocs/langs/hu_HU/admin.lang @@ -49,7 +49,7 @@ DictionnarySetup=Szótár beállítási # ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=Disable JavaScript és Ajax funkciókkal ConfirmAjax=Használja Ajax visszaigazolást popup -UseSearchToSelectCompany=Használja az automata kiegészítés mezőket választani harmadik fél (helyett egy lista).

Akkor is, ha van egy nagy számú harmadik felek (> 100 000), akkor a sebesség növelése azáltal, hogy állandó SOCIETE_DONOTSEARCH_ANYWHERE 1. Beállítás-> Egyéb. Keresés csak ezután kezdeni a húr. +UseSearchToSelectCompany=Használja az automata kiegészítés mezőket választani harmadik fél (helyett egy lista).

Akkor is, ha van egy nagy számú harmadik felek (> 100 000), akkor a sebesség növelése azáltal, hogy állandó COMPANY_DONOTSEARCH_ANYWHERE 1. Beállítás-> Egyéb. Keresés csak ezután kezdeni a húr. ActivityStateToSelectCompany= Hozzáadása lehetőséget, hogy a szűrő / elrejtése thirdparties, amelyek jelenleg a tevékenység megszűnt, vagy azt # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=Keresés szűrők lehetőségek diff --git a/htdocs/langs/ja_JP/admin.lang b/htdocs/langs/ja_JP/admin.lang index ee77b07cac3..9f1414bbd1b 100644 --- a/htdocs/langs/ja_JP/admin.lang +++ b/htdocs/langs/ja_JP/admin.lang @@ -49,7 +49,7 @@ DictionnarySetup=辞書のセットアップ # ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=JavaScriptとAjaxの機能を無効にする ConfirmAjax=Ajaxの確認のポップアップを使用して、 -UseSearchToSelectCompany=第三者が(代わりにリストボックスを使用)を選択するオートコンプリートフィールドを使用します。

あなたがサードパーティの多数(> 100,000)を持っている場合にも、セットアップ - >その他1に定数SOCIETE_DONOTSEARCH_ANYWHEREを設定することにより、速度を上げることができます。検索は、文字列の先頭に制限されます。 +UseSearchToSelectCompany=第三者が(代わりにリストボックスを使用)を選択するオートコンプリートフィールドを使用します。

あなたがサードパーティの多数(> 100,000)を持っている場合にも、セットアップ - >その他1に定数COMPANY_DONOTSEARCH_ANYWHEREを設定することにより、速度を上げることができます。検索は、文字列の先頭に制限されます。 ActivityStateToSelectCompany= 活動に現在thirdparties表示/非表示切り替えフィルタオプションを追加したり、それを停止している # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=検索フィルタのオプション diff --git a/htdocs/langs/ko_KR/admin.lang b/htdocs/langs/ko_KR/admin.lang index 3b94e9608a8..31f1adbd856 100644 --- a/htdocs/langs/ko_KR/admin.lang +++ b/htdocs/langs/ko_KR/admin.lang @@ -49,7 +49,7 @@ VersionLastUpgrade=최종 버전 업그레이드 # ErrorCodeCantContainZero=Code can't contain value 0 # DisableJavascript=Disable JavaScript and Ajax functions # ConfirmAjax=Use Ajax confirmation popups -# UseSearchToSelectCompany=Use autocompletion fields to choose third parties (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant SOCIETE_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. +# UseSearchToSelectCompany=Use autocompletion fields to choose third parties (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. # ActivityStateToSelectCompany= Add a filter option to show/hide thirdparties which are currently in activity or has ceased it # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. # SearchFilter=Search filters options diff --git a/htdocs/langs/nl_BE/admin.lang b/htdocs/langs/nl_BE/admin.lang index 8e8404a45fa..72575d0a8ad 100644 --- a/htdocs/langs/nl_BE/admin.lang +++ b/htdocs/langs/nl_BE/admin.lang @@ -46,7 +46,7 @@ ErrorDecimalLargerThanAreForbidden = Fout, een nauwkeurigheid van meer dan %s DictionnarySetup = Woordenlijsten DisableJavascript = Schakel JavaScript en Ajax-functies uit ConfirmAjax = Gebruik Ajax bevestiging popups -UseSearchToSelectCompany = Gebruik velden die automatisch aanvullen om een bedrijf te kiezen (in plaats van een drop-down lijst).

In geval van een zeer groot aantal derde partijen (> 100 000), kan de snelheid verhoogt worden door de waarde SOCIETE_DONOTSEARCH_ANYWHERE op 1 te zetten in Home->Configuratie->Andere Instellingen. +UseSearchToSelectCompany = Gebruik velden die automatisch aanvullen om een bedrijf te kiezen (in plaats van een drop-down lijst).

In geval van een zeer groot aantal derde partijen (> 100 000), kan de snelheid verhoogt worden door de waarde COMPANY_DONOTSEARCH_ANYWHERE op 1 te zetten in Home->Configuratie->Andere Instellingen. ActivityStateToSelectCompany = Voeg een filter optie toe om derde partijen te tonen/verbergen die momenteel actief zijn of gestopt zijn SearchFilter = Opties voor de zoekfilters NumberOfKeyToSearch = Aantal karakters om de zoekactie te starten: %s diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index 20be7888384..217f4ec0095 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -49,7 +49,7 @@ DictionnarySetup=Constanten # ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=Schakel JavaScript en AJAX-functionaliteit uit ConfirmAjax=Gebruik AJAX bevestigingspopups -UseSearchToSelectCompany=Gebruik 'autocompletion' velden om derde partijen te kiezen (In plaats van een selectielijst).

Wanneer u een groot aantal derde partijen (meer dan 100.000) heeft, kunt u de snelheid verhogen door de constante SOCIETE_DONOTSEARCH_ANYWHERE op 1 in te stellen in Home->Instellingen->Overige instellingen. Het zoeken wordt dan beperkt tot het begin van een regel. +UseSearchToSelectCompany=Gebruik 'autocompletion' velden om derde partijen te kiezen (In plaats van een selectielijst).

Wanneer u een groot aantal derde partijen (meer dan 100.000) heeft, kunt u de snelheid verhogen door de constante COMPANY_DONOTSEARCH_ANYWHERE op 1 in te stellen in Home->Instellingen->Overige instellingen. Het zoeken wordt dan beperkt tot het begin van een regel. ActivityStateToSelectCompany= Voeg een filter optie voor het tonen / verbergen thirdparties die momenteel in de activiteiten of niet langer het # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=Zoekfilters opties diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index 38b1275b060..e40d5ff4692 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -49,7 +49,7 @@ DictionnarySetup=Nastavitve slovarja # ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=Onemogoči JavaScript in Ajax funkcije ConfirmAjax=Za potrditev uporabi Ajax pojavni meni -UseSearchToSelectCompany=Za izbiro podjetja uporabi obrazec za iskanje(namesto polja s seznamom).

Če je partnerjev zelo veliko (> 100 000), lahko hitrost povišate z nastavitvijo konstante SOCIETE_DONOTSEARCH_ANYWHERE na 1 v Nastavitve->Ostale nastavitve. Iskanje bo s tem omejeno na začetek niza. +UseSearchToSelectCompany=Za izbiro podjetja uporabi obrazec za iskanje(namesto polja s seznamom).

Če je partnerjev zelo veliko (> 100 000), lahko hitrost povišate z nastavitvijo konstante COMPANY_DONOTSEARCH_ANYWHERE na 1 v Nastavitve->Ostale nastavitve. Iskanje bo s tem omejeno na začetek niza. ActivityStateToSelectCompany= Dodaj opcijo filtra za prikaz/skritje partnerjev, ki so trenutno neaktivni ali so prekinili aktivnosti # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=Opcije iskalnega filtra diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index 1a3ad14dd02..f7c90228a3c 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -49,7 +49,7 @@ ErrorReservedTypeSystemSystemAuto='system' ve 'systemauto' değerleri tip için ErrorCodeCantContainZero=Kod 0 değeri içeremez DisableJavascript=Javascript ve Ajax fonksiyonlarını engelle ConfirmAjax=Açılır Ajax onay pencereleri kullanın -UseSearchToSelectCompany=Üçüncü partileri seçmek için (liste kutusu yerine) oto tamamlamalı alanları kullanın.

Çok sayıda üçüncü parti (>100 000) olsa da Ayarlar->Diğer (Setup->Other) de SOCIETE_DONOTSEARCH_ANYWHERE değişmezini 1 yaparak hızı arttırabilirsiniz. Bundan sonra arama yalnızca dizenin başlangıcı ile sınırlıdır. +UseSearchToSelectCompany=Üçüncü partileri seçmek için (liste kutusu yerine) oto tamamlamalı alanları kullanın.

Çok sayıda üçüncü parti (>100 000) olsa da Ayarlar->Diğer (Setup->Other) de COMPANY_DONOTSEARCH_ANYWHERE değişmezini 1 yaparak hızı arttırabilirsiniz. Bundan sonra arama yalnızca dizenin başlangıcı ile sınırlıdır. ActivityStateToSelectCompany= Halen etkin olan ya da durdmuş olan üçüncü partilerin görünmesi/gizlenmesi bir süzgeç seçeneği ekleyin UseSearchToSelectContact=Kişi seçmek için (liste kutusu yerine) oto tamamlamalı alanları kullanın.

Çok sayıda üçüncü parti (>100 000) olsa da Ayarlar->Diğer den CONTACT_DONOTSEARCH_ANYWHERE değişmezini 1 yaparak hızı arttırabilirsiniz. Bundan sonra arama yalnızca dizenin başlangıcı ile sınırlı olacaktır. SearchFilter=Arama süzgeçi seçenekleri diff --git a/htdocs/langs/vi_VN/admin.lang b/htdocs/langs/vi_VN/admin.lang index e41b368d345..77eb58b5558 100644 --- a/htdocs/langs/vi_VN/admin.lang +++ b/htdocs/langs/vi_VN/admin.lang @@ -49,7 +49,7 @@ ErrorReservedTypeSystemSystemAuto=Giá trị 'hệ thống' và 'hệ thống t ErrorCodeCantContainZero=Mã lệnh không thể chứa giá trị 0 DisableJavascript=Vô hiệu hóa JavaScript và tính năng Ajax ConfirmAjax=Sử dụng popups xác định từ Ajax -UseSearchToSelectCompany=Sử dụng các trường tự động bổ sung để chọn các liên kết với các nhà phát triển thứ ba (thay vì danh sách chọn).

Đồng thời nếu bạn có một số lượng lớn các nhà phát triển thứ ba (>100 000), bạn có thể tăng tốc độ bằng việc thiết lập hằng số SOCIETE_DONOTSEARCH_ANYWHERE thành 1 trong Thiết lập->Khác. Việc tìm kiếm sẽ được giới hạn với những chuỗi bắt đầu. +UseSearchToSelectCompany=Sử dụng các trường tự động bổ sung để chọn các liên kết với các nhà phát triển thứ ba (thay vì danh sách chọn).

Đồng thời nếu bạn có một số lượng lớn các nhà phát triển thứ ba (>100 000), bạn có thể tăng tốc độ bằng việc thiết lập hằng số COMPANY_DONOTSEARCH_ANYWHERE thành 1 trong Thiết lập->Khác. Việc tìm kiếm sẽ được giới hạn với những chuỗi bắt đầu. ActivityStateToSelectCompany= Thêm tùy chọn bộ lọc để ẩn/hiện các nhà phát triển thứ ba hiện đang hoạt động hoặc đã bị xóa UseSearchToSelectContact=Sử dụng trường tự hoàn tất để chọn liên lạc (thay vì sử dụng danh sách chọn).

Đồng thời nếu bạn có nhiều các phần tiện ích từ bên thứ ba (> 100 000), bạn có thể tắng tốc độ bằng cách thiết lập hằng số CONTACT_DONOTSEARCH_ANYWHERE lên 1 trong Cài đặt->Khác. Tìm kiếm sau đó sẽ giới hạn phần bắt đầu của chuỗi. SearchFilter=Tùy chọn bộ lọc tìm kiếm diff --git a/htdocs/langs/zh_CN/admin.lang b/htdocs/langs/zh_CN/admin.lang index da251bbfa8d..3f6a2687cc2 100644 --- a/htdocs/langs/zh_CN/admin.lang +++ b/htdocs/langs/zh_CN/admin.lang @@ -49,9 +49,9 @@ ErrorReservedTypeSystemSystemAuto=类型值 'system' 与 'systemauto' 是系统 ErrorCodeCantContainZero=编码不能包含 0 DisableJavascript=禁用 JavaScript 和 Ajax 功能 ConfirmAjax=使用 Ajax 弹出式确认窗口 -UseSearchToSelectCompany=使用自动完成栏的方式,来选择第三方(不使用下拉选择框)

如果你有大于 100000 笔第三方资讯,则可以通过修改SOCIETE_DONOTSEARCH_ANYWHERE 常数为 1 来加快速度。此常数可以在设定->其他设置中设定。这样自动完成功能会被限制为从字首开始依次匹配。 +UseSearchToSelectCompany=使用自动完成栏的方式,来选择第三方(不使用下拉选择框)

如果你有大于 100000 笔第三方资讯,则可以通过修改COMPANY_DONOTSEARCH_ANYWHERE 常数为 1 来加快速度。此常数可以在设定->其他设置中设定。这样自动完成功能会被限制为从字首开始依次匹配。 ActivityStateToSelectCompany= 添加一个筛选器选项来显示/隐藏当前有往来或已停止往来的客户/供应商。 -UseSearchToSelectContact=使用自动完成栏的方式,来选择第三方(取代下拉菜单)

如果你有大于 100000 个第三方,则可以通过修改SOCIETE_DONOTSEARCH_ANYWHERE 常数为 1 来加快速度。此常数可以在设定->其他设置中设定。这样自动完成功能会被限制为从字首开始依次匹配。 +UseSearchToSelectContact=使用自动完成栏的方式,来选择第三方(取代下拉菜单)

如果你有大于 100000 个第三方,则可以通过修改COMPANY_DONOTSEARCH_ANYWHERE 常数为 1 来加快速度。此常数可以在设定->其他设置中设定。这样自动完成功能会被限制为从字首开始依次匹配。 SearchFilter=搜索过滤选项 NumberOfKeyToSearch=触发搜索的字符数量:%s ViewFullDateActions=在第三表中显示全天事件 diff --git a/htdocs/langs/zh_TW/admin.lang b/htdocs/langs/zh_TW/admin.lang index 52a1bf25b0a..a311430d632 100644 --- a/htdocs/langs/zh_TW/admin.lang +++ b/htdocs/langs/zh_TW/admin.lang @@ -49,7 +49,7 @@ DictionnarySetup=設定選項清單 # ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=禁用JavaScript和Ajax功能 ConfirmAjax=使用Ajax確認彈出式窗口 -UseSearchToSelectCompany=使用自動完成欄位資訊的方式,來選擇客戶/供應商(而不是使用清單方式)

如果你有大於100000筆的客戶/供應商資訊,則可以藉由修改SOCIETE_DONOTSEARCH_ANYWHERE常數為 1 來加快速度。此常數可以在設定->其他設置中設定。 這樣在搜尋的時候會被限制為字串開始輸入時。 +UseSearchToSelectCompany=使用自動完成欄位資訊的方式,來選擇客戶/供應商(而不是使用清單方式)

如果你有大於100000筆的客戶/供應商資訊,則可以藉由修改COMPANY_DONOTSEARCH_ANYWHERE常數為 1 來加快速度。此常數可以在設定->其他設置中設定。 這樣在搜尋的時候會被限制為字串開始輸入時。 ActivityStateToSelectCompany= 添加一個篩選器的選項,以顯示/隱藏thirdparties,這是在目前的活動或已停止 # UseSearchToSelectContact=Use autocompletion fields to choose contact (instead of using a list box).

Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. SearchFilter=搜尋過濾選項 diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajaxcompanies.php index 981a9c7d40f..32fbe2e2c00 100644 --- a/htdocs/societe/ajaxcompanies.php +++ b/htdocs/societe/ajaxcompanies.php @@ -66,7 +66,7 @@ if (GETPOST('newcompany') || GETPOST('socid','int') || GETPOST('id_fourn')) { $sql.=" AND ("; // Add criteria on name/code - if (! empty($conf->global->SOCIETE_DONOTSEARCH_ANYWHERE)) // Can use index + if (! empty($conf->global->COMPANY_DONOTSEARCH_ANYWHERE)) // Can use index { $sql.="nom LIKE '" . $db->escape($socid) . "%'"; $sql.=" OR code_client LIKE '" . $db->escape($socid) . "%'"; diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 4e970dffc17..b099da89afe 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -168,7 +168,7 @@ if ($_GET["socid"]) $sql .= " WHERE sc.fk_soc =".$soc->id; $sql .= " AND sc.fk_user = u.rowid"; $sql .= " ORDER BY u.lastname ASC "; - + dol_syslog('societe/commerciaux.php::list salesman sql = '.$sql,LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -227,6 +227,7 @@ if ($_GET["socid"]) $sql = "SELECT u.rowid, u.lastname, u.firstname, u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; + if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND u.statut<>0 "; $sql.= " ORDER BY u.lastname ASC "; $resql = $db->query($sql); From 27e4852a3597a334477a247bb51a71dd59a52746 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 30 Oct 2013 12:27:36 +0100 Subject: [PATCH 10/48] upgrade process to change const SOCIETE_DONOTSEARCH_ANYWHERE to COMPANY_DONOTSEARCH_ANYWHERE --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 889e606c4fe..396954347a6 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -316,3 +316,5 @@ create table llx_contrat_extrafields -- add outstanding bill ALTER TABLE llx_societe ADD outstanding_limit double(24,8) DEFAULT NULL AFTER mode_reglement_supplier; +UPDATE llx_const SET name='COMPANY_DONOTSEARCH_ANYWHERE' WHERE name='SOCIETE_DONOTSEARCH_ANYWHERE'; + From 693918d8b6cb02668e50a7490c586f3d04bcb450 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 30 Oct 2013 12:40:00 +0100 Subject: [PATCH 11/48] misspelling --- htdocs/contact/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 9b6f4819d8d..fb30b32a67d 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -178,7 +178,7 @@ if (empty($reshook)) $object->priv = $_POST["priv"]; $object->note_public = GETPOST("note_public"); $object->note_private = GETPOST("note_private"); - $object->status = 1; //Defult status to Actif + $object->statut = 1; //Defult status to Actif // Note: Correct date should be completed with location to have exact GM time of birth. $object->birthday = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]); From ba0273ccc4c6f156f758616547b054c855949cf0 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 30 Oct 2013 18:17:37 +0100 Subject: [PATCH 12/48] fix bad rounding on margin calculation and display --- ChangeLog | 2 + htdocs/core/class/commonobject.class.php | 46 +++++++++++----------- htdocs/core/tpl/objectline_view.tpl.php | 7 ++-- htdocs/margin/agentMargins.php | 23 +++++------ htdocs/margin/customerMargins.php | 48 +++++++++++------------ htdocs/margin/lib/margins.lib.php | 4 +- htdocs/margin/productMargins.php | 47 +++++++++++----------- htdocs/margin/tabs/productMargins.php | 50 ++++++++++++------------ htdocs/margin/tabs/thirdpartyMargins.php | 42 ++++++++++---------- 9 files changed, 134 insertions(+), 135 deletions(-) diff --git a/ChangeLog b/ChangeLog index 319bde9bfa1..ac0f5d5e9c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ -------------------------------------------------------------- English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 3.4.2 compared to 3.4.1 ***** +Fix: Bad rounding on margin calculations and display ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** Fix: Display buying price on line edit when no supplier price is defined diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f6a1d7ef32c..8343c219d31 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent - * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2011-2012 Philippe Grand * Copyright (C) 2012 Marcos García * @@ -3175,14 +3175,14 @@ abstract class CommonObject } } if ($marginInfos['pa_products'] > 0) - $marginInfos['margin_rate_products'] = 100 * round($marginInfos['margin_on_products'] / $marginInfos['pa_products'],5); + $marginInfos['margin_rate_products'] = 100 * $marginInfos['margin_on_products'] / $marginInfos['pa_products']; if ($marginInfos['pv_products'] > 0) - $marginInfos['mark_rate_products'] = 100 * round($marginInfos['margin_on_products'] / $marginInfos['pv_products'],5); + $marginInfos['mark_rate_products'] = 100 * $marginInfos['margin_on_products'] / $marginInfos['pv_products']; if ($marginInfos['pa_services'] > 0) - $marginInfos['margin_rate_services'] = 100 * round($marginInfos['margin_on_services'] / $marginInfos['pa_services'],5); + $marginInfos['margin_rate_services'] = 100 * $marginInfos['margin_on_services'] / $marginInfos['pa_services']; if ($marginInfos['pv_services'] > 0) - $marginInfos['mark_rate_services'] = 100 * round($marginInfos['margin_on_services'] / $marginInfos['pv_services'],5); + $marginInfos['mark_rate_services'] = 100 * $marginInfos['margin_on_services'] / $marginInfos['pv_services']; // if credit note, margin = -1 * (abs(selling_price) - buying_price) if ($marginInfos['pv_total'] < 0) @@ -3190,9 +3190,9 @@ abstract class CommonObject else $marginInfos['total_margin'] = $marginInfos['pv_total'] - $marginInfos['pa_total']; if ($marginInfos['pa_total'] > 0) - $marginInfos['total_margin_rate'] = 100 * round($marginInfos['total_margin'] / $marginInfos['pa_total'],5); + $marginInfos['total_margin_rate'] = 100 * $marginInfos['total_margin'] / $marginInfos['pa_total']; if ($marginInfos['pv_total'] > 0) - $marginInfos['total_mark_rate'] = 100 * round($marginInfos['total_margin'] / $marginInfos['pv_total'],5); + $marginInfos['total_mark_rate'] = 100 * $marginInfos['total_margin'] / $marginInfos['pv_total']; return $marginInfos; } @@ -3209,6 +3209,8 @@ abstract class CommonObject if (! empty($user->societe_id)) return; + $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT); + $marginInfo = $this->getMarginInfos($force_price); print ''; @@ -3228,34 +3230,34 @@ abstract class CommonObject //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) { print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print ''; + print ''; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print ''; + print ''; print ''; print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print ''; + print ''; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print ''; + print ''; print ''; //} print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print ''; + print ''; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print ''; + print ''; print ''; print '
'.$langs->trans('MarginOnProducts').''.price($marginInfo['pv_products']).''.price($marginInfo['pa_products']).''.price($marginInfo['margin_on_products']).''.price($marginInfo['pv_products'], null, null, null, null, $rounding).''.price($marginInfo['pa_products'], null, null, null, null, $rounding).''.price($marginInfo['margin_on_products'], null, null, null, null, $rounding).''.(($marginInfo['margin_rate_products'] == '')?'n/a':price($marginInfo['margin_rate_products']).'%').''.(($marginInfo['margin_rate_products'] == '')?'n/a':price($marginInfo['margin_rate_products'], null, null, null, null, $rounding).'%').''.(($marginInfo['mark_rate_products'] == '')?'n/a':price($marginInfo['mark_rate_products']).'%').''.(($marginInfo['mark_rate_products'] == '')?'n/a':price($marginInfo['mark_rate_products'], null, null, null, null, $rounding).'%').'
'.$langs->trans('MarginOnServices').''.price($marginInfo['pv_services']).''.price($marginInfo['pa_services']).''.price($marginInfo['margin_on_services']).''.price($marginInfo['pv_services'], null, null, null, null, $rounding).''.price($marginInfo['pa_services'], null, null, null, null, $rounding).''.price($marginInfo['margin_on_services'], null, null, null, null, $rounding).''.(($marginInfo['margin_rate_services'] == '')?'n/a':price($marginInfo['margin_rate_services']).'%').''.(($marginInfo['margin_rate_services'] == '')?'n/a':price($marginInfo['margin_rate_services'], null, null, null, null, $rounding).'%').''.(($marginInfo['mark_rate_services'] == '')?'n/a':price($marginInfo['mark_rate_services']).'%').''.(($marginInfo['mark_rate_services'] == '')?'n/a':price($marginInfo['mark_rate_services'], null, null, null, null, $rounding).'%').'
'.$langs->trans('TotalMargin').''.price($marginInfo['pv_total']).''.price($marginInfo['pa_total']).''.price($marginInfo['total_margin']).''.price($marginInfo['pv_total'], null, null, null, null, $rounding).''.price($marginInfo['pa_total'], null, null, null, null, $rounding).''.price($marginInfo['total_margin'], null, null, null, null, $rounding).''.(($marginInfo['total_margin_rate'] == '')?'n/a':price($marginInfo['total_margin_rate']).'%').''.(($marginInfo['total_margin_rate'] == '')?'n/a':price($marginInfo['total_margin_rate'], null, null, null, null, $rounding).'%').''.(($marginInfo['total_mark_rate'] == '')?'n/a':price($marginInfo['total_mark_rate']).'%').''.(($marginInfo['total_mark_rate'] == '')?'n/a':price($marginInfo['total_mark_rate'], null, null, null, null, $rounding).'%').'
'; } diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index dcb46ac1857..742a1ff7061 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -1,7 +1,7 @@ * Copyright (C) 2010-2011 Laurent Destailleur - * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2012-2013 Christophe Battarel * * 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 @@ -120,14 +120,15 @@ margin->enabled) && empty($user->societe_id)) { + $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT); ?> pa_ht); ?> global->DISPLAY_MARGIN_RATES)) {?> - pa_ht == 0)?'n/a':price($line->marge_tx).'%'); ?> + pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?> global->DISPLAY_MARK_RATES)) {?> - marque_tx).'%'; ?> + marque_tx, null, null, null, null, $rounding).'%'; ?> special_code == 3) { ?> diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index dc858d66b76..9836b6408c3 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -172,9 +172,6 @@ if ($result) print_liste_field_titre($langs->trans("MarkRate"),$_SERVER["PHP_SELF"],"","","&agentid=".$agentid,'align="right"',$sortfield,$sortorder); print "\n"; - $cumul_achat = 0; - $cumul_vente = 0; - $cumul_qty = 0; $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT); if ($num > 0) @@ -191,13 +188,13 @@ if ($result) if ($marge < 0) { - $marginRate = ($pa != 0)?-1*(100 * round($marge / $pa, 5)):'' ; - $markRate = ($pv != 0)?-1*(100 * round($marge / $pv, 5)):'' ; + $marginRate = ($pa != 0)?-1*(100 * $marge / $pa):'' ; + $markRate = ($pv != 0)?-1*(100 * $marge / $pv):'' ; } else { - $marginRate = ($pa != 0)?(100 * round($marge / $pa, 5)):'' ; - $markRate = ($pv != 0)?(100 * round($marge / $pv, 5)):'' ; + $marginRate = ($pa != 0)?(100 * $marge / $pa):'' ; + $markRate = ($pv != 0)?(100 * $marge / $pv):'' ; } $var=!$var; @@ -214,18 +211,16 @@ if ($result) print "".$userstatic->getFullName($langs,0,0,0)."\n"; } - print "".price($pv)."\n"; - print "".price($pa)."\n"; - print "".price($marge)."\n"; + print "".price($pv, null, null, null, null, $rounding)."\n"; + print "".price($pa, null, null, null, null, $rounding)."\n"; + print "".price($marge, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print "\n"; $i++; - $cumul_achat += round($objp->buying_price, $rounding); - $cumul_vente += round($objp->selling_price, $rounding); } } print ""; diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index c42f73bb87c..e4f29260e09 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -213,7 +213,7 @@ if ($result) $cumul_achat = 0; $cumul_vente = 0; - $cumul_qty = 0; + $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT); if ($num > 0) @@ -230,13 +230,13 @@ if ($result) if ($marge < 0) { - $marginRate = ($pa != 0)?-1*(100 * round($marge / $pa, 5)):'' ; - $markRate = ($pv != 0)?-1*(100 * round($marge / $pv, 5)):'' ; + $marginRate = ($pa != 0)?-1*(100 * $marge / $pa):'' ; + $markRate = ($pv != 0)?-1*(100 * $marge / $pv):'' ; } else { - $marginRate = ($pa != 0)?(100 * round($marge / $pa, 5)):'' ; - $markRate = ($pv != 0)?(100 * round($marge / $pv, 5)):'' ; + $marginRate = ($pa != 0)?(100 * $marge / $pa):'' ; + $markRate = ($pv != 0)?(100 * $marge / $pv):'' ; } $var=!$var; @@ -258,18 +258,18 @@ if ($result) print "".$companystatic->getNomUrl(1,'customer')."\n"; } - print "".price($pv)."\n"; - print "".price($pa)."\n"; - print "".price($marge)."\n"; + print "".price($pv, null, null, null, null, $rounding)."\n"; + print "".price($pa, null, null, null, null, $rounding)."\n"; + print "".price($marge, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print "\n"; $i++; - $cumul_achat += round($objp->buying_price, $rounding); - $cumul_vente += round($objp->selling_price, $rounding); + $cumul_achat += $objp->buying_price; + $cumul_vente += $objp->selling_price; } } @@ -278,13 +278,13 @@ if ($result) $totalMargin = $cumul_vente - $cumul_achat; if ($totalMargin < 0) { - $marginRate = ($cumul_achat != 0)?-1*(100 * round($totalMargin / $cumul_achat, 5)):''; - $markRate = ($cumul_vente != 0)?-1*(100 * round($totalMargin / $cumul_vente, 5)):''; + $marginRate = ($cumul_achat != 0)?-1*(100 * $totalMargin / $cumul_achat):''; + $markRate = ($cumul_vente != 0)?-1*(100 * $totalMargin / $cumul_vente):''; } else { - $marginRate = ($cumul_achat != 0)?(100 * round($totalMargin / $cumul_achat, 5)):''; - $markRate = ($cumul_vente != 0)?(100 * round($totalMargin / $cumul_vente, 5)):''; + $marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):''; + $markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):''; } print ''; @@ -293,13 +293,13 @@ if ($result) else print ''; print $langs->trans('TotalMargin').""; - print "".price($cumul_vente)."\n"; - print "".price($cumul_achat)."\n"; - print "".price($totalMargin)."\n"; + print "".price($cumul_vente, null, null, null, null, $rounding)."\n"; + print "".price($cumul_achat, null, null, null, null, $rounding)."\n"; + print "".price($totalMargin, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print "\n"; print ""; @@ -325,9 +325,9 @@ $(document).ready(function() { $("div.fiche form").submit(); }); - $("#totalMargin").html(""); - $("#marginRate").html(""); - $("#markRate").html(""); + $("#totalMargin").html(""); + $("#marginRate").html(""); + $("#markRate").html(""); }); diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php index bfa5d530e29..6d1ded03419 100644 --- a/htdocs/margin/lib/margins.lib.php +++ b/htdocs/margin/lib/margins.lib.php @@ -125,10 +125,10 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta // calcul taux marge if ($paht_ret != 0) - $marge_tx_ret = round((100 * $marge) / $paht_ret, 3); + $marge_tx_ret = (100 * $marge) / $paht_ret; // calcul taux marque if ($pu_ht_remise != 0) - $marque_tx_ret = round((100 * $marge) / $pu_ht_remise, 3); + $marque_tx_ret = (100 * $marge) / $pu_ht_remise; return array($paht_ret, $marge_tx_ret, $marque_tx_ret); } diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index 334f8f998bd..931f2f54951 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -217,7 +217,6 @@ if ($result) $cumul_achat = 0; $cumul_vente = 0; - $cumul_qty = 0; $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT); if ($num > 0) @@ -233,13 +232,13 @@ if ($result) if ($marge < 0) { - $marginRate = ($pa != 0)?-1*(100 * round($marge / $pa, 5)):'' ; - $markRate = ($pv != 0)?-1*(100 * round($marge / $pv, 5)):'' ; + $marginRate = ($pa != 0)?-1*(100 * $marge / $pa):'' ; + $markRate = ($pv != 0)?-1*(100 * $marge / $pv):'' ; } else { - $marginRate = ($pa != 0)?(100 * round($marge / $pa, 5)):'' ; - $markRate = ($pv != 0)?(100 * round($marge / $pv, 5)):'' ; + $marginRate = ($pa != 0)?(100 * $marge / $pa):'' ; + $markRate = ($pv != 0)?(100 * $marge / $pv):'' ; } $var=!$var; @@ -263,18 +262,18 @@ if ($result) $text.= ' - '.$objp->label; print "".$product_static->getNomUrl(1)."\n"; } - print "".price($pv)."\n"; - print "".price($pa)."\n"; - print "".price($marge)."\n"; + print "".price($pv, null, null, null, null, $rounding)."\n"; + print "".price($pa, null, null, null, null, $rounding)."\n"; + print "".price($marge, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print "\n"; $i++; - $cumul_achat += round($objp->buying_price, $rounding); - $cumul_vente += round($objp->selling_price, $rounding); + $cumul_achat += $objp->buying_price; + $cumul_vente += $objp->selling_price; } } @@ -284,13 +283,13 @@ if ($result) $totalMargin = $cumul_vente - $cumul_achat; if ($totalMargin < 0) { - $marginRate = ($cumul_achat != 0)?-1*(100 * round($totalMargin / $cumul_achat, 5)):''; - $markRate = ($cumul_vente != 0)?-1*(100 * round($totalMargin / $cumul_vente, 5)):''; + $marginRate = ($cumul_achat != 0)?-1*(100 * $totalMargin / $cumul_achat):''; + $markRate = ($cumul_vente != 0)?-1*(100 * $totalMargin / $cumul_vente):''; } else { - $marginRate = ($cumul_achat != 0)?(100 * round($totalMargin / $cumul_achat, 5)):''; - $markRate = ($cumul_vente != 0)?(100 * round($totalMargin / $cumul_vente, 5)):''; + $marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):''; + $markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):''; } print ''; if ($id > 0) @@ -298,13 +297,13 @@ if ($result) else print ''; print $langs->trans('TotalMargin').""; - print "".price($cumul_vente)."\n"; - print "".price($cumul_achat)."\n"; - print "".price($totalMargin)."\n"; + print "".price($cumul_vente, null, null, null, null, $rounding)."\n"; + print "".price($cumul_achat, null, null, null, null, $rounding)."\n"; + print "".price($totalMargin, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print "\n"; print ""; @@ -332,9 +331,9 @@ $(document).ready(function() { $("div.fiche form").submit(); }); - $("#totalMargin").html(""); - $("#marginRate").html(""); - $("#markRate").html(""); + $("#totalMargin").html(""); + $("#marginRate").html(""); + $("#markRate").html(""); }); diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index 9b31514c7c9..214cf72b86a 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -196,13 +196,13 @@ if ($id > 0 || ! empty($ref)) if ($objp->marge < 0) { - $marginRate = ($objp->buying_price != 0)?-1*(100 * round($objp->marge / $objp->buying_price, 5)):'' ; - $markRate = ($objp->selling_price != 0)?-1*(100 * round($objp->marge / $objp->selling_price, 5)):'' ; + $marginRate = ($objp->buying_price != 0)?-1*(100 * $objp->marge / $objp->buying_price):'' ; + $markRate = ($objp->selling_price != 0)?-1*(100 * $objp->marge / $objp->selling_price):'' ; } else { - $marginRate = ($objp->buying_price != 0)?(100 * round($objp->marge / $objp->buying_price, 5)):'' ; - $markRate = ($objp->selling_price != 0)?(100 * round($objp->marge / $objp->selling_price, 5)):'' ; + $marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ; + $markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ; } print ""; @@ -215,19 +215,19 @@ if ($id > 0 || ! empty($ref)) print "".$objp->code_client."\n"; print ""; print dol_print_date($db->jdate($objp->datef),'day').""; - print "".price($objp->selling_price)."\n"; - print "".price($objp->buying_price)."\n"; - print "".price($objp->qty)."\n"; - print "".price($objp->marge)."\n"; + print "".price($objp->selling_price, null, null, null, null, $rounding)."\n"; + print "".price($objp->buying_price, null, null, null, null, $rounding)."\n"; + print "".price($objp->qty, null, null, null, null, $rounding)."\n"; + print "".price($objp->marge, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print ''.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).''; print "\n"; $i++; - $cumul_achat += round($objp->buying_price, $rounding); - $cumul_vente += round($objp->selling_price, $rounding); + $cumul_achat += $objp->buying_price; + $cumul_vente += $objp->selling_price; $cumul_qty += $objp->qty; } } @@ -237,24 +237,24 @@ if ($id > 0 || ! empty($ref)) $totalMargin = $cumul_vente - $cumul_achat; if ($totalMargin < 0) { - $marginRate = ($cumul_achat != 0)?-1*(100 * round($totalMargin / $cumul_achat, 5)):''; - $markRate = ($cumul_vente != 0)?-1*(100 * round($totalMargin / $cumul_vente, 5)):''; + $marginRate = ($cumul_achat != 0)?-1*(100 * $totalMargin / $cumul_achat):''; + $markRate = ($cumul_vente != 0)?-1*(100 * $totalMargin / $cumul_vente):''; } else { - $marginRate = ($cumul_achat != 0)?(100 * round($totalMargin / $cumul_achat, 5)):''; - $markRate = ($cumul_vente != 0)?(100 * round($totalMargin / $cumul_vente, 5)):''; + $marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):''; + $markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):''; } print ''; print ''.$langs->trans('TotalMargin').""; - print "".price($cumul_vente)."\n"; - print "".price($cumul_achat)."\n"; - print "".price($cumul_qty)."\n"; - print "".price($totalMargin)."\n"; + print "".price($cumul_vente, null, null, null, null, $rounding)."\n"; + print "".price($cumul_achat, null, null, null, null, $rounding)."\n"; + print "".price($cumul_qty, null, null, null, null, $rounding)."\n"; + print "".price($totalMargin, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print ' '; print "\n"; } @@ -278,8 +278,8 @@ $db->close(); ?> diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index aead7467f83..ad2dcbe9811 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -175,7 +175,7 @@ if ($socid > 0) $cumul_achat = 0; $cumul_vente = 0; - $cumul_qty = 0; + $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT); if ($num > 0) @@ -187,13 +187,13 @@ if ($socid > 0) if ($objp->marge < 0) { - $marginRate = ($objp->buying_price != 0)?-1*(100 * round($objp->marge / $objp->buying_price, 5)):'' ; - $markRate = ($objp->selling_price != 0)?-1*(100 * round($objp->marge / $objp->selling_price, 5)):'' ; + $marginRate = ($objp->buying_price != 0)?-1*(100 * $objp->marge / $objp->buying_price):'' ; + $markRate = ($objp->selling_price != 0)?-1*(100 * $objp->marge / $objp->selling_price):'' ; } else { - $marginRate = ($objp->buying_price != 0)?(100 * round($objp->marge / $objp->buying_price, 5)):'' ; - $markRate = ($objp->selling_price != 0)?(100 * round($objp->marge / $objp->selling_price, 5)):'' ; + $marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ; + $markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ; } $var=!$var; @@ -206,18 +206,18 @@ if ($socid > 0) print "\n"; print ""; print dol_print_date($db->jdate($objp->datef),'day').""; - print "".price($objp->selling_price)."\n"; - print "".price($objp->buying_price)."\n"; - print "".price($objp->marge)."\n"; + print "".price($objp->selling_price, null, null, null, null, $rounding)."\n"; + print "".price($objp->buying_price, null, null, null, null, $rounding)."\n"; + print "".price($objp->marge, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print ''.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).''; print "\n"; $i++; - $cumul_achat += round($objp->buying_price, $rounding); - $cumul_vente += round($objp->selling_price, $rounding); + $cumul_achat += $objp->buying_price; + $cumul_vente += $objp->selling_price; } } @@ -226,23 +226,23 @@ if ($socid > 0) $totalMargin = $cumul_vente - $cumul_achat; if ($totalMargin < 0) { - $marginRate = ($cumul_achat != 0)?-1*(100 * round($totalMargin / $cumul_achat, 5)):''; - $markRate = ($cumul_vente != 0)?-1*(100 * round($totalMargin / $cumul_vente, 5)):''; + $marginRate = ($cumul_achat != 0)?-1*(100 * $totalMargin / $cumul_achat):''; + $markRate = ($cumul_vente != 0)?-1*(100 * $totalMargin / $cumul_vente):''; } else { - $marginRate = ($cumul_achat != 0)?(100 * round($totalMargin / $cumul_achat, 5)):''; - $markRate = ($cumul_vente != 0)?(100 * round($totalMargin / $cumul_vente, 5)):''; + $marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):''; + $markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):''; } print ''; print ''.$langs->trans('TotalMargin').""; - print "".price($cumul_vente)."\n"; - print "".price($cumul_achat)."\n"; - print "".price($totalMargin)."\n"; + print "".price($cumul_vente, null, null, null, null, $rounding)."\n"; + print "".price($cumul_achat, null, null, null, null, $rounding)."\n"; + print "".price($totalMargin, null, null, null, null, $rounding)."\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print "".(($marginRate === '')?'n/a':price($marginRate)."%")."\n"; + print "".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."\n"; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print "".(($markRate === '')?'n/a':price($markRate)."%")."\n"; + print "".(($markRate === '')?'n/a':price($markRate, null, null, null, null, $rounding)."%")."\n"; print ' '; print "\n"; } From 70bbe10f9edba0ab101128dfbe87d30caad7fbee Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Thu, 31 Oct 2013 01:21:09 +0100 Subject: [PATCH 13/48] Start Task 172 --- .../install/mysql/migration/3.4.0-3.5.0.sql | 11 +++++++ .../tables/llx_actioncomm_resources.key.sql | 25 ++++++++++++++++ .../mysql/tables/llx_actioncomm_resources.sql | 30 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql create mode 100644 htdocs/install/mysql/tables/llx_actioncomm_resources.sql diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 396954347a6..e417a408d50 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -318,3 +318,14 @@ ALTER TABLE llx_societe ADD outstanding_limit double(24,8) DEFAULT NULL AFTER mo UPDATE llx_const SET name='COMPANY_DONOTSEARCH_ANYWHERE' WHERE name='SOCIETE_DONOTSEARCH_ANYWHERE'; +--Task 172 +create table llx_actioncomm_resources +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_actioncomm integer NOT NULL, + element_type varchar(50) NOT NULL, + fk_element integer NOT NULL, + fk_element_status varchar(32) NULL +) ENGINE=innodb; +ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element); +ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element); diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql new file mode 100644 index 00000000000..6d6999e7232 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql @@ -0,0 +1,25 @@ +-- ============================================================================ +-- Copyright (C) 2013 Laurent Destailleur +-- Copyright (C) 2013 Florian Henry +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================ + + +ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element); +ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element); + +-- Pas de contraite sur fk_source et fk_target car pointe sur differentes tables + diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql new file mode 100644 index 00000000000..781744e7c60 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql @@ -0,0 +1,30 @@ +-- ============================================================================ +-- Copyright (C) 2013 Laurent Destailleur +-- Copyright (C) 2013 Florian Henry +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================ +-- Table used for relations between elements of different types: +-- invoice-propal, propal-order, etc... +-- ============================================================================ + +create table llx_actioncomm_resources +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_actioncomm integer NOT NULL, + element_type varchar(50) NOT NULL, + fk_element integer NOT NULL, + fk_element_status varchar(32) NULL +) ENGINE=innodb; From c0ad86cd5c6ae6745be083caa76fd50527041cc5 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Thu, 31 Oct 2013 13:23:38 +0100 Subject: [PATCH 14/48] Add column fk_c_element_role into llx_actioncomm_ressource to manage role of linked element In this exemple we can have fk_element = 1 element_type= "user" or contact or place or whatever element fk_c_element_role = 1 // 'Guest' or Host or whatever define in dictionnary fk_c_element_status = Present // or whatever define in dictionnary according element type --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 3 ++- htdocs/install/mysql/tables/llx_actioncomm_resources.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index e417a408d50..809c1edb6a7 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -325,7 +325,8 @@ create table llx_actioncomm_resources fk_actioncomm integer NOT NULL, element_type varchar(50) NOT NULL, fk_element integer NOT NULL, - fk_element_status varchar(32) NULL + fk_c_element_role integer NOT NULL, + fk_c_element_status varchar(32) NULL ) ENGINE=innodb; ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element); ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element); diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql index 781744e7c60..e475efce388 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql @@ -26,5 +26,6 @@ create table llx_actioncomm_resources fk_actioncomm integer NOT NULL, element_type varchar(50) NOT NULL, fk_element integer NOT NULL, - fk_element_status varchar(32) NULL + fk_c_element_role integer NOT NULL, + fk_c_element_status varchar(32) NULL ) ENGINE=innodb; From d8216a09e10ef489f5f3e5c4677799ea0e1e82e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 31 Oct 2013 14:39:41 +0100 Subject: [PATCH 15/48] Fix: Try a fix to avoid error on big sql --- htdocs/compta/journal/purchasesjournal.php | 4 ++++ htdocs/compta/journal/sellsjournal.php | 3 +++ 2 files changed, 7 insertions(+) diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 06c2e20cba4..a0fe2ac79d5 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -96,6 +96,7 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); $idpays = $p[0]; + $sql = "SELECT f.rowid, f.ref_supplier, f.type, f.datef, f.libelle,"; $sql.= " fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type, fd.localtax1_tx, fd.localtax2_tx, fd.total_localtax1, fd.total_localtax2,"; $sql.= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur,"; @@ -111,6 +112,9 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.t else $sql.= " AND f.type IN (0,1,2,3)"; if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; +// TODO Find a better trick to avoid problem with some mysql installations +if (in_array($db->type, array('mysql', 'mysqli'))) $db->query('SET SQL_BIG_SELECTS=1'); + dol_syslog("sql=".$sql); $result = $db->query($sql); if ($result) diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 53ade463f15..9381ade4e0e 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -116,6 +116,9 @@ $sql.= " AND fd.product_type IN (0,1)"; if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql.= " ORDER BY f.rowid"; +// TODO Find a better trick to avoid problem with some mysql installations +if (in_array($db->type, array('mysql', 'mysqli'))) $db->query('SET SQL_BIG_SELECTS=1'); + dol_syslog("sql=".$sql); $result = $db->query($sql); if ($result) From 7db319975f554744a9daf81f6385f40e1c277705 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Fri, 1 Nov 2013 13:47:17 +0100 Subject: [PATCH 16/48] Use good icon for status caesed societe --- htdocs/societe/class/societe.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 162550a162b..9d3705a0bc6 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1518,22 +1518,22 @@ class Societe extends CommonObject } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 3) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6'); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1'); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4'); } if ($mode == 4) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 5) { - if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut6'); + if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut1'); if ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4'); } } From 60d4033e59152d84bc616aa077f78987172e8795 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Nov 2013 17:19:25 +0100 Subject: [PATCH 17/48] Fix: Option drop tables was broken --- htdocs/admin/tools/dolibarr_export.php | 4 ++-- htdocs/admin/tools/export.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 062f1aaec73..a733d3891ca 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -219,7 +219,7 @@ print $langs->trans("BackupDescY").'

';
@@ -274,7 +274,7 @@ print $langs->trans("BackupDescY").'

';
trans('ExportStructure') ?>
diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 31d4ec7ef66..8dbd7a1912e 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -134,7 +134,8 @@ if ($what == 'mysql') if (GETPOST("drop_database")) $param.=" --add-drop-database"; if (GETPOST("sql_structure")) { - if (GETPOST("drop")) $param.=" --add-drop-table"; + if (GETPOST("drop")) $param.=" --add-drop-table=TRUE"; + else $param.=" --add-drop-table=FALSE"; } else { From ecb1f490aed98b9aa9d4855cbfef97bc1dda76c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Nov 2013 17:19:25 +0100 Subject: [PATCH 18/48] Fix: Option drop tables was broken --- htdocs/admin/tools/dolibarr_export.php | 6 +++--- htdocs/admin/tools/export.php | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index a0cb8af9726..63ef6376df7 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -219,7 +219,7 @@ print $langs->trans("BackupDescY").'

';
@@ -274,7 +274,7 @@ print $langs->trans("BackupDescY").'

';
trans('ExportStructure') ?>
@@ -433,4 +433,4 @@ print '
'; llxFooter(); $db->close(); -?> \ No newline at end of file +?> diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 31d4ec7ef66..8dbd7a1912e 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -134,7 +134,8 @@ if ($what == 'mysql') if (GETPOST("drop_database")) $param.=" --add-drop-database"; if (GETPOST("sql_structure")) { - if (GETPOST("drop")) $param.=" --add-drop-table"; + if (GETPOST("drop")) $param.=" --add-drop-table=TRUE"; + else $param.=" --add-drop-table=FALSE"; } else { From 84b36d1230c986ca92bb8c0a76a2bc0150e064fc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Nov 2013 17:24:09 +0100 Subject: [PATCH 19/48] Prepare for 3.4.2 --- ChangeLog | 3 ++- build/debian/changelog | 2 +- build/exe/doliwamp/doliwamp.iss | 4 ++-- build/makepack-dolibarr.pl | 2 +- build/rpm/dolibarr_fedora.spec | 2 +- build/rpm/dolibarr_generic.spec | 2 +- build/rpm/dolibarr_mandriva.spec | 2 +- build/rpm/dolibarr_opensuse.spec | 2 +- htdocs/filefunc.inc.php | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac0f5d5e9c3..763e3369203 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,8 @@ English Dolibarr ChangeLog -------------------------------------------------------------- ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** -Fix: Bad rounding on margin calculations and display +Fix: Bad rounding on margin calculations and display. +Fix: Option drpo table into backup was broken. ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** Fix: Display buying price on line edit when no supplier price is defined diff --git a/build/debian/changelog b/build/debian/changelog index 11706ff7ff3..f8cca0e8e41 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,4 +1,4 @@ -dolibarr (3.4.1) unstable; urgency=low +dolibarr (3.4.2) unstable; urgency=low [ Laurent Destailleur (eldy) ] * New upstream release. diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 0f3391a9110..98bfeee9109 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -17,9 +17,9 @@ ; ----- Change this ----- AppName=DoliWamp ; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x -AppVerName=DoliWamp-3.4.1 +AppVerName=DoliWamp-3.4.2 ; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x -OutputBaseFilename=DoliWamp-3.4.1 +OutputBaseFilename=DoliWamp-3.4.2 ; Define full path from wich all relative path are defined ; You must modify this to put here your dolibarr root directory ;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 2da866d221a..05eef72a978 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -10,7 +10,7 @@ use Cwd; $PROJECT="dolibarr"; $MAJOR="3"; $MINOR="4"; -$BUILD="1"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate +$BUILD="2"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate $RPMSUBVERSION="auto"; # auto use value found into BUILD @LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 60756c8beb6..eb7c7305b11 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -330,5 +330,5 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Sun Feb 17 2013 Laurent Destailleur 3.4.1-0.3 +* Sun Feb 17 2013 Laurent Destailleur 3.4.2-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index c5feb63aba4..4bc22491755 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -558,5 +558,5 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Sun Feb 17 2013 Laurent Destailleur 3.4.1-0.3 +* Sun Feb 17 2013 Laurent Destailleur 3.4.2-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 6a9e1dd47d7..98ef5fa1b44 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -335,5 +335,5 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Sun Feb 17 2013 Laurent Destailleur 3.4.1-0.3 +* Sun Feb 17 2013 Laurent Destailleur 3.4.2-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 3b41058c416..1734ad6a4e3 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -345,5 +345,5 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Sun Feb 17 2013 Laurent Destailleur 3.4.1-0.3 +* Sun Feb 17 2013 Laurent Destailleur 3.4.2-0.3 - Initial version (#723326) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 3be6cadc9ce..65895a28035 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -29,7 +29,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.4.1'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.4.2'); if (! defined('EURO')) define('EURO',chr(128)); // Define syslog constants From f8e3a3e38a730b3c543934b36911e7591c06f9c4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Nov 2013 17:36:22 +0100 Subject: [PATCH 20/48] Fix: Sub level of dir must not always be visible. So I added parameter "showrelpart". Default value is old behaviour (only filenmae is visible). --- htdocs/core/class/html.formfile.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index cb8dace1734..92120f1f8bb 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -138,17 +138,17 @@ class FormFile $out .= ' ('.$langs->trans("UploadDisabled").')'; } $out .= ""; - + if ($savingdocmask) { $out .= ''; if (! empty($options)) $out .= ''.$options.''; $out .= ''; - $out .= ' '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/',$langs->transnoentitiesnoconv("OriginFileName"),$savingdocmask), $langs->transnoentitiesnoconv("OriginFileName")); + $out .= ' '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/',$langs->transnoentitiesnoconv("OriginFileName"),$savingdocmask), $langs->transnoentitiesnoconv("OriginFileName")); $out .= ''; - $out .= ''; + $out .= ''; } - + $out .= ""; $out .= ''; @@ -663,12 +663,13 @@ class FormFile * @param int $permtodelete Permission to delete * @param int $useinecm Change output for use in ecm module * @param string $textifempty Text to show if filearray is empty ('NoFileFound' if not defined) - * @param int $maxlength Maximum length of file name shown + * @param int $maxlength Maximum length of file name shown * @param string $title Title before list * @param string $url Full url to use for click links ('' = autodetect) + * @param int $showrelpart 0=Show only filename (default), 1=Show first level 1 dir * @return int <0 if KO, nb of files shown if OK */ - function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='') + function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0) { global $user, $conf, $langs, $hookmanager; global $bc; @@ -741,8 +742,7 @@ class FormFile print '&file='.$filepath.'">'; print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' '; - if ($file['level1name'] <> $object->id) - print $file['level1name'].'/'; + if ($showrelpart == 1) print $file['level1name'].'/'; print dol_trunc($file['name'],$maxlength,'middle'); print ''; print "\n"; From 48c8b470af2456cf6513fccbaefcc5524e46db80 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Fri, 1 Nov 2013 18:59:00 +0100 Subject: [PATCH 21/48] Add hook into product/document.php --- htdocs/product/document.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 0adff43ac47..0ba03e0c7c0 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -4,6 +4,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2005 Simon TOSSER + * Copyright (C) 2013 Florian Henry * * 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 @@ -46,6 +47,9 @@ $fieldtype = (! empty($ref) ? 'ref' : 'rowid'); if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype); +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('productdocuments')); + // Get parameters $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -68,6 +72,10 @@ if ($id > 0 || ! empty($ref)) } $modulepart='produit'; +$parameters=array('id'=>$id); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks + + /* * Action envoie fichier */ @@ -106,6 +114,8 @@ if ($object->id) $picto=($object->type==1?'service':'product'); dol_fiche_head($head, 'documents', $titre, 0, $picto); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook + // Construit liste des fichiers $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); From 11d2af0f7e5a58ed86b18b9990fe0ec2b1336d77 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Fri, 1 Nov 2013 23:20:10 +0100 Subject: [PATCH 22/48] Fix hook object call --- htdocs/product/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 0ba03e0c7c0..22de2273820 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -73,7 +73,7 @@ if ($id > 0 || ! empty($ref)) $modulepart='produit'; $parameters=array('id'=>$id); -$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks /* @@ -114,7 +114,7 @@ if ($object->id) $picto=($object->type==1?'service':'product'); dol_fiche_head($head, 'documents', $titre, 0, $picto); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook // Construit liste des fichiers From f727e832d93d1b515870c216db4aa538b7a8d0c7 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sat, 2 Nov 2013 02:25:06 +0100 Subject: [PATCH 23/48] Add mandatory and transparent into llx_actioncomm_ressource --- htdocs/install/mysql/tables/llx_actioncomm_resources.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql index e475efce388..7810c500723 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql @@ -27,5 +27,7 @@ create table llx_actioncomm_resources element_type varchar(50) NOT NULL, fk_element integer NOT NULL, fk_c_element_role integer NOT NULL, - fk_c_element_status varchar(32) NULL + fk_c_element_status varchar(32) NULL, + mandatory smallint, + transparent smallint ) ENGINE=innodb; From b52b49cbb0dcf0b5f45ffb3d2bce47f1219d760a Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sat, 2 Nov 2013 02:42:44 +0100 Subject: [PATCH 24/48] USe good icons for customer status --- htdocs/societe/class/societe.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9d3705a0bc6..96863a078d8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1518,22 +1518,22 @@ class Societe extends CommonObject } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 3) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1'); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8'); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4'); } if ($mode == 4) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 5) { - if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut1'); + if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut8'); if ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4'); } } From a9dd9d6dfcf6ede725531a678c46dbdd7dd442d4 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 3 Nov 2013 15:07:26 +0100 Subject: [PATCH 25/48] Modify the presentation of the card --- htdocs/compta/sociales/charges.php | 38 ++++++++++++++---------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 2ec6539db9e..adc5fb8ae74 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -297,20 +297,7 @@ if ($id > 0) } // Type - print "".$langs->trans("Type")."".$object->type_libelle."".$langs->trans("Payments").""; - - // Period end date - print "".$langs->trans("PeriodEndDate").""; - print ""; - if ($action == 'edit') - { - print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); - } - else - { - print dol_print_date($object->periode,"day"); - } - print ""; + print "".$langs->trans("Type")."".$object->type_libelle.""; $rowspan=5; print ''; @@ -337,8 +324,8 @@ if ($id > 0) $i = 0; $total = 0; echo ''; print ''; - print ''; - print ''; + print ''; + print ''; $var=True; while ($i < $num) @@ -349,12 +336,12 @@ if ($id > 0) print ''.img_object($langs->trans("Payment"),"payment").' '; print dol_print_date($db->jdate($objp->dp),'day')."\n"; print "\n"; - print '\n"; + print '\n"; print ""; $totalpaye += $objp->amount; $i++; } - + if ($object->paye == 0) { print "\n"; @@ -376,6 +363,19 @@ if ($id > 0) print ""; + // Period end date + print ""; + print ""; + // Due date if ($action == 'edit') { @@ -393,8 +393,6 @@ if ($id > 0) // Status print ''; - print ''; - print '
'.$langs->trans("Date").''.$langs->trans("Type").''.$langs->trans("Amount").' 
'.$langs->trans("Payments").''.$langs->trans("Type").''.$langs->trans("Amount").' 
".$objp->paiement_type.' '.$objp->num_paiement."'.price($objp->amount)." ".$langs->trans("Currency".$conf->currency)."'.price($objp->amount)." ".$langs->trans("Currency".$conf->currency)."
".$langs->trans("AlreadyPaid")." :".price($totalpaye)." ".$langs->trans("Currency".$conf->currency)."
".$langs->trans("PeriodEndDate").""; + if ($action == 'edit') + { + print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); + } + else + { + print dol_print_date($object->periode,"day"); + } + print "
'.$langs->trans("Status").''.$object->getLibStatut(4).'
 
'; if ($action == 'edit') From e5fd19ffc005b1a935017028eb801e8283b96dbd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Nov 2013 10:45:43 +0100 Subject: [PATCH 26/48] Add option to salt hash passwords --- htdocs/core/lib/security.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 58bd4371b4c..e21d9c749a1 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -77,9 +77,11 @@ function dol_decode($chain) */ function dol_hash($chain,$type=0) { + global $conf; + if ($type == 1) return sha1($chain); else if ($type == 2) return sha1(md5($chain)); - else return md5($chain); + else return md5((empty($conf->global->MAIN_SECURITY_SALT)?'':$conf->global->MAIN_SECURITY_SALT).$chain); } From 32983b79eebaff8250db543ba5e665609f58b4d4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Nov 2013 10:47:24 +0100 Subject: [PATCH 27/48] Sec: Add option to salt password --- htdocs/core/lib/security.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index e21d9c749a1..150a3bd3feb 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -79,9 +79,12 @@ function dol_hash($chain,$type=0) { global $conf; + // Salt value + if (! empty($conf->global->MAIN_SECURITY_SALT)) $chain=$conf->global->MAIN_SECURITY_SALT.$chain; + if ($type == 1) return sha1($chain); else if ($type == 2) return sha1(md5($chain)); - else return md5((empty($conf->global->MAIN_SECURITY_SALT)?'':$conf->global->MAIN_SECURITY_SALT).$chain); + else return md5($chain); } From 8f43b2f2c0ebbc3a963836cee47d7746a96cf85a Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Mon, 4 Nov 2013 14:11:33 +0100 Subject: [PATCH 28/48] language --- ChangeLog | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba614a9cf9a..72a1ecf49ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ English Dolibarr ChangeLog -------------------------------------------------------------- ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** Fix: Bad rounding on margin calculations and display. -Fix: Option drpo table into backup was broken. +Fix: Option drop table into backup was broken. ***** ChangeLog for 3.5 compared to 3.4.* ***** For users: @@ -11,7 +11,7 @@ For users: - New: More options to select status of users into select user list. - New: [ task #862 ] Add ODT on shipments. - New: [ task #149 ] Add # of notes and attachments in tabs. -- New: Can edit customer ref at eny time. +- New: Can edit customer ref at any time. - New: [ task #877 ] Reorganize menus. - New: [ task #858 ] Holiday module: note on manual holiday assignation. - New: [ task #892 ] Add hidden option in thirdparty customer/supplier module to hide non active @@ -21,10 +21,10 @@ For users: - New: Add script export-bank-receipts.php - New: Add option "filter=bank" onto script rebuild_merge_pdf.php to merge PDF that has one payment on a specific bank account.* -- New: [ task #901 ] Add Extrafeild on Fiche Inter. +- New: [ task #901 ] Add Extrafield on Fiche Inter. - New: Show process id in all command line scripts. - New: Module mailman can subscribe/unsubscribe to ML according to categories or type of member. -- New: Add object_hour and object_date_rfc as substitution tag for opendocument generation. +- New: Add object_hour and object_date_rfc as substitution tag for open document generation. - New: Add options to send an email when paypal or paybox payment is done. - New: Clone product/service composition. - New: [ task #926 ] Add extrafield feature on order lines. @@ -34,17 +34,17 @@ For users: - New: Add a cron module to define scheduled jobs. - New: Add new graphical boxes (customer and supplier invoices and orders per month). - New: [ task #286 ] Enhance rounding function of prices to allow round of sum instead of sum of rounding. -- New: Can add an event automatically when a projet is create. +- New: Can add an event automatically when a project is create. - New: Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE. - New: Add option excludethirdparties and onlythirdparties into merge pdf scripts. - New: [ task #925 ] Add ODT document generation for Tasks in project module. - New: [ task #924 ] Add numbering rule on task. - New: [ task #165 ] Add import/export of multiprices. - New: Add Maghreb regions and departments. -- New: A more responsive desgin for statistic box of home page. +- New: A more responsive design for statistic box of home page. - New: [ task #1005 ] Adapting to Spanish legislation bill numbering - New: [ task #1011 ] Now supplier order and invoice deal with payment terms and mode. -- New: [ task #1014 ] Add option to recursivly add parent category. +- New: [ task #1014 ] Add option to recursively add parent category. - New: [ task #1016 ] Can define a specific numbering for deposits. - New: [ task #918 ] Stock replenishment. - New : Add pdf link into supplier invoice list and supplier order list. @@ -61,7 +61,7 @@ For users: - New: Add hidden option MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS. - New: Can send an email from thirdparty card. - New: Can cancel holidays that were previously validated. -- New: Can choose contact on event (action com) creation, and filtred by thirdparty. +- New: Can choose contact on event (action com) creation, and filtered by thirdparty. - New: Add hidden option MAIN_FORCE_DEFAULT_STATE_ID. - New: Add page to make mass stock movement. - New: Add field oustanding limit into thirdparty properties. @@ -74,8 +74,8 @@ For users: - Fix: Better management of using ajax for upload form (to solve problem when enabling ajax jquery multifile upload in some cases). For translators: -- Qual: Normalized sort order of all languages files with english reference files. -- New: Add language code files for South Africa, France new caledonia, Vietnam. +- Qual: Normalized sort order of all languages files with English reference files. +- New: Add language code files for South Africa, France new Caledonia, Vietnam. - New: Translate string for email to change password. For developers: @@ -93,14 +93,14 @@ For developers: key to use a specific language file. - New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables. - Qual: All nowrap properties are now using CSS class nowrap. -- Qual: Move hardcoded code of module mailmanspip into trigger. -- New: Into POST forms, if you can add a parameter DOL_AUTOSET_COOKIE with a vlue that is list name, +- Qual: Move hard coded code of module mailmanspip into trigger. +- New: Into POST forms, if you can add a parameter DOL_AUTOSET_COOKIE with a value that is list name, separated by a coma, of other POST parameters, Dolibarr will automatically save this parameters into user cookies. - New: Add hook addHomeSetup. - New: Add trigger CATEGORY_LINK and CATEGORY_UNLINK. - New: A trigger can return an array of error strings instead of one error string. -- New: Add method to use a dictionnary as a combo box. +- New: Add method to use a dictionary as a combo box. - New: Add update method for web service product. - Fix also several bugs with old code. @@ -116,11 +116,11 @@ be replaced by a "return 0"; Goal is to fix old compatibility code that does not match hook specifications: http://wiki.dolibarr.org/index.php/Hooks_system -2) If you implemented hook printTopRightMenu, check that output does not include '' tags anymore. +2) If you implemented hook printTopRightMenu, check that output does not include '' tags any more. All content added must be tagged by a '
' with css class="login_block_elem" 3) Some methods object->addline used a first parameter that was object->id, some not. Of course -this was not a good pratice, since object->id is already known, there is no need to provide id as +this was not a good practice, since object->id is already known, there is no need to provide id as parameter. All methods addline in this case were modified to remove this parameter. 4) Method ->classer_facturee() is deprecated. It must be replace with ->classifyBilled(). @@ -135,18 +135,18 @@ Fix: Reordering supplier products in list by supplier or supplier ref was crashi Fix: [ bug #1029 ] Tulip numbering mask Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card Fix: [ bug #1033 ] SUPPLIER REF disappeared -Fix: update extrafield do not display immediatly after update +Fix: update extrafield do not display immediately after update Fix: Fix bug with canvas thirdparty Fix: [ bug #1037 ] Consumption> Supplier invoices related Fix: User group name do not display in card (view or edit mode) -Fix: Link "Show all supplier invoice" on suplier card not working +Fix: Link "Show all supplier invoice" on supplier card not working Fix: [ bug #1039 ] Pre-defined invoices conversion Fix: If only service module is activated, it's impossible to delete service Fix: [ bug #1043 ] Bad interventions ref numbering Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted Fix: Localtaxes balance not showing Fix: Intervention box links to contracts id -Fix: Compatiblity with multicompany module +Fix: Compatibility with multicompany module Fix: Edit propal line was losing product supplier price id Fix: Delete linked element to supplier invoice when deleted Fix: [ bug #1061 ] Bad info shipped products From fd168c1214b92cf079a596e543c92c09846fc7dc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Nov 2013 15:04:04 +0100 Subject: [PATCH 29/48] Doc comments --- htdocs/core/tpl/login.tpl.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index ebc6fea7626..b62ad5890be 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -25,8 +25,9 @@ if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen=1; if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1; if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1; -$arrayofjs=array('/core/js/dst.js'); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second -print top_htmlhead('',$langs->trans('Login').' '.$title,0,0,$arrayofjs); +$arrayofjs=array('/core/js/dst.js'); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second +$titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php +print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs); ?> From 5e246107a7904aa0701170fa04bb46ff7d5129e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Nov 2013 16:31:12 +0100 Subject: [PATCH 30/48] Doxygen --- htdocs/compta/facture/class/facture.class.php | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index ed7d06919ec..461b3606cd6 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1,37 +1,37 @@ - * Copyright (C) 2004-2012 Laurent Destailleur -* Copyright (C) 2004 Sebastien Di Cintio -* Copyright (C) 2004 Benoit Mortier -* Copyright (C) 2005 Marc Barilley / Ocebo -* Copyright (C) 2005-2013 Regis Houssin -* Copyright (C) 2006 Andre Cianfarani -* Copyright (C) 2007 Franky Van Liedekerke -* Copyright (C) 2010-2013 Juanjo Menent -* Copyright (C) 2012 Christophe Battarel -* Copyright (C) 2012 Marcos García -* Copyright (C) 2013 Cedric Gross -* Copyright (C) 2013 Florian Henry -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2007 Franky Van Liedekerke + * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2012 Marcos García + * Copyright (C) 2013 Cedric Gross + * Copyright (C) 2013 Florian Henry + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/compta/facture/class/facture.class.php -* \ingroup facture -* \brief File of class to manage invoices -*/ + * \ingroup facture + * \brief File of class to manage invoices + */ include_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php'; require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php'; From c815bd96fbae14c064199252c017c85711544ed6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Nov 2013 16:50:41 +0100 Subject: [PATCH 31/48] Doxygen --- htdocs/core/class/commonobject.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 86f4904be68..b3e5f8f47d8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2048,6 +2048,7 @@ abstract class CommonObject /** * Function to get extra fields of a member into $this->array_options + * This method is in most cases called by method fetch of objects but you can call it separately. * * @param int $rowid Id of line * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label() From a57afb6d4052725536089d3f3ef9df9cc9aae7a3 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Mon, 4 Nov 2013 19:21:13 +0100 Subject: [PATCH 32/48] [ task #1127 ] Add feature filter on extrafield type : select for table --- htdocs/core/actions_extrafields.inc.php | 40 +++++++++++++++++++------ htdocs/core/class/extrafields.class.php | 24 +++++++++++++-- htdocs/langs/en_US/admin.lang | 2 +- htdocs/langs/fr_FR/admin.lang | 2 +- 4 files changed, 54 insertions(+), 14 deletions(-) diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index 4861ee6b856..74bf7c40ad8 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -87,7 +87,7 @@ if ($action == 'add') $mesg[]=$langs->trans("ErrorNoValueForRadioType"); $action = 'create'; } - if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox') || (GETPOST('type')=='radio')) && GETPOST('param')) + if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox')) && GETPOST('param')) { // Construct array for parameter (value of select list) $parameters = GETPOST('param'); @@ -124,11 +124,22 @@ if ($action == 'add') $default_value = GETPOST('default_value'); $parameters = GETPOST('param'); $parameters_array = explode("\r\n",$parameters); - foreach($parameters_array as $param_ligne) + //In sellist we have only one line and it can have come to do SQL expression + if (GETPOST('type')=='sellist') { + foreach($parameters_array as $param_ligne) + { + $params['options'] = array($parameters=>null); + } + } + else { - list($key,$value) = explode(',',$param_ligne); - $params['options'][$key] = $value; - } + //Esle it's separated key/value and coma list + foreach($parameters_array as $param_ligne) + { + list($key,$value) = explode(',',$param_ligne); + $params['options'][$key] = $value; + } + } $result=$extrafields->addExtraField($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['pos'],$extrasize,$elementtype,(GETPOST('unique')?1:0),(GETPOST('required')?1:0),$default_value,$params); if ($result > 0) @@ -215,7 +226,7 @@ if ($action == 'update') $mesg[]=$langs->trans("ErrorNoValueForRadioType"); $action = 'edit'; } - if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox') || (GETPOST('type')=='radio')) && GETPOST('param')) + if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox')) && GETPOST('param')) { // Construct array for parameter (value of select list) $parameters = GETPOST('param'); @@ -251,10 +262,21 @@ if ($action == 'update') // Construct array for parameter (value of select list) $parameters = GETPOST('param'); $parameters_array = explode("\r\n",$parameters); - foreach($parameters_array as $param_ligne) + //In sellist we have only one line and it can have come to do SQL expression + if (GETPOST('type')=='sellist') { + foreach($parameters_array as $param_ligne) + { + $params['options'] = array($parameters=>null); + } + } + else { - list($key,$value) = explode(',',$param_ligne); - $params['options'][$key] = $value; + //Esle it's separated key/value and coma list + foreach($parameters_array as $param_ligne) + { + list($key,$value) = explode(',',$param_ligne); + $params['options'][$key] = $value; + } } $result=$extrafields->update($_POST['attrname'],$_POST['label'],$_POST['type'],$extrasize,$elementtype,(GETPOST('unique')?1:0),(GETPOST('required')?1:0),$pos,$params); if ($result > 0) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index f4271d05070..c651603451d 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -693,15 +693,23 @@ class ExtraFields // 1 2 : label field name Nom du champ contenant le libelle // 2 3 : key fields name (if differ of rowid) // 3 4 : key field parent (for dependent lists) + // 4 5 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value + $keyList='rowid'; - if (count($InfoFieldList)>=3) - $keyList=$InfoFieldList[2].' as rowid'; - if (count($InfoFieldList)>=4) { + if (count($InfoFieldList)>=3) { list($parentName, $parentField) = explode('|', $InfoFieldList[3]); $keyList.= ', '.$parentField; } + if (count($InfoFieldList)>=4 && !empty($InfoFieldList[4])) { + if (strpos($InfoFieldList[4], 'extra')!==false) { + $keyList='main.'.$InfoFieldList[2].' as rowid'; + }else { + $keyList=$InfoFieldList[2].' as rowid'; + } + } + $fields_label = explode('|',$InfoFieldList[1]); if(is_array($fields_label)) { @@ -717,6 +725,16 @@ class ExtraFields $sql = 'SELECT '.$keyList; $sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0]; + if (!empty($InfoFieldList[4])) { + + //We have to join on extrafield table + if (strpos($InfoFieldList[4], 'extra')!==false) { + $sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra'; + $sql.= ' WHERE extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4]; + }else { + $sql.= ' WHERE '.$InfoFieldList[4]; + } + } //$sql.= ' WHERE entity = '.$conf->entity; //print $sql; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 3aaba60e9e0..8e73c2fe560 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -368,7 +368,7 @@ ExtrafieldRadio=Radio button ExtrafieldParamHelpselect=Parameters list have to be like key,value

for exemple :
1,value1
2,value2
3,value3
...

In order to have the list depending on another :
1,value1|parent_list_code:parent_key
2,value2|parent_list_code:parent_key ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value

for exemple :
1,value1
2,value2
3,value3
... ExtrafieldParamHelpradio=Parameters list have to be like key,value

for exemple :
1,value1
2,value2
3,value3
... -ExtrafieldParamHelpsellist=Parameters list have come from table

for exemple :
c_typent:libelle:id

In order to have the list depending on another :
c_typent:libelle:id:parent_list_code|parent_column +ExtrafieldParamHelpsellist=Parameters list have come from table

for exemple :
c_typent:libelle:id::filter

In order to have the list depending on another :
c_typent:libelle:id:parent_list_code|parent_column:filter
filter can be a simple test (eg active=1) to display only active value
if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield) LibraryToBuildPDF=Library used to build PDF WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir' LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:
1 : local tax apply on products and services without vat (vat is not applied on local tax)
2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)
3 : local tax apply on products without vat (vat is not applied on local tax)
4 : local tax apply on products before vat (vat is calculated on amount + localtax)
5 : local tax apply on services without vat (vat is not applied on local tax)
6 : local tax apply on services before vat (vat is calculated on amount + localtax) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 1c27019bce1..58df5bf983b 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -368,7 +368,7 @@ ExtrafieldRadio=Bouton radio ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur

par exemple :
1,valeur1
2,valeur2
3,valeur3
...

Pour que la liste soit dépendante d'une autre :
1,valeur1|code_liste_parent:clef_parent
2,valeur2|code_liste_parent:clef_parent ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur

par exemple :
1,valeur1
2,valeur2
3,valeur3
... ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur

par exemple :
1,valeur1
2,valeur2
3,valeur3
... -ExtrafieldParamHelpsellist=La liste vient d'une table

par exemple :
c_typent:libelle:id

Pour que la liste soit dépendante d'une autre :
c_typent:libelle:id:code_liste_parent|colonne_parent +ExtrafieldParamHelpsellist=La liste vient d'une table

par exemple :
c_typent:libelle:id::filter

Pour que la liste soit dépendante d'une autre :
c_typent:libelle:id:code_liste_parent|colonne_parent:filter
filter peux être un test simple active=1 pour ne proposer que les valeur active
si vous voulez faire un filtre sur des attributs supplémentaires utiliser la syntax extra.champ=...(où champ est la code de l'attribut supplémentaire) LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF WarningUsingFPDF=Attention : votre fichier conf.php contient la directive dolibarr_pdf_force_fpdf=1. Cela signifie que vous utilisez la librairie FPDF pour générer vos fichiers PDF. Cette librairie est ancienne et ne couvre pas de nombreuses fonctionnalités (Unicode, transparence des images, langues cyrilliques, arabes ou asiatiques...), aussi vous pouvez rencontrer des problèmes durant la génération des PDF.
Pour résoudre cela et avoir une prise en charge complète de PDF, vous pouvez télécharger la bibliothèque TCPDF puis commenter ou supprimer la ligne $dolibarr_pdf_force_fpdf=1, et ajouter à la place $dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF' LocalTaxDesc=Certains pays appliquent 2 voire 3 taux sur chaque ligne de facture. Si c'est le cas, choisissez le type du deuxième et troisième taux et sa valeur. Les types possibles sont:
1 : taxe locale sur les produits et services hors tva (la tva n'est pas appliquée sur la taxe locale)
2 : taxe locale sur les produits et services avant tva (la tva est appliquée sur le montant + la taxe locale)
3 : taxe locale uniquement sur les produits hors tva (la tva n'est pas appliquée sur la taxe locale)
4 : taxe locale uniquement sur les produits avant tva (la tva est appliquée sur le montant + la taxe locale)
5 : taxe locale uniquement sur les services hors tva (la tva n'est pas appliquée sur la taxe locale)
6 : taxe locale uniquement sur les service avant tva (la tva est appliquée sur le montant + la taxe locale) From c465cc621da05487aaa672017d4b53b15bb81c03 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Mon, 4 Nov 2013 19:27:59 +0100 Subject: [PATCH 33/48] Fix actioncomm_ressource column name --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 5 +++-- htdocs/install/mysql/tables/llx_actioncomm_resources.sql | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 809c1edb6a7..75614321fbc 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -325,8 +325,9 @@ create table llx_actioncomm_resources fk_actioncomm integer NOT NULL, element_type varchar(50) NOT NULL, fk_element integer NOT NULL, - fk_c_element_role integer NOT NULL, - fk_c_element_status varchar(32) NULL + answer_status varchar(50) NULL, + mandatory smallint, + transparent smallint ) ENGINE=innodb; ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element); ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element); diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql index 7810c500723..bd48ad4f66d 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql @@ -26,8 +26,7 @@ create table llx_actioncomm_resources fk_actioncomm integer NOT NULL, element_type varchar(50) NOT NULL, fk_element integer NOT NULL, - fk_c_element_role integer NOT NULL, - fk_c_element_status varchar(32) NULL, + answer_status varchar(50) NULL, mandatory smallint, transparent smallint ) ENGINE=innodb; From d79ba9695adbdffe7720579817ec2893d1310bba Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 4 Nov 2013 21:41:36 +0100 Subject: [PATCH 34/48] Task 157 : Add a skype button --- htdocs/adherents/class/adherent.class.php | 9 +- htdocs/adherents/fiche.php | 17 +++ htdocs/admin/ldap_contacts.php | 9 ++ htdocs/admin/ldap_members.php | 9 ++ htdocs/admin/ldap_users.php | 10 ++ htdocs/comm/fiche.php | 7 + htdocs/contact/class/contact.class.php | 11 +- htdocs/contact/fiche.php | 29 +++- htdocs/contact/list.php | 20 ++- htdocs/core/class/commonobject.class.php | 5 +- htdocs/core/class/ldap.class.php | 5 +- htdocs/core/lib/company.lib.php | 13 +- htdocs/core/lib/functions.lib.php | 43 ++++++ htdocs/core/modules/modSkype.class.php | 136 ++++++++++++++++++ .../install/mysql/migration/3.4.0-3.5.0.sql | 6 + htdocs/install/mysql/tables/llx_adherent.sql | 1 + htdocs/install/mysql/tables/llx_societe.sql | 1 + htdocs/install/mysql/tables/llx_socpeople.sql | 1 + htdocs/install/mysql/tables/llx_user.sql | 1 + htdocs/langs/en_US/companies.lang | 2 + htdocs/societe/class/societe.class.php | 10 +- htdocs/societe/soc.php | 40 +++++- htdocs/theme/amarok/img/object_skype.png | Bin 0 -> 3451 bytes htdocs/theme/auguria/img/object_skype.png | Bin 0 -> 3451 bytes htdocs/theme/bureau2crea/img/object_skype.png | Bin 0 -> 3451 bytes htdocs/theme/cameleo/img/object_skype.png | Bin 0 -> 3451 bytes htdocs/theme/eldy/img/object_skype.png | Bin 0 -> 3451 bytes 27 files changed, 362 insertions(+), 23 deletions(-) create mode 100644 htdocs/core/modules/modSkype.class.php create mode 100644 htdocs/theme/amarok/img/object_skype.png create mode 100644 htdocs/theme/auguria/img/object_skype.png create mode 100644 htdocs/theme/bureau2crea/img/object_skype.png create mode 100644 htdocs/theme/cameleo/img/object_skype.png create mode 100644 htdocs/theme/eldy/img/object_skype.png diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 255eb1533d9..f12a1b47fee 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -65,6 +65,7 @@ class Adherent extends CommonObject var $country; var $email; + var $skype; var $phone; var $phone_perso; var $phone_mobile; @@ -430,6 +431,7 @@ class Adherent extends CommonObject $sql.= ", country=".($this->country_id>0?"'".$this->country_id."'":"null"); $sql.= ", state_id=".($this->state_id>0?"'".$this->state_id."'":"null"); $sql.= ", email='".$this->email."'"; + $sql.= ", skype='".$this->skype."'"; $sql.= ", phone=" .($this->phone?"'".$this->db->escape($this->phone)."'":"null"); $sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null"); $sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null"); @@ -526,6 +528,7 @@ class Adherent extends CommonObject $luser->societe_id=$this->societe; $luser->email=$this->email; + $luser->skype=$this->skype; $luser->office_phone=$this->phone; $luser->user_mobile=$this->phone_mobile; @@ -564,6 +567,7 @@ class Adherent extends CommonObject $lthirdparty->zip=$this->zip; $lthirdparty->town=$this->town; $lthirdparty->email=$this->email; + $lthirdparty->skype=$this->skype; $lthirdparty->phone=$this->phone; $lthirdparty->state_id=$this->state_id; $lthirdparty->country_id=$this->country_id; @@ -1047,7 +1051,7 @@ class Adherent extends CommonObject global $langs; $sql = "SELECT d.rowid, d.ref_ext, d.civilite, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,"; - $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; + $sql.= " d.email, d.skype, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; $sql.= " d.tms as datem,"; @@ -1115,6 +1119,7 @@ class Adherent extends CommonObject $this->phone_perso = $obj->phone_perso; $this->phone_mobile = $obj->phone_mobile; $this->email = $obj->email; + $this->skype = $obj->skype; $this->photo = $obj->photo; $this->statut = $obj->statut; @@ -1782,6 +1787,7 @@ class Adherent extends CommonObject $this->country = 'France'; $this->morphy = 1; $this->email = 'specimen@specimen.com'; + $this->skype = 'tom.hanson'; $this->phone = '0999999999'; $this->phone_perso = '0999999998'; $this->phone_mobile = '0999999997'; @@ -1853,6 +1859,7 @@ class Adherent extends CommonObject if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town; if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code; if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email; + if ($this->skype && ! empty($conf->global->LDAP_MEMBER_FIELD_SKYPE)) $info[$conf->global->LDAP_MEMBER_FIELD_SKYPE] = $this->skype; if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone; if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso; if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 251eb062b15..d019e4004d8 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -285,6 +285,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->phone_perso = trim($_POST["phone_perso"]); $object->phone_mobile= trim($_POST["phone_mobile"]); $object->email = trim($_POST["email"]); + $object->skype = trim($_POST["skype"]); $object->birth = $birthdate; $object->typeid = $_POST["typeid"]; @@ -413,6 +414,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $phone=$_POST["phone"]; $phone_perso=$_POST["phone_perso"]; $phone_mobile=$_POST["phone_mobile"]; + $skype=$_POST["member_skype"]; $email=$_POST["member_email"]; $login=$_POST["member_login"]; $pass=$_POST["password"]; @@ -437,6 +439,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->phone = $phone; $object->phone_perso = $phone_perso; $object->phone_mobile= $phone_mobile; + $object->skype = $skype; $object->email = $email; $object->login = $login; $object->pass = $pass; @@ -844,6 +847,12 @@ else // Tel mobile print ''.$langs->trans("PhoneMobile").''; + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").''; + } + // Birthday print "".$langs->trans("Birthday")."\n"; $form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc'); @@ -1080,6 +1089,11 @@ else // Tel mobile print ''.$langs->trans("PhoneMobile").'phone_mobile).'">'; + // Skype + if (! empty($conf->skype->enabled)) { + print ''.$langs->trans("Skype").'skype).'">'; + } + // Birthday print "".$langs->trans("Birthday")."\n"; $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); @@ -1398,6 +1412,9 @@ else // Tel mobile print ''.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).''; + // Skype + print ''.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).''; + // Birthday print ''.$langs->trans("Birthday").''.dol_print_date($object->birth,'day').''; diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 8406bef31a9..a25fe2c13c7 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -61,6 +61,7 @@ if ($action == 'setvalue' && $user->admin) if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_PHONE',GETPOST("fieldphone"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_HOMEPHONE',GETPOST("fieldhomephone"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_MOBILE',GETPOST("fieldmobile"),'chaine',0,'',$conf->entity)) $error++; + if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_SKYPE',GETPOST("fieldskype"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_FAX',GETPOST("fieldfax"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ADDRESS',GETPOST("fieldaddress"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ZIP',GETPOST("fieldzip"),'chaine',0,'',$conf->entity)) $error++; @@ -214,6 +215,14 @@ print ''.$langs->trans("LDAPFieldMobileExample").''; print 'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_MOBILE?' checked="checked"':'').">"; print ''; +// Skype +$var=!$var; +print ''.$langs->trans("LDAPFieldSkype").''; +print ''; +print ''.$langs->trans("LDAPFieldSkypeExample").''; +print 'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_SKYPE?' checked="checked"':'').">"; +print ''; + // Fax $var=!$var; print ''.$langs->trans("LDAPFieldFax").''; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 39847fc3025..f437163b22f 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -65,6 +65,7 @@ if ($action == 'setvalue' && $user->admin) if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE',GETPOST("fieldphone"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE_PERSO',GETPOST("fieldphoneperso"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MOBILE',GETPOST("fieldmobile"),'chaine',0,'',$conf->entity)) $error++; + if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_SKYPE',GETPOST("fieldskype"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FAX',GETPOST("fieldfax"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ADDRESS',GETPOST("fieldaddress"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ZIP',GETPOST("fieldzip"),'chaine',0,'',$conf->entity)) $error++; @@ -255,6 +256,14 @@ print ''.$langs->trans("LDAPFieldMobileExample").''; print ' '; print ''; +// Skype +$var=!$var; +print ''.$langs->trans("LDAPFieldSkype").''; +print ''; +print ''.$langs->trans("LDAPFieldSkypeExample").''; +print ' '; +print ''; + // Fax $var=!$var; print ''.$langs->trans("LDAPFieldFax").''; diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index a9d530cd8d9..647cccf7ab8 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -63,6 +63,7 @@ if ($action == 'setvalue' && $user->admin) if (! dolibarr_set_const($db, 'LDAP_FIELD_MAIL',GETPOST("fieldmail"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_PHONE',GETPOST("fieldphone"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_MOBILE',GETPOST("fieldmobile"),'chaine',0,'',$conf->entity)) $error++; + if (! dolibarr_set_const($db, 'LDAP_FIELD_SKYPE',GETPOST("fieldskype"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_FAX',GETPOST("fieldfax"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_DESCRIPTION',GETPOST("fielddescription"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_SID',GETPOST("fieldsid"),'chaine',0,'',$conf->entity)) $error++; @@ -240,6 +241,14 @@ print ''.$langs->trans("LDAPFieldMobileExample").''; print 'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_MOBILE)?' checked="checked"':'').">"; print ''; +// Skype +$var=!$var; +print ''.$langs->trans("LDAPFieldSkype").''; +print ''; +print ''.$langs->trans("LDAPFieldSkypeExample").''; +print 'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_SKYPE)?' checked="checked"':'').">"; +print ''; + // Fax $var=!$var; print ''.$langs->trans("LDAPFieldFax").''; @@ -383,6 +392,7 @@ if (function_exists("ldap_connect")) $conf->global->LDAP_FIELD_PASSWORD_CRYPTED, $conf->global->LDAP_FIELD_PHONE, $conf->global->LDAP_FIELD_FAX, + $conf->global->LDAP_FIELD_SKYPE, $conf->global->LDAP_FIELD_MOBILE, $conf->global->LDAP_FIELD_MAIL, $conf->global->LDAP_FIELD_TITLE, diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 8574e6eb5ad..b54e3f955d2 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -6,6 +6,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2013 Alexandre Spangaro * * 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 @@ -267,6 +268,12 @@ if ($id > 0) // Fax print ''.$langs->trans('Fax').''.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').''; + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans('Skype').''.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').''; + } + // Assujeti a TVA ou pas print ''; print ''.$langs->trans('VATIsUsed').''; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 1a1049c8bcc..232b679399f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -5,7 +5,8 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Alexandre Spangaro * * 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 @@ -62,6 +63,7 @@ class Contact extends CommonObject var $code; var $email; + var $skype; var $phone_pro; var $phone_perso; var $phone_mobile; @@ -226,6 +228,7 @@ class Contact extends CommonObject $this->phone_perso=trim($this->phone_perso); $this->phone_mobile=trim($this->phone_mobile); $this->jabberid=trim($this->jabberid); + $this->skype=trim($this->skype); $this->fax=trim($this->fax); $this->zip=(empty($this->zip)?'':$this->zip); $this->town=(empty($this->town)?'':$this->town); @@ -249,6 +252,7 @@ class Contact extends CommonObject $sql .= ", poste='".$this->db->escape($this->poste)."'"; $sql .= ", fax='".$this->db->escape($this->fax)."'"; $sql .= ", email='".$this->db->escape($this->email)."'"; + $sql .= ", skype='".$this->db->escape($this->skype)."'"; $sql .= ", note_private = ".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null"); $sql .= ", note_public = ".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null"); $sql .= ", phone = ".(isset($this->phone_pro)?"'".$this->db->escape($this->phone_pro)."'":"null"); @@ -379,6 +383,7 @@ class Contact extends CommonObject if ($this->phone_perso && ! empty($conf->global->LDAP_CONTACT_FIELD_HOMEPHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso; if ($this->phone_mobile && ! empty($conf->global->LDAP_CONTACT_FIELD_MOBILE)) $info[$conf->global->LDAP_CONTACT_FIELD_MOBILE] = $this->phone_mobile; if ($this->fax && ! empty($conf->global->LDAP_CONTACT_FIELD_FAX)) $info[$conf->global->LDAP_CONTACT_FIELD_FAX] = $this->fax; + if ($this->skype && ! empty($conf->global->LDAP_CONTACT_FIELD_SKYPE)) $info[$conf->global->LDAP_CONTACT_FIELD_SKYPE] = $this->skype; if ($this->note_private && ! empty($conf->global->LDAP_CONTACT_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = $this->note_private; if ($this->email && ! empty($conf->global->LDAP_CONTACT_FIELD_MAIL)) $info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email; @@ -494,7 +499,7 @@ class Contact extends CommonObject $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; $sql.= " c.birthday,"; - $sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid,"; + $sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid, c.skype,"; $sql.= " c.priv, c.note_private, c.note_public, c.default_lang, c.no_email, c.canvas,"; $sql.= " c.import_key,"; $sql.= " p.libelle as country, p.code as country_code,"; @@ -549,6 +554,7 @@ class Contact extends CommonObject $this->email = $obj->email; $this->jabberid = $obj->jabberid; + $this->skype = $obj->skype; $this->priv = $obj->priv; $this->mail = $obj->email; @@ -1025,6 +1031,7 @@ class Contact extends CommonObject $this->country_code = 'FR'; $this->country = 'France'; $this->email = 'specimen@specimen.com'; + $this->skype = 'tom.hanson'; $this->phone_pro = '0909090901'; $this->phone_perso = '0909090902'; diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index fb30b32a67d..3334a12b069 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Alexandre Spangaro * * 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 @@ -168,13 +169,14 @@ if (empty($reshook)) $object->town = $_POST["town"]; $object->country_id = $_POST["country_id"]; $object->state_id = $_POST["state_id"]; + $object->skype = $_POST["skype"]; $object->email = $_POST["email"]; $object->phone_pro = $_POST["phone_pro"]; $object->phone_perso = $_POST["phone_perso"]; $object->phone_mobile = $_POST["phone_mobile"]; $object->fax = $_POST["fax"]; $object->jabberid = $_POST["jabberid"]; - $object->no_email = $_POST["no_email"]; + $object->no_email = $_POST["no_email"]; $object->priv = $_POST["priv"]; $object->note_public = GETPOST("note_public"); $object->note_private = GETPOST("note_private"); @@ -268,6 +270,7 @@ if (empty($reshook)) $object->country_id = $_POST["country_id"]; $object->email = $_POST["email"]; + $object->skype = $_POST["skype"]; $object->phone_pro = $_POST["phone_pro"]; $object->phone_perso = $_POST["phone_perso"]; $object->phone_mobile = $_POST["phone_mobile"]; @@ -514,7 +517,7 @@ else print ''.$langs->trans("No_Email").''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''; } else - { + { print ' '; } print ''; @@ -522,6 +525,12 @@ else // Instant message and no email print ''.$langs->trans("IM").'jabberid).'">'; + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").'skype).'">'; + } + // Visibility print ''.$langs->trans("ContactVisibility").''; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); @@ -712,7 +721,7 @@ else print ''; // Jabberid - print 'Jabberidjabberid).'">'; + print ''.$langs->trans("Jabberid").'jabberid).'">'; if (! empty($conf->mailing->enabled)) { print ''.$langs->trans("No_Email").''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''; @@ -722,7 +731,13 @@ else print ' '; } print ''; - + + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").'skype).'">'; + } + // Visibility print ''.$langs->trans("ContactVisibility").''; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); @@ -935,6 +950,12 @@ else print ' '; } print ''; + + // Skype + if (!empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).''; + } print ''.$langs->trans("ContactVisibility").''; print $object->LibPubPriv($object->priv); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 529b9cb69b9..dcaf4aaac4b 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Raphaël Doursenaud * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Alexandre Spangaro * * 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 @@ -48,6 +49,7 @@ $search_phonepro=GETPOST("search_phonepro"); $search_phonemob=GETPOST("search_phonemob"); $search_fax=GETPOST("search_fax"); $search_email=GETPOST("search_email"); +$search_skype=GETPOST("search_skype"); $search_priv=GETPOST("search_priv"); $search_categ = GETPOST("search_categ",'int'); $search_statut=GETPOST("search_statut"); @@ -99,6 +101,7 @@ if (GETPOST('button_removefilter')) $search_phonemob=""; $search_fax=""; $search_email=""; + $search_skype=""; $search_priv=""; $sall=""; } @@ -117,7 +120,7 @@ $form=new Form($db); $formother=new FormOther($db); $sql = "SELECT s.rowid as socid, s.nom as name,"; -$sql.= " p.rowid as cidp, p.lastname as lastname, p.statut, p.firstname, p.poste, p.email,"; +$sql.= " p.rowid as cidp, p.lastname as lastname, p.statut, p.firstname, p.poste, p.email, p.skype,"; $sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,"; $sql.= " cp.code as country_code"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p"; @@ -185,6 +188,10 @@ if (strlen($search_email)) // filtre sur l'email { $sql .= " AND p.email LIKE '%".$db->escape($search_email)."%'"; } +if (strlen($search_skype)) // filtre sur skype +{ + $sql .= " AND p.skype LIKE '%".$db->escape($search_skype)."%'"; +} if ($type == "o") // filtre sur type { $sql .= " AND p.fk_soc IS NULL"; @@ -281,6 +288,7 @@ if ($result) print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mob", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder); + if (! empty($conf->skype->enabled)) { print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); } print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder); print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder); @@ -316,6 +324,12 @@ if ($result) print ''; print ''; print ''; + if (! empty($conf->skype->enabled)) + { + print ''; + print ''; + print ''; + } print ' '; print ''; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); @@ -376,7 +390,9 @@ if ($result) print ''.dol_print_phone($obj->fax,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').''; // EMail print ''.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).''; - + // Skype + if (! empty($conf->skype->enabled)) { print ''.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).''; } + // Date print ''.dol_print_date($db->jdate($obj->tms),"day").''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 86f4904be68..089f79f4549 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1,14 +1,11 @@ * Copyright (C) 2005-2013 Regis Houssin -<<<<<<< HEAD * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel -======= * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel ->>>>>>> refs/remotes/origin/3.4 - * Copyright (C) 2011-2012 Philippe Grand + * Copyright (C) 2011-2012 Philippe Grand * Copyright (C) 2012 Marcos García * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 9f18a477bed..2a3eb3647ae 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -78,7 +78,8 @@ class Ldap var $name; var $firstname; var $login; - var $phone; + var $phone; + var $skype; var $fax; var $mail; var $mobile; @@ -127,6 +128,7 @@ class Ldap $this->attr_firstname = $conf->global->LDAP_FIELD_FIRSTNAME; $this->attr_mail = $conf->global->LDAP_FIELD_MAIL; $this->attr_phone = $conf->global->LDAP_FIELD_PHONE; + $this->attr_skype = $conf->global->LDAP_FIELD_SKYPE; $this->attr_fax = $conf->global->LDAP_FIELD_FAX; $this->attr_mobile = $conf->global->LDAP_FIELD_MOBILE; } @@ -1172,6 +1174,7 @@ class Ldap $this->firstname = $this->convToOutputCharset($result[0][$this->attr_firstname][0],$this->ldapcharset); $this->login = $this->convToOutputCharset($result[0][$this->attr_login][0],$this->ldapcharset); $this->phone = $this->convToOutputCharset($result[0][$this->attr_phone][0],$this->ldapcharset); + $this->skype = $this->convToOutputCharset($result[0][$this->attr_skype][0],$this->ldapcharset); $this->fax = $this->convToOutputCharset($result[0][$this->attr_fax][0],$this->ldapcharset); $this->mail = $this->convToOutputCharset($result[0][$this->attr_mail][0],$this->ldapcharset); $this->mobile = $this->convToOutputCharset($result[0][$this->attr_mobile][0],$this->ldapcharset); diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 53dafec66dd..582922cd60e 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -555,6 +555,11 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''.$langs->trans("PhoneMobile").''; print ''.$langs->trans("Fax").''; print ''.$langs->trans("EMail").''; + if (! empty($conf->skype->enabled)) + { + $colspan++; + print ''.$langs->trans("Skype").''; + } print ''.$langs->trans("Status").''; print " "; if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) @@ -570,7 +575,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ""; - $sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.statut "; + $sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.skype, p.statut "; $sql .= ", p.civilite, p.address, p.zip, p.town"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; $sql .= " WHERE p.fk_soc = ".$object->id; @@ -614,6 +619,12 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL'); print ''; + if (! empty($conf->skype->enabled)) + { + print ''; + print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE'); + print ''; + } if ($obj->statut==0) print ''.$langs->trans('Disabled').' '.img_picto($langs->trans('StatusContactDraftShort'),'statut0').''; elseif ($obj->statut==1) print ''.$langs->trans('Enabled').' '.img_picto($langs->trans('StatusContactValidatedShort'),'statut1').''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index de2e9e39692..9e67318d693 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9,6 +9,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Alexandre Spangaro * * 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 @@ -1185,6 +1186,48 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid= return $newemail; } +/** + * Show Skype link + * + * @param string $skype Skype to show (only skype, without 'Name of recipient' before) + * @param int $cid Id of contact if known + * @param int $socid Id of third party if known + * @param int $addlink 0=no link to create action + * @param int $max Max number of characters to show + * @return string HTML Link + */ +function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) +{ + global $conf,$user,$langs; + + $newskype=$skype; + + if (empty($skype)) return ' '; + + if (! empty($addlink)) + { + $newskype=''; + $newskype.=' '; + $newskype.=dol_trunc($skype,$max); + $newskype.=''; + + if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) + { + $type='AC_SKYPE'; $link=''; + if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; + $newskype='
'.$newskype.'  '.$link.'
'; + } + } + else + { + $langs->load("errors"); + $newskype.=img_warning($langs->trans("ErrorBadSkype",$skype)); + } + return $newskype; +} + /** * Format phone numbers according to country * diff --git a/htdocs/core/modules/modSkype.class.php b/htdocs/core/modules/modSkype.class.php new file mode 100644 index 00000000000..ef2a5f47446 --- /dev/null +++ b/htdocs/core/modules/modSkype.class.php @@ -0,0 +1,136 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \defgroup Skype Module Skype + * \brief Add a skype button. + * \file htdocs/core/modules/modSkype.class.php + * \ingroup Skype + * \brief Description and activation file for module Skype + */ +include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; + +/** + * Class to describe a Cron module + */ +class modSkype extends DolibarrModules +{ + + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + global $langs,$conf; + + $this->db = $db; + $this->numero = 3100; + + // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' + // It is used to group modules in module setup page + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Enable Skype button into contact"; + $this->version = 'experimental'; // 'experimental' or 'dolibarr' or version + // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific) + $this->special = 2; + // Name of image file used for this module. + $this->picto='skype'; + + // Data directories to create when module is enabled + $this->dirs = array(); + + // Config pages + //------------- + $this->config_page_url = array(); + + // Dependancies + //------------- + $this->hidden = ! empty($conf->global->SKYPE_MODULE_DISABLED); // A condition to disable module + $this->depends = array(modSociete); // List of modules id that must be enabled if this module is enabled + $this->requiredby = array(); // List of modules id to disable if this one is disabled + $this->conflictwith = array(); // List of modules id this module is in conflict with + $this->langfiles = array(); + + // Constantes + //----------- + + + // New pages on tabs + // ----------------- + $this->tabs = array(); + + // Boxes + //------ + $this->boxes = array(); + + // Permissions + //------------ + $this->rights = array(); // Permission array used by this module + $this->rights_class = 'skype'; + $r=0; + + $this->rights[$r][0] = 3101; + $this->rights[$r][1] = 'View skype link'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'view'; + $r++; + + // Main menu entries + //------------------ + $this->menu = array(); + } + + + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function init($options='') + { + // Prevent pb of modules not correctly disabled + //$this->remove($options); + + return $this->_init($sql,$options); + } + + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + function remove($options='') + { + $sql = array(); + + return $this->_remove($sql,$options); + } + +} +?> diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index e417a408d50..a053d517b69 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -329,3 +329,9 @@ create table llx_actioncomm_resources ) ENGINE=innodb; ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element); ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element); + +-- Task 157 +ALTER TABLE llx_user ADD skype VARCHAR(255) AFTER job; +ALTER TABLE llx_socpeople ADD skype VARCHAR(255) AFTER jabberid; +ALTER TABLE llx_societe ADD skype VARCHAR(255) AFTER email; +ALTER TABLE llx_adherent ADD skype VARCHAR(255) AFTER email; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index af15f5da198..6d5a4723462 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -45,6 +45,7 @@ create table llx_adherent state_id integer, country integer, email varchar(255), + skype varchar(255), phone varchar(30), phone_perso varchar(30), phone_mobile varchar(30), diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index e0588f04794..f4e1614cd7d 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -49,6 +49,7 @@ create table llx_societe fax varchar(20), -- fax number url varchar(255), -- email varchar(128), -- + skype varchar(255), -- fk_effectif integer DEFAULT 0, -- fk_typent integer DEFAULT 0, -- fk_forme_juridique integer DEFAULT 0, -- juridical status diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index 00e6f50f61b..04635061e59 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -42,6 +42,7 @@ create table llx_socpeople fax varchar(30), email varchar(255), jabberid varchar(255), + skype varchar(255), no_email smallint NOT NULL DEFAULT 0, priv smallint NOT NULL DEFAULT 0, fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 9fd1db59c91..2bd8523b278 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -41,6 +41,7 @@ create table llx_user fk_state integer DEFAULT 0, -- fk_country integer DEFAULT 0, -- job varchar(128), + skype varchar(255), office_phone varchar(20), office_fax varchar(20), user_mobile varchar(20), diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 2f9e4ed285d..94e6cb840c5 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -66,6 +66,8 @@ Country=Country CountryCode=Country code CountryId=Country id Phone=Phone +Skype=Skype +Call=Call PhonePro=Prof. phone PhonePerso=Pers. phone PhoneMobile=Mobile diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 162550a162b..617a673d100 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -8,6 +8,7 @@ * Copyright (C) 2008 Patrick Raguin * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Alexandre Spangaro * * 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 @@ -68,6 +69,7 @@ class Societe extends CommonObject var $phone; var $fax; var $email; + var $skype; var $url; //! barcode @@ -410,6 +412,7 @@ class Societe extends CommonObject $this->fax = preg_replace("/\s/","",$this->fax); $this->fax = preg_replace("/\./","",$this->fax); $this->email = trim($this->email); + $this->skype = trim($this->skype); $this->url = $this->url?clean_url($this->url,0):''; $this->idprof1 = trim($this->idprof1); $this->idprof2 = trim($this->idprof2); @@ -508,6 +511,7 @@ class Societe extends CommonObject $sql .= ",phone = ".(! empty($this->phone)?"'".$this->db->escape($this->phone)."'":"null"); $sql .= ",fax = ".(! empty($this->fax)?"'".$this->db->escape($this->fax)."'":"null"); $sql .= ",email = ".(! empty($this->email)?"'".$this->db->escape($this->email)."'":"null"); + $sql .= ",skype = ".(! empty($this->skype)?"'".$this->db->escape($this->skype)."'":"null"); $sql .= ",url = ".(! empty($this->url)?"'".$this->db->escape($this->url)."'":"null"); $sql .= ",siren = '". $this->db->escape($this->idprof1) ."'"; @@ -590,6 +594,7 @@ class Societe extends CommonObject //$lmember->lastname=$this->lastname?$this->lastname:$lmember->lastname; // We keep firstname and lastname of member unchanged $lmember->address=$this->address; $lmember->email=$this->email; + $lmember->skype=$this->skype; $lmember->phone=$this->phone; $result=$lmember->update($user,0,1,1,1); // Use nosync to 1 to avoid cyclic updates @@ -699,7 +704,7 @@ class Societe extends CommonObject $sql .= ', s.status'; $sql .= ', s.price_level'; $sql .= ', s.tms as date_update'; - $sql .= ', s.phone, s.fax, s.email, s.url, s.zip, s.town, s.note_private, s.note_public, s.client, s.fournisseur'; + $sql .= ', s.phone, s.fax, s.email, s.skype, s.url, s.zip, s.town, s.note_private, s.note_public, s.client, s.fournisseur'; $sql .= ', s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6'; $sql .= ', s.capital, s.tva_intra'; $sql .= ', s.fk_typent as typent_id'; @@ -777,6 +782,7 @@ class Societe extends CommonObject $this->statut_commercial = $libelle; // libelle statut commercial $this->email = $obj->email; + $this->skype = $obj->skype; $this->url = $obj->url; $this->phone = $obj->phone; $this->fax = $obj->fax; @@ -2409,6 +2415,7 @@ class Societe extends CommonObject $this->country_id=$member->country_id; $this->phone=$member->phone; // Prof phone $this->email=$member->email; + $this->skype=$member->skype; $this->client = 1; // A member is a customer by default $this->code_client = -1; @@ -2548,6 +2555,7 @@ class Societe extends CommonObject $this->country_id=1; $this->country_code='FR'; $this->email='specimen@specimen.com'; + $this->skype='tom.hanson'; $this->url='http://www.specimen.com'; $this->phone='0909090901'; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index fb273b79ab3..e8c8378eee0 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -4,8 +4,10 @@ * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2008 Patrick Raguin + * Copyright (C) 2008 Patrick Raguin * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2011-2013 Alexandre Spangaro + * * * 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 @@ -130,6 +132,7 @@ if (empty($reshook)) $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id'); $object->state_id = GETPOST('state_id'); + $object->skype = GETPOST('skype'); $object->phone = GETPOST('phone'); $object->fax = GETPOST('fax'); $object->email = GETPOST('email'); @@ -254,7 +257,7 @@ if (empty($reshook)) dol_syslog("This thirdparty is a personal people",LOG_DEBUG); $contact=new Contact($db); - $contact->civilite_id = $object->civilite_id; + $contact->civilite_id = $object->civilite_id; $contact->name = $object->name_bis; $contact->firstname = $object->firstname; $contact->address = $object->address; @@ -265,8 +268,9 @@ if (empty($reshook)) $contact->socid = $object->id; // fk_soc $contact->status = 1; $contact->email = $object->email; - $contact->phone_pro = $object->phone; - $contact->fax = $object->fax; + $contact->skype = $object->skype; + $contact->phone_pro = $object->phone; + $contact->fax = $object->fax; $contact->priv = 0; $result=$contact->create($user); @@ -598,6 +602,7 @@ else $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->state_id = GETPOST('state_id'); + $object->skype = GETPOST('skype'); $object->phone = GETPOST('phone'); $object->fax = GETPOST('fax'); $object->email = GETPOST('email'); @@ -845,6 +850,12 @@ else print ''.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').''; print ''.$langs->trans('Web').''; + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans('Skype').''; + } + // Phone / Fax print ''.$langs->trans('Phone').''; print ''.$langs->trans('Fax').''; @@ -1079,6 +1090,7 @@ else $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id; $object->state_id = GETPOST('state_id'); + $object->skype = GETPOST('skype'); $object->phone = GETPOST('phone'); $object->fax = GETPOST('fax'); $object->email = GETPOST('email'); @@ -1088,8 +1100,8 @@ else $object->idprof2 = GETPOST('idprof2'); $object->idprof3 = GETPOST('idprof3'); $object->idprof4 = GETPOST('idprof4'); - $object->idprof5 = GETPOST('idprof5'); - $object->idprof6 = GETPOST('idprof6'); + $object->idprof5 = GETPOST('idprof5'); + $object->idprof6 = GETPOST('idprof6'); $object->typent_id = GETPOST('typent_id'); $object->effectif_id = GETPOST('effectif_id'); $object->barcode = GETPOST('barcode'); @@ -1261,7 +1273,13 @@ else // EMail / Web print ''.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').''; print ''.$langs->trans('Web').''; - + + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans('Skype').''; + } + // Phone / Fax print ''.$langs->trans('Phone').''; print ''.$langs->trans('Fax').''; @@ -1569,6 +1587,14 @@ else print ''.$langs->trans('Web').''; print dol_print_url($object->url); print ''; + + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans('Skype').''; + print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE'); + print ''; + } // Phone / Fax print ''.$langs->trans('Phone').''.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').''; diff --git a/htdocs/theme/amarok/img/object_skype.png b/htdocs/theme/amarok/img/object_skype.png new file mode 100644 index 0000000000000000000000000000000000000000..97121565bb08b2eac9ba51c91368e7171370c923 GIT binary patch literal 3451 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 literal 0 HcmV?d00001 diff --git a/htdocs/theme/auguria/img/object_skype.png b/htdocs/theme/auguria/img/object_skype.png new file mode 100644 index 0000000000000000000000000000000000000000..97121565bb08b2eac9ba51c91368e7171370c923 GIT binary patch literal 3451 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 literal 0 HcmV?d00001 diff --git a/htdocs/theme/bureau2crea/img/object_skype.png b/htdocs/theme/bureau2crea/img/object_skype.png new file mode 100644 index 0000000000000000000000000000000000000000..97121565bb08b2eac9ba51c91368e7171370c923 GIT binary patch literal 3451 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 literal 0 HcmV?d00001 diff --git a/htdocs/theme/cameleo/img/object_skype.png b/htdocs/theme/cameleo/img/object_skype.png new file mode 100644 index 0000000000000000000000000000000000000000..97121565bb08b2eac9ba51c91368e7171370c923 GIT binary patch literal 3451 zcmV->4TSQEP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0007}NklXv}hE<3Y?Hqgop{G7G;Z| zjhk8p6+x{ErGLPL+5{~eNF)fdf^i5HabZPK1D58G8FiYuI(P2%-e;cEVtyokmWT6s zpU?Np`GjpFm*H`IguND2$1z+%7yiUJ&bv=39>WjlTRLnPvDz%WmB*+fkcFU>1RcQ_ zID|j$1$>IWfIKqWE^O%Ru(P-1;hxk~W8U~|+lAR&GkT+vhJ6^uxh24EDA1TM>{(s* z;f|HI^p=)mw({uYrMg4E&bZi|UtdX+kwxFd1PRQvqDQ(@M|Q2TrMF~qHh1E$x--`r zN@?)Iqbq!}eU(ZG8ih^xz@qt9M2OMQ>ay-~0uG;_Hhglzo^P)^a$yEMSjkkg#C#Fq zRScvU#cL6l=kn#)Z|``(;F?ZjlTF93Hr%eyJ5_6$$P1M;KqsC`FdfjH1*fN4j$Wuy zu&F2W`asoZyVn|dzR%X)PR(|ql}AZfey5V43|$>TBS!E3JZ=B?6OR5;^V{Uzg zOZ_W+^<1CLmDEftE&=iclM(fH^z!;Hr-wJ{@5vlId&`TbCJlXa&9UF_fYp`MzP>U= zw1_BDjKxS%Fu1a0TQ&3X&Q<=N%N@T|_wQ`(=7#R&%(wG`|3}!G;#3lxYl}~QeWl?* ze^sdzd^xn%PZLc&SunV+46fJOe!S5XlCZ>hIza>PRZEGpwYv_E-E_6qmSn-Mhq?@| zD~koA|I9fsdc&<&p_(p7sE5Te3B1#e4%gd-jh!8ysAjhGWLiZuekXUP)-pF==*bcZ zOFMXT8L+6mk@wq0e6|(I7e0(E3Cas)x>qOgN_t;AzYC0(lCZnPb{%0eT4>@K3}6bM dFSfG%-vEbp0_B>3F$4er002ovPDHLkV1j9fh(Q1V literal 0 HcmV?d00001 diff --git a/htdocs/theme/eldy/img/object_skype.png b/htdocs/theme/eldy/img/object_skype.png new file mode 100644 index 0000000000000000000000000000000000000000..97121565bb08b2eac9ba51c91368e7171370c923 GIT binary patch literal 3451 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 literal 0 HcmV?d00001 From 2f47b0fcfd0021b15e7e55fe0530254b02734ba6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Nov 2013 23:56:15 +0100 Subject: [PATCH 35/48] Fix: picto for status8 is a flash red icon to report a critical error that need a task to fix. This is not the case for a close thirdparty (a close thirdparty is a regular status). However to have a bigger contrast with thirdparty active, i set picto to statut5.png --- htdocs/comm/mailing/cibles.php | 2 +- .../compta/prelevement/class/ligneprelevement.class.php | 4 +--- htdocs/societe/class/societe.class.php | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 538d4c04fc4..5b3ec5bfc1d 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -507,7 +507,7 @@ if ($object->fetch($id) >= 0) if ($obj->statut==-1) print $langs->trans("MailingStatusError").' '.img_error(); if ($obj->statut==1) print $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut4'); if ($obj->statut==2) print $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"),'statut6'); - if ($obj->statut==3) print $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut8'); + if ($obj->statut==3) print $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"),'statut5'); print ''; } print ''; diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index d040de378f2..a8c5b5f019c 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -26,10 +26,8 @@ /** - * \class LignePrelevement - * \brief Classe permettant la gestion des prelevements + * Class to manage withdrawals */ - class LignePrelevement { var $id; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 96863a078d8..fb256da693b 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1518,22 +1518,22 @@ class Societe extends CommonObject } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut5').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 3) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8'); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut5'); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4'); } if ($mode == 4) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut5').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 5) { - if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut8'); + if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut5'); if ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4'); } } From 36ec7509ac640a34dfc5f45088b5bb0a386bb522 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 5 Nov 2013 09:54:49 +0100 Subject: [PATCH 36/48] Set same icon status rule as for thirdparty --- htdocs/contact/class/contact.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 1a1049c8bcc..7bc48edca11 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -947,24 +947,24 @@ class Contact extends CommonObject } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1').' '.$langs->trans('Disabled'); + if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); } elseif ($mode == 3) { - if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1'); + if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5'); elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($langs->trans('Disabled'),'statut1').' '.$langs->trans('StatusContactDraft'); + if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('StatusContactDraft'); elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); } elseif ($mode == 5) { - if ($statut==0) return ''.$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut1'); + if ($statut==0) return ''.$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); elseif ($statut==1) return ''.$langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4'); } From 0587ad5af86b78d162edd504107bc0d95510e65d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Nov 2013 10:44:58 +0100 Subject: [PATCH 37/48] Fix: duplicate button --- htdocs/comm/propal.php | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index c56688b3e44..15536909bf9 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -100,7 +100,7 @@ $hookmanager->initHooks(array('propalcard')); /* * Actions -*/ + */ $parameters=array('socid'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks @@ -131,7 +131,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes') } } -// Suppression de la propale +// Delete proposal else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->propal->supprimer) { $result=$object->delete($user); @@ -436,9 +436,7 @@ else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST( } } -/* - * Add file in email form -*/ +// Add file in email form if (GETPOST('addfile')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -451,9 +449,7 @@ if (GETPOST('addfile')) $action='presend'; } -/* - * Remove file in email form -*/ +// Remove file in email form if (GETPOST('removedfile')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -469,7 +465,7 @@ if (GETPOST('removedfile')) /* * Send mail -*/ + */ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! GETPOST('cancel')) { $langs->load('mails'); @@ -637,7 +633,7 @@ else if ($action == "setabsolutediscount" && $user->rights->propal->creer) } } -//Ajout d'une ligne produit dans la propale +// Add line else if ($action == "addline" && $user->rights->propal->creer) { $idprod=GETPOST('idprod', 'int'); @@ -1254,7 +1250,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal-> /* * View -*/ + */ llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'); @@ -1422,7 +1418,7 @@ if ($action == 'create') /* * Combobox pour la fonction de copie - */ + */ if (empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) { @@ -1521,7 +1517,7 @@ else { /* * Show object in view mode - */ + */ $soc = new Societe($db); $soc->fetch($object->socid); @@ -1615,13 +1611,12 @@ else print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ''; - // Ref client + // Ref customer print ''; print ''; - print ''; - print ''; if ($action != 'refclient' && ! empty($object->brouillon)) print ''; + print ''; print '
'; print $langs->trans('RefCustomer').''.img_edit($langs->transnoentitiesnoconv('RefCustomer')).''.img_edit($langs->trans('Modify')).'
'; print ''; if ($user->rights->propal->creer && $action == 'refclient') @@ -1639,6 +1634,7 @@ else } print ''; print ''; + // Company print ''.$langs->trans('Company').''.$soc->getNomUrl(1).''; print ''; @@ -2024,7 +2020,7 @@ else /* * Lines - */ + */ if (! empty($conf->use_javascript_ajax) && $object->statut == 0) { @@ -2077,7 +2073,7 @@ else { /* * Formulaire cloture (signe ou non) - */ + */ $form_close = '
'; $form_close.= ''; $form_close.= ''; @@ -2105,7 +2101,7 @@ else /* * Boutons Actions - */ + */ if ($action != 'presend') { print '
'; @@ -2216,7 +2212,7 @@ else /* * Documents generes - */ + */ $filename=dol_sanitizeFileName($object->ref); $filedir=$conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref); $urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id; From 922929fffbb48ee17bcdcaddb840883b0d252b08 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Nov 2013 11:17:54 +0100 Subject: [PATCH 38/48] Fix: Missing column Fix: Line was not added correctly Fix: Missing message --- htdocs/core/lib/project.lib.php | 49 ++++++++++++++++++--------------- htdocs/projet/activity/list.php | 44 +++++++++++++++++------------ 2 files changed, 53 insertions(+), 40 deletions(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 1f8f380e494..5e096760fce 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -1,28 +1,28 @@ +/* Copyright (C) 2006-2013 Laurent Destailleur * Copyright (C) 2010 Regis Houssin -* Copyright (C) 2011 Juanjo Menent -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* or see http://www.gnu.org/ -*/ + * Copyright (C) 2011 Juanjo Menent + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ /** * \file htdocs/core/lib/project.lib.php * \brief Functions used by project module * \ingroup project -*/ + */ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -473,19 +473,24 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr print ''; // Planned Workload - print '
'; - // Progress + // Progress declared % print ''; // Time spent print '\n"; diff --git a/htdocs/projet/activity/list.php b/htdocs/projet/activity/list.php index 5d5eacfcbda..e9cb8568b65 100644 --- a/htdocs/projet/activity/list.php +++ b/htdocs/projet/activity/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2010 François Legastelois * @@ -56,35 +56,42 @@ if ($action == 'addtime' && $user->rights->projet->creer) { $task = new Task($db); - $timespent_duration=0; + $timespent_duration=array(); foreach($_POST as $key => $time) { - if(intval($time)>0) + if (intval($time) > 0) { // Hours or minutes - if(preg_match("/([0-9]+)(hour|min)/",$key,$matches)) + if (preg_match("/([0-9]+)(hour|min)/",$key,$matches)) { $id = $matches[1]; - - // We store HOURS in seconds - if($matches[2]=='hour') $timespent_duration += $time*60*60; - - // We store MINUTES in seconds - if($matches[2]=='min') $timespent_duration += $time*60; + if ($id > 0) + { + // We store HOURS in seconds + if($matches[2]=='hour') $timespent_duration[$id] += $time*60*60; + + // We store MINUTES in seconds + if($matches[2]=='min') $timespent_duration[$id] += $time*60; + } } } } - if ($timespent_duration > 0) + if (count($timespent_duration) > 0) { - $task->fetch($id); - $task->timespent_duration = $timespent_duration; - $task->timespent_fk_user = $user->id; - $task->timespent_date = dol_mktime(12,0,0,$_POST["{$id}month"],$_POST["{$id}day"],$_POST["{$id}year"]); - $task->addTimeSpent($user); - - // header to avoid submit twice on back + foreach($timespent_duration as $key => $val) + { + $task->fetch($key); + $task->timespent_duration = $val; + $task->timespent_fk_user = $user->id; + $task->timespent_date = dol_mktime(12,0,0,$_POST["{$key}month"],$_POST["{$key}day"],$_POST["{$key}year"]); + $task->addTimeSpent($user); + } + + setEventMessage($langs->trans("RecordSaved")); + + // Redirect to avoid submit twice on back header('Location: '.$_SERVER["PHP_SELF"].'?id='.$projectid.($mode?'&mode='.$mode:'')); exit; } @@ -144,6 +151,7 @@ print ''; print ''; print ''; print ''; +print ''; print ''; print ''; print ''; From 0d2a019c3f1cf3decd6878066dcb85bd66a34880 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 5 Nov 2013 11:26:13 +0100 Subject: [PATCH 39/48] Extrafield : better filter on select from table management for extrafields table --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c651603451d..c00d0401e5c 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -703,7 +703,7 @@ class ExtraFields $keyList.= ', '.$parentField; } if (count($InfoFieldList)>=4 && !empty($InfoFieldList[4])) { - if (strpos($InfoFieldList[4], 'extra')!==false) { + if (strpos($InfoFieldList[4], 'extra.')!==false) { $keyList='main.'.$InfoFieldList[2].' as rowid'; }else { $keyList=$InfoFieldList[2].' as rowid'; From e5daee86b8ff0928248a55d2aebf665405ab0e33 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Nov 2013 11:26:30 +0100 Subject: [PATCH 40/48] Fix: Missing translation --- htdocs/langs/en_US/admin.lang | 2 ++ htdocs/langs/fr_FR/admin.lang | 2 ++ 2 files changed, 4 insertions(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 8e73c2fe560..46e2fbd3f77 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -972,6 +972,8 @@ ExtraFieldsThirdParties=Complementary attributes (thirdparty) ExtraFieldsContacts=Complementary attributes (contact/address) ExtraFieldsMember=Complementary attributes (member) ExtraFieldsMemberType=Complementary attributes (member type) +ExtraFieldsCustomerOrders=Complementary attributes (orders) +ExtraFieldsCustomerInvoices=Complementary attributes (invoices) ExtraFieldsSupplierOrders=Complementary attributes (orders) ExtraFieldsSupplierInvoices=Complementary attributes (invoices) ExtraFieldsProject=Complementary attributes (projects) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 58df5bf983b..c841e290d46 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -972,6 +972,8 @@ ExtraFieldsThirdParties=Attributs supplémentaires (tiers) ExtraFieldsContacts=Attributs supplémentaires (contacts/adresses) ExtraFieldsMember=Attributs supplémentaires (adhérents) ExtraFieldsMemberType=Attributs supplémentaires (type d'adhérents) +ExtraFieldsCustomerOrders=Attributs supplémentaires (commandes) +ExtraFieldsCustomerInvoices=Attributs supplémentaires (factures) ExtraFieldsSupplierOrders=Attributs supplémentaires (commandes) ExtraFieldsSupplierInvoices=Attributs supplémentaires (factures) ExtraFieldsProject=Attributs supplémentaires (projets) From 685ada72a63c35aa3a07efbd3e16f31c7fda5c81 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Tue, 5 Nov 2013 11:39:29 +0100 Subject: [PATCH 41/48] missing trad --- htdocs/langs/fr_FR/admin.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 58df5bf983b..6e35776adbe 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -973,6 +973,7 @@ ExtraFieldsContacts=Attributs supplémentaires (contacts/adresses) ExtraFieldsMember=Attributs supplémentaires (adhérents) ExtraFieldsMemberType=Attributs supplémentaires (type d'adhérents) ExtraFieldsSupplierOrders=Attributs supplémentaires (commandes) +ExtraFieldsCustomerInvoices=Attributs supplémentaires (factures clients) ExtraFieldsSupplierInvoices=Attributs supplémentaires (factures) ExtraFieldsProject=Attributs supplémentaires (projets) ExtraFieldsProjectTask=Attributs supplémentaires (tâches) From 190dabc3f759b1aefb06fcab86043614deaa487a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Nov 2013 13:11:36 +0100 Subject: [PATCH 42/48] Fix: Tons of bugs with extrafields feature. --- htdocs/comm/propal.php | 63 +-- htdocs/commande/fiche.php | 65 +-- htdocs/compta/facture.php | 64 +-- .../admin/facture_cust_extrafields.php | 4 +- htdocs/core/class/commonobject.class.php | 6 +- htdocs/core/class/extrafields.class.php | 64 +-- htdocs/core/class/html.form.class.php | 4 +- htdocs/fichinter/fiche.php | 407 ++++++++---------- htdocs/langs/en_US/admin.lang | 1 + htdocs/langs/en_US/members.lang | 1 - htdocs/langs/fr_FR/admin.lang | 1 + htdocs/langs/fr_FR/members.lang | 1 - 12 files changed, 288 insertions(+), 393 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 15536909bf9..8c2871426a4 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1159,14 +1159,11 @@ else if ($action == 'update_extras') { // Fill array 'array_options' with data from update form $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); + if($ret < 0) $error++; - if($ret < 0) { - $error++; - $action = 'edit_extras'; - } - - if(!$error) { + if (! $error) + { // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! $hookmanager->initHooks(array('propaldao')); @@ -1174,17 +1171,16 @@ else if ($action == 'update_extras') $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + $result=$object->insertExtraFields(); + if ($result < 0) { - $result=$object->insertExtraFields(); - if ($result < 0) - { - $error++; - } + $error++; } } else if ($reshook < 0) $error++; } + + if ($error) $action = 'edit_extras'; } if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal->creer) @@ -1893,20 +1889,12 @@ else print ''; } - // Other attributes + // Other attributes (TODO Move this into an include) $res=$object->fetch_optionals($object->id,$extralabels); $parameters=array('colspan' => ' colspan="3"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { - if ($action == 'edit_extras') - { - print ''; - print ''; - print ''; - print ''; - } - foreach($extrafields->attribute_label as $key=>$label) { if ($action == 'edit_extras') { @@ -1929,35 +1917,28 @@ else $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); } - if ($action == 'edit_extras' && $user->rights->propal->creer) + if ($action == 'edit_extras' && $user->rights->propal->creer && GETPOST('attribute') == $key) { + print ''; + print ''; + print ''; + print ''; + print ''; + print $extrafields->showInputField($key,$value); + + print ''; + + print ''; } else { print $extrafields->showOutputField($key,$value); + if ($object->statut == 0 && $user->rights->propal->creer) print ''.img_picto('','edit').' '.$langs->trans('Modify').''; } print ''."\n"; } } - - if(count($extrafields->attribute_label) > 0) { - - if ($action == 'edit_extras' && $user->rights->propal->creer) - { - print ''; - - } - else { - if ($object->statut == 0 && $user->rights->propal->creer) - { - print ''; - } - } - } } // Amount HT diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 737e31cca7f..697d47c78bf 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1179,12 +1179,11 @@ else if ($action == 'update_extras') { // Fill array 'array_options' with data from update form $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); + if($ret < 0) $error++; - if($ret < 0) - $error++; - - if(!$error) { + if (! $error) + { // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! $hookmanager->initHooks(array('orderdao')); @@ -1192,22 +1191,16 @@ else if ($action == 'update_extras') $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + $result=$object->insertExtraFields(); + if ($result < 0) { - $result=$object->insertExtraFields(); - if ($result < 0) - { - $error++; - } + $error++; } } else if ($reshook < 0) $error++; } - else - { - $action = 'edit_extras'; - } - + + if ($error) $action = 'edit_extras'; } /* @@ -2208,20 +2201,12 @@ else print ''; } - // Other attributes + // Other attributes (TODO Move this into an include) $res=$object->fetch_optionals($object->id,$extralabels); $parameters=array('colspan' => ' colspan="3"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { - if ($action == 'edit_extras') - { - print ''; - print ''; - print ''; - print ''; - } - foreach($extrafields->attribute_label as $key=>$label) { if ($action == 'edit_extras') { @@ -2244,35 +2229,27 @@ else $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); } - if ($action == 'edit_extras' && $user->rights->commande->creer) + if ($action == 'edit_extras' && $user->rights->commande->creer && GETPOST('attribute') == $key) { + print ''; + print ''; + print ''; + print ''; + print ''; + print $extrafields->showInputField($key,$value); + + print ''; + print ''; } else { print $extrafields->showOutputField($key,$value); + if ($object->statut == 0 && $user->rights->commande->creer) print ''.img_picto('','edit').' '.$langs->trans('Modify').''; } print ''."\n"; } } - - if(count($extrafields->attribute_label) > 0) { - - if ($action == 'edit_extras' && $user->rights->commande->creer) - { - print ''; - - } - else { - if ($object->statut == 0 && $user->rights->commande->creer) - { - print ''; - } - } - } } $rowspan=4; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index a2c9dc80594..191d48c4fdf 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1926,11 +1926,11 @@ if ($action == 'update_extras') { // Fill array 'array_options' with data from add form $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels,$object); - if($ret < 0) - $error++; + $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); + if ($ret < 0) $error++; - if(!$error) { + if (! $error) + { // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! $hookmanager->initHooks(array('invoicedao')); @@ -1938,22 +1938,16 @@ if ($action == 'update_extras') $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + $result=$object->insertExtraFields(); + if ($result < 0) { - $result=$object->insertExtraFields(); - if ($result < 0) - { - $error++; - } + $error++; } } else if ($reshook < 0) $error++; } - else - { - $action = 'edit_extras'; - } - + + if ($error) $action = 'edit_extras'; } @@ -3413,21 +3407,13 @@ else if ($id > 0 || ! empty($ref)) print ''; } - // Other attributes + // Other attributes (TODO Move this into an include) $res=$object->fetch_optionals($object->id,$extralabels); $parameters=array('colspan' => ' colspan="2"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { - if ($action == 'edit_extras') - { - print ''; - print ''; - print ''; - print ''; - } - foreach($extrafields->attribute_label as $key=>$label) { if ($action == 'edit_extras') { @@ -3450,35 +3436,27 @@ else if ($id > 0 || ! empty($ref)) $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); } - if ($action == 'edit_extras' && $user->rights->facture->creer) + if ($action == 'edit_extras' && $user->rights->facture->creer && GETPOST('attribute') == $key) { + print ''; + print ''; + print ''; + print ''; + print ''; + print $extrafields->showInputField($key,$value); + + print ''; + print ''; } else { print $extrafields->showOutputField($key,$value); + if ($object->statut == 0 && $user->rights->facture->creer) print ''.img_picto('','edit').' '.$langs->trans('Modify').''; } print ''."\n"; } } - - if(count($extrafields->attribute_label) > 0) { - - if ($action == 'edit_extras' && $user->rights->facture->creer) - { - print ''; - - } - else { - if ($object->statut == 0 && $user->rights->facture->creer) - { - print ''; - } - } - } } print '
'; - if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'all'); + print ''; + if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin'); else print '--:--'; print ''; print $lines[$i]->progress.' %'; print ''; - if ($lines[$i]->duration) print convertSecondToTime($lines[$i]->duration,'all'); + if ($lines[$i]->duration) + { + print ''; + print convertSecondToTime($lines[$i]->duration,'allhourmin'); + print ''; + } else print '--:--'; print "'.$langs->trans("RefTask").''.$langs->trans("LabelTask").''.$langs->trans("DateStart").''.$langs->trans("DateEnd").''.$langs->trans("PlannedWorkload").''.$langs->trans("Progress").''.$langs->trans("TimeSpent").''.$langs->trans("AddDuration").'
'; - print ''; - print ''; - print '
'.img_picto('','edit').' '.$langs->trans('Modify').'
'; - print ''; - print ''; - print '
'.img_picto('','edit').' '.$langs->trans('Modify').'
'; - print ''; - print ''; - print '
'.img_picto('','edit').' '.$langs->trans('Modify').'

'; diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index a44d67d87a9..0efcb94d079 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -146,7 +146,9 @@ if ($action == 'create') /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { - print "
"; + $langs->load("members"); + + print "
"; print_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b3e5f8f47d8..b17bc624a3c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2142,10 +2142,12 @@ abstract class CommonObject */ function insertExtraFields() { - global $langs; + global $conf,$langs; $error=0; + if (! empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return 0; // For avoid conflicts if trigger used + if (! empty($this->array_options)) { // Check parameters @@ -2249,7 +2251,7 @@ abstract class CommonObject $out = ''; - if(count($extrafields->attribute_label) > 0) + if (count($extrafields->attribute_label) > 0) { $out .= "\n"; $out .= ' '; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c651603451d..e9d02fe4fd0 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -688,54 +688,52 @@ class ExtraFields { $param_list=array_keys($param['options']); $InfoFieldList = explode(":", $param_list[0]); + // 0 : tableName + // 1 : label field name + // 2 : key fields name (if differ of rowid) + // 3 : key field parent (for dependent lists) + // 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value + $keyList=(empty($InfoFieldList[2])?'rowid':$InfoFieldList[2].' as rowid'); - // 0 1 : tableName - // 1 2 : label field name Nom du champ contenant le libelle - // 2 3 : key fields name (if differ of rowid) - // 3 4 : key field parent (for dependent lists) - // 4 5 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value - - - $keyList='rowid'; - - if (count($InfoFieldList)>=3) { + if (count($InfoFieldList) > 3 && ! empty($InfoFieldList[3])) + { list($parentName, $parentField) = explode('|', $InfoFieldList[3]); $keyList.= ', '.$parentField; } - if (count($InfoFieldList)>=4 && !empty($InfoFieldList[4])) { + if (count($InfoFieldList) > 4 && ! empty($InfoFieldList[4])) + { if (strpos($InfoFieldList[4], 'extra')!==false) { $keyList='main.'.$InfoFieldList[2].' as rowid'; - }else { + } else { $keyList=$InfoFieldList[2].' as rowid'; } } - $fields_label = explode('|',$InfoFieldList[1]); - if(is_array($fields_label)) { - $keyList .=', '; - $keyList .= implode(', ', $fields_label); - } - - $fields_label = explode('|',$InfoFieldList[1]); - if(is_array($fields_label)) { + if (is_array($fields_label)) + { $keyList .=', '; $keyList .= implode(', ', $fields_label); } + $sqlwhere=''; $sql = 'SELECT '.$keyList; $sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0]; - if (!empty($InfoFieldList[4])) { - + if (!empty($InfoFieldList[4])) + { //We have to join on extrafield table - if (strpos($InfoFieldList[4], 'extra')!==false) { + if (strpos($InfoFieldList[4], 'extra')!==false) + { $sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra'; - $sql.= ' WHERE extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4]; - }else { - $sql.= ' WHERE '.$InfoFieldList[4]; + $sqlwhere.= ' AND extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4]; + } + else + { + $sqlwhere.= ' AND '.$InfoFieldList[4]; } } - //$sql.= ' WHERE entity = '.$conf->entity; + if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it. + $sql.=preg_replace('/^ AND /','',$sqlwhere); //print $sql; dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql); @@ -807,6 +805,9 @@ class ExtraFields } $this->db->free($resql); } + else { + print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; + } } $out.=''; } @@ -1005,13 +1006,14 @@ class ExtraFields } /** - * Fill array_options array for object by extrafields value (using for data send by forms) + * Fill array_options property of object by extrafields value (using for data sent by forms) * * @param array $extralabels $array of extrafields - * @param object &$object object + * @param object &$object Object + * @param string $onlykey Only following key is filled * @return int 1 if array_options set / 0 if no value */ - function setOptionalsFromPost($extralabels,&$object) + function setOptionalsFromPost($extralabels,&$object,$onlykey='') { global $_POST, $langs; $nofillrequired='';// For error when required field left blank @@ -1022,6 +1024,8 @@ class ExtraFields // Get extra fields foreach ($extralabels as $key => $value) { + if (! empty($onlykey) && $key != $onlykey) continue; + $key_type = $this->attribute_type[$key]; if($this->attribute_required[$key] && !GETPOST("options_$key",2)) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index dc8ca8a30be..3ba7fee84c4 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3664,7 +3664,7 @@ class Form * @param string $typehour if 'select' then input hour and input min is a combo, if 'text' input hour is in text and input min is a combo * @return void */ - function select_duration($prefix,$iSecond='',$disabled=0,$typehour='select') + function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select') { global $langs; @@ -3680,7 +3680,7 @@ class Form if ($typehour=='select') { print ''; - print ''; - print ''; - } - foreach($extrafields->attribute_label as $key=>$label) { if ($action == 'edit_extras') { @@ -1319,35 +1278,27 @@ else if ($id > 0 || ! empty($ref)) { $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); } - if ($action == 'edit_extras' && $user->rights->ficheinter->creer) + if ($action == 'edit_extras' && $user->rights->ficheinter->creer && GETPOST('attribute') == $key) { + print '
'; + print ''; + print ''; + print ''; + print ''; + print $extrafields->showInputField($key,$value); + + print ''; + print '
'; } else { print $extrafields->showOutputField($key,$value); + if ($object->statut == 0 && $user->rights->ficheinter->creer) print ''.img_picto('','edit').' '.$langs->trans('Modify').''; } print ''."\n"; } } - - if(count($extrafields->attribute_label) > 0) { - - if ($action == 'edit_extras' && $user->rights->ficheinter->creer) - { - print ''; - print ''; - print ''; - print ''; - - } - else { - if ($object->statut == 0 && $user->rights->ficheinter->creer) - { - print ''.img_picto('','edit').' '.$langs->trans('Modify').''; - } - } - } } print "
"; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 46e2fbd3f77..b9b5de0abb3 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1005,6 +1005,7 @@ BrowserIsKO=You are using the web browser %s. This browser is known to be a bad XDebugInstalled=XDebug est chargé. XCacheInstalled=XCache is loaded. AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink +FieldEdition=Edition of field %s ##### Module password generation PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: 8 characters containing shared numbers and characters in lowercase. PasswordGenerationNone=Do not suggest any generated password. Password must be type in manually. diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index ec925209b2c..e7c056ef5ee 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -118,7 +118,6 @@ LastMembers=Last %s members LastMembersModified=Last %s modified members LastSubscriptionsModified=Last %s modified subscriptions AttributeName=Attribute name -FieldEdition=Edition of field %s String=String Text=Text Int=Int diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index c841e290d46..dde859dcf2b 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1017,6 +1017,7 @@ EncryptedPasswordInDatabase=Permettre le chiffrement des mots de passe dans la b DisableForgetPasswordLinkOnLogonPage=Ne pas afficher le lien "Mot de passe oublié" sur la page de connexion UsersSetup=Configuration du module utilisateurs UserMailRequired=Email requis pour créer un nouvel utilisateur +FieldEdition=Édition du champ %s ##### Company setup ##### CompanySetup=Configuration du module Tiers CompanyCodeChecker=Modèle de génération et contrôle des codes tiers (clients/fournisseurs) diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 4b1c8b8d28b..9f508ff3fcd 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -118,7 +118,6 @@ LastMembers=Les %s derniers adhérents LastMembersModified=Les %s derniers adhérents modifiés LastSubscriptionsModified=Les %s dernières adhésions modifiées AttributeName=Nom de l'attribut -FieldEdition=Édition du champ %s String=Chaîne Text=Texte long Int=Numérique From 223e50276c95503e6af17b4668132fe64c596290 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Nov 2013 14:24:37 +0100 Subject: [PATCH 43/48] Fix: Info tab was wrong with interventions --- htdocs/core/lib/functions2.lib.php | 36 ++++++++++++++-------- htdocs/fichinter/class/fichinter.class.php | 15 +++++---- htdocs/fichinter/info.php | 26 +++++++++------- 3 files changed, 46 insertions(+), 31 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index dfe83f28fa2..6f55b8d130b 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -205,13 +205,15 @@ function dol_print_object_info($object) print $langs->trans("CreatedBy").': '; if (is_object($object->user_creation)) { - print $object->user_creation->getNomUrl(1); + if ($object->user_creation->id) print $object->user_creation->getNomUrl(1); + else print $langs->trans("Unknown"); } else { $userstatic=new User($db); $userstatic->fetch($object->user_creation); - print $userstatic->getNomUrl(1); + if ($userstatic->id) print $userstatic->getNomUrl(1); + else print $langs->trans("Unknown"); } print '
'; } @@ -230,13 +232,15 @@ function dol_print_object_info($object) print $langs->trans("ModifiedBy").': '; if (is_object($object->user_modification)) { - print $object->user_modification->getNomUrl(1); + if ($object->user_modification->id) print $object->user_modification->getNomUrl(1); + else print $langs->trans("Unknown"); } else { $userstatic=new User($db); $userstatic->fetch($object->user_modification); - print $userstatic->getNomUrl(1); + if ($userstatic->id) print $userstatic->getNomUrl(1); + else print $langs->trans("Unknown"); } print '
'; } @@ -255,13 +259,15 @@ function dol_print_object_info($object) print $langs->trans("ValidatedBy").': '; if (is_object($object->user_validation)) { - print $object->user_validation->getNomUrl(1); + if ($object->user_validation->id) print $object->user_validation->getNomUrl(1); + else print $langs->trans("Unknown"); } else { $userstatic=new User($db); $userstatic->fetch($object->user_validation); - print $userstatic->getNomUrl(1); + if ($userstatic->id) print $userstatic->getNomUrl(1); + else print $langs->trans("Unknown"); } print '
'; } @@ -280,13 +286,15 @@ function dol_print_object_info($object) print $langs->trans("ApprovedBy").': '; if (is_object($object->user_approve)) { - print $object->user_approve->getNomUrl(1); + if ($object->user_approve->id) print $object->user_approve->getNomUrl(1); + else print $langs->trans("Unknown"); } else { $userstatic=new User($db); $userstatic->fetch($object->user_approve); - print $userstatic->getNomUrl(1); + if ($userstatic->id) print $userstatic->getNomUrl(1); + else print $langs->trans("Unknown"); } print '
'; } @@ -305,13 +313,15 @@ function dol_print_object_info($object) print $langs->trans("ClosedBy").': '; if (is_object($object->user_cloture)) { - print $object->user_cloture->getNomUrl(1); + if ($object->user_cloture->id) print $object->user_cloture->getNomUrl(1); + else print $langs->trans("Unknown"); } else { $userstatic=new User($db); $userstatic->fetch($object->user_cloture); - print $userstatic->getNomUrl(1); + if ($userstatic->id) print $userstatic->getNomUrl(1); + else print $langs->trans("Unknown"); } print '
'; } @@ -330,13 +340,15 @@ function dol_print_object_info($object) print $langs->trans("ConciliatedBy").': '; if (is_object($object->user_rappro)) { - print $object->user_rappro->getNomUrl(1); + if ($object->user_rappro->id) print $object->user_rappro->getNomUrl(1); + else print $langs->trans("Unknown"); } else { $userstatic=new User($db); $userstatic->fetch($object->user_rappro); - print $userstatic->getNomUrl(1); + if ($userstatic->id) print $userstatic->getNomUrl(1); + else print $langs->trans("Unknown"); } print '
'; } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 2683bea68b8..13a26e857d2 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -607,9 +607,9 @@ class Fichinter extends CommonObject } /** - * Information sur l'objet fiche intervention + * Load information on object * - * @param int $id Id de la fiche d'intervention + * @param int $id Id of object * @return void */ function info($id) @@ -625,13 +625,12 @@ class Fichinter extends CommonObject $sql.= " WHERE f.rowid = ".$id; $sql.= " AND f.entity = ".$conf->entity; - $result = $this->db->query($sql); - - if ($result) + $resql = $this->db->query($sql); + if ($resql) { - if ($this->db->num_rows($result)) + if ($this->db->num_rows($resql)) { - $obj = $this->db->fetch_object($result); + $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -649,7 +648,7 @@ class Fichinter extends CommonObject $this->user_validation = $vuser; } } - $this->db->free($result); + $this->db->free($resql); } else { diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php index 957f4b315ce..b3bc8295d2c 100644 --- a/htdocs/fichinter/info.php +++ b/htdocs/fichinter/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009-2010 Laurent Destailleur + * Copyright (C) 2009-2013 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -31,32 +31,36 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; $langs->load('companies'); $langs->load("interventions"); -$fichinterid = GETPOST('id','int'); +$id = GETPOST('id','int'); // Security check if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter'); +$object = new Fichinter($db); + +if ($id > 0) +{ + $object->fetch($id); +} + /* -* View -*/ + * View + */ llxHeader(); -$fichinter = new Fichinter($db); -$fichinter->fetch($fichinterid); - $societe = new Societe($db); -$societe->fetch($fichinter->socid); +$societe->fetch($object->socid); -$head = fichinter_prepare_head($fichinter); +$head = fichinter_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans('InterventionCard'), 0, 'intervention'); -$fichinter->info($fichinter->id); +$object->info($object->id); print '
'; -dol_print_object_info($fichinter); +dol_print_object_info($object); print '
'; print '
'; From a9a2bd9eec121cee160278396446e2ed276374b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Nov 2013 14:39:25 +0100 Subject: [PATCH 44/48] Fix error reported by travis. --- htdocs/core/modules/modSkype.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modSkype.class.php b/htdocs/core/modules/modSkype.class.php index ef2a5f47446..3102ba97777 100644 --- a/htdocs/core/modules/modSkype.class.php +++ b/htdocs/core/modules/modSkype.class.php @@ -65,10 +65,10 @@ class modSkype extends DolibarrModules // Dependancies //------------- - $this->hidden = ! empty($conf->global->SKYPE_MODULE_DISABLED); // A condition to disable module - $this->depends = array(modSociete); // List of modules id that must be enabled if this module is enabled + $this->hidden = ! empty($conf->global->SKYPE_MODULE_DISABLED); // A condition to disable module + $this->depends = array('modSociete'); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled - $this->conflictwith = array(); // List of modules id this module is in conflict with + $this->conflictwith = array(); // List of modules id this module is in conflict with $this->langfiles = array(); // Constantes From 628fbc7b7d4bfe59ffc8a4eca22e0a6b72db087c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Nov 2013 15:14:23 +0100 Subject: [PATCH 45/48] Fix: bad picto --- htdocs/admin/fichinter.php | 3 +-- htdocs/fichinter/admin/fichinter_extrafields.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index a80c41cd60b..fd2ea1dc966 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -220,11 +220,10 @@ $form=new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup'); -print "
"; $head=fichinter_admin_prepare_head(); -dol_fiche_head($head, 'ficheinter', $langs->trans("ModuleSetup")); +dol_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), 0, 'intervention'); // Interventions numbering model diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php index f503e9a184e..06fefb32fbe 100644 --- a/htdocs/fichinter/admin/fichinter_extrafields.php +++ b/htdocs/fichinter/admin/fichinter_extrafields.php @@ -71,7 +71,7 @@ print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup'); $head=fichinter_admin_prepare_head(); -dol_fiche_head($head, 'attributes', $langs->trans("Ficheinter"), 0, 'fichinter'); +dol_fiche_head($head, 'attributes', $langs->trans("Interventions"), 0, 'intervention'); print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n"; From a14de0c035bb59024a41c58c8c82e71a47fae1b3 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Tue, 5 Nov 2013 15:29:33 +0100 Subject: [PATCH 46/48] fix : language --- README-FR | 2 +- htdocs/adherents/admin/adherent.php | 2 +- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/commande/document.php | 2 +- htdocs/core/lib/xcal.lib.php | 4 ++-- htdocs/core/modules/modProjet.class.php | 12 ++++++------ htdocs/cron/card.php | 8 ++++---- htdocs/cron/list.php | 2 +- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/commande/document.php | 2 +- htdocs/fourn/facture/document.php | 2 +- htdocs/langs/fr_FR/admin.lang | 4 ++-- htdocs/langs/fr_FR/cron.lang | 2 +- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/README-FR b/README-FR index 8b3900ff78c..c89314be22a 100644 --- a/README-FR +++ b/README-FR @@ -123,6 +123,6 @@ Voici un liste de fonctionnalites pas encore gérées par Dolibarr: - Dolibarr ne gère qu'une seule monnaie à la fois (mono-devise). - Dolibarr ne gère en standard qu'une société/institution/association mère (mono-société). Pour en gérer plusieurs (comme vos filiales), il faut, soit faire plusieurs installations de Dolibarr, soit installer le module MultiCompany qui permet de gérer n société/institutions/associations dans une seule instance par une isolation logique des données. - Dolibarr ne contient pas de module de Gestion de la paie. -- Les taches du module de gestion de projets n'ont pas de dépendance entre elle. +- Les tâches du module de gestion de projets n'ont pas de dépendance entre elle. - Dolibarr ne contient pas de Webmail. - Dolibarr ne fait pas le café (pas encore). diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 275e9323223..d6e97de921e 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -263,7 +263,7 @@ print '
'; /* - * Edition des variables globales non rattache a un theme specifique + * Edition des variables globales non rattachées à un theme specifique */ $constantes=array( 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT', diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 5d7f493f2cf..b03d67f1701 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1710,7 +1710,7 @@ class Propal extends CommonObject { if ($statut == 2) { - // Classe la societe rattachee comme client + // Classe la société rattachée comme client $soc=new Societe($this->db); $soc->id = $this->socid; $result=$soc->set_as_client(); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 61ad0aac194..0f2925cf455 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -21,7 +21,7 @@ /** * \file htdocs/commande/document.php * \ingroup order - * \brief Page de gestion des documents attachees a une commande + * \brief Documents setup page attached to an order */ require '../main.inc.php'; diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index f8f8524743a..9badeae5290 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -116,7 +116,7 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile) LOCATION: SEQUENCE:0 STATUS:CONFIRMED - SUMMARY:Tache 1 heure + SUMMARY:Tâche 1 heure TRANSP:OPAQUE END:VEVENT @@ -132,7 +132,7 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile) LOCATION: SEQUENCE:0 STATUS:CONFIRMED - SUMMARY:Tache 1 jour + SUMMARY:Tâche 1 jour TRANSP:TRANSPARENT END:VEVENT */ diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 584a8e3494f..a384a1a9739 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -125,28 +125,28 @@ class modProjet extends DolibarrModules $r++; $this->rights[$r][0] = 41; // id de la permission - $this->rights[$r][1] = "Lire les projets et taches (partagés ou dont je suis contact)"; // libelle de la permission + $this->rights[$r][1] = "Lire les projets et tâches (partagés ou dont je suis contact)"; // libelle de la permission $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 1; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'lire'; $r++; $this->rights[$r][0] = 42; // id de la permission - $this->rights[$r][1] = "Creer/modifier les projets et taches (partagés ou dont je suis contact)"; // libelle de la permission + $this->rights[$r][1] = "Creer/modifier les projets et tâches (partagés ou dont je suis contact)"; // libelle de la permission $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'creer'; $r++; $this->rights[$r][0] = 44; // id de la permission - $this->rights[$r][1] = "Supprimer les projets et taches (partagés ou dont je suis contact)"; // libelle de la permission + $this->rights[$r][1] = "Supprimer les projets et tâches (partagés ou dont je suis contact)"; // libelle de la permission $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'supprimer'; $r++; $this->rights[$r][0] = 141; // id de la permission - $this->rights[$r][1] = "Lire tous les projets et taches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission + $this->rights[$r][1] = "Lire tous les projets et tâches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'all'; @@ -154,7 +154,7 @@ class modProjet extends DolibarrModules $r++; $this->rights[$r][0] = 142; // id de la permission - $this->rights[$r][1] = "Creer/modifier tous les projets et taches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission + $this->rights[$r][1] = "Creer/modifier tous les projets et tâches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'all'; @@ -162,7 +162,7 @@ class modProjet extends DolibarrModules $r++; $this->rights[$r][0] = 144; // id de la permission - $this->rights[$r][1] = "Supprimer tous les projets et taches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission + $this->rights[$r][1] = "Supprimer tous les projets et tâches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'all'; diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 81e0ba99f26..c7110654781 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -120,7 +120,7 @@ if ($action=='add') $object->unitfrequency=GETPOST('unitfrequency','int'); $object->frequency=$object->unitfrequency * GETPOST('nbfrequency','int'); - //Ajout de la tache cron + //Add cron task $result = $object->create($user); // test du Resultat de la requete @@ -154,7 +154,7 @@ if ($action=='update') $object->unitfrequency=GETPOST('unitfrequency','int'); $object->frequency=$object->unitfrequency * GETPOST('nbfrequency','int'); - //Ajout de la tache cron + //Add cron task $result = $object->update($user); // test du Resultat de la requete @@ -172,7 +172,7 @@ if ($action=='activate') { $object->status=1; - //Ajout de la tache cron + //Add cron task $result = $object->update($user); // test du Resultat de la requete @@ -189,7 +189,7 @@ if ($action=='activate') if ($action=='inactive') { $object->status=0; - //Ajout de la tache cron + //Add cron task $result = $object->update($user); // test du Resultat de la requete diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 7c391558cb9..8d27450eaf8 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -79,7 +79,7 @@ if (!empty($search_label)) // Delete jobs if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->delete){ - //Delete de la tache cron + //Delete cron task $object = new Cronjob($db); $object->id=$id; $result = $object->delete($user); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 20425b07310..136063d4552 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -569,7 +569,7 @@ class Expedition extends CommonObject if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire ($this->ref = ancienne ref, $numfa = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // in order not to lose the attached files $oldref = dol_sanitizeFileName($this->ref); $newref = dol_sanitizeFileName($numref); $dirsource = $conf->expedition->dir_output.'/sending/'.$oldref; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 6f6f9e91867..467a59adba1 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -355,7 +355,7 @@ class CommandeFournisseur extends CommonOrder if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire ($this->ref = ancienne ref, $num = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // in order not to lose the attached files $oldref = dol_sanitizeFileName($this->ref); $newref = dol_sanitizeFileName($num); $dirsource = $conf->fournisseur->dir_output.'/commande/'.$oldref; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 2e8269055ea..a237ef49a5f 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -897,7 +897,7 @@ class FactureFournisseur extends CommonInvoice if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // in order not to lose the attached files $facref = dol_sanitizeFileName($this->ref); $snumfa = dol_sanitizeFileName($num); diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index da72a325574..63c5a43f912 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -22,7 +22,7 @@ /** * \file htdocs/fourn/commande/document.php * \ingroup supplier - * \brief Page de gestion des documents attachees a une commande fournisseur + * \brief Page de gestion des documents attaches a une commande fournisseur */ require '../../main.inc.php'; diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 12daf37060c..d75b81f402a 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -21,7 +21,7 @@ /** * \file htdocs/fourn/facture/document.php * \ingroup facture, fournisseur - * \brief Page de gestion des documents attachees a une facture fournisseur + * \brief Page de gestion des documents attaches a une facture fournisseur */ require '../../main.inc.php'; diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 5c6c340d1ad..8d73250d652 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1471,8 +1471,8 @@ TestGeoIPResult=Test de conversion IP -> Pays ProjectsNumberingModules=Modèles de numérotation des références projets ProjectsSetup=Configuration du module Projets ProjectsModelModule=Modèles de document de rapport projets -TasksNumberingModules=Modèles de numérotation des références taches -TaskModelModule=Modèles de document de rapport taches +TasksNumberingModules=Modèles de numérotation des références tâches +TaskModelModule=Modèles de document de rapport tâches ##### ECM (GED) ##### ECMSetup = Configuration du module GED ECMAutoTree = L'arborescence automatique est disponible diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang index 32546eac28c..d4e10c80fca 100644 --- a/htdocs/langs/fr_FR/cron.lang +++ b/htdocs/langs/fr_FR/cron.lang @@ -68,7 +68,7 @@ CronPriority=Priorité CronLabel=Description CronNbRun=Nb. exec. CronEach=Tous les -JobFinished=Tache lancée et terminée +JobFinished=Tâche lancée et terminée # #Page card From 2d7181553bbd6f03f4f8aac249cb02db7311544e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Nov 2013 15:29:58 +0100 Subject: [PATCH 47/48] Fix: translation --- htdocs/comm/fiche.php | 9 ++------- htdocs/fourn/fiche.php | 7 +------ htdocs/langs/en_US/members.lang | 1 + htdocs/langs/fr_FR/members.lang | 1 + htdocs/societe/canvas/actions_card_common.class.php | 2 +- htdocs/societe/soc.php | 2 +- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index b54e3f955d2..c648a7d312b 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -197,9 +197,8 @@ if ($id > 0) print '
'; - //print ''; - //print '
'; + print ''; print ''; print "\n"; @@ -469,8 +468,6 @@ if ($id > 0) print '
'; - //print "\n"; - //print '
"; - //print "
'.$langs->trans("ThirdPartyName").''; @@ -459,7 +458,7 @@ if ($id > 0) } else { - print $langs->trans("UserNotLinkedToMember"); + print $langs->trans("ThirdpartyNotLinkedToMember"); } print '
'; // Nbre max d'elements des petites listes @@ -807,8 +804,6 @@ if ($id > 0) print ''; print '
'; - //print "
"; dol_fiche_end(); diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 27beceeb979..9f3b32166dc 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -99,8 +99,6 @@ if ($object->fetch($id)) print '
'; - //print ''; - //print ''; print "\n"; From 092c98e6aa0ecb3cc83c61f3941dde4044948a28 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 5 Nov 2013 20:51:32 +0100 Subject: [PATCH 48/48] Changelog & lang en_US for Skype module --- ChangeLog | 3 +++ htdocs/langs/en_US/admin.lang | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 72a1ecf49ba..51a6e2664ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -73,6 +73,9 @@ For users: - Fix: [ bug #1022 ] correct margin calculation for credit notes. - Fix: Better management of using ajax for upload form (to solve problem when enabling ajax jquery multifile upload in some cases). +New experimental module: +- New: [ task #157 ] Add a Skype button (adherents / third parties / contacts) + For translators: - Qual: Normalized sort order of all languages files with English reference files. - New: Add language code files for South Africa, France new Caledonia, Vietnam. diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index b9b5de0abb3..8fe0d7aabe2 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -487,6 +487,8 @@ Module2700Desc= Use online Gravatar service (www.gravatar.com) to show photo of Module2800Desc=FTP Client Module2900Name= GeoIPMaxmind Module2900Desc= GeoIP Maxmind conversions capabilities +Module3100Name= Skype +Module3100Desc= Add a Skype button into card of adherents / third parties / contacts Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow
'; print ''; print ''; print "\n"; @@ -273,7 +271,6 @@ if ($object->fetch($id)) print '
'; - //print '
'; - //print '
'.$langs->trans("ThirdPartyName").''; @@ -263,7 +261,7 @@ if ($object->fetch($id)) } else { - print $langs->trans("UserNotLinkedToMember"); + print $langs->trans("ThirdpartyNotLinkedToMember"); } print '
'; $var=true; @@ -428,8 +425,6 @@ if ($object->fetch($id)) print ''; print '
'; - //print '
' . "\n"; dol_fiche_end(); diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index e7c056ef5ee..5c12d9c3aa3 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -8,6 +8,7 @@ Members=Members MemberAccount=Member login ShowMember=Show member card UserNotLinkedToMember=User not linked to a member +ThirdpartyNotLinkedToMember=Third-party not linked to a member MembersTickets=Members Tickets FundationMembers=Foundation members Attributs=Attributes diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 9f508ff3fcd..92a06886712 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -8,6 +8,7 @@ Members=Adhérents MemberAccount=Login adhérent ShowMember=Afficher fiche adhérent UserNotLinkedToMember=Utilisateur non lié à un adhérent +ThirdpartyNotLinkedToMember=Tiers non lié à un adhérent MembersTickets=Étiquettes d'adhérents FundationMembers=Membres de l'association Attributs=Attributs diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 89776835e2a..7bc1ac8fef1 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -618,7 +618,7 @@ abstract class ActionsCardCommon } else { - $this->tpl['linked_member'] = $langs->trans("UserNotLinkedToMember"); + $this->tpl['linked_member'] = $langs->trans("ThirdpartyNotLinkedToMember"); } } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index e8c8378eee0..9001894c149 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1793,7 +1793,7 @@ else } else { - print $langs->trans("UserNotLinkedToMember"); + print $langs->trans("ThirdpartyNotLinkedToMember"); } print '