Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5

This commit is contained in:
Laurent Destailleur 2014-03-29 17:38:06 +01:00
commit a5c2b78565
16 changed files with 50 additions and 34 deletions

View File

@ -43,6 +43,7 @@ Fix: [ bug #1280 ] service with not end of date was tagged as expired.
Fix: [ bug #1295 ] Error when creating an agenda extrafield with a number as reference
Fix: [ bug #1306 ] Fatal error when adding an external calendar
New: Added es_CL language
Fix: Margin tabs bad data show
***** ChangeLog for 3.5 compared to 3.4.* *****
For users:

View File

@ -538,7 +538,7 @@ if ($action == 'create')
// Busy
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
print '<input id="transparency" type="checkbox" name="transparency" value="'.$actioncomm->transparency.'">';
print '<input id="transparency" type="checkbox" name="transparency"'.($actioncomm->transparency?' checked="checked"':'').'>';
print '</td></tr>';
// Realised by

View File

@ -19,9 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
error_reporting(E_ALL);
ini_set('display_errors', true);
ini_set('html_errors', false);
/**
* \file htdocs/comm/action/index.php

View File

@ -50,7 +50,7 @@ $confirm=GETPOST('confirm','alpha');
$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :''));
$fieldtype = (! empty($ref) ? 'ref' :'rowid');
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype);
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account&bank_account','','',$fieldtype);
$paiementtype=GETPOST('paiementtype','alpha',3);
$req_nb=GETPOST("req_nb",'',3);

View File

@ -43,7 +43,7 @@ if (isset($_GET["id"]) || isset($_GET["ref"]))
}
$fieldid = isset($_GET["ref"])?'ref':'rowid';
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
/*

View File

@ -44,7 +44,7 @@ if (isset($_GET["id"]) || isset($_GET["ref"]))
}
$fieldid = isset($_GET["ref"])?'ref':'rowid';
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
/*

View File

@ -41,7 +41,7 @@ if (isset($_GET["account"]) || isset($_GET["ref"]))
}
$fieldid = isset($_GET["ref"])?'ref':'rowid';
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
$account=$_GET["account"];
$mode='standard';

View File

@ -42,7 +42,7 @@ if (isset($_GET["account"]) || isset($_GET["ref"]))
}
$fieldid = isset($_GET["ref"])?'ref':'rowid';
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
$vline=isset($_GET["vline"])?$_GET["vline"]:$_POST["vline"];

View File

@ -1252,6 +1252,16 @@ class Facture extends CommonInvoice
}
// Fin appel triggers
}
// Removed extrafields
if (! $error) {
$result=$this->deleteExtraFields();
if ($result < 0)
{
$error++;
dol_syslog(get_class($this)."::delete error deleteExtraFields ".$this->error, LOG_ERR);
}
}
if (! $error)
{

View File

@ -24,10 +24,6 @@
* \brief Note card expedition
*/
error_reporting(E_ALL);
ini_set('display_errors', true);
ini_set('html_errors', false);
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php';

View File

@ -240,7 +240,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
// Ecrase $pu par celui du produit
// Ecrase $desc par celui du produit
// Ecrase $txtva par celui du produit
if ((GETPOST('addline_predefined') || GETPOST('idprodfournprice')) && ( GETPOST('pu')!=='')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
if (GETPOST('addline_predefined') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
{
$idprod=0;
$productsupplier = new ProductFournisseur($db);

View File

@ -28,9 +28,6 @@
* \brief Page for supplier invoice card (view, edit, validate)
*/
error_reporting(E_ALL);
ini_set('display_errors', true);
ini_set('html_errors', false);
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -130,11 +131,14 @@ if ($agentid > 0) {
else
$sql .= " AND sc.fk_user = ".$agentid;
}
if (!empty($startdate)) $sql.= " AND f.datef >= '".$db->idate($startdate)."'";
if (!empty($enddate)) $sql.= " AND f.datef <= '".$db->idate($enddate)."'";
if (!empty($startdate))
$sql.= " AND f.datef >= '".$db->idate($startdate)."'";
if (!empty($enddate))
$sql.= " AND f.datef <= '".$db->idate($enddate)."'";
$sql .= " AND d.buy_price_ht IS NOT NULL";
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0";
$sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
if($agentid) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
else $sql.= " GROUP BY u.rowid, u.login, u.lastname, u.firstname";
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -172,13 +173,18 @@ $sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.fk_statut > 0";
$sql.= " AND s.entity = ".$conf->entity;
$sql.= " AND d.fk_facture = f.rowid";
if ($client) $sql.= " AND f.fk_soc = ".$socid;
if (!empty($startdate)) $sql.= " AND f.datef >= '".$db->idate($startdate)."'";
if (!empty($enddate)) $sql.= " AND f.datef <= '".$db->idate($enddate)."'";
if ($client)
$sql.= " AND f.fk_soc = ".$socid;
if (!empty($startdate))
$sql.= " AND f.datef >= '".$db->idate($startdate)."'";
if (!empty($enddate))
$sql.= " AND f.datef <= '".$db->idate($enddate)."'";
$sql .= " AND d.buy_price_ht IS NOT NULL";
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0";
$sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
$sql .= " AND d.buy_price_ht <> 0";
if ($client) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
else $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client";
$sql.= " ORDER BY $sortfield $sortorder ";
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -178,12 +179,19 @@ $sql.= " AND f.fk_soc = s.rowid";
$sql.= " AND d.fk_product = p.rowid";
$sql.= " AND f.fk_statut > 0";
$sql.= " AND d.fk_facture = f.rowid";
if ($id > 0) $sql.= " AND d.fk_product =".$id;
if (!empty($startdate)) $sql.= " AND f.datef >= '".$db->idate($startdate)."'";
if (!empty($enddate)) $sql.= " AND f.datef <= '".$db->idate($enddate)."'";
if ($id > 0)
$sql.= " AND d.fk_product =".$id;
if (!empty($startdate))
$sql.= " AND f.datef >= '".$db->idate($startdate)."'";
if (!empty($enddate))
$sql.= " AND f.datef <= '".$db->idate($enddate)."'";
$sql .= " AND d.buy_price_ht IS NOT NULL";
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0";
$sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, d.fk_product, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
$sql .= " AND d.buy_price_ht <> 0";
if ($id > 0)
$sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, d.fk_product, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
else
$sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref";
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);

View File

@ -23,9 +23,6 @@
* \brief Page of a project task
*/
error_reporting(E_ALL);
ini_set('display_errors', true);
ini_set('html_errors', false);
require ("../../main.inc.php");
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';