Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
d3ebeccff4
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2009-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
|
||||
@ -318,7 +318,7 @@ class Adherent extends CommonObject
|
||||
$this->ref=$id;
|
||||
|
||||
// Update minor fields
|
||||
$result=$this->update($user,1,1); // nosync is 1 to avoid update data of user
|
||||
$result=$this->update($user,1,1,0,0,'add'); // nosync is 1 to avoid update data of user
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
@ -390,9 +390,10 @@ class Adherent extends CommonObject
|
||||
* @param int $nosyncuser 0=Synchronize linked user (standard info), 1=Do not synchronize linked user
|
||||
* @param int $nosyncuserpass 0=Synchronize linked user (password), 1=Do not synchronize linked user
|
||||
* @param int $nosyncthirdparty 0=Synchronize linked thirdparty (standard info), 1=Do not synchronize linked thirdparty
|
||||
* @param string $action Current action for hookmanager
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0)
|
||||
function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0,$action='update')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
|
||||
@ -473,7 +473,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
$langs->load("propal");
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
|
||||
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -513,7 +513,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
print $propalstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<td width="18" class="nobordernopadding" nowrap="nowrap">';
|
||||
if ($db->jdate($obj->dp) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
||||
if ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
||||
print '</td>';
|
||||
print '<td width="16" align="center" class="nobordernopadding">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
|
||||
@ -148,7 +148,7 @@ class Contact extends CommonObject
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$this->update($this->id, $user, 1);
|
||||
$result=$this->update($this->id, $user, 1, 'add');
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
@ -203,10 +203,11 @@ class Contact extends CommonObject
|
||||
*
|
||||
* @param int $id Id of contact/address to update
|
||||
* @param User $user Objet user making change
|
||||
* @param int $notrigger 0=no, 1=yesi
|
||||
* @param int $notrigger 0=no, 1=yes
|
||||
* @param string $action Current action for hookmanager
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update($id, $user=0, $notrigger=0)
|
||||
function update($id, $user=0, $notrigger=0, $action='update')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
|
||||
@ -326,7 +326,7 @@ class Product extends CommonObject
|
||||
$result = $this->_log_price($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
if ($this->update($id, $user, true) > 0)
|
||||
if ($this->update($id, $user, true, 'add') > 0)
|
||||
{
|
||||
// FIXME: not use here
|
||||
/*
|
||||
@ -404,9 +404,10 @@ class Product extends CommonObject
|
||||
* @param int $id Id of product
|
||||
* @param User $user Object user making update
|
||||
* @param int $notrigger Disable triggers
|
||||
* @param string $action Current action for hookmanager
|
||||
* @return int 1 if OK, -1 if ref already exists, -2 if other error
|
||||
*/
|
||||
function update($id, $user, $notrigger=false)
|
||||
function update($id, $user, $notrigger=false, $action='update')
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user