Merge branch 'develop' into jyhere/patch-movements-on-reception-delete
This commit is contained in:
commit
d798e7a3e7
81 changed files with 631 additions and 724 deletions
|
|
@ -882,60 +882,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/adherents/admin/member.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access property \$control on mixed\.$#'
|
||||
identifier: property.nonObject
|
||||
count: 23
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$canvas might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$this might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 23
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access property \$control on mixed\.$#'
|
||||
identifier: property.nonObject
|
||||
count: 27
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$canvas might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$this might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 26
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access property \$control on mixed\.$#'
|
||||
identifier: property.nonObject
|
||||
count: 30
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$canvas might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$this might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 28
|
||||
path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
|
|
@ -1638,24 +1584,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/admin/oauthlogintokens.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always false\.$#'
|
||||
identifier: booleanNot.alwaysFalse
|
||||
count: 5
|
||||
path: ../../htdocs/admin/openid_connect.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
count: 5
|
||||
path: ../../htdocs/admin/openid_connect.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$bc might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 10
|
||||
path: ../../htdocs/admin/openid_connect.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
|
|
@ -1686,30 +1614,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/admin/security_file.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#4 \$deliveryreceipt of class CSMSFile constructor expects int, array\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/admin/sms.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#5 \$deferred of class CSMSFile constructor expects int, array\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/admin/sms.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#6 \$priority of class CSMSFile constructor expects int, array\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/admin/sms.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#7 \$class of class CSMSFile constructor expects int, array\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/admin/sms.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$smsfile might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -2748,12 +2652,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/blockedlog/class/blockedlog.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$aaa might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/blockedlog/class/blockedlog.class.php
|
||||
|
||||
-
|
||||
message: '#^Property BOM\:\:\$status \(int\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
|
|
@ -5280,12 +5178,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/compta/bank/class/paymentvarious.class.php
|
||||
|
||||
-
|
||||
message: '#^Call to function property_exists\(\) with \$this\(PaymentVarious\) and ''fk_bank'' will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
count: 1
|
||||
path: ../../htdocs/compta/bank/class/paymentvarious.class.php
|
||||
|
||||
-
|
||||
message: '#^Property PaymentVarious\:\:\$accountid \(int\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
|
|
@ -8298,12 +8190,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$action might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 14
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$from might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -8322,12 +8208,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$month might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#'
|
||||
identifier: empty.variable
|
||||
|
|
@ -8358,12 +8238,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$year might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../htdocs/core/actions_massactions.inc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$classfile might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -17496,18 +17370,6 @@ parameters:
|
|||
count: 4
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$ExecTimeLimit in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$MemoryLimit in empty\(\) always exists and is always falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
|
|
@ -25512,36 +25374,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/product/class/product.class.php
|
||||
|
||||
-
|
||||
message: '#^Property Product\:\:\$stats_bom has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/product/class/product.class.php
|
||||
|
||||
-
|
||||
message: '#^Property Product\:\:\$stats_facture_fournisseur has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/product/class/product.class.php
|
||||
|
||||
-
|
||||
message: '#^Property Product\:\:\$stats_facturerec has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/product/class/product.class.php
|
||||
|
||||
-
|
||||
message: '#^Property Product\:\:\$stats_mrptoconsume has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/product/class/product.class.php
|
||||
|
||||
-
|
||||
message: '#^Property Product\:\:\$stats_mrptoproduce has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/product/class/product.class.php
|
||||
|
||||
-
|
||||
message: '#^Property Product\:\:\$status \(int\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
|
|
@ -25572,12 +25404,6 @@ parameters:
|
|||
count: 2
|
||||
path: ../../htdocs/product/class/product.class.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
count: 1
|
||||
path: ../../htdocs/product/class/product.class.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
|
|
@ -27918,12 +27744,6 @@ parameters:
|
|||
count: 2
|
||||
path: ../../htdocs/projet/tasks.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$param might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 17
|
||||
path: ../../htdocs/projet/tasks.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$permissiontodelete might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -28584,42 +28404,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/public/payment/newpayment.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$PAYPAL_API_KO might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../htdocs/public/payment/newpayment.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$PAYPAL_API_OK might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../htdocs/public/payment/newpayment.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$PAYPAL_API_PASSWORD might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/public/payment/newpayment.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$PAYPAL_API_SANDBOX might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/public/payment/newpayment.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$PAYPAL_API_SIGNATURE might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/public/payment/newpayment.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$PAYPAL_API_USER might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/public/payment/newpayment.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$attendee might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -34242,72 +34026,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../scripts/emailings/reset-invalid-emails.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$conf might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$hookmanager might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$langs might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$conf might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$db might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 6
|
||||
path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$hookmanager might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$langs might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$conf might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../scripts/invoices/rebuild_merge_pdf.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$db might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../scripts/invoices/rebuild_merge_pdf.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$hookmanager might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../scripts/invoices/rebuild_merge_pdf.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$langs might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../scripts/invoices/rebuild_merge_pdf.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$user might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
|
|||
|
|
@ -19,8 +19,11 @@
|
|||
|
||||
/**
|
||||
* @var Adherent $object
|
||||
* @var Canvas $this
|
||||
* @var Conf $conf
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $canvas
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -19,8 +19,11 @@
|
|||
|
||||
/**
|
||||
* @var Adherent $object
|
||||
* @var Canvas $this
|
||||
* @var Conf $conf
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $canvas
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012-2022 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012-2022 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -19,9 +19,12 @@
|
|||
|
||||
/**
|
||||
* @var Adherent $object
|
||||
* @var Canvas $this
|
||||
* @var Conf $conf
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $canvas
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ class Adherent extends CommonObject
|
|||
*/
|
||||
const STATUS_VALIDATED = 1;
|
||||
/**
|
||||
* Resiliated
|
||||
* Resiliated (membership end and was not renew)
|
||||
*/
|
||||
const STATUS_RESILIATED = 0;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -61,16 +61,16 @@ print load_fiche_titre($langs->trans("SetupArea"), '', 'tools');
|
|||
|
||||
|
||||
if (getDolGlobalString('MAIN_MOTD_SETUPPAGE')) {
|
||||
$conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i', '<br>', $conf->global->MAIN_MOTD_SETUPPAGE);
|
||||
$conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i', '<br>', getDolGlobalString('MAIN_MOTD_SETUPPAGE'));
|
||||
if (getDolGlobalString('MAIN_MOTD_SETUPPAGE')) {
|
||||
$i = 0;
|
||||
$reg = array();
|
||||
while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100) {
|
||||
while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', getDolGlobalString('MAIN_MOTD_SETUPPAGE'), $reg) && $i < 100) {
|
||||
$tmp = explode('|', $reg[1]);
|
||||
if (!empty($tmp[1])) {
|
||||
$langs->load($tmp[1]);
|
||||
}
|
||||
$conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/__\('.preg_quote($reg[1]).'\)__/i', $langs->trans($tmp[0]), $conf->global->MAIN_MOTD_SETUPPAGE);
|
||||
$conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/__\('.preg_quote($reg[1]).'\)__/i', $langs->trans($tmp[0]), getDolGlobalString('MAIN_MOTD_SETUPPAGE'));
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1059,9 +1059,24 @@ if ($action == 'edit') {
|
|||
$text .= /* ($text ? '<br><br>' : ''). */$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD'));
|
||||
}
|
||||
if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) { // Not defined by default. Depend on platform.
|
||||
$ipstoshow = '';
|
||||
// List of IP shown as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]'
|
||||
// TODO Add a key to allow to show the IP/name of server detected dynamically
|
||||
$text .= ($text ? '<br><br>' : '').$langs->trans("WarningPHPMail2", getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
|
||||
$arrayipstoshow = explode(',', getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
|
||||
foreach ($arrayipstoshow as $iptoshow) {
|
||||
// If MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is an URL to get/show the public IP/name of server detected dynamically
|
||||
if (preg_match('/^http/i', $iptoshow)) {
|
||||
$tmpresult = getURLContent($iptoshow, 'GET', '', 1, array(), array('http', 'https'), 0);
|
||||
if (!empty($tmpresult['content'])) {
|
||||
$iptoshow = $tmpresult['content'];
|
||||
} else {
|
||||
$iptoshow = ''; // Failed to get IP
|
||||
}
|
||||
}
|
||||
$ipstoshow .= ($ipstoshow ? ', ' : '').trim($iptoshow);
|
||||
}
|
||||
if ($ipstoshow) {
|
||||
$text .= ($text ? '<br><br>' : '').$langs->trans("WarningPHPMail2", $ipstoshow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -803,14 +803,11 @@ while ($i < $imaxinloop) {
|
|||
$url .= '&limit='.((int) $limit);
|
||||
}
|
||||
if ($page) {
|
||||
$url .= '&page='.urlencode((string) ($page));
|
||||
}
|
||||
if ($sortfield) {
|
||||
$url .= '&sortfield='.urlencode($sortfield);
|
||||
}
|
||||
if ($sortorder) {
|
||||
$url .= '&page='.urlencode($sortorder);
|
||||
$url .= '&page='.urlencode((string) $page);
|
||||
}
|
||||
$url .= '&sortfield='.urlencode((string) $sortfield);
|
||||
$url .= '&page='.urlencode((string) $sortorder);
|
||||
|
||||
print '<a class="editfielda reposition marginrightonly marginleftonly" href="'.$url.'&action=edit&token='.newToken().'&rowid='.$obj->rowid.'">'.img_edit().'</a>';
|
||||
//print ' ';
|
||||
print '<a class=" marginrightonly marginleftonly" href="'.$url.'&action=delete&token='.newToken().'">'.img_delete().'</a> ';
|
||||
|
|
@ -827,7 +824,6 @@ while ($i < $imaxinloop) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,10 +37,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/openid_connect.lib.php';
|
|||
* @var User $user
|
||||
*/
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("openidconnect");
|
||||
$langs->loadLangs(["admin", "openidconnect"]);
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
|
|
@ -143,8 +144,6 @@ print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
|||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="set">';
|
||||
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||
|
|
@ -153,8 +152,7 @@ print '<td align="right">'.$langs->trans("Value").'</td>'."\n";
|
|||
print "</tr>\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLoginClaimName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLoginClaimDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -162,8 +160,7 @@ print '<input name="MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM" id="MAIN_AUTHENTICATIO
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_CLIENT_ID
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcClientIdName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcClientIdDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -171,8 +168,7 @@ print '<input name="MAIN_AUTHENTICATION_OIDC_CLIENT_ID" id="MAIN_AUTHENTICATION_
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcClientSecretName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcClientSecretDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -180,8 +176,7 @@ print '<input type="password" name="MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET" id="
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_SCOPES
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcScopesName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcScopesDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -189,8 +184,7 @@ print '<input name="MAIN_AUTHENTICATION_OIDC_SCOPES" id="MAIN_AUTHENTICATION_OID
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcAuthorizeUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcAuthorizeUrlDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -198,8 +192,7 @@ print '<input name="MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL" id="MAIN_AUTHENTICAT
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_TOKEN_URL
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcTokenUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcTokenUrlDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -207,8 +200,7 @@ print '<input name="MAIN_AUTHENTICATION_OIDC_TOKEN_URL" id="MAIN_AUTHENTICATION_
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_USERINFO_URL
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcUserinfoUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcUserinfoUrlDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -216,8 +208,7 @@ print '<input name="MAIN_AUTHENTICATION_OIDC_USERINFO_URL" id="MAIN_AUTHENTICATI
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_LOGOUT_URL
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLogoutUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLogoutUrlDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -225,8 +216,7 @@ print '<input name="MAIN_AUTHENTICATION_OIDC_LOGOUT_URL" id="MAIN_AUTHENTICATION
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// REDIRECT_URL
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcRedirectUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcRedirectUrlDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -234,8 +224,7 @@ print '<input class="minwidth300" value="'.dol_escape_htmltag(openid_connect_get
|
|||
print '</td></tr>' . "\n";
|
||||
|
||||
// LOGOUT_URL
|
||||
$var = !$var;
|
||||
print '<tr ' . $bc[$var] . '>' . "\n";
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLogoutRedirectUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLogoutRedirectUrlDesc").'</td>'."\n";
|
||||
print '<td align="right">' . "\n";
|
||||
|
|
@ -256,3 +245,4 @@ print '<br>';
|
|||
print dol_get_fiche_end();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -83,10 +83,10 @@ if ($action == 'send' && !$cancel) {
|
|||
}
|
||||
$sendto = GETPOST("sendto", 'alphanohtml');
|
||||
$body = GETPOST('message', 'alphanohtml');
|
||||
$deliveryreceipt = GETPOST("deliveryreceipt", 'alphanohtml');
|
||||
$deferred = GETPOST('deferred', 'alphanohtml');
|
||||
$priority = GETPOST('priority', 'alphanohtml');
|
||||
$class = GETPOST('class', 'alphanohtml');
|
||||
$deliveryreceipt = GETPOSTINT("deliveryreceipt");
|
||||
$deferred = GETPOSTINT('deferred');
|
||||
$priority = GETPOSTINT('priority');
|
||||
$class = GETPOSTINT('class');
|
||||
$errors_to = GETPOST("errorstosms", 'alphanohtml');
|
||||
|
||||
// Create form object
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ if (empty($reshook)) {
|
|||
|
||||
// Action dispose object
|
||||
if ($action == 'confirm_disposal' && $confirm == 'yes' && $permissiontoadd) {
|
||||
$object->disposal_date = dol_mktime(12, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear')); // for date without hour, we use gmt
|
||||
$object->disposal_date = dol_mktime(0, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear'), 'gmt'); // for date without hour, we use gmt
|
||||
$object->disposal_amount_ht = GETPOSTINT('disposal_amount');
|
||||
$object->fk_disposal_type = GETPOSTINT('fk_disposal_type');
|
||||
$disposal_invoice_id = GETPOSTINT('disposal_invoice_id');
|
||||
|
|
@ -273,7 +273,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
// Disposal
|
||||
$langs->load('bills');
|
||||
|
||||
$disposal_date = dol_mktime(12, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear')); // for date without hour, we use gmt
|
||||
$disposal_date = dol_mktime(0, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear'), 'gmt'); // for date without hour, we use gmt
|
||||
$disposal_amount = GETPOSTINT('disposal_amount');
|
||||
$fk_disposal_type = GETPOSTINT('fk_disposal_type');
|
||||
$disposal_invoice_id = GETPOSTINT('disposal_invoice_id');
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ class AssetDepreciationOptions extends CommonObject
|
|||
if (in_array($field_info['type'], array('text', 'html'))) {
|
||||
$value = GETPOST($html_name, 'restricthtml');
|
||||
} elseif ($field_info['type'] == 'date') {
|
||||
$value = dol_mktime(12, 0, 0, GETPOSTINT($html_name . 'month'), GETPOSTINT($html_name . 'day'), GETPOSTINT($html_name . 'year')); // for date without hour, we use gmt
|
||||
$value = dol_mktime(0, 0, 0, GETPOSTINT($html_name . 'month'), GETPOSTINT($html_name . 'day'), GETPOSTINT($html_name . 'year'), 'gmt'); // for date without hour, we use gmt
|
||||
} elseif ($field_info['type'] == 'datetime') {
|
||||
$value = dol_mktime(GETPOSTINT($html_name . 'hour'), GETPOSTINT($html_name . 'min'), GETPOSTINT($html_name . 'sec'), GETPOSTINT($html_name . 'month'), GETPOSTINT($html_name . 'day'), GETPOSTINT($html_name . 'year'), 'tzuserrel');
|
||||
} elseif ($field_info['type'] == 'duration') {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ $search_end = -1;
|
|||
if (GETPOST('search_endyear') != '') {
|
||||
$search_end = dol_mktime(23, 59, 59, $search_endmonth, $search_endday, $search_endyear);
|
||||
}
|
||||
$search_code = GETPOST('search_code', 'alpha');
|
||||
$search_code = GETPOST('search_code', 'array:alpha');
|
||||
$search_ref = GETPOST('search_ref', 'alpha');
|
||||
$search_amount = GETPOST('search_amount', 'alpha');
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||
$search_fk_user = '';
|
||||
$search_start = -1;
|
||||
$search_end = -1;
|
||||
$search_code = '';
|
||||
$search_code = array();
|
||||
$search_ref = '';
|
||||
$search_amount = '';
|
||||
$search_showonlyerrors = 0;
|
||||
|
|
@ -496,15 +496,13 @@ print '</td>';
|
|||
|
||||
// Actions code
|
||||
print '<td class="liste_titre">';
|
||||
print $form->selectarray('search_code', $block_static->trackedevents, $search_code, 1, 0, 0, '', 1, 0, 0, 'ASC', 'maxwidth150', 1);
|
||||
//print $form->selectarray('search_code', $block_static->trackedevents, $search_code, 1, 0, 0, '', 1, 0, 0, 'ASC', 'maxwidth150', 1);
|
||||
print $form->multiselectarray('search_code', $block_static->trackedevents, $search_code, 0, 0, 'maxwidth150', 1);
|
||||
print '</td>';
|
||||
|
||||
// Ref
|
||||
print '<td class="liste_titre"><input type="text" class="maxwidth50" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
|
||||
|
||||
// Link to ref
|
||||
print '<td class="liste_titre"></td>';
|
||||
|
||||
// Amount
|
||||
print '<td class="liste_titre right"><input type="text" class="maxwidth50" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
|
||||
|
||||
|
|
@ -521,6 +519,9 @@ print $form->selectarray('search_showonlyerrors', $array, $search_showonlyerrors
|
|||
print '</td>';
|
||||
|
||||
// Status note
|
||||
//print '<td class="liste_titre"></td>';
|
||||
|
||||
// Link to original ref into business software
|
||||
print '<td class="liste_titre"></td>';
|
||||
|
||||
// Action column
|
||||
|
|
@ -543,12 +544,12 @@ print getTitleFieldOfList($langs->trans('Date'), 0, $_SERVER["PHP_SELF"], 'date_
|
|||
print getTitleFieldOfList($langs->trans('Author'), 0, $_SERVER["PHP_SELF"], 'user_fullname', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print getTitleFieldOfList($langs->trans('Action'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print getTitleFieldOfList($langs->trans('Ref'), 0, $_SERVER["PHP_SELF"], 'ref_object', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print getTitleFieldOfList($langs->trans('Amount'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ')."\n";
|
||||
print getTitleFieldOfList($langs->trans('DataOfArchivedEvent'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ', 0, $langs->trans('DataOfArchivedEventHelp').'<br>'.$langs->trans('DataOfArchivedEventHelp2'), 1)."\n";
|
||||
print getTitleFieldOfList($langs->trans('DataOfArchivedEvent'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ', 0, $langs->trans('DataOfArchivedEventHelp'), 1)."\n";
|
||||
print getTitleFieldOfList($langs->trans('Fingerprint'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print getTitleFieldOfList($langs->trans('Status'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
|
||||
print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
|
||||
print getTitleFieldOfList($form->textwithpicto($langs->trans('Status'), $langs->trans('DataOfArchivedEventHelp2')), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
|
||||
//print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
|
||||
print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print getTitleFieldOfList('<span id="blockchainstatus"></span>', 0, $_SERVER["PHP_SELF"], '', '', $param, 'class="center"', $sortfield, $sortorder, '')."\n";
|
||||
|
|
@ -633,12 +634,6 @@ if (is_array($blocks)) {
|
|||
print dol_escape_htmltag($block->ref_object);
|
||||
print '</td>';
|
||||
|
||||
// Link to source object
|
||||
print '<td class="tdoverflowmax150"'.(preg_match('/<a/', $object_link) ? '' : 'title="'.dol_escape_htmltag(dol_string_nohtmltag($object_link.($object_link_title ? ' - '.$object_link_title : ''))).'"').'>';
|
||||
print '<!-- object_link -->'; // $object_link can be a '<a href' link or a text
|
||||
print $object_link;
|
||||
print '</td>';
|
||||
|
||||
// Amount
|
||||
print '<td class="right nowraponall">'.price($block->amounts).'</td>';
|
||||
|
||||
|
|
@ -666,14 +661,18 @@ if (is_array($blocks)) {
|
|||
} else {
|
||||
print '<span class="badge badge-status4 badge-status" title="'.$langs->trans('OkCheckFingerprintValidity').'">OK</span>';
|
||||
}
|
||||
print '</td>';
|
||||
//print '</td>';
|
||||
|
||||
// Note
|
||||
print '<td class="center">';
|
||||
//print '<td class="center">';
|
||||
if (!$checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror)) { // If error
|
||||
if ($checkresult[$block->id]) {
|
||||
print $form->textwithpicto('', $langs->trans('OkCheckFingerprintValidityButChainIsKo'));
|
||||
} else {
|
||||
//print $form->textwithpicto('', $langs->trans('KoCheckFingerprintValidity'));
|
||||
}
|
||||
} else {
|
||||
//print $form->textwithpicto('', $langs->trans('DataOfArchivedEventHelp2'));
|
||||
}
|
||||
|
||||
if (getDolGlobalString('BLOCKEDLOG_USE_REMOTE_AUTHORITY') && getDolGlobalString('BLOCKEDLOG_AUTHORITY_URL')) {
|
||||
|
|
@ -681,6 +680,12 @@ if (is_array($blocks)) {
|
|||
}
|
||||
print '</td>';
|
||||
|
||||
// Link to source object
|
||||
print '<td class="tdoverflowmax150"'.(preg_match('/<a/', $object_link) ? '' : 'title="'.dol_escape_htmltag(dol_string_nohtmltag($object_link.($object_link_title ? ' - '.$object_link_title : ''))).'"').'>';
|
||||
print '<!-- object_link -->'; // $object_link can be a '<a href' link or a text
|
||||
print $object_link;
|
||||
print '</td>';
|
||||
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre">';
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ class BlockedLog
|
|||
// Customer Invoice/Facture / Payment
|
||||
if (isModEnabled('invoice')) {
|
||||
$this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE';
|
||||
$this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE';
|
||||
//$this->trackedevents['BILL_UPDATE'] = 'logBILL_UPDATE';
|
||||
$this->trackedevents['BILL_SENTBYMAIL'] = 'logBILL_SENTBYMAIL';
|
||||
$this->trackedevents['DOC_DOWNLOAD'] = 'BlockedLogBillDownload';
|
||||
$this->trackedevents['DOC_PREVIEW'] = 'BlockedLogBillPreview';
|
||||
|
|
@ -532,7 +532,8 @@ class BlockedLog
|
|||
continue; // Discard some properties
|
||||
}
|
||||
if (!in_array($key, array(
|
||||
'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'datev', 'type', 'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'revenuestamp', 'datepointoftax', 'note_public', 'lines'
|
||||
'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'datev', 'type', 'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'revenuestamp', 'datepointoftax', 'note_public', 'lines',
|
||||
'module_source', 'pos_source'
|
||||
))) {
|
||||
continue; // Discard if not into a dedicated list
|
||||
}
|
||||
|
|
@ -542,7 +543,13 @@ class BlockedLog
|
|||
$lineid++;
|
||||
foreach ($tmpline as $keyline => $valueline) {
|
||||
if (!in_array($keyline, array(
|
||||
'ref', 'multicurrency_code', 'multicurrency_total_ht', 'multicurrency_total_tva', 'multicurrency_total_ttc', 'qty', 'product_type', 'product_label', 'vat_src_code', 'tva_tx', 'info_bits', 'localtax1_tx', 'localtax2_tx', 'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2'
|
||||
'ref', 'product_type', 'product_label',
|
||||
'qty',
|
||||
'subprice',
|
||||
'vat_src_code', 'tva_tx', 'localtax1_tx', 'localtax2_tx',
|
||||
'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2',
|
||||
'multicurrency_code', 'multicurrency_total_ht', 'multicurrency_total_tva', 'multicurrency_total_ttc',
|
||||
'info_bits', 'special_code',
|
||||
))) {
|
||||
continue; // Discard if not into a dedicated list
|
||||
}
|
||||
|
|
@ -846,12 +853,12 @@ class BlockedLog
|
|||
*/
|
||||
public function dolEncodeBlockedData($data, $mode = 0)
|
||||
{
|
||||
$aaa = '';
|
||||
try {
|
||||
$aaa = json_encode($data);
|
||||
} catch (Exception $e) {
|
||||
//print $e->getErrs);
|
||||
// print $e->getErrs);
|
||||
}
|
||||
//var_dump($aaa);
|
||||
|
||||
return $aaa;
|
||||
}
|
||||
|
|
@ -866,12 +873,12 @@ class BlockedLog
|
|||
*/
|
||||
public function dolDecodeBlockedData($data, $mode = 0)
|
||||
{
|
||||
$aaa = null;
|
||||
try {
|
||||
$aaa = (object) jsonOrUnserialize($data);
|
||||
} catch (Exception $e) {
|
||||
//print $e->getErrs);
|
||||
// print $e->getErrs);
|
||||
}
|
||||
//var_dump($aaa);
|
||||
|
||||
return $aaa;
|
||||
}
|
||||
|
|
@ -901,12 +908,10 @@ class BlockedLog
|
|||
*/
|
||||
public function create($user, $forcesignature = '')
|
||||
{
|
||||
global $conf, $langs, $hookmanager;
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load('blockedlog');
|
||||
|
||||
$error = 0;
|
||||
|
||||
// Clean data
|
||||
$this->amounts = (float) $this->amounts;
|
||||
|
||||
|
|
@ -941,9 +946,9 @@ class BlockedLog
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$previoushash = $this->getPreviousHash(1, 0); // This get last record and lock database until insert is done
|
||||
$previoushash = $this->getPreviousHash(1, 0); // This get last record and lock database until insert is done and transaction closed
|
||||
|
||||
$keyforsignature = $this->buildKeyForSignature();
|
||||
$keyforsignature = $this->buildKeyForSignature(); // All the information for the has (meta data + data saved)
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
|
||||
|
||||
|
|
@ -1142,18 +1147,18 @@ class BlockedLog
|
|||
/**
|
||||
* Return array of log objects (with criteria)
|
||||
*
|
||||
* @param string $element element to search
|
||||
* @param int $fk_object id of object to search
|
||||
* @param int<0,max> $limit max number of element, 0 for all
|
||||
* @param string $sortfield sort field
|
||||
* @param string $sortorder sort order
|
||||
* @param int $search_fk_user id of user(s)
|
||||
* @param int $search_start start time limit
|
||||
* @param int $search_end end time limit
|
||||
* @param string $search_ref search ref
|
||||
* @param string $search_amount search amount
|
||||
* @param string $search_code search code
|
||||
* @return BlockedLog[]|int<-2,-1> Array of object log or <0 if error
|
||||
* @param string $element element to search
|
||||
* @param int $fk_object id of object to search
|
||||
* @param int<0,max> $limit max number of element, 0 for all
|
||||
* @param string $sortfield sort field
|
||||
* @param string $sortorder sort order
|
||||
* @param int $search_fk_user id of user(s)
|
||||
* @param int $search_start start time limit
|
||||
* @param int $search_end end time limit
|
||||
* @param string $search_ref search ref
|
||||
* @param string $search_amount search amount
|
||||
* @param string|string[] $search_code search code
|
||||
* @return BlockedLog[]|int<-2,-1> Array of object log or <0 if error
|
||||
*/
|
||||
public function getLog($element, $fk_object, $limit = 0, $sortfield = '', $sortorder = '', $search_fk_user = -1, $search_start = -1, $search_end = -1, $search_ref = '', $search_amount = '', $search_code = '')
|
||||
{
|
||||
|
|
@ -1195,8 +1200,14 @@ class BlockedLog
|
|||
if ($search_amount != '') {
|
||||
$sql .= natural_search("amounts", $search_amount, 1);
|
||||
}
|
||||
if ($search_code != '' && $search_code != '-1') {
|
||||
$sql .= natural_search("action", $search_code, 3);
|
||||
if (is_array($search_code)) {
|
||||
if (!empty($search_code)) {
|
||||
$sql .= natural_search("action", implode(',', $search_code), 3);
|
||||
}
|
||||
} else {
|
||||
if ($search_code != '' && $search_code != '-1') {
|
||||
$sql .= natural_search("action", $search_code, 3);
|
||||
}
|
||||
}
|
||||
|
||||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -845,7 +845,7 @@ class PaymentVarious extends CommonObject
|
|||
if ($selected >= 0) {
|
||||
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
if (!empty($bankline)) {
|
||||
if (!empty($bankline) && $bankline instanceof AccountLine) {
|
||||
$return .= ' | <span class="info-box-status ">'.$bankline->getNomUrl(1).'</span>';
|
||||
}
|
||||
if (property_exists($this, 'datep')) {
|
||||
|
|
|
|||
|
|
@ -2343,10 +2343,10 @@ if ($num > 0) {
|
|||
}
|
||||
// Type ent
|
||||
if (!empty($arrayfields['typent.code']['checked'])) {
|
||||
print '<td class="center">';
|
||||
if (!is_array($typenArray) || count($typenArray) == 0) {
|
||||
$typenArray = $formcompany->typent_array(1);
|
||||
}
|
||||
print '<td class="center tdoverflowmax100" title="'.dolPrintHTML($typenArray[$obj->typent_code]).'">';
|
||||
if (!empty($obj->typent_code)) {
|
||||
print $typenArray[$obj->typent_code];
|
||||
}
|
||||
|
|
@ -2357,10 +2357,10 @@ if ($num > 0) {
|
|||
}
|
||||
// Staff
|
||||
if (!empty($arrayfields['staff.code']['checked'])) {
|
||||
print '<td class="center">';
|
||||
if (!is_array($conf->cache['staff']) || count($conf->cache['staff']) == 0) {
|
||||
$conf->cache['staff'] = $formcompany->effectif_array(1);
|
||||
}
|
||||
print '<td class="center tdoverflowmax100" title="'.dolPrintHTML($conf->cache['staff'][$obj->staff_code]).'">';
|
||||
print $conf->cache['staff'][$obj->staff_code];
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
|
|
@ -2532,8 +2532,6 @@ if ($num > 0) {
|
|||
}
|
||||
}
|
||||
//else print $langs->trans("NoSalesRepresentativeAffected");
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
|
|
|
|||
|
|
@ -1090,6 +1090,7 @@ class BonPrelevement extends CommonObject
|
|||
// Pre-store some values into variables to simplify following sql requests
|
||||
if ($sourcetype != 'salary') {
|
||||
$entities = $type != 'bank-transfer' ? getEntity('invoice') : getEntity('supplier_invoice');
|
||||
$sqlTable = $type != 'bank-transfer' ? "facture" : "facture_fourn";
|
||||
$socOrUser = 'fk_soc';
|
||||
$societeOrUser = 'societe';
|
||||
} else {
|
||||
|
|
@ -1099,8 +1100,6 @@ class BonPrelevement extends CommonObject
|
|||
$societeOrUser = 'user';
|
||||
}
|
||||
|
||||
$sqlTable = $type != 'bank-transfer' ? "facture" : "facture_fourn";
|
||||
|
||||
$thirdpartyBANId = 0;
|
||||
|
||||
// Check if there is an iban associated to the bank transfer request or if we take the default
|
||||
|
|
@ -1160,7 +1159,7 @@ class BonPrelevement extends CommonObject
|
|||
$sql .= ", CONCAT(s.firstname,' ',s.lastname) as name";
|
||||
$sql .= ", f.ref, sr.bic, sr.iban_prefix, 'FRST' as frstrecur";
|
||||
}
|
||||
$sql .= " FROM " . $this->db->prefix() . $sqlTable . " as f";
|
||||
$sql .= " FROM " . $this->db->prefix() . $sqlTable . " as f"; // f is salary, facture or facture_fourn
|
||||
$sql .= " LEFT JOIN " . $this->db->prefix() . "prelevement_demande as pd ON f.rowid = pd.fk_".$this->db->sanitize($sqlTable);
|
||||
$sql .= " LEFT JOIN " . $this->db->prefix() . $this->db->sanitize($societeOrUser)." as s ON s.rowid = f.".$this->db->sanitize($socOrUser);
|
||||
$sql .= " LEFT JOIN " . $this->db->prefix() . $this->db->sanitize($societeOrUser."_rib")." as sr ON s.rowid = sr.".$this->db->sanitize($socOrUser);
|
||||
|
|
|
|||
|
|
@ -55,10 +55,13 @@
|
|||
* @var ?string $objectlabel
|
||||
* @var ?string $option
|
||||
* @var ?int $deliveryreceipt
|
||||
* @var string $action
|
||||
* @var string $massaction
|
||||
* @var string $objectclass
|
||||
* @var string $uploaddir
|
||||
* @var string $confirm
|
||||
* @var string $month
|
||||
* @var string $year
|
||||
* @var int $error
|
||||
*/
|
||||
'
|
||||
|
|
|
|||
|
|
@ -181,6 +181,12 @@ class DiscountAbsolute extends CommonObject
|
|||
*/
|
||||
public $type_invoice_supplier_source;
|
||||
|
||||
/* Customer Discount */
|
||||
const TYPE_CUSTOMER = 0;
|
||||
|
||||
/* Supplier Discount */
|
||||
const TYPE_SUPPLIER = 1;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2011,7 +2011,6 @@ class ExtraFields
|
|||
}
|
||||
|
||||
//if ($computed) $value = // $value is already calculated into $value before calling this method
|
||||
|
||||
$showsize = 0;
|
||||
if ($type == 'date') {
|
||||
$showsize = 10;
|
||||
|
|
@ -2039,9 +2038,9 @@ class ExtraFields
|
|||
} elseif ($type == 'double') {
|
||||
if (!empty($value)) {
|
||||
//$value=price($value);
|
||||
$sizeparts = explode(",", $size);
|
||||
$number_decimals = array_key_exists(1, $sizeparts) ? $sizeparts[1] : 0;
|
||||
$value = price($value, 0, $outputlangs, 0, 0, $number_decimals, '');
|
||||
//$sizeparts = explode(",", $size);
|
||||
//$number_decimals = array_key_exists(1, $sizeparts) ? $sizeparts[1] : 0;
|
||||
$value = price($value, 0, $outputlangs, 0, 0, -2, '');
|
||||
}
|
||||
} elseif ($type == 'boolean') {
|
||||
$checked = '';
|
||||
|
|
|
|||
|
|
@ -1387,7 +1387,7 @@ class FormFile
|
|||
// Show title of list of existing files
|
||||
$morehtmlright = '';
|
||||
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
|
||||
$tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click(); }';
|
||||
$tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click();}void(0);';
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $permtoeditline);
|
||||
}
|
||||
|
||||
|
|
@ -2221,7 +2221,7 @@ class FormFile
|
|||
|
||||
$morehtmlright = '';
|
||||
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open addlink form"); jQuery(".divlinkfile").toggle();', '', $permissiontoedit);
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open addlink form"); jQuery(".divlinkfile").toggle(); void(0);', '', $permissiontoedit);
|
||||
}
|
||||
|
||||
// Show list of associated links
|
||||
|
|
|
|||
|
|
@ -629,17 +629,17 @@ class Translate
|
|||
|
||||
$newstr = $key;
|
||||
$reg = array();
|
||||
if (preg_match('/^Civility([0-9A-Z]+)$/i', $key, $reg)) {
|
||||
if (preg_match('/^Civility([0-9A-Z_]+)$/i', $key, $reg)) {
|
||||
$newstr = $this->getLabelFromKey($db, $reg[1], 'c_civility', 'code', 'label');
|
||||
} elseif (preg_match('/^Currency([A-Z][A-Z][A-Z])$/i', $key, $reg)) {
|
||||
$newstr = $this->getLabelFromKey($db, $reg[1], 'c_currencies', 'code_iso', 'label');
|
||||
} elseif (preg_match('/^SendingMethod([0-9A-Z]+)$/i', $key, $reg)) {
|
||||
} elseif (preg_match('/^SendingMethod([0-9A-Z_]+)$/i', $key, $reg)) {
|
||||
$newstr = $this->getLabelFromKey($db, $reg[1], 'c_shipment_mode', 'code', 'libelle');
|
||||
} elseif (preg_match('/^PaymentType(?:Short)?([0-9A-Z]+)$/i', $key, $reg)) {
|
||||
} elseif (preg_match('/^PaymentType(?:Short)?([0-9A-Z_]+)$/i', $key, $reg)) {
|
||||
$newstr = $this->getLabelFromKey($db, $reg[1], 'c_paiement', 'code', 'libelle', '', 1);
|
||||
} elseif (preg_match('/^OppStatus([0-9A-Z]+)$/i', $key, $reg)) {
|
||||
} elseif (preg_match('/^OppStatus([0-9A-Z_]+)$/i', $key, $reg)) {
|
||||
$newstr = $this->getLabelFromKey($db, $reg[1], 'c_lead_status', 'code', 'label');
|
||||
} elseif (preg_match('/^OrderSource([0-9A-Z]+)$/i', $key, $reg)) {
|
||||
} elseif (preg_match('/^OrderSource([0-9A-Z_]+)$/i', $key, $reg)) {
|
||||
// TODO OrderSourceX must be replaced with content of table llx_c_input_reason or llx_c_input_method
|
||||
//$newstr=$this->getLabelFromKey($db,$reg[1],'llx_c_input_reason','code','label');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11733,7 +11733,7 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
|
|||
*/
|
||||
function showDirectDownloadLink($object)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
$out = '';
|
||||
$url = $object->getLastMainDocLink($object->element);
|
||||
|
|
@ -11845,6 +11845,25 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata = 0, $param
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make content of an input box selected when we click into input field.
|
||||
*
|
||||
* @param int $idcode Id of special code
|
||||
* @return string
|
||||
*/
|
||||
function getLabelSpecialCode($idcode)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$arrayspecialines = array(1 => 'Transport', 2 => 'EcoTax', 3 => 'Option');
|
||||
if ($idcode > 10) {
|
||||
return 'Module ID '.$idcode;
|
||||
}
|
||||
if (!empty($arrayspecialines[$idcode])) {
|
||||
return $langs->trans($arrayspecialines[$idcode]);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Make content of an input box selected when we click into input field.
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
global $langs, $mysoc;
|
||||
|
||||
// Translations
|
||||
$langs->loadLangs(array("main", "bills"));
|
||||
|
|
@ -359,10 +359,10 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$certprivate = empty($user->conf->CERTIFICATE_CRT_PRIVATE) ? '' : $user->conf->CERTIFICATE_CRT_PRIVATE;
|
||||
// If user has no certificate, we try to take the company one
|
||||
if (!$cert) {
|
||||
$cert = !getDolGlobalString('CERTIFICATE_CRT') ? '' : $conf->global->CERTIFICATE_CRT;
|
||||
$cert = getDolGlobalString('CERTIFICATE_CRT');
|
||||
}
|
||||
if (!$certprivate) {
|
||||
$certprivate = !getDolGlobalString('CERTIFICATE_CRT_PRIVATE') ? '' : $conf->global->CERTIFICATE_CRT_PRIVATE;
|
||||
$certprivate = getDolGlobalString('CERTIFICATE_CRT_PRIVATE');
|
||||
}
|
||||
// If a certificate is found
|
||||
if ($cert) {
|
||||
|
|
@ -1162,7 +1162,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
protected function _tableau_info(&$pdf, $object, $posy, $outputlangs, $outputlangsbis)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $mysoc, $hookmanager;
|
||||
global $mysoc, $hookmanager;
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
|
|
@ -1170,6 +1170,9 @@ class pdf_crabe extends ModelePDFFactures
|
|||
|
||||
krsort($this->tva_array);
|
||||
|
||||
// Clean data type
|
||||
$object->total_tva = (float) $object->total_tva;
|
||||
|
||||
// Show VAT details
|
||||
if ($object->total_tva != 0 && getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
|
||||
$pdf->SetFillColor(224, 224, 224);
|
||||
|
|
@ -1227,16 +1230,19 @@ class pdf_crabe extends ModelePDFFactures
|
|||
}
|
||||
}
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($object->total_tva) && (empty($mysoc->tva_assuj) || ($this->emetteur->isInEEC() && $object->thirdparty->isInEEC()))) {
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
// If France, show VAT mention if applicable
|
||||
if (in_array($this->emetteur->country_code, array('FR')) && empty($object->total_tva)) {
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
if ($mysoc->forme_juridique_code == 92) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoiceAsso"), 0, 'L', 0);
|
||||
} else {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
||||
if (empty($mysoc->tva_assuj)) {
|
||||
if ($mysoc->forme_juridique_code == 92) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoiceAsso"), 0, 'L', 0);
|
||||
} else {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
||||
}
|
||||
} elseif (getDolGlobalString("INVOICE_VAT_SHOW_REVERSE_CHARGE_MENTION") && $this->emetteur->country_code != $object->thirdparty->country_code && $this->emetteur->isInEEC() && $object->thirdparty->isInEEC()) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedReverseChargeProcedure"), 0, 'L', 0);
|
||||
}
|
||||
|
||||
$posy = $pdf->GetY() + 4;
|
||||
}
|
||||
|
||||
|
|
@ -1367,7 +1373,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') {
|
||||
// If payment mode unregulated or payment mode forced to CHQ
|
||||
if (getDolGlobalInt('FACTURE_CHQ_NUMBER')) {
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
if (getDolGlobalInt('FACTURE_CHQ_NUMBER') > 0) {
|
||||
$account = new Account($this->db);
|
||||
|
|
@ -1385,7 +1391,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$posy = $pdf->GetY() + 2;
|
||||
}
|
||||
}
|
||||
if ($conf->global->FACTURE_CHQ_NUMBER == -1) {
|
||||
if (getDolGlobalInt('FACTURE_CHQ_NUMBER') == -1) {
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetFont('', 'B', $default_font_size - $diffsizetitle);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0);
|
||||
|
|
@ -1404,7 +1410,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
// If payment mode not forced or forced to VIR, show payment with BAN
|
||||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') {
|
||||
if ($object->fk_account > 0 || $object->fk_bank > 0 || getDolGlobalInt('FACTURE_RIB_NUMBER')) {
|
||||
$bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account);
|
||||
$bankid = ($object->fk_account <= 0 ? getDolGlobalString('FACTURE_RIB_NUMBER') : $object->fk_account);
|
||||
if ($object->fk_bank > 0) {
|
||||
$bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank
|
||||
}
|
||||
|
|
@ -1828,7 +1834,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$index++;
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $conf->global->BILL_TEXT_TOTAL_FOOTER, 0, 'L', 0);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, getDolGlobalString('BILL_TEXT_TOTAL_FOOTER'), 0, 'L', 0);
|
||||
}
|
||||
|
||||
return ($tab2_top + ($tab2_hl * $index));
|
||||
|
|
@ -1877,7 +1883,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
|
||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||
|
||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
|
||||
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1329,7 +1329,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
*/
|
||||
protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs, $outputlangsbis)
|
||||
{
|
||||
global $conf, $mysoc, $hookmanager;
|
||||
global $mysoc, $hookmanager;
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
|
|
@ -1337,6 +1337,9 @@ class pdf_octopus extends ModelePDFFactures
|
|||
|
||||
krsort($this->tva_array);
|
||||
|
||||
// Clean data type
|
||||
$object->total_tva = (float) $object->total_tva;
|
||||
|
||||
// Show VAT details
|
||||
if ($object->total_tva != 0 && getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
|
||||
$pdf->SetFillColor(224, 224, 224);
|
||||
|
|
@ -1394,16 +1397,19 @@ class pdf_octopus extends ModelePDFFactures
|
|||
}
|
||||
}
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($object->total_tva) && (empty($mysoc->tva_assuj) || ($this->emetteur->isInEEC() && $object->thirdparty->isInEEC()))) {
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
// If France, show VAT mention if applicable
|
||||
if (in_array($this->emetteur->country_code, array('FR')) && empty($object->total_tva)) {
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
if ($mysoc->forme_juridique_code == 92) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoiceAsso"), 0, 'L', 0);
|
||||
} else {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
||||
if (empty($mysoc->tva_assuj)) {
|
||||
if ($mysoc->forme_juridique_code == 92) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoiceAsso"), 0, 'L', 0);
|
||||
} else {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
||||
}
|
||||
} elseif (getDolGlobalString("INVOICE_VAT_SHOW_REVERSE_CHARGE_MENTION") && $this->emetteur->country_code != $object->thirdparty->country_code && $this->emetteur->isInEEC() && $object->thirdparty->isInEEC()) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedReverseChargeProcedure"), 0, 'L', 0);
|
||||
}
|
||||
|
||||
$posy = $pdf->GetY() + 4;
|
||||
}
|
||||
|
||||
|
|
@ -1664,7 +1670,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
|
||||
|
||||
$total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ((isModEnabled('multicurrency') && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht, 0, $outputlangs), 0, 'R', 1);
|
||||
|
||||
|
|
@ -2549,7 +2555,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
*/
|
||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
global $conf, $hookmanager;
|
||||
global $hookmanager;
|
||||
|
||||
// Default field style for content
|
||||
$this->defaultContentsFieldsStyle = array(
|
||||
|
|
@ -2871,7 +2877,6 @@ class pdf_octopus extends ModelePDFFactures
|
|||
|
||||
$width = $this->page_largeur - $this->marge_gauche - $this->marge_droite - 83;
|
||||
|
||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
|
||||
//$pdf->Rect($this->posx_cumul_anterieur - 1, $tab_top, $width, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
$pdf->RoundedRect($this->posx_cumul_anterieur - 1, $tab_top, $width, 5, $this->corner_radius, '1001', 'F', explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
|
|
@ -3069,8 +3074,6 @@ class pdf_octopus extends ModelePDFFactures
|
|||
*/
|
||||
public function getDataSituation(&$object)
|
||||
{
|
||||
global $conf, $db;
|
||||
|
||||
// Fetch previous and next situations invoices.
|
||||
// Return all previous and next invoices (both standard and credit notes)
|
||||
$object->fetchPreviousNextSituationInvoice();
|
||||
|
|
@ -3233,7 +3236,6 @@ class pdf_octopus extends ModelePDFFactures
|
|||
return $object->displayRetainedWarranty();
|
||||
} else {
|
||||
// FOR RETROCOMPATIBILITY
|
||||
global $conf;
|
||||
|
||||
// TODO : add a flag on invoices to store this conf USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL
|
||||
|
||||
|
|
@ -3365,7 +3367,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
*/
|
||||
public function btpGetInvoiceAmounts($id, $forceReadFromDB = false)
|
||||
{
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||
global $user, $langs, $mysoc, $db, $hookmanager, $nblignes;
|
||||
|
||||
$object = new Facture($db);
|
||||
$object->fetch($id);
|
||||
|
|
@ -3517,7 +3519,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (count($propals)) {
|
||||
$propal = array_pop($propals);
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $propal->multicurrency_tx != 1) ? $propal->multicurrency_total_ht : $propal->total_ht;
|
||||
$total_ht = (isModEnabled('multicurrency') && $propal->multicurrency_tx != 1) ? $propal->multicurrency_total_ht : $propal->total_ht;
|
||||
$remain_to_pay = $total_ht;
|
||||
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
|
|
@ -3540,7 +3542,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
} elseif (count($orders)) {
|
||||
$order = array_pop($orders);
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $order->multicurrency_tx != 1 ? $order->multicurrency_total_ht : $order->total_ht);
|
||||
$total_ht = (isModEnabled('multicurrency') && $order->multicurrency_tx != 1 ? $order->multicurrency_total_ht : $order->total_ht);
|
||||
$remain_to_pay = $total_ht;
|
||||
}
|
||||
|
||||
|
|
@ -3608,7 +3610,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->MultiCell($width, $height, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $invoice->multicurrency_tx != 1 ? $invoice->multicurrency_total_ht : $invoice->total_ht);
|
||||
$total_ht = (isModEnabled('multicurrency') && $invoice->multicurrency_tx != 1 ? $invoice->multicurrency_total_ht : $invoice->total_ht);
|
||||
|
||||
$pdf->SetXY($posx + $width, $posy);
|
||||
$pdf->MultiCell($width2, $height, price($sign * ($total_ht + (!empty($invoice->remise) ? $invoice->remise : 0)), 0, $outputlangs), 0, 'R', 1);
|
||||
|
|
@ -3651,8 +3653,8 @@ class pdf_octopus extends ModelePDFFactures
|
|||
|
||||
$index++;
|
||||
|
||||
$total_ht = ($conf->multicurrency->enabled && $invoice->multicurrency_tx != 1) ? $invoice->multicurrency_total_ht : $invoice->total_ht;
|
||||
$total_ttc = ($conf->multicurrency->enabled && $invoice->multicurrency_tx != 1) ? $invoice->multicurrency_total_ttc : $invoice->total_ttc;
|
||||
$total_ht = (isModEnabled('multicurrency') && $invoice->multicurrency_tx != 1) ? $invoice->multicurrency_total_ht : $invoice->total_ht;
|
||||
$total_ttc = (isModEnabled('multicurrency') && $invoice->multicurrency_tx != 1) ? $invoice->multicurrency_total_ttc : $invoice->total_ttc;
|
||||
|
||||
// Total TTC
|
||||
$pdf->SetXY($posx, $posy + $height * $index);
|
||||
|
|
|
|||
|
|
@ -1268,6 +1268,9 @@ class pdf_sponge extends ModelePDFFactures
|
|||
|
||||
krsort($this->tva_array);
|
||||
|
||||
// Clean data type
|
||||
$object->total_tva = (float) $object->total_tva;
|
||||
|
||||
// Show VAT details
|
||||
if ($object->total_tva != 0 && getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
|
||||
$pdf->SetFillColor(224, 224, 224);
|
||||
|
|
@ -1325,16 +1328,19 @@ class pdf_sponge extends ModelePDFFactures
|
|||
}
|
||||
}
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($object->total_tva) && (empty($mysoc->tva_assuj) || ($this->emetteur->isInEEC() && $object->thirdparty->isInEEC()))) {
|
||||
// If France, show VAT mention if applicable
|
||||
if (in_array($this->emetteur->country_code, array('FR')) && empty($object->total_tva)) {
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
if ($mysoc->forme_juridique_code == 92) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoiceAsso"), 0, 'L', 0);
|
||||
} else {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
||||
if (empty($mysoc->tva_assuj)) {
|
||||
if ($mysoc->forme_juridique_code == 92) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoiceAsso"), 0, 'L', 0);
|
||||
} else {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
||||
}
|
||||
} elseif (getDolGlobalString("INVOICE_VAT_SHOW_REVERSE_CHARGE_MENTION") && $this->emetteur->country_code != $object->thirdparty->country_code && $this->emetteur->isInEEC() && $object->thirdparty->isInEEC()) {
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedReverseChargeProcedure"), 0, 'L', 0);
|
||||
}
|
||||
|
||||
$posy = $pdf->GetY() + 4;
|
||||
}
|
||||
|
||||
|
|
@ -1468,7 +1474,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') {
|
||||
// If payment mode unregulated or payment mode forced to CHQ
|
||||
if (getDolGlobalInt('FACTURE_CHQ_NUMBER')) {
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
if (getDolGlobalInt('FACTURE_CHQ_NUMBER') > 0) {
|
||||
$account = new Account($this->db);
|
||||
|
|
@ -1486,7 +1492,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
$posy = $pdf->GetY() + 2;
|
||||
}
|
||||
}
|
||||
if ($conf->global->FACTURE_CHQ_NUMBER == -1) {
|
||||
if (getDolGlobalInt('FACTURE_CHQ_NUMBER') == -1) {
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetFont('', 'B', $default_font_size - $diffsizetitle);
|
||||
$pdf->MultiCell($posxend - $this->marge_gauche, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0);
|
||||
|
|
@ -1570,7 +1576,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
*/
|
||||
protected function drawTotalTable(&$pdf, $object, $deja_regle, $posy, $outputlangs, $outputlangsbis)
|
||||
{
|
||||
global $conf, $mysoc, $hookmanager;
|
||||
global $mysoc, $hookmanager;
|
||||
|
||||
$sign = 1;
|
||||
if ($object->type == 2 && getDolGlobalString('INVOICE_POSITIVE_CREDIT_NOTE')) {
|
||||
|
|
|
|||
|
|
@ -400,4 +400,37 @@ class modAccounting extends DolibarrModules
|
|||
'b.multicurrency_code'=>"US (Necessary if devise is different than EUR)",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is enabled.
|
||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||
* It also creates data directories
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
$result = $this->_load_tables('/install/mysql/', 'accounting');
|
||||
if ($result < 0) {
|
||||
return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default')
|
||||
}
|
||||
|
||||
$sql = array();
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is disabled.
|
||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||
* Data directories are not deleted
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function remove($options = '')
|
||||
{
|
||||
$sql = array();
|
||||
return $this->_remove($sql, $options);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class modStock extends DolibarrModules
|
|||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs; // $conf is used by inc.php
|
||||
|
||||
$this->db = $db;
|
||||
$this->numero = 52;
|
||||
|
|
@ -156,6 +156,17 @@ class modStock extends DolibarrModules
|
|||
$this->rights[$r][4] = 'mouvement';
|
||||
$this->rights[$r][5] = 'creer';
|
||||
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
// Not yet implemented. TODO
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1008;
|
||||
$this->rights[$r][1] = 'Read stock value';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'value_advance';
|
||||
$this->rights[$r][5] = 'read';
|
||||
}
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1011;
|
||||
$this->rights[$r][1] = 'inventoryReadPermission'; // Permission label
|
||||
|
|
|
|||
|
|
@ -23,6 +23,46 @@
|
|||
*/
|
||||
'@phan-var-force array{nbfield:int,type?:array<int,string>,pos?:array<int,int>,val?:array<int,float>} $totalarray';
|
||||
|
||||
if (!function_exists('printTotalValCell')) { // allow two list with total on same screen
|
||||
|
||||
/** print a total cell value according to its type
|
||||
*
|
||||
* @param string $type of field (duration, string..)
|
||||
* @param string $val the value to display
|
||||
*
|
||||
* @return void (direct print)
|
||||
*/
|
||||
function printTotalValCell($type, $val)
|
||||
{
|
||||
// if $totalarray['type'] not present we consider it as number
|
||||
if (empty($type)) {
|
||||
$type = 'real';
|
||||
}
|
||||
switch ($type) {
|
||||
case 'duration':
|
||||
print '<td class="right">';
|
||||
print(!empty($val) ? convertSecondToTime((int) $val, 'allhourmin') : 0);
|
||||
print '</td>';
|
||||
break;
|
||||
case 'string': // This type is no more used. type is now varchar(x)
|
||||
print '<td class="left">';
|
||||
print(!empty($val) ? $val : '');
|
||||
print '</td>';
|
||||
break;
|
||||
case 'stock':
|
||||
print '<td class="right">';
|
||||
print price2num(!empty($val) ? $val : 0, 'MS');
|
||||
print '</td>';
|
||||
break;
|
||||
default:
|
||||
print '<td class="right">';
|
||||
print price(!empty($val) ? $val : 0);
|
||||
print '</td>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Move fields of totalizable into the common array pos and val
|
||||
if (!empty($totalarray['totalizable']) && is_array($totalarray['totalizable'])) {
|
||||
foreach ($totalarray['totalizable'] as $keytotalizable => $valtotalizable) {
|
||||
|
|
@ -107,40 +147,3 @@ if (isset($totalarray['pos'])) {
|
|||
}
|
||||
//print '</tfoot>';
|
||||
}
|
||||
|
||||
/** print a total cell value according to its type
|
||||
*
|
||||
* @param string $type of field (duration, string..)
|
||||
* @param string $val the value to display
|
||||
*
|
||||
* @return void (direct print)
|
||||
*/
|
||||
function printTotalValCell($type, $val)
|
||||
{
|
||||
// if $totalarray['type'] not present we consider it as number
|
||||
if (empty($type)) {
|
||||
$type = 'real';
|
||||
}
|
||||
switch ($type) {
|
||||
case 'duration':
|
||||
print '<td class="right">';
|
||||
print(!empty($val) ? convertSecondToTime((int) $val, 'allhourmin') : 0);
|
||||
print '</td>';
|
||||
break;
|
||||
case 'string': // This type is no more used. type is now varchar(x)
|
||||
print '<td class="left">';
|
||||
print(!empty($val) ? $val : '');
|
||||
print '</td>';
|
||||
break;
|
||||
case 'stock':
|
||||
print '<td class="right">';
|
||||
print price2num(!empty($val) ? $val : 0, 'MS');
|
||||
print '</td>';
|
||||
break;
|
||||
default:
|
||||
print '<td class="right">';
|
||||
print price(!empty($val) ? $val : 0);
|
||||
print '</td>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,8 +312,8 @@ $tooltiponpricemultiprice = '';
|
|||
$tooltiponpriceend = '';
|
||||
$tooltiponpriceendmultiprice = '';
|
||||
if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
|
||||
$tooltiponprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht, 0, '', 0, 0);
|
||||
$tooltiponpricemultiprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->multicurrency_total_ht, 0, '', 0, 0);
|
||||
$tooltiponprice .= $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht, 0, '', 0, 0);
|
||||
$tooltiponpricemultiprice .= $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->multicurrency_total_ht, 0, '', 0, 0);
|
||||
$tooltiponprice .= '<br>'.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_tva, 0, '', 0, 0);
|
||||
$tooltiponpricemultiprice .= '<br>'.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->multicurrency_total_tva, 0, '', 0, 0);
|
||||
if (is_object($object->thirdparty)) {
|
||||
|
|
@ -347,6 +347,19 @@ if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
|
|||
$tooltiponprice .= '<br>'.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->total_ttc, 0, '', 0, 0);
|
||||
$tooltiponpricemultiprice .= '<br>'.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->multicurrency_total_ttc, 0, '', 0, 0);
|
||||
|
||||
if (!empty($line->special_code) || $line->product_type == 9) {
|
||||
$tooltiponprice .= '<br>';
|
||||
$tooltiponpricemultiprice .= '<br>';
|
||||
if (!empty($line->special_code)) {
|
||||
$tooltiponprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialCode($line->special_code);
|
||||
$tooltiponpricemultiprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialCode($line->special_code);
|
||||
}
|
||||
if ($line->product_type == 9) {
|
||||
$tooltiponprice .= '<br>'.$langs->trans("SpecialLine").' : '.$langs->trans("GroupingLine");
|
||||
$tooltiponpricemultiprice .= '<br>'.$langs->trans("SpecialLine").' : '.$langs->trans("GroupingLine");
|
||||
}
|
||||
}
|
||||
|
||||
$tooltiponprice = '<span class="classfortooltip" title="'.dol_escape_htmltag($tooltiponprice).'">';
|
||||
$tooltiponpricemultiprice = '<span class="classfortooltip" title="'.dol_escape_htmltag($tooltiponpricemultiprice).'">';
|
||||
|
||||
|
|
|
|||
|
|
@ -1223,7 +1223,7 @@ class Cronjob extends CommonObject
|
|||
dol_syslog(get_class($this)."::run_jobs jobtype=".$this->jobtype." userlogin=".$userlogin, LOG_DEBUG);
|
||||
|
||||
// Increase limit of time. Works only if we are not in safe mode
|
||||
$ExecTimeLimit = 600;
|
||||
$ExecTimeLimit = getDolGlobalInt('MAIN_CRON_EXEC_TIME_LIMIT', 600);
|
||||
if (!empty($ExecTimeLimit)) {
|
||||
$err = error_reporting();
|
||||
error_reporting(0); // Disable all errors
|
||||
|
|
@ -1231,7 +1231,7 @@ class Cronjob extends CommonObject
|
|||
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
|
||||
error_reporting($err);
|
||||
}
|
||||
$MemoryLimit = 0;
|
||||
$MemoryLimit = getDolGlobalString('MAIN_CRON_MEMORY_LIMIT');
|
||||
if (!empty($MemoryLimit)) {
|
||||
@ini_set('memory_limit', $MemoryLimit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ if (!empty($withproject)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('project', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ if (!empty($withproject)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('project', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ if (!empty($withproject)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('project', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ if ($projectid > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('project', 'all', 'lire')) {
|
||||
$objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$project->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$project->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($project, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ if (!empty($withproject)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -385,3 +385,8 @@ ALTER TABLE llx_facture_rec ADD COLUMN fk_societe_rib integer DEFAULT NULL;
|
|||
|
||||
ALTER TABLE llx_facture ADD COLUMN is_also_delivery_note tinyint DEFAULT 0 NOT NULL;
|
||||
ALTER TABLE llx_user MODIFY COLUMN signature LONGTEXT;
|
||||
|
||||
-- Add entity field
|
||||
ALTER TABLE llx_societe_rib DROP INDEX uk_societe_rib;
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid;
|
||||
ALTER TABLE llx_societe_rib ADD UNIQUE INDEX uk_societe_rib(entity, label, fk_soc);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
-- ===================================================================
|
||||
-- Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2024 Regis Houssin <regis.houssin@inodbox.com>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -17,6 +18,6 @@
|
|||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_societe_rib ADD UNIQUE INDEX uk_societe_rib(label, fk_soc);
|
||||
ALTER TABLE llx_societe_rib ADD UNIQUE INDEX uk_societe_rib(entity, label, fk_soc);
|
||||
|
||||
ALTER TABLE llx_societe_rib ADD CONSTRAINT llx_societe_rib_fk_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
-- =============================================================================
|
||||
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
-- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
-- Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
|
||||
-- Copyright (C) 2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005-2024 Regis Houssin <regis.houssin@inodbox.com>
|
||||
-- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
-- Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
|
||||
-- Copyright (C) 2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -23,72 +23,73 @@
|
|||
|
||||
create table llx_societe_rib
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
type varchar(32) DEFAULT 'ban' NOT NULL, -- 'ban' or 'paypal' or 'card' or 'stripe'
|
||||
label varchar(200),
|
||||
fk_soc integer NOT NULL,
|
||||
datec datetime,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
type varchar(32) DEFAULT 'ban' NOT NULL, -- 'ban' or 'paypal' or 'card' or 'stripe'
|
||||
label varchar(200),
|
||||
fk_soc integer NOT NULL,
|
||||
datec datetime,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
|
||||
-- For BAN
|
||||
bank varchar(255), -- bank name
|
||||
code_banque varchar(128), -- bank code
|
||||
code_guichet varchar(6), -- desk code
|
||||
number varchar(255), -- account number
|
||||
cle_rib varchar(5), -- key of bank account
|
||||
bank varchar(255), -- bank name
|
||||
code_banque varchar(128), -- bank code
|
||||
code_guichet varchar(6), -- desk code
|
||||
number varchar(255), -- account number
|
||||
cle_rib varchar(5), -- key of bank account
|
||||
|
||||
bic varchar(20), -- 11 according to ISO 9362 (we keep 20 for backward compatibility)
|
||||
bic_intermediate varchar(11), -- 11 according to ISO 9362. Same as bic but for intermediate bank
|
||||
iban_prefix varchar(80), -- full iban. 34 according to ISO 13616 but we set 80 to allow to store it with encryption information
|
||||
bic varchar(20), -- 11 according to ISO 9362 (we keep 20 for backward compatibility)
|
||||
bic_intermediate varchar(11), -- 11 according to ISO 9362. Same as bic but for intermediate bank
|
||||
iban_prefix varchar(80), -- full iban. 34 according to ISO 13616 but we set 80 to allow to store it with encryption information
|
||||
|
||||
domiciliation varchar(255),
|
||||
proprio varchar(60),
|
||||
owner_address varchar(255),
|
||||
default_rib smallint NOT NULL DEFAULT 0,
|
||||
state_id integer,
|
||||
fk_country integer,
|
||||
currency_code varchar(3),
|
||||
domiciliation varchar(255),
|
||||
proprio varchar(60),
|
||||
owner_address varchar(255),
|
||||
default_rib smallint NOT NULL DEFAULT 0,
|
||||
state_id integer,
|
||||
fk_country integer,
|
||||
currency_code varchar(3),
|
||||
|
||||
model_pdf varchar(255), -- last template used to generate main document
|
||||
last_main_doc varchar(255), -- relative filepath+filename of last main generated document
|
||||
model_pdf varchar(255), -- last template used to generate main document
|
||||
last_main_doc varchar(255), -- relative filepath+filename of last main generated document
|
||||
|
||||
-- For BAN direct debit feature
|
||||
rum varchar(32), -- RUM value to use for SEPA generation
|
||||
date_rum date, -- Date of mandate
|
||||
frstrecur varchar(16) DEFAULT 'FRST', -- 'FRST' or 'RECUR'
|
||||
rum varchar(32), -- RUM value to use for SEPA generation
|
||||
date_rum date, -- Date of mandate
|
||||
frstrecur varchar(16) DEFAULT 'FRST', -- 'FRST' or 'RECUR'
|
||||
|
||||
-- For credit card
|
||||
last_four varchar(4), -- last 4
|
||||
card_type varchar(255), -- card type 'VISA', 'MC' , ...
|
||||
cvn varchar(255),
|
||||
exp_date_month integer,
|
||||
exp_date_year integer,
|
||||
country_code varchar(10),
|
||||
last_four varchar(4), -- last 4
|
||||
card_type varchar(255), -- card type 'VISA', 'MC' , ...
|
||||
cvn varchar(255),
|
||||
exp_date_month integer,
|
||||
exp_date_year integer,
|
||||
country_code varchar(10),
|
||||
|
||||
-- For Paypal
|
||||
approved integer DEFAULT 0,
|
||||
email varchar(255),
|
||||
ending_date date,
|
||||
max_total_amount_of_all_payments double(24,8),
|
||||
preapproval_key varchar(255),
|
||||
starting_date date,
|
||||
total_amount_of_all_payments double(24,8),
|
||||
approved integer DEFAULT 0,
|
||||
email varchar(255),
|
||||
ending_date date,
|
||||
max_total_amount_of_all_payments double(24,8),
|
||||
preapproval_key varchar(255),
|
||||
starting_date date,
|
||||
total_amount_of_all_payments double(24,8),
|
||||
|
||||
--For Stripe, Stancer, ...
|
||||
stripe_card_ref varchar(128), -- card_...'
|
||||
stripe_account varchar(128), -- 'pk_live_...'
|
||||
stripe_card_ref varchar(128), -- card_...'
|
||||
stripe_account varchar(128), -- 'pk_live_...'
|
||||
|
||||
ext_payment_site varchar(128), -- name of external paymentmode (for example 'StripeLive')
|
||||
ext_payment_site varchar(128), -- name of external paymentmode (for example 'StripeLive')
|
||||
|
||||
extraparams varchar(255), -- for other parameters with json format
|
||||
extraparams varchar(255), -- for other parameters with json format
|
||||
|
||||
-- For Online Sign
|
||||
date_signature datetime,
|
||||
online_sign_ip varchar(48),
|
||||
online_sign_name varchar(64),
|
||||
date_signature datetime,
|
||||
online_sign_ip varchar(48),
|
||||
online_sign_name varchar(64),
|
||||
|
||||
comment varchar(255),
|
||||
ipaddress varchar(68),
|
||||
status integer NOT NULL DEFAULT 1, -- 1=ACTIVE, 0=IN_TRASH
|
||||
import_key varchar(14) -- import key
|
||||
comment varchar(255),
|
||||
ipaddress varchar(68),
|
||||
status integer NOT NULL DEFAULT 1, -- 1=ACTIVE, 0=IN_TRASH
|
||||
import_key varchar(14) -- import key
|
||||
)ENGINE=innodb;
|
||||
|
|
|
|||
|
|
@ -2144,10 +2144,10 @@ MAIN_PDF_NO_RECIPENT_FRAME=Hide borders on recipient address frame
|
|||
MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code
|
||||
MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE=Hide customer accounting code
|
||||
MAIN_PDF_HIDE_SENDER_NAME=Hide sender/company name in address block
|
||||
TERMSOFSALE=Conditions de vente
|
||||
MAIN_PDF_ADD_TERMSOFSALE_PROPAL=Add the conditions of sale after the proposal
|
||||
MAIN_PDF_ADD_TERMSOFSALE_ORDER=Add the conditions of sale after the order
|
||||
MAIN_PDF_ADD_TERMSOFSALE_INVOICE=Add the conditions of sale after the invoice
|
||||
TERMSOFSALE=Terms and conditions of sale
|
||||
MAIN_PDF_ADD_TERMSOFSALE_PROPAL=Add the terms and conditions of sale after the proposal
|
||||
MAIN_PDF_ADD_TERMSOFSALE_ORDER=Add the terms and conditions of sale after the order
|
||||
MAIN_PDF_ADD_TERMSOFSALE_INVOICE=Add the terms and conditions of sale after the invoice
|
||||
PROPOSAL_PDF_HIDE_PAYMENTTERM=Hide payments conditions
|
||||
PROPOSAL_PDF_HIDE_PAYMENTMODE=Hide payment mode
|
||||
MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add a hidden markup into the signature area to allow electronic signature tool to reuse it. May be used by external tools or in the future by the online signature feature.
|
||||
|
|
@ -2582,7 +2582,7 @@ DolibarrStandardCaptcha=A native captcha generated by Dolibarr
|
|||
SALES_ORDER_SHOW_SHIPPING_ADDRESS=Show shipping address
|
||||
SALES_ORDER_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...)
|
||||
PDF_INVOICE_SHOW_VAT_ANALYSIS=Show vat analysis per rate
|
||||
MaxNbOfRecordOnListIsOk=You have a max size for lists is set to <b>%s</b> lines. This is a good value.
|
||||
MaxNbOfRecordOnListIsOk=You have a max size for lists set to <b>%s</b> lines. This is a good value.
|
||||
YouHaveALargeAmountOfRecordOnLists=You have a default max size for lists set to <b>%s</b> lines. This is a large value that need scrolling to see all answers. It is better to have a value lower than <b>%s</b> and use pagination to see record over this number. Change this in menu Home - Setup - Display.
|
||||
RoundBorders=Round borders
|
||||
CheckIfModuleIsNotBlackListed=Block install for modules found into the <b>Remote blacklist</b>
|
||||
|
|
@ -2593,7 +2593,7 @@ SensitiveData=Sensitive data
|
|||
ToolToDecryptAString=Tool to decrypt a string
|
||||
Decrypt=Decrypt
|
||||
FilesIntegrityDesc=If you want to check the integrity of files instead of database, you can do it by using <a href="%s">this tool</a>.
|
||||
AttributeCodeHelp=A code of your choice (without special char and space) to identify the property.<br>Note that if an object B is created from an existing object A that has a different type (for example creation of an invoice from an order), the value of the complementary attributes of A are also copied into the complementary attributes of B when the code of the attribute is the same.
|
||||
AttributeCodeHelp=A code of your choice (without special chars and spaces) to identify the property.<br>Note that if an object B is created from an existing object A that has a different type (for example creation of an invoice from an order), the value of the complementary attributes of A are also copied into the complementary attributes of B when the code of the attribute is the same.
|
||||
ThereIsMoreThanXAnswers=There is more than %s answers with your filter. Please add more filters...
|
||||
PdfAddTermOfSaleHelp=Upload the condition of sales from file input at the bottom of this setup page
|
||||
WarningOnlineSignature=Please note that this function allows a person (customer, supplier...) to insert, online, the image of his signature in the PDF document. As for a handwritten signature, such a signature can be made by anyone and does not have the same legal value as a legal electronic signature system going through a paying trusted third party. If you need this level of security, you can contact an integrator for more information or check for addons on www.dolistore.org.
|
||||
PdfAddTermOfSaleHelp=You can upload the terms and conditions of sale file at the bottom of this setup page
|
||||
WarningOnlineSignature=Please note that this function allows a person (customer, supplier...) to insert, online, the image of his signature in the PDF document. As for a handwritten signature, such a signature can be made by anyone and might not have the same legal value as a legal electronic signature system going through an authorized trusted third party. If you need this level of security, you can contact an integrator for more information or check for addons on www.dolistore.org.
|
||||
|
|
|
|||
|
|
@ -523,6 +523,7 @@ SendTo=sent to
|
|||
PaymentByTransferOnThisBankAccount=Payment by transfer to the following bank account
|
||||
VATIsNotUsedForInvoice=* Non applicable VAT art-293B of CGI
|
||||
VATIsNotUsedForInvoiceAsso=* Non applicable VAT art-261-7 of CGI
|
||||
VATIsNotUsedReverseChargeProcedure=* Non applicable VAT art-259-1 of CGI
|
||||
LawApplicationPart1=By application of the law 80.335 of 12/05/80
|
||||
LawApplicationPart2=the goods remain the property of
|
||||
LawApplicationPart3=the seller until full payment of
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ BrowseBlockedLog=Unalterable logs
|
|||
ShowAllFingerPrintsMightBeTooLong=Show all archived logs (might be long)
|
||||
ShowAllFingerPrintsErrorsMightBeTooLong=Show all non-valid archive logs (might be long)
|
||||
DownloadBlockChain=Download fingerprints
|
||||
KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, or has erased the previous archived record (check that line with previous # exists) or has modified checksum of the previous record.
|
||||
KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, OR has erased the previous archived record (check that the line with previous # exists) OR has modified the checksum of the previous record.
|
||||
OkCheckFingerprintValidity=Archived log record is valid. The data on this line was not modified and the entry follows the previous one.
|
||||
OkCheckFingerprintValidityButChainIsKo=Archived log seems valid compared to previous one but the chain was corrupted previously.
|
||||
AddedByAuthority=Stored into remote authority
|
||||
|
|
@ -18,9 +18,9 @@ BlockedlogInfoDialog=Log Details
|
|||
ListOfTrackedEvents=List of tracked events
|
||||
Fingerprint=Fingerprint
|
||||
DownloadLogCSV=Export archived logs (CSV)
|
||||
DataOfArchivedEvent=Full data of archived event
|
||||
DataOfArchivedEventHelp=This field contains the unalterable and structured data that was archived on real time. Even if some parent business event could have been purged or modified, the data archived here is the original data, and it can't be modified.
|
||||
DataOfArchivedEventHelp2=Its integrity is guaranteed if the status of the line is OK
|
||||
DataOfArchivedEvent=Complementary data of archived event
|
||||
DataOfArchivedEventHelp=This field contains the complementary data that was archived on real time. Even if some parent business event could have been purged or modified, the data archived here is the original data, and it can't be modified.
|
||||
DataOfArchivedEventHelp2=The integrity of data on each lines is guaranteed if the status of the line is OK
|
||||
ImpossibleToReloadObject=Original object (type %s, id %s) not linked (see 'Full datas' column to get unalterable saved data)
|
||||
BlockedLogAreRequiredByYourCountryLegislation=Unalterable Logs module may be required by the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they can not be validated by a tax audit.
|
||||
BlockedLogActivatedBecauseRequiredByYourCountryLegislation=Unalterable Logs module was activated because of the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they cannot be validated by a tax audit.
|
||||
|
|
|
|||
|
|
@ -344,8 +344,8 @@ ErrorStartHourIsNull=Start date field cannot be empty
|
|||
ErrorTooManyLinesToProcessPleaseUseAMoreSelectiveFilter=Too many lines to process. Please use a more selective filter.
|
||||
ErrorEmptyValueForQty=Quantity cannot be zero.
|
||||
ErrorNoCloneWithoutName=The new user must have a name
|
||||
ErrorNoCloneWithoutEmail=The new user must have a email
|
||||
ErrorUserClone=Error when clone categories user
|
||||
ErrorNoCloneWithoutEmail=The new user must have an email
|
||||
ErrorUserClone=Error in user clone categories
|
||||
ErrorQtyOrderedLessQtyShipped = The quantity ordered cannot be less than the quantity shipped.
|
||||
ErrorVariousPaymentOnBankAccountWithADifferentCurrencyNotYetSupported=Error, creating a various payment on a bank account with a currency different than the currency of the company is not yet supported.
|
||||
ErrorStreamMustBeEnabled=The PHP stream %s is not available. Check your PHP modules and Dolibarr parameter $dolibarr_main_stream_to_disable.
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ NewMailing=New mass Email
|
|||
NewSMSing=New smsing
|
||||
EditMailing=Edit mass Email
|
||||
ResetMailing=Resend mass Email
|
||||
ConfirmResetMailingTargetMassaction=Confirmation of the reset of targets statusin error
|
||||
ConfirmResetMailingTargetMassaction=Confirmation of the reset of targets status in error
|
||||
ResetMailingTargetMassaction=Reset status in error
|
||||
DeleteMailing=Delete mass Email
|
||||
PreviewMailing=Preview mass Email
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ ActionRunningNotStarted=To start
|
|||
ActionRunningShort=In progress
|
||||
ActionDoneShort=Finished
|
||||
ActionUncomplete=Incomplete
|
||||
LatestLinkedEvents=Latest %s linked events
|
||||
LatestLinkedEvents=The last %s events
|
||||
CompanyFoundation=Company/Organization
|
||||
Accountant=Accountant
|
||||
ContactsForCompany=Contacts for this third party
|
||||
|
|
@ -1341,3 +1341,6 @@ Operator=Operator
|
|||
AllFieldsRequired=All fields are required.
|
||||
IsDefined=Is defined
|
||||
IsNotDefined=Is not defined
|
||||
SpecialLine=Special Line
|
||||
EcoTax=Eco-Tax
|
||||
GroupingLine=Grouping line
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ ActionRunningNotStarted=A réaliser
|
|||
ActionRunningShort=En cours
|
||||
ActionDoneShort=Terminé
|
||||
ActionUncomplete=Incomplet
|
||||
LatestLinkedEvents=Les %s derniers événements liés
|
||||
LatestLinkedEvents=Les %s derniers événements
|
||||
CompanyFoundation=Société/Organisation
|
||||
Accountant=Comptable
|
||||
ContactsForCompany=Contacts de ce tiers
|
||||
|
|
|
|||
|
|
@ -343,8 +343,14 @@ foreach ($search as $key => $val) {
|
|||
}
|
||||
$mode_search = 2;
|
||||
}
|
||||
if ($search[$key] != '') {
|
||||
$sql .= natural_search("t.".$db->sanitize($key), $search[$key], (($key == 'status') ? 2 : $mode_search));
|
||||
if (empty($object->fields[$key]['searchmulti'])) {
|
||||
if (!is_array($search[$key]) && $search[$key] != '') {
|
||||
$sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search));
|
||||
}
|
||||
} else {
|
||||
if (is_array($search[$key]) && !empty($search[$key])) {
|
||||
$sql .= natural_search("t.".$db->escape($key), implode(',', $search[$key]), (($key == 'status') ? 2 : $mode_search));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
|
||||
|
|
@ -632,7 +638,11 @@ foreach ($object->fields as $key => $val) {
|
|||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').($key == 'status' ? ' parentonrightofpage' : '').'">';
|
||||
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
|
||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), 1, 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status width100 onrightofpage' : ''), 1);
|
||||
if (empty($val['searchmulti'])) {
|
||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), 1, 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status width100 onrightofpage' : ''), 1);
|
||||
} else {
|
||||
print $form->multiselectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), 0, 0, 'maxwidth100'.($key == 'status' ? ' search_status width100 onrightofpage' : ''), 1);
|
||||
}
|
||||
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
|
||||
print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1);
|
||||
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ if (isModEnabled("bank")) {
|
|||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("CSSUrlForPaymentForm").'</td><td>';
|
||||
print '<input size="64" type="text" name="ONLINE_PAYMENT_CSS_URL" value="'.getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': http://mysite/mycss.css</span>';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': https://mysite/mycss.css</span>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
|
@ -374,17 +374,19 @@ print 'Your API authentication information can be found with following steps. We
|
|||
print '</div>';
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n".'<script type="text/javascript">';
|
||||
print '$(document).ready(function () {
|
||||
$("#apidoc").hide();
|
||||
$("#apidoca").click(function() {
|
||||
console.log("We click on apidoca so we show/hide");
|
||||
$("#apidoc").show();
|
||||
$("#apidoca").hide();
|
||||
return false;
|
||||
})
|
||||
});';
|
||||
print '</script>';
|
||||
print '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#apidoc").hide();
|
||||
$("#apidoca").click(function() {
|
||||
console.log("We click on apidoca so we show/hide");
|
||||
$("#apidoc").show();
|
||||
$("#apidoca").hide();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
';
|
||||
}
|
||||
|
||||
print '<br><br>';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -467,22 +468,10 @@ function hash_call($methodName, $nvpStr)
|
|||
}
|
||||
|
||||
// Clean parameters
|
||||
$PAYPAL_API_USER = "";
|
||||
if (getDolGlobalString('PAYPAL_API_USER')) {
|
||||
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
|
||||
}
|
||||
$PAYPAL_API_PASSWORD = "";
|
||||
if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
|
||||
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
|
||||
}
|
||||
$PAYPAL_API_SIGNATURE = "";
|
||||
if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
|
||||
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
|
||||
}
|
||||
$PAYPAL_API_SANDBOX = "";
|
||||
if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
|
||||
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
|
||||
}
|
||||
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
|
||||
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
|
||||
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
|
||||
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
|
||||
// TODO END problem with triggers
|
||||
|
||||
dol_syslog("Paypal API endpoint ".$API_Endpoint);
|
||||
|
|
@ -514,8 +503,8 @@ function hash_call($methodName, $nvpStr)
|
|||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, ($ssl_verifypeer ? true : false));
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, ($ssl_verifypeer ? true : false));
|
||||
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, !getDolGlobalString('MAIN_USE_CONNECT_TIMEOUT') ? 5 : $conf->global->MAIN_USE_CONNECT_TIMEOUT);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, !getDolGlobalString('MAIN_USE_RESPONSE_TIMEOUT') ? 30 : $conf->global->MAIN_USE_RESPONSE_TIMEOUT);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, getDolGlobalInt('MAIN_USE_CONNECT_TIMEOUT', 5));
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, getDolGlobalInt('MAIN_USE_RESPONSE_TIMEOUT', 30));
|
||||
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -57,22 +58,10 @@ if (getDolGlobalString('PAYPAL_API_SANDBOX') || GETPOST('forcesandbox', 'alpha')
|
|||
}
|
||||
|
||||
// Clean parameters
|
||||
$PAYPAL_API_USER = "";
|
||||
if (getDolGlobalString('PAYPAL_API_USER')) {
|
||||
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
|
||||
}
|
||||
$PAYPAL_API_PASSWORD = "";
|
||||
if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
|
||||
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
|
||||
}
|
||||
$PAYPAL_API_SIGNATURE = "";
|
||||
if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
|
||||
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
|
||||
}
|
||||
$PAYPAL_API_SANDBOX = "";
|
||||
if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
|
||||
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
|
||||
}
|
||||
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
|
||||
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
|
||||
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
|
||||
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
|
||||
|
||||
// Proxy
|
||||
$PROXY_HOST = getDolGlobalString('MAIN_PROXY_HOST');
|
||||
|
|
|
|||
|
|
@ -646,10 +646,30 @@ class Product extends CommonObject
|
|||
* @var array{}|array{customers_toconsume:int,nb_toconsume:int,qty_toconsume:float,customers_consumed:int,nb_consumed:int,qty_consumed:float,customers_toproduce:int,nb_toproduce:int,qty_toproduce:float,customers_produced:int,nb_produced:int,qty_produced:float} stats by role toconsume, consumed, toproduce, produced
|
||||
*/
|
||||
public $stats_mo = array();
|
||||
|
||||
/**
|
||||
* @var array{}|array{nb_toproduce:int,nb_toconsume:int,qty_toproduce:float,qty_toconsume:float}
|
||||
*/
|
||||
public $stats_bom = array();
|
||||
|
||||
/**
|
||||
* @var array{}|array{customers:int,nb:int,rows:int,qty:float} stats mrp to consume
|
||||
*/
|
||||
public $stats_mrptoconsume = array();
|
||||
|
||||
/**
|
||||
* @var array{}|array{customers:int,nb:int,rows:int,qty:float} stats mrp to produce
|
||||
*/
|
||||
public $stats_mrptoproduce = array();
|
||||
|
||||
/**
|
||||
* @var array{}|array{customers:int,nb:int,rows:int,qty:float} stats facture rec
|
||||
*/
|
||||
public $stats_facturerec = array();
|
||||
|
||||
/**
|
||||
* @var array{}|array{suppliers:int,nb:int,rows:int,qty:float} stats supplier invoices
|
||||
*/
|
||||
public $stats_facture_fournisseur = array();
|
||||
|
||||
/**
|
||||
|
|
@ -1137,10 +1157,10 @@ class Product extends CommonObject
|
|||
|
||||
if ($id > 0) {
|
||||
$this->id = $id;
|
||||
$this->price = $price_ht;
|
||||
$this->price_ttc = $price_ttc;
|
||||
$this->price_min = $price_min_ht;
|
||||
$this->price_min_ttc = $price_min_ttc;
|
||||
$this->price = $price_ht;
|
||||
$this->price_ttc = $price_ttc;
|
||||
$this->price_min = $price_min_ht;
|
||||
$this->price_min_ttc = $price_min_ttc;
|
||||
|
||||
$result = $this->_log_price($user);
|
||||
if ($result > 0) {
|
||||
|
|
@ -3079,7 +3099,7 @@ class Product extends CommonObject
|
|||
$this->multiprices_min_ttc[$i] = $result ? $result["price_min_ttc"] : null;
|
||||
$this->multiprices_base_type[$i] = $result ? $result["price_base_type"] : null;
|
||||
// Next two fields are used only if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on
|
||||
$this->multiprices_tva_tx[$i] = $result ? $result["tva_tx"].($result ? ' ('.$result['default_vat_code'].')' : '') : null;
|
||||
$this->multiprices_tva_tx[$i] = $result ? $result["tva_tx"].(!empty($result['default_vat_code']) ? ' ('.$result['default_vat_code'].')' : '') : null;
|
||||
$this->multiprices_recuperableonly[$i] = $result ? $result["recuperableonly"] : null;
|
||||
|
||||
// Price by quantity
|
||||
|
|
@ -3909,36 +3929,36 @@ class Product extends CommonObject
|
|||
$this->stats_mrptoconsume['customers'] = 0;
|
||||
$this->stats_mrptoconsume['nb'] = 0;
|
||||
$this->stats_mrptoconsume['rows'] = 0;
|
||||
$this->stats_mrptoconsume['qty'] = 0;
|
||||
$this->stats_mrptoconsume['qty'] = 0.0;
|
||||
$this->stats_mrptoproduce['customers'] = 0;
|
||||
$this->stats_mrptoproduce['nb'] = 0;
|
||||
$this->stats_mrptoproduce['rows'] = 0;
|
||||
$this->stats_mrptoproduce['qty'] = 0;
|
||||
$this->stats_mrptoproduce['qty'] = 0.0;
|
||||
}
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
while ($obj = $this->db->fetch_object($result)) {
|
||||
if ($obj->role == 'toconsume' && empty($warehouseid)) {
|
||||
$this->stats_mrptoconsume['customers'] += $obj->nb_customers;
|
||||
$this->stats_mrptoconsume['nb'] += $obj->nb;
|
||||
$this->stats_mrptoconsume['rows'] += $obj->nb_rows;
|
||||
$this->stats_mrptoconsume['qty'] += ($obj->qty ? $obj->qty : 0);
|
||||
$this->stats_mrptoconsume['customers'] += (int) $obj->nb_customers;
|
||||
$this->stats_mrptoconsume['nb'] += (int) $obj->nb;
|
||||
$this->stats_mrptoconsume['rows'] += (int) $obj->nb_rows;
|
||||
$this->stats_mrptoconsume['qty'] += ($obj->qty ? (float) $obj->qty : 0.0);
|
||||
}
|
||||
if ($obj->role == 'consumed' && empty($warehouseid)) {
|
||||
//$this->stats_mrptoconsume['customers'] += $obj->nb_customers;
|
||||
//$this->stats_mrptoconsume['nb'] += $obj->nb;
|
||||
//$this->stats_mrptoconsume['rows'] += $obj->nb_rows;
|
||||
$this->stats_mrptoconsume['qty'] -= ($obj->qty ? $obj->qty : 0);
|
||||
$this->stats_mrptoconsume['qty'] -= ($obj->qty ? (float) $obj->qty : 0.0);
|
||||
}
|
||||
if ($obj->role == 'toproduce') {
|
||||
if ($warehouseid) {
|
||||
$this->stock_warehouse[$warehouseid]->stats_mrptoproduce['qty'] += ($obj->qty ? $obj->qty : 0);
|
||||
$this->stock_warehouse[$warehouseid]->stats_mrptoproduce['qty'] += ($obj->qty ? (float) $obj->qty : 0.0);
|
||||
} else {
|
||||
$this->stats_mrptoproduce['customers'] += $obj->nb_customers;
|
||||
$this->stats_mrptoproduce['nb'] += $obj->nb;
|
||||
$this->stats_mrptoproduce['rows'] += $obj->nb_rows;
|
||||
$this->stats_mrptoproduce['qty'] += ($obj->qty ? $obj->qty : 0);
|
||||
$this->stats_mrptoproduce['customers'] += (int) $obj->nb_customers;
|
||||
$this->stats_mrptoproduce['nb'] += (int) $obj->nb;
|
||||
$this->stats_mrptoproduce['rows'] += (int) $obj->nb_rows;
|
||||
$this->stats_mrptoproduce['qty'] += ($obj->qty ? (float) $obj->qty : 0.0);
|
||||
}
|
||||
}
|
||||
if ($obj->role == 'produced') {
|
||||
|
|
@ -4164,10 +4184,10 @@ class Product extends CommonObject
|
|||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
$this->stats_facturerec['customers'] = $obj->nb_customers;
|
||||
$this->stats_facturerec['nb'] = $obj->nb;
|
||||
$this->stats_facturerec['rows'] = $obj->nb_rows;
|
||||
$this->stats_facturerec['qty'] = $obj->qty ? $obj->qty : 0;
|
||||
$this->stats_facturerec['customers'] = (int) $obj->nb_customers;
|
||||
$this->stats_facturerec['nb'] = (int) $obj->nb;
|
||||
$this->stats_facturerec['rows'] = (int) $obj->nb_rows;
|
||||
$this->stats_facturerec['qty'] = $obj->qty ? (float) $obj->qty : 0.0;
|
||||
|
||||
// if it's a virtual product, maybe it is in invoice by extension
|
||||
if (getDolGlobalString('PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC')) {
|
||||
|
|
@ -4238,10 +4258,10 @@ class Product extends CommonObject
|
|||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
$this->stats_facture_fournisseur['suppliers'] = $obj->nb_suppliers;
|
||||
$this->stats_facture_fournisseur['nb'] = $obj->nb;
|
||||
$this->stats_facture_fournisseur['rows'] = $obj->nb_rows;
|
||||
$this->stats_facture_fournisseur['qty'] = $obj->qty ? $obj->qty : 0;
|
||||
$this->stats_facture_fournisseur['suppliers'] = (int) $obj->nb_suppliers;
|
||||
$this->stats_facture_fournisseur['nb'] = (int) $obj->nb;
|
||||
$this->stats_facture_fournisseur['rows'] = (int) $obj->nb_rows;
|
||||
$this->stats_facture_fournisseur['qty'] = $obj->qty ? (float) $obj->qty : 0.0;
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$reshook = $hookmanager->executeHooks('loadStatsSupplierInvoice', $parameters, $this, $action);
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ $morehtmlref .= '</div>';
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -1365,7 +1365,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ $morehtmlref .= '</div>';
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -101,6 +101,12 @@ $permissiontoadd = $user->hasRight('projet', 'creer');
|
|||
* Actions
|
||||
*/
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
|
||||
|
||||
|
|
@ -161,7 +167,7 @@ if ($object->id > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ $morehtmlref .= '</div>';
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "te.rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "te.rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -93,6 +93,17 @@ if (!$user->hasRight('projet', 'lire')) {
|
|||
* Actions
|
||||
*/
|
||||
|
||||
$object = new Project($db);
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$object->fetch($id, $ref);
|
||||
$object->fetch_thirdparty();
|
||||
if (getDolGlobalString('PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($object, 'fetchComments') && empty($object->comments)) {
|
||||
$object->fetchComments();
|
||||
}
|
||||
$object->info($object->id);
|
||||
}
|
||||
|
||||
$parameters = array('id' => $socid);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
|
|
@ -112,16 +123,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$object = new Project($db);
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$object->fetch($id, $ref);
|
||||
$object->fetch_thirdparty();
|
||||
if (getDolGlobalString('PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($object, 'fetchComments') && empty($object->comments)) {
|
||||
$object->fetchComments();
|
||||
}
|
||||
$object->info($object->id);
|
||||
}
|
||||
$agenda = (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) ? '/'.$langs->trans("Agenda") : '';
|
||||
$title = $langs->trans('Events').$agenda.' - '.$object->ref.' '.$object->name;
|
||||
if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/projectnameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
|
||||
|
|
@ -157,7 +158,7 @@ $morehtmlref .= '</div>';
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -448,6 +448,7 @@ $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
|||
llxHeader("", $title, $help_url, '', 0, 0, '', '', '', 'mod-project page-card_tasks');
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
$param = '';
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$result = $object->fetch($id, $ref);
|
||||
|
|
@ -616,7 +617,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
@ -308,7 +308,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = "fk_projet:IN:(".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId);
|
||||
} else {
|
||||
$object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
@ -335,7 +335,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = "fk_projet:IN:(".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId);
|
||||
} else {
|
||||
$object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ if ($object->id > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
@ -293,7 +293,7 @@ if ($object->id > 0) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = "fk_projet:IN:(".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId);
|
||||
} else {
|
||||
$object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ if ($object->id > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
@ -277,7 +277,7 @@ if ($object->id > 0) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = " fk_projet:IN:(".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = " fk_projet:IN:".$db->sanitize($projectsListId);
|
||||
} else {
|
||||
$object->next_prev_filter = " fk_projet:=:".((int) $projectstatic->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
|
||||
|
|
@ -597,7 +597,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = "fk_projet:IN:(".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId);
|
||||
} else {
|
||||
$object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -959,7 +959,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = "rowid:IN:(" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0') . ")";
|
||||
$projectstatic->next_prev_filter = "rowid:IN:" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
|
||||
|
|
@ -1143,7 +1143,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = "fk_projet:IN:(" . $db->sanitize($projectsListId) . ")";
|
||||
$object->next_prev_filter = "fk_projet:IN:" . $db->sanitize($projectsListId);
|
||||
} else {
|
||||
$object->next_prev_filter = "fk_projet:=:" . ((int) $projectstatic->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,6 +231,12 @@ $ref = $REF = GETPOST('ref', 'alpha');
|
|||
$TAG = GETPOST("tag", 'alpha');
|
||||
$FULLTAG = GETPOST("fulltag", 'alpha'); // fulltag is tag with more information
|
||||
$SECUREKEY = GETPOST("securekey"); // Secure key
|
||||
$PAYPAL_API_OK = "";
|
||||
$PAYPAL_API_KO = "";
|
||||
$PAYPAL_API_SANDBOX = "";
|
||||
$PAYPAL_API_USER = "";
|
||||
$PAYPAL_API_PASSWORD = "";
|
||||
$PAYPAL_API_SIGNATURE = "";
|
||||
|
||||
if ($paymentmethod && !preg_match('/'.preg_quote('PM='.$paymentmethod, '/').'/', $FULLTAG)) {
|
||||
$FULLTAG .= ($FULLTAG ? '.' : '').'PM='.$paymentmethod;
|
||||
|
|
@ -286,6 +292,7 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last &
|
|||
';
|
||||
|
||||
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypal')) {
|
||||
global $PAYPAL_API_SANDBOX, $PAYPAL_API_OK, $PAYPAL_API_KO, $PAYPAL_API_USER, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE;
|
||||
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php';
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ if (isModEnabled('paypal')) {
|
|||
*/
|
||||
|
||||
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe"));
|
||||
|
||||
$PAYPALTOKEN = "";
|
||||
$PAYPALPAYERID = "";
|
||||
if (isModEnabled('paypal')) {
|
||||
$PAYPALTOKEN = GETPOST('TOKEN');
|
||||
if (empty($PAYPALTOKEN)) {
|
||||
|
|
|
|||
|
|
@ -77,23 +77,17 @@ $hookmanager->initHooks(array('newpayment'));
|
|||
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe"));
|
||||
|
||||
// Clean parameters
|
||||
$PAYPAL_API_USER = "";
|
||||
$PAYPAL_API_PASSWORD = "";
|
||||
$PAYPAL_API_SIGNATURE = "";
|
||||
$PAYPAL_API_SANDBOX = "";
|
||||
$PAYPALTOKEN = "";
|
||||
$PAYPALPAYERID = "";
|
||||
if (isModEnabled('paypal')) {
|
||||
$PAYPAL_API_USER = "";
|
||||
if (getDolGlobalString('PAYPAL_API_USER')) {
|
||||
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
|
||||
}
|
||||
$PAYPAL_API_PASSWORD = "";
|
||||
if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
|
||||
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
|
||||
}
|
||||
$PAYPAL_API_SIGNATURE = "";
|
||||
if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
|
||||
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
|
||||
}
|
||||
$PAYPAL_API_SANDBOX = "";
|
||||
if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
|
||||
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
|
||||
}
|
||||
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
|
||||
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
|
||||
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
|
||||
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
|
||||
/*$PAYPAL_API_OK = "";
|
||||
if ($urlok) {
|
||||
$PAYPAL_API_OK = $urlok;
|
||||
|
|
@ -173,17 +167,23 @@ $object = new stdClass(); // For triggers
|
|||
|
||||
$error = 0;
|
||||
|
||||
// Check if we have redirtodomain to do.
|
||||
$ws_virtuelhost = null;
|
||||
if ($ws) {
|
||||
$doactionsthenredirect = 1;
|
||||
include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
||||
$website = new Website($db);
|
||||
$result = $website->fetch(0, $ws);
|
||||
if ($result > 0) {
|
||||
$ws_virtuelhost = $website->virtualhost;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions and view
|
||||
*/
|
||||
|
||||
// Check if we have redirtodomain to do.
|
||||
if ($ws) {
|
||||
$doactionsthenredirect = 1;
|
||||
}
|
||||
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
dol_syslog("Callback url when a payment was done. query_string=".(empty($_SERVER["QUERY_STRING"]) ? '' : dol_escape_htmltag($_SERVER["QUERY_STRING"]))." script_uri=".(empty($_SERVER["SCRIPT_URI"]) ? '' : dol_escape_htmltag($_SERVER["SCRIPT_URI"])), LOG_DEBUG, 0, '_payment');
|
||||
|
|
@ -278,11 +278,11 @@ if (empty($doactionsthenredirect)) {
|
|||
|
||||
// Another step to validate the payment (for payment modes like Paypal that need another step after the callback return for this).
|
||||
if (isModEnabled('paypal') && $paymentmethod === 'paypal') { // We call this page only if payment is ok on payment system
|
||||
if ($PAYPALTOKEN) {
|
||||
if (!empty($PAYPALTOKEN)) {
|
||||
// Get on url call
|
||||
$onlinetoken = $PAYPALTOKEN;
|
||||
$fulltag = $FULLTAG;
|
||||
$payerID = $PAYPALPAYERID;
|
||||
$payerID = !empty($PAYPALPAYERID) ? $PAYPALPAYERID : '';
|
||||
// Set by newpayment.php
|
||||
$currencyCodeType = $_SESSION['currencyCodeType'];
|
||||
$FinalPaymentAmt = $_SESSION["FinalPaymentAmt"];
|
||||
|
|
@ -2124,12 +2124,20 @@ if (!empty($doactionsthenredirect)) {
|
|||
if ($ispaymentok) {
|
||||
// Redirect to a success page
|
||||
// Paymentok page must be created for the specific website
|
||||
$ext_urlok = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG;
|
||||
if (!defined('USEDOLIBARRSERVER') && !empty($ws_virtuelhost)) {
|
||||
$ext_urlok = $ws_virtuelhost . '/paymentok.php?fulltag='.$FULLTAG;
|
||||
} else {
|
||||
$ext_urlok = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG;
|
||||
}
|
||||
print "<script>window.top.location.href = '".dol_escape_js($ext_urlok) ."';</script>";
|
||||
} else {
|
||||
// Redirect to an error page
|
||||
// Paymentko page must be created for the specific website
|
||||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
if (!defined('USEDOLIBARRSERVER') && !empty($ws_virtuelhost)) {
|
||||
$ext_urlko = $ws_virtuelhost . '/paymentko.php?fulltag='.$FULLTAG;
|
||||
} else {
|
||||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
}
|
||||
print "<script>window.top.location.href = '".dol_escape_js($ext_urlko)."';</script>";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class Client extends Societe
|
|||
/**
|
||||
* @var string Used to add a filter in Form::showrefnav method
|
||||
*/
|
||||
public $next_prev_filter = "te.client:in:(1,2,3)";
|
||||
public $next_prev_filter = "te.client:in:1,2,3";
|
||||
|
||||
/**
|
||||
* @var array<int,array{id:int,code:string,label:string,picto:string}>
|
||||
|
|
|
|||
|
|
@ -611,6 +611,11 @@ $sql .= " WHERE s.entity IN (".getEntity('societe').")";
|
|||
if (!$user->hasRight('fournisseur', 'lire')) {
|
||||
$sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible
|
||||
}
|
||||
|
||||
// Force the sales representative if they don't have permissions
|
||||
if (!$user->hasRight('societe', 'client', 'voir') && !$socid) {
|
||||
$search_sale = $user->id;
|
||||
}
|
||||
// Search on sale representative
|
||||
if (!empty($search_sale) && $search_sale != '-1') {
|
||||
$search_sale_req = array_filter($search_sale, function (string $value): bool {
|
||||
|
|
|
|||
|
|
@ -4695,12 +4695,11 @@ table.hidepaginationnext .paginationnext {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/* Set the color for hover lines */
|
||||
.oddeven:hover, .evenodd:hover, .oddevenimport:hover, .evenoddimport:hover, .impair:hover, .pair:hover
|
||||
{
|
||||
.oddeven:hover:not(.nohover), .evenodd:hover:not(.nohover), .oddevenimport:hover:not(.nohover), .evenoddimport:hover:not(.nohover), .impair:hover:not(.nohover), .pair:hover:not(.nohover) {
|
||||
background: var(--colorbacklinepairhover) !important; /* Must be background to be stronger than background of odd or even */
|
||||
}
|
||||
|
||||
.tredited, .tredited td {
|
||||
background: var(--colorbacklinepairchecked) !important; /* Must be background to be stronger than background of odd or even */
|
||||
border-bottom: 0 !important;
|
||||
|
|
|
|||
|
|
@ -4761,7 +4761,6 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
|
|||
|
||||
|
||||
/* Set the color for hover lines */
|
||||
|
||||
.tmenucompanylogo.nohover, .tmenucompanylogo.nohover:hover {
|
||||
opacity: unset !important;
|
||||
}
|
||||
|
|
@ -4770,11 +4769,11 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
|
|||
box-shadow: unset;
|
||||
-webkit-box-shadow: unset;
|
||||
}
|
||||
|
||||
.oddeven:hover, .evenodd:hover, .oddevenimport:hover, .evenoddimport:hover, .impair:hover, .pair:hover
|
||||
.oddeven:hover:not(.nohover), .evenodd:hover:not(.nohover), .oddevenimport:hover:not(.nohover), .evenoddimport:hover:not(.nohover), .impair:hover:not(.nohover), .pair:hover:not(.nohover) {
|
||||
{
|
||||
background: rgb(<?php echo $colorbacklinepairhover; ?>) !important;
|
||||
}
|
||||
|
||||
.tredited {
|
||||
background: rgb(<?php echo $colorbacklinepairchecked; ?>) !important; /* Must be background to be stronger than background of odd or even */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -855,7 +855,7 @@ if ($action == 'create' || $action == 'presend') {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $projectstat->getProjectsAuthorizedForUser($user, $mine, 0);
|
||||
$projectstat->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstat->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
print $form->showrefnav($projectstat, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -620,7 +620,7 @@ if ($projectid > 0 || $project_ref) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (!$user->hasRight('projet', 'all', 'lire')) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,12 @@ $targettype = $argv[2];
|
|||
require $path."../../htdocs/master.inc.php";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functionscli.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php";
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
*/
|
||||
$langs->load('main');
|
||||
|
||||
// Global variables
|
||||
|
|
|
|||
|
|
@ -55,7 +55,12 @@ $mode = $argv[1];
|
|||
require $path."../../htdocs/master.inc.php";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functionscli.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php";
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
*/
|
||||
$langs->load('main');
|
||||
|
||||
// Global variables
|
||||
|
|
|
|||
|
|
@ -47,6 +47,12 @@ require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
|
|||
require_once DOL_DOCUMENT_ROOT."/core/modules/facture/modules_facture.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice2.lib.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
*/
|
||||
|
||||
// Load main language strings
|
||||
$langs->load("main");
|
||||
|
|
@ -77,7 +83,7 @@ if (!empty($dolibarr_main_db_readonly)) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
$diroutputpdf = $conf->facture->dir_output.'/temp';
|
||||
$diroutputpdf = $conf->invoice->dir_output.'/temp';
|
||||
$newlangid = 'en_EN'; // To force a new lang id
|
||||
$filter = array();
|
||||
$regenerate = ''; // Ask regenerate (contains name of model to use)
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ print "\n\n\n";
|
|||
//print dolGetFirstLineOfText($a, 7);
|
||||
print dol_escape_htmltag($a, 1, 1);
|
||||
|
||||
print forgeSQLFromUniversalSearchCriteria("te.client:IN:1,2");
|
||||
|
||||
print "\n";
|
||||
|
||||
//print print_r(unserialize(serialize($object)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue