Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-dolibarr
This commit is contained in:
commit
65274d4db3
36
ChangeLog
36
ChangeLog
@ -3,7 +3,7 @@ English Dolibarr ChangeLog
|
|||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
***** 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.
|
Fix: Option drop table into backup was broken.
|
||||||
|
|
||||||
***** ChangeLog for 3.5 compared to 3.4.* *****
|
***** ChangeLog for 3.5 compared to 3.4.* *****
|
||||||
For users:
|
For users:
|
||||||
@ -11,7 +11,7 @@ For users:
|
|||||||
- New: More options to select status of users into select user list.
|
- New: More options to select status of users into select user list.
|
||||||
- New: [ task #862 ] Add ODT on shipments.
|
- New: [ task #862 ] Add ODT on shipments.
|
||||||
- New: [ task #149 ] Add # of notes and attachments in tabs.
|
- 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 #877 ] Reorganize menus.
|
||||||
- New: [ task #858 ] Holiday module: note on manual holiday assignation.
|
- 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
|
- 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 script export-bank-receipts.php
|
||||||
- New: Add option "filter=bank" onto script rebuild_merge_pdf.php to merge PDF that
|
- New: Add option "filter=bank" onto script rebuild_merge_pdf.php to merge PDF that
|
||||||
has one payment on a specific bank account.*
|
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: Show process id in all command line scripts.
|
||||||
- New: Module mailman can subscribe/unsubscribe to ML according to categories or type of member.
|
- 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: Add options to send an email when paypal or paybox payment is done.
|
||||||
- New: Clone product/service composition.
|
- New: Clone product/service composition.
|
||||||
- New: [ task #926 ] Add extrafield feature on order lines.
|
- 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 a cron module to define scheduled jobs.
|
||||||
- New: Add new graphical boxes (customer and supplier invoices and orders per month).
|
- 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: [ 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 MAIN_GENERATE_DOCUMENT_WITH_PICTURE.
|
||||||
- New: Add option excludethirdparties and onlythirdparties into merge pdf scripts.
|
- New: Add option excludethirdparties and onlythirdparties into merge pdf scripts.
|
||||||
- New: [ task #925 ] Add ODT document generation for Tasks in project module.
|
- New: [ task #925 ] Add ODT document generation for Tasks in project module.
|
||||||
- New: [ task #924 ] Add numbering rule on task.
|
- New: [ task #924 ] Add numbering rule on task.
|
||||||
- New: [ task #165 ] Add import/export of multiprices.
|
- New: [ task #165 ] Add import/export of multiprices.
|
||||||
- New: Add Maghreb regions and departments.
|
- 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 #1005 ] Adapting to Spanish legislation bill numbering
|
||||||
- New: [ task #1011 ] Now supplier order and invoice deal with payment terms and mode.
|
- 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 #1016 ] Can define a specific numbering for deposits.
|
||||||
- New: [ task #918 ] Stock replenishment.
|
- New: [ task #918 ] Stock replenishment.
|
||||||
- New : Add pdf link into supplier invoice list and supplier order list.
|
- 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: Add hidden option MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS.
|
||||||
- New: Can send an email from thirdparty card.
|
- New: Can send an email from thirdparty card.
|
||||||
- New: Can cancel holidays that were previously validated.
|
- 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 hidden option MAIN_FORCE_DEFAULT_STATE_ID.
|
||||||
- New: Add page to make mass stock movement.
|
- New: Add page to make mass stock movement.
|
||||||
- New: Add field oustanding limit into thirdparty properties.
|
- 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).
|
- Fix: Better management of using ajax for upload form (to solve problem when enabling ajax jquery multifile upload in some cases).
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- Qual: Normalized sort order of all languages files with english reference files.
|
- 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: Add language code files for South Africa, France new Caledonia, Vietnam.
|
||||||
- New: Translate string for email to change password.
|
- New: Translate string for email to change password.
|
||||||
|
|
||||||
For developers:
|
For developers:
|
||||||
@ -93,14 +93,14 @@ For developers:
|
|||||||
key to use a specific language file.
|
key to use a specific language file.
|
||||||
- New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables.
|
- 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: All nowrap properties are now using CSS class nowrap.
|
||||||
- Qual: Move hardcoded code of module mailmanspip into trigger.
|
- 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 vlue that is list name,
|
- 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
|
separated by a coma, of other POST parameters, Dolibarr will automatically save this parameters
|
||||||
into user cookies.
|
into user cookies.
|
||||||
- New: Add hook addHomeSetup.
|
- New: Add hook addHomeSetup.
|
||||||
- New: Add trigger CATEGORY_LINK and CATEGORY_UNLINK.
|
- New: Add trigger CATEGORY_LINK and CATEGORY_UNLINK.
|
||||||
- New: A trigger can return an array of error strings instead of one error string.
|
- 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.
|
- New: Add update method for web service product.
|
||||||
- Fix also several bugs with old code.
|
- 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:
|
Goal is to fix old compatibility code that does not match hook specifications:
|
||||||
http://wiki.dolibarr.org/index.php/Hooks_system
|
http://wiki.dolibarr.org/index.php/Hooks_system
|
||||||
|
|
||||||
2) If you implemented hook printTopRightMenu, check that output does not include '<td>' tags anymore.
|
2) If you implemented hook printTopRightMenu, check that output does not include '<td>' tags any more.
|
||||||
All content added must be tagged by a '<div>' with css class="login_block_elem"
|
All content added must be tagged by a '<div>' with css class="login_block_elem"
|
||||||
|
|
||||||
3) Some methods object->addline used a first parameter that was object->id, some not. Of course
|
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.
|
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().
|
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: [ bug #1029 ] Tulip numbering mask
|
||||||
Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card
|
Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card
|
||||||
Fix: [ bug #1033 ] SUPPLIER REF disappeared
|
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: Fix bug with canvas thirdparty
|
||||||
Fix: [ bug #1037 ] Consumption> Supplier invoices related
|
Fix: [ bug #1037 ] Consumption> Supplier invoices related
|
||||||
Fix: User group name do not display in card (view or edit mode)
|
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: [ bug #1039 ] Pre-defined invoices conversion
|
||||||
Fix: If only service module is activated, it's impossible to delete service
|
Fix: If only service module is activated, it's impossible to delete service
|
||||||
Fix: [ bug #1043 ] Bad interventions ref numbering
|
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: Mailing module : if an email is already in destinaires list all other email from selector was not inserted
|
||||||
Fix: Localtaxes balance not showing
|
Fix: Localtaxes balance not showing
|
||||||
Fix: Intervention box links to contracts id
|
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: Edit propal line was losing product supplier price id
|
||||||
Fix: Delete linked element to supplier invoice when deleted
|
Fix: Delete linked element to supplier invoice when deleted
|
||||||
Fix: [ bug #1061 ] Bad info shipped products
|
Fix: [ bug #1061 ] Bad info shipped products
|
||||||
|
|||||||
@ -65,6 +65,7 @@ class Adherent extends CommonObject
|
|||||||
var $country;
|
var $country;
|
||||||
|
|
||||||
var $email;
|
var $email;
|
||||||
|
var $skype;
|
||||||
var $phone;
|
var $phone;
|
||||||
var $phone_perso;
|
var $phone_perso;
|
||||||
var $phone_mobile;
|
var $phone_mobile;
|
||||||
@ -430,6 +431,7 @@ class Adherent extends CommonObject
|
|||||||
$sql.= ", country=".($this->country_id>0?"'".$this->country_id."'":"null");
|
$sql.= ", country=".($this->country_id>0?"'".$this->country_id."'":"null");
|
||||||
$sql.= ", state_id=".($this->state_id>0?"'".$this->state_id."'":"null");
|
$sql.= ", state_id=".($this->state_id>0?"'".$this->state_id."'":"null");
|
||||||
$sql.= ", email='".$this->email."'";
|
$sql.= ", email='".$this->email."'";
|
||||||
|
$sql.= ", skype='".$this->skype."'";
|
||||||
$sql.= ", phone=" .($this->phone?"'".$this->db->escape($this->phone)."'":"null");
|
$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_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
|
||||||
$sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"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->societe_id=$this->societe;
|
||||||
|
|
||||||
$luser->email=$this->email;
|
$luser->email=$this->email;
|
||||||
|
$luser->skype=$this->skype;
|
||||||
$luser->office_phone=$this->phone;
|
$luser->office_phone=$this->phone;
|
||||||
$luser->user_mobile=$this->phone_mobile;
|
$luser->user_mobile=$this->phone_mobile;
|
||||||
|
|
||||||
@ -564,6 +567,7 @@ class Adherent extends CommonObject
|
|||||||
$lthirdparty->zip=$this->zip;
|
$lthirdparty->zip=$this->zip;
|
||||||
$lthirdparty->town=$this->town;
|
$lthirdparty->town=$this->town;
|
||||||
$lthirdparty->email=$this->email;
|
$lthirdparty->email=$this->email;
|
||||||
|
$lthirdparty->skype=$this->skype;
|
||||||
$lthirdparty->phone=$this->phone;
|
$lthirdparty->phone=$this->phone;
|
||||||
$lthirdparty->state_id=$this->state_id;
|
$lthirdparty->state_id=$this->state_id;
|
||||||
$lthirdparty->country_id=$this->country_id;
|
$lthirdparty->country_id=$this->country_id;
|
||||||
@ -1047,7 +1051,7 @@ class Adherent extends CommonObject
|
|||||||
global $langs;
|
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 = "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.photo, d.fk_adherent_type, d.morphy, d.entity,";
|
||||||
$sql.= " d.datec as datec,";
|
$sql.= " d.datec as datec,";
|
||||||
$sql.= " d.tms as datem,";
|
$sql.= " d.tms as datem,";
|
||||||
@ -1115,6 +1119,7 @@ class Adherent extends CommonObject
|
|||||||
$this->phone_perso = $obj->phone_perso;
|
$this->phone_perso = $obj->phone_perso;
|
||||||
$this->phone_mobile = $obj->phone_mobile;
|
$this->phone_mobile = $obj->phone_mobile;
|
||||||
$this->email = $obj->email;
|
$this->email = $obj->email;
|
||||||
|
$this->skype = $obj->skype;
|
||||||
|
|
||||||
$this->photo = $obj->photo;
|
$this->photo = $obj->photo;
|
||||||
$this->statut = $obj->statut;
|
$this->statut = $obj->statut;
|
||||||
@ -1782,6 +1787,7 @@ class Adherent extends CommonObject
|
|||||||
$this->country = 'France';
|
$this->country = 'France';
|
||||||
$this->morphy = 1;
|
$this->morphy = 1;
|
||||||
$this->email = 'specimen@specimen.com';
|
$this->email = 'specimen@specimen.com';
|
||||||
|
$this->skype = 'tom.hanson';
|
||||||
$this->phone = '0999999999';
|
$this->phone = '0999999999';
|
||||||
$this->phone_perso = '0999999998';
|
$this->phone_perso = '0999999998';
|
||||||
$this->phone_mobile = '0999999997';
|
$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->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->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->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 && ! 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_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;
|
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
|
||||||
|
|||||||
@ -285,6 +285,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
|||||||
$object->phone_perso = trim($_POST["phone_perso"]);
|
$object->phone_perso = trim($_POST["phone_perso"]);
|
||||||
$object->phone_mobile= trim($_POST["phone_mobile"]);
|
$object->phone_mobile= trim($_POST["phone_mobile"]);
|
||||||
$object->email = trim($_POST["email"]);
|
$object->email = trim($_POST["email"]);
|
||||||
|
$object->skype = trim($_POST["skype"]);
|
||||||
$object->birth = $birthdate;
|
$object->birth = $birthdate;
|
||||||
|
|
||||||
$object->typeid = $_POST["typeid"];
|
$object->typeid = $_POST["typeid"];
|
||||||
@ -413,6 +414,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
|||||||
$phone=$_POST["phone"];
|
$phone=$_POST["phone"];
|
||||||
$phone_perso=$_POST["phone_perso"];
|
$phone_perso=$_POST["phone_perso"];
|
||||||
$phone_mobile=$_POST["phone_mobile"];
|
$phone_mobile=$_POST["phone_mobile"];
|
||||||
|
$skype=$_POST["member_skype"];
|
||||||
$email=$_POST["member_email"];
|
$email=$_POST["member_email"];
|
||||||
$login=$_POST["member_login"];
|
$login=$_POST["member_login"];
|
||||||
$pass=$_POST["password"];
|
$pass=$_POST["password"];
|
||||||
@ -437,6 +439,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
|||||||
$object->phone = $phone;
|
$object->phone = $phone;
|
||||||
$object->phone_perso = $phone_perso;
|
$object->phone_perso = $phone_perso;
|
||||||
$object->phone_mobile= $phone_mobile;
|
$object->phone_mobile= $phone_mobile;
|
||||||
|
$object->skype = $skype;
|
||||||
$object->email = $email;
|
$object->email = $email;
|
||||||
$object->login = $login;
|
$object->login = $login;
|
||||||
$object->pass = $pass;
|
$object->pass = $pass;
|
||||||
@ -844,6 +847,12 @@ else
|
|||||||
// Tel mobile
|
// Tel mobile
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||||
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
||||||
@ -1080,6 +1089,11 @@ else
|
|||||||
// Tel mobile
|
// Tel mobile
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled)) {
|
||||||
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||||
@ -1398,6 +1412,9 @@ else
|
|||||||
// Tel mobile
|
// Tel mobile
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -220,11 +220,10 @@ $form=new Form($db);
|
|||||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
|
print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
|
||||||
|
|
||||||
print "<br>";
|
|
||||||
|
|
||||||
$head=fichinter_admin_prepare_head();
|
$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
|
// Interventions numbering model
|
||||||
|
|
||||||
|
|||||||
@ -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_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_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_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_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_ADDRESS',GETPOST("fieldaddress"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ZIP',GETPOST("fieldzip"),'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 '</td><td>'.$langs->trans("LDAPFieldMobileExample").'</td>';
|
|||||||
print '<td align="right"><input type="radio" name="key" value="LDAP_CONTACT_FIELD_MOBILE"'.($conf->global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_MOBILE?' checked="checked"':'')."></td>";
|
print '<td align="right"><input type="radio" name="key" value="LDAP_CONTACT_FIELD_MOBILE"'.($conf->global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_MOBILE?' checked="checked"':'')."></td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldSkype").'</td><td>';
|
||||||
|
print '<input size="25" type="text" name="fieldskype" value="'.$conf->global->LDAP_CONTACT_FIELD_SKYPE.'">';
|
||||||
|
print '</td><td>'.$langs->trans("LDAPFieldSkypeExample").'</td>';
|
||||||
|
print '<td align="right"><input type="radio" name="key" value="LDAP_CONTACT_FIELD_SKYPE"'.($conf->global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_SKYPE?' checked="checked"':'')."></td>";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Fax
|
// Fax
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
||||||
|
|||||||
@ -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',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_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_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_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_ADDRESS',GETPOST("fieldaddress"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ZIP',GETPOST("fieldzip"),'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 '</td><td>'.$langs->trans("LDAPFieldMobileExample").'</td>';
|
|||||||
print '<td align="right"> </td>';
|
print '<td align="right"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldSkype").'</td><td>';
|
||||||
|
print '<input size="25" type="text" name="fieldskype" value="'.$conf->global->LDAP_MEMBER_FIELD_SKYPE.'">';
|
||||||
|
print '</td><td>'.$langs->trans("LDAPFieldSkypeExample").'</td>';
|
||||||
|
print '<td align="right"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Fax
|
// Fax
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
||||||
|
|||||||
@ -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_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_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_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_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_DESCRIPTION',GETPOST("fielddescription"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_FIELD_SID',GETPOST("fieldsid"),'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 '</td><td>'.$langs->trans("LDAPFieldMobileExample").'</td>';
|
|||||||
print '<td align="right"><input type="radio" name="key" value="LDAP_FIELD_MOBILE"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_MOBILE)?' checked="checked"':'')."></td>";
|
print '<td align="right"><input type="radio" name="key" value="LDAP_FIELD_MOBILE"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_MOBILE)?' checked="checked"':'')."></td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldSkype").'</td><td>';
|
||||||
|
print '<input size="25" type="text" name="fieldskype" value="'.$conf->global->LDAP_FIELD_SKYPE.'">';
|
||||||
|
print '</td><td>'.$langs->trans("LDAPFieldSkypeExample").'</td>';
|
||||||
|
print '<td align="right"><input type="radio" name="key" value="LDAP_FIELD_SKYPE"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_SKYPE)?' checked="checked"':'')."></td>";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Fax
|
// Fax
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
||||||
@ -383,6 +392,7 @@ if (function_exists("ldap_connect"))
|
|||||||
$conf->global->LDAP_FIELD_PASSWORD_CRYPTED,
|
$conf->global->LDAP_FIELD_PASSWORD_CRYPTED,
|
||||||
$conf->global->LDAP_FIELD_PHONE,
|
$conf->global->LDAP_FIELD_PHONE,
|
||||||
$conf->global->LDAP_FIELD_FAX,
|
$conf->global->LDAP_FIELD_FAX,
|
||||||
|
$conf->global->LDAP_FIELD_SKYPE,
|
||||||
$conf->global->LDAP_FIELD_MOBILE,
|
$conf->global->LDAP_FIELD_MOBILE,
|
||||||
$conf->global->LDAP_FIELD_MAIL,
|
$conf->global->LDAP_FIELD_MAIL,
|
||||||
$conf->global->LDAP_FIELD_TITLE,
|
$conf->global->LDAP_FIELD_TITLE,
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -196,8 +197,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||||
//print '<table width="100%" class="notopnoleftnoright">';
|
|
||||||
//print '<tr><td valign="top" class="notopnoleft">';
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
@ -267,6 +267,12 @@ if ($id > 0)
|
|||||||
// Fax
|
// Fax
|
||||||
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<td>'.$langs->trans('Skype').'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Assujeti a TVA ou pas
|
// Assujeti a TVA ou pas
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';
|
print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';
|
||||||
@ -452,7 +458,7 @@ if ($id > 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $langs->trans("UserNotLinkedToMember");
|
print $langs->trans("ThirdpartyNotLinkedToMember");
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -462,8 +468,6 @@ if ($id > 0)
|
|||||||
|
|
||||||
|
|
||||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
//print "</td>\n";
|
|
||||||
//print '<td valign="top" width="50%" class="notopnoleftnoright">';
|
|
||||||
|
|
||||||
|
|
||||||
// Nbre max d'elements des petites listes
|
// Nbre max d'elements des petites listes
|
||||||
@ -800,8 +804,6 @@ if ($id > 0)
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
print '<div style="clear:both"></div>';
|
print '<div style="clear:both"></div>';
|
||||||
//print "</td></tr>";
|
|
||||||
//print "</table>";
|
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|||||||
@ -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("MailingStatusError").' '.img_error();
|
||||||
if ($obj->statut==1) print $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut4');
|
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==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 '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -100,7 +100,7 @@ $hookmanager->initHooks(array('propalcard'));
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$parameters=array('socid'=>$socid);
|
$parameters=array('socid'=>$socid);
|
||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$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
|
||||||
@ -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)
|
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->propal->supprimer)
|
||||||
{
|
{
|
||||||
$result=$object->delete($user);
|
$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'))
|
if (GETPOST('addfile'))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
@ -451,9 +449,7 @@ if (GETPOST('addfile'))
|
|||||||
$action='presend';
|
$action='presend';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Remove file in email form
|
||||||
* Remove file in email form
|
|
||||||
*/
|
|
||||||
if (GETPOST('removedfile'))
|
if (GETPOST('removedfile'))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
@ -469,7 +465,7 @@ if (GETPOST('removedfile'))
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Send mail
|
* Send mail
|
||||||
*/
|
*/
|
||||||
if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! GETPOST('cancel'))
|
if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! GETPOST('cancel'))
|
||||||
{
|
{
|
||||||
$langs->load('mails');
|
$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)
|
else if ($action == "addline" && $user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
$idprod=GETPOST('idprod', 'int');
|
$idprod=GETPOST('idprod', 'int');
|
||||||
@ -1163,22 +1159,17 @@ else if ($action == 'update_extras')
|
|||||||
{
|
{
|
||||||
// Fill array 'array_options' with data from update form
|
// Fill array 'array_options' with data from update form
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$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) {
|
if (! $error)
|
||||||
$error++;
|
{
|
||||||
$action = 'edit_extras';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$error) {
|
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// FIXME le hook fait double emploi avec le trigger !!
|
// FIXME le hook fait double emploi avec le trigger !!
|
||||||
$hookmanager->initHooks(array('propaldao'));
|
$hookmanager->initHooks(array('propaldao'));
|
||||||
$parameters=array('id'=>$object->id);
|
$parameters=array('id'=>$object->id);
|
||||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
|
||||||
{
|
{
|
||||||
$result=$object->insertExtraFields();
|
$result=$object->insertExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -1186,9 +1177,10 @@ else if ($action == 'update_extras')
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if ($reshook < 0) $error++;
|
else if ($reshook < 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($error) $action = 'edit_extras';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal->creer)
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal->creer)
|
||||||
@ -1254,7 +1246,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal->
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
||||||
|
|
||||||
@ -1615,13 +1607,12 @@ else
|
|||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Ref client
|
// Ref customer
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
|
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
|
||||||
print $langs->trans('RefCustomer').'</td>';
|
print $langs->trans('RefCustomer').'</td>';
|
||||||
print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('RefCustomer')).'</a></td>';
|
|
||||||
print '</td>';
|
|
||||||
if ($action != 'refclient' && ! empty($object->brouillon)) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&id='.$object->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
|
if ($action != 'refclient' && ! empty($object->brouillon)) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&id='.$object->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
|
||||||
|
print '</td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="5">';
|
print '</td><td colspan="5">';
|
||||||
if ($user->rights->propal->creer && $action == 'refclient')
|
if ($user->rights->propal->creer && $action == 'refclient')
|
||||||
@ -1639,6 +1630,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="5">'.$soc->getNomUrl(1).'</td>';
|
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="5">'.$soc->getNomUrl(1).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -1897,20 +1889,12 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes (TODO Move this into an include)
|
||||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||||
$parameters=array('colspan' => ' colspan="3"');
|
$parameters=array('colspan' => ' colspan="3"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$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
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
if ($action == 'edit_extras')
|
|
||||||
{
|
|
||||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
|
|
||||||
print '<input type="hidden" name="action" value="update_extras">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
if ($action == 'edit_extras') {
|
if ($action == 'edit_extras') {
|
||||||
@ -1933,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]);
|
$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 '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
|
||||||
|
print '<input type="hidden" name="action" value="update_extras">';
|
||||||
|
print '<input type="hidden" name="attribute" value="'.$key.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
|
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $extrafields->showOutputField($key,$value);
|
print $extrafields->showOutputField($key,$value);
|
||||||
|
if ($object->statut == 0 && $user->rights->propal->creer) print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras&attribute='.$key.'">'.img_picto('','edit').' '.$langs->trans('Modify').'</a>';
|
||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($extrafields->attribute_label) > 0) {
|
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
|
||||||
{
|
|
||||||
print '<tr><td></td><td colspan="5">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
|
||||||
print '</form>';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($object->statut == 0 && $user->rights->propal->creer)
|
|
||||||
{
|
|
||||||
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Amount HT
|
// Amount HT
|
||||||
|
|||||||
@ -1179,20 +1179,17 @@ else if ($action == 'update_extras')
|
|||||||
{
|
{
|
||||||
// Fill array 'array_options' with data from update form
|
// Fill array 'array_options' with data from update form
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$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)
|
if (! $error)
|
||||||
$error++;
|
{
|
||||||
|
|
||||||
if(!$error) {
|
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// FIXME le hook fait double emploi avec le trigger !!
|
// FIXME le hook fait double emploi avec le trigger !!
|
||||||
$hookmanager->initHooks(array('orderdao'));
|
$hookmanager->initHooks(array('orderdao'));
|
||||||
$parameters=array('id'=>$object->id);
|
$parameters=array('id'=>$object->id);
|
||||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
|
||||||
{
|
{
|
||||||
$result=$object->insertExtraFields();
|
$result=$object->insertExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -1200,14 +1197,10 @@ else if ($action == 'update_extras')
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if ($reshook < 0) $error++;
|
else if ($reshook < 0) $error++;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$action = 'edit_extras';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if ($error) $action = 'edit_extras';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2208,20 +2201,12 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes (TODO Move this into an include)
|
||||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||||
$parameters=array('colspan' => ' colspan="3"');
|
$parameters=array('colspan' => ' colspan="3"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$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
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
if ($action == 'edit_extras')
|
|
||||||
{
|
|
||||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
|
|
||||||
print '<input type="hidden" name="action" value="update_extras">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
if ($action == 'edit_extras') {
|
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]);
|
$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 '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
|
||||||
|
print '<input type="hidden" name="action" value="update_extras">';
|
||||||
|
print '<input type="hidden" name="attribute" value="'.$key.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
|
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $extrafields->showOutputField($key,$value);
|
print $extrafields->showOutputField($key,$value);
|
||||||
|
if ($object->statut == 0 && $user->rights->commande->creer) print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras&attribute='.$key.'">'.img_picto('','edit').' '.$langs->trans('Modify').'</a>';
|
||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($extrafields->attribute_label) > 0) {
|
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->commande->creer)
|
|
||||||
{
|
|
||||||
print '<tr><td></td><td colspan="5">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
|
||||||
print '</form>';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($object->statut == 0 && $user->rights->commande->creer)
|
|
||||||
{
|
|
||||||
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$rowspan=4;
|
$rowspan=4;
|
||||||
|
|||||||
@ -1926,19 +1926,17 @@ if ($action == 'update_extras')
|
|||||||
{
|
{
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute'));
|
||||||
if($ret < 0)
|
if ($ret < 0) $error++;
|
||||||
$error++;
|
|
||||||
|
|
||||||
if(!$error) {
|
if (! $error)
|
||||||
|
{
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// FIXME le hook fait double emploi avec le trigger !!
|
// FIXME le hook fait double emploi avec le trigger !!
|
||||||
$hookmanager->initHooks(array('invoicedao'));
|
$hookmanager->initHooks(array('invoicedao'));
|
||||||
$parameters=array('id'=>$object->id);
|
$parameters=array('id'=>$object->id);
|
||||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
|
||||||
{
|
{
|
||||||
$result=$object->insertExtraFields();
|
$result=$object->insertExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -1946,14 +1944,10 @@ if ($action == 'update_extras')
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if ($reshook < 0) $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 '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes (TODO Move this into an include)
|
||||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||||
$parameters=array('colspan' => ' colspan="2"');
|
$parameters=array('colspan' => ' colspan="2"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$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
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($action == 'edit_extras')
|
|
||||||
{
|
|
||||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
|
|
||||||
print '<input type="hidden" name="action" value="update_extras">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
if ($action == 'edit_extras') {
|
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]);
|
$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 '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
|
||||||
|
print '<input type="hidden" name="action" value="update_extras">';
|
||||||
|
print '<input type="hidden" name="attribute" value="'.$key.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
|
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $extrafields->showOutputField($key,$value);
|
print $extrafields->showOutputField($key,$value);
|
||||||
|
if ($object->statut == 0 && $user->rights->facture->creer) print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras&attribute='.$key.'">'.img_picto('','edit').' '.$langs->trans('Modify').'</a>';
|
||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($extrafields->attribute_label) > 0) {
|
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->facture->creer)
|
|
||||||
{
|
|
||||||
print '<tr><td></td><td colspan="5">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
|
||||||
print '</form>';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($object->statut == 0 && $user->rights->facture->creer)
|
|
||||||
{
|
|
||||||
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|||||||
@ -146,6 +146,8 @@ if ($action == 'create')
|
|||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
if ($action == 'edit' && ! empty($attrname))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
{
|
{
|
||||||
|
$langs->load("members");
|
||||||
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
print_titre($langs->trans("FieldEdition", $attrname));
|
print_titre($langs->trans("FieldEdition", $attrname));
|
||||||
|
|
||||||
|
|||||||
@ -1,37 +1,37 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
|
* Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/compta/facture/class/facture.class.php
|
* \file htdocs/compta/facture/class/facture.class.php
|
||||||
* \ingroup facture
|
* \ingroup facture
|
||||||
* \brief File of class to manage invoices
|
* \brief File of class to manage invoices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php';
|
||||||
|
|||||||
@ -26,10 +26,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class LignePrelevement
|
* Class to manage withdrawals
|
||||||
* \brief Classe permettant la gestion des prelevements
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LignePrelevement
|
class LignePrelevement
|
||||||
{
|
{
|
||||||
var $id;
|
var $id;
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
|
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -62,6 +63,7 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
var $code;
|
var $code;
|
||||||
var $email;
|
var $email;
|
||||||
|
var $skype;
|
||||||
var $phone_pro;
|
var $phone_pro;
|
||||||
var $phone_perso;
|
var $phone_perso;
|
||||||
var $phone_mobile;
|
var $phone_mobile;
|
||||||
@ -226,6 +228,7 @@ class Contact extends CommonObject
|
|||||||
$this->phone_perso=trim($this->phone_perso);
|
$this->phone_perso=trim($this->phone_perso);
|
||||||
$this->phone_mobile=trim($this->phone_mobile);
|
$this->phone_mobile=trim($this->phone_mobile);
|
||||||
$this->jabberid=trim($this->jabberid);
|
$this->jabberid=trim($this->jabberid);
|
||||||
|
$this->skype=trim($this->skype);
|
||||||
$this->fax=trim($this->fax);
|
$this->fax=trim($this->fax);
|
||||||
$this->zip=(empty($this->zip)?'':$this->zip);
|
$this->zip=(empty($this->zip)?'':$this->zip);
|
||||||
$this->town=(empty($this->town)?'':$this->town);
|
$this->town=(empty($this->town)?'':$this->town);
|
||||||
@ -249,6 +252,7 @@ class Contact extends CommonObject
|
|||||||
$sql .= ", poste='".$this->db->escape($this->poste)."'";
|
$sql .= ", poste='".$this->db->escape($this->poste)."'";
|
||||||
$sql .= ", fax='".$this->db->escape($this->fax)."'";
|
$sql .= ", fax='".$this->db->escape($this->fax)."'";
|
||||||
$sql .= ", email='".$this->db->escape($this->email)."'";
|
$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_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 .= ", 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");
|
$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_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->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->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->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;
|
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_pays as country_id,";
|
||||||
$sql.= " c.fk_departement,";
|
$sql.= " c.fk_departement,";
|
||||||
$sql.= " c.birthday,";
|
$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.priv, c.note_private, c.note_public, c.default_lang, c.no_email, c.canvas,";
|
||||||
$sql.= " c.import_key,";
|
$sql.= " c.import_key,";
|
||||||
$sql.= " p.libelle as country, p.code as country_code,";
|
$sql.= " p.libelle as country, p.code as country_code,";
|
||||||
@ -549,6 +554,7 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
$this->email = $obj->email;
|
$this->email = $obj->email;
|
||||||
$this->jabberid = $obj->jabberid;
|
$this->jabberid = $obj->jabberid;
|
||||||
|
$this->skype = $obj->skype;
|
||||||
$this->priv = $obj->priv;
|
$this->priv = $obj->priv;
|
||||||
$this->mail = $obj->email;
|
$this->mail = $obj->email;
|
||||||
|
|
||||||
@ -1025,6 +1031,7 @@ class Contact extends CommonObject
|
|||||||
$this->country_code = 'FR';
|
$this->country_code = 'FR';
|
||||||
$this->country = 'France';
|
$this->country = 'France';
|
||||||
$this->email = 'specimen@specimen.com';
|
$this->email = 'specimen@specimen.com';
|
||||||
|
$this->skype = 'tom.hanson';
|
||||||
|
|
||||||
$this->phone_pro = '0909090901';
|
$this->phone_pro = '0909090901';
|
||||||
$this->phone_perso = '0909090902';
|
$this->phone_perso = '0909090902';
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -168,6 +169,7 @@ if (empty($reshook))
|
|||||||
$object->town = $_POST["town"];
|
$object->town = $_POST["town"];
|
||||||
$object->country_id = $_POST["country_id"];
|
$object->country_id = $_POST["country_id"];
|
||||||
$object->state_id = $_POST["state_id"];
|
$object->state_id = $_POST["state_id"];
|
||||||
|
$object->skype = $_POST["skype"];
|
||||||
$object->email = $_POST["email"];
|
$object->email = $_POST["email"];
|
||||||
$object->phone_pro = $_POST["phone_pro"];
|
$object->phone_pro = $_POST["phone_pro"];
|
||||||
$object->phone_perso = $_POST["phone_perso"];
|
$object->phone_perso = $_POST["phone_perso"];
|
||||||
@ -268,6 +270,7 @@ if (empty($reshook))
|
|||||||
$object->country_id = $_POST["country_id"];
|
$object->country_id = $_POST["country_id"];
|
||||||
|
|
||||||
$object->email = $_POST["email"];
|
$object->email = $_POST["email"];
|
||||||
|
$object->skype = $_POST["skype"];
|
||||||
$object->phone_pro = $_POST["phone_pro"];
|
$object->phone_pro = $_POST["phone_pro"];
|
||||||
$object->phone_perso = $_POST["phone_perso"];
|
$object->phone_perso = $_POST["phone_perso"];
|
||||||
$object->phone_mobile = $_POST["phone_mobile"];
|
$object->phone_mobile = $_POST["phone_mobile"];
|
||||||
@ -522,6 +525,12 @@ else
|
|||||||
// Instant message and no email
|
// Instant message and no email
|
||||||
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3"><input name="skype" type="text" size="50" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||||
@ -712,7 +721,7 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Jabberid
|
// Jabberid
|
||||||
print '<tr><td>Jabberid</td><td><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
print '<tr><td>'.$langs->trans("Jabberid").'</td><td><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
||||||
if (! empty($conf->mailing->enabled))
|
if (! empty($conf->mailing->enabled))
|
||||||
{
|
{
|
||||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>';
|
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>';
|
||||||
@ -723,6 +732,12 @@ else
|
|||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input name="skype" type="text" size="40" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||||
@ -936,6 +951,12 @@ else
|
|||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (!empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||||
print $object->LibPubPriv($object->priv);
|
print $object->LibPubPriv($object->priv);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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_phonemob=GETPOST("search_phonemob");
|
||||||
$search_fax=GETPOST("search_fax");
|
$search_fax=GETPOST("search_fax");
|
||||||
$search_email=GETPOST("search_email");
|
$search_email=GETPOST("search_email");
|
||||||
|
$search_skype=GETPOST("search_skype");
|
||||||
$search_priv=GETPOST("search_priv");
|
$search_priv=GETPOST("search_priv");
|
||||||
$search_categ = GETPOST("search_categ",'int');
|
$search_categ = GETPOST("search_categ",'int');
|
||||||
$search_statut=GETPOST("search_statut");
|
$search_statut=GETPOST("search_statut");
|
||||||
@ -99,6 +101,7 @@ if (GETPOST('button_removefilter'))
|
|||||||
$search_phonemob="";
|
$search_phonemob="";
|
||||||
$search_fax="";
|
$search_fax="";
|
||||||
$search_email="";
|
$search_email="";
|
||||||
|
$search_skype="";
|
||||||
$search_priv="";
|
$search_priv="";
|
||||||
$sall="";
|
$sall="";
|
||||||
}
|
}
|
||||||
@ -117,7 +120,7 @@ $form=new Form($db);
|
|||||||
$formother=new FormOther($db);
|
$formother=new FormOther($db);
|
||||||
|
|
||||||
$sql = "SELECT s.rowid as socid, s.nom as name,";
|
$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.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,";
|
||||||
$sql.= " cp.code as country_code";
|
$sql.= " cp.code as country_code";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
$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)."%'";
|
$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
|
if ($type == "o") // filtre sur type
|
||||||
{
|
{
|
||||||
$sql .= " AND p.fk_soc IS NULL";
|
$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("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("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);
|
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("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("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_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||||
@ -316,6 +324,12 @@ if ($result)
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" type="text" name="search_email" size="8" value="'.$search_email.'">';
|
print '<input class="flat" type="text" name="search_email" size="8" value="'.$search_email.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre">';
|
||||||
|
print '<input class="flat" type="text" name="search_skype" size="8" value="'.$search_skype.'">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||||
@ -376,6 +390,8 @@ if ($result)
|
|||||||
print '<td>'.dol_print_phone($obj->fax,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
|
print '<td>'.dol_print_phone($obj->fax,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
|
||||||
// EMail
|
// EMail
|
||||||
print '<td>'.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).'</td>';
|
print '<td>'.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).'</td>';
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled)) { print '<td>'.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).'</td>'; }
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->tms),"day").'</td>';
|
print '<td align="center">'.dol_print_date($db->jdate($obj->tms),"day").'</td>';
|
||||||
|
|||||||
@ -87,7 +87,7 @@ if ($action == 'add')
|
|||||||
$mesg[]=$langs->trans("ErrorNoValueForRadioType");
|
$mesg[]=$langs->trans("ErrorNoValueForRadioType");
|
||||||
$action = 'create';
|
$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)
|
// Construct array for parameter (value of select list)
|
||||||
$parameters = GETPOST('param');
|
$parameters = GETPOST('param');
|
||||||
@ -124,11 +124,22 @@ if ($action == 'add')
|
|||||||
$default_value = GETPOST('default_value');
|
$default_value = GETPOST('default_value');
|
||||||
$parameters = GETPOST('param');
|
$parameters = GETPOST('param');
|
||||||
$parameters_array = explode("\r\n",$parameters);
|
$parameters_array = explode("\r\n",$parameters);
|
||||||
|
//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
|
||||||
|
{
|
||||||
|
//Esle it's separated key/value and coma list
|
||||||
foreach($parameters_array as $param_ligne)
|
foreach($parameters_array as $param_ligne)
|
||||||
{
|
{
|
||||||
list($key,$value) = explode(',',$param_ligne);
|
list($key,$value) = explode(',',$param_ligne);
|
||||||
$params['options'][$key] = $value;
|
$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);
|
$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)
|
if ($result > 0)
|
||||||
@ -215,7 +226,7 @@ if ($action == 'update')
|
|||||||
$mesg[]=$langs->trans("ErrorNoValueForRadioType");
|
$mesg[]=$langs->trans("ErrorNoValueForRadioType");
|
||||||
$action = 'edit';
|
$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)
|
// Construct array for parameter (value of select list)
|
||||||
$parameters = GETPOST('param');
|
$parameters = GETPOST('param');
|
||||||
@ -251,11 +262,22 @@ if ($action == 'update')
|
|||||||
// Construct array for parameter (value of select list)
|
// Construct array for parameter (value of select list)
|
||||||
$parameters = GETPOST('param');
|
$parameters = GETPOST('param');
|
||||||
$parameters_array = explode("\r\n",$parameters);
|
$parameters_array = explode("\r\n",$parameters);
|
||||||
|
//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
|
||||||
|
{
|
||||||
|
//Esle it's separated key/value and coma list
|
||||||
foreach($parameters_array as $param_ligne)
|
foreach($parameters_array as $param_ligne)
|
||||||
{
|
{
|
||||||
list($key,$value) = explode(',',$param_ligne);
|
list($key,$value) = explode(',',$param_ligne);
|
||||||
$params['options'][$key] = $value;
|
$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);
|
$result=$extrafields->update($_POST['attrname'],$_POST['label'],$_POST['type'],$extrasize,$elementtype,(GETPOST('unique')?1:0),(GETPOST('required')?1:0),$pos,$params);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
<<<<<<< HEAD
|
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
=======
|
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
>>>>>>> refs/remotes/origin/3.4
|
|
||||||
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
@ -2048,6 +2045,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to get extra fields of a member into $this->array_options
|
* 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 int $rowid Id of line
|
||||||
* @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label()
|
* @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label()
|
||||||
@ -2141,10 +2139,12 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
function insertExtraFields()
|
function insertExtraFields()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
|
if (! empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return 0; // For avoid conflicts if trigger used
|
||||||
|
|
||||||
if (! empty($this->array_options))
|
if (! empty($this->array_options))
|
||||||
{
|
{
|
||||||
// Check parameters
|
// Check parameters
|
||||||
@ -2248,7 +2248,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
if(count($extrafields->attribute_label) > 0)
|
if (count($extrafields->attribute_label) > 0)
|
||||||
{
|
{
|
||||||
$out .= "\n";
|
$out .= "\n";
|
||||||
$out .= '<!-- showOptionalsInput --> ';
|
$out .= '<!-- showOptionalsInput --> ';
|
||||||
|
|||||||
@ -688,36 +688,52 @@ class ExtraFields
|
|||||||
{
|
{
|
||||||
$param_list=array_keys($param['options']);
|
$param_list=array_keys($param['options']);
|
||||||
$InfoFieldList = explode(":", $param_list[0]);
|
$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
|
if (count($InfoFieldList) > 3 && ! empty($InfoFieldList[3]))
|
||||||
// 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)
|
|
||||||
|
|
||||||
$keyList='rowid';
|
|
||||||
|
|
||||||
if (count($InfoFieldList)>=3)
|
|
||||||
$keyList=$InfoFieldList[2].' as rowid';
|
|
||||||
if (count($InfoFieldList)>=4) {
|
|
||||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||||
$keyList.= ', '.$parentField;
|
$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]);
|
$fields_label = explode('|',$InfoFieldList[1]);
|
||||||
if(is_array($fields_label)) {
|
if (is_array($fields_label))
|
||||||
$keyList .=', ';
|
{
|
||||||
$keyList .= implode(', ', $fields_label);
|
|
||||||
}
|
|
||||||
|
|
||||||
$fields_label = explode('|',$InfoFieldList[1]);
|
|
||||||
if(is_array($fields_label)) {
|
|
||||||
$keyList .=', ';
|
$keyList .=', ';
|
||||||
$keyList .= implode(', ', $fields_label);
|
$keyList .= implode(', ', $fields_label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sqlwhere='';
|
||||||
$sql = 'SELECT '.$keyList;
|
$sql = 'SELECT '.$keyList;
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
|
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
|
||||||
//$sql.= ' WHERE entity = '.$conf->entity;
|
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';
|
||||||
|
$sqlwhere.= ' AND extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sqlwhere.= ' AND '.$InfoFieldList[4];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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;
|
//print $sql;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);
|
dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);
|
||||||
@ -789,6 +805,9 @@ class ExtraFields
|
|||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.<br>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$out.='</select>';
|
$out.='</select>';
|
||||||
}
|
}
|
||||||
@ -987,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 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
|
* @return int 1 if array_options set / 0 if no value
|
||||||
*/
|
*/
|
||||||
function setOptionalsFromPost($extralabels,&$object)
|
function setOptionalsFromPost($extralabels,&$object,$onlykey='')
|
||||||
{
|
{
|
||||||
global $_POST, $langs;
|
global $_POST, $langs;
|
||||||
$nofillrequired='';// For error when required field left blank
|
$nofillrequired='';// For error when required field left blank
|
||||||
@ -1004,6 +1024,8 @@ class ExtraFields
|
|||||||
// Get extra fields
|
// Get extra fields
|
||||||
foreach ($extralabels as $key => $value)
|
foreach ($extralabels as $key => $value)
|
||||||
{
|
{
|
||||||
|
if (! empty($onlykey) && $key != $onlykey) continue;
|
||||||
|
|
||||||
$key_type = $this->attribute_type[$key];
|
$key_type = $this->attribute_type[$key];
|
||||||
if($this->attribute_required[$key] && !GETPOST("options_$key",2))
|
if($this->attribute_required[$key] && !GETPOST("options_$key",2))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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
|
* @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
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_duration($prefix,$iSecond='',$disabled=0,$typehour='select')
|
function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -3680,7 +3680,7 @@ class Form
|
|||||||
if ($typehour=='select')
|
if ($typehour=='select')
|
||||||
{
|
{
|
||||||
print '<select class="flat" name="'.$prefix.'hour"'.($disabled?' disabled="disabled"':'').'>';
|
print '<select class="flat" name="'.$prefix.'hour"'.($disabled?' disabled="disabled"':'').'>';
|
||||||
for ($hour = 0; $hour < 24; $hour++)
|
for ($hour = 0; $hour < 25; $hour++) // For a duration, we allow 24 hours
|
||||||
{
|
{
|
||||||
print '<option value="'.$hour.'"';
|
print '<option value="'.$hour.'"';
|
||||||
if ($hourSelected == $hour)
|
if ($hourSelected == $hour)
|
||||||
|
|||||||
@ -79,6 +79,7 @@ class Ldap
|
|||||||
var $firstname;
|
var $firstname;
|
||||||
var $login;
|
var $login;
|
||||||
var $phone;
|
var $phone;
|
||||||
|
var $skype;
|
||||||
var $fax;
|
var $fax;
|
||||||
var $mail;
|
var $mail;
|
||||||
var $mobile;
|
var $mobile;
|
||||||
@ -127,6 +128,7 @@ class Ldap
|
|||||||
$this->attr_firstname = $conf->global->LDAP_FIELD_FIRSTNAME;
|
$this->attr_firstname = $conf->global->LDAP_FIELD_FIRSTNAME;
|
||||||
$this->attr_mail = $conf->global->LDAP_FIELD_MAIL;
|
$this->attr_mail = $conf->global->LDAP_FIELD_MAIL;
|
||||||
$this->attr_phone = $conf->global->LDAP_FIELD_PHONE;
|
$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_fax = $conf->global->LDAP_FIELD_FAX;
|
||||||
$this->attr_mobile = $conf->global->LDAP_FIELD_MOBILE;
|
$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->firstname = $this->convToOutputCharset($result[0][$this->attr_firstname][0],$this->ldapcharset);
|
||||||
$this->login = $this->convToOutputCharset($result[0][$this->attr_login][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->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->fax = $this->convToOutputCharset($result[0][$this->attr_fax][0],$this->ldapcharset);
|
||||||
$this->mail = $this->convToOutputCharset($result[0][$this->attr_mail][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);
|
$this->mobile = $this->convToOutputCharset($result[0][$this->attr_mobile][0],$this->ldapcharset);
|
||||||
|
|||||||
@ -555,6 +555,11 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print '<td>'.$langs->trans("PhoneMobile").'</td>';
|
print '<td>'.$langs->trans("PhoneMobile").'</td>';
|
||||||
print '<td>'.$langs->trans("Fax").'</td>';
|
print '<td>'.$langs->trans("Fax").'</td>';
|
||||||
print '<td>'.$langs->trans("EMail").'</td>';
|
print '<td>'.$langs->trans("EMail").'</td>';
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
$colspan++;
|
||||||
|
print '<td>'.$langs->trans("Skype").'</td>';
|
||||||
|
}
|
||||||
print '<td>'.$langs->trans("Status").'</td>';
|
print '<td>'.$langs->trans("Status").'</td>';
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||||
@ -570,7 +575,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
|
|
||||||
$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 .= ", p.civilite, p.address, p.zip, p.town";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||||
@ -614,6 +619,12 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
|
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<td>';
|
||||||
|
print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($obj->statut==0) print '<td>'.$langs->trans('Disabled').' </span>'.img_picto($langs->trans('StatusContactDraftShort'),'statut0').'</td>';
|
if ($obj->statut==0) print '<td>'.$langs->trans('Disabled').' </span>'.img_picto($langs->trans('StatusContactDraftShort'),'statut0').'</td>';
|
||||||
elseif ($obj->statut==1) print '<td>'.$langs->trans('Enabled').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut1').'</td>';
|
elseif ($obj->statut==1) print '<td>'.$langs->trans('Enabled').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut1').'</td>';
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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;
|
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='<a href="skype:';
|
||||||
|
$newskype.=dol_trunc($skype,$max);
|
||||||
|
$newskype.='" alt="'.$langs->trans("Call").' '.$skype.'" title="'.$langs->trans("Call").' '.$skype.'">';
|
||||||
|
$newskype.='<img src="../theme/'.$conf->theme.'/img/object_skype.png" border="0"> ';
|
||||||
|
$newskype.=dol_trunc($skype,$max);
|
||||||
|
$newskype.='</a>';
|
||||||
|
|
||||||
|
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||||
|
{
|
||||||
|
$type='AC_SKYPE'; $link='';
|
||||||
|
if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&backtopage=1&actioncode='.$type.'&contactid='.$cid.'&socid='.$socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>';
|
||||||
|
$newskype='<table class="nobordernopadding"><tr><td>'.$newskype.' </td><td> '.$link.'</td></tr></table>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
$newskype.=img_warning($langs->trans("ErrorBadSkype",$skype));
|
||||||
|
}
|
||||||
|
return $newskype;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format phone numbers according to country
|
* Format phone numbers according to country
|
||||||
*
|
*
|
||||||
|
|||||||
@ -205,13 +205,15 @@ function dol_print_object_info($object)
|
|||||||
print $langs->trans("CreatedBy").': ';
|
print $langs->trans("CreatedBy").': ';
|
||||||
if (is_object($object->user_creation))
|
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
|
else
|
||||||
{
|
{
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
$userstatic->fetch($object->user_creation);
|
$userstatic->fetch($object->user_creation);
|
||||||
print $userstatic->getNomUrl(1);
|
if ($userstatic->id) print $userstatic->getNomUrl(1);
|
||||||
|
else print $langs->trans("Unknown");
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
@ -230,13 +232,15 @@ function dol_print_object_info($object)
|
|||||||
print $langs->trans("ModifiedBy").': ';
|
print $langs->trans("ModifiedBy").': ';
|
||||||
if (is_object($object->user_modification))
|
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
|
else
|
||||||
{
|
{
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
$userstatic->fetch($object->user_modification);
|
$userstatic->fetch($object->user_modification);
|
||||||
print $userstatic->getNomUrl(1);
|
if ($userstatic->id) print $userstatic->getNomUrl(1);
|
||||||
|
else print $langs->trans("Unknown");
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
@ -255,13 +259,15 @@ function dol_print_object_info($object)
|
|||||||
print $langs->trans("ValidatedBy").': ';
|
print $langs->trans("ValidatedBy").': ';
|
||||||
if (is_object($object->user_validation))
|
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
|
else
|
||||||
{
|
{
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
$userstatic->fetch($object->user_validation);
|
$userstatic->fetch($object->user_validation);
|
||||||
print $userstatic->getNomUrl(1);
|
if ($userstatic->id) print $userstatic->getNomUrl(1);
|
||||||
|
else print $langs->trans("Unknown");
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
@ -280,13 +286,15 @@ function dol_print_object_info($object)
|
|||||||
print $langs->trans("ApprovedBy").': ';
|
print $langs->trans("ApprovedBy").': ';
|
||||||
if (is_object($object->user_approve))
|
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
|
else
|
||||||
{
|
{
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
$userstatic->fetch($object->user_approve);
|
$userstatic->fetch($object->user_approve);
|
||||||
print $userstatic->getNomUrl(1);
|
if ($userstatic->id) print $userstatic->getNomUrl(1);
|
||||||
|
else print $langs->trans("Unknown");
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
@ -305,13 +313,15 @@ function dol_print_object_info($object)
|
|||||||
print $langs->trans("ClosedBy").': ';
|
print $langs->trans("ClosedBy").': ';
|
||||||
if (is_object($object->user_cloture))
|
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
|
else
|
||||||
{
|
{
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
$userstatic->fetch($object->user_cloture);
|
$userstatic->fetch($object->user_cloture);
|
||||||
print $userstatic->getNomUrl(1);
|
if ($userstatic->id) print $userstatic->getNomUrl(1);
|
||||||
|
else print $langs->trans("Unknown");
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
@ -330,13 +340,15 @@ function dol_print_object_info($object)
|
|||||||
print $langs->trans("ConciliatedBy").': ';
|
print $langs->trans("ConciliatedBy").': ';
|
||||||
if (is_object($object->user_rappro))
|
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
|
else
|
||||||
{
|
{
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
$userstatic->fetch($object->user_rappro);
|
$userstatic->fetch($object->user_rappro);
|
||||||
print $userstatic->getNomUrl(1);
|
if ($userstatic->id) print $userstatic->getNomUrl(1);
|
||||||
|
else print $langs->trans("Unknown");
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,28 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* or see http://www.gnu.org/
|
* or see http://www.gnu.org/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/lib/project.lib.php
|
* \file htdocs/core/lib/project.lib.php
|
||||||
* \brief Functions used by project module
|
* \brief Functions used by project module
|
||||||
* \ingroup project
|
* \ingroup project
|
||||||
*/
|
*/
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
|
|
||||||
@ -473,19 +473,24 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Planned Workload
|
// Planned Workload
|
||||||
print '<td align="center">';
|
print '<td align="right">';
|
||||||
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'all');
|
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
|
||||||
else print '--:--';
|
else print '--:--';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Progress
|
// Progress declared %
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print $lines[$i]->progress.' %';
|
print $lines[$i]->progress.' %';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Time spent
|
// Time spent
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if ($lines[$i]->duration) print convertSecondToTime($lines[$i]->duration,'all');
|
if ($lines[$i]->duration)
|
||||||
|
{
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||||
|
print convertSecondToTime($lines[$i]->duration,'allhourmin');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
else print '--:--';
|
else print '--:--';
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,11 @@ function dol_decode($chain)
|
|||||||
*/
|
*/
|
||||||
function dol_hash($chain,$type=0)
|
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);
|
if ($type == 1) return sha1($chain);
|
||||||
else if ($type == 2) return sha1(md5($chain));
|
else if ($type == 2) return sha1(md5($chain));
|
||||||
else return md5($chain);
|
else return md5($chain);
|
||||||
|
|||||||
136
htdocs/core/modules/modSkype.class.php
Normal file
136
htdocs/core/modules/modSkype.class.php
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
@ -26,7 +26,8 @@ if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1;
|
|||||||
if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=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
|
$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);
|
$titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php
|
||||||
|
print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs);
|
||||||
?>
|
?>
|
||||||
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
|
|||||||
|
|
||||||
$head=fichinter_admin_prepare_head();
|
$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).'<br>'."\n";
|
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||||
|
|||||||
@ -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
|
* @return void
|
||||||
*/
|
*/
|
||||||
function info($id)
|
function info($id)
|
||||||
@ -625,13 +625,12 @@ class Fichinter extends CommonObject
|
|||||||
$sql.= " WHERE f.rowid = ".$id;
|
$sql.= " WHERE f.rowid = ".$id;
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
if ($result)
|
|
||||||
{
|
{
|
||||||
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;
|
$this->id = $obj->rowid;
|
||||||
|
|
||||||
@ -649,7 +648,7 @@ class Fichinter extends CommonObject
|
|||||||
$this->user_validation = $vuser;
|
$this->user_validation = $vuser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->db->free($result);
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,29 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/fichinter/fiche.php
|
* \file htdocs/fichinter/fiche.php
|
||||||
* \brief Fichier fiche intervention
|
* \brief Fichier fiche intervention
|
||||||
* \ingroup ficheinter
|
* \ingroup ficheinter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
@ -79,16 +79,22 @@ $object = new Fichinter($db);
|
|||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$ret=$object->fetch($id, $ref);
|
||||||
|
if ($ret > 0) $ret=$object->fetch_thirdparty();
|
||||||
|
if ($ret < 0) dol_print_error('',$object->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->ficheinter->creer)
|
if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
$result = $object->setValid($user);
|
$result = $object->setValid($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
@ -114,9 +120,6 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->fichein
|
|||||||
|
|
||||||
else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer)
|
else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
$result = $object->setDraft($user);
|
$result = $object->setDraft($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
@ -309,8 +312,6 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
|||||||
|
|
||||||
else if ($action == 'update' && $user->rights->ficheinter->creer)
|
else if ($action == 'update' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
|
|
||||||
$object->socid = $socid;
|
$object->socid = $socid;
|
||||||
$object->fk_project = GETPOST('projectid','int');
|
$object->fk_project = GETPOST('projectid','int');
|
||||||
$object->fk_contrat = GETPOST('contratid','int');
|
$object->fk_contrat = GETPOST('contratid','int');
|
||||||
@ -326,11 +327,9 @@ else if ($action == 'update' && $user->rights->ficheinter->creer)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Build doc
|
* Build doc
|
||||||
*/
|
*/
|
||||||
else if ($action == 'builddoc' && $user->rights->ficheinter->creer) // En get ou en post
|
else if ($action == 'builddoc' && $user->rights->ficheinter->creer) // En get ou en post
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
$object->fetch_lines();
|
$object->fetch_lines();
|
||||||
|
|
||||||
// Save last template used to generate document
|
// Save last template used to generate document
|
||||||
@ -357,8 +356,6 @@ else if ($action == 'builddoc' && $user->rights->ficheinter->creer) // En get ou
|
|||||||
// Remove file in doc form
|
// Remove file in doc form
|
||||||
else if ($action == 'remove_file')
|
else if ($action == 'remove_file')
|
||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
|
||||||
{
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -369,13 +366,11 @@ else if ($action == 'remove_file')
|
|||||||
$ret=dol_delete_file($file,0,0,0,$object);
|
$ret=dol_delete_file($file,0,0,0,$object);
|
||||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set into a project
|
// Set into a project
|
||||||
else if ($action == 'classin' && $user->rights->ficheinter->creer)
|
else if ($action == 'classin' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->setProject(GETPOST('projectid','int'));
|
$result=$object->setProject(GETPOST('projectid','int'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
@ -383,15 +378,12 @@ else if ($action == 'classin' && $user->rights->ficheinter->creer)
|
|||||||
// Set into a contract
|
// Set into a contract
|
||||||
else if ($action == 'setcontrat' && $user->rights->contrat->creer)
|
else if ($action == 'setcontrat' && $user->rights->contrat->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->set_contrat($user,GETPOST('contratid','int'));
|
$result=$object->set_contrat($user,GETPOST('contratid','int'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer)
|
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result<0) {
|
if ($result<0) {
|
||||||
setEventMessage($object->error,'errors');
|
setEventMessage($object->error,'errors');
|
||||||
@ -403,19 +395,16 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fich
|
|||||||
|
|
||||||
else if ($action == 'setdescription' && $user->rights->ficheinter->creer)
|
else if ($action == 'setdescription' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->set_description($user,GETPOST('description'));
|
$result=$object->set_description($user,GETPOST('description'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
else if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
|
else if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public');
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public');
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private');
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private');
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
@ -433,13 +422,15 @@ else if ($action == "addline" && $user->rights->ficheinter->creer)
|
|||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Duration")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Duration")).'</div>';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
if (GETPOST('durationhour','int') >= 24 && GETPOST('durationmin','int') > 0)
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$langs->trans("ErrorValueTooHigh").'</div>';
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$ret=$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
$desc=GETPOST('np_desc');
|
$desc=GETPOST('np_desc');
|
||||||
$date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int'));
|
$date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int'));
|
||||||
$duration = convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int'));
|
$duration = convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int'));
|
||||||
@ -482,7 +473,6 @@ else if ($action == "addline" && $user->rights->ficheinter->creer)
|
|||||||
// Classify Billed
|
// Classify Billed
|
||||||
else if ($action == 'classifybilled' && $user->rights->ficheinter->creer)
|
else if ($action == 'classifybilled' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->setBilled();
|
$result=$object->setBilled();
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -582,8 +572,6 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->
|
|||||||
|
|
||||||
else if ($action == 'up' && $user->rights->ficheinter->creer)
|
else if ($action == 'up' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
$object->line_up(GETPOST('line_id','int'));
|
$object->line_up(GETPOST('line_id','int'));
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@ -603,8 +591,6 @@ else if ($action == 'up' && $user->rights->ficheinter->creer)
|
|||||||
|
|
||||||
else if ($action == 'down' && $user->rights->ficheinter->creer)
|
else if ($action == 'down' && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
$object->line_down(GETPOST('line_id','int'));
|
$object->line_down(GETPOST('line_id','int'));
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@ -661,10 +647,6 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA
|
|||||||
{
|
{
|
||||||
$langs->load('mails');
|
$langs->load('mails');
|
||||||
|
|
||||||
if ($object->fetch($id) > 0)
|
|
||||||
{
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
if (GETPOST('sendto','alpha'))
|
if (GETPOST('sendto','alpha'))
|
||||||
{
|
{
|
||||||
// Le destinataire a ete fourni via le champ libre
|
// Le destinataire a ete fourni via le champ libre
|
||||||
@ -788,32 +770,25 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA
|
|||||||
$mesg='<div class="error">'.$langs->trans('ErrorMailRecipientIsEmpty').' !</div>';
|
$mesg='<div class="error">'.$langs->trans('ErrorMailRecipientIsEmpty').' !</div>';
|
||||||
dol_syslog('Recipient email is empty');
|
dol_syslog('Recipient email is empty');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$langs->load("other");
|
|
||||||
$mesg='<div class="error">'.$langs->trans('ErrorFailedToReadEntity',$langs->trans("Intervention")).'</div>';
|
|
||||||
dol_syslog('Impossible de lire les donnees de l\'intervention. Le fichier intervention n\'a peut-etre pas ete genere.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$action='presend';
|
$action='presend';
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'update_extras')
|
else if ($action == 'update_extras')
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
// Fill array 'array_options' with data from update form
|
// Fill array 'array_options' with data from update form
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$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 (! $error)
|
||||||
|
{
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// FIXME le hook fait double emploi avec le trigger !!
|
// FIXME le hook fait double emploi avec le trigger !!
|
||||||
$hookmanager->initHooks(array('interventiondao'));
|
$hookmanager->initHooks(array('interventiondao'));
|
||||||
$parameters=array('id'=>$object->id);
|
$parameters=array('id'=>$object->id);
|
||||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
|
||||||
{
|
{
|
||||||
$result=$object->insertExtraFields();
|
$result=$object->insertExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -821,16 +796,16 @@ else if ($action == 'update_extras')
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if ($reshook < 0) $error++;
|
else if ($reshook < 0) $error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($error) $action = 'edit_extras';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->ficheinter->creer)
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
if ($action == 'addcontact')
|
if ($action == 'addcontact')
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
|
||||||
|
|
||||||
if ($result > 0 && $id > 0)
|
if ($result > 0 && $id > 0)
|
||||||
{
|
{
|
||||||
$contactid = (GETPOST('userid','int') ? GETPOST('userid','int') : GETPOST('contactid','int'));
|
$contactid = (GETPOST('userid','int') ? GETPOST('userid','int') : GETPOST('contactid','int'));
|
||||||
@ -858,21 +833,13 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->ficheint
|
|||||||
|
|
||||||
// bascule du statut d'un contact
|
// bascule du statut d'un contact
|
||||||
else if ($action == 'swapstatut')
|
else if ($action == 'swapstatut')
|
||||||
{
|
|
||||||
if ($object->fetch($id))
|
|
||||||
{
|
{
|
||||||
$result=$object->swapContactStatus(GETPOST('ligne','int'));
|
$result=$object->swapContactStatus(GETPOST('ligne','int'));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Efface un contact
|
// Efface un contact
|
||||||
else if ($action == 'deletecontact')
|
else if ($action == 'deletecontact')
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result = $object->delete_contact(GETPOST('lineid','int'));
|
$result = $object->delete_contact(GETPOST('lineid','int'));
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@ -1285,19 +1252,11 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
// Statut
|
// Statut
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes (TODO Move this into an include)
|
||||||
$parameters=array('colspan' => ' colspan="3"');
|
$parameters=array('colspan' => ' colspan="3"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$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
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
if ($action == 'edit_extras')
|
|
||||||
{
|
|
||||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formfichinter">';
|
|
||||||
print '<input type="hidden" name="action" value="update_extras">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
if ($action == 'edit_extras') {
|
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]);
|
$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 '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formfichinter">';
|
||||||
|
print '<input type="hidden" name="action" value="update_extras">';
|
||||||
|
print '<input type="hidden" name="attribute" value="'.$key.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
|
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $extrafields->showOutputField($key,$value);
|
print $extrafields->showOutputField($key,$value);
|
||||||
|
if ($object->statut == 0 && $user->rights->ficheinter->creer) print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras&attribute='.$key.'">'.img_picto('','edit').' '.$langs->trans('Modify').'</a>';
|
||||||
}
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($extrafields->attribute_label) > 0) {
|
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->ficheinter->creer)
|
|
||||||
{
|
|
||||||
print '<tr><td></td><td colspan="3">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
|
||||||
print '</form>';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($object->statut == 0 && $user->rights->ficheinter->creer)
|
|
||||||
{
|
|
||||||
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2009-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2009-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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('companies');
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
|
|
||||||
$fichinterid = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter');
|
$result = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter');
|
||||||
|
|
||||||
|
$object = new Fichinter($db);
|
||||||
|
|
||||||
|
if ($id > 0)
|
||||||
|
{
|
||||||
|
$object->fetch($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$fichinter = new Fichinter($db);
|
|
||||||
$fichinter->fetch($fichinterid);
|
|
||||||
|
|
||||||
$societe = new Societe($db);
|
$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');
|
dol_fiche_head($head, 'info', $langs->trans('InterventionCard'), 0, 'intervention');
|
||||||
|
|
||||||
$fichinter->info($fichinter->id);
|
$object->info($object->id);
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($fichinter);
|
dol_print_object_info($object);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -99,8 +99,6 @@ if ($object->fetch($id))
|
|||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||||
//print '<table width="100%" class="notopnoleftnoright">';
|
|
||||||
//print '<tr><td valign="top" width="50%" class="notopnoleft">';
|
|
||||||
|
|
||||||
print '<table width="100%" class="border">';
|
print '<table width="100%" class="border">';
|
||||||
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
|
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
|
||||||
@ -263,7 +261,7 @@ if ($object->fetch($id))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $langs->trans("UserNotLinkedToMember");
|
print $langs->trans("ThirdpartyNotLinkedToMember");
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -273,7 +271,6 @@ if ($object->fetch($id))
|
|||||||
|
|
||||||
|
|
||||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
//print '</td><td valign="top" width="50%" class="notopnoleftnoright">';
|
|
||||||
|
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -428,8 +425,6 @@ if ($object->fetch($id))
|
|||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
print '<div style="clear:both"></div>';
|
print '<div style="clear:both"></div>';
|
||||||
//print '</td></tr>';
|
|
||||||
//print '</table>' . "\n";
|
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|||||||
@ -325,7 +325,15 @@ create table llx_actioncomm_resources
|
|||||||
fk_actioncomm integer NOT NULL,
|
fk_actioncomm integer NOT NULL,
|
||||||
element_type varchar(50) NOT NULL,
|
element_type varchar(50) NOT NULL,
|
||||||
fk_element integer NOT NULL,
|
fk_element integer NOT NULL,
|
||||||
fk_element_status varchar(32) NULL
|
answer_status varchar(50) NULL,
|
||||||
|
mandatory smallint,
|
||||||
|
transparent smallint
|
||||||
) ENGINE=innodb;
|
) 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 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);
|
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;
|
||||||
|
|||||||
@ -26,5 +26,7 @@ create table llx_actioncomm_resources
|
|||||||
fk_actioncomm integer NOT NULL,
|
fk_actioncomm integer NOT NULL,
|
||||||
element_type varchar(50) NOT NULL,
|
element_type varchar(50) NOT NULL,
|
||||||
fk_element integer NOT NULL,
|
fk_element integer NOT NULL,
|
||||||
fk_element_status varchar(32) NULL
|
answer_status varchar(50) NULL,
|
||||||
|
mandatory smallint,
|
||||||
|
transparent smallint
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|||||||
@ -45,6 +45,7 @@ create table llx_adherent
|
|||||||
state_id integer,
|
state_id integer,
|
||||||
country integer,
|
country integer,
|
||||||
email varchar(255),
|
email varchar(255),
|
||||||
|
skype varchar(255),
|
||||||
phone varchar(30),
|
phone varchar(30),
|
||||||
phone_perso varchar(30),
|
phone_perso varchar(30),
|
||||||
phone_mobile varchar(30),
|
phone_mobile varchar(30),
|
||||||
|
|||||||
@ -49,6 +49,7 @@ create table llx_societe
|
|||||||
fax varchar(20), -- fax number
|
fax varchar(20), -- fax number
|
||||||
url varchar(255), --
|
url varchar(255), --
|
||||||
email varchar(128), --
|
email varchar(128), --
|
||||||
|
skype varchar(255), --
|
||||||
fk_effectif integer DEFAULT 0, --
|
fk_effectif integer DEFAULT 0, --
|
||||||
fk_typent integer DEFAULT 0, --
|
fk_typent integer DEFAULT 0, --
|
||||||
fk_forme_juridique integer DEFAULT 0, -- juridical status
|
fk_forme_juridique integer DEFAULT 0, -- juridical status
|
||||||
|
|||||||
@ -42,6 +42,7 @@ create table llx_socpeople
|
|||||||
fax varchar(30),
|
fax varchar(30),
|
||||||
email varchar(255),
|
email varchar(255),
|
||||||
jabberid varchar(255),
|
jabberid varchar(255),
|
||||||
|
skype varchar(255),
|
||||||
no_email smallint NOT NULL DEFAULT 0,
|
no_email smallint NOT NULL DEFAULT 0,
|
||||||
priv smallint NOT NULL DEFAULT 0,
|
priv smallint NOT NULL DEFAULT 0,
|
||||||
fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement
|
fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement
|
||||||
|
|||||||
@ -41,6 +41,7 @@ create table llx_user
|
|||||||
fk_state integer DEFAULT 0, --
|
fk_state integer DEFAULT 0, --
|
||||||
fk_country integer DEFAULT 0, --
|
fk_country integer DEFAULT 0, --
|
||||||
job varchar(128),
|
job varchar(128),
|
||||||
|
skype varchar(255),
|
||||||
office_phone varchar(20),
|
office_phone varchar(20),
|
||||||
office_fax varchar(20),
|
office_fax varchar(20),
|
||||||
user_mobile varchar(20),
|
user_mobile varchar(20),
|
||||||
|
|||||||
@ -368,7 +368,7 @@ ExtrafieldRadio=Radio button
|
|||||||
ExtrafieldParamHelpselect=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...<br><br>In order to have the list depending on another :<br>1,value1|parent_list_code:parent_key<br>2,value2|parent_list_code:parent_key
|
ExtrafieldParamHelpselect=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...<br><br>In order to have the list depending on another :<br>1,value1|parent_list_code:parent_key<br>2,value2|parent_list_code:parent_key
|
||||||
ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
|
ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
|
||||||
ExtrafieldParamHelpradio=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
|
ExtrafieldParamHelpradio=Parameters list have to be like key,value<br><br> for exemple : <br>1,value1<br>2,value2<br>3,value3<br>...
|
||||||
ExtrafieldParamHelpsellist=Parameters list have come from table<br><br> for exemple : <br>c_typent:libelle:id<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column
|
ExtrafieldParamHelpsellist=Parameters list have come from table<br><br> for exemple : <br>c_typent:libelle:id::filter<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column:filter <br> filter can be a simple test (eg active=1) to display only active value <br> 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
|
LibraryToBuildPDF=Library used to build PDF
|
||||||
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. 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.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
|
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. 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.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
|
||||||
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:<br>1 : local tax apply on products and services without vat (vat is not applied on local tax)<br>2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)<br>3 : local tax apply on products without vat (vat is not applied on local tax)<br>4 : local tax apply on products before vat (vat is calculated on amount + localtax)<br>5 : local tax apply on services without vat (vat is not applied on local tax)<br>6 : local tax apply on services before vat (vat is calculated on amount + localtax)
|
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:<br>1 : local tax apply on products and services without vat (vat is not applied on local tax)<br>2 : local tax apply on products and services before vat (vat is calculated on amount + localtax)<br>3 : local tax apply on products without vat (vat is not applied on local tax)<br>4 : local tax apply on products before vat (vat is calculated on amount + localtax)<br>5 : local tax apply on services without vat (vat is not applied on local tax)<br>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)
|
ExtraFieldsContacts=Complementary attributes (contact/address)
|
||||||
ExtraFieldsMember=Complementary attributes (member)
|
ExtraFieldsMember=Complementary attributes (member)
|
||||||
ExtraFieldsMemberType=Complementary attributes (member type)
|
ExtraFieldsMemberType=Complementary attributes (member type)
|
||||||
|
ExtraFieldsCustomerOrders=Complementary attributes (orders)
|
||||||
|
ExtraFieldsCustomerInvoices=Complementary attributes (invoices)
|
||||||
ExtraFieldsSupplierOrders=Complementary attributes (orders)
|
ExtraFieldsSupplierOrders=Complementary attributes (orders)
|
||||||
ExtraFieldsSupplierInvoices=Complementary attributes (invoices)
|
ExtraFieldsSupplierInvoices=Complementary attributes (invoices)
|
||||||
ExtraFieldsProject=Complementary attributes (projects)
|
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é.
|
XDebugInstalled=XDebug est chargé.
|
||||||
XCacheInstalled=XCache is loaded.
|
XCacheInstalled=XCache is loaded.
|
||||||
AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink
|
AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink
|
||||||
|
FieldEdition=Edition of field %s
|
||||||
##### Module password generation
|
##### Module password generation
|
||||||
PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: 8 characters containing shared numbers and characters in lowercase.
|
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.
|
PasswordGenerationNone=Do not suggest any generated password. Password must be type in manually.
|
||||||
|
|||||||
@ -66,6 +66,8 @@ Country=Country
|
|||||||
CountryCode=Country code
|
CountryCode=Country code
|
||||||
CountryId=Country id
|
CountryId=Country id
|
||||||
Phone=Phone
|
Phone=Phone
|
||||||
|
Skype=Skype
|
||||||
|
Call=Call
|
||||||
PhonePro=Prof. phone
|
PhonePro=Prof. phone
|
||||||
PhonePerso=Pers. phone
|
PhonePerso=Pers. phone
|
||||||
PhoneMobile=Mobile
|
PhoneMobile=Mobile
|
||||||
|
|||||||
@ -8,6 +8,7 @@ Members=Members
|
|||||||
MemberAccount=Member login
|
MemberAccount=Member login
|
||||||
ShowMember=Show member card
|
ShowMember=Show member card
|
||||||
UserNotLinkedToMember=User not linked to a member
|
UserNotLinkedToMember=User not linked to a member
|
||||||
|
ThirdpartyNotLinkedToMember=Third-party not linked to a member
|
||||||
MembersTickets=Members Tickets
|
MembersTickets=Members Tickets
|
||||||
FundationMembers=Foundation members
|
FundationMembers=Foundation members
|
||||||
Attributs=Attributes
|
Attributs=Attributes
|
||||||
@ -118,7 +119,6 @@ LastMembers=Last %s members
|
|||||||
LastMembersModified=Last %s modified members
|
LastMembersModified=Last %s modified members
|
||||||
LastSubscriptionsModified=Last %s modified subscriptions
|
LastSubscriptionsModified=Last %s modified subscriptions
|
||||||
AttributeName=Attribute name
|
AttributeName=Attribute name
|
||||||
FieldEdition=Edition of field %s
|
|
||||||
String=String
|
String=String
|
||||||
Text=Text
|
Text=Text
|
||||||
Int=Int
|
Int=Int
|
||||||
|
|||||||
@ -368,7 +368,7 @@ ExtrafieldRadio=Bouton radio
|
|||||||
ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...<br><br>Pour que la liste soit dépendante d'une autre :<br>1,valeur1|code_liste_parent:clef_parent<br>2,valeur2|code_liste_parent:clef_parent
|
ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...<br><br>Pour que la liste soit dépendante d'une autre :<br>1,valeur1|code_liste_parent:clef_parent<br>2,valeur2|code_liste_parent:clef_parent
|
||||||
ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
|
ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
|
||||||
ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
|
ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>...
|
||||||
ExtrafieldParamHelpsellist=La liste vient d'une table<br><br> par exemple : <br>c_typent:libelle:id<br><br>Pour que la liste soit dépendante d'une autre :<br>c_typent:libelle:id:code_liste_parent|colonne_parent
|
ExtrafieldParamHelpsellist=La liste vient d'une table<br><br> par exemple : <br>c_typent:libelle:id::filter<br><br>Pour que la liste soit dépendante d'une autre :<br>c_typent:libelle:id:code_liste_parent|colonne_parent:filter<br> filter peux être un test simple active=1 pour ne proposer que les valeur active<br> 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
|
LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF
|
||||||
WarningUsingFPDF=Attention : votre fichier <b>conf.php</b> contient la directive <b>dolibarr_pdf_force_fpdf=1</b>. 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.<br>Pour résoudre cela et avoir une prise en charge complète de PDF, vous pouvez télécharger la <a href="http://www.tcpdf.org/" target="_blank">bibliothèque TCPDF</a> puis commenter ou supprimer la ligne <b>$dolibarr_pdf_force_fpdf=1</b>, et ajouter à la place <b>$dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF'</b>
|
WarningUsingFPDF=Attention : votre fichier <b>conf.php</b> contient la directive <b>dolibarr_pdf_force_fpdf=1</b>. 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.<br>Pour résoudre cela et avoir une prise en charge complète de PDF, vous pouvez télécharger la <a href="http://www.tcpdf.org/" target="_blank">bibliothèque TCPDF</a> puis commenter ou supprimer la ligne <b>$dolibarr_pdf_force_fpdf=1</b>, et ajouter à la place <b>$dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF'</b>
|
||||||
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:<br>1 : taxe locale sur les produits et services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>2 : taxe locale sur les produits et services avant tva (la tva est appliquée sur le montant + la taxe locale)<br>3 : taxe locale uniquement sur les produits hors tva (la tva n'est pas appliquée sur la taxe locale)<br>4 : taxe locale uniquement sur les produits avant tva (la tva est appliquée sur le montant + la taxe locale)<br>5 : taxe locale uniquement sur les services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>6 : taxe locale uniquement sur les service avant tva (la tva est appliquée sur le montant + la taxe locale)
|
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:<br>1 : taxe locale sur les produits et services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>2 : taxe locale sur les produits et services avant tva (la tva est appliquée sur le montant + la taxe locale)<br>3 : taxe locale uniquement sur les produits hors tva (la tva n'est pas appliquée sur la taxe locale)<br>4 : taxe locale uniquement sur les produits avant tva (la tva est appliquée sur le montant + la taxe locale)<br>5 : taxe locale uniquement sur les services hors tva (la tva n'est pas appliquée sur la taxe locale)<br>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)
|
ExtraFieldsContacts=Attributs supplémentaires (contacts/adresses)
|
||||||
ExtraFieldsMember=Attributs supplémentaires (adhérents)
|
ExtraFieldsMember=Attributs supplémentaires (adhérents)
|
||||||
ExtraFieldsMemberType=Attributs supplémentaires (type d'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)
|
ExtraFieldsSupplierOrders=Attributs supplémentaires (commandes)
|
||||||
|
ExtraFieldsCustomerInvoices=Attributs supplémentaires (factures clients)
|
||||||
ExtraFieldsSupplierInvoices=Attributs supplémentaires (factures)
|
ExtraFieldsSupplierInvoices=Attributs supplémentaires (factures)
|
||||||
ExtraFieldsProject=Attributs supplémentaires (projets)
|
ExtraFieldsProject=Attributs supplémentaires (projets)
|
||||||
ExtraFieldsProjectTask=Attributs supplémentaires (tâches)
|
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
|
DisableForgetPasswordLinkOnLogonPage=Ne pas afficher le lien "Mot de passe oublié" sur la page de connexion
|
||||||
UsersSetup=Configuration du module utilisateurs
|
UsersSetup=Configuration du module utilisateurs
|
||||||
UserMailRequired=Email requis pour créer un nouvel utilisateur
|
UserMailRequired=Email requis pour créer un nouvel utilisateur
|
||||||
|
FieldEdition=Édition du champ %s
|
||||||
##### Company setup #####
|
##### Company setup #####
|
||||||
CompanySetup=Configuration du module Tiers
|
CompanySetup=Configuration du module Tiers
|
||||||
CompanyCodeChecker=Modèle de génération et contrôle des codes tiers (clients/fournisseurs)
|
CompanyCodeChecker=Modèle de génération et contrôle des codes tiers (clients/fournisseurs)
|
||||||
|
|||||||
@ -8,6 +8,7 @@ Members=Adhérents
|
|||||||
MemberAccount=Login adhérent
|
MemberAccount=Login adhérent
|
||||||
ShowMember=Afficher fiche adhérent
|
ShowMember=Afficher fiche adhérent
|
||||||
UserNotLinkedToMember=Utilisateur non lié à un adhérent
|
UserNotLinkedToMember=Utilisateur non lié à un adhérent
|
||||||
|
ThirdpartyNotLinkedToMember=Tiers non lié à un adhérent
|
||||||
MembersTickets=Étiquettes d'adhérents
|
MembersTickets=Étiquettes d'adhérents
|
||||||
FundationMembers=Membres de l'association
|
FundationMembers=Membres de l'association
|
||||||
Attributs=Attributs
|
Attributs=Attributs
|
||||||
@ -118,7 +119,6 @@ LastMembers=Les %s derniers adhérents
|
|||||||
LastMembersModified=Les %s derniers adhérents modifiés
|
LastMembersModified=Les %s derniers adhérents modifiés
|
||||||
LastSubscriptionsModified=Les %s dernières adhésions modifiées
|
LastSubscriptionsModified=Les %s dernières adhésions modifiées
|
||||||
AttributeName=Nom de l'attribut
|
AttributeName=Nom de l'attribut
|
||||||
FieldEdition=Édition du champ %s
|
|
||||||
String=Chaîne
|
String=Chaîne
|
||||||
Text=Texte long
|
Text=Texte long
|
||||||
Int=Numérique
|
Int=Numérique
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype);
|
$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
|
// Get parameters
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
@ -68,6 +72,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
$modulepart='produit';
|
$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
|
* Action envoie fichier
|
||||||
*/
|
*/
|
||||||
@ -106,6 +114,8 @@ if ($object->id)
|
|||||||
$picto=($object->type==1?'service':'product');
|
$picto=($object->type==1?'service':'product');
|
||||||
dol_fiche_head($head, 'documents', $titre, 0, $picto);
|
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
|
// Construit liste des fichiers
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010 François Legastelois <flegastelois@teclib.com>
|
* Copyright (C) 2010 François Legastelois <flegastelois@teclib.com>
|
||||||
*
|
*
|
||||||
@ -56,35 +56,42 @@ if ($action == 'addtime' && $user->rights->projet->creer)
|
|||||||
{
|
{
|
||||||
$task = new Task($db);
|
$task = new Task($db);
|
||||||
|
|
||||||
$timespent_duration=0;
|
$timespent_duration=array();
|
||||||
|
|
||||||
foreach($_POST as $key => $time)
|
foreach($_POST as $key => $time)
|
||||||
{
|
{
|
||||||
if(intval($time)>0)
|
if (intval($time) > 0)
|
||||||
{
|
{
|
||||||
// Hours or minutes
|
// Hours or minutes
|
||||||
if(preg_match("/([0-9]+)(hour|min)/",$key,$matches))
|
if (preg_match("/([0-9]+)(hour|min)/",$key,$matches))
|
||||||
{
|
{
|
||||||
$id = $matches[1];
|
$id = $matches[1];
|
||||||
|
if ($id > 0)
|
||||||
|
{
|
||||||
// We store HOURS in seconds
|
// We store HOURS in seconds
|
||||||
if($matches[2]=='hour') $timespent_duration += $time*60*60;
|
if($matches[2]=='hour') $timespent_duration[$id] += $time*60*60;
|
||||||
|
|
||||||
// We store MINUTES in seconds
|
// We store MINUTES in seconds
|
||||||
if($matches[2]=='min') $timespent_duration += $time*60;
|
if($matches[2]=='min') $timespent_duration[$id] += $time*60;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($timespent_duration > 0)
|
if (count($timespent_duration) > 0)
|
||||||
{
|
{
|
||||||
$task->fetch($id);
|
foreach($timespent_duration as $key => $val)
|
||||||
$task->timespent_duration = $timespent_duration;
|
{
|
||||||
|
$task->fetch($key);
|
||||||
|
$task->timespent_duration = $val;
|
||||||
$task->timespent_fk_user = $user->id;
|
$task->timespent_fk_user = $user->id;
|
||||||
$task->timespent_date = dol_mktime(12,0,0,$_POST["{$id}month"],$_POST["{$id}day"],$_POST["{$id}year"]);
|
$task->timespent_date = dol_mktime(12,0,0,$_POST["{$key}month"],$_POST["{$key}day"],$_POST["{$key}year"]);
|
||||||
$task->addTimeSpent($user);
|
$task->addTimeSpent($user);
|
||||||
|
}
|
||||||
|
|
||||||
// header to avoid submit twice on back
|
setEventMessage($langs->trans("RecordSaved"));
|
||||||
|
|
||||||
|
// Redirect to avoid submit twice on back
|
||||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$projectid.($mode?'&mode='.$mode:''));
|
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$projectid.($mode?'&mode='.$mode:''));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -144,6 +151,7 @@ print '<td>'.$langs->trans("RefTask").'</td>';
|
|||||||
print '<td>'.$langs->trans("LabelTask").'</td>';
|
print '<td>'.$langs->trans("LabelTask").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("DateStart").'</td>';
|
print '<td align="center">'.$langs->trans("DateStart").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("DateEnd").'</td>';
|
print '<td align="center">'.$langs->trans("DateEnd").'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans("PlannedWorkload").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Progress").'</td>';
|
print '<td align="right">'.$langs->trans("Progress").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
||||||
print '<td colspan="2">'.$langs->trans("AddDuration").'</td>';
|
print '<td colspan="2">'.$langs->trans("AddDuration").'</td>';
|
||||||
|
|||||||
@ -618,7 +618,7 @@ abstract class ActionsCardCommon
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->tpl['linked_member'] = $langs->trans("UserNotLinkedToMember");
|
$this->tpl['linked_member'] = $langs->trans("ThirdpartyNotLinkedToMember");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -68,6 +69,7 @@ class Societe extends CommonObject
|
|||||||
var $phone;
|
var $phone;
|
||||||
var $fax;
|
var $fax;
|
||||||
var $email;
|
var $email;
|
||||||
|
var $skype;
|
||||||
var $url;
|
var $url;
|
||||||
|
|
||||||
//! barcode
|
//! barcode
|
||||||
@ -410,6 +412,7 @@ class Societe extends CommonObject
|
|||||||
$this->fax = preg_replace("/\s/","",$this->fax);
|
$this->fax = preg_replace("/\s/","",$this->fax);
|
||||||
$this->fax = preg_replace("/\./","",$this->fax);
|
$this->fax = preg_replace("/\./","",$this->fax);
|
||||||
$this->email = trim($this->email);
|
$this->email = trim($this->email);
|
||||||
|
$this->skype = trim($this->skype);
|
||||||
$this->url = $this->url?clean_url($this->url,0):'';
|
$this->url = $this->url?clean_url($this->url,0):'';
|
||||||
$this->idprof1 = trim($this->idprof1);
|
$this->idprof1 = trim($this->idprof1);
|
||||||
$this->idprof2 = trim($this->idprof2);
|
$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 .= ",phone = ".(! empty($this->phone)?"'".$this->db->escape($this->phone)."'":"null");
|
||||||
$sql .= ",fax = ".(! empty($this->fax)?"'".$this->db->escape($this->fax)."'":"null");
|
$sql .= ",fax = ".(! empty($this->fax)?"'".$this->db->escape($this->fax)."'":"null");
|
||||||
$sql .= ",email = ".(! empty($this->email)?"'".$this->db->escape($this->email)."'":"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 .= ",url = ".(! empty($this->url)?"'".$this->db->escape($this->url)."'":"null");
|
||||||
|
|
||||||
$sql .= ",siren = '". $this->db->escape($this->idprof1) ."'";
|
$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->lastname=$this->lastname?$this->lastname:$lmember->lastname; // We keep firstname and lastname of member unchanged
|
||||||
$lmember->address=$this->address;
|
$lmember->address=$this->address;
|
||||||
$lmember->email=$this->email;
|
$lmember->email=$this->email;
|
||||||
|
$lmember->skype=$this->skype;
|
||||||
$lmember->phone=$this->phone;
|
$lmember->phone=$this->phone;
|
||||||
|
|
||||||
$result=$lmember->update($user,0,1,1,1); // Use nosync to 1 to avoid cyclic updates
|
$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.status';
|
||||||
$sql .= ', s.price_level';
|
$sql .= ', s.price_level';
|
||||||
$sql .= ', s.tms as date_update';
|
$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.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.capital, s.tva_intra';
|
||||||
$sql .= ', s.fk_typent as typent_id';
|
$sql .= ', s.fk_typent as typent_id';
|
||||||
@ -777,6 +782,7 @@ class Societe extends CommonObject
|
|||||||
$this->statut_commercial = $libelle; // libelle statut commercial
|
$this->statut_commercial = $libelle; // libelle statut commercial
|
||||||
|
|
||||||
$this->email = $obj->email;
|
$this->email = $obj->email;
|
||||||
|
$this->skype = $obj->skype;
|
||||||
$this->url = $obj->url;
|
$this->url = $obj->url;
|
||||||
$this->phone = $obj->phone;
|
$this->phone = $obj->phone;
|
||||||
$this->fax = $obj->fax;
|
$this->fax = $obj->fax;
|
||||||
@ -1518,22 +1524,22 @@ class Societe extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($mode == 2)
|
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 ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity");
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
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 ($statut==1) return img_picto($langs->trans("InActivity"),'statut4');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
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 ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity");
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
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');
|
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->country_id=$member->country_id;
|
||||||
$this->phone=$member->phone; // Prof phone
|
$this->phone=$member->phone; // Prof phone
|
||||||
$this->email=$member->email;
|
$this->email=$member->email;
|
||||||
|
$this->skype=$member->skype;
|
||||||
|
|
||||||
$this->client = 1; // A member is a customer by default
|
$this->client = 1; // A member is a customer by default
|
||||||
$this->code_client = -1;
|
$this->code_client = -1;
|
||||||
@ -2548,6 +2555,7 @@ class Societe extends CommonObject
|
|||||||
$this->country_id=1;
|
$this->country_id=1;
|
||||||
$this->country_code='FR';
|
$this->country_code='FR';
|
||||||
$this->email='specimen@specimen.com';
|
$this->email='specimen@specimen.com';
|
||||||
|
$this->skype='tom.hanson';
|
||||||
$this->url='http://www.specimen.com';
|
$this->url='http://www.specimen.com';
|
||||||
|
|
||||||
$this->phone='0909090901';
|
$this->phone='0909090901';
|
||||||
|
|||||||
@ -6,6 +6,8 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2011-2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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->town = GETPOST('town');
|
||||||
$object->country_id = GETPOST('country_id');
|
$object->country_id = GETPOST('country_id');
|
||||||
$object->state_id = GETPOST('state_id');
|
$object->state_id = GETPOST('state_id');
|
||||||
|
$object->skype = GETPOST('skype');
|
||||||
$object->phone = GETPOST('phone');
|
$object->phone = GETPOST('phone');
|
||||||
$object->fax = GETPOST('fax');
|
$object->fax = GETPOST('fax');
|
||||||
$object->email = GETPOST('email');
|
$object->email = GETPOST('email');
|
||||||
@ -265,6 +268,7 @@ if (empty($reshook))
|
|||||||
$contact->socid = $object->id; // fk_soc
|
$contact->socid = $object->id; // fk_soc
|
||||||
$contact->status = 1;
|
$contact->status = 1;
|
||||||
$contact->email = $object->email;
|
$contact->email = $object->email;
|
||||||
|
$contact->skype = $object->skype;
|
||||||
$contact->phone_pro = $object->phone;
|
$contact->phone_pro = $object->phone;
|
||||||
$contact->fax = $object->fax;
|
$contact->fax = $object->fax;
|
||||||
$contact->priv = 0;
|
$contact->priv = 0;
|
||||||
@ -598,6 +602,7 @@ else
|
|||||||
$object->zip = GETPOST('zipcode');
|
$object->zip = GETPOST('zipcode');
|
||||||
$object->town = GETPOST('town');
|
$object->town = GETPOST('town');
|
||||||
$object->state_id = GETPOST('state_id');
|
$object->state_id = GETPOST('state_id');
|
||||||
|
$object->skype = GETPOST('skype');
|
||||||
$object->phone = GETPOST('phone');
|
$object->phone = GETPOST('phone');
|
||||||
$object->fax = GETPOST('fax');
|
$object->fax = GETPOST('fax');
|
||||||
$object->email = GETPOST('email');
|
$object->email = GETPOST('email');
|
||||||
@ -845,6 +850,12 @@ else
|
|||||||
print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td colspan="3"><input type="text" name="email" size="32" value="'.$object->email.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td colspan="3"><input type="text" name="email" size="32" value="'.$object->email.'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
||||||
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
||||||
@ -1079,6 +1090,7 @@ else
|
|||||||
$object->town = GETPOST('town');
|
$object->town = GETPOST('town');
|
||||||
$object->country_id = GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id;
|
$object->country_id = GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id;
|
||||||
$object->state_id = GETPOST('state_id');
|
$object->state_id = GETPOST('state_id');
|
||||||
|
$object->skype = GETPOST('skype');
|
||||||
$object->phone = GETPOST('phone');
|
$object->phone = GETPOST('phone');
|
||||||
$object->fax = GETPOST('fax');
|
$object->fax = GETPOST('fax');
|
||||||
$object->email = GETPOST('email');
|
$object->email = GETPOST('email');
|
||||||
@ -1262,6 +1274,12 @@ else
|
|||||||
print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td colspan="3"><input type="text" name="email" size="32" value="'.$object->email.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td colspan="3"><input type="text" name="email" size="32" value="'.$object->email.'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
||||||
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
||||||
@ -1570,6 +1588,14 @@ else
|
|||||||
print dol_print_url($object->url);
|
print dol_print_url($object->url);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Skype
|
||||||
|
if (! empty($conf->skype->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3">';
|
||||||
|
print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
|
print '<tr><td>'.$langs->trans('Phone').'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
|
||||||
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||||
@ -1767,7 +1793,7 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $langs->trans("UserNotLinkedToMember");
|
print $langs->trans("ThirdpartyNotLinkedToMember");
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
BIN
htdocs/theme/amarok/img/object_skype.png
Normal file
BIN
htdocs/theme/amarok/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
htdocs/theme/auguria/img/object_skype.png
Normal file
BIN
htdocs/theme/auguria/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
htdocs/theme/bureau2crea/img/object_skype.png
Normal file
BIN
htdocs/theme/bureau2crea/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
htdocs/theme/cameleo/img/object_skype.png
Normal file
BIN
htdocs/theme/cameleo/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
htdocs/theme/eldy/img/object_skype.png
Normal file
BIN
htdocs/theme/eldy/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in New Issue
Block a user