From d226abcdfcfd162c19340180694e56c03f5fab30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 10 Dec 2013 14:30:40 +0100 Subject: [PATCH 1/8] Corrected translation --- htdocs/langs/en_US/bills.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index e5df33ec55f..5a12a3a7262 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -409,5 +409,5 @@ PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (Tem # oursin PDF Model PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (Template alternative) # NumRef Modules -TerreNumRefModelDesc1=Return numero with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. From 5a4b5dcc2682e40970f7ee6537ba191edabff8a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 14:21:27 +0100 Subject: [PATCH 2/8] Fix: Missing condition --- htdocs/adherents/fiche.php | 37 +++++++++++++++++++++---------------- htdocs/admin/modules.php | 2 +- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 399cc712297..0847af47624 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -285,7 +285,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->phone_perso = trim($_POST["phone_perso"]); $object->phone_mobile= trim($_POST["phone_mobile"]); $object->email = trim($_POST["email"]); - $object->skype = trim($_POST["skype"]); + $object->skype = trim($_POST["skype"]); $object->birth = $birthdate; $object->typeid = $_POST["typeid"]; @@ -428,7 +428,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $phone=$_POST["phone"]; $phone_perso=$_POST["phone_perso"]; $phone_mobile=$_POST["phone_mobile"]; - $skype=$_POST["member_skype"]; + $skype=$_POST["member_skype"]; $email=$_POST["member_email"]; $login=$_POST["member_login"]; $pass=$_POST["password"]; @@ -453,7 +453,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->phone = $phone; $object->phone_perso = $phone_perso; $object->phone_mobile= $phone_mobile; - $object->skype = $skype; + $object->skype = $skype; $object->email = $email; $object->login = $login; $object->pass = $pass; @@ -861,11 +861,11 @@ else // Tel mobile print ''.$langs->trans("PhoneMobile").''; - // Skype - if (! empty($conf->skype->enabled)) - { - print ''.$langs->trans("Skype").''; - } + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").''; + } // Birthday print "".$langs->trans("Birthday")."\n"; @@ -1103,10 +1103,11 @@ else // Tel mobile print ''.$langs->trans("PhoneMobile").'phone_mobile).'">'; - // Skype - if (! empty($conf->skype->enabled)) { - print ''.$langs->trans("Skype").'skype).'">'; - } + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").'skype).'">'; + } // Birthday print "".$langs->trans("Birthday")."\n"; @@ -1327,7 +1328,7 @@ else /* * Confirm add in spip - */ + */ if ($action == 'add_spip') { print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); @@ -1335,7 +1336,7 @@ else /* * Confirm removed from spip - */ + */ if ($action == 'del_spip') { print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); @@ -1344,6 +1345,7 @@ else $rowspan=17; if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++; if (! empty($conf->societe->enabled)) $rowspan++; + if (! empty($conf->skype->enabled)) $rowspan++; print ''; @@ -1426,8 +1428,11 @@ else // Tel mobile print ''; - // Skype - print ''; + // Skype + if (! empty($conf->skype->enabled)) + { + print ''; + } // Birthday print ''; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 0b0c9db4f17..7c3b1f6c479 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -159,7 +159,7 @@ foreach ($modulesdir as $dir) if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0; // We discard modules according to property disabled if (isset($objMod->hidden) && $objMod->hidden) $modulequalified=false; - + // Define array $categ with categ with at least one qualified module if ($modulequalified) { From 6cc20cb731dcd7c2d1e0b384d8ce1f79d4fdb7fb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 15:21:15 +0100 Subject: [PATCH 3/8] Fix: Filter on third parties were wrong for external users. --- htdocs/comm/list.php | 13 ++++++------- htdocs/comm/prospect/list.php | 14 ++++++-------- htdocs/fourn/liste.php | 3 ++- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index 28696228e45..5864b4b4cee 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -56,6 +56,8 @@ $search_compta=GETPOST("search_compta"); $search_sale = GETPOST("search_sale"); $search_categ = GETPOST("search_categ",'int'); $catid = GETPOST("catid",'int'); +// If the internal user must only see his customers, force searching by him +if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('customerlist')); @@ -98,17 +100,15 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url); $sql = "SELECT s.rowid, s.nom as name, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; $sql.= " s.datec, s.datea, s.canvas"; -// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) -if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; +if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ +if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale $sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st"; -// We'll need this table joined to the select in order to filter by sale -if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.fk_stcomm = st.id"; $sql.= " AND s.client IN (1, 3)"; $sql.= ' AND s.entity IN ('.getEntity('societe', 1).')'; -if (!$user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; +if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc"; if ($socid) $sql.= " AND s.rowid = ".$socid; if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; @@ -137,8 +137,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit +1, $offset); -dol_syslog('comm:list.php: sql='.$sql,LOG_DEBUG); - +dol_syslog('comm/list.php: sql='.$sql,LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 873ef051612..43a800dec76 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -141,7 +141,7 @@ else dol_print_error($db); // Load sale and categ filters $search_sale = GETPOST('search_sale'); $search_categ = GETPOST('search_categ'); -// If the user must only see his prospect, force searching by him +// If the internal user must only see his prospect, force searching by him if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id; // List of avaible states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state) @@ -176,18 +176,17 @@ $formother=new FormOther($db); $sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,"; $sql.= " d.nom as departement"; -// Updated by Matelli -if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) +if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) $sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st"; -if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale $sql.= ", ".MAIN_DB_PREFIX."societe as s"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d on (d.rowid = s.fk_departement)"; if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ +if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale $sql.= " WHERE s.fk_stcomm = st.id"; $sql.= " AND s.client IN (2, 3)"; $sql.= ' AND s.entity IN ('.getEntity('societe', 1).')'; -if ($user->societe_id) $sql.= " AND s.rowid = " .$user->societe_id; -if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale +if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc"; +if ($socid) $sql.= " AND s.rowid = " .$socid; if (isset($stcomm) && $stcomm != '') $sql.= " AND s.fk_stcomm=".$stcomm; if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; @@ -214,7 +213,6 @@ if ($socname) $sortfield = "s.nom"; $sortorder = "ASC"; } - // Count total nb of records $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) @@ -222,10 +220,10 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); } - $sql.= " ORDER BY $sortfield $sortorder, s.nom ASC"; $sql.= $db->plimit($conf->liste_limit+1, $offset); +dol_syslog('comm/propsect/list.php: sql='.$sql,LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php index 16406eeb279..07be6c43fc6 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/liste.php @@ -86,7 +86,7 @@ $sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.fk_stcomm = st.id AND s.fournisseur = 1"; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; +if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc"; if ($socid) $sql .= " AND s.rowid = ".$socid; if ($socname) { @@ -114,6 +114,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); +dol_syslog('fourn/liste.php: sql='.$sql,LOG_DEBUG); $resql = $db->query($sql); if ($resql) { From 7ecb313798d8f206eb48afcd93b3b1c3c71f8d8c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 15:26:22 +0100 Subject: [PATCH 4/8] Fix: [ bug #1175 ] lien incorrect dans l'onglet Note d'un tiers --- htdocs/societe/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 9605106aec6..1928ba914a0 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -33,7 +33,7 @@ $action = GETPOST('action'); $langs->load("companies"); // Security check -$id = GETPOST('id','int'); +$id = GETPOST('id')?GETPOST('id','int'):GETPOST('socid','int'); if ($user->societe_id) $id=$user->societe_id; $result = restrictedArea($user, 'societe', $id, '&societe'); From 4248431dc9073c835859b35548d6f494fa6dc72e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 15:35:13 +0100 Subject: [PATCH 5/8] Fix: [ bug #1177 ] Error on create domiciliation --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 461b3606cd6..6a6d2ad0fe5 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2908,7 +2908,7 @@ class Facture extends CommonInvoice $sql .= ' (fk_facture, amount, date_demande, fk_user_demande, code_banque, code_guichet, number, cle_rib)'; $sql .= ' VALUES ('.$this->id; $sql .= ",'".price2num($resteapayer)."'"; - $sql .= ",'".$this->db->idate($now)."',"; + $sql .= ",'".$this->db->idate($now)."'"; $sql .= ",".$user->id; $sql .= ",'".$bac->code_banque."'"; $sql .= ",'".$bac->code_guichet."'"; From dc1ccbfae88c36c9a686225d0c77ae83ed168486 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 15:40:43 +0100 Subject: [PATCH 6/8] Fix: [ bug #1177 ] Error on create domiciliation --- htdocs/compta/facture/class/facture.class.php | 8 +++++--- test/phpunit/FactureTest.php | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 6a6d2ad0fe5..2ad24721e46 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2914,13 +2914,15 @@ class Facture extends CommonInvoice $sql .= ",'".$bac->code_guichet."'"; $sql .= ",'".$bac->number."'"; $sql .= ",'".$bac->cle_rib."')"; - if ( $this->db->query($sql)) + + dol_syslog(get_class($this)."::demande_prelevement sql=".$sql); + if ($this->db->query($sql)) { return 1; } else - { - $this->error=$this->db->error(); + { + $this->error=$this->db->lasterror(); dol_syslog(get_class($this).'::demandeprelevement Erreur'); return -1; } diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 0301333f481..f0c6539ea8d 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -243,6 +243,10 @@ class FactureTest extends PHPUnit_Framework_TestCase print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; $this->assertNotEquals($localobject->date_creation, ''); + $result=$localobject->demande_prelevement($user); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject->id; } From 0e259393734503421a87bb6345959c7135a49dff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 17:40:23 +0100 Subject: [PATCH 7/8] Fix: price function not correctly used --- htdocs/comm/propal.php | 34 +++++++++++++++++----------------- htdocs/societe/soc.php | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6a963c23658..ef37fa534bd 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -701,7 +701,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); $db->begin(); - + // Ecrase $pu par celui du produit // Ecrase $desc par celui du produit // Ecrase $txtva par celui du produit @@ -861,7 +861,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- if ($result > 0) { $db->commit(); - + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language @@ -903,7 +903,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- else { $db->rollback(); - + setEventMessage($object->error, 'errors'); } } @@ -984,11 +984,11 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa $error++; } } - + if (! $error) { $db->begin(); - + $result = $object->updateline( GETPOST('lineid'), $pu_ht, @@ -1015,7 +1015,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa if ($result >= 0) { $db->commit(); - + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language @@ -1046,7 +1046,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa else { $db->rollback(); - + setEventMessage($object->error, 'errors'); } } @@ -1980,8 +1980,8 @@ else // Amount HT print ''; - print ''; - print ''; + print ''; + print ''; // Margin Infos if (! empty($conf->margin->enabled)) { @@ -1993,28 +1993,28 @@ else // Amount VAT print ''; - print ''; - print ''; + print ''; + print ''; // Amount Local Taxes if ($mysoc->localtax1_assuj=="1") //Localtax1 { print ''; - print ''; - print ''; + print ''; + print ''; } if ($mysoc->localtax2_assuj=="1") //Localtax2 { print ''; - print ''; - print ''; + print ''; + print ''; } // Amount TTC print ''; - print ''; - print ''; + print ''; + print ''; // Statut print ''; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index b9fd30a57e4..881fce7b2b5 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1737,7 +1737,7 @@ else // Capital print ''; From dc754bbdc214874d5354db5cbb6279208a26c24f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 20:48:34 +0100 Subject: [PATCH 8/8] Fix: Trigger name conflicts and reference file was not matching real name of triggers. --- ChangeLog | 4 ++ htdocs/contrat/class/contrat.class.php | 4 +- .../interface_90_all_Demo.class.php-NORUN | 58 ++++++++++++++++++- htdocs/fichinter/class/fichinter.class.php | 8 +-- 4 files changed, 65 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30de710764b..5dc6b2eab0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -128,6 +128,10 @@ parameter. All methods addline in this case were modified to remove this paramet 5) Property ->tel on objects is now ->phone +6) Trigger LINEPROPAL_MODIFY is renamed into LINEPROPAL_UPDATE and + Trigger CONTRACT_LINE_DELETE rnamed into LINECONTRACT_DELETE to match naming rules. + + ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** Fix: field's problem into company's page (RIB) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index b4168ecc3de..61e41356b6b 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1269,7 +1269,7 @@ class Contrat extends CommonObject // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_LINE_DELETE',$this,$user,$langs,$conf); + $result=$interface->run_triggers('LINECONTRACT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -2118,7 +2118,7 @@ class ContratLigne // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_LINE_MODIFY',$this,$user,$langs,$conf); + $result=$interface->run_triggers('LINECONTRACT_UPDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index 7f40302ef2d..e3257e2bda8 100644 --- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -243,6 +243,10 @@ class InterfaceDemo { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } + elseif ($action == 'LINEORDER_UPDATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } elseif ($action == 'LINEORDER_DELETE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); @@ -265,6 +269,18 @@ class InterfaceDemo { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } + elseif ($action == 'LINEORDER_SUPPLIER_DISPATCH') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'LINEORDER_SUPPLIER_CREATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'LINEORDER_SUPPLIER_UPDATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } // Proposals elseif ($action == 'PROPAL_CREATE') @@ -307,7 +323,7 @@ class InterfaceDemo { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } - elseif ($action == 'LINEPROPAL_MODIFY') + elseif ($action == 'LINEPROPAL_UPDATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } @@ -337,6 +353,14 @@ class InterfaceDemo { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } + elseif ($action == 'LINECONTRACT_UPDATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'LINECONTRACT_DELETE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } // Bills elseif ($action == 'BILL_CREATE') @@ -378,12 +402,28 @@ class InterfaceDemo elseif ($action == 'LINEBILL_INSERT') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'LINEBILL_UPDATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } elseif ($action == 'LINEBILL_DELETE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } - + elseif ($action == 'LINEBILL_SUPPLIER_CREATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'LINEBILL_SUPPLIER_UPDATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'LINEBILL_SUPPLIER_DELETE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + // Payments elseif ($action == 'PAYMENT_CUSTOMER_CREATE') { @@ -419,7 +459,19 @@ class InterfaceDemo { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } - + elseif ($action == 'LINEFICHINTER_CREATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'LINEFICHINTER_UPDATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'LINEFICHINTER_DELETE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + // Members elseif ($action == 'MEMBER_CREATE') { diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index beea21996d9..bd1306b0cf6 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -251,7 +251,7 @@ class Fichinter extends CommonObject // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHINTER_UPDATE',$this,$user,$langs,$conf); + $result=$interface->run_triggers('FICHINTER_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1148,7 +1148,7 @@ class FichinterLigne // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $resulttrigger=$interface->run_triggers('FICHINTERDET_CREATE',$this,$user,$langs,$conf); + $resulttrigger=$interface->run_triggers('LINEFICHINTER_CREATE',$this,$user,$langs,$conf); if ($resulttrigger < 0) { $error++; $this->errors=$interface->errors; } @@ -1210,7 +1210,7 @@ class FichinterLigne // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $resulttrigger=$interface->run_triggers('FICHINTERDET_UPDATE',$this,$user,$langs,$conf); + $resulttrigger=$interface->run_triggers('LINEFICHINTER_UPDATE',$this,$user,$langs,$conf); if ($resulttrigger < 0) { $error++; $this->errors=$interface->errors; } @@ -1324,7 +1324,7 @@ class FichinterLigne // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $resulttrigger=$interface->run_triggers('FICHINTERDET_DELETE',$this,$user,$langs,$conf); + $resulttrigger=$interface->run_triggers('LINEFICHINTER_DELETE',$this,$user,$langs,$conf); if ($resulttrigger < 0) { $error++; $this->errors=$interface->errors; }
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("Birthday").''.dol_print_date($object->birth,'day').'
'.$langs->trans('AmountHT').''.price($object->total_ht).''.$langs->trans("Currency".$conf->currency).''.price($object->total_ht,'',$langs,0,-1,-1,$conf->currency).'
'.$langs->trans('AmountVAT').''.price($object->total_tva).''.$langs->trans("Currency".$conf->currency).'
'.price($object->total_tva,'',$langs,0,-1,-1,$conf->currency).'
'.$langs->transcountry("AmountLT1",$mysoc->country_code).''.price($object->total_localtax1).''.$langs->trans("Currency".$conf->currency).'
'.price($object->total_localtax1,'',$langs,0,-1,-1,$conf->currency).'
'.$langs->transcountry("AmountLT2",$mysoc->country_code).''.price($object->total_localtax2).''.$langs->trans("Currency".$conf->currency).'
'.price($object->total_localtax2,'',$langs,0,-1,-1,$conf->currency).'
'.$langs->trans('AmountTTC').''.price($object->total_ttc).''.$langs->trans("Currency".$conf->currency).'
'.price($object->total_ttc,'',$langs,0,-1,-1,$conf->currency).'
'.$langs->trans('Status').''.$object->getLibStatut(4).'
'.$langs->trans('Capital').''; - if ($object->capital) print $object->capital.' '.$langs->trans("Currency".$conf->currency); + if ($object->capital) print price($object->capital,'',$langs,0,-1,-1, $conf->currency); else print ' '; print '