Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4a7b989e7c
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@ -285,7 +285,7 @@ if ($conf->societe->enabled && $user->rights->societe->lire)
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.client IN (1, 2, 3)";
|
||||
$sql.= " AND s.entity IN (".getEntity(societe, 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 ($socid) $sql.= " AND s.rowid = $socid";
|
||||
$sql .= " ORDER BY s.tms DESC";
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@ -35,16 +35,15 @@ class Prospect extends Societe
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB handler acces base de donnees
|
||||
* \param id id societe (0 par defaut)
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Databas handler
|
||||
*/
|
||||
function Prospect($DB, $id=0)
|
||||
function Prospect($db)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$this->db = $DB;
|
||||
$this->id = $id;
|
||||
$this->db = $db;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -523,10 +523,11 @@ class FormCompany
|
||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT
|
||||
&& is_array($limitto) && count($limitto))
|
||||
{
|
||||
$sql.= " WHERE rowid in (".join(',',$limitto).")";
|
||||
$sql.= " WHERE rowid IN (".join(',',$limitto).")";
|
||||
}
|
||||
}
|
||||
$sql .= " ORDER BY nom ASC";
|
||||
$sql.= " AND s.entity IN (".getEntity(societe, 1).")";
|
||||
$sql.= " ORDER BY nom ASC";
|
||||
|
||||
//print $sql;
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -510,7 +510,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$table;
|
||||
$sql.= " WHERE ".$field." LIKE '".$maskLike."'";
|
||||
$sql.= " AND ".$field." NOT LIKE '%PROV%'";
|
||||
$sql.= " AND entity = ".getEntity($table);
|
||||
$sql.= " AND entity IN (".getEntity($table, 1).")";
|
||||
if ($where) $sql.=$where;
|
||||
if ($sqlwhere) $sql.=' AND '.$sqlwhere;
|
||||
|
||||
@ -547,7 +547,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
$sql = "SELECT facnumber as ref";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql.= " WHERE facnumber LIKE '".$maskLike."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
$sql.= " AND entity IN (".getEntity($table, 1).")";
|
||||
|
||||
dol_syslog("mod_facture_terre::getNextValue sql=".$sql);
|
||||
$resql=$db->query($sql);
|
||||
@ -592,7 +592,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
$maskrefclient_sql.= " FROM ".MAIN_DB_PREFIX.$table;
|
||||
//$sql.= " WHERE ".$field." not like '(%'";
|
||||
$maskrefclient_sql.= " WHERE ".$field." LIKE '".$maskrefclient_maskLike."'";
|
||||
$maskrefclient_sql.= " AND entity = ".$conf->entity;
|
||||
$maskrefclient_sql.= " AND entity IN (".getEntity($table, 1).")";
|
||||
if ($where) $maskrefclient_sql.=$where; //use the same optional where as general mask
|
||||
if ($sqlwhere) $maskrefclient_sql.=' AND '.$sqlwhere; //use the same sqlwhere as general mask
|
||||
$maskrefclient_sql.=' AND (SUBSTRING('.$field.', '.(strpos($maskwithnocode,$maskrefclient)+1).', '.dol_strlen($maskrefclient_maskclientcode).")='".$maskrefclient_clientcode."')";
|
||||
|
||||
@ -102,10 +102,11 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
'object_ref_ext'=>$object->ref_ext,
|
||||
'object_ref_customer'=>$object->ref_client,
|
||||
'object_date'=>dol_print_date($object->date,'day'),
|
||||
'object_fin_validite'=>dol_print_date($object->fin_validite,'dayhour'),
|
||||
'object_date_delivery'=>dol_print_date($object->date_livraison,'dayhour'),
|
||||
'object_date_creation'=>dol_print_date($object->date_creation,'day'),
|
||||
'object_date_modification'=>dol_print_date($object->date_modification,'day'),
|
||||
'object_date_validation'=>dol_print_date($object->date_validation,'dayhour'),
|
||||
'object_date_close'=>dol_print_date($object->date_cloture,'dayhour'),
|
||||
'object_payment_mode'=>$object->mode_reglement,
|
||||
'object_payment_term'=>$object->cond_reglement,
|
||||
'object_total_ht'=>price($object->total_ht,0,$outputlangs),
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user