From 23673cf46442c1173ca4b4f48a65623332655bf6 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 16 Jul 2015 20:51:22 +0200 Subject: [PATCH 01/10] Fix: ER vat rate don't show in pdf --- htdocs/expensereport/class/expensereport.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 04f5628a224..0a1fe3d9556 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -736,7 +736,7 @@ class ExpenseReport extends CommonObject $this->lines=array(); $sql = ' SELECT de.rowid, de.comments, de.qty, de.value_unit, de.date,'; - $sql.= ' de.'.$this->fk_element.', de.fk_c_type_fees, de.fk_projet, de.tva_tx as vatrate,'; + $sql.= ' de.'.$this->fk_element.', de.fk_c_type_fees, de.fk_projet, de.tva_tx,'; $sql.= ' de.total_ht, de.total_tva, de.total_ttc,'; $sql.= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees,'; $sql.= ' p.ref as ref_projet, p.title as title_projet'; @@ -773,7 +773,8 @@ class ExpenseReport extends CommonObject $deplig->type_fees_code = $objp->code_type_fees; $deplig->type_fees_libelle = $objp->libelle_type_fees; - $deplig->vatrate = $objp->vatrate; + $deplig->tva_tx = $objp->tva_tx; + $deplig->vatrate = $objp->tva_tx; $deplig->projet_ref = $objp->ref_projet; $deplig->projet_title = $objp->title_projet; From 3b547c0979c3fde1c684c6d3c961fe5bed8b551e Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 16 Jul 2015 21:17:31 +0200 Subject: [PATCH 02/10] Fix: #3244 [Homepage] Last n members link broken --- htdocs/core/boxes/box_members.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index f871226b4e9..9c166aac866 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -105,6 +105,7 @@ class box_members extends ModeleBoxes $memberstatic->lastname=$objp->lastname; $memberstatic->firstname=$objp->firstname; + $memberstatic->id = $objp->rowid; $memberstatic->ref = $objp->rowid; if (! empty($objp->fk_soc)) { From f970494d1ed8c4f51bd2fc6e9282744f9d5d44ad Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 16 Jul 2015 21:29:15 +0200 Subject: [PATCH 03/10] Fix: [Homepage] colspan problem with tasks box --- htdocs/core/boxes/box_task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index c2425b54b71..bcddc7f00e6 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -122,7 +122,7 @@ class box_task extends ModeleBoxes // Add the sum à the bottom of the boxes - $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left" colspan="2" ', 'text' => $langs->trans("Total")." ".$textHead); + $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead); $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks")); $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5)); $this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot,'all',25200,5)); From 2d3d78ecc079e4c570b958dc87df127f0d51d95e Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 16 Jul 2015 22:16:11 +0200 Subject: [PATCH 04/10] Fix: #3232 [Agenda] Setup page tab order is weird --- htdocs/core/modules/modAgenda.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 3119553f677..0e8eae911d2 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -5,8 +5,8 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2009-2011 Regis Houssin - * Copyright (C) 2013 Cedric Gross - * Copyright (C) 2015 Bahfir Abbes + * Copyright (C) 2013 Cedric Gross + * Copyright (C) 2015 Bahfir Abbes * * 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 @@ -64,7 +64,7 @@ class modAgenda extends DolibarrModules // Config pages //------------- - $this->config_page_url = array("agenda.php"); + $this->config_page_url = array("agenda_other.php"); // Dependancies //------------- From 440e144892408491fda7b3a1ff0924bd0e94d45a Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 16 Jul 2015 22:29:04 +0200 Subject: [PATCH 05/10] Fix: #3230 [Leaves] Module setup page is useless --- htdocs/core/modules/modHoliday.class.php | 2 +- htdocs/holiday/admin/holiday.php | 71 ------------------------ htdocs/holiday/admin/index.html | 0 3 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 htdocs/holiday/admin/holiday.php delete mode 100644 htdocs/holiday/admin/index.html diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 11ed1f7c835..fcc4930e34b 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -80,7 +80,7 @@ class modHoliday extends DolibarrModules //$this->style_sheet = '/mymodule/mymodule.css.php'; // Config pages. Put here list of php page names stored in admmin directory used to setup module. - $this->config_page_url = array("holiday.php?leftmenu=setup@holiday"); + // $this->config_page_url = array("holiday.php?leftmenu=setup@holiday"); // Dependencies $this->depends = array(); // List of modules id that must be enabled if this module is enabled diff --git a/htdocs/holiday/admin/holiday.php b/htdocs/holiday/admin/holiday.php deleted file mode 100644 index c1222213b5c..00000000000 --- a/htdocs/holiday/admin/holiday.php +++ /dev/null @@ -1,71 +0,0 @@ - - * Copyright (C) 2011 Dimitri Mouillard - * Copyright (C) 2012 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * 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 . - */ - -/** - * Page module configuration paid holiday. - * - * \file holiday.php - * \ingroup holiday - * \brief Page module configuration paid holiday. - */ - -require '../../main.inc.php'; -require DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; -require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php'; -require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php'; -require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php'; - -$action=GETPOST('action'); -$optName=GETPOST('optName'); -$optValue=GETPOST('optValue'); - -$langs->load("admin"); -$langs->load("holiday"); - -// Si pas administrateur -if (! $user->admin) accessforbidden(); - - -/* - * View - */ - -// Vérification si module activé -if (empty($conf->holiday->enabled)) print $langs->trans('NotActiveModCP'); - -llxheader('',$langs->trans('TitleAdminCP')); - -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfCP'), $linkback, 'title_hrm.png'); - -$cp = new Holiday($db); - -print '
'.$langs->trans("GoIntoDictionaryHolidayTypes").'

'; - -$var=!$var; -print '
'.$langs->trans('LastUpdateCP').': '."\n"; -if ($cp->getConfCP('lastUpdate')) print ''.dol_print_date($db->jdate($cp->getConfCP('lastUpdate')),'dayhour','tzuser').''; -else print $langs->trans('None'); -print "

\n"; - - -// Fin de page -llxFooter(); - -if (is_object($db)) $db->close(); \ No newline at end of file diff --git a/htdocs/holiday/admin/index.html b/htdocs/holiday/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 From a0d74cc1a1b615cd0adcd9cadc3c82741f9a56cc Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 16 Jul 2015 22:50:50 +0200 Subject: [PATCH 06/10] Fix: #3228 [Export] Missing member ID field in users --- htdocs/core/modules/modUser.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 41598f51106..c55e65e7004 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -210,7 +210,7 @@ class modUser extends DolibarrModules $this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs'; $this->export_permission[$r]=array(array("user","user","export")); $this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.lastname'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Phone','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Administrator",'u.statut'=>'Status','u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion','u.fk_socpeople'=>"IdContact",'u.fk_soc'=>"IdCompany",'u.fk_member'=>"MemberId"); - $this->export_TypeFields_array[$r]=array('u.login'=>"Text",'u.lastname'=>"Text",'u.firstname'=>"Text",'u.office_phone'=>'Text','u.office_fax'=>'Text','u.email'=>'Text','u.datec'=>"Date",'u.tms'=>"Date",'u.admin'=>"Boolean",'u.statut'=>'Status','u.note'=>"Text",'u.datelastlogin'=>'Date','u.datepreviouslogin'=>'Date','u.fk_soc'=>"List:societe:nom:rowid",'u.fk_member'=>"List:adherent:nom"); + $this->export_TypeFields_array[$r]=array('u.login'=>"Text",'u.lastname'=>"Text",'u.firstname'=>"Text",'u.office_phone'=>'Text','u.office_fax'=>'Text','u.email'=>'Text','u.datec'=>"Date",'u.tms'=>"Date",'u.admin'=>"Boolean",'u.statut'=>'Status','u.note'=>"Text",'u.datelastlogin'=>'Date','u.datepreviouslogin'=>'Date','u.fk_soc'=>"List:societe:nom:rowid",'u.fk_member'=>"List:adherent:firstname"); $this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.lastname'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user','u.fk_socpeople'=>"contact",'u.fk_soc'=>"company",'u.fk_member'=>"member"); if (empty($conf->adherent->enabled)) { From 5ce419922da68b9199d064973c0fc72bce78e2f4 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Fri, 17 Jul 2015 05:22:29 +0200 Subject: [PATCH 07/10] Fix: #3253 #3252 #3251 Remove print_r --- dev/examples/get_contracts.php | 2 +- htdocs/accountancy/admin/productaccount.php | 27 ++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dev/examples/get_contracts.php b/dev/examples/get_contracts.php index ddfeccb5677..d1be3d9d7bf 100755 --- a/dev/examples/get_contracts.php +++ b/dev/examples/get_contracts.php @@ -73,7 +73,7 @@ $obj->socid=$argv[1]; $listofcontractsforcompany=$obj->getListOfContracts('all'); -print_r($listofcontractsforcompany); +print $listofcontractsforcompany; // -------------------- END OF YOUR CODE -------------------- diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 52c4a0d1862..5a3531af533 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -106,13 +106,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_desc=''; } -//debug move header to top -llxHeader('', $langs->trans("Accounts")); - - //TODO: modify to update all selected product with a sell account if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->trans("Accountancy_code_sell")) { -//print_r ($changeaccount); $error = 0; $db->begin(); @@ -122,7 +117,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs-> $sql1 .= ' WHERE p.rowid IN (' . implode(',', $changeaccount) . ')'; dol_syslog('accountancy/customer/lines.php::changeaccount product sell sql= ' . $sql1); -print_r ($sql1); + $resql1 = $db->query($sql1); if (! $resql1) { $error ++; @@ -137,7 +132,6 @@ print_r ($sql1); } } - //TODO: modify to update all selected product with a buy account if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->trans("Accountancy_code_buy")) { $error = 0; @@ -147,9 +141,16 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs-> $sql1 = "UPDATE " . MAIN_DB_PREFIX . "product as p"; $sql1 .= " SET p.accountancy_code_buy=" . $account_number_buy; $sql1 .= ' WHERE p.rowid IN (' . implode(',', $changeaccount) . ')'; -print_r ($sql1); - dol_syslog('accountancy/customer/lines.php::changeaccount product buy sql= ' . $sql1); - $resql1 = $db->query($sql1); + + // Debug + // print_r ($sql1); + + dol_syslog('accountancy/customer/lines.php::changeaccount product buy sql= ' . $sql1); + + // Debug + // print_r ($sql1); + + $resql1 = $db->query($sql1); if (! $resql1) { $error ++; setEventMessage($db->lasterror(), 'errors'); @@ -166,12 +167,10 @@ print_r ($sql1); /* * View */ -//DEBUG elarifr -//llxHeader('', $langs->trans("Accounts")); +llxHeader('', $langs->trans("Accounts")); -//For updating account export +// For updating account export print '