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
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 '
';
@@ -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..c648a7d312b 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
@@ -196,9 +197,8 @@ if ($id > 0)
print '
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)
@@ -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)
@@ -1003,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/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/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang
index ec925209b2c..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
@@ -118,7 +119,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 1c27019bce1..5c6c340d1ad 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)
@@ -972,7 +972,10 @@ 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)
+ExtraFieldsCustomerInvoices=Attributs supplémentaires (factures clients)
ExtraFieldsSupplierInvoices=Attributs supplémentaires (factures)
ExtraFieldsProject=Attributs supplémentaires (projets)
ExtraFieldsProjectTask=Attributs supplémentaires (tâches)
@@ -1015,6 +1018,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..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
@@ -118,7 +119,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
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index 0adff43ac47..22de2273820 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,$object,$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,$object,$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);
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 '
'.$langs->trans("RefTask").'
';
print '
'.$langs->trans("LabelTask").'
';
print '
'.$langs->trans("DateStart").'
';
print '
'.$langs->trans("DateEnd").'
';
+print '
'.$langs->trans("PlannedWorkload").'
';
print '
'.$langs->trans("Progress").'
';
print '
'.$langs->trans("TimeSpent").'
';
print '
'.$langs->trans("AddDuration").'
';
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/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 162550a162b..a7d4ce2e850 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;
@@ -1518,22 +1524,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"),'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"),'statut6');
+ 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"),'statut6').' '.$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"),'statut6');
+ 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');
}
}
@@ -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..9001894c149 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 '