Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0
This commit is contained in:
commit
e66847d5c3
@ -124,3 +124,11 @@ PARSEDOWN
|
|||||||
$shortage = 4 - $len % 4;
|
$shortage = 4 - $len % 4;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
JEDITABLE.JS
|
||||||
|
------------
|
||||||
|
|
||||||
|
* <button type="submit" /> => <button class="button" type="submit" />
|
||||||
|
* <button type="cancel" /> => <button class="button" type="cancel" />
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,15 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
||||||
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
||||||
$nodateexport = $conf->global->ACCOUNTING_EXPORT_NO_DATE_IN_FILENAME;
|
$nodateexport = $conf->global->ACCOUNTING_EXPORT_NO_DATE_IN_FILENAME;
|
||||||
|
|||||||
@ -14,8 +14,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_CREATE.TPL.PHP DEFAULT -->
|
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_CREATE.TPL.PHP DEFAULT -->
|
||||||
|
|||||||
@ -14,9 +14,16 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$contact = $GLOBALS['objcanvas']->control->object;
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -14,10 +14,18 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$contact = $GLOBALS['objcanvas']->control->object;
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->
|
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->
|
||||||
|
|||||||
@ -36,7 +36,7 @@ $langs->load("users");
|
|||||||
if (!$user->rights->adherent->lire)
|
if (!$user->rights->adherent->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
$rowid=GETPOST("rowid",'int');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -44,10 +44,10 @@ $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
$object = new Subscription($db);
|
$object = new Subscription($db);
|
||||||
$result = $object->fetch($rowid);
|
$result = $object->fetch($rowid);
|
||||||
|
|
||||||
|
|||||||
@ -15,8 +15,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -19,6 +19,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($langs) || ! is_object($langs))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("cashdesk");
|
$langs->load("cashdesk");
|
||||||
|
|||||||
@ -17,6 +17,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($langs) || ! is_object($langs))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($langs) || ! is_object($langs))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||||
|
|||||||
@ -16,6 +16,15 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($langs) || ! is_object($langs))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
|
|||||||
@ -16,6 +16,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($langs) || ! is_object($langs))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
|
|||||||
@ -17,6 +17,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($langs) || ! is_object($langs))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
|||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$_socid = $_GET["id"];
|
$id = GETPOST('id','int');
|
||||||
|
$_socid = GETPOST("id",'int');
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
@ -45,10 +46,10 @@ if ($user->societe_id > 0)
|
|||||||
if ($_POST["action"] == 'setpricelevel')
|
if ($_POST["action"] == 'setpricelevel')
|
||||||
{
|
{
|
||||||
$soc = New Societe($db);
|
$soc = New Societe($db);
|
||||||
$soc->fetch($_GET["id"]);
|
$soc->fetch($id);
|
||||||
$soc->set_price_level($_POST["price_level"],$user);
|
$soc->set_price_level($_POST["price_level"],$user);
|
||||||
|
|
||||||
header("Location: multiprix.php?id=".$_GET["id"]);
|
header("Location: multiprix.php?id=".$id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* 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-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -31,6 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -27,6 +28,9 @@ require '../../main.inc.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.'/comm/propal/class/propal.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('propal');
|
$langs->load('propal');
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -28,6 +29,9 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('propal');
|
$langs->load('propal');
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
|
|||||||
@ -22,6 +22,14 @@
|
|||||||
* \ingroup propal
|
* \ingroup propal
|
||||||
* \brief Template to show objects linked to proposals
|
* \brief Template to show objects linked to proposals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* 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-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -31,6 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php';
|
require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -26,6 +27,9 @@ require '../main.inc.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.'/commande/class/commande.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
if (!$user->rights->commande->lire) accessforbidden();
|
if (!$user->rights->commande->lire) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -27,6 +28,9 @@
|
|||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php';
|
require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|||||||
@ -15,8 +15,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -30,6 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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,6 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('propal');
|
$langs->load('propal');
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -27,6 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.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/invoice.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|||||||
@ -786,6 +786,7 @@ if ($resql)
|
|||||||
Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
|
Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
|
||||||
Facture::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"),
|
Facture::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"),
|
||||||
Facture::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"),
|
Facture::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"),
|
||||||
|
Facture::TYPE_SITUATION=>$langs->trans("InvoiceSituation"),
|
||||||
);
|
);
|
||||||
//$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order.
|
//$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order.
|
||||||
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100');
|
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100');
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -28,6 +29,9 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -30,6 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
if (!$user->rights->facture->lire) accessforbidden();
|
if (!$user->rights->facture->lire) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -15,8 +15,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -15,8 +15,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -102,7 +102,7 @@ if (empty($reshook))
|
|||||||
$tmpinvoice=new Facture($db);
|
$tmpinvoice=new Facture($db);
|
||||||
foreach ($_POST as $key => $value)
|
foreach ($_POST as $key => $value)
|
||||||
{
|
{
|
||||||
if (substr($key,0,7) == 'amount_')
|
if (substr($key,0,7) == 'amount_' && GETPOST($key) != '')
|
||||||
{
|
{
|
||||||
$cursorfacid = substr($key,7);
|
$cursorfacid = substr($key,7);
|
||||||
$amounts[$cursorfacid] = price2num(trim(GETPOST($key)));
|
$amounts[$cursorfacid] = price2num(trim(GETPOST($key)));
|
||||||
|
|||||||
@ -13,8 +13,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE CONTACTCARD_CREATE.TPL.PHP DEFAULT -->
|
<!-- BEGIN PHP TEMPLATE CONTACTCARD_CREATE.TPL.PHP DEFAULT -->
|
||||||
|
|||||||
@ -13,9 +13,16 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$contact = $GLOBALS['objcanvas']->control->object;
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -13,9 +13,16 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$contact = $GLOBALS['objcanvas']->control->object;
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -68,6 +68,9 @@ $search_categ_thirdparty=GETPOST("search_categ_thirdparty",'int');
|
|||||||
$search_categ_supplier=GETPOST("search_categ_supplier",'int');
|
$search_categ_supplier=GETPOST("search_categ_supplier",'int');
|
||||||
$search_status=GETPOST("search_status",'int');
|
$search_status=GETPOST("search_status",'int');
|
||||||
$search_type=GETPOST('search_type','alpha');
|
$search_type=GETPOST('search_type','alpha');
|
||||||
|
$search_zip=GETPOST('search_zip','alpha');
|
||||||
|
$search_town=GETPOST('search_town','alpha');
|
||||||
|
|
||||||
if ($search_status=='') $search_status=1; // always display activ customer first
|
if ($search_status=='') $search_status=1; // always display activ customer first
|
||||||
|
|
||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
@ -289,7 +292,7 @@ if (strlen($search_poste)) $sql.= natural_search('p.poste', $search_pos
|
|||||||
if (strlen($search_phone_perso)) $sql.= natural_search('p.phone_perso', $search_phone_perso);
|
if (strlen($search_phone_perso)) $sql.= natural_search('p.phone_perso', $search_phone_perso);
|
||||||
if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone);
|
if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone);
|
||||||
if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile);
|
if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile);
|
||||||
if (strlen($search_fax)) $sql.= natural_search('p.phone_fax', $search_fax);
|
if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax);
|
||||||
if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype);
|
if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype);
|
||||||
if (strlen($search_email)) $sql.= natural_search('p.email', $search_email);
|
if (strlen($search_email)) $sql.= natural_search('p.email', $search_email);
|
||||||
if ($search_status != '' && $search_status >= 0) $sql.= " AND p.statut = ".$db->escape($search_status);
|
if ($search_status != '' && $search_status >= 0) $sql.= " AND p.statut = ".$db->escape($search_status);
|
||||||
@ -396,6 +399,7 @@ if ($search_email != '') $param.='&search_email='.urlencode($search_email);
|
|||||||
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
||||||
if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv);
|
if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv);
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
@ -491,12 +495,6 @@ if (! empty($arrayfields['p.firstname']['checked']))
|
|||||||
print '<input class="flat" type="text" name="search_firstname" size="6" value="'.dol_escape_htmltag($search_firstname).'">';
|
print '<input class="flat" type="text" name="search_firstname" size="6" value="'.dol_escape_htmltag($search_firstname).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['p.poste']['checked']))
|
|
||||||
{
|
|
||||||
print '<td class="liste_titre">';
|
|
||||||
print '<input class="flat" type="text" name="search_poste" size="5" value="'.dol_escape_htmltag($search_poste).'">';
|
|
||||||
print '</td>';
|
|
||||||
}
|
|
||||||
if (! empty($arrayfields['p.zip']['checked']))
|
if (! empty($arrayfields['p.zip']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
@ -509,6 +507,12 @@ if (! empty($arrayfields['p.town']['checked']))
|
|||||||
print '<input class="flat" type="text" name="search_town" size="5" value="'.dol_escape_htmltag($search_town).'">';
|
print '<input class="flat" type="text" name="search_town" size="5" value="'.dol_escape_htmltag($search_town).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
if (! empty($arrayfields['p.poste']['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre">';
|
||||||
|
print '<input class="flat" type="text" name="search_poste" size="5" value="'.dol_escape_htmltag($search_poste).'">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
if (! empty($arrayfields['p.phone']['checked']))
|
if (! empty($arrayfields['p.phone']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
|
|||||||
@ -1840,7 +1840,7 @@ else
|
|||||||
{
|
{
|
||||||
$tmpaction='unactivateline';
|
$tmpaction='unactivateline';
|
||||||
$tmpactionpicto='playstop';
|
$tmpactionpicto='playstop';
|
||||||
$tmpactiontext=$langs->trans("Unactivate");
|
$tmpactiontext=$langs->trans("Disable");
|
||||||
}
|
}
|
||||||
if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->desactiver))
|
if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->desactiver))
|
||||||
{
|
{
|
||||||
@ -1982,7 +1982,7 @@ else
|
|||||||
print '<tr '.$bc[false].'>';
|
print '<tr '.$bc[false].'>';
|
||||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td class="nohover"><input size="70" type="text" class="flat" name="comment" value="'.dol_escape_htmltag(GETPOST('comment', 'alpha')).'"></td>';
|
print '<td class="nohover">'.$langs->trans("Comment").'</td><td class="nohover"><input size="70" type="text" class="flat" name="comment" value="'.dol_escape_htmltag(GETPOST('comment', 'alpha')).'"></td>';
|
||||||
print '<td class="nohover right">';
|
print '<td class="nohover right">';
|
||||||
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Unactivate").'"> ';
|
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Disable").'"> ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
||||||
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -28,6 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -32,6 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -25,6 +26,9 @@ require ("../main.inc.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/contract.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -26,6 +27,9 @@
|
|||||||
require ("../main.inc.php");
|
require ("../main.inc.php");
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
|
|||||||
@ -14,6 +14,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -91,11 +91,15 @@ if ($action == 'builddoc' && $permissioncreate)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (empty($donotredirect)) // This is se when include is done by bulk action "Bill Orders"
|
if (empty($donotredirect)) // This is set when include is done by bulk action "Bill Orders"
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("FileGenerated"), null);
|
setEventMessages($langs->trans("FileGenerated"), null);
|
||||||
|
|
||||||
header('Location: '.$_SERVER['REQUEST_URI'].'#builddoc');
|
$urltoredirect = $_SERVER['REQUEST_URI'];
|
||||||
|
$urltoredirect = preg_replace('/#builddoc$/', '', $urltoredirect);
|
||||||
|
$urltoredirect = preg_replace('/action=builddoc&?/', '', $urltoredirect); // To avoid infinite loop
|
||||||
|
|
||||||
|
header('Location: '.$urltoredirect.'#builddoc');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -94,10 +94,30 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
|||||||
}
|
}
|
||||||
else $newelement = $element;
|
else $newelement = $element;
|
||||||
|
|
||||||
|
$_POST['action']='update'; // Hack so restrictarea will test permissions on write too
|
||||||
|
$feature = $newelement;
|
||||||
|
$feature2 = $subelement;
|
||||||
|
$object_id = $fk_element;
|
||||||
|
if ($feature == 'expedition' || $feature == 'shipping')
|
||||||
|
{
|
||||||
|
$feature = 'commande';
|
||||||
|
$object_id = 0;
|
||||||
|
}
|
||||||
|
if ($feature == 'shipping') $feature = 'commande';
|
||||||
|
if ($feature == 'payment') { $feature = 'facture'; }
|
||||||
|
if ($feature == 'payment_supplier') { $feature = 'fournisseur'; $feature2 = 'facture'; }
|
||||||
|
//var_dump(GETPOST('action','aZ09'));
|
||||||
|
//var_dump($newelement.'-'.$subelement."-".$feature."-".$object_id);
|
||||||
|
$check_access = restrictedArea($user, $feature, $object_id, '', $feature2);
|
||||||
|
//var_dump($user->rights);
|
||||||
|
/*
|
||||||
if (! empty($user->rights->$newelement->creer) || ! empty($user->rights->$newelement->create) || ! empty($user->rights->$newelement->write)
|
if (! empty($user->rights->$newelement->creer) || ! empty($user->rights->$newelement->create) || ! empty($user->rights->$newelement->write)
|
||||||
|| (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write)))
|
|| (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write)))
|
||||||
|| ($element == 'payment' && $user->rights->facture->paiement)
|
|| ($element == 'payment' && $user->rights->facture->paiement)
|
||||||
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($check_access)
|
||||||
{
|
{
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$newvalue = trim($value);
|
$newvalue = trim($value);
|
||||||
|
|||||||
@ -166,7 +166,7 @@ class Form
|
|||||||
$ret.='<input type="hidden" name="action" value="set'.$htmlname.'">';
|
$ret.='<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||||
$ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
$ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
$ret.='<input type="hidden" name="id" value="'.$object->id.'">';
|
$ret.='<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
if (empty($notabletag)) $ret.='<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
if (empty($notabletag)) $ret.='<table class="nobordernopadding centpercent" cellpadding="0" cellspacing="0">';
|
||||||
if (empty($notabletag)) $ret.='<tr><td>';
|
if (empty($notabletag)) $ret.='<tr><td>';
|
||||||
if (preg_match('/^(string|email)/',$typeofdata))
|
if (preg_match('/^(string|email)/',$typeofdata))
|
||||||
{
|
{
|
||||||
@ -189,7 +189,7 @@ class Form
|
|||||||
$morealt=' style="width: '.$cols.'"';
|
$morealt=' style="width: '.$cols.'"';
|
||||||
$cols='';
|
$cols='';
|
||||||
}
|
}
|
||||||
$ret.='<textarea id="'.$htmlname.'" name="'.$htmlname.'" wrap="soft" rows="'.($tmp[1]?$tmp[1]:'20').'"'.($cols?' cols="'.$cols.'"':'').$morealt.'">'.($editvalue?$editvalue:$value).'</textarea>';
|
$ret.='<textarea id="'.$htmlname.'" name="'.$htmlname.'" wrap="soft" rows="'.($tmp[1]?$tmp[1]:'20').'"'.($cols?' cols="'.$cols.'"':'class="quatrevingtpercent"').$morealt.'">'.($editvalue?$editvalue:$value).'</textarea>';
|
||||||
}
|
}
|
||||||
else if ($typeofdata == 'day' || $typeofdata == 'datepicker')
|
else if ($typeofdata == 'day' || $typeofdata == 'datepicker')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// Copyright (C) 2011-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
// Copyright (C) 2011-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
// Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
// Copyright (C) 2011-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
//
|
//
|
||||||
// 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
|
||||||
@ -26,6 +26,50 @@ $(document).ready(function() {
|
|||||||
var table_element = $('#jeditable_table_element').html();
|
var table_element = $('#jeditable_table_element').html();
|
||||||
var fk_element = $('#jeditable_fk_element').html();
|
var fk_element = $('#jeditable_fk_element').html();
|
||||||
|
|
||||||
|
|
||||||
|
if ($('.editval_string').length > 0) {
|
||||||
|
$('.editval_string').editable(urlSaveInPlace, {
|
||||||
|
type : 'text',
|
||||||
|
id : 'field',
|
||||||
|
width : withInPlace, /* Size of string area in px ? */
|
||||||
|
tooltip : tooltipInPlace,
|
||||||
|
placeholder : placeholderInPlace,
|
||||||
|
cancel : cancelInPlace,
|
||||||
|
submit : submitInPlace,
|
||||||
|
indicator : indicatorInPlace,
|
||||||
|
submitdata : function(result, settings) {
|
||||||
|
return getParameters(this, 'string');
|
||||||
|
},
|
||||||
|
callback : function(result, settings) {
|
||||||
|
getResult(this, result);
|
||||||
|
},
|
||||||
|
onreset : function(result, settings) {
|
||||||
|
getDefault(settings);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('.editkey_string').hover(
|
||||||
|
function () {
|
||||||
|
console.log("We are hover (entry) an editkey_string");
|
||||||
|
$('#viewval_' + $(this).attr('id')).addClass("viewval_hover");
|
||||||
|
},
|
||||||
|
function () {
|
||||||
|
console.log("We are no more hover an editkey_string");
|
||||||
|
$('#viewval_' + $(this).attr('id')).removeClass("viewval_hover");
|
||||||
|
}
|
||||||
|
);
|
||||||
|
$('.editkey_string').click(function() {
|
||||||
|
console.log("We click on the edit field");
|
||||||
|
$('#viewval_' + $(this).attr('id')).click();
|
||||||
|
$('#viewval_' + $(this).attr('id')).hide();
|
||||||
|
$('#editval_' + $(this).attr('id')).show().click();
|
||||||
|
});
|
||||||
|
$('.viewval_string.active').click(function() {
|
||||||
|
console.log("We click on the viewed value");
|
||||||
|
$('#viewval_' + $(this).attr('id').substr(8)).hide();
|
||||||
|
$('#editval_' + $(this).attr('id').substr(8)).show().click();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if ($('.editval_textarea').length > 0) {
|
if ($('.editval_textarea').length > 0) {
|
||||||
$('.editval_textarea').editable(urlSaveInPlace, {
|
$('.editval_textarea').editable(urlSaveInPlace, {
|
||||||
type : 'textarea',
|
type : 'textarea',
|
||||||
@ -127,49 +171,6 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('.editval_string').length > 0) {
|
|
||||||
$('.editval_string').editable(urlSaveInPlace, {
|
|
||||||
type : 'text',
|
|
||||||
id : 'field',
|
|
||||||
width : withInPlace, /* Size of string area in px ? */
|
|
||||||
tooltip : tooltipInPlace,
|
|
||||||
placeholder : placeholderInPlace,
|
|
||||||
cancel : cancelInPlace,
|
|
||||||
submit : submitInPlace,
|
|
||||||
indicator : indicatorInPlace,
|
|
||||||
submitdata : function(result, settings) {
|
|
||||||
return getParameters(this, 'string');
|
|
||||||
},
|
|
||||||
callback : function(result, settings) {
|
|
||||||
getResult(this, result);
|
|
||||||
},
|
|
||||||
onreset : function(result, settings) {
|
|
||||||
getDefault(settings);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('.editkey_string').hover(
|
|
||||||
function () {
|
|
||||||
console.log("We are hover (entry) an editkey_string");
|
|
||||||
$('#viewval_' + $(this).attr('id')).addClass("viewval_hover");
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
console.log("We are no more hover an editkey_string");
|
|
||||||
$('#viewval_' + $(this).attr('id')).removeClass("viewval_hover");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$('.editkey_string').click(function() {
|
|
||||||
$( '#viewval_' + $(this).attr('id') ).click();
|
|
||||||
});
|
|
||||||
$('.viewval_string.active').click(function() {
|
|
||||||
$('#viewval_' + $(this).attr('id').substr(8)).hide();
|
|
||||||
$('#editval_' + $(this).attr('id').substr(8)).show().click();
|
|
||||||
});
|
|
||||||
$('.editkey_string').click(function() {
|
|
||||||
$('#viewval_' + $(this).attr('id')).hide();
|
|
||||||
$('#editval_' + $(this).attr('id')).show().click();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($('.editval_numeric').length > 0) {
|
if ($('.editval_numeric').length > 0) {
|
||||||
$('.editval_numeric').editable(urlSaveInPlace, {
|
$('.editval_numeric').editable(urlSaveInPlace, {
|
||||||
type : 'text',
|
type : 'text',
|
||||||
|
|||||||
@ -414,7 +414,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
|||||||
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
||||||
$msg.= ';'."\n";
|
$msg.= ';'."\n";
|
||||||
|
|
||||||
if (count($events)) // If an array of js events to do were provided.
|
if (is_array($events) && count($events)) // If an array of js events to do were provided.
|
||||||
{
|
{
|
||||||
$msg.= '
|
$msg.= '
|
||||||
jQuery("#'.$htmlname.'").change(function () {
|
jQuery("#'.$htmlname.'").change(function () {
|
||||||
|
|||||||
@ -26,6 +26,13 @@
|
|||||||
* $elementtype
|
* $elementtype
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE admin_extrafields_add.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE admin_extrafields_add.tpl.php -->
|
||||||
|
|||||||
@ -25,6 +25,13 @@
|
|||||||
* $elementtype
|
* $elementtype
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE admin_extrafields_edit.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE admin_extrafields_edit.tpl.php -->
|
||||||
|
|||||||
@ -22,6 +22,14 @@
|
|||||||
* $extrafield
|
* $extrafield
|
||||||
* $elementtype
|
* $elementtype
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($langs) || ! is_object($langs))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
|
||||||
|
|||||||
@ -13,8 +13,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- START TEMPLATE FILE UPLOAD MAIN -->
|
<!-- START TEMPLATE FILE UPLOAD MAIN -->
|
||||||
|
|||||||
@ -13,8 +13,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- START TEMPLATE FILE UPLOAD -->
|
<!-- START TEMPLATE FILE UPLOAD -->
|
||||||
|
|||||||
@ -19,6 +19,14 @@
|
|||||||
* You can use this if you want to be abale to drag and drop rows of a table.
|
* You can use this if you want to be abale to drag and drop rows of a table.
|
||||||
* You must add id="tablelines" on table level tag and have ($nboflines or count($object->lines) or count($taskarray) > 0)
|
* You must add id="tablelines" on table level tag and have ($nboflines or count($object->lines) or count($taskarray) > 0)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($object) || ! is_object($object))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE AJAXROW.TPL.PHP - Script to enable drag and drop on tables -->
|
<!-- BEGIN PHP TEMPLATE AJAXROW.TPL.PHP - Script to enable drag and drop on tables -->
|
||||||
|
|||||||
@ -16,6 +16,13 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($blocname))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$hide = true; // Hide by default
|
$hide = true; // Hide by default
|
||||||
if (isset($parameters['showblocbydefault'])) $hide=(empty($parameters['showblocbydefault']) ? true : false);
|
if (isset($parameters['showblocbydefault'])) $hide=(empty($parameters['showblocbydefault']) ? true : false);
|
||||||
if (isset($object->extraparams[$blocname]['showhide'])) $hide = (empty($object->extraparams[$blocname]['showhide']) ? true : false);
|
if (isset($object->extraparams[$blocname]['showhide'])) $hide = (empty($object->extraparams[$blocname]['showhide']) ? true : false);
|
||||||
|
|||||||
@ -21,6 +21,14 @@
|
|||||||
* $withproject (if we are on task contact)
|
* $withproject (if we are on task contact)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($object) || ! is_object($object))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,14 @@
|
|||||||
// $modulepart = for download
|
// $modulepart = for download
|
||||||
// $param = param to add to download links
|
// $param = param to add to download links
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($langs) || ! is_object($langs))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$langs->load("link");
|
$langs->load("link");
|
||||||
if (empty($relativepathwithnofile)) $relativepathwithnofile='';
|
if (empty($relativepathwithnofile)) $relativepathwithnofile='';
|
||||||
if (empty($permtoedit)) $permtoedit=-1;
|
if (empty($permtoedit)) $permtoedit=-1;
|
||||||
|
|||||||
@ -24,6 +24,14 @@
|
|||||||
* $parameters
|
* $parameters
|
||||||
* $cols
|
* $cols
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($object) || ! is_object($object))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!-- BEGIN PHP TEMPLATE extrafields_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE extrafields_view.tpl.php -->
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -19,6 +19,14 @@
|
|||||||
// Need global variable $title to be defined by caller (like dol_loginfunction)
|
// Need global variable $title to be defined by caller (like dol_loginfunction)
|
||||||
// Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...);
|
// Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...);
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
header('Cache-Control: Public, must-revalidate');
|
header('Cache-Control: Public, must-revalidate');
|
||||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||||
|
|
||||||
@ -54,7 +62,7 @@ print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disable
|
|||||||
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// Set focus on correct field
|
/* Set focus on correct field */
|
||||||
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
|
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -17,6 +17,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($object) || ! is_object($object))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// $cssclass must be defined by caller. For example cssclass='fieldtitle"
|
// $cssclass must be defined by caller. For example cssclass='fieldtitle"
|
||||||
$module = $object->element;
|
$module = $object->element;
|
||||||
$note_public = 'note_public';
|
$note_public = 'note_public';
|
||||||
|
|||||||
@ -30,6 +30,13 @@
|
|||||||
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($object) || ! is_object($object))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$usemargins=0;
|
$usemargins=0;
|
||||||
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande')))
|
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande')))
|
||||||
|
|||||||
@ -30,6 +30,13 @@
|
|||||||
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($object) || ! is_object($object))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$usemargins=0;
|
$usemargins=0;
|
||||||
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
||||||
|
|||||||
@ -37,6 +37,14 @@
|
|||||||
* $type, $text, $description, $line
|
* $type, $text, $description, $line
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($object) || ! is_object($object))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
|
global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
|
||||||
|
|
||||||
$usemargins=0;
|
$usemargins=0;
|
||||||
|
|||||||
@ -13,8 +13,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE originproductline.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE originproductline.tpl.php -->
|
||||||
|
|||||||
@ -16,6 +16,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
header('Cache-Control: Public, must-revalidate');
|
header('Cache-Control: Public, must-revalidate');
|
||||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||||
|
|
||||||
@ -40,7 +48,7 @@ print top_htmlhead('',$langs->trans('SendNewPassword'));
|
|||||||
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// Set focus on correct field
|
/* Set focus on correct field */
|
||||||
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
|
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,6 +1,14 @@
|
|||||||
<!-- BEGIN TEMPLATE resource_add.tpl.php -->
|
<!-- BEGIN TEMPLATE resource_add.tpl.php -->
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php');
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|||||||
@ -1,6 +1,12 @@
|
|||||||
<!-- BEGIN TEMPLATE resource_view.tpl.php -->
|
<!-- BEGIN TEMPLATE resource_view.tpl.php -->
|
||||||
<?php
|
<?php
|
||||||
//var_dump($linked_resources);
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$form= new Form($db);
|
$form= new Form($db);
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,14 @@
|
|||||||
*
|
*
|
||||||
* Output javascript for interactions code of ecm module
|
* Output javascript for interactions code of ecm module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE ecm/tpl/enablefiletreeajax.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE ecm/tpl/enablefiletreeajax.tpl.php -->
|
||||||
|
|||||||
@ -127,7 +127,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Set incoterm
|
// Reopen
|
||||||
if ($action == 'reopen' && $user->rights->expedition->creer)
|
if ($action == 'reopen' && $user->rights->expedition->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
@ -503,8 +503,8 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action update description of emailing
|
// Action update
|
||||||
else if ($action == 'settrackingnumber' || $action == 'settrackingurl'
|
else if ($action == 'settracking_number' || $action == 'settracking_url'
|
||||||
|| $action == 'settrueWeight'
|
|| $action == 'settrueWeight'
|
||||||
|| $action == 'settrueWidth'
|
|| $action == 'settrueWidth'
|
||||||
|| $action == 'settrueHeight'
|
|| $action == 'settrueHeight'
|
||||||
@ -513,8 +513,8 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
if ($action == 'settrackingnumber') $object->tracking_number = trim(GETPOST('trackingnumber','alpha'));
|
if ($action == 'settracking_number') $object->tracking_number = trim(GETPOST('tracking_number','alpha'));
|
||||||
if ($action == 'settrackingurl') $object->tracking_url = trim(GETPOST('trackingurl','int'));
|
if ($action == 'settracking_url') $object->tracking_url = trim(GETPOST('tracking_url','int'));
|
||||||
if ($action == 'settrueWeight') {
|
if ($action == 'settrueWeight') {
|
||||||
$object->trueWeight = trim(GETPOST('trueWeight','int'));
|
$object->trueWeight = trim(GETPOST('trueWeight','int'));
|
||||||
$object->weight_units = GETPOST('weight_units','int');
|
$object->weight_units = GETPOST('weight_units','int');
|
||||||
@ -1692,8 +1692,8 @@ else if ($id || $ref)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Tracking Number
|
// Tracking Number
|
||||||
print '<tr><td class="titlefield">'.$form->editfieldkey("TrackingNumber",'trackingnumber',$object->tracking_number,$object,$user->rights->expedition->creer).'</td><td colspan="3">';
|
print '<tr><td class="titlefield">'.$form->editfieldkey("TrackingNumber",'tracking_number',$object->tracking_number,$object,$user->rights->expedition->creer).'</td><td colspan="3">';
|
||||||
print $form->editfieldval("TrackingNumber",'trackingnumber',$object->tracking_url,$object,$user->rights->expedition->creer,'string',$object->tracking_number);
|
print $form->editfieldval("TrackingNumber",'tracking_number',$object->tracking_url,$object,$user->rights->expedition->creer,'string',$object->tracking_number);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
|
|||||||
@ -14,8 +14,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -15,8 +15,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -33,6 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$langs->load("fichinter");
|
$langs->load("fichinter");
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2009-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2009-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -27,6 +28,9 @@ require '../main.inc.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.'/fichinter/class/fichinter.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -26,6 +27,9 @@
|
|||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
|
|||||||
@ -13,8 +13,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
||||||
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -28,6 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.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/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("facture");
|
$langs->load("facture");
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -33,6 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.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/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('orders');
|
$langs->load('orders');
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -28,6 +29,9 @@ 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.'/fourn/class/fournisseur.commande.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -27,6 +28,9 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.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.'/fourn/class/fournisseur.commande.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
|
|||||||
@ -171,16 +171,15 @@ if (($action == 'create' || $action == 'add') && ! $error) {
|
|||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
if ($_POST['origin'] && $_POST['originid']) {
|
if ($_POST['origin'] && $_POST['originid']) {
|
||||||
$object->linked_objects = $orders_id;
|
$linked_orders_ids=array();
|
||||||
|
foreach ( $orders_id as $origin => $origin_id ) {
|
||||||
|
$origin_id = (! empty($origin_id) ? $origin_id : $orders_id[$ii]);
|
||||||
|
$linked_orders_ids[]=$origin_id;
|
||||||
|
}
|
||||||
|
$object->linked_objects = array(GETPOST('origin')=>$linked_orders_ids);
|
||||||
$id = $object->create($user);
|
$id = $object->create($user);
|
||||||
|
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
foreach ( $orders_id as $origin => $origin_id ) {
|
|
||||||
$origin_id = (! empty($origin_id) ? $origin_id : $orders_id[$ii]);
|
|
||||||
|
|
||||||
$object->add_object_linked(GETPOST('origin'), $origin_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
while ( $ii < $nn ) {
|
while ( $ii < $nn ) {
|
||||||
$objectsrc = new CommandeFournisseur($db);
|
$objectsrc = new CommandeFournisseur($db);
|
||||||
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
|
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
|
||||||
|
|||||||
@ -14,8 +14,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
||||||
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -29,6 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.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/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -33,6 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -29,6 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
|||||||
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.'/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';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -28,6 +29,9 @@ require '../../main.inc.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.'/fourn/class/fournisseur.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|||||||
@ -17,6 +17,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -33,7 +33,7 @@ $langs->load("orders");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
$socid = GETPOST("socid", 'int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe',$socid,'');
|
$result = restrictedArea($user, 'societe',$socid,'');
|
||||||
|
|
||||||
|
|||||||
@ -424,7 +424,7 @@
|
|||||||
});
|
});
|
||||||
/* otherwise use button with given string as text */
|
/* otherwise use button with given string as text */
|
||||||
} else {
|
} else {
|
||||||
var submit = $('<button type="submit" />');
|
var submit = $('<button class="button" type="submit" />');
|
||||||
submit.html(settings.submit);
|
submit.html(settings.submit);
|
||||||
}
|
}
|
||||||
$(this).append(submit);
|
$(this).append(submit);
|
||||||
@ -435,7 +435,7 @@
|
|||||||
var cancel = $(settings.cancel);
|
var cancel = $(settings.cancel);
|
||||||
/* otherwise use button with given string as text */
|
/* otherwise use button with given string as text */
|
||||||
} else {
|
} else {
|
||||||
var cancel = $('<button type="cancel" />');
|
var cancel = $('<button class="button" type="cancel" />');
|
||||||
cancel.html(settings.cancel);
|
cancel.html(settings.cancel);
|
||||||
}
|
}
|
||||||
$(this).append(cancel);
|
$(this).append(cancel);
|
||||||
|
|||||||
@ -172,7 +172,7 @@ NumberOfSupplierOrders=Nombre de commandes fournisseurs
|
|||||||
NumberOfSupplierInvoices=Nombre de factures fournisseurs
|
NumberOfSupplierInvoices=Nombre de factures fournisseurs
|
||||||
NumberOfUnitsProposals=Quantités présentes dans les propositions commerciales
|
NumberOfUnitsProposals=Quantités présentes dans les propositions commerciales
|
||||||
NumberOfUnitsCustomerOrders=Quantités présentes dans les commandes clients
|
NumberOfUnitsCustomerOrders=Quantités présentes dans les commandes clients
|
||||||
NumberOfUnitsCustomerInvoices=Quantités présentes dans les factures fournisseurs
|
NumberOfUnitsCustomerInvoices=Quantités présentes dans les factures clients
|
||||||
NumberOfUnitsSupplierProposals=Quantités présentes dans les demande de prix
|
NumberOfUnitsSupplierProposals=Quantités présentes dans les demande de prix
|
||||||
NumberOfUnitsSupplierOrders=Quantités présentes dans les commandes fournisseurs
|
NumberOfUnitsSupplierOrders=Quantités présentes dans les commandes fournisseurs
|
||||||
NumberOfUnitsSupplierInvoices=Quantités présentes dans les factures fournisseurs
|
NumberOfUnitsSupplierInvoices=Quantités présentes dans les factures fournisseurs
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -27,6 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -25,6 +26,9 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@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
|
||||||
* 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
|
||||||
@ -29,6 +30,9 @@
|
|||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
||||||
|
if (! empty($conf->projet->enabled)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
|
}
|
||||||
|
|
||||||
$action = GETPOST('action','aZ09');
|
$action = GETPOST('action','aZ09');
|
||||||
|
|
||||||
|
|||||||
@ -81,6 +81,7 @@ function test_sql_and_script_inject($val, $type)
|
|||||||
// For SQL Injection (only GET and POST are used to be included into bad escaped SQL requests)
|
// For SQL Injection (only GET and POST are used to be included into bad escaped SQL requests)
|
||||||
if ($type != 2)
|
if ($type != 2)
|
||||||
{
|
{
|
||||||
|
$inj += preg_match('/updatexml\(/i', $val);
|
||||||
$inj += preg_match('/delete\s+from/i', $val);
|
$inj += preg_match('/delete\s+from/i', $val);
|
||||||
$inj += preg_match('/create\s+table/i', $val);
|
$inj += preg_match('/create\s+table/i', $val);
|
||||||
$inj += preg_match('/update.+set.+=/i', $val);
|
$inj += preg_match('/update.+set.+=/i', $val);
|
||||||
@ -101,6 +102,8 @@ function test_sql_and_script_inject($val, $type)
|
|||||||
$inj += preg_match('/onerror\s*=/i', $val); // onerror can be set on img or any html tag like <img title='...' onerror = alert(1)>
|
$inj += preg_match('/onerror\s*=/i', $val); // onerror can be set on img or any html tag like <img title='...' onerror = alert(1)>
|
||||||
$inj += preg_match('/onfocus\s*=/i', $val); // onfocus can be set on input text html tag like <input type='text' value='...' onfocus = alert(1)>
|
$inj += preg_match('/onfocus\s*=/i', $val); // onfocus can be set on input text html tag like <input type='text' value='...' onfocus = alert(1)>
|
||||||
$inj += preg_match('/onload\s*=/i', $val); // onload can be set on input text html tag like <input type='text' value='...' onfocus = alert(1)>
|
$inj += preg_match('/onload\s*=/i', $val); // onload can be set on input text html tag like <input type='text' value='...' onfocus = alert(1)>
|
||||||
|
$inj += preg_match('/onclick\s*=/i', $val); // onclick can be set on img text html tag like <img onclick = alert(1)>
|
||||||
|
$inj += preg_match('/onscroll\s*=/i', $val); // onscroll can be textarea
|
||||||
if ($type == 1)
|
if ($type == 1)
|
||||||
{
|
{
|
||||||
$inj += preg_match('/javascript:/i', $val);
|
$inj += preg_match('/javascript:/i', $val);
|
||||||
@ -1244,7 +1247,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! defined('DISABLE_JQUERY_JEDITABLE'))
|
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! defined('DISABLE_JQUERY_JEDITABLE'))
|
||||||
{
|
{
|
||||||
print '<!-- JS to manage editInPlace feature -->'."\n";
|
print '<!-- JS to manage editInPlace feature -->'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
print '<script type="text/javascript">'."\n";
|
print '<script type="text/javascript">'."\n";
|
||||||
|
|||||||
@ -23,5 +23,13 @@
|
|||||||
* Put detailed description here.
|
* Put detailed description here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Your code here. */
|
/** Your code here. */
|
||||||
echo "Hello world!";
|
echo "Hello world!";
|
||||||
|
|||||||
@ -57,7 +57,6 @@ $select_pricing_rules=array(
|
|||||||
);
|
);
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||||
{
|
{
|
||||||
$langs->load("admin");
|
|
||||||
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice
|
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice
|
||||||
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY&PRODUIT_MULTIPRICES'] = $langs->trans('MultiPricesAbility') . '+' . $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')';
|
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY&PRODUIT_MULTIPRICES'] = $langs->trans('MultiPricesAbility') . '+' . $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,7 +73,7 @@ if ($action == 'convert')
|
|||||||
{
|
{
|
||||||
$vat_src_code_old = $reg[1];
|
$vat_src_code_old = $reg[1];
|
||||||
$oldvatrateclean = preg_replace('/\s*\(.*\)/', '', $oldvatrate); // Remove code into vatrate.
|
$oldvatrateclean = preg_replace('/\s*\(.*\)/', '', $oldvatrate); // Remove code into vatrate.
|
||||||
}
|
} else $oldvatrateclean=$oldvatrate;
|
||||||
|
|
||||||
// Clean vat code new
|
// Clean vat code new
|
||||||
$vat_src_code_new='';
|
$vat_src_code_new='';
|
||||||
@ -81,7 +81,7 @@ if ($action == 'convert')
|
|||||||
{
|
{
|
||||||
$vat_src_code_new = $reg[1];
|
$vat_src_code_new = $reg[1];
|
||||||
$newvatrateclean = preg_replace('/\s*\(.*\)/', '', $newvatrate); // Remove code into vatrate.
|
$newvatrateclean = preg_replace('/\s*\(.*\)/', '', $newvatrate); // Remove code into vatrate.
|
||||||
}
|
} else $newvatrateclean=$newvatrate;
|
||||||
|
|
||||||
// If country to edit is my country, so we change customer prices
|
// If country to edit is my country, so we change customer prices
|
||||||
if ($country_id == $mysoc->country_id)
|
if ($country_id == $mysoc->country_id)
|
||||||
|
|||||||
@ -15,6 +15,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$object=$GLOBALS['object'];
|
$object=$GLOBALS['object'];
|
||||||
|
|
||||||
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
||||||
|
|||||||
@ -15,6 +15,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$object=$GLOBALS['object'];
|
$object=$GLOBALS['object'];
|
||||||
|
|
||||||
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
||||||
|
|||||||
@ -15,6 +15,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$object=$GLOBALS['object'];
|
$object=$GLOBALS['object'];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -13,8 +13,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE -->
|
||||||
|
|||||||
@ -13,9 +13,16 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$object=$GLOBALS['object'];
|
$object=$GLOBALS['object'];
|
||||||
|
|
||||||
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
||||||
|
|||||||
@ -15,6 +15,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Protection to avoid direct call of template
|
||||||
|
if (empty($conf) || ! is_object($conf))
|
||||||
|
{
|
||||||
|
print "Error, template page can't be called as URL";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$object=$GLOBALS['object'];
|
$object=$GLOBALS['object'];
|
||||||
|
|
||||||
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user