Merge remote-tracking branch 'Upstream/3.8' into 3.8-1

This commit is contained in:
aspangaro 2015-07-18 05:29:57 +02:00
commit b9b6abd7a8
12 changed files with 32 additions and 109 deletions

View File

@ -73,7 +73,7 @@ $obj->socid=$argv[1];
$listofcontractsforcompany=$obj->getListOfContracts('all'); $listofcontractsforcompany=$obj->getListOfContracts('all');
print_r($listofcontractsforcompany); print $listofcontractsforcompany;
// -------------------- END OF YOUR CODE -------------------- // -------------------- END OF YOUR CODE --------------------

View File

@ -106,13 +106,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$search_desc=''; $search_desc='';
} }
//debug move header to top
llxHeader('', $langs->trans("Accounts"));
//TODO: modify to update all selected product with a sell account //TODO: modify to update all selected product with a sell account
if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->trans("Accountancy_code_sell")) { if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->trans("Accountancy_code_sell")) {
//print_r ($changeaccount);
$error = 0; $error = 0;
$db->begin(); $db->begin();
@ -121,8 +116,11 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->
$sql1 .= " SET p.accountancy_code_sell=" . $account_number_sell; $sql1 .= " SET p.accountancy_code_sell=" . $account_number_sell;
$sql1 .= ' WHERE p.rowid IN (' . implode(',', $changeaccount) . ')'; $sql1 .= ' WHERE p.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/customer/lines.php::changeaccount product sell sql= ' . $sql1); // Debug
print_r ($sql1); // print_r ($sql1);
dol_syslog('accountancy/customer/lines.php::changeaccount product sell sql= ' . $sql1);
$resql1 = $db->query($sql1); $resql1 = $db->query($sql1);
if (! $resql1) { if (! $resql1) {
$error ++; $error ++;
@ -137,7 +135,6 @@ print_r ($sql1);
} }
} }
//TODO: modify to update all selected product with a buy account //TODO: modify to update all selected product with a buy account
if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->trans("Accountancy_code_buy")) { if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->trans("Accountancy_code_buy")) {
$error = 0; $error = 0;
@ -147,9 +144,13 @@ if (is_array($changeaccount) && count($changeaccount) > 0 && $action == $langs->
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "product as p"; $sql1 = "UPDATE " . MAIN_DB_PREFIX . "product as p";
$sql1 .= " SET p.accountancy_code_buy=" . $account_number_buy; $sql1 .= " SET p.accountancy_code_buy=" . $account_number_buy;
$sql1 .= ' WHERE p.rowid IN (' . implode(',', $changeaccount) . ')'; $sql1 .= ' WHERE p.rowid IN (' . implode(',', $changeaccount) . ')';
print_r ($sql1);
dol_syslog('accountancy/customer/lines.php::changeaccount product buy sql= ' . $sql1); // Debug
$resql1 = $db->query($sql1); // print_r ($sql1);
dol_syslog('accountancy/customer/lines.php::changeaccount product buy sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) { if (! $resql1) {
$error ++; $error ++;
setEventMessage($db->lasterror(), 'errors'); setEventMessage($db->lasterror(), 'errors');
@ -166,12 +167,10 @@ print_r ($sql1);
/* /*
* View * View
*/ */
//DEBUG elarifr llxHeader('', $langs->trans("Accounts"));
//llxHeader('', $langs->trans("Accounts"));
//For updating account export // For updating account export
print '<script type="text/javascript"> print '<script type="text/javascript">
function launch_export() { function launch_export() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv"); $("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click(); $("div.fiche div.tabBar form input[type=\"submit\"]").click();

View File

@ -34,8 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$langs->load("members"); $langs->load("members");
$rowid = GETPOST('rowid','int'); $rowid = GETPOST('rowid','int');
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$cancel = GETPOST('cancel','alpha');
$search_lastname = GETPOST('search_lastname','alpha'); $search_lastname = GETPOST('search_lastname','alpha');
$search_login = GETPOST('search_login','alpha'); $search_login = GETPOST('search_login','alpha');
@ -85,7 +86,7 @@ $hookmanager->initHooks(array('membertypecard','globalcard'));
*/ */
if ($action == 'add' && $user->rights->adherent->configurer) if ($action == 'add' && $user->rights->adherent->configurer)
{ {
if ($_POST["button"] != $langs->trans("Cancel")) if (! $cancel)
{ {
$object = new AdherentType($db); $object = new AdherentType($db);
@ -123,7 +124,7 @@ if ($action == 'add' && $user->rights->adherent->configurer)
if ($action == 'update' && $user->rights->adherent->configurer) if ($action == 'update' && $user->rights->adherent->configurer)
{ {
if ($_POST["button"] != $langs->trans("Cancel")) if (! $cancel)
{ {
$object = new AdherentType($db); $object = new AdherentType($db);
$object->id = $rowid; $object->id = $rowid;
@ -152,14 +153,6 @@ if ($action == 'delete' && $user->rights->adherent->configurer)
exit; exit;
} }
if ($action == 'commentaire' && $user->rights->adherent->configurer)
{
$don = new Don($db);
$don->fetch($rowid);
$don->update_note(dol_html_entity_decode(GETPOST('commentaire'), ENT_QUOTES));
}
/* /*
* View * View
*/ */
@ -291,7 +284,7 @@ if ($action == 'create')
print '<div class="center">'; print '<div class="center">';
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">'; print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'" onclick="history.go(-1)" />';
print '</div>'; print '</div>';
print "</form>\n"; print "</form>\n";

View File

@ -460,7 +460,7 @@ class RemiseCheque extends CommonObject
$response = new WorkboardResponse(); $response = new WorkboardResponse();
$response->warning_delay=$conf->bank->cheque->warning_delay/60/60/24; $response->warning_delay=$conf->bank->cheque->warning_delay/60/60/24;
$response->label=$langs->trans("BankChecksToReceipt"); $response->label=$langs->trans("BankChecksToReceipt");
$response->url=DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&amp;mainmenu=accountancy'; $response->url=DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&amp;mainmenu=bank';
$response->img=img_object($langs->trans("BankChecksToReceipt"),"payment"); $response->img=img_object($langs->trans("BankChecksToReceipt"),"payment");
while ($obj=$this->db->fetch_object($resql)) while ($obj=$this->db->fetch_object($resql))

View File

@ -105,6 +105,7 @@ class box_members extends ModeleBoxes
$memberstatic->lastname=$objp->lastname; $memberstatic->lastname=$objp->lastname;
$memberstatic->firstname=$objp->firstname; $memberstatic->firstname=$objp->firstname;
$memberstatic->id = $objp->rowid;
$memberstatic->ref = $objp->rowid; $memberstatic->ref = $objp->rowid;
if (! empty($objp->fk_soc)) { if (! empty($objp->fk_soc)) {

View File

@ -122,7 +122,7 @@ class box_task extends ModeleBoxes
// Add the sum à the bottom of the boxes // 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")."&nbsp;".$textHead); $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left" ', 'text' => $langs->trans("Total")."&nbsp;".$textHead);
$this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')."&nbsp;".$langs->trans("Tasks")); $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')."&nbsp;".$langs->trans("Tasks"));
$this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5)); $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)); $this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot,'all',25200,5));

View File

@ -5,8 +5,8 @@
* 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) 2009-2011 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2009-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr> * Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com> * Copyright (C) 2015 Bahfir Abbes <bafbes@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
@ -64,7 +64,7 @@ class modAgenda extends DolibarrModules
// Config pages // Config pages
//------------- //-------------
$this->config_page_url = array("agenda.php"); $this->config_page_url = array("agenda_other.php");
// Dependancies // Dependancies
//------------- //-------------

View File

@ -80,7 +80,7 @@ class modHoliday extends DolibarrModules
//$this->style_sheet = '/mymodule/mymodule.css.php'; //$this->style_sheet = '/mymodule/mymodule.css.php';
// Config pages. Put here list of php page names stored in admmin directory used to setup module. // 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 // Dependencies
$this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->depends = array(); // List of modules id that must be enabled if this module is enabled

View File

@ -210,7 +210,7 @@ class modUser extends DolibarrModules
$this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs'; $this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs';
$this->export_permission[$r]=array(array("user","user","export")); $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_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"); $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)) if (empty($conf->adherent->enabled))
{ {

View File

@ -736,7 +736,7 @@ class ExpenseReport extends CommonObject
$this->lines=array(); $this->lines=array();
$sql = ' SELECT de.rowid, de.comments, de.qty, de.value_unit, de.date,'; $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.= ' de.total_ht, de.total_tva, de.total_ttc,';
$sql.= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees,'; $sql.= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees,';
$sql.= ' p.ref as ref_projet, p.title as title_projet'; $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_code = $objp->code_type_fees;
$deplig->type_fees_libelle = $objp->libelle_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_ref = $objp->ref_projet;
$deplig->projet_title = $objp->title_projet; $deplig->projet_title = $objp->title_projet;

View File

@ -1,71 +0,0 @@
<?php
/* Copyright (C) 2012-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.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/>.
*/
/**
* 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='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans('ConfCP'), $linkback, 'title_hrm.png');
$cp = new Holiday($db);
print '<br>'.$langs->trans("GoIntoDictionaryHolidayTypes").'<br><br>';
$var=!$var;
print '<div class="info">'.$langs->trans('LastUpdateCP').': '."\n";
if ($cp->getConfCP('lastUpdate')) print '<strong>'.dol_print_date($db->jdate($cp->getConfCP('lastUpdate')),'dayhour','tzuser').'</strong>';
else print $langs->trans('None');
print "</div><br>\n";
// Fin de page
llxFooter();
if (is_object($db)) $db->close();