Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0
This commit is contained in:
commit
e66847d5c3
@ -123,4 +123,12 @@ PARSEDOWN
|
||||
else $len = strlen($line);
|
||||
$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
|
||||
* 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;
|
||||
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
||||
$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
|
||||
* 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 -->
|
||||
|
||||
@ -14,9 +14,16 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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;
|
||||
|
||||
?>
|
||||
|
||||
@ -14,10 +14,18 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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;
|
||||
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->
|
||||
|
||||
@ -36,7 +36,7 @@ $langs->load("users");
|
||||
if (!$user->rights->adherent->lire)
|
||||
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
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$object = new Subscription($db);
|
||||
$result = $object->fetch($rowid);
|
||||
|
||||
|
||||
@ -15,8 +15,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -33,7 +40,7 @@ $var=true;
|
||||
$total=0;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
|
||||
|
||||
?>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||
<td><?php echo $langs->trans("Subscription"); ?></td>
|
||||
|
||||
@ -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("bills");
|
||||
$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.'/product/class/product.class.php';
|
||||
|
||||
|
||||
@ -19,6 +19,14 @@
|
||||
* 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.'/compta/bank/class/account.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
|
||||
* 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';
|
||||
|
||||
$langs->load("main");
|
||||
|
||||
@ -16,6 +16,14 @@
|
||||
* 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("bills");
|
||||
$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("bills");
|
||||
|
||||
|
||||
@ -30,7 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$langs->load("orders");
|
||||
$langs->load("companies");
|
||||
|
||||
$_socid = $_GET["id"];
|
||||
$id = GETPOST('id','int');
|
||||
$_socid = GETPOST("id",'int');
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
@ -45,10 +46,10 @@ if ($user->societe_id > 0)
|
||||
if ($_POST["action"] == 'setpricelevel')
|
||||
{
|
||||
$soc = New Societe($db);
|
||||
$soc->fetch($_GET["id"]);
|
||||
$soc->fetch($id);
|
||||
$soc->set_price_level($_POST["price_level"],$user);
|
||||
|
||||
header("Location: multiprix.php?id=".$_GET["id"]);
|
||||
header("Location: multiprix.php?id=".$id);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -87,7 +88,7 @@ if ($_socid > 0)
|
||||
print '<form method="POST" action="multiprix.php?id='.$objsoc->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setpricelevel">';
|
||||
|
||||
|
||||
dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company');
|
||||
|
||||
print '<table width="100%" border="0">';
|
||||
@ -122,12 +123,12 @@ if ($_socid > 0)
|
||||
print "</table>";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
print '<div align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
||||
|
||||
print "</form>";
|
||||
|
||||
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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/images.lib.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('other');
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* 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.'/comm/propal/class/propal.class.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('compta');
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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.'/comm/propal/class/propal.class.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('compta');
|
||||
|
||||
@ -22,6 +22,14 @@
|
||||
* \ingroup propal
|
||||
* \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 -->
|
||||
@ -40,7 +48,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
@ -71,7 +79,7 @@ if (count($linkedObjectBlock) > 1)
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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/class/html.formfile.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');
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* 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.'/commande/class/commande.class.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();
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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/order.lib.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");
|
||||
|
||||
@ -15,8 +15,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -36,7 +43,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
@ -76,7 +83,7 @@ if (count($linkedObjectBlock) > 1)
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -2538,7 +2538,7 @@ if ($action == 'create')
|
||||
print ' <input data-role="none" type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="$(\'#credit_note_options input[type=checkbox]\').not(this).prop(\'checked\', false);" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
|
||||
print '<br> <input data-role="none" type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="$(\'#credit_note_options input[type=checkbox]\').not(this).prop(\'checked\', false);" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '</div></div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.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
|
||||
* 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/lib/invoice.lib.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("companies");
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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>
|
||||
*
|
||||
* 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/images.lib.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('compta');
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* 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
|
||||
* 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/lib/functions2.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("bills");
|
||||
|
||||
@ -785,7 +785,8 @@ if ($resql)
|
||||
Facture::TYPE_STANDARD=>$langs->trans("InvoiceStandard"),
|
||||
Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
|
||||
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.
|
||||
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) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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.'/core/class/discount.class.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("bills");
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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/prelevement/class/bonprelevement.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();
|
||||
|
||||
|
||||
@ -15,8 +15,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -36,7 +43,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
@ -54,7 +61,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
$total = $total + $sign * $objectlink->total_ht;
|
||||
echo price($objectlink->total_ht);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
||||
}
|
||||
@ -76,7 +83,7 @@ if (count($linkedObjectBlock) > 1)
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -15,8 +15,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -36,7 +43,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
|
||||
@ -102,7 +102,7 @@ if (empty($reshook))
|
||||
$tmpinvoice=new Facture($db);
|
||||
foreach ($_POST as $key => $value)
|
||||
{
|
||||
if (substr($key,0,7) == 'amount_')
|
||||
if (substr($key,0,7) == 'amount_' && GETPOST($key) != '')
|
||||
{
|
||||
$cursorfacid = substr($key,7);
|
||||
$amounts[$cursorfacid] = price2num(trim(GETPOST($key)));
|
||||
|
||||
@ -13,8 +13,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
|
||||
@ -13,9 +13,16 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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;
|
||||
|
||||
?>
|
||||
|
||||
@ -13,9 +13,16 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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;
|
||||
?>
|
||||
|
||||
|
||||
@ -68,6 +68,9 @@ $search_categ_thirdparty=GETPOST("search_categ_thirdparty",'int');
|
||||
$search_categ_supplier=GETPOST("search_categ_supplier",'int');
|
||||
$search_status=GETPOST("search_status",'int');
|
||||
$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
|
||||
|
||||
$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_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_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_email)) $sql.= natural_search('p.email', $search_email);
|
||||
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_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv);
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
|
||||
// Add $param from extra fields
|
||||
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 '</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']))
|
||||
{
|
||||
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 '</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']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
|
||||
@ -1840,7 +1840,7 @@ else
|
||||
{
|
||||
$tmpaction='unactivateline';
|
||||
$tmpactionpicto='playstop';
|
||||
$tmpactiontext=$langs->trans("Unactivate");
|
||||
$tmpactiontext=$langs->trans("Disable");
|
||||
}
|
||||
if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->desactiver))
|
||||
{
|
||||
@ -1982,7 +1982,7 @@ else
|
||||
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 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 '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
||||
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* 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.'/contact/class/contact.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");
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
* 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
|
||||
* 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/images.lib.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("products");
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* 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
|
||||
* 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/contract.lib.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");
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* 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/contract.lib.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("contracts");
|
||||
|
||||
@ -14,6 +14,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -33,7 +41,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
// Build doc
|
||||
if ($action == 'builddoc' && $permissioncreate)
|
||||
{
|
||||
|
||||
|
||||
if (is_numeric(GETPOST('model')))
|
||||
{
|
||||
$error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Model"));
|
||||
@ -48,13 +48,13 @@ if ($action == 'builddoc' && $permissioncreate)
|
||||
dol_print_error('Object must have been loaded by a fetch');
|
||||
exit;
|
||||
}*/
|
||||
|
||||
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model'))
|
||||
{
|
||||
$object->setDocModel($user, GETPOST('model','alpha'));
|
||||
}
|
||||
|
||||
|
||||
// Special case to force bank account
|
||||
//if (property_exists($object, 'fk_bank'))
|
||||
//{
|
||||
@ -76,13 +76,13 @@ if ($action == 'builddoc' && $permissioncreate)
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
|
||||
// To be sure vars is defined
|
||||
if (empty($hidedetails)) $hidedetails=0;
|
||||
if (empty($hidedesc)) $hidedesc=0;
|
||||
if (empty($hideref)) $hideref=0;
|
||||
if (empty($moreparams)) $moreparams=null;
|
||||
|
||||
|
||||
$result= $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
|
||||
if ($result <= 0)
|
||||
{
|
||||
@ -91,11 +91,15 @@ if ($action == 'builddoc' && $permissioncreate)
|
||||
}
|
||||
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);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,10 +94,30 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
||||
}
|
||||
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)
|
||||
|| (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write)))
|
||||
|| ($element == 'payment' && $user->rights->facture->paiement)
|
||||
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
||||
|| (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write)))
|
||||
|| ($element == 'payment' && $user->rights->facture->paiement)
|
||||
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
||||
*/
|
||||
|
||||
if ($check_access)
|
||||
{
|
||||
// Clean parameters
|
||||
$newvalue = trim($value);
|
||||
|
||||
@ -166,7 +166,7 @@ class Form
|
||||
$ret.='<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||
$ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$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 (preg_match('/^(string|email)/',$typeofdata))
|
||||
{
|
||||
@ -189,7 +189,7 @@ class Form
|
||||
$morealt=' style="width: '.$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')
|
||||
{
|
||||
@ -4170,12 +4170,12 @@ class Form
|
||||
{
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency));
|
||||
}
|
||||
elseif ($filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%'))")
|
||||
elseif ($filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%'))")
|
||||
{
|
||||
// Replace trans key with CompanyHasDownPaymentOrCommercialDiscount
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
print $langs->trans("CompanyHasCreditNote",price($amount,0,$langs,0,0,-1,$conf->currency));
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// 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
|
||||
// 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 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) {
|
||||
$('.editval_textarea').editable(urlSaveInPlace, {
|
||||
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) {
|
||||
$('.editval_numeric').editable(urlSaveInPlace, {
|
||||
type : 'text',
|
||||
|
||||
@ -414,7 +414,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
||||
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
||||
$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.= '
|
||||
jQuery("#'.$htmlname.'").change(function () {
|
||||
|
||||
@ -26,6 +26,13 @@
|
||||
* $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 -->
|
||||
@ -56,11 +63,11 @@
|
||||
|
||||
// Case of computed field
|
||||
console.log(type);
|
||||
if (type == '' || type == 'varchar' || type == 'int' || type == 'double' || type == 'price') {
|
||||
jQuery("tr.extra_computed_value").show();
|
||||
if (type == '' || type == 'varchar' || type == 'int' || type == 'double' || type == 'price') {
|
||||
jQuery("tr.extra_computed_value").show();
|
||||
} else {
|
||||
computed_value.val(''); jQuery("tr.extra_computed_value").hide();
|
||||
}
|
||||
}
|
||||
if (computed_value.val())
|
||||
{
|
||||
console.log("We enter a computed formula");
|
||||
@ -75,7 +82,7 @@
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #ishidden, #list").attr('disabled', false);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_ishidden, tr.extra_list").show();
|
||||
}
|
||||
|
||||
|
||||
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'double') { size.val('24,8').removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
@ -90,8 +97,8 @@
|
||||
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
||||
else if (type == 'link') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
||||
else if (type == 'separate') {
|
||||
size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true);
|
||||
else if (type == 'separate') {
|
||||
size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true);
|
||||
jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();
|
||||
}
|
||||
else { // type = string
|
||||
@ -102,12 +109,12 @@
|
||||
if (type == 'separate')
|
||||
{
|
||||
required.removeAttr('checked').prop('disabled', true); alwayseditable.removeAttr('checked').prop('disabled', true); list.val('').prop('disabled', true);
|
||||
jQuery('#size, #default_value').val('').prop('disabled', true);
|
||||
jQuery('#size, #default_value').val('').prop('disabled', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
default_value.removeAttr('disabled');
|
||||
required.removeAttr('disabled'); alwayseditable.removeAttr('disabled'); list.val('').removeAttr('disabled');
|
||||
required.removeAttr('disabled'); alwayseditable.removeAttr('disabled'); list.val('').removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
init_typeoffields('<?php echo GETPOST('type'); ?>');
|
||||
|
||||
@ -25,6 +25,13 @@
|
||||
* $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 -->
|
||||
@ -54,11 +61,11 @@
|
||||
?>
|
||||
|
||||
// Case of computed field
|
||||
if (type == 'varchar' || type == 'int' || type == 'double' || type == 'price') {
|
||||
jQuery("tr.extra_computed_value").show();
|
||||
if (type == 'varchar' || type == 'int' || type == 'double' || type == 'price') {
|
||||
jQuery("tr.extra_computed_value").show();
|
||||
} else {
|
||||
computed_value.val(''); jQuery("tr.extra_computed_value").hide();
|
||||
}
|
||||
}
|
||||
if (computed_value.val())
|
||||
{
|
||||
console.log("We enter a computed formula");
|
||||
@ -73,7 +80,7 @@
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #ishidden, #list").attr('disabled', false);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_ishidden, tr.extra_list").show();
|
||||
}
|
||||
|
||||
|
||||
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'double') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
@ -91,19 +98,19 @@
|
||||
else if (type == 'separate') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else { // type = string
|
||||
size.val('').prop('disabled', true);
|
||||
unique.removeAttr('disabled');
|
||||
unique.removeAttr('disabled');
|
||||
}
|
||||
|
||||
if (type == 'separate')
|
||||
{
|
||||
required.removeAttr('checked').prop('disabled', true); alwayseditable.removeAttr('checked').prop('disabled', true); list.val('').prop('disabled', true);
|
||||
jQuery('#size, #default_value').val('').prop('disabled', true);
|
||||
required.removeAttr('checked').prop('disabled', true); alwayseditable.removeAttr('checked').prop('disabled', true); list.val('').prop('disabled', true);
|
||||
jQuery('#size, #default_value').val('').prop('disabled', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
default_value.removeAttr('disabled');
|
||||
required.removeAttr('disabled'); alwayseditable.removeAttr('disabled'); list.val('').removeAttr('disabled');
|
||||
}
|
||||
required.removeAttr('disabled'); alwayseditable.removeAttr('disabled'); list.val('').removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
init_typeoffields(jQuery("#type").val());
|
||||
jQuery("#type").change(function() {
|
||||
@ -113,7 +120,7 @@
|
||||
// If we enter a formula, we disable other fields
|
||||
jQuery("#computed_value").keyup(function() {
|
||||
init_typeoffields(jQuery('#type').val());
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -22,6 +22,14 @@
|
||||
* $extrafield
|
||||
* $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 -->
|
||||
@ -56,7 +64,7 @@ if (count($extrafields->attribute_type))
|
||||
{
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
@ -77,7 +85,7 @@ else
|
||||
{
|
||||
$colspan=9;
|
||||
if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) $colspan++;
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="opacitymedium" colspan="'.$colspan.'">';
|
||||
print $langs->trans("None");
|
||||
|
||||
@ -13,8 +13,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
|
||||
@ -13,8 +13,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
|
||||
@ -19,6 +19,14 @@
|
||||
* 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)
|
||||
*/
|
||||
|
||||
// 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 -->
|
||||
|
||||
@ -16,6 +16,13 @@
|
||||
* 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
|
||||
if (isset($parameters['showblocbydefault'])) $hide=(empty($parameters['showblocbydefault']) ? 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)
|
||||
*/
|
||||
|
||||
// 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.'/core/class/html.formcompany.class.php';
|
||||
|
||||
|
||||
@ -24,6 +24,14 @@
|
||||
// $modulepart = for download
|
||||
// $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");
|
||||
if (empty($relativepathwithnofile)) $relativepathwithnofile='';
|
||||
if (empty($permtoedit)) $permtoedit=-1;
|
||||
|
||||
@ -24,6 +24,14 @@
|
||||
* $parameters
|
||||
* $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 -->
|
||||
<?php
|
||||
|
||||
@ -19,6 +19,14 @@
|
||||
// Need global variable $title to be defined by caller (like dol_loginfunction)
|
||||
// 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("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)) { ?>
|
||||
<script type="text/javascript">
|
||||
$(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
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -17,6 +17,14 @@
|
||||
* 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"
|
||||
$module = $object->element;
|
||||
$note_public = 'note_public';
|
||||
|
||||
@ -30,6 +30,13 @@
|
||||
* $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;
|
||||
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)
|
||||
*/
|
||||
|
||||
// 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;
|
||||
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
|
||||
@ -266,21 +273,21 @@ jQuery(document).ready(function()
|
||||
if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#price_ht").val() != '') {
|
||||
jQuery("#price_ttc").val('');
|
||||
jQuery("#multicurrency_subprice").val('');
|
||||
}
|
||||
}
|
||||
});
|
||||
jQuery("#price_ttc").keyup(function(event) {
|
||||
// console.log(event.which); // discard event tag and arrows
|
||||
if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#price_ttc").val() != '') {
|
||||
jQuery("#price_ht").val('');
|
||||
jQuery("#multicurrency_subprice").val('');
|
||||
}
|
||||
}
|
||||
});
|
||||
jQuery("#multicurrency_subprice").keyup(function(event) {
|
||||
// console.log(event.which); // discard event tag and arrows
|
||||
if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#price_ttc").val() != '') {
|
||||
jQuery("#price_ht").val('');
|
||||
jQuery("#price_ttc").val('');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
<?php
|
||||
|
||||
@ -37,6 +37,14 @@
|
||||
* $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;
|
||||
|
||||
$usemargins=0;
|
||||
|
||||
@ -13,8 +13,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
|
||||
@ -16,6 +16,14 @@
|
||||
* 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("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)) { ?>
|
||||
<script type="text/javascript">
|
||||
$(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
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1,6 +1,14 @@
|
||||
<!-- BEGIN TEMPLATE resource_add.tpl.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');
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
<!-- BEGIN TEMPLATE resource_view.tpl.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);
|
||||
|
||||
@ -34,11 +40,11 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
||||
|
||||
foreach ($linked_resources as $linked_resource)
|
||||
{
|
||||
|
||||
|
||||
$object_resource = fetchObjectByElement($linked_resource['resource_id'],$linked_resource['resource_type']);
|
||||
|
||||
|
||||
//$element_id = $linked_resource['rowid'];
|
||||
|
||||
|
||||
if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid'))
|
||||
{
|
||||
|
||||
|
||||
@ -16,6 +16,14 @@
|
||||
*
|
||||
* 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 -->
|
||||
|
||||
@ -127,7 +127,7 @@ if (empty($reshook))
|
||||
|
||||
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)
|
||||
{
|
||||
$object->fetch($id);
|
||||
@ -503,8 +503,8 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Action update description of emailing
|
||||
else if ($action == 'settrackingnumber' || $action == 'settrackingurl'
|
||||
// Action update
|
||||
else if ($action == 'settracking_number' || $action == 'settracking_url'
|
||||
|| $action == 'settrueWeight'
|
||||
|| $action == 'settrueWidth'
|
||||
|| $action == 'settrueHeight'
|
||||
@ -513,8 +513,8 @@ if (empty($reshook))
|
||||
{
|
||||
$error=0;
|
||||
|
||||
if ($action == 'settrackingnumber') $object->tracking_number = trim(GETPOST('trackingnumber','alpha'));
|
||||
if ($action == 'settrackingurl') $object->tracking_url = trim(GETPOST('trackingurl','int'));
|
||||
if ($action == 'settracking_number') $object->tracking_number = trim(GETPOST('tracking_number','alpha'));
|
||||
if ($action == 'settracking_url') $object->tracking_url = trim(GETPOST('tracking_url','int'));
|
||||
if ($action == 'settrueWeight') {
|
||||
$object->trueWeight = trim(GETPOST('trueWeight','int'));
|
||||
$object->weight_units = GETPOST('weight_units','int');
|
||||
@ -1692,8 +1692,8 @@ else if ($id || $ref)
|
||||
print '</tr>';
|
||||
|
||||
// Tracking Number
|
||||
print '<tr><td class="titlefield">'.$form->editfieldkey("TrackingNumber",'trackingnumber',$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 '<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",'tracking_number',$object->tracking_url,$object,$user->rights->expedition->creer,'string',$object->tracking_number);
|
||||
print '</td></tr>';
|
||||
|
||||
// Incoterms
|
||||
|
||||
@ -14,8 +14,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -34,7 +41,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
@ -73,7 +80,7 @@ if (count($linkedObjectBlock) > 1)
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -15,8 +15,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -32,7 +39,7 @@ $var=true;
|
||||
$total=0;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
|
||||
|
||||
?>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||
<td><?php echo $langs->trans("ExpenseReport"); ?></td>
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* 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/fichinter.lib.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("fichinter");
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2009-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* 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.'/fichinter/class/fichinter.class.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("interventions");
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* 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.'/fichinter/class/fichinter.class.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("interventions");
|
||||
|
||||
@ -13,8 +13,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -33,7 +40,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
||||
* Copyright (C) 2005-2009 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* 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.'/core/lib/fourn.lib.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("orders");
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* 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
|
||||
* 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/class/html.formfile.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('other');
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* 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.'/fourn/class/fournisseur.commande.class.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("suppliers");
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.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
|
||||
* 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/fourn.lib.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("suppliers");
|
||||
|
||||
@ -171,16 +171,15 @@ if (($action == 'create' || $action == 'add') && ! $error) {
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
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);
|
||||
|
||||
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 ) {
|
||||
$objectsrc = new CommandeFournisseur($db);
|
||||
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
|
||||
* 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 -->
|
||||
@ -35,7 +42,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
@ -66,7 +73,7 @@ if (count($linkedObjectBlock) > 1)
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
||||
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* 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.'/core/lib/fourn.lib.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('other');
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* 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
|
||||
* 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/images.lib.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('other');
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.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
|
||||
* 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.'/core/lib/fourn.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');
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* 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
|
||||
* 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.'/fourn/class/fournisseur.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("companies");
|
||||
|
||||
@ -17,6 +17,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -36,7 +44,7 @@ $var=true;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
$ilink++;
|
||||
|
||||
|
||||
$trclass=($var?'pair':'impair');
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||
?>
|
||||
@ -54,7 +62,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
$total = $total + $sign * $objectlink->total_ht;
|
||||
echo price($objectlink->total_ht);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
||||
}
|
||||
@ -62,7 +70,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
if (count($linkedObjectBlock) > 1)
|
||||
{
|
||||
@ -76,7 +84,7 @@ if (count($linkedObjectBlock) > 1)
|
||||
<td align="right"></td>
|
||||
<td align="right"></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ $langs->load("orders");
|
||||
$langs->load("companies");
|
||||
|
||||
// Security check
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
$socid = GETPOST("socid", 'int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'societe',$socid,'');
|
||||
|
||||
@ -81,7 +81,7 @@ if ($resql)
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans($commande->statuts[$row[1]]).'</td>';
|
||||
@ -132,7 +132,7 @@ if (! empty($conf->fournisseur->enabled))
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven"><td class="nowrap">';
|
||||
$commandestatic->id=$obj->rowid;
|
||||
@ -151,7 +151,7 @@ if (! empty($conf->fournisseur->enabled))
|
||||
}
|
||||
if ($total>0)
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
@ -190,7 +190,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
while ($i < $num && $i < 20)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="nowrap">';
|
||||
$facturestatic->ref=$obj->ref;
|
||||
$facturestatic->id=$obj->rowid;
|
||||
@ -263,7 +263,7 @@ if ($resql)
|
||||
|
||||
while ($obj = $db->fetch_object($resql) )
|
||||
{
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><a href="card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"),"company").'</a>';
|
||||
@ -300,7 +300,7 @@ if (count($companystatic->SupplierCategories))
|
||||
|
||||
foreach ($companystatic->SupplierCategories as $rowid => $label)
|
||||
{
|
||||
|
||||
|
||||
print "<tr ".$bc[$var].">\n";
|
||||
print '<td>';
|
||||
$categstatic->id=$rowid;
|
||||
|
||||
@ -424,7 +424,7 @@
|
||||
});
|
||||
/* otherwise use button with given string as text */
|
||||
} else {
|
||||
var submit = $('<button type="submit" />');
|
||||
var submit = $('<button class="button" type="submit" />');
|
||||
submit.html(settings.submit);
|
||||
}
|
||||
$(this).append(submit);
|
||||
@ -435,7 +435,7 @@
|
||||
var cancel = $(settings.cancel);
|
||||
/* otherwise use button with given string as text */
|
||||
} else {
|
||||
var cancel = $('<button type="cancel" />');
|
||||
var cancel = $('<button class="button" type="cancel" />');
|
||||
cancel.html(settings.cancel);
|
||||
}
|
||||
$(this).append(cancel);
|
||||
|
||||
@ -172,7 +172,7 @@ NumberOfSupplierOrders=Nombre de commandes fournisseurs
|
||||
NumberOfSupplierInvoices=Nombre de factures fournisseurs
|
||||
NumberOfUnitsProposals=Quantités présentes dans les propositions commerciales
|
||||
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
|
||||
NumberOfUnitsSupplierOrders=Quantités présentes dans les commandes fournisseurs
|
||||
NumberOfUnitsSupplierInvoices=Quantités présentes dans les factures fournisseurs
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* 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
|
||||
* 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/loan.lib.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("companies");
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* 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
|
||||
* 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.'/core/lib/loan.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("bills");
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -29,6 +30,9 @@
|
||||
require '../main.inc.php';
|
||||
require_once(DOL_DOCUMENT_ROOT.'/loan/class/loan.class.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');
|
||||
|
||||
|
||||
@ -81,7 +81,8 @@ 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)
|
||||
if ($type != 2)
|
||||
{
|
||||
$inj += preg_match('/delete\s+from/i', $val);
|
||||
$inj += preg_match('/updatexml\(/i', $val);
|
||||
$inj += preg_match('/delete\s+from/i', $val);
|
||||
$inj += preg_match('/create\s+table/i', $val);
|
||||
$inj += preg_match('/update.+set.+=/i', $val);
|
||||
$inj += preg_match('/insert\s+into/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('/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('/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)
|
||||
{
|
||||
$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'))
|
||||
{
|
||||
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-autocomplete.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||
print '<script type="text/javascript">'."\n";
|
||||
|
||||
@ -23,5 +23,13 @@
|
||||
* 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. */
|
||||
echo "Hello world!";
|
||||
|
||||
@ -57,7 +57,6 @@ $select_pricing_rules=array(
|
||||
);
|
||||
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&PRODUIT_MULTIPRICES'] = $langs->trans('MultiPricesAbility') . '+' . $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')';
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == 'convert')
|
||||
{
|
||||
$vat_src_code_old = $reg[1];
|
||||
$oldvatrateclean = preg_replace('/\s*\(.*\)/', '', $oldvatrate); // Remove code into vatrate.
|
||||
}
|
||||
} else $oldvatrateclean=$oldvatrate;
|
||||
|
||||
// Clean vat code new
|
||||
$vat_src_code_new='';
|
||||
@ -81,7 +81,7 @@ if ($action == 'convert')
|
||||
{
|
||||
$vat_src_code_new = $reg[1];
|
||||
$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_id == $mysoc->country_id)
|
||||
|
||||
@ -15,6 +15,14 @@
|
||||
* 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'];
|
||||
|
||||
$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/>.
|
||||
*/
|
||||
|
||||
// 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'];
|
||||
|
||||
$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/>.
|
||||
*/
|
||||
|
||||
// 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'];
|
||||
?>
|
||||
|
||||
|
||||
@ -13,8 +13,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 -->
|
||||
@ -69,7 +76,7 @@
|
||||
if ($searchfield['enabled']) {
|
||||
if ($searchfield['search']) { ?>
|
||||
<td class="liste_titre" align="<?php echo $searchfield['align']; ?>"><input class="flat" type="text" name="s<?php echo $searchfield['alias']; ?>" value=""></td>
|
||||
<?php } else if ($key == $num) {
|
||||
<?php } else if ($key == $num) {
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
|
||||
@ -13,9 +13,16 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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'];
|
||||
|
||||
$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