Merge branch 'develop' of git://github.com/Dolibarr/dolibarr.git into webservices
This commit is contained in:
commit
9b28f98119
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.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
|
||||||
@ -69,19 +69,6 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
|
|||||||
print $langs->trans("DefaultRightsDesc");
|
print $langs->trans("DefaultRightsDesc");
|
||||||
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
|
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
|
||||||
|
|
||||||
// Show warning about external users
|
|
||||||
print showModulesExludedForExternal($modules).'<br>'."\n";
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
|
|
||||||
$head=security_prepare_head();
|
|
||||||
|
|
||||||
dol_fiche_head($head, 'default', $langs->trans("Security"));
|
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
|
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
// Charge les modules soumis a permissions
|
// Charge les modules soumis a permissions
|
||||||
@ -100,7 +87,6 @@ foreach ($modulesdir as $dir)
|
|||||||
if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php')
|
if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php')
|
||||||
{
|
{
|
||||||
$modName = substr($file, 0, dol_strlen($file) - 10);
|
$modName = substr($file, 0, dol_strlen($file) - 10);
|
||||||
|
|
||||||
if ($modName)
|
if ($modName)
|
||||||
{
|
{
|
||||||
include_once $dir.$file;
|
include_once $dir.$file;
|
||||||
@ -129,6 +115,18 @@ foreach ($modulesdir as $dir)
|
|||||||
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
|
// Show warning about external users
|
||||||
|
print showModulesExludedForExternal($modules).'<br>'."\n";
|
||||||
|
print "<br>\n";
|
||||||
|
|
||||||
|
|
||||||
|
$head=security_prepare_head();
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'default', $langs->trans("Security"));
|
||||||
|
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
// Affiche lignes des permissions
|
// Affiche lignes des permissions
|
||||||
$sql = "SELECT r.id, r.libelle, r.module, r.perms, r.subperms, r.bydefault";
|
$sql = "SELECT r.id, r.libelle, r.module, r.perms, r.subperms, r.bydefault";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r";
|
$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r";
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -301,7 +301,7 @@ class Propal extends CommonObject
|
|||||||
* @param int $info_bits Bits de type de lignes
|
* @param int $info_bits Bits de type de lignes
|
||||||
* @param int $type Type of line (product, service)
|
* @param int $type Type of line (product, service)
|
||||||
* @param int $rang Position of line
|
* @param int $rang Position of line
|
||||||
* @param int $special_code Special code
|
* @param int $special_code Special code (also used by externals modules!)
|
||||||
* @param int $fk_parent_line Id of parent line
|
* @param int $fk_parent_line Id of parent line
|
||||||
* @param int $fk_fournprice Id supplier price
|
* @param int $fk_fournprice Id supplier price
|
||||||
* @param int $pa_ht Buying price without tax
|
* @param int $pa_ht Buying price without tax
|
||||||
@ -457,7 +457,7 @@ class Propal extends CommonObject
|
|||||||
* @param string $desc Description
|
* @param string $desc Description
|
||||||
* @param double $price_base_type HT ou TTC
|
* @param double $price_base_type HT ou TTC
|
||||||
* @param int $info_bits Miscellanous informations
|
* @param int $info_bits Miscellanous informations
|
||||||
* @param int $special_code Set special code ('' = we don't change it)
|
* @param int $special_code Special code (also used by externals modules!)
|
||||||
* @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines).
|
* @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines).
|
||||||
* @param int $skip_update_total Keep fields total_xxx to 0 (used for special lines by some modules)
|
* @param int $skip_update_total Keep fields total_xxx to 0 (used for special lines by some modules)
|
||||||
* @param int $fk_fournprice Id of origin supplier price
|
* @param int $fk_fournprice Id of origin supplier price
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
|
||||||
@ -995,7 +995,7 @@ class Commande extends CommonOrder
|
|||||||
* @param timestamp $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
|
* @param timestamp $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
|
||||||
* @param int $type Type of line (0=product, 1=service)
|
* @param int $type Type of line (0=product, 1=service)
|
||||||
* @param int $rang Position of line
|
* @param int $rang Position of line
|
||||||
* @param int $special_code Special code
|
* @param int $special_code Special code (also used by externals modules!)
|
||||||
* @param int $fk_parent_line Parent line
|
* @param int $fk_parent_line Parent line
|
||||||
* @param int $fk_fournprice Id supplier price
|
* @param int $fk_fournprice Id supplier price
|
||||||
* @param int $pa_ht Buying price (without tax)
|
* @param int $pa_ht Buying price (without tax)
|
||||||
@ -2176,9 +2176,10 @@ class Commande extends CommonOrder
|
|||||||
* @param int $fk_fournprice Id of origin supplier price
|
* @param int $fk_fournprice Id of origin supplier price
|
||||||
* @param int $pa_ht Price (without tax) of product when it was bought
|
* @param int $pa_ht Price (without tax) of product when it was bought
|
||||||
* @param string $label Label
|
* @param string $label Label
|
||||||
|
* @param int $special_code Special code (also used by externals modules!)
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
*/
|
*/
|
||||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='')
|
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -2197,6 +2198,7 @@ class Commande extends CommonOrder
|
|||||||
if (empty($txlocaltax2)) $txlocaltax2=0;
|
if (empty($txlocaltax2)) $txlocaltax2=0;
|
||||||
if (empty($remise)) $remise=0;
|
if (empty($remise)) $remise=0;
|
||||||
if (empty($remise_percent)) $remise_percent=0;
|
if (empty($remise_percent)) $remise_percent=0;
|
||||||
|
if (empty($special_code) || $special_code == 3) $special_code=0;
|
||||||
$remise_percent=price2num($remise_percent);
|
$remise_percent=price2num($remise_percent);
|
||||||
$qty=price2num($qty);
|
$qty=price2num($qty);
|
||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
@ -2251,7 +2253,7 @@ class Commande extends CommonOrder
|
|||||||
$this->line->remise_percent=$remise_percent;
|
$this->line->remise_percent=$remise_percent;
|
||||||
$this->line->subprice=$subprice;
|
$this->line->subprice=$subprice;
|
||||||
$this->line->info_bits=$info_bits;
|
$this->line->info_bits=$info_bits;
|
||||||
$this->line->special_code=0; // To remove special_code=3 coming from proposals copy
|
$this->line->special_code=$special_code;
|
||||||
$this->line->total_ht=$total_ht;
|
$this->line->total_ht=$total_ht;
|
||||||
$this->line->total_tva=$total_tva;
|
$this->line->total_tva=$total_tva;
|
||||||
$this->line->total_localtax1=$total_localtax1;
|
$this->line->total_localtax1=$total_localtax1;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* 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) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -1874,7 +1874,7 @@ class Facture extends CommonInvoice
|
|||||||
* @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note)
|
* @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note)
|
||||||
* @param int $type Type of line (0=product, 1=service)
|
* @param int $type Type of line (0=product, 1=service)
|
||||||
* @param int $rang Position of line
|
* @param int $rang Position of line
|
||||||
* @param int $special_code Special code
|
* @param int $special_code Special code (also used by externals modules!)
|
||||||
* @param string $origin 'order', ...
|
* @param string $origin 'order', ...
|
||||||
* @param int $origin_id Id of origin object
|
* @param int $origin_id Id of origin object
|
||||||
* @param int $fk_parent_line Id of parent line
|
* @param int $fk_parent_line Id of parent line
|
||||||
@ -2037,9 +2037,10 @@ class Facture extends CommonInvoice
|
|||||||
* @param int $fk_fournprice Id of origin supplier price
|
* @param int $fk_fournprice Id of origin supplier price
|
||||||
* @param int $pa_ht Price (without tax) of product when it was bought
|
* @param int $pa_ht Price (without tax) of product when it was bought
|
||||||
* @param string $label Label of the line
|
* @param string $label Label of the line
|
||||||
|
* @param int $special_code Special code (also used by externals modules!)
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
*/
|
*/
|
||||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='')
|
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0)
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
|
|
||||||
@ -2052,6 +2053,7 @@ class Facture extends CommonInvoice
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
if (empty($qty)) $qty=0;
|
if (empty($qty)) $qty=0;
|
||||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||||
|
if (empty($special_code) || $special_code == 3) $special_code=0;
|
||||||
|
|
||||||
$remise_percent = price2num($remise_percent);
|
$remise_percent = price2num($remise_percent);
|
||||||
$qty = price2num($qty);
|
$qty = price2num($qty);
|
||||||
@ -2119,7 +2121,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->line->total_localtax2 = (($this->type==2||$qty<0)?-abs($total_localtax2):$total_localtax2);
|
$this->line->total_localtax2 = (($this->type==2||$qty<0)?-abs($total_localtax2):$total_localtax2);
|
||||||
$this->line->total_ttc = (($this->type==2||$qty<0)?-abs($total_ttc):$total_ttc);
|
$this->line->total_ttc = (($this->type==2||$qty<0)?-abs($total_ttc):$total_ttc);
|
||||||
$this->line->info_bits = $info_bits;
|
$this->line->info_bits = $info_bits;
|
||||||
$this->line->special_code=0; // To remove special_code=3 coming from proposals copy
|
$this->line->special_code = $special_code;
|
||||||
$this->line->product_type = $type;
|
$this->line->product_type = $type;
|
||||||
$this->line->fk_parent_line = $fk_parent_line;
|
$this->line->fk_parent_line = $fk_parent_line;
|
||||||
$this->line->skip_update_total = $skip_update_total;
|
$this->line->skip_update_total = $skip_update_total;
|
||||||
|
|||||||
@ -2482,7 +2482,7 @@ abstract class CommonObject
|
|||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('showLinkedObjectBlock',$parameters,$this,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('showLinkedObjectBlock',$parameters,$this,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
|
||||||
if (! $reshook)
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
$num = count($this->linkedObjects);
|
$num = count($this->linkedObjects);
|
||||||
|
|
||||||
|
|||||||
@ -467,17 +467,17 @@ class ExtraFields
|
|||||||
* Load array this->attribute_label
|
* Load array this->attribute_label
|
||||||
*
|
*
|
||||||
* @param string $elementtype Type of element
|
* @param string $elementtype Type of element
|
||||||
* @param boolean $forcecheck override test of MAIN_EXTRAFIELDS_DISABLED
|
* @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED
|
||||||
* @return array Array of attributes for all extra fields
|
* @return array Array of attributes for all extra fields
|
||||||
*/
|
*/
|
||||||
function fetch_name_optionals_label($elementtype='member',$forcecheck=false)
|
function fetch_name_optionals_label($elementtype='member',$forceload=false)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$array_name_label=array();
|
$array_name_label=array();
|
||||||
|
|
||||||
// For avoid conflicts with external modules
|
// For avoid conflicts with external modules
|
||||||
if (!empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && !$forcecheck)
|
if (!$forceload && !empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))
|
||||||
return $array_name_label;
|
return $array_name_label;
|
||||||
|
|
||||||
$sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired";
|
$sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired";
|
||||||
|
|||||||
@ -41,6 +41,8 @@ class HookManager
|
|||||||
|
|
||||||
// Array result
|
// Array result
|
||||||
var $resArray=array();
|
var $resArray=array();
|
||||||
|
// Printable result
|
||||||
|
var $resPrint='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
|||||||
@ -134,8 +134,7 @@ class Form
|
|||||||
$ret='';
|
$ret='';
|
||||||
|
|
||||||
// When option to edit inline is activated
|
// When option to edit inline is activated
|
||||||
// TODO change for compatibility
|
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! preg_match('/^select;|datehourpicker/',$typeofdata)) // FIXME add jquery timepicker
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! preg_match('/^select;/',$typeofdata))
|
|
||||||
{
|
{
|
||||||
$ret.=$this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $success);
|
$ret.=$this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $success);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,6 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
if (!empty($conf->produit->enabled))
|
if (!empty($conf->produit->enabled))
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
if (!empty($conf->projet->enabled))
|
if (!empty($conf->projet->enabled))
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||||
* Copyright (C) 2005 Marc Barilley <marc@ocebo.fr>
|
* Copyright (C) 2005 Marc Barilley <marc@ocebo.fr>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -33,8 +33,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefo
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
if (!empty($conf->produit->enabled))
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
if (!empty($conf->projet->enabled))
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
|
|||||||
@ -1368,7 +1368,7 @@ else
|
|||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($caneditfield && (empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
if ($caneditfield && ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
||||||
{
|
{
|
||||||
if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED))
|
if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED))
|
||||||
{
|
{
|
||||||
@ -1376,13 +1376,13 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="fiche.php?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($caneditpassword && ! $object->ldap_sid &&
|
elseif ($caneditpassword && ! $object->ldap_sid &&
|
||||||
(empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="fiche.php?id='.$object->id.'&action=edit">'.$langs->trans("EditPassword").'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans("EditPassword").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si on a un gestionnaire de generation de mot de passe actif
|
// Si on a un gestionnaire de generation de mot de passe actif
|
||||||
@ -1393,9 +1393,9 @@ else
|
|||||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("ReinitPassword").'</a>';
|
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("ReinitPassword").'</a>';
|
||||||
}
|
}
|
||||||
elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
|
elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
|
||||||
(empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="fiche.php?id='.$object->id.'&action=password">'.$langs->trans("ReinitPassword").'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=password">'.$langs->trans("ReinitPassword").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->statut == 0)
|
if ($object->statut == 0)
|
||||||
@ -1403,32 +1403,32 @@ else
|
|||||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("SendNewPassword").'</a>';
|
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("SendNewPassword").'</a>';
|
||||||
}
|
}
|
||||||
else if (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
|
else if (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
|
||||||
(empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
||||||
{
|
{
|
||||||
if ($object->email) print '<a class="butAction" href="fiche.php?id='.$object->id.'&action=passwordsend">'.$langs->trans("SendNewPassword").'</a>';
|
if ($object->email) print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=passwordsend">'.$langs->trans("SendNewPassword").'</a>';
|
||||||
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendNewPassword").'</a>';
|
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendNewPassword").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activer
|
// Activer
|
||||||
if ($user->id <> $id && $candisableuser && $object->statut == 0 &&
|
if ($user->id <> $id && $candisableuser && $object->statut == 0 &&
|
||||||
(empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="fiche.php?id='.$object->id.'&action=enable">'.$langs->trans("Reactivate").'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable">'.$langs->trans("Reactivate").'</a>';
|
||||||
}
|
}
|
||||||
// Desactiver
|
// Desactiver
|
||||||
if ($user->id <> $id && $candisableuser && $object->statut == 1 &&
|
if ($user->id <> $id && $candisableuser && $object->statut == 1 &&
|
||||||
(empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="fiche.php?action=disable&id='.$object->id.'">'.$langs->trans("DisableUser").'</a>';
|
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&id='.$object->id.'">'.$langs->trans("DisableUser").'</a>';
|
||||||
}
|
}
|
||||||
// Delete
|
// Delete
|
||||||
if ($user->id <> $id && $candisableuser &&
|
if ($user->id <> $id && $candisableuser &&
|
||||||
(empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
|
||||||
{
|
{
|
||||||
if ($user->admin || ! $object->admin) // If user edited is admin, delete is possible on for an admin
|
if ($user->admin || ! $object->admin) // If user edited is admin, delete is possible on for an admin
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="fiche.php?action=delete&id='.$object->id.'">'.$langs->trans("DeleteUser").'</a>';
|
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&id='.$object->id.'">'.$langs->trans("DeleteUser").'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1582,7 +1582,7 @@ else
|
|||||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST" name="updateuser" enctype="multipart/form-data">';
|
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST" name="updateuser" enctype="multipart/form-data">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
print '<input type="hidden" name="entity" value="'.$object->entity.'">';
|
||||||
print '<table width="100%" class="border">';
|
print '<table width="100%" class="border">';
|
||||||
|
|
||||||
$rowspan=13;
|
$rowspan=13;
|
||||||
|
|||||||
@ -98,34 +98,26 @@ print '</form>';
|
|||||||
|
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
// Webservices list
|
||||||
|
$webservices = array(
|
||||||
|
'user' => '',
|
||||||
|
'thirdparty' => '!empty($conf->societe->enabled)',
|
||||||
|
'productorservice' => '(!empty($conf->product->enabled) || !empty($conf->service->enabled))',
|
||||||
|
'order' => '!empty($conf->commande->enabled)',
|
||||||
|
'invoice' => '!empty($conf->facture->enabled)',
|
||||||
|
'supplier_invoice' => '!empty($conf->fournisseur->enabled)',
|
||||||
|
'actioncomm' => '!empty($conf->agenda->enabled)',
|
||||||
|
'category' => '!empty($conf->categorie->enabled)',
|
||||||
|
'other' => ''
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// WSDL
|
// WSDL
|
||||||
print '<u>'.$langs->trans("WSDLCanBeDownloadedHere").':</u><br>';
|
print '<u>'.$langs->trans("WSDLCanBeDownloadedHere").':</u><br>';
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php?wsdl';
|
foreach($webservices as $name => $right)
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
|
||||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
|
||||||
{
|
{
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php?wsdl';
|
if (!empty($right) && !verifCond($right)) continue;
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
$url=DOL_MAIN_URL_ROOT.'/webservices/server_'.$name.'.php?wsdl';
|
||||||
}
|
|
||||||
if (! empty($conf->societe->enabled))
|
|
||||||
{
|
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php?wsdl';
|
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
|
||||||
}
|
|
||||||
if (! empty($conf->facture->enabled))
|
|
||||||
{
|
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php?wsdl';
|
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
|
||||||
}
|
|
||||||
if (! empty($conf->fournisseur->enabled))
|
|
||||||
{
|
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php?wsdl';
|
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
|
||||||
}
|
|
||||||
if (! empty($conf->agenda->enabled))
|
|
||||||
{
|
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_actioncomm.php?wsdl';
|
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -133,31 +125,10 @@ print '<br>';
|
|||||||
|
|
||||||
// Endpoint
|
// Endpoint
|
||||||
print '<u>'.$langs->trans("EndPointIs").':</u><br>';
|
print '<u>'.$langs->trans("EndPointIs").':</u><br>';
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_other.php';
|
foreach($webservices as $name => $right)
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
|
||||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
|
||||||
{
|
{
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php';
|
if (!empty($right) && !verifCond($right)) continue;
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
$url=DOL_MAIN_URL_ROOT.'/webservices/server_'.$name.'.php';
|
||||||
}
|
|
||||||
if (! empty($conf->societe->enabled))
|
|
||||||
{
|
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php';
|
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
|
||||||
}
|
|
||||||
if (! empty($conf->facture->enabled))
|
|
||||||
{
|
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php';
|
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
|
||||||
}
|
|
||||||
if (! empty($conf->fournisseur->enabled))
|
|
||||||
{
|
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_supplier_invoice.php';
|
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
|
||||||
}
|
|
||||||
if (! empty($conf->agenda->enabled))
|
|
||||||
{
|
|
||||||
$url=DOL_MAIN_URL_ROOT.'/webservices/server_actioncomm.php';
|
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user