Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
824e35fe04
55 changed files with 250 additions and 329 deletions
|
|
@ -50,6 +50,13 @@ $includeconstants = array();
|
|||
$buildzip = 0;
|
||||
|
||||
if (empty($argv[1])) {
|
||||
print '***** '.$script_file.' *****'."\n";
|
||||
print "Generate the file filelist-x.y.z[-mybuild].xml with signature of files. ";
|
||||
print "This includes the 3 sections:\n";
|
||||
print "- dolibarr_htdocs_dir\n";
|
||||
print "- dolibarr_scripts_dir\n";
|
||||
print "- dolibarr_unalterable_files (only files inside the scope of the unalterable module)\n";
|
||||
print "\n";
|
||||
print "Usage: ".$script_file." release=auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
|
||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||
exit(1);
|
||||
|
|
@ -97,7 +104,7 @@ $savrelease = $release;
|
|||
$tmpver = explode('-', $release, 2);
|
||||
if ($tmpver[0] == 'auto') {
|
||||
$release = DOL_VERSION;
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') {
|
||||
if (!empty($tmpver[1]) && $tmpver[0] == 'auto') {
|
||||
$release .= '-'.$tmpver[1];
|
||||
}
|
||||
}
|
||||
|
|
@ -126,10 +133,10 @@ if (empty($includecustom)) {
|
|||
}
|
||||
}
|
||||
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Release : ".$release."\n";
|
||||
print "Include custom in signature : ".$includecustom."\n";
|
||||
print "Include constants in signature : ";
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Release : ".$release."\n";
|
||||
print "Include custom dir in signature : ".(empty($includecustom) ? 'no' : 'yes')."\n";
|
||||
print "Include constants in signature : ".(empty($includeconstants) ? 'none' : '');
|
||||
foreach ($includeconstants as $countrycode => $tmp) {
|
||||
foreach ($tmp as $constname => $constvalue) {
|
||||
print $constname.'='.$constvalue." ";
|
||||
|
|
@ -155,9 +162,12 @@ $gitcommit = 'seetag';
|
|||
$branchname = preg_replace('/^(\d+\.\d+)\..*$/', '\1', $release); // Keep only x.y into x.y.z
|
||||
$fileforgit = dirname(dirname(dirname(__FILE__))).'/.git/refs/heads/'.$branchname;
|
||||
print "Try to get last commit ID from file ".$fileforgit."\n";
|
||||
$fileforgitcontent = file_get_contents($fileforgit);
|
||||
$fileforgitcontent = '';
|
||||
if (file_exists($fileforgit)) {
|
||||
$fileforgitcontent = file_get_contents($fileforgit);
|
||||
}
|
||||
if (empty($fileforgitcontent)) {
|
||||
print "Failed to get the last commit ID. Are you on the branch for the release (branch name '.$branchname.') ?\n";
|
||||
print "Failed to get the last commit ID. Are you on the branch for the release (branch name ".$branchname.") ?\n";
|
||||
}
|
||||
$gitcommit = trim($fileforgitcontent);
|
||||
|
||||
|
|
@ -350,7 +360,7 @@ if ($newdir != $dir) {
|
|||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose = 1;
|
||||
//$needtoclose = 1; // close will be done in next filethat is in same dir
|
||||
}
|
||||
if (filetype($file) == "file") {
|
||||
$md5 = md5_file($file);
|
||||
|
|
@ -361,7 +371,7 @@ if ($needtoclose) {
|
|||
fputs($fp, ' </dir>'."\n");
|
||||
$needtoclose = 0;
|
||||
}
|
||||
// Add the interfaces.class.php file
|
||||
// Add the commontrigger.class.php file
|
||||
$file = dirname(__FILE__).'/../../htdocs/core/class/commontrigger.class.php';
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
$newdir = str_replace(dirname(__FILE__).'/../../htdocs', '', dirname($file));
|
||||
|
|
@ -374,6 +384,8 @@ if ($newdir != $dir) {
|
|||
$dir = $newdir;
|
||||
$needtoclose = 1;
|
||||
}
|
||||
|
||||
$needtoclose = 1; // This is the last file
|
||||
if (filetype($file) == "file") {
|
||||
$md5 = md5_file($file);
|
||||
$checksumconcat[] = $md5;
|
||||
|
|
|
|||
|
|
@ -7332,18 +7332,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/lib/website.lib.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/core/lib/website.lib.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/core/lib/website.lib.php
|
||||
|
||||
-
|
||||
message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
|
|
@ -7590,12 +7578,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -7614,12 +7596,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 4
|
||||
path: ../../../htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -7746,12 +7722,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 4
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -7782,12 +7752,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_octopus.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 4
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_octopus.modules.php
|
||||
|
||||
-
|
||||
message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
|
|
@ -7806,12 +7770,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -8016,30 +7974,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/import/import_xlsx.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_contacts1\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/contacts1.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_contacts1\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/contacts1.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_fraise\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/fraise.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_fraise\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/fraise.modules.php
|
||||
|
||||
-
|
||||
message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
|
|
@ -8064,30 +7998,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/modules_mailings.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_xinputfile\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/xinputfile.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_xinputfile\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/xinputfile.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_xinputuser\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/xinputuser.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_xinputuser\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mailings/xinputuser.modules.php
|
||||
|
||||
-
|
||||
message: '#^Comparison operation "\>" between 1 and 0 is always true\.$#'
|
||||
identifier: greater.alwaysTrue
|
||||
|
|
@ -8646,12 +8556,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property Mo\:\:\$lines \(array\<MoLine\>\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
|
|
@ -8778,24 +8682,12 @@ parameters:
|
|||
count: 3
|
||||
path: ../../../htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/core/modules/propale/doc/pdf_azur.modules.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/propale/doc/pdf_azur.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 5
|
||||
path: ../../../htdocs/core/modules/propale/doc/pdf_cyan.modules.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -8832,12 +8724,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\<float\>\|float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
|
||||
|
||||
-
|
||||
message: '#^Right side of \|\| is always false\.$#'
|
||||
identifier: booleanOr.rightAlwaysFalse
|
||||
|
|
@ -8856,12 +8742,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommandeFournisseur\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
|
||||
|
||||
-
|
||||
message: '#^Right side of \|\| is always false\.$#'
|
||||
identifier: booleanOr.rightAlwaysFalse
|
||||
|
|
@ -8880,12 +8760,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property CommandeFournisseur\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
|
||||
|
||||
-
|
||||
message: '#^Right side of \|\| is always false\.$#'
|
||||
identifier: booleanOr.rightAlwaysFalse
|
||||
|
|
@ -8904,12 +8778,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property SupplierProposal\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -8922,12 +8790,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property SupplierProposal\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
|
||||
|
||||
-
|
||||
message: '#^Right side of \|\| is always false\.$#'
|
||||
identifier: booleanOr.rightAlwaysFalse
|
||||
|
|
@ -9438,60 +9300,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/document.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
count: 5
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Property PaymentDonation\:\:\$amount \(float\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Property PaymentDonation\:\:\$fk_bank \(int\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Property PaymentDonation\:\:\$fk_donation \(int\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 4
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Property PaymentDonation\:\:\$fk_typepayment \(int\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Property PaymentDonation\:\:\$fk_user_creat \(int\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Property PaymentDonation\:\:\$fk_user_modif \(int\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Property PaymentDonation\:\:\$num_payment \(string\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
count: 3
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Result of && is always true\.$#'
|
||||
identifier: booleanAnd.alwaysTrue
|
||||
count: 2
|
||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$maxlength might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -10788,12 +10596,6 @@ parameters:
|
|||
count: 3
|
||||
path: ../../../htdocs/fourn/facture/card.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$objectsrc might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../../htdocs/fourn/facture/card.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$upload_dir might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ return [
|
|||
|
||||
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
|
||||
'file_suppressions' => [
|
||||
'htdocs/bookcal/calendar_card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/categories/viewcat.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
|
|||
|
|
@ -1273,7 +1273,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -99,6 +99,7 @@ function formatObject($objtoshow, $prefix)
|
|||
|
||||
$newobjtoshow = $objtoshow;
|
||||
|
||||
$tmpobject = null;
|
||||
$arrayoffields = array();
|
||||
if ($prefix == 'mycompany' || $prefix == 'thirdparty') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
|
|
@ -140,7 +141,7 @@ function formatObject($objtoshow, $prefix)
|
|||
|
||||
// Field code
|
||||
$s .= '<td>';
|
||||
$s .= '<!-- '.$key.' '.$arrayoffields[$key]['type'].''.$arrayoffields[$convertkey[$key]].' -->';
|
||||
$s .= '<!-- '.$key.' '.$arrayoffields[$key]['type'].''.$arrayoffields[$convertkey[$key]]['label'].' -->';
|
||||
$s .= ($prefix ? $prefix.' > ' : '');
|
||||
$s .= $key;
|
||||
$s .= '</td>';
|
||||
|
|
|
|||
|
|
@ -1053,7 +1053,7 @@ while ($i < $imaxinloop) {
|
|||
}
|
||||
$event_start_date_css = $event_end_date_css = $event_more_class;
|
||||
|
||||
print '<tr class="oddeven' . ($event_more_class != '' ? ' '.$event_more_class : '') . '">';
|
||||
print '<tr class="oddeven row-with-select ' . ($event_more_class != '' ? ' '.$event_more_class : '') . '">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ while ($i < $imaxinloop) {
|
|||
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -658,7 +658,7 @@ foreach ($accounts as $key => $type) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$objecttmp->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$objecttmp->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -742,7 +742,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td></td>';
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -710,7 +710,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -1520,7 +1520,7 @@ while ($i < $imaxinloop) {
|
|||
}
|
||||
} else {
|
||||
// Show here line of result
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven"';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select"';
|
||||
if ($contextpage == 'poslist') {
|
||||
print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->socid.'&idcontact='.$obj->rowid.'&place='.urlencode($place).'\'"';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1170,7 +1170,7 @@ while ($i < $imaxinloop) {
|
|||
}
|
||||
} else {
|
||||
// Show here line of result
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ abstract class CommonObject
|
|||
public $multicurrency_code;
|
||||
|
||||
/**
|
||||
* @var float|float[] Multicurrency rate ("tx" = "taux" in French)
|
||||
* @var null|float|float[] Multicurrency rate ("tx" = "taux" in French)
|
||||
* Or, just for the Paiement object, an array: invoice ID => currency rate for that invoice.
|
||||
*/
|
||||
public $multicurrency_tx;
|
||||
|
|
@ -758,13 +758,13 @@ abstract class CommonObject
|
|||
public $user_modification_id;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
* @var int|null ID
|
||||
* @deprecated Use $user_creation_id
|
||||
*/
|
||||
public $fk_user_creat;
|
||||
|
||||
/**
|
||||
* @var ?int ID
|
||||
* @var int|null ID
|
||||
* @deprecated Use $user_modification_id
|
||||
*/
|
||||
public $fk_user_modif;
|
||||
|
|
@ -11342,7 +11342,7 @@ abstract class CommonObject
|
|||
$comment = new Comment($this->db);
|
||||
$result = $comment->fetchAllFor($this->element, $this->id);
|
||||
if ($result < 0) {
|
||||
$this->errors = array_merge($this->errors, $comment->errors);
|
||||
$this->setErrorsFromObject($comment);
|
||||
return -1;
|
||||
} else {
|
||||
$this->comments = $comment->comments;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ function Listview_modifyUrl(strURL,paramName,paramNewValue){
|
|||
strURL=strFirstPart+paramNewValue+strLastPart;
|
||||
}
|
||||
else{
|
||||
if (strURL.search('=')!=-1) // permet de verifier s'il y a dej<EFBFBD> des param<61>tres dans l'URL
|
||||
if (strURL.search('=')!=-1) // permet de verifier s'il y a dejà des paramètres dans l'URL
|
||||
strURL+='&'+paramName+'='+paramNewValue;
|
||||
else
|
||||
strURL+='?'+paramName+'='+paramNewValue;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 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
|
||||
|
|
@ -37,7 +37,15 @@ class mailing_contacts1 extends MailingTargets
|
|||
public $name = 'ContactCompanies'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
public $desc = 'Contacts of thirdparties (prospects, customers, suppliers...)';
|
||||
|
||||
/**
|
||||
* @var string[] This module allows to select by categories must be also enabled if category module is not activated
|
||||
*/
|
||||
public $require_module = array("societe"); // Module mailing actif si modules require_module actifs
|
||||
|
||||
/**
|
||||
* @var int <0,1> Set to 1 if selector is available for admin users only
|
||||
*/
|
||||
public $require_admin = 0; // Module mailing actif pour user admin ou non
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -37,9 +37,15 @@ class mailing_fraise extends MailingTargets
|
|||
public $name = 'FundationMembers'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
public $desc = 'Foundation members with emails';
|
||||
// Set to 1 if selector is available for admin users only
|
||||
|
||||
/**
|
||||
* @var int <0,1> Set to 1 if selector is available for admin users only
|
||||
*/
|
||||
public $require_admin = 0;
|
||||
|
||||
/**
|
||||
* @var string[] This module allows to select by categories must be also enabled if category module is not activated
|
||||
*/
|
||||
public $require_module = array('adherent');
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This file is an example to follow to add your own email selector inside
|
||||
* the Dolibarr email tool.
|
||||
|
|
@ -37,7 +37,7 @@ class mailing_thirdparties extends MailingTargets
|
|||
public $desc = "Third parties (by categories)";
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $require_admin = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 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
|
||||
|
|
@ -33,8 +34,16 @@ class mailing_xinputfile extends MailingTargets
|
|||
{
|
||||
public $name = 'EmailsFromFile'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
public $desc = 'EMails from a file'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
public $desc = 'EMails from a file'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouvée
|
||||
|
||||
/**
|
||||
* @var string[] This module allows to select by categories must be also enabled if category module is not activated
|
||||
*/
|
||||
public $require_module = array(); // Module mailing actif si modules require_module actifs
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $require_admin = 0; // Module mailing actif pour user admin ou non
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 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
|
||||
|
|
@ -33,8 +34,16 @@ class mailing_xinputuser extends MailingTargets
|
|||
{
|
||||
public $name = 'EmailsFromUser'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
public $desc = 'EMails input by user'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
public $desc = 'EMails input by user'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouvée
|
||||
|
||||
/**
|
||||
* @var string[] This module allows to select by categories must be also enabled if category module is not activated
|
||||
*/
|
||||
public $require_module = array(); // Module mailing actif si modules require_module actifs
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $require_admin = 0; // Module mailing actif pour user admin ou non
|
||||
|
||||
/**
|
||||
|
|
@ -108,8 +117,8 @@ class mailing_xinputuser extends MailingTargets
|
|||
{
|
||||
global $langs;
|
||||
|
||||
$s = '';
|
||||
$s .= '<input type="text" name="xinputuser" class="flat minwidth300" value="'.GETPOST("xinputuser").'">';
|
||||
$s = '<input type="text" name="xinputuser" class="flat minwidth300" value="'.GETPOST("xinputuser").'">';
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ if ($num > 0) {
|
|||
$datelastrun = $db->jdate($obj->datelastrun);
|
||||
$datelastresult = $db->jdate($obj->datelastresult);
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<tr class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Quentin VIAL--GOUTEYRON <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
|
@ -273,7 +273,7 @@ class DataPolicyCron
|
|||
*
|
||||
* @return int Returns 0 for success, 1 for failure, as required for cron jobs.
|
||||
*/
|
||||
public function cleanDataForDataPolicy() : int
|
||||
public function cleanDataForDataPolicy(): int
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
|
|
@ -411,7 +411,7 @@ class DataPolicyCron
|
|||
* @param array<string, mixed> $policy The policy configuration.
|
||||
* @return int The result of the update operation, or 0 if skipped.
|
||||
*/
|
||||
private function _handleAnonymize($object, $user, $policy) : int
|
||||
private function _handleAnonymize($object, $user, $policy): int
|
||||
{
|
||||
foreach ($policy['anonymize_fields'] as $field => $val) {
|
||||
if ($val == 'MAKEANONYMOUS') {
|
||||
|
|
@ -437,7 +437,7 @@ class DataPolicyCron
|
|||
* @param CommonObject $object The target object.
|
||||
* @param User $user The user object.
|
||||
* @param array<string, mixed> $policy The policy configuration.
|
||||
* @param string $method The method key ('delete' or 'update').
|
||||
* @param 'delete'|'update' $method The method key ('delete' or 'update').
|
||||
* @return mixed[] The list of arguments for the call.
|
||||
*/
|
||||
private function _buildCallArguments($object, $user, $policy, $method)
|
||||
|
|
@ -449,9 +449,16 @@ class DataPolicyCron
|
|||
|
||||
$paramConfig = $policy['call_params'][$method] ?? [];
|
||||
|
||||
return array_map(function (string $paramName) use ($availableArgs) {
|
||||
return $availableArgs[$paramName];
|
||||
}, $paramConfig);
|
||||
return array_map(
|
||||
/**
|
||||
* @param string$paramName Name of parameter to get
|
||||
* @return mixed Parameter value
|
||||
*/
|
||||
static function (string $paramName) use ($availableArgs) {
|
||||
return $availableArgs[$paramName];
|
||||
},
|
||||
$paramConfig
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -52,7 +52,7 @@ class PaymentDonation extends CommonObject
|
|||
public $rowid;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
* @var ?int ID
|
||||
*/
|
||||
public $fk_donation;
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class PaymentDonation extends CommonObject
|
|||
public $datep = '';
|
||||
|
||||
/**
|
||||
* @var float amount
|
||||
* @var ?float amount
|
||||
*/
|
||||
public $amount; // Total amount of payment
|
||||
|
||||
|
|
@ -77,42 +77,42 @@ class PaymentDonation extends CommonObject
|
|||
public $amounts = array(); // Array of amounts
|
||||
|
||||
/**
|
||||
* @var int Payment mode ID
|
||||
* @var ?int Payment mode ID
|
||||
* @deprecated Use $paymenttype
|
||||
* @see $paymenttype
|
||||
*/
|
||||
public $fk_typepayment;
|
||||
|
||||
/**
|
||||
* @var int Payment mode ID or Code. TODO Use only the code in this field.
|
||||
* @var ?int Payment mode ID or Code. TODO Use only the code in this field.
|
||||
*/
|
||||
public $paymenttype;
|
||||
|
||||
/**
|
||||
* @var string Payment reference
|
||||
* @var ?string Payment reference
|
||||
* (Cheque or bank transfer reference. Can be "ABC123")
|
||||
*/
|
||||
public $num_payment;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
* @var ?int ID
|
||||
*/
|
||||
public $fk_bank;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
* @var ?int ID
|
||||
*/
|
||||
public $fk_user_creat;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
* @var ?int ID
|
||||
*/
|
||||
public $fk_user_modif;
|
||||
|
||||
/**
|
||||
* @deprecated Use $amount, $amounts
|
||||
* @see $amount, $amounts
|
||||
* @var float
|
||||
* @var ?float
|
||||
*/
|
||||
public $total;
|
||||
|
||||
|
|
@ -320,8 +320,8 @@ class PaymentDonation extends CommonObject
|
|||
$this->num_payment = $obj->num_payment;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->fk_bank = $obj->fk_bank;
|
||||
$this->fk_user_creat = $obj->fk_user_creat;
|
||||
$this->fk_user_modif = $obj->fk_user_modif;
|
||||
$this->fk_user_creat = $obj->fk_user_creat;
|
||||
$this->fk_user_modif = $obj->fk_user_modif;
|
||||
|
||||
$this->type_code = $obj->type_code;
|
||||
$this->type_label = $obj->type_label;
|
||||
|
|
@ -405,17 +405,13 @@ class PaymentDonation extends CommonObject
|
|||
$this->errors[] = "Error ".$this->db->lasterror();
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if (!$notrigger) {
|
||||
if (!$error && !$notrigger) {
|
||||
// Call triggers
|
||||
$result = $this->call_trigger('DONATION_PAYMENT_MODIFY', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
if (!$error && !$notrigger) {
|
||||
// Call triggers
|
||||
$result = $this->call_trigger('DONATION_PAYMENT_MODIFY', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
|
|
@ -443,20 +439,19 @@ class PaymentDonation extends CommonObject
|
|||
public function delete($user, $notrigger = 0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$error = 0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
if (!$error) {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
|
||||
$sql .= " WHERE type='payment_donation' AND url_id=".(int) $this->id;
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
|
||||
$sql .= " WHERE type='payment_donation' AND url_id=".(int) $this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->errors[] = "Error ".$this->db->lasterror();
|
||||
}
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->errors[] = "Error ".$this->db->lasterror();
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
|
|
@ -471,17 +466,13 @@ class PaymentDonation extends CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if (!$notrigger) {
|
||||
if (!$error && !$notrigger) {
|
||||
// Call triggers
|
||||
$result = $this->call_trigger('DONATION_PAYMENT_DELETE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
if (!$error && !$notrigger) {
|
||||
// Call triggers
|
||||
$result = $this->call_trigger('DONATION_PAYMENT_DELETE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
|
|
@ -639,7 +630,7 @@ class PaymentDonation extends CommonObject
|
|||
$this->datep,
|
||||
(string) $this->paymenttype, // Payment mode id or code ("CHQ or VIR for example")
|
||||
$label,
|
||||
$amount,
|
||||
(float) $amount,
|
||||
$this->num_payment,
|
||||
0,
|
||||
$user,
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if ($conf->main_checkbox_left_column) {
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ class Expedition extends CommonObject
|
|||
*/
|
||||
public $multicurrency_code;
|
||||
/**
|
||||
* @var float
|
||||
* @var ?float
|
||||
*/
|
||||
public $multicurrency_tx;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1525,7 +1525,7 @@ while ($i < $imaxinloop) {
|
|||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven">';
|
||||
print '<tr class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class ExpenseReportLine extends CommonObjectLine
|
|||
public $multicurrency_code;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
* @var ?float
|
||||
*/
|
||||
public $multicurrency_tx;
|
||||
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ if ($num > 0) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -861,7 +861,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
public $multicurrency_code;
|
||||
|
||||
/**
|
||||
* @var float Rate
|
||||
* @var ?float Rate
|
||||
*/
|
||||
public $multicurrency_tx;
|
||||
|
||||
|
|
|
|||
|
|
@ -1843,7 +1843,7 @@ if ($resql) {
|
|||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven '.((getDolGlobalInt('MAIN_FINISHED_LINES_OPACITY') == 1 && $obj->billed == 1) ? 'opacitymedium' : '').'">';
|
||||
print '<tr class="oddeven row-with-select '.((getDolGlobalInt('MAIN_FINISHED_LINES_OPACITY') == 1 && $obj->billed == 1) ? 'opacitymedium' : '').'">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowraponall center">';
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc',
|
|||
$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric
|
||||
$search_paymentmode = GETPOST('search_paymentmode', 'intcomma');
|
||||
$search_paymentcond = GETPOST('search_paymentcond') ? GETPOSTINT('search_paymentcond') : '';
|
||||
$search_vat_reverse_charge = GETPOST('search_vat_reverse_charge', 'alpha');
|
||||
$search_town = GETPOST('search_town', 'alpha');
|
||||
$search_zip = GETPOST('search_zip', 'alpha');
|
||||
$search_state = GETPOST("search_state");
|
||||
|
|
@ -200,7 +201,8 @@ $arrayfields = array(
|
|||
's.zip' => array('label' => "Zip", 'checked' => '-1', 'position' => 44),
|
||||
'state.nom' => array('label' => "StateShort", 'checked' => '0', 'position' => 45),
|
||||
'country.code_iso' => array('label' => "Country", 'checked' => '0', 'position' => 46),
|
||||
'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 49),
|
||||
'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 48),
|
||||
'f.vat_reverse_charge' => array('label' => "VATReverseCharge", 'checked' => '0', 'position' => 49, 'enabled' => (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE') ? '1' : '0')),
|
||||
'f.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => '1', 'position' => 52),
|
||||
'f.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => '1', 'position' => 50),
|
||||
'f.total_ht' => array('label' => "AmountHT", 'checked' => '1', 'position' => 105),
|
||||
|
|
@ -305,6 +307,7 @@ if (empty($reshook)) {
|
|||
$search_status = '';
|
||||
$search_paymentmode = '';
|
||||
$search_paymentcond = '';
|
||||
$search_vat_reverse_charge = '';
|
||||
$search_town = '';
|
||||
$search_zip = "";
|
||||
$search_state = "";
|
||||
|
|
@ -510,7 +513,7 @@ $help_url = 'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedo
|
|||
// Build and execute select
|
||||
// --------------------------------------------------------------------
|
||||
$sql = "SELECT";
|
||||
$sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.type, f.subtype, f.datef, f.date_lim_reglement as datelimite, f.fk_mode_reglement, f.fk_cond_reglement,";
|
||||
$sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.type, f.subtype, f.datef, f.date_lim_reglement as datelimite, f.fk_mode_reglement, f.fk_cond_reglement, f.vat_reverse_charge,";
|
||||
$sql .= " f.total_ht, f.total_ttc, f.total_tva as total_vat, f.paye as paye, f.close_code, f.fk_statut as fk_statut, f.libelle as label, f.datec as date_creation, f.tms as date_modification,";
|
||||
$sql .= " f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,";
|
||||
$sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,';
|
||||
|
|
@ -679,6 +682,9 @@ if ($search_paymentmode > 0) {
|
|||
if ($search_paymentcond > 0) {
|
||||
$sql .= " AND f.fk_cond_reglement = ".((int) $search_paymentcond);
|
||||
}
|
||||
if ($search_vat_reverse_charge != '') {
|
||||
$sql .= " AND f.vat_reverse_charge = ".((int) $search_vat_reverse_charge);
|
||||
}
|
||||
if ($search_date_start) {
|
||||
$sql .= " AND f.datef >= '" . $db->idate($search_date_start) . "'";
|
||||
}
|
||||
|
|
@ -1021,6 +1027,9 @@ if ($search_paymentmode) {
|
|||
if ($search_paymentcond) {
|
||||
$param .= '&search_paymentcond='.urlencode((string) ($search_paymentcond));
|
||||
}
|
||||
if ($search_vat_reverse_charge != '') {
|
||||
$param .= '&search_vat_reverse_charge='.urlencode((string) ($search_vat_reverse_charge));
|
||||
}
|
||||
if ($show_files) {
|
||||
$param .= '&show_files='.urlencode((string) ($show_files));
|
||||
}
|
||||
|
|
@ -1285,6 +1294,12 @@ if (!empty($arrayfields['typent.code']['checked'])) {
|
|||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (!getDolGlobalString('SOCIETE_SORT_ON_TYPEENT') ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
// VAT Reverse Charge
|
||||
if (!empty($arrayfields['f.vat_reverse_charge']['checked'])) {
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->selectyesno('search_vat_reverse_charge', $search_vat_reverse_charge, 1, 0, 1, 1);
|
||||
print '</td>';
|
||||
}
|
||||
// Condition of payment
|
||||
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
|
||||
print '<td class="liste_titre left">';
|
||||
|
|
@ -1494,6 +1509,10 @@ if (!empty($arrayfields['typent.code']['checked'])) {
|
|||
print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['f.vat_reverse_charge']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['f.vat_reverse_charge']['label'], $_SERVER["PHP_SELF"], "f.vat_reverse_charge", "", $param, "", $sortfield, $sortorder, 'center ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['f.fk_cond_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_cond_reglement", "", $param, "", $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
|
|
@ -1733,7 +1752,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven '.((getDolGlobalInt('MAIN_FINISHED_LINES_OPACITY') == 1 && $obj->fk_statut > 1) ? 'opacitymedium' : '').'">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select '.((getDolGlobalInt('MAIN_FINISHED_LINES_OPACITY') == 1 && $obj->fk_statut > 1) ? 'opacitymedium' : '').'">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
@ -1918,6 +1937,15 @@ while ($i < $imaxinloop) {
|
|||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// VAT Reverse Charge
|
||||
if (!empty($arrayfields['f.vat_reverse_charge']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print yn($obj->vat_reverse_charge);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
// Payment condition
|
||||
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ while ($i < $imaxinloop) {
|
|||
$productstatic->barcode = $objp->barcode;
|
||||
$productstatic->barcode_type = $objp->fk_barcode_type;
|
||||
|
||||
print '<tr data-rowid="'.$productstatic->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$productstatic->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ if ($id && !$user->hasRight('holiday', 'readall') && !in_array($id, $childids))
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -680,7 +680,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ class ProductFournisseurPrice extends CommonObject
|
|||
*/
|
||||
public $multicurrency_code;
|
||||
/**
|
||||
* @var float
|
||||
* @var ?float
|
||||
*/
|
||||
public $multicurrency_tx;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -665,7 +665,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -1700,7 +1700,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -738,7 +738,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -1901,7 +1901,7 @@ while ($i < $imaxinloop) {
|
|||
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven '.((getDolGlobalInt('MAIN_FINISHED_LINES_OPACITY') == 1 && $object->status > 1) ? 'opacitymedium' : '').'">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select '.((getDolGlobalInt('MAIN_FINISHED_LINES_OPACITY') == 1 && $object->status > 1) ? 'opacitymedium' : '').'">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -1211,7 +1211,7 @@ while ($i < $imaxinloop) {
|
|||
if ($userAccess >= 0) {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ while ($i < $imaxinloop) {
|
|||
$objectstatic->max_users = $obj->max_users;
|
||||
$objectstatic->url = $obj->url;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<tr class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -837,7 +837,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -1944,7 +1944,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$companystatic->id.'" class="oddeven"';
|
||||
print '<tr data-rowid="'.$companystatic->id.'" class="oddeven row-with-select"';
|
||||
if ($contextpage == 'poslist') {
|
||||
print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->rowid.'&place='.urlencode($place).'\'"';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ class SupplierProposal extends CommonObject
|
|||
*/
|
||||
public $multicurrency_code;
|
||||
/**
|
||||
* @var float
|
||||
* @var ?float
|
||||
*/
|
||||
public $multicurrency_tx;
|
||||
/**
|
||||
|
|
@ -542,15 +542,13 @@ class SupplierProposal extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
if ($result < -1) {
|
||||
$this->error = $productsupplier->error;
|
||||
$this->errors = $productsupplier->errors;
|
||||
$this->setErrorsFromObject($productsupplier);
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
$this->error = $productsupplier->error;
|
||||
$this->errors = $productsupplier->errors;
|
||||
$this->setErrorsFromObject($productsupplier);
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -578,7 +576,23 @@ class SupplierProposal extends CommonObject
|
|||
$pu = 0;
|
||||
}
|
||||
|
||||
$tabprice = calcul_price_total($qty, $pu, (float) $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
||||
$tabprice = calcul_price_total(
|
||||
$qty,
|
||||
$pu,
|
||||
(float) $remise_percent,
|
||||
$txtva,
|
||||
(float) $txlocaltax1,
|
||||
(float) $txlocaltax2,
|
||||
0,
|
||||
$price_base_type,
|
||||
$info_bits,
|
||||
$type,
|
||||
$this->thirdparty,
|
||||
$localtaxes_type,
|
||||
100,
|
||||
(float) $this->multicurrency_tx,
|
||||
$pu_ht_devise
|
||||
);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
$total_ttc = $tabprice[2];
|
||||
|
|
@ -769,7 +783,23 @@ class SupplierProposal extends CommonObject
|
|||
$pu = 0;
|
||||
}
|
||||
|
||||
$tabprice = calcul_price_total($qty, $pu, (float) $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
||||
$tabprice = calcul_price_total(
|
||||
$qty,
|
||||
$pu,
|
||||
(float) $remise_percent,
|
||||
$txtva,
|
||||
(float) $txlocaltax1,
|
||||
(float) $txlocaltax2,
|
||||
0,
|
||||
$price_base_type,
|
||||
$info_bits,
|
||||
$type,
|
||||
$this->thirdparty,
|
||||
$localtaxes_type,
|
||||
100,
|
||||
(float) $this->multicurrency_tx,
|
||||
$pu_ht_devise
|
||||
);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
$total_ttc = $tabprice[2];
|
||||
|
|
|
|||
|
|
@ -1083,7 +1083,7 @@ if ($resql) {
|
|||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven '.((getDolGlobalInt('MAIN_FINISHED_LINES_OPACITY') == 1 && $obj->status > 1) ? 'opacitymedium' : '').'">';
|
||||
print '<tr class="oddeven row-with-select '.((getDolGlobalInt('MAIN_FINISHED_LINES_OPACITY') == 1 && $obj->status > 1) ? 'opacitymedium' : '').'">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -1071,7 +1071,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -1085,7 +1085,7 @@ while ($i < $imaxinloop) {
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/*
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Schaffhauser sébastien <sebastien@webmaster67.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
|
||||
|
|
@ -96,10 +96,16 @@ class DocumentListController extends AbstractDocumentController
|
|||
$fileList = dol_dir_list($dir_ged_tiers, 'files', 0, '', '', 'date', SORT_DESC);
|
||||
|
||||
// 2. Define the link builder function
|
||||
/** @param array<string, mixed> $file */
|
||||
$linkBuilder = function (array $file) use ($client_dir_name) {
|
||||
return DOL_URL_ROOT . '/document.php?modulepart=societe&attachment=1&file=' . urlencode($client_dir_name . '/' . $file['name']);
|
||||
};
|
||||
/**
|
||||
* Get url for file (anonymous function)
|
||||
*
|
||||
* @param array<string, mixed> $file File (array) to get url for
|
||||
* @return string Url for file
|
||||
*/
|
||||
$linkBuilder
|
||||
= static function (array $file) use ($client_dir_name) {
|
||||
return DOL_URL_ROOT . '/document.php?modulepart=societe&attachment=1&file=' . urlencode($client_dir_name . '/' . $file['name']);
|
||||
};
|
||||
|
||||
// 3. Call the parent method to display the table
|
||||
$this->displayDocumentTable(
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (c) 2025 Schaffhauser sébastien <sebastien@webmaster67.fr>
|
||||
* Copyright (C) 2025 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
|
||||
* the Free Software Foundation.
|
||||
|
|
@ -82,10 +83,16 @@ class SharedDocumentsController extends AbstractDocumentController
|
|||
$fileList = dol_dir_list($dir_ged_partage, 'files', 0, '', '', 'date', SORT_DESC);
|
||||
|
||||
// 2. Define the link builder function
|
||||
/** @param array<string, mixed> $file */
|
||||
$linkBuilder = function (array $file) use ($shared_dir_relative_path) {
|
||||
return DOL_URL_ROOT . '/document.php?modulepart=ecm&file=' . urlencode($shared_dir_relative_path . '/' . $file['name']);
|
||||
};
|
||||
/**
|
||||
* Get url for file (anonymous function)
|
||||
*
|
||||
* @param array<string, mixed> $file File (array) to get url for
|
||||
* @return string Url for file
|
||||
*/
|
||||
$linkBuilder
|
||||
= static function (array $file) use ($shared_dir_relative_path) {
|
||||
return DOL_URL_ROOT . '/document.php?modulepart=ecm&file=' . urlencode($shared_dir_relative_path . '/' . $file['name']);
|
||||
};
|
||||
|
||||
// 3. Call the parent method to display the table
|
||||
$this->displayDocumentTable(
|
||||
|
|
|
|||
|
|
@ -3633,6 +3633,9 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
$onlylang['none'] = 'none';
|
||||
$textifempty = $langs->trans("Default");
|
||||
}
|
||||
|
||||
$formheight = 300;
|
||||
|
||||
$formquestion = array(
|
||||
array('type' => 'hidden', 'name' => 'sourcepageurl', 'value' => $objectpage->pageurl),
|
||||
array('type' => 'other', 'tdclass' => 'fieldrequired', 'name' => 'newwebsite', 'label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite((string) $object->id, 'newwebsite', 0)),
|
||||
|
|
@ -3641,12 +3644,13 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
);
|
||||
if (count($onlylang) > 1) {
|
||||
$formquestion[] = array('type' => 'checkbox', 'tdclass' => 'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0, 'morecss' => 'margintoponly');
|
||||
$formheight += 50;
|
||||
}
|
||||
|
||||
$value = $formadmin->select_language($preselectedlanguage, 'newlang', 0, array(), $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1);
|
||||
$formquestion[] = array('type' => 'other', 'name' => 'newlang', 'label' => $form->textwithpicto($langs->trans("Language"), $langs->trans("DefineListOfAltLanguagesInWebsiteProperties")), 'value' => $value);
|
||||
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, $formheight, 550);
|
||||
|
||||
print $formconfirm;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php";
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_db_readonly
|
||||
*/
|
||||
|
||||
// Global variables
|
||||
|
|
|
|||
Loading…
Reference in a new issue