mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'develop' into MathildeMar-patch-1
This commit is contained in:
commit
71eae9f5f5
|
|
@ -210,7 +210,7 @@ repos:
|
|||
- -x
|
||||
- dev/tools/codespell/codespell-lines-ignore.txt
|
||||
exclude_types: [image]
|
||||
exclude: (?x)^(.phan/stubs/.*)$
|
||||
exclude: (?x)^(.phan/stubs/.*|phpstan\.neon.*)$
|
||||
additional_dependencies: [tomli]
|
||||
- alias: codespell-lang-en_US
|
||||
# Only for translations with specialised exceptions
|
||||
|
|
|
|||
11
ChangeLog
11
ChangeLog
|
|
@ -45,6 +45,10 @@ NEW: Accountancy - Add possibility for specific format FEC to sort with the FEC
|
|||
NEW: Accountancy - Expense report - Add an option to use end period for transfer (#26706)
|
||||
NEW: Accountancy - Show accounting result on balance
|
||||
NEW: Accountancy - Show import key if exist (#29265)
|
||||
NEW: Accountancy - Auto-determine piece number in FEC import (#29672)
|
||||
NEW: Accountancy - Option to transfer only reconciled lines from bank (#29408)
|
||||
NEW: Accountancy - Separation of accounting default account for salary and expense report
|
||||
NEW: Various payment - Use list of accounting account when edit (#27992)
|
||||
NEW: Add option to change all service dates at once
|
||||
NEW: Add a default limit in nb to agenda export
|
||||
NEW: Add a Feedback-ID into email headers
|
||||
|
|
@ -97,7 +101,6 @@ NEW: Allow smileys into emailing html content
|
|||
NEW: Allow to set a default project for POS sales (#27042)
|
||||
NEW: animation for display spinner when waiting response
|
||||
NEW: Asset Module - make asset model creation in a single step (#26982)
|
||||
NEW: auto-determine piece number in FEC import (#29672)
|
||||
NEW: auto fill infos in template email
|
||||
NEW: Automatically fill matching extra fields of object on line creation. (#27240)
|
||||
NEW: Can add documents on a payment (#29660)
|
||||
|
|
@ -134,7 +137,7 @@ NEW: fetch object by element for website account card
|
|||
NEW: filter on sale representative in contact list
|
||||
NEW: Filter shipments by selecting multiple shipping methods (#28376)
|
||||
NEW: Font param Look and Feel (#29302)
|
||||
NEW: fuctionnality for stock configuration prompt in AI module (#28030)
|
||||
NEW: functionality for stock configuration prompt in AI module (#28030)
|
||||
NEW: functionality to delete contact of company list
|
||||
NEW: functionality to display codebar on pdf files (#29623)
|
||||
NEW: functionality to list event for user
|
||||
|
|
@ -166,7 +169,6 @@ NEW: notification action triggers for cancelling orders and invoices
|
|||
NEW: now button when editing an event
|
||||
NEW: online signature of shipments (#29559)
|
||||
NEW: On OAuth Google login, no prompt at all if already logged in Google
|
||||
NEW: Option to transfer only reconciliated lines from bank (#29408)
|
||||
NEW: Param to show main menu logo in color look and feel (#29305)
|
||||
NEW: Payment page received from donations
|
||||
NEW: possibility to define a completely inactive module (#29289)
|
||||
|
|
@ -179,7 +181,6 @@ NEW: resource address, phone, email & maxusers (#28185)
|
|||
NEW: Script for fast identification of missing/unused/duplicate translations
|
||||
NEW: search member by date
|
||||
NEW: See the documents of my subordinates (#28318)
|
||||
NEW: separation of expense report from salary accounting code
|
||||
NEW: Show error on ical parse
|
||||
NEW: Show the profit per attendee on events
|
||||
NEW: signed status CRUD to contract and fichinter
|
||||
|
|
@ -206,7 +207,6 @@ NEW: Update expense report card.php to allow pdf preview even without thumbnail
|
|||
NEW: update price with auto to use const for rounding prices (#29350)
|
||||
NEW: Use a nicer combo list to select the export accounting format
|
||||
NEW: users can set their own length for short lists
|
||||
NEW: Various payment - Use list of account when edit (#27992)
|
||||
NEW: warning message when cloning a product whose status is not to sell (#28374)
|
||||
PERF: Performance enhancement on Invoice/Paiement area page
|
||||
PERF: Use cache for loaded users/contact on project list
|
||||
|
|
@ -219,6 +219,7 @@ SEC: Reduce nb of var without WAF used when using the website module
|
|||
|
||||
For developers or integrators:
|
||||
------------------------------
|
||||
NEW: Situation invoice - Add new official progressive mode - (constant INVOICE_USE_SITUATION = 2)
|
||||
NEW: $noescapetags param of dol_escape_html works if attributes
|
||||
NEW: Add createInvoiceFromContract to API invoice (#27277)
|
||||
NEW: add debugging info to api/status if non-production
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2015-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -199,7 +200,7 @@ fputs($fp, ' </dir>'."\n");
|
|||
fputs($fp, '</dolibarr_htdocs_dir>'."\n");
|
||||
|
||||
asort($checksumconcat); // Sort list of checksum
|
||||
//var_dump($checksumconcat);
|
||||
|
||||
fputs($fp, '<dolibarr_htdocs_dir_checksum>'."\n");
|
||||
fputs($fp, md5(join(',', $checksumconcat))."\n");
|
||||
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
|
|
@ -225,7 +226,6 @@ if (!empty($argv[4])) {
|
|||
$user=new User($db);
|
||||
}
|
||||
|
||||
//var_dump($user->db->database_name);
|
||||
$ret=$user->fetch('', 'admin');
|
||||
if (! $ret > 0) {
|
||||
print 'An admin user with login "admin" must exists to use this script.'."\n";
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
$sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')";
|
||||
$sql .= ", '".$this->db->idate($this->periode)."'";
|
||||
$sql .= ", cs.libelle as label, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode as period, cs.import_key";
|
||||
$sql .= ", periode='".$this->db->idate($this->periode)."'";
|
||||
$sql .= ", periode = '".$this->db->idate($this->period ? $this->period : $this->periode)."'";
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, fk_account, fk_mode_reglement, libelle, date_ech, periode, amount, fk_projet, entity, fk_user_author, fk_user, date_creation)";
|
||||
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
|
||||
$sql = "SELECT id_users, nom as name, reponses";
|
||||
|
|
|
|||
|
|
@ -42,6 +42,32 @@ const PREFIXES = [
|
|||
'php' => ['/* ', ' * ', ' */', '<?php'],
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Expand tabs in string to spaces.
|
||||
*
|
||||
* @param $str String in which to expand the tabs to spaces
|
||||
* @param $tabWidth Width to use for a tabstop
|
||||
*
|
||||
* @return string Expanded string value.
|
||||
*/
|
||||
function expandTabs($str, $tabWidth)
|
||||
{
|
||||
$expanded = '';
|
||||
$col = 0;
|
||||
$len = mb_strlen($str);
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
if ($str[$i] == "\t") {
|
||||
$expanded .= str_repeat(' ', $tabWidth - ($col % $tabWidth));
|
||||
$col += $tabWidth - ($col % $tabWidth);
|
||||
} else {
|
||||
$expanded .= $str[$i];
|
||||
$col++;
|
||||
}
|
||||
}
|
||||
return $expanded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update or add copyright notice in a file
|
||||
*
|
||||
|
|
@ -70,18 +96,45 @@ function updateCopyrightNotice($filename, $fileType, $name, $email)
|
|||
$n = 50;
|
||||
$lines = implode('', array_slice(file($filename), 0, $n));
|
||||
|
||||
// Define the regex pattern for matching copyright notices
|
||||
$pattern = "~(?:{$r_prefix0}|{$r_prefix1})Copyright \(C\)\s+(?:(?:\d{4}-)?(?<year>\d{4}))\s+{$r_name}\s*\<{$r_email}>~";
|
||||
// Based on the tendency to limit the length of the spacing between the name
|
||||
// and email to the smallest one, determine the biggest offset from the start
|
||||
// of a name to the start of the email, and use that for the current name/email
|
||||
// offset if it is sufficient.
|
||||
|
||||
// Pattern to match any copyright already present
|
||||
$allpattern = "~(?:{$r_prefix0}|{$r_prefix1})Copyright \(C\)\s+(?:(?:\d{4}-)?(?:\d{4}))\s+(\S.*)<\S+>~";
|
||||
// Set minimum offset based of width of new name
|
||||
$nameStartToMailStartOffset = 4 * (int) ((mb_strlen($r_name) + 4) / 4);
|
||||
|
||||
if (preg_match_all($allpattern, $lines, $allmatches)) {
|
||||
foreach ($allmatches[1] as $nameAndSpaces) {
|
||||
//print $nameAndSpaces."\n";
|
||||
$nameAndSpaces = expandTabs($nameAndSpaces, 4);
|
||||
$currentOffset = mb_strlen($nameAndSpaces);
|
||||
$currentOffset = 4 * (int) ((3 + $currentOffset) / 4);
|
||||
//print "Other offset $nameAndSpaces: $currentOffset\n";
|
||||
if ($currentOffset > $nameStartToMailStartOffset) {
|
||||
$nameStartToMailStartOffset = $currentOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pattern to match the line matching the current developer
|
||||
$pattern = "~(?:{$r_prefix0}|{$r_prefix1})Copyright \(C\)\s+(?:(?:(?<start>\d{4})-)?(?<last>\d{4}))\s+{$r_name}\s*\<{$r_email}>~";
|
||||
// Check if the lines match the pattern
|
||||
$matches = array();
|
||||
if (preg_match($pattern, $lines, $matches)) {
|
||||
$existingYear = $matches['year'];
|
||||
$existingYear = $matches['last'];
|
||||
if (array_key_exists('start', $matches)) {
|
||||
$startYear = $matches['start'];
|
||||
} else {
|
||||
$startYear = $existingYear;
|
||||
}
|
||||
|
||||
// Check if the existing year is different from the current year
|
||||
if ($existingYear !== date('Y')) {
|
||||
// Update the year range to include or be up to the current year
|
||||
$updatedNotice = preg_replace('/(\d{4})(-\d{4})?\s+/', $existingYear . '-' . date('Y') . "\t", $matches[0]);
|
||||
// Extend the year range to the current year
|
||||
$updatedNotice = preg_replace('/(?:\d{4}-)?\d{4}\s+/', $startYear . '-' . date('Y') . "\t", $matches[0]);
|
||||
|
||||
// Replace the old notice with the updated one in the file
|
||||
file_put_contents($filename, preg_replace($pattern, $updatedNotice, file_get_contents($filename)));
|
||||
|
|
@ -90,7 +143,8 @@ function updateCopyrightNotice($filename, $fileType, $name, $email)
|
|||
// If the existing year is the same, no need to update
|
||||
} else {
|
||||
// Adjust tabs for proper alignment
|
||||
$emailTabs = str_repeat("\t", (int) (max(0, (31 - mb_strlen($name)) / 4)));
|
||||
// print "Offset:".$nameStartToMailStartOffset."\n";
|
||||
$emailTabs = str_repeat("\t", (int) (max(0, ($nameStartToMailStartOffset + 4 - mb_strlen($name)) / 4)));
|
||||
|
||||
// No match found, add a new line to the header
|
||||
$newNotice = "Copyright (C) " . date('Y') . "\t\t" . $name . $emailTabs . "<" . $email . ">";
|
||||
|
|
@ -114,6 +168,7 @@ function updateCopyrightNotice($filename, $fileType, $name, $email)
|
|||
|
||||
// Write the updated content back to the file
|
||||
file_put_contents($filename, $fileContent);
|
||||
// print $fileContent;
|
||||
return true; // Change detected
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,40 +9,40 @@
|
|||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanPluginUnknownPropertyType : 1550+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 920+ occurrences
|
||||
// PhanUndeclaredProperty : 840+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 750+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 480+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 470+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 410+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 350+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 330+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 220+ occurrences
|
||||
// PhanTypeMismatchProperty : 210+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 160+ occurrences
|
||||
// PhanPluginUnknownPropertyType : 1490+ occurrences
|
||||
// PhanUndeclaredProperty : 830+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 740+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 720+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 440+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 430+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 360+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 320+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 200+ occurrences
|
||||
// PhanTypeMismatchProperty : 200+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 160+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 150+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 110+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 80+ occurrences
|
||||
// PhanPluginUndeclaredVariableIsset : 70+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 60+ occurrences
|
||||
// PhanRedefineFunction : 55+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 50+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 55+ occurrences
|
||||
// PhanRedefineFunction : 50+ occurrences
|
||||
// PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 40+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 35+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 25+ occurrences
|
||||
// PhanPossiblyNullTypeMismatchProperty : 15+ occurrences
|
||||
// PhanTypeComparisonFromArray : 15+ occurrences
|
||||
// PhanUndeclaredConstant : 15+ occurrences
|
||||
// PhanEmptyForeach : 10+ occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 10+ occurrences
|
||||
// PhanPluginConstantVariableNull : 10+ occurrences
|
||||
// PhanPluginDuplicateExpressionBinaryOp : 10+ occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 10+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccessButGotNull : 9 occurrences
|
||||
// PhanUndeclaredMethod : 9 occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 8 occurrences
|
||||
// PhanPluginDuplicateArrayKey : 8 occurrences
|
||||
// PhanPluginDuplicateExpressionBinaryOp : 7 occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 7 occurrences
|
||||
// PhanTypeExpectedObjectPropAccessButGotNull : 6 occurrences
|
||||
// PhanParamTooMany : 3 occurrences
|
||||
// PhanInvalidFQSENInClasslike : 2 occurrences
|
||||
// PhanParamTooMany : 2 occurrences
|
||||
// PhanAccessMethodProtected : 1 occurrence
|
||||
// PhanEmptyFQSENInClasslike : 1 occurrence
|
||||
|
||||
|
|
@ -52,10 +52,7 @@ return [
|
|||
'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => [/* Traverses Adherent as array, ignore */ 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/adherents/list.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/admin/dict.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/mails_templates.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/admin/security_file.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
|
|
@ -63,7 +60,7 @@ return [
|
|||
'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/asset/admin/setup.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/asset/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/asset/class/assetaccountancycodes.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/asset/class/assetmodel.class.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -96,11 +93,10 @@ return [
|
|||
'htdocs/bookcal/lib/bookcal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookcal/lib/bookcal_availabilities.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookmarks/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookmarks/class/bookmark.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/categories/edit.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/edit.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/index.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/info.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/photos.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'],
|
||||
|
|
@ -118,24 +114,22 @@ return [
|
|||
'htdocs/comm/action/list.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/action/pertype.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/comm/action/peruser.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeComparisonFromArray'],
|
||||
'htdocs/comm/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/mailing/card.php' => ['PhanPluginSuspiciousParamPosition', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/mailing/cibles.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/comm/mailing/class/advtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/comm/propal/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/comm/propal/card.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/propal/class/propal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/comm/propal/class/propalestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/comm/propal/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/commande/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/commande/class/commandestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/commande/customer.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/commande/customer.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/commande/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -145,7 +139,7 @@ return [
|
|||
'htdocs/compta/bank/annuel.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/bank/bankentries_list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/bank/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/bank/class/account.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/bank/class/account.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/bank/class/api_bankaccounts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/bank/class/bankcateg.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/compta/bank/graph.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -157,10 +151,10 @@ return [
|
|||
'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/bank/various_payment/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/bank/various_payment/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/charges/index.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/deplacement/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/deplacement/class/deplacement.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/deplacement/class/deplacementstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -196,8 +190,8 @@ return [
|
|||
'htdocs/compta/paiement/class/cpaiement.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/paiement/class/paiement.class.php' => ['PhanEmptyForeach', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/paiement/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/payment_vat/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/prelevement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/prelevement/class/bonprelevement.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'],
|
||||
|
|
@ -220,13 +214,13 @@ return [
|
|||
'htdocs/compta/sociales/list.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/compta/sociales/payments.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/byratecountry.php' => ['PhanPluginEmptyStatementIf'],
|
||||
'htdocs/compta/stats/cabyprodserv.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/stats/cabyprodserv.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/cabyuser.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/casoc.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/stats/casoc.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/supplier_turnover.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/supplier_turnover_by_prodserv.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/stats/supplier_turnover_by_thirdparty.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/stats/supplier_turnover_by_prodserv.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/supplier_turnover_by_thirdparty.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/tva/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/tva/class/tva.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -243,7 +237,7 @@ return [
|
|||
'htdocs/contact/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/contact/perso.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/contrat/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/contrat/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/contrat/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/contrat/class/api_contracts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/contrat/messaging.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -253,10 +247,10 @@ return [
|
|||
'htdocs/core/actions_comments.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/actions_extrafields.inc.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/actions_lineupdown.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/actions_linkedfiles.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/actions_linkedfiles.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/actions_massactions.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -270,16 +264,15 @@ return [
|
|||
'htdocs/core/boxes/box_actions_future.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_external_rss.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/boxes/box_funnel_of_prospection.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_invoices_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_invoices_peryear.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_invoices_supplier_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_invoices_permonth.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_graph_invoices_supplier_permonth.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/boxes/box_graph_nb_tickets_type.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/boxes/box_graph_new_vs_close_ticket.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/boxes/box_graph_orders_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_orders_supplier_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_product_distribution.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_propales_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_graph_orders_permonth.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_graph_orders_supplier_permonth.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_graph_product_distribution.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_graph_propales_permonth.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_graph_ticket_by_severity.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/boxes/box_last_modified_ticket.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/boxes/box_last_ticket.php' => ['PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -293,10 +286,10 @@ return [
|
|||
'htdocs/core/class/canvas.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/ccountry.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/cgenericdic.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commonhookactions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/class/commoninvoice.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/commonobject.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commonobject.class.php' => ['PhanParamTooMany', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commonobjectline.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/commonorder.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/commonpeople.class.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -307,7 +300,6 @@ return [
|
|||
'htdocs/core/class/ctypent.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/ctyperesource.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/cunits.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/defaultvalues.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/diasporahandler.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/class/discount.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/doleditor.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -322,7 +314,7 @@ return [
|
|||
'htdocs/core/class/extralanguages.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/class/fediverseparser.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/class/fileupload.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/core/class/fiscalyear.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/fiscalyear.class.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/hookmanager.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/html.formaccounting.class.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/html.formbarcode.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
|
|
@ -335,7 +327,6 @@ return [
|
|||
'htdocs/core/class/html.formother.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/html.formprojet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/html.formsetup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/class/html.formsms.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/core/class/html.formticket.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/html.formwebsite.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/infobox.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
|
|
@ -346,7 +337,7 @@ return [
|
|||
'htdocs/core/class/notify.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/openid.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/reddithandler.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/class/rssparser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess'],
|
||||
'htdocs/core/class/rssparser.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/class/smtps.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/core/class/socialnetworkmanager.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/core/class/stats.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch'],
|
||||
|
|
@ -369,23 +360,18 @@ return [
|
|||
'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/categories.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/lib/contact.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/contract.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/cron.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/core/lib/date.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/lib/doc.lib.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/donation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/ecm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/emailing.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/eventorganization.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/expedition.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/expensereport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/fichinter.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/fiscalyear.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/files.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/fourn.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/ftp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/lib/functions.lib.php' => ['PhanPluginDuplicateArrayKey'],
|
||||
|
|
@ -403,16 +389,15 @@ return [
|
|||
'htdocs/core/lib/loan.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/mailmanspip.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/memory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/oauth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/openid_connect.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/order.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/payments.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/pdf.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/pdf.lib.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/prelevement.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/product.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/project.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/project.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/propal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/core/lib/receiptprinter.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/reception.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
|
|
@ -421,18 +406,16 @@ return [
|
|||
'htdocs/core/lib/salaries.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/security.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/security2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/sendings.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/sendings.lib.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/signature.lib.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/socialnetwork.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/stock.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/supplier_proposal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/core/lib/takepos.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/tax.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/tax.lib.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/ticket.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/treeview.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/trip.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/usergroups.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/lib/vat.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/usergroups.lib.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/lib/website.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -532,10 +515,9 @@ return [
|
|||
'htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/search_page.php' => ['PhanEmptyForeach', 'PhanPluginBothLiteralsBinaryOp'],
|
||||
'htdocs/core/tpl/advtarget.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/ajaxrow.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/bloc_comment.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/card_presend.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/card_presend.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/commonfields_add.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/core/tpl/commonfields_edit.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/commonfields_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -556,8 +538,8 @@ return [
|
|||
'htdocs/core/tpl/objectline_title.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/objectline_view.tpl.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/onlinepaymentlinks.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/passwordforgotten.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/passwordreset.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/passwordforgotten.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/passwordreset.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/resource_add.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/resource_view.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/triggers/dolibarrtriggers.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
|
|
@ -568,13 +550,12 @@ return [
|
|||
'htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess'],
|
||||
'htdocs/core/triggers/interface_80_modStripe_Stripe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/cron/class/cronjob.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp'],
|
||||
'htdocs/cron/class/cronjob.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/cron/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/datapolicy/class/datapolicy.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/datapolicy/class/datapolicycron.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/datapolicy/lib/datapolicy.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/dav/dav.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/debugbar/class/DataCollector/DolConfigCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/debugbar/class/DataCollector/DolMemoryCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
|
|
@ -626,7 +607,7 @@ return [
|
|||
'htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/expedition/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/class/api_shipments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expedition/class/expedition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/expedition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/expeditionlinebatch.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/expedition/class/expeditionstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expedition/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -636,24 +617,22 @@ return [
|
|||
'htdocs/expedition/note.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/shipment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/class/api_expensereports.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expensereport/class/expensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/expensereport/class/expensereport_ik.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expensereport/class/expensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/expensereport/class/expensereportstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expensereport/payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expensereport/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/tpl/expensereport_addfile.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/tpl/expensereport_linktofile.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/fichinter.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/fichinter/class/fichinter.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/fichinterstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -680,16 +659,16 @@ return [
|
|||
'htdocs/fourn/facture/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/fourn/facture/list-rec.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/facture/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/facture/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fourn/paiement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/paiement/document.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/product/list.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/ftp/admin/ftpclient.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/ftp/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/ftp/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/holiday/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/holiday/card_group.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/holiday/class/holiday.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/holiday/class/holiday.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/holiday/define_holiday.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/holiday/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/hrm/admin/admin_hrm.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -735,9 +714,8 @@ return [
|
|||
'htdocs/intracommreport/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/intracommreport/class/intracommreport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/intracommreport/lib/intracommreport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/intracommreport/list.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/knowledgemanagement/knowledgerecord_card.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/knowledgemanagement/knowledgerecord_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
|
|
@ -769,14 +747,14 @@ return [
|
|||
'htdocs/multicurrency/class/multicurrency.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/opcachepreload.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/opensurvey/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/opensurvey/lib/opensurvey.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/opensurvey/list.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/results.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/wizard/create_survey.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/class/api_partnerships.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/partnership/class/partnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/class/partnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/class/partnership_type.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/partnership/class/partnershiputils.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/partnership/core/modules/partnership/modules_partnership.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
|
|
@ -794,7 +772,7 @@ return [
|
|||
'htdocs/product/ajax/products.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/canvas/service/actions_card_service.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/html.formproduct.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
|
|
@ -808,41 +786,34 @@ return [
|
|||
'htdocs/product/dynamic_price/class/price_parser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/index.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/product/inventory/card.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/inventory/inventory.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/inventory/lib/inventory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/product/inventory/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/product/stats/card.php' => ['PhanTypeComparisonFromArray'],
|
||||
'htdocs/product/stats/commande.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stats/commande_fournisseur.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stats/facture.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stats/facture_fournisseur.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stats/facturerec.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stats/mo.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stats/propal.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/product/stock/class/api_stockmovements.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/product/stock/class/api_warehouses.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/product/stock/class/entrepot.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/class/entrepot.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/class/mouvementstock.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/class/productlot.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/stock/class/productlot.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/stock/class/productstockentrepot.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/stock/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/massstockmove.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/massstockmove.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/product/stock/movement_card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/product.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/stock/productlot_card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/productlot_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/replenish.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/stats/commande_fournisseur.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stats/expedition.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stats/mo.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stats/reception.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stats/commande_fournisseur.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stats/expedition.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stats/mo.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stats/reception.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stockatdate.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/stocktransfer/class/stocktransfer.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -854,16 +825,15 @@ return [
|
|||
'htdocs/product/stock/tpl/stocktransfer.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/projet/activity/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/projet/activity/perday.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/activity/permonth.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/activity/perweek.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/admin/project.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/ajax/projects.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/projet/class/api_projects.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/class/api_projects.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/projet/class/api_tasks.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/projet/class/project.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/class/project.class.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/projet/class/projectstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/projet/class/task.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/class/task.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/projet/class/taskstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/projet/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/element.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -909,7 +879,7 @@ return [
|
|||
'htdocs/public/stripe/ipn.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/webportal/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -952,15 +922,15 @@ return [
|
|||
'htdocs/recruitment/recruitmentjobposition_document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/recruitmentjobposition_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/recruitment/recruitmentjobposition_note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/resource/class/dolresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/resource/class/dolresource.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/resource/class/html.formresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeExpectedObjectPropAccess'],
|
||||
'htdocs/resource/element_resource.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/admin/salaries.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/salaries/class/api_salaries.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/salaries/class/paymentsalary.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/class/paymentsalary.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/class/salariesstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/salaries/class/salary.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/salaries/class/salary.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/salaries/document.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/info.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -970,14 +940,14 @@ return [
|
|||
'htdocs/societe/ajax/ajaxcompanies.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/societe/canvas/actions_card_common.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/societe/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/societe/card.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/societe/checkvat/checkVatPopup.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/societe/class/api_contacts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
'htdocs/societe/class/client.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/societe/class/companybankaccount.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/societe/class/companypaymentmode.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/societe/class/societeaccount.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/societe/class/societeaccount.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/societe/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/paymentmodes.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -987,26 +957,23 @@ return [
|
|||
'htdocs/societe/website.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/admin/stripe.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/charge.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/stripe/class/stripe.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/stripe/lib/stripe.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/stripe/payout.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/transaction.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/supplier_proposal/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/supplier_proposal/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/api_supplier_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/support/inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanRedefineFunction'],
|
||||
'htdocs/takepos/admin/orderprinters.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/takepos/admin/terminal.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/admin/terminal.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/takepos/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/takepos/floors.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/freezone.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/index.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/takepos/invoice.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/takepos/pay.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/pay.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/takepos/public/menu.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/takepos/split.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/theme/eldy/badges.inc.php' => ['PhanRedefineFunction'],
|
||||
|
|
@ -1036,16 +1003,15 @@ return [
|
|||
'htdocs/user/bank.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/user/card.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/user/class/api_users.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/user/class/user.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/user/class/user.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/user/class/usergroup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/user/group/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/user/param_ihm.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/user/passwordforgotten.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/variants/ajax/get_attribute_values.php' => ['PhanTypeComparisonFromArray'],
|
||||
'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'],
|
||||
'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/variants/lib/variants.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/variants/tpl/productattributevalueline_view.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/viewimage.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanRedefineFunction'],
|
||||
|
|
@ -1061,18 +1027,16 @@ return [
|
|||
'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/webportal/class/webPortalTheme.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/webportal/class/webportalorder.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalpartnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/webportal/class/webportalpropal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalorder.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalpropal.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/lib/webportal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/webservices/server_actioncomm.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_category.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_contact.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_order.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_other.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_payment.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_productorservice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_project.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -1086,7 +1050,7 @@ return [
|
|||
'htdocs/website/samples/wrapper.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/website/websiteaccount_card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/workstation/class/api_workstations.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/workstation/class/workstation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/workstation/class/workstation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/workstation/class/workstationresource.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/workstation/class/workstationusergroup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/workstation/lib/workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
|
|
|
|||
|
|
@ -135,8 +135,16 @@ class ParamMatchVisitor extends PluginAwarePostAnalysisVisitor
|
|||
{
|
||||
$class_name = $node->children['class']->children['name'] ?? null;
|
||||
if (!\is_string($class_name)) {
|
||||
throw new NodeException($expr, 'does not have class');
|
||||
// May happen for $this->className::$name(...$arguments); (variable class name)
|
||||
$location = $this->context->getFile().":".$node->lineno;
|
||||
print "$location: Node does not have fixed string class_name - node type ".(is_object($class_name) ? get_class_name($class_name) : gettype($class_name)).PHP_EOL;
|
||||
return;
|
||||
// throw new NodeException($node, 'does not have class');
|
||||
}
|
||||
// } else {
|
||||
// $location = $this->context->getFile().":".$node->lineno;
|
||||
// print "$location: Static call - node type ".get_class($node).PHP_EOL;
|
||||
//}
|
||||
try {
|
||||
$class_name = (string) FullyQualifiedClassName::fromFullyQualifiedString($class_name);
|
||||
} catch (FQSENException $_) {
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ BAN
|
|||
BI
|
||||
BOMs
|
||||
Back
|
||||
Bad value for email, email lwas not verified by Google
|
||||
Bad value for email, email was not verified by Google
|
||||
Bad value for returned userinfo[aud]
|
||||
Bad value for returned userinfo[exp]. Token expired.
|
||||
Bad value for returned userinfo[iss]
|
||||
|
|
@ -302,8 +302,6 @@ ECMAreaDesc2
|
|||
ECMDocsByProducts
|
||||
ECMSectionAutoDesc
|
||||
ECMSectionManualDesc
|
||||
EMail
|
||||
EMails
|
||||
EcmFiles
|
||||
EditAdherent
|
||||
EditAdherentAddress
|
||||
|
|
|
|||
|
|
@ -148,16 +148,20 @@ print '</td></tr>';
|
|||
|
||||
// Accounting groups used for the balance sheet account
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="fieldrequired">'.$langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT").'</td>';
|
||||
print '<td class="fieldrequired">';
|
||||
print $form->textwithpicto($langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT"), $langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNTHelp"));
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input type="text" size="100" id="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT" name="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT" value="' . dol_escape_htmltag(getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT')). '">';
|
||||
print '<input type="text" class="quatrevingtpercent" id="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT" name="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT" value="' . dol_escape_htmltag(getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT')). '">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Accounting groups used for the income statement
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="fieldrequired">'.$langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT").'</td>';
|
||||
print '<td class="fieldrequired">';
|
||||
print $form->textwithpicto($langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT"), $langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENTHelp"));
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input type="text" size="100" id="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT" name="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT" value="' . dol_escape_htmltag(getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')). '">';
|
||||
print '<input type="text" class="quatrevingtpercent" id="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT" name="ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT" value="' . dol_escape_htmltag(getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')). '">';
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_D
|
|||
print '<td>' . img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnCustomerDeposit") . '</td>';
|
||||
if (getDolGlobalInt('ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT')) {
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=1">';
|
||||
|
|
@ -341,7 +341,7 @@ if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_D
|
|||
print '<td>' . img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnSupplierDeposit") . '</td>';
|
||||
if (getDolGlobalInt('ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT')) {
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=1">';
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2017 Laurent Destailleur <eldy@destailleur.fr>
|
||||
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
* 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
|
||||
|
|
@ -414,7 +415,7 @@ print '<tr class="oddeven">';
|
|||
print '<td>'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_SALES").'</td>';
|
||||
if (getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_SALES')) {
|
||||
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisablebindingonsales&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisablebindingonsales&value=1">';
|
||||
|
|
@ -427,7 +428,7 @@ print '<tr class="oddeven">';
|
|||
print '<td>'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_PURCHASES").'</td>';
|
||||
if (getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_PURCHASES')) {
|
||||
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisablebindingonpurchases&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisablebindingonpurchases&value=1">';
|
||||
|
|
@ -440,7 +441,7 @@ print '<tr class="oddeven">';
|
|||
print '<td>'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS").'</td>';
|
||||
if (getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS')) {
|
||||
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisablebindingonexpensereports&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
|
||||
print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setdisablebindingonexpensereports&value=1">';
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@ if ($resql) {
|
|||
}
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ if ($action != 'export_csv') {
|
|||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,18 +35,20 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("accountancy", "bills", "compta"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
$id = GETPOSTINT('id'); // id of record
|
||||
$mode = GETPOST('mode', 'aZ09'); // '' or '_tmp'
|
||||
$piece_num = GETPOSTINT("piece_num"); // id of transaction (several lines share the same transaction id)
|
||||
$piece_num = GETPOSTINT("piece_num") ? GETPOSTINT("piece_num") : GETPOST('ref'); // id of transaction (several lines share the same transaction id)
|
||||
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
|
|
@ -78,6 +80,9 @@ if (!empty($update)) {
|
|||
$action = 'confirm_update';
|
||||
}
|
||||
|
||||
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
|
||||
$hookmanager->initHooks(array('bookkeepingcard', 'globalcard'));
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
// Security check
|
||||
|
|
@ -92,6 +97,7 @@ if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
|||
}
|
||||
|
||||
$permissiontoadd = $user->hasRight('accounting', 'mouvements', 'creer');
|
||||
$permissiontodelete = $user->hasRight('accounting', 'mouvements', 'supprimer');
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -180,7 +186,11 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
$datedoc = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear'));
|
||||
if (GETPOSTINT('doc_datemonth') && GETPOSTINT('doc_dateday') && GETPOSTINT('doc_dateyear')) {
|
||||
$datedoc = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear'));
|
||||
} else {
|
||||
$datedoc = (int) GETPOSTINT('doc_date'); // TODO Use instead the mode day-month-year
|
||||
}
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
|
|
@ -213,6 +223,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
$result = $object->createStd($user, false, $mode);
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
|
|
@ -226,7 +237,7 @@ if (empty($reshook)) {
|
|||
$action = '';
|
||||
}
|
||||
}
|
||||
} elseif ($action == "confirm_delete" && $permissiontoadd) {
|
||||
} elseif ($action == "confirm_delete" && $permissiontoadd) { // Delete line
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$result = $object->fetch($id, null, $mode);
|
||||
|
|
@ -277,6 +288,7 @@ if (empty($reshook)) {
|
|||
$object->amount = 0;
|
||||
|
||||
$result = $object->createStd($user, 0, $mode);
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
||||
|
|
@ -343,6 +355,66 @@ if (empty($reshook)) {
|
|||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete all lines into the transaction
|
||||
$toselect = explode(',', GETPOST('toselect', 'alphanohtml'));
|
||||
|
||||
if ($action == 'deletebookkeepingwriting' && $confirm == "yes" && $permissiontodelete) {
|
||||
$db->begin();
|
||||
|
||||
if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) {
|
||||
$lettering = new Lettering($db);
|
||||
$nb_lettering = $lettering->bookkeepingLetteringAll($toselect, true);
|
||||
if ($nb_lettering < 0) {
|
||||
setEventMessages('', $lettering->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
$nbok = 0;
|
||||
$result = 0;
|
||||
if (!$error) {
|
||||
foreach ($toselect as $toselectid) {
|
||||
$result = $object->fetch($toselectid);
|
||||
if ($result >= 0 && (!isset($object->date_validation) || $object->date_validation === '')) {
|
||||
$result = $object->deleteMvtNum($object->piece_num);
|
||||
if ($result >= 0) {
|
||||
$nbok += $result;
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
} elseif ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
} elseif (isset($object->date_validation) && $object->date_validation != '') {
|
||||
setEventMessages($langs->trans("ValidatedRecordWhereFound"), null, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
|
||||
// Message for elements well deleted
|
||||
if ($nbok > 1) {
|
||||
setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs');
|
||||
} elseif ($nbok > 0) {
|
||||
setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("NoRecordDeleted"), null, 'mesgs');
|
||||
}
|
||||
|
||||
header("Location: ".DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?noreset=1');
|
||||
exit;
|
||||
} else {
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -356,6 +428,7 @@ $formaccounting = new FormAccounting($db);
|
|||
|
||||
$title = $langs->trans("CreateMvts");
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double';
|
||||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-consultation page-card');
|
||||
|
||||
// Confirmation to delete the command
|
||||
|
|
@ -435,11 +508,11 @@ if ($action == 'create') {
|
|||
if (!empty($object->piece_num)) {
|
||||
$backlink = '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?restore_lastsearch_values=1">'.$langs->trans('BackToList').'</a>';
|
||||
|
||||
if ($mode == '_tmp') {
|
||||
/*if ($mode == '_tmp') {
|
||||
print load_fiche_titre($langs->trans("CreateMvts"), $backlink);
|
||||
} else {
|
||||
print load_fiche_titre($langs->trans("UpdateMvts"), $backlink);
|
||||
}
|
||||
}*/
|
||||
|
||||
$head = array();
|
||||
$h = 0;
|
||||
|
|
@ -450,13 +523,22 @@ if ($action == 'create') {
|
|||
|
||||
print dol_get_fiche_head($head, 'transaction', '', -1);
|
||||
|
||||
//dol_banner_tab($object, '', $backlink);
|
||||
$object->ref = (string) $object->piece_num;
|
||||
$object->label = $object->doc_ref;
|
||||
|
||||
$morehtmlref = '<div style="clear: both;"></div>';
|
||||
$morehtmlref .= '<div class="refidno opacitymedium">';
|
||||
$morehtmlref .= $object->label;
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
dol_banner_tab($object, 'ref', $backlink, 1, 'piece_num', 'piece_num', $morehtmlref);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Account movement
|
||||
print '<tr>';
|
||||
|
|
@ -464,6 +546,37 @@ if ($action == 'create') {
|
|||
print '<td>'.($mode == '_tmp' ? '<span class="opacitymedium" title="Id tmp '.$object->piece_num.'">'.$langs->trans("Draft").'</span>' : $object->piece_num).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Ref document
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
print $langs->trans('Piece');
|
||||
print '</td>';
|
||||
if ($action != 'editdocref') {
|
||||
print '<td class="right">';
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editdocref&token='.newToken().'&piece_num='.((int) $object->piece_num).'&mode='.urlencode((string) $mode).'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editdocref') {
|
||||
print '<form name="setdocref" action="'.$_SERVER["PHP_SELF"].'?piece_num='.((int) $object->piece_num).'" method="POST">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setdocref">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag($object->doc_ref).'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $object->doc_ref;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
|
|
@ -526,41 +639,11 @@ if ($action == 'create') {
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Ref document
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
print $langs->trans('Piece');
|
||||
print '</td>';
|
||||
if ($action != 'editdocref') {
|
||||
print '<td class="right">';
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editdocref&token='.newToken().'&piece_num='.((int) $object->piece_num).'&mode='.urlencode((string) $mode).'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editdocref') {
|
||||
print '<form name="setdocref" action="'.$_SERVER["PHP_SELF"].'?piece_num='.((int) $object->piece_num).'" method="POST">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setdocref">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag($object->doc_ref).'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $object->doc_ref;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '<div class="fichehalfright">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
|
@ -582,6 +665,16 @@ if ($action == 'create') {
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Due date (if invoice)
|
||||
//if (in_array($object->doc_type, array('customer_invoice', 'supplier_invoice'))) {
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $form->textwithpicto($langs->trans('DateDue'), $langs->trans("IfTransactionHasDueDate")) . '</td>';
|
||||
print '<td>';
|
||||
print $object->date_lim_reglement ? dol_print_date($object->date_lim_reglement, 'day') : ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
//}
|
||||
|
||||
// Don't show in tmp mode, inevitably empty
|
||||
if ($mode != "_tmp") {
|
||||
// Date document export
|
||||
|
|
@ -611,14 +704,6 @@ if ($action == 'create') {
|
|||
}
|
||||
}
|
||||
|
||||
// Due date
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans('DateDue') . '</td>';
|
||||
print '<td>';
|
||||
print $object->date_lim_reglement ? dol_print_date($object->date_lim_reglement, 'day') : ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Validate
|
||||
/*
|
||||
print '<tr>';
|
||||
|
|
@ -663,21 +748,52 @@ if ($action == 'create') {
|
|||
|
||||
print '</div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '</div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
// Variable that contains all transaction lines
|
||||
$tmptoselect = array();
|
||||
$atleastonevalidated = 0;
|
||||
$atleastoneexported = 0;
|
||||
foreach ($object->linesmvt as $line) {
|
||||
$tmptoselect[] = $line->id;
|
||||
if (!empty($line->date_validation)) {
|
||||
$atleastonevalidated = 1;
|
||||
}
|
||||
if (!empty($line->date_export) || !empty($line->date_validation)) {
|
||||
$atleastoneexported = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != '_tmp' && !$atleastonevalidated) {
|
||||
print "\n".'<div class="tabsAction">'."\n";
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
if ($permissiontodelete) {
|
||||
if (!isset($hookmanager->resArray['no_button_edit']) || $hookmanager->resArray['no_button_edit'] != 1) {
|
||||
print dolGetButtonAction('', $langs->trans('Delete'), 'delete', DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?action=deletebookkeepingwriting&confirm=yes&token='.newToken().'&piece_num='.((int) $object->piece_num).'&toselect='.implode(',', $tmptoselect), '', $permissiontodelete);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
// List of movements
|
||||
print load_fiche_titre($langs->trans("ListeMvts"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?piece_num='.((int) $object->piece_num).'" method="post">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?piece_num='.((int) $object->piece_num).'" method="POST">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
|
|
@ -757,7 +873,7 @@ if ($action == 'create') {
|
|||
print '<tr class="oddeven" data-lineid="'.((int) $line->id).'">';
|
||||
print '<!-- td columns in add mode -->';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account('', 'accountingaccount_number', 1, array(), 1, 1, 'minwidth200 maxwidth500');
|
||||
print $formaccounting->select_account($action == 'add' ? GETPOST('accountingaccount_number') : '', 'accountingaccount_number', 1, array(), 1, 1, 'minwidth200 maxwidth500');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because:
|
||||
|
|
@ -842,10 +958,12 @@ if ($action == 'create') {
|
|||
if ($mode == '_tmp' && $action == '' && $permissiontoadd) {
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
if ($total_debit == $total_credit) {
|
||||
print '<a class="button" href="'.$_SERVER["PHP_SELF"].'?piece_num='.((int) $object->piece_num).'&action=valid">'.$langs->trans("ValidTransaction").'</a>';
|
||||
if (empty($total_debit) && empty($total_credit)) {
|
||||
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("EnterNonEmptyLinesFirst")).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
|
||||
} elseif ($total_debit == $total_credit) {
|
||||
print '<a class="button" href="'.$_SERVER["PHP_SELF"].'?piece_num='.((int) $object->piece_num).'&action=valid&token='.newToken().'">'.$langs->trans("ValidTransaction").'</a>';
|
||||
} else {
|
||||
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $debit, $credit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
|
||||
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $total_debit, $total_credit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
|
||||
}
|
||||
|
||||
print ' ';
|
||||
|
|
|
|||
|
|
@ -846,7 +846,7 @@ $moreforfilter .= '</div>';
|
|||
$moreforfilter .= '</div>';
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1706,7 +1706,7 @@ class BookKeeping extends CommonObject
|
|||
*
|
||||
* @param int $piecenum Piecenum to delete
|
||||
* @param string $mode Mode ('' or '_tmp')
|
||||
* @return int Result
|
||||
* @return int Nb of record deleted
|
||||
*/
|
||||
public function deleteMvtNum($piecenum, $mode = '')
|
||||
{
|
||||
|
|
@ -1717,6 +1717,8 @@ class BookKeeping extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
|
||||
$nbprocessed = 0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// first check if line not yet in bookkeeping
|
||||
|
|
@ -1737,10 +1739,13 @@ class BookKeeping extends CommonObject
|
|||
}
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
} else {
|
||||
$nbprocessed = $this->db->affected_rows($resql);
|
||||
}
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
|
||||
return $nbprocessed;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2349,12 +2354,20 @@ class BookKeeping extends CommonObject
|
|||
|
||||
$sql_list = array();
|
||||
if (!empty($conf->cache['active_fiscal_period_cached']) && is_array($conf->cache['active_fiscal_period_cached'])) {
|
||||
$i = 0;
|
||||
foreach ($conf->cache['active_fiscal_period_cached'] as $fiscal_period) {
|
||||
$sql_list[] = "('" . $this->db->idate($fiscal_period['date_start']) . "' <= ".$this->db->sanitize($alias)."doc_date AND ".$this->db->sanitize($alias)."doc_date <= '" . $this->db->idate($fiscal_period['date_end']) . "')";
|
||||
$sql_list[$i] = "(";
|
||||
$sql_list[$i] .= "'".$this->db->idate($fiscal_period['date_start']) . "' <= ".$this->db->sanitize($alias)."doc_date";
|
||||
if (!empty($fiscal_period['date_end'])) {
|
||||
$sql_list[$i] .= " AND ";
|
||||
$sql_list[$i] .= $this->db->sanitize($alias)."doc_date <= '" . $this->db->idate($fiscal_period['date_end'])."'";
|
||||
}
|
||||
$sql_list[$i] .= ")";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$sqlsanitized = implode(' OR ', $sql_list);
|
||||
self::$can_modify_bookkeeping_sql_cached[$alias] = !empty($sql_list) ? " AND (".$sqlsanitized.")" : "";
|
||||
self::$can_modify_bookkeeping_sql_cached[$alias] = empty($sql_list) ? "" : " AND (".$sqlsanitized.")";
|
||||
}
|
||||
|
||||
return self::$can_modify_bookkeeping_sql_cached[$alias];
|
||||
|
|
|
|||
|
|
@ -124,14 +124,28 @@ if (empty($reshook)) {
|
|||
$separate_auxiliary_account = GETPOST('separate_auxiliary_account', 'aZ09');
|
||||
$generate_bookkeeping_records = GETPOST('generate_bookkeeping_records', 'aZ09');
|
||||
|
||||
$result = $object->closeFiscalPeriod($current_fiscal_period['id'], $new_fiscal_period_id, $separate_auxiliary_account, $generate_bookkeeping_records);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs');
|
||||
$error = 0;
|
||||
if ($generate_bookkeeping_records) {
|
||||
if (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT')) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors');
|
||||
}
|
||||
if (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
|
||||
exit;
|
||||
if (!$error) {
|
||||
$result = $object->closeFiscalPeriod($current_fiscal_period['id'], $new_fiscal_period_id, $separate_auxiliary_account, $generate_bookkeeping_records);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs');
|
||||
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} elseif ($action == 'confirm_step_3' && $confirm == "yes") {
|
||||
$inventory_journal_id = GETPOSTINT('inventory_journal_id');
|
||||
|
|
@ -301,7 +315,7 @@ if (!empty($current_fiscal_period)) {
|
|||
print load_fiche_titre($langs->trans("Closure") . " - " . $fiscal_period_nav_text, '', 'title_accountancy');
|
||||
|
||||
if (empty($current_fiscal_period)) {
|
||||
print $langs->trans('ErrorNoFiscalPeriodActiveFound', $langs->trans("Accounting"), $langs->trans("Setup"), $langs->trans("FiscalPeriod"));
|
||||
print $langs->trans('ErrorNoFiscalPeriodActiveFound', $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("FiscalPeriod"));
|
||||
}
|
||||
|
||||
if (isset($current_fiscal_period)) {
|
||||
|
|
|
|||
|
|
@ -101,13 +101,14 @@ $formaccounting = new FormAccounting($db);
|
|||
|
||||
if (!empty($id)) {
|
||||
$sql = "SELECT f.ref, f.rowid as facid, l.fk_product, l.description, l.price,";
|
||||
$sql .= " l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice,";
|
||||
$sql .= " l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice, l.fk_code_ventilation,";
|
||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label,";
|
||||
if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
|
||||
$sql .= " ppe.accountancy_code_sell as code_sell,";
|
||||
} else {
|
||||
$sql .= " p.accountancy_code_sell as code_sell,";
|
||||
}
|
||||
$sql .= " l.fk_code_ventilation, aa.account_number, aa.label";
|
||||
$sql .= " aa.account_number, aa.label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
|
||||
if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
|
||||
|
|
@ -139,18 +140,23 @@ if (!empty($id)) {
|
|||
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Ref facture
|
||||
// Ref invoice
|
||||
print '<tr><td>'.$langs->trans("Invoice").'</td>';
|
||||
$facture_static->ref = $objp->ref;
|
||||
$facture_static->id = $objp->facid;
|
||||
print '<td>'.$facture_static->getNomUrl(1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("Line").'</td>';
|
||||
print '<td>'.nl2br($objp->description).'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Account").'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.dolPrintHTML($objp->description).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ProductLabel").'</td>';
|
||||
print '<td>'.dol_trunc($objp->product_label, 24).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Account").'</td><td>';
|
||||
print $formaccounting->select_account($objp->fk_code_ventilation, 'codeventil', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -41,17 +40,6 @@ $langs->loadLangs(array("compta", "bills", "other", "accountancy"));
|
|||
$validatemonth = GETPOSTINT('validatemonth');
|
||||
$validateyear = GETPOSTINT('validateyear');
|
||||
|
||||
// Security check
|
||||
if (!isModEnabled('accounting')) {
|
||||
accessforbidden();
|
||||
}
|
||||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (!$user->hasRight('accounting', 'bind', 'write')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$accountingAccount = new AccountingAccount($db);
|
||||
|
||||
$month_start = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
|
||||
|
|
@ -85,7 +73,7 @@ if (!isModEnabled('accounting')) {
|
|||
if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
|
||||
if (!$user->hasRight('accounting', 'bind', 'write')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
|
@ -260,7 +248,7 @@ if ($action == 'validatehistory' && $user->hasRight('accounting', 'bind', 'write
|
|||
}
|
||||
|
||||
if ($suggestedid > 0) {
|
||||
$sqlupdate = "UPDATE ".MAIN_DB_PREFIX."facturedet";
|
||||
$sqlupdate = "UPDATE ".$db->prefix()."facturedet";
|
||||
$sqlupdate .= " SET fk_code_ventilation = ".((int) $suggestedid);
|
||||
$sqlupdate .= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".((int) $facture_static_det->id);
|
||||
|
||||
|
|
@ -321,7 +309,7 @@ if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1) {
|
|||
|
||||
$y = $year_current;
|
||||
|
||||
$buttonbind = '<a class="button small" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'">'.img_picto($langs->trans("ValidateHistory"), 'link', 'class="pictofixedwidth fa-color-unset"').$langs->trans("ValidateHistory").'</a>';
|
||||
$buttonbind = '<a class="button small" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'&year='.$year_current.'">'.img_picto($langs->trans("ValidateHistory"), 'link', 'class="pictofixedwidth fa-color-unset"').$langs->trans("ValidateHistory").'</a>';
|
||||
|
||||
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1, 0, $buttonbind);
|
||||
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||
|
|
@ -363,8 +351,9 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(f.datef) = ".((string) $j), "fd.total_ht", "0").") AS month".str_pad((string) $j, 2, "0", STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(f.datef) = ".((string) $j), "1", "0").") AS nbmonth".str_pad((string) $j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(fd.total_ht) as total";
|
||||
$sql .= " SUM(fd.total_ht) as total, COUNT(fd.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
|
|
@ -421,6 +410,7 @@ if ($resql) {
|
|||
print $row[1];
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
for ($i = 2; $i <= 13; $i++) {
|
||||
$cursormonth = (getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1) + $i - 2);
|
||||
if ($cursormonth > 12) {
|
||||
|
|
@ -429,17 +419,19 @@ if ($resql) {
|
|||
$cursoryear = ($cursormonth < getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '<td class="right nowraponall amount" title="'.price($row[2*$i - 2]).' - '.$row[2*$i - 1].' lines">';
|
||||
print price($row[2*$i - 2]);
|
||||
// Add link to make binding
|
||||
if (!empty(price2num($row[$i]))) {
|
||||
if (!empty(price2num($row[2*$i - 2])) || !empty($row[2*$i - 1])) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&year='.$y.'&validatemonth='.((int) $cursormonth).'&validateyear='.((int) $cursoryear).'&token='.newToken().'">';
|
||||
print img_picto($langs->trans("ValidateHistory").' ('.$langs->trans('Month'.str_pad((string) $cursormonth, 2, '0', STR_PAD_LEFT)).' '.$cursoryear.')', 'link', 'class="marginleft2"');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[26]).'</b></td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
|
|
@ -585,7 +577,7 @@ if (getDolGlobalString('SHOW_TOTAL_OF_PREVIOUS_LISTS_IN_LIN_PAGE')) { // This pa
|
|||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td lass="left">'.$langs->trans("TotalVente").'</td>';
|
||||
print '<tr class="liste_titre"><td class="left">'.$langs->trans("TotalVente").'</td>';
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$j = $i + getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1) - 1;
|
||||
if ($j > 12) {
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ if ($result) {
|
|||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneCustomer").'</span><br>';
|
||||
|
||||
print '<br><div class="inline-block divButAction paddingbottom">'.$langs->trans("ChangeAccount").' ';
|
||||
print '<br>'.$langs->trans("ChangeAccount").' <div class="inline-block paddingbottom">';
|
||||
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
||||
print '<input type="submit" class="button small smallpaddingimp valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -78,17 +78,17 @@ if (!$user->hasRight('accounting', 'bind', 'write')) {
|
|||
*/
|
||||
|
||||
if (($action == 'clean' || $action == 'validatehistory') && $user->hasRight('accounting', 'bind', 'write')) {
|
||||
// Clean database
|
||||
// Clean database by removing binding done on non existing or no more existing accounts
|
||||
$db->begin();
|
||||
$sql1 = "UPDATE ".MAIN_DB_PREFIX."expensereport_det as erd";
|
||||
$sql1 = "UPDATE ".$db->prefix()."expensereport_det as erd";
|
||||
$sql1 .= " SET fk_code_ventilation = 0";
|
||||
$sql1 .= ' WHERE erd.fk_code_ventilation NOT IN';
|
||||
$sql1 .= ' (SELECT accnt.rowid ';
|
||||
$sql1 .= ' FROM '.MAIN_DB_PREFIX.'accounting_account as accnt';
|
||||
$sql1 .= ' INNER JOIN '.MAIN_DB_PREFIX.'accounting_system as syst';
|
||||
$sql1 .= ' FROM '.$db->prefix().'accounting_account as accnt';
|
||||
$sql1 .= ' INNER JOIN '.$db->prefix().'accounting_system as syst';
|
||||
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid='.((int) getDolGlobalInt('CHARTOFACCOUNTS')).' AND accnt.entity = '.((int) $conf->entity).')';
|
||||
$sql1 .= ' AND erd.fk_expensereport IN (SELECT rowid FROM '.MAIN_DB_PREFIX.'expensereport WHERE entity = '.((int) $conf->entity).')';
|
||||
$sql1 .= ' AND fk_code_ventilation <> 0';
|
||||
$sql1 .= ' AND erd.fk_expensereport IN (SELECT rowid FROM '.$db->prefix().'expensereport WHERE entity = '.((int) $conf->entity).')';
|
||||
$sql1 .= " AND fk_code_ventilation <> 0";
|
||||
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
|
||||
$resql1 = $db->query($sql1);
|
||||
if (!$resql1) {
|
||||
|
|
@ -195,7 +195,7 @@ print '</span><br>';
|
|||
|
||||
$y = $year_current;
|
||||
|
||||
$buttonbind = '<a class="button small" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'&year='.$year_current.'">'.img_picto('', 'link', 'class="paddingright fa-color-unset"').$langs->trans("ValidateHistory").'</a>';
|
||||
$buttonbind = '<a class="button small" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'&year='.$year_current.'">'.img_picto($langs->trans("ValidateHistory"), 'link', 'class="pictofixedwidth fa-color-unset"').$langs->trans("ValidateHistory").'</a>';
|
||||
|
||||
|
||||
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1, 0, $buttonbind);
|
||||
|
|
@ -239,8 +239,9 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(er.date_debut) = ".((int) $j), "erd.total_ht", "0").") AS month".str_pad((string) $j, 2, "0", STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(er.date_debut) = ".((string) $j), "1", "0").") AS nbmonth".str_pad((string) $j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(erd.total_ht) as total";
|
||||
$sql .= " SUM(erd.total_ht) as total, COUNT(erd.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as erd";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport as er ON er.rowid = erd.fk_expensereport";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
|
||||
|
|
@ -295,17 +296,17 @@ if ($resql) {
|
|||
$cursoryear = ($cursormonth < getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '<td class="right nowraponall amount" title="'.price($row[2*$i - 2]).' - '.$row[2*$i - 1].' lines">';
|
||||
print price($row[2*$i - 2]);
|
||||
// Add link to make binding
|
||||
if (!empty(price2num($row[$i]))) {
|
||||
if (!empty(price2num($row[2*$i - 2])) || !empty($row[2*$i - 1])) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&year='.$y.'&validatemonth='.((int) $cursormonth).'&validateyear='.((int) $cursoryear).'&token='.newToken().'">';
|
||||
print img_picto($langs->trans("ValidateHistory").' ('.$langs->trans('Month'.str_pad((string) $cursormonth, 2, '0', STR_PAD_LEFT)).' '.$cursoryear.')', 'link', 'class="marginleft2"');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[26]).'</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
|
|
@ -372,14 +373,12 @@ if ($resql) {
|
|||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax300"'.(empty($row[1]) ? '' : ' title="'.dol_escape_htmltag($row[1]).'"').'>';
|
||||
if ($row[0] == 'tobind') {
|
||||
//print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||
} else {
|
||||
print length_accountg($row[0]).' - ';
|
||||
}
|
||||
//print '</td>';
|
||||
//print '<td>';
|
||||
if ($row[0] == 'tobind') {
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.((int) $y), $langs->transnoentitiesnoconv("ToBind"));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ if ($result) {
|
|||
print_barre_liste($langs->trans("ExpenseReportLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneExpenseReport").'</span><br>';
|
||||
|
||||
print '<br><div class="inline-block divButAction paddingbottom">'.$langs->trans("ChangeAccount").' ';
|
||||
print '<br>'.$langs->trans("ChangeAccount").' <div class="inline-block paddingbottom">';
|
||||
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
||||
print '<input type="submit" class="button small smallpaddingimp valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -623,13 +623,6 @@ if ($result) {
|
|||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
//var_dump($tabpay);
|
||||
//var_dump($tabcompany);
|
||||
//var_dump($tabbq);
|
||||
//var_dump($tabtp);
|
||||
//var_dump($tabtype);
|
||||
|
||||
// Write bookkeeping
|
||||
if (!$error && $action == 'writebookkeeping' && $user->hasRight('accounting', 'bind', 'write')) {
|
||||
$now = dol_now();
|
||||
|
|
@ -663,9 +656,6 @@ if (!$error && $action == 'writebookkeeping' && $user->hasRight('accounting', 'b
|
|||
$db->begin();
|
||||
|
||||
// Introduce a protection. Total of tabtp must be total of tabbq
|
||||
//var_dump($tabpay);
|
||||
//var_dump($tabtp);
|
||||
//var_dump($tabbq);exit;
|
||||
|
||||
// Bank
|
||||
if (!$errorforline && is_array($tabbq[$key])) {
|
||||
|
|
@ -1388,9 +1378,6 @@ if (empty($action) || $action == 'view') {
|
|||
$accounttoshowsubledger = length_accounta($k);
|
||||
if ($accounttoshow != $accounttoshowsubledger) {
|
||||
if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined') {
|
||||
//var_dump($tabpay[$key]);
|
||||
//var_dump($tabtype[$key]);
|
||||
//var_dump($tabbq[$key]);
|
||||
//print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||
if (!empty($tabcompany[$key]['code_compta'])) {
|
||||
if (in_array($tabtype[$key], array('payment_various', 'payment_salary'))) {
|
||||
|
|
|
|||
|
|
@ -374,6 +374,20 @@ if ($result) {
|
|||
}
|
||||
|
||||
// After the loop on each line
|
||||
$parameters = array(
|
||||
'tabfac' => &$tabfac,
|
||||
'tabht' => &$tabht,
|
||||
'tabtva' => &$tabtva,
|
||||
'def_tva' => &$def_tva,
|
||||
'tabwarranty' => &$tabwarranty,
|
||||
'tabrevenuestamp' => &$tabrevenuestamp,
|
||||
'tabttc' => &$tabttc,
|
||||
'tablocaltax1' => &$tablocaltax1,
|
||||
'tablocaltax2' => &$tablocaltax2,
|
||||
'tabcompany' => &$tabcompany,
|
||||
'vatdata_cache' => &$vatdata_cache,
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('processedJournalData', $parameters); // Note that $action and $object may have been modified by hook
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,20 +141,23 @@ if (!empty($id)) {
|
|||
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// ref invoice
|
||||
// Ref invoice
|
||||
print '<tr><td>'.$langs->trans("BillsSuppliers").'</td>';
|
||||
$facturefournisseur_static->ref = $objp->ref;
|
||||
$facturefournisseur_static->id = $objp->facid;
|
||||
print '<td>'.$facturefournisseur_static->getNomUrl(1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("Line").'</td>';
|
||||
print '<td>'.stripslashes(nl2br($objp->description)).'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("ProductLabel").'</td>';
|
||||
print '<td>'.dol_trunc($objp->product_label, 24).'</td>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Account").'</td><td>';
|
||||
print '<tr><td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.dolPrintHTML($objp->description).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ProductLabel").'</td>';
|
||||
print '<td>'.dol_trunc($objp->product_label, 24).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Account").'</td><td>';
|
||||
print $formaccounting->select_account($objp->fk_code_ventilation, 'codeventil', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ if (!$user->hasRight('accounting', 'bind', 'write')) {
|
|||
*/
|
||||
|
||||
if (($action == 'clean' || $action == 'validatehistory') && $user->hasRight('accounting', 'bind', 'write')) {
|
||||
// Clean database
|
||||
// Clean database by removing binding done on non existing or no more existing accounts
|
||||
$db->begin();
|
||||
$sql1 = "UPDATE ".$db->prefix()."facture_fourn_det as fd";
|
||||
$sql1 .= " SET fk_code_ventilation = 0";
|
||||
|
|
@ -179,31 +179,31 @@ if ($action == 'validatehistory' && $user->hasRight('accounting', 'bind', 'write
|
|||
while ($i < min($num_lines, 10000)) { // No more than 10000 at once
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$thirdpartystatic->id = $objp->socid;
|
||||
$thirdpartystatic->name = $objp->name;
|
||||
$thirdpartystatic->client = $objp->client;
|
||||
$thirdpartystatic->fournisseur = $objp->fournisseur;
|
||||
$thirdpartystatic->code_client = $objp->code_client;
|
||||
$thirdpartystatic->code_compta_client = $objp->code_compta_client;
|
||||
$thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
|
||||
$thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
||||
$thirdpartystatic->email = $objp->email;
|
||||
$thirdpartystatic->country_code = $objp->country_code;
|
||||
$thirdpartystatic->tva_intra = $objp->tva_intra;
|
||||
$thirdpartystatic->id = !empty($objp->socid) ? $objp->socid : 0;
|
||||
$thirdpartystatic->name = !empty($objp->name) ? $objp->name : "";
|
||||
$thirdpartystatic->client = !empty($objp->client) ? $objp->client : "";
|
||||
$thirdpartystatic->fournisseur = !empty($objp->fournisseur) ? $objp->fournisseur : "";
|
||||
$thirdpartystatic->code_client = !empty($objp->code_client) ? $objp->code_client : "";
|
||||
$thirdpartystatic->code_compta_client = !empty($objp->code_compta_client) ? $objp->code_compta_client : "";
|
||||
$thirdpartystatic->code_fournisseur = !empty($objp->code_fournisseur) ? $objp->code_fournisseur : "";
|
||||
$thirdpartystatic->code_compta_fournisseur = !empty($objp->code_compta_fournisseur) ? $objp->code_compta_fournisseur : "";
|
||||
$thirdpartystatic->email = !empty($objp->email) ? $objp->email : "";
|
||||
$thirdpartystatic->country_code = !empty($objp->country_code) ? $objp->country_code : "";
|
||||
$thirdpartystatic->tva_intra = !empty($objp->tva_intra) ? $objp->tva_intra : "";
|
||||
$thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion)
|
||||
|
||||
$product_static->ref = $objp->product_ref;
|
||||
$product_static->id = $objp->product_id;
|
||||
$product_static->type = $objp->type;
|
||||
$product_static->label = $objp->product_label;
|
||||
$product_static->status = $objp->status;
|
||||
$product_static->status_buy = $objp->status_buy;
|
||||
$product_static->status = !empty($objp->status) ? $objp->status : 0;
|
||||
$product_static->status_buy = !empty($objp->status_buy) ? $objp->status_buy : 0;
|
||||
$product_static->accountancy_code_sell = $objp->code_sell;
|
||||
$product_static->accountancy_code_sell_intra = $objp->code_sell_intra;
|
||||
$product_static->accountancy_code_sell_export = $objp->code_sell_export;
|
||||
$product_static->accountancy_code_buy = $objp->code_buy;
|
||||
$product_static->accountancy_code_buy_intra = $objp->code_buy_intra;
|
||||
$product_static->accountancy_code_buy_export = $objp->code_buy_export;
|
||||
$product_static->accountancy_code_buy = !empty($objp->code_buy) ? $objp->code_buy : "";
|
||||
$product_static->accountancy_code_buy_intra = !empty($objp->code_buy_intra) ? $objp->code_buy_intra : "";
|
||||
$product_static->accountancy_code_buy_export = !empty($objp->code_buy_export) ? $objp->code_buy_export : "";
|
||||
$product_static->tva_tx = $objp->tva_tx_prod;
|
||||
|
||||
$facture_static->ref = $objp->ref;
|
||||
|
|
@ -302,7 +302,7 @@ print '</span><br>';
|
|||
|
||||
$y = $year_current;
|
||||
|
||||
$buttonbind = '<a class="button small" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'">'.img_picto('', 'link', 'class="paddingright fa-color-unset smallpaddingimp"').$langs->trans("ValidateHistory").'</a>';
|
||||
$buttonbind = '<a class="button small" href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&token='.newToken().'&year='.$year_current.'">'.img_picto($langs->trans("ValidateHistory"), 'link', 'class="pictofixedwidth fa-color-unset"').$langs->trans("ValidateHistory").'</a>';
|
||||
|
||||
|
||||
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1, 0, $buttonbind);
|
||||
|
|
@ -345,8 +345,9 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(ff.datef) = ".((int) $j), "ffd.total_ht", "0").") AS month".str_pad((string) $j, 2, "0", STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(ff.datef) = ".((string) $j), "1", "0").") AS nbmonth".str_pad((string) $j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(ffd.total_ht) as total";
|
||||
$sql .= " SUM(ffd.total_ht) as total, COUNT(ffd.rowid) as nb";
|
||||
$sql .= " FROM ".$db->prefix()."facture_fourn_det as ffd";
|
||||
$sql .= " LEFT JOIN ".$db->prefix()."facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
||||
$sql .= " LEFT JOIN ".$db->prefix()."accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
|
||||
|
|
@ -406,17 +407,17 @@ if ($resql) {
|
|||
$cursoryear = ($cursormonth < getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1)) ? $y + 1 : $y;
|
||||
$tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt');
|
||||
|
||||
print '<td class="right nowraponall amount">';
|
||||
print price($row[$i]);
|
||||
print '<td class="right nowraponall amount" title="'.price($row[2*$i - 2]).' - '.$row[2*$i - 1].' lines">';
|
||||
print price($row[2*$i - 2]);
|
||||
// Add link to make binding
|
||||
if (!empty(price2num($row[$i]))) {
|
||||
if (!empty(price2num($row[2*$i - 2])) || !empty($row[2*$i - 1])) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=validatehistory&year='.$y.'&validatemonth='.((int) $cursormonth).'&validateyear='.((int) $cursoryear).'&token='.newToken().'">';
|
||||
print img_picto($langs->trans("ValidateHistory").' ('.$langs->trans('Month'.str_pad((string) $cursormonth, 2, '0', STR_PAD_LEFT)).' '.$cursoryear.')', 'link', 'class="marginleft2"');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[14]).'</b></td>';
|
||||
print '<td class="right nowraponall amount"><b>'.price($row[26]).'</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ if ($result) {
|
|||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneSupplier").'</span><br>';
|
||||
|
||||
print '<br><div class="inline-block divButAction paddingbottom">'.$langs->trans("ChangeAccount").' ';
|
||||
print '<br>'.$langs->trans("ChangeAccount").' <div class="inline-block paddingbottom">';
|
||||
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
|
||||
print '<input type="submit" class="button small smallpaddingimp valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -505,6 +505,7 @@ print "</td></tr>\n";
|
|||
$startpoint = array();
|
||||
$startpoint[0] = $langs->trans("NoCorrection");
|
||||
$startpoint["m"] = $langs->trans("Month");
|
||||
$startpoint["3m"] = $langs->trans("Quarter");
|
||||
$startpoint["Y"] = $langs->trans("Year");
|
||||
print '<tr class="oddeven drag" id="startfirstdayof"><td>';
|
||||
print $langs->trans("MemberSubscriptionStartFirstDayOf");
|
||||
|
|
|
|||
|
|
@ -192,7 +192,16 @@ if ($object->id > 0) {
|
|||
$param .= '&limit='.$limit;
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("ActionsOnMember"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 0);
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
|
||||
$cachekey = 'count_events_member_'.$object->id;
|
||||
$nbEvent = dol_getcache($cachekey);
|
||||
|
||||
$titlelist = $langs->trans("ActionsOnMember").(is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>' : '');
|
||||
if (!empty($conf->dol_optimize_smallscreen)) {
|
||||
$titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>' : '');
|
||||
}
|
||||
|
||||
print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 0);
|
||||
|
||||
// List of all actions
|
||||
$filters = array();
|
||||
|
|
|
|||
|
|
@ -2248,7 +2248,7 @@ class Adherent extends CommonObject
|
|||
* getTooltipContentArray
|
||||
* @param array<string,mixed> $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array{picto:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
* @return array{picto?:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
|
|
@ -3288,12 +3288,9 @@ class Adherent 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 (property_exists($this, 'type')) {
|
||||
$return .= '<br><span class="info-box-label opacitymedium">'.$this->type.'</span>';
|
||||
}
|
||||
if (method_exists($this, 'getmorphylib')) {
|
||||
$return .= '<br><span class="info-box-label">'.$this->getmorphylib('', 2).'</span>';
|
||||
}
|
||||
$return .= '<br><span class="info-box-label paddingright">'.$this->getmorphylib('', 2).'</span>';
|
||||
$return .= '<span class="info-box-label opacitymedium">'.$this->type.'</span>';
|
||||
|
||||
if (method_exists($this, 'getLibStatut')) {
|
||||
$return .= '<br><div class="info-box-status paddingtop">';
|
||||
$return .= $this->LibStatut($this->status, $this->need_subscription, $this->datefin, 5);
|
||||
|
|
|
|||
|
|
@ -683,7 +683,7 @@ class AdherentType extends CommonObject
|
|||
* getTooltipContentArray
|
||||
* @param array<string,mixed> $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array{picto:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
* @return array{picto?:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'me
|
|||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'aZ');
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut'
|
||||
|
||||
// Search fields
|
||||
$search = GETPOST("search", 'alpha');
|
||||
|
|
@ -107,14 +108,15 @@ if ($search_status < -2) {
|
|||
$search_status = '';
|
||||
}
|
||||
|
||||
// Pagination parameters
|
||||
// Load variable for pagination
|
||||
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT('page');
|
||||
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||
// If $page is not defined, or '' or -1 or if we click on clear filters
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
|
@ -131,7 +133,7 @@ $object = new Adherent($db);
|
|||
$hookmanager->initHooks(array('memberlist'));
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
// Fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
||||
|
|
@ -192,12 +194,9 @@ $object->fields = dol_sort_array($object->fields, 'position');
|
|||
|
||||
// Complete array of fields for columns
|
||||
$tableprefix = 'd';
|
||||
$arrayfields = array();
|
||||
foreach ($object->fields as $key => $val) {
|
||||
if (!array_key_exists($tableprefix.'.'.$key, $arrayfields)) { // Discard record not into $arrayfields
|
||||
continue;
|
||||
}
|
||||
// If $val['visible']==0, then we never show the field
|
||||
|
||||
if (!empty($val['visible'])) {
|
||||
$visible = (int) dol_eval((string) $val['visible'], 1);
|
||||
$arrayfields[$tableprefix.'.'.$key] = array(
|
||||
|
|
@ -209,9 +208,11 @@ foreach ($object->fields as $key => $val) {
|
|||
);
|
||||
}
|
||||
}
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
|
||||
//var_dump($arrayfields);exit;
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'adherent');
|
||||
|
|
@ -411,11 +412,7 @@ $morecss = array();
|
|||
|
||||
// Build and execute select
|
||||
// --------------------------------------------------------------------
|
||||
if (!empty($search_categ) && $search_categ > 0) {
|
||||
$sql = "SELECT DISTINCT";
|
||||
} else {
|
||||
$sql = "SELECT";
|
||||
}
|
||||
$sql = "SELECT";
|
||||
$sql .= " d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
|
||||
$sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
|
||||
$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
|
||||
|
|
@ -429,7 +426,7 @@ $sql .= " state.code_departement as state_code, state.nom as state_name";
|
|||
// Add fields from extrafields
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -442,7 +439,7 @@ $sql = preg_replace('/,\s*$/', '', $sql);
|
|||
$sqlfields = $sql; // $sql fields to remove for count total
|
||||
|
||||
// SQL Alias adherent
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; // maybe better to use ad (adh) instead of d
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d";
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (d.rowid = ef.fk_object)";
|
||||
}
|
||||
|
|
@ -624,7 +621,7 @@ $num = $db->num_rows($resql);
|
|||
|
||||
|
||||
// Direct jump if only one record found
|
||||
if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
|
||||
if ($num == 1 && getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$id = $obj->rowid;
|
||||
header("Location: ".DOL_URL_ROOT.'/adherents/card.php?id='.$id);
|
||||
|
|
@ -659,6 +656,9 @@ if ($limit > 0 && $limit != $conf->liste_limit) {
|
|||
if ($optioncss != '') {
|
||||
$param .= '&optioncss='.urlencode($optioncss);
|
||||
}
|
||||
if ($groupby != '') {
|
||||
$param .= '&groupby='.urlencode($groupby);
|
||||
}
|
||||
if ($search_all != "") {
|
||||
$param .= "&search_all=".urlencode($search_all);
|
||||
}
|
||||
|
|
@ -778,13 +778,12 @@ print '<input type="hidden" name="mode" value="'.$mode.'">';
|
|||
$newcardbutton = '';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
|
||||
if ($user->hasRight('adherent', 'creer')) {
|
||||
$newcardbutton .= dolGetButtonTitleSeparator();
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create');
|
||||
}
|
||||
$newcardbutton .= dolGetButtonTitleSeparator();
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create', '', $user->hasRight('adherent', 'creer'));
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "Information";
|
||||
$modelmail = "member";
|
||||
$objecttmp = new Adherent($db);
|
||||
|
|
@ -854,9 +853,6 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') ||
|
|||
|
||||
// Try to know count of actioncomm from cache
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
|
||||
$cachekey = 'count_events_user_'.$object->id;
|
||||
$cachekey = 'count_events_member_'.$object->id;
|
||||
$nbEvent = dol_getcache($cachekey); // TODO Add nb into badge in menu so we can get it from cache also here
|
||||
|
||||
$titlelist = $langs->trans("ActionsOnMember").(is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>' : '');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -978,6 +978,9 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
|
|||
// Now do a correction of the suggested date
|
||||
if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "m") {
|
||||
$datefrom = dol_get_first_day((int) dol_print_date($datefrom, "%Y"), (int) dol_print_date($datefrom, "%m"));
|
||||
} elseif (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "3m") {
|
||||
$datefrom = dol_time_plus_duree($object->datefin, -3, 'm');
|
||||
$datefrom = dol_get_first_day((int) dol_print_date($datefrom, "%Y"), (int) dol_print_date($datefrom, "%m"));
|
||||
} elseif (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "Y") {
|
||||
$datefrom = dol_get_first_day((int) dol_print_date($datefrom, "%Y"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -411,9 +411,6 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,25 +153,25 @@ print '</td></tr>'."\n";
|
|||
|
||||
// Telephone
|
||||
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
||||
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'object_phoning', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input name="phone" id="phone" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('phone') ? GETPOST('phone', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_PHONE')).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Fax
|
||||
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
||||
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'object_phoning_fax', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input name="fax" id="fax" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('fax') ? GETPOST('fax', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_FAX')).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// eMail
|
||||
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||
print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'object_email', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input name="mail" id="email" class="maxwidth300 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_MAIL')).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Web
|
||||
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||
print img_picto('', 'globe', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'globe', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input name="web" id="web" class="maxwidth300 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('web') ? GETPOST('web', 'alphanohtml') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_WEB')).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -483,31 +483,31 @@ print '</td></tr>'."\n";
|
|||
|
||||
// Phone
|
||||
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
||||
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'object_phoning', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input class="maxwidth150 widthcentpercentminusx" name="phone" id="phone" value="'.dol_escape_htmltag((GETPOSTISSET('phone') ? GETPOST('phone', 'alphanohtml') : (getDolGlobalString('MAIN_INFO_SOCIETE_TEL')))).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Phone mobile
|
||||
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("PhoneMobile").'</label></td><td>';
|
||||
print img_picto('', 'object_phoning_mobile', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'object_phoning_mobile', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input class="maxwidth150 widthcentpercentminusx" name="phone_mobile" id="phone_mobile" value="'.dol_escape_htmltag((GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alphanohtml') : (getDolGlobalString('MAIN_INFO_SOCIETE_MOBILE')))).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Fax
|
||||
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
||||
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'object_phoning_fax', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input class="maxwidth150" name="fax" id="fax" value="'.dol_escape_htmltag((GETPOSTISSET('fax') ? GETPOST('fax', 'alphanohtml') : (getDolGlobalString('MAIN_INFO_SOCIETE_FAX')))).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Email
|
||||
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||
print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'object_email', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input class="minwidth300 maxwidth500 widthcentpercentminusx" name="mail" id="email" value="'.dol_escape_htmltag((GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : (getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') ? $conf->global->MAIN_INFO_SOCIETE_MAIL : ''))).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Web
|
||||
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||
print img_picto('', 'globe', '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', 'globe', '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
print '<input class="maxwidth300 widthcentpercentminusx" name="web" id="web" value="'.dol_escape_htmltag((GETPOSTISSET('web') ? GETPOST('web', 'alphanohtml') : (getDolGlobalString('MAIN_INFO_SOCIETE_WEB') ? $conf->global->MAIN_INFO_SOCIETE_WEB : ''))).'"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020-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
|
||||
|
|
@ -119,7 +119,7 @@ print '<td></td>';
|
|||
print "</tr>\n";
|
||||
|
||||
$listofnetworks = dol_sort_array($listofnetworks, 'label');
|
||||
//var_dump($listofnetworks);
|
||||
|
||||
foreach ($listofnetworks as $key => $value) {
|
||||
if (!empty($value['active'])) {
|
||||
print '<tr class="oddeven">';
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ if ($action == 'updateMask') {
|
|||
$module = new $classname($db);
|
||||
'@phan-var-force ModelePDFContract $module';
|
||||
|
||||
/** @var ModelePDFContract $module */
|
||||
if ($module->write_file($contract, $langs) > 0) {
|
||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=contract&file=SPECIMEN.pdf");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1385,7 +1385,6 @@ if ($id > 0) {
|
|||
} elseif ($search_active == 'no') {
|
||||
$sql .= " AND ".$db->sanitize($tableprefix)."active = 0";
|
||||
}
|
||||
//var_dump($sql);
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
|
|
@ -1776,7 +1775,7 @@ if ($id > 0) {
|
|||
}
|
||||
|
||||
if (empty($reshook)) {
|
||||
fieldList($fieldlist, $obj, $tabname[$id], 'add');
|
||||
dictFieldList($fieldlist, $obj, $tabname[$id], 'add');
|
||||
}
|
||||
|
||||
if ($id == DICT_COUNTRY) {
|
||||
|
|
@ -2281,7 +2280,7 @@ if ($id > 0) {
|
|||
|
||||
// Show fields
|
||||
if (empty($reshook)) {
|
||||
$withentity = fieldList($fieldlist, $obj, $tabname[$id], 'edit');
|
||||
$withentity = dictFieldList($fieldlist, $obj, $tabname[$id], 'edit');
|
||||
}
|
||||
|
||||
print '<td colspan="3" class="center">';
|
||||
|
|
@ -2681,7 +2680,7 @@ $db->close();
|
|||
* @param ''|'add'|'edit'|'hide' $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we don't want it to be rendered
|
||||
* @return string '' or value of entity into table
|
||||
*/
|
||||
function fieldList($fieldlist, $obj = null, $tabname = '', $context = '')
|
||||
function dictFieldList($fieldlist, $obj = null, $tabname = '', $context = '')
|
||||
{
|
||||
global $langs, $db, $mysoc;
|
||||
global $form;
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_
|
|||
$moreforfilter.= '</div>';*/
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2012 Mikael Carlavan <contact@mika-carl.fr>
|
||||
* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||
* 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
|
||||
|
|
@ -144,6 +145,8 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) {
|
|||
$tranche = 1;
|
||||
|
||||
foreach ($Tab['ranges'] as $k => $range) {
|
||||
$ik = $range->ik;
|
||||
'@phan-var-force ExpenseReportIk $ik';
|
||||
if (isset($Tab['ranges'][$k + 1])) {
|
||||
$label = $langs->trans('expenseReportRangeFromTo', $range->range_ik, ($Tab['ranges'][$k + 1]->range_ik - 1));
|
||||
} else {
|
||||
|
|
@ -161,35 +164,35 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) {
|
|||
|
||||
// Offset
|
||||
echo '<td class="nowraponall">';
|
||||
if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) {
|
||||
echo '<input type="text" class="maxwidth100" name="ikoffset" value="'.$range->ik->ikoffset.'" />';
|
||||
if ($action == 'edit' && $ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) {
|
||||
echo '<input type="text" class="maxwidth100" name="ikoffset" value="'.$ik->ikoffset.'" />';
|
||||
} else {
|
||||
echo $range->ik->ikoffset;
|
||||
echo $ik->ikoffset;
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
// Coef
|
||||
echo '<td class="nowraponall">';
|
||||
if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) {
|
||||
echo '<input type="text" class="maxwidth100" name="coef" value="'.$range->ik->coef.'" />';
|
||||
if ($action == 'edit' && $ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) {
|
||||
echo '<input type="text" class="maxwidth100" name="coef" value="'.$ik->coef.'" />';
|
||||
} else {
|
||||
echo($range->ik->id > 0 ? $range->ik->coef : $langs->trans('expenseReportCoefUndefined'));
|
||||
echo($ik->id > 0 ? $ik->coef : $langs->trans('expenseReportCoefUndefined'));
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
// Total for one
|
||||
echo '<td class="nowraponall">'.$langs->trans('expenseReportPrintExample', price($range->ik->ikoffset + 5 * $range->ik->coef)).'</td>';
|
||||
echo '<td class="nowraponall">'.$langs->trans('expenseReportPrintExample', price($ik->ikoffset + 5 * $ik->coef)).'</td>';
|
||||
|
||||
// Action
|
||||
echo '<td class="right">';
|
||||
if ($range->range_active == 1) {
|
||||
if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) {
|
||||
if ($action == 'edit' && $ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) {
|
||||
echo '<input id="" class="button button-save" name="save" value="'.$langs->trans("Save").'" type="submit" />';
|
||||
echo '<input class="button button-cancel" value="'.$langs->trans("Cancel").'" onclick="history.go(-1)" type="button" />';
|
||||
} else {
|
||||
echo '<a class="editfielda marginrightonly paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$range->ik->id.'&fk_c_exp_tax_cat='.$range->fk_c_exp_tax_cat.'&fk_range='.$range->rowid.'">'.img_edit().'</a>';
|
||||
if (!empty($range->ik->id)) {
|
||||
echo '<a class="paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$range->ik->id.'">'.img_delete().'</a>';
|
||||
echo '<a class="editfielda marginrightonly paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$ik->id.'&fk_c_exp_tax_cat='.$range->fk_c_exp_tax_cat.'&fk_range='.$range->rowid.'">'.img_edit().'</a>';
|
||||
if (!empty($ik->id)) {
|
||||
echo '<a class="paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$ik->id.'">'.img_delete().'</a>';
|
||||
}
|
||||
// TODO add delete link
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,24 @@ if (!isModEnabled('socialnetworks')) {
|
|||
accessforbidden('Module Social Networks is not enabled');
|
||||
}
|
||||
|
||||
// List of oauth services
|
||||
$oauthservices = array();
|
||||
|
||||
foreach ($conf->global as $key => $val) {
|
||||
if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) {
|
||||
$key = preg_replace('/^OAUTH_/', '', $key);
|
||||
$key = preg_replace('/_ID$/', '', $key);
|
||||
if (preg_match('/^.*-/', $key)) {
|
||||
$name = preg_replace('/^.*-/', '', $key);
|
||||
} else {
|
||||
$name = $langs->trans("NoName");
|
||||
}
|
||||
$provider = preg_replace('/-.*$/', '', $key);
|
||||
$provider = ucfirst(strtolower($provider));
|
||||
|
||||
$oauthservices[$key] = $name." (".$provider.")";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -68,6 +86,9 @@ if ($action == 'add') {
|
|||
|
||||
$socialNetworkName = GETPOST('socialnetwork_name', 'alpha');
|
||||
$socialNetworkUrl = GETPOST('socialnetwork_url', 'alpha');
|
||||
if (GETPOSTISSET("OAUTH_SERVICE_SOCIAL_NETWORK")) {
|
||||
dolibarr_set_const($db, "OAUTH_SERVICE_SOCIAL_NETWORK", GETPOST("OAUTH_SERVICE_SOCIAL_NETWORK", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
// other params if exist
|
||||
$paramNames = GETPOST('param_name', 'array');
|
||||
|
|
@ -272,8 +293,48 @@ print '<td>'.$langs->trans('SocialNetworkUrl').'</td>';
|
|||
print '<td><input type="text" class="flat minwidth300" name="socialnetwork_url"></td>';
|
||||
print '<td>https://mastodon.social/api/v1/accounts/id_user</td>';
|
||||
print '</tr>';
|
||||
$vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
// Methods oauth
|
||||
print '<td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td>';
|
||||
print '<td>';
|
||||
print '<input type="radio" id="radio_oauth" name="'.$vartosmtpstype.'" value="XOAUTH2"'.(getDolGlobalString($vartosmtpstype) == 'XOAUTH2' ? ' checked' : '').(isModEnabled('oauth') ? '' : ' disabled').'>';
|
||||
print '<label for="radio_oauth">'.$form->textwithpicto($langs->trans("UseOauth"), $langs->trans("OauthNotAvailableForAllAndHadToBeCreatedBefore")).'</label>';
|
||||
if (!isModEnabled('oauth')) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/admin/modules.php?search_keyword=oauth">'.$langs->trans("EnableModuleX", "OAuth").'</a>';
|
||||
} else {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/admin/oauth.php">'.$langs->trans("SetupModuleX", " OAuth").'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven" id="oauth_service_div" style="display: none;">';
|
||||
print '<td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td>';
|
||||
print '<td>';
|
||||
|
||||
$oauthservicesStringKeys = [];
|
||||
foreach ($oauthservices as $key => $value) {
|
||||
$key = (string) $key;
|
||||
$oauthservicesStringKeys[$key] = $value;
|
||||
}
|
||||
|
||||
/** @phan-var-force array<string, array{label:string, data-html:string, disable?:int, css?:string}> $oauthservices */
|
||||
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
||||
print $form->selectarray('OAUTH_SERVICE_SOCIAL_NETWORK', $oauthservicesStringKeys, (string) $conf->global->OAUTH_SERVICE_SOCIAL_NETWORK);
|
||||
} else {
|
||||
$selectedKey = (string) getDolGlobalString('OAUTH_SERVICE_SOCIAL_NETWORK');
|
||||
$text = isset($oauthservicesStringKeys[$selectedKey]) ? $oauthservicesStringKeys[$selectedKey]['label'] : '';
|
||||
if (empty($text)) {
|
||||
$text = $langs->trans("Undefined");
|
||||
}
|
||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||
print $form->textwithpicto($text, $htmltext, 1, 'superadmin');
|
||||
print '<input type="hidden" name="OAUTH_SERVICE_SOCIAL_NETWORK" value="'.$selectedKey.'">';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven" id="add_param_row"><td>';
|
||||
print $form->textwithpicto($langs->trans("Others"), $langs->trans("AddMoreParams"));
|
||||
print '</td><td><button type="button" id="addParamButton">'.img_picto($langs->trans("AddMoreParams"), 'add', 'pictofixedwidth').'</button></td>';
|
||||
print '<td>Token : ****<br>Cookie : ****</td>';
|
||||
|
|
@ -294,14 +355,38 @@ print '</div>';
|
|||
print $form->buttonsSaveCancel("Add", '');
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<script type="text/javascript">
|
||||
document.getElementById("addParamButton").addEventListener("click", function() {
|
||||
var container = document.getElementById("additionalParams");
|
||||
var index = container.children.length;
|
||||
var div = document.createElement("div");
|
||||
div.className = "pair-group";
|
||||
div.innerHTML = "<input type=\'text\' class=\'flat minwidth300\' name=\'param_name[]\' placeholder=\''.$langs->trans("ParamName").'\' class=\'flat\' /> <input type=\'text\' class=\'flat minwidth300\' name=\'param_value[]\' placeholder=\''.$langs->trans("ParamValue").'\' class=\'flat\' />";
|
||||
container.appendChild(div);
|
||||
});
|
||||
$(document).ready(function() {
|
||||
function toggleOAuthServiceDisplay() {
|
||||
if ($("#radio_oauth").is(":checked")) {
|
||||
$("#oauth_service_div").show(); // Afficher le sélecteur OAuth
|
||||
} else {
|
||||
$("#oauth_service_div").hide(); // Cacher le sélecteur OAuth
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAddParamRow() {
|
||||
if ($("#radio_oauth").is(":checked")) {
|
||||
$("#add_param_row").hide(); // Cacher toute la ligne
|
||||
} else {
|
||||
$("#add_param_row").show(); // Afficher toute la ligne
|
||||
}
|
||||
}
|
||||
|
||||
toggleOAuthServiceDisplay();
|
||||
toggleAddParamRow();
|
||||
|
||||
$("input[name=\"'.$vartosmtpstype.'\"]").change(function() {
|
||||
toggleOAuthServiceDisplay();
|
||||
toggleAddParamRow();
|
||||
});
|
||||
|
||||
$("#addParamButton").click(function() {
|
||||
var container = $("#additionalParams");
|
||||
var index = container.children().length;
|
||||
var newParam = $("<div class=\'pair-group\'><input type=\'text\' class=\'flat minwidth300\' name=\'param_name[]\' placeholder=\''.$langs->trans("ParamName").'\' class=\'flat\' /> <input type=\'text\' class=\'flat minwidth300\' name=\'param_value[]\' placeholder=\''.$langs->trans("ParamValue").'\' class=\'flat\' /></div>");
|
||||
container.append(newParam);
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
|
|
@ -41,7 +42,6 @@ if (!$user->admin) {
|
|||
}
|
||||
|
||||
|
||||
$type = array('yesno', 'texte', 'chaine');
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$testsubscribeemail = GETPOST("testsubscribeemail");
|
||||
|
|
@ -57,13 +57,14 @@ $error = 0;
|
|||
// Action updated or added a constant
|
||||
if ($action == 'update' || $action == 'add') {
|
||||
$tmparray = GETPOST('constname', 'array');
|
||||
$tmpvalue = GETPOST('constvalue', 'array');
|
||||
$tmpnote = GETPOST('constnote', 'array');
|
||||
if (is_array($tmparray)) {
|
||||
foreach ($tmparray as $key => $val) {
|
||||
$constname = $tmparray[$key];
|
||||
$constvalue = $tmparray[$key];
|
||||
$consttype = $tmparray[$key];
|
||||
$constnote = $tmparray[$key];
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
$constvalue = $tmpvalue[$key];
|
||||
$constnote = $tmpnote[$key];
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, $constnote, $conf->entity);
|
||||
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -531,9 +531,6 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ if (GETPOST('buttonreset', 'alpha')) {
|
|||
|
||||
if ($action == 'install' && $allowonlineinstall) {
|
||||
$error = 0;
|
||||
|
||||
$modulenameval = '';
|
||||
// $original_file should match format module_modulename-x.y[.z].zip
|
||||
$original_file = basename($_FILES["fileinstall"]["name"]);
|
||||
$original_file = preg_replace('/\s*\(\d+\)\.zip$/i', '.zip', $original_file);
|
||||
|
|
@ -282,8 +282,20 @@ if ($action == 'install' && $allowonlineinstall) {
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
$message = $langs->trans("SetupIsReadyForUse", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules"));
|
||||
$searchParams = array(
|
||||
'search_keyword' => $modulenameval,
|
||||
'search_status' => '-1',
|
||||
'search_nature' => '-1',
|
||||
'search_version' => '-1'
|
||||
);
|
||||
$queryString = http_build_query($searchParams);
|
||||
$redirectUrl = DOL_URL_ROOT . '/admin/modules.php?' . $queryString;
|
||||
|
||||
$message = $langs->trans("SetupIsReadyForUse", $redirectUrl, $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules"));
|
||||
|
||||
setEventMessages($message, null, 'warnings');
|
||||
header('Location: ' . $redirectUrl);
|
||||
exit;
|
||||
}
|
||||
} elseif ($action == 'install' && !$allowonlineinstall) {
|
||||
httponly_accessforbidden("You try to bypass the protection to disallow deployment of an external module. Hack attempt ?");
|
||||
|
|
@ -690,7 +702,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||
if (!empty($moreforfilter)) {
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
|
|
@ -905,7 +917,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
|
||||
$codeenabledisable .= $langs->trans("Used");
|
||||
} else {
|
||||
$codeenabledisable .= img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium valignmiddle');
|
||||
$codeenabledisable .= img_picto($langs->trans("Required"), 'switch_on', '', 0, 0, 0, '', 'opacitymedium valignmiddle');
|
||||
//print $langs->trans("Required");
|
||||
}
|
||||
if (isModEnabled('multicompany') && $user->entity) {
|
||||
|
|
@ -964,20 +976,20 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||
} else {
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) {
|
||||
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
|
||||
$codetoconfig .= '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
|
||||
$codetoconfig .= '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', 0, 0, 0, '', 'fa-15').'</a>';
|
||||
} else {
|
||||
$urltouse = $urlpage;
|
||||
$codetoconfig .= '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
|
||||
$codetoconfig .= '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', 0, 0, 0, '', 'fa-15').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif (preg_match('/^([^@]+)@([^@]+)$/i', (string) $objMod->config_page_url, $regs)) {
|
||||
$codetoconfig .= '<a class="valignmiddle" href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
|
||||
$codetoconfig .= '<a class="valignmiddle" href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', 0, 0, 0, '', 'fa-15').'</a>';
|
||||
} else {
|
||||
$codetoconfig .= '<a class="valignmiddle" href="'.((string) $objMod->config_page_url).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
|
||||
$codetoconfig .= '<a class="valignmiddle" href="'.((string) $objMod->config_page_url).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', 0, 0, 0, '', 'fa-15').'</a>';
|
||||
}
|
||||
} else {
|
||||
$codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', false, 0, 0, '', 'fa-15');
|
||||
$codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', 0, 0, 0, '', 'fa-15');
|
||||
}
|
||||
} else { // Module not yet activated
|
||||
// Set $codeenabledisable
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
/* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -638,7 +638,11 @@ if ($conf->use_javascript_ajax) {
|
|||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_A").'</td><td>';
|
||||
print $form->selectarray('PDF_USE_A', $arraylistofpdfformat, getDolGlobalString('PDF_USE_A', '0'));
|
||||
|
||||
//$pdfa = false; // PDF default version
|
||||
$pdfa = getDolGlobalInt('PDF_USE_A', 0); // PDF/A-1 ou PDF/A-3
|
||||
|
||||
print $form->selectarray('PDF_USE_A', $arraylistofpdfformat, $pdfa);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ print '</form>';
|
|||
// Form to test upload
|
||||
print '<br>';
|
||||
$formfile = new FormFile($db);
|
||||
$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, '', '', 1, '', 0);
|
||||
$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, null, '', 1, '', 0);
|
||||
|
||||
// List of document
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '', $sortfield, $sortorder == 'desc' ? SORT_DESC : SORT_ASC, 1);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
|
|
@ -42,8 +43,6 @@ if (!$user->admin) {
|
|||
}
|
||||
|
||||
|
||||
$type = array('yesno', 'texte', 'chaine');
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
|
||||
|
|
@ -55,7 +54,6 @@ $action = GETPOST('action', 'aZ09');
|
|||
if ($action == 'update' || $action == 'add') {
|
||||
$constnamearray = GETPOST("constname", 'array');
|
||||
$constvaluearray = GETPOST("constvalue", 'array');
|
||||
$consttypearray = GETPOST("consttype", 'array');
|
||||
$constnotearray = GETPOST("constnote", 'array');
|
||||
|
||||
// Action mise a jour ou ajout d'une constante
|
||||
|
|
@ -63,10 +61,9 @@ if ($action == 'update' || $action == 'add') {
|
|||
foreach ($constnamearray as $key => $val) {
|
||||
$constname = dol_escape_htmltag($constnamearray[$key]);
|
||||
$constvalue = dol_escape_htmltag($constvaluearray[$key]);
|
||||
$consttype = (int) $consttypearray[$key];
|
||||
$constnote = dol_escape_htmltag($constnotearray[$key]);
|
||||
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, $constnote, $conf->entity);
|
||||
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2005-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@ if (getDolGlobalInt('MAIN_ACTIVATE_FILECACHE')) {
|
|||
} else {
|
||||
print img_picto('', 'minus', 'class="pictofixedwidth"');
|
||||
}
|
||||
print ' '.$form->textwithpicto($langs->trans("EnableFileCache").' ('.$langs->trans("Widgets").')', $langs->trans("Option").' MAIN_ACTIVATE_FILECACHE');
|
||||
print $form->textwithpicto($langs->trans("EnableFileCache").' ('.$langs->trans("Widgets").')', $langs->trans("Option").' MAIN_ACTIVATE_FILECACHE');
|
||||
print ': '.yn(getDolGlobalInt('MAIN_ACTIVATE_FILECACHE'));
|
||||
print '<br>';
|
||||
|
||||
|
|
@ -669,7 +669,7 @@ if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
|||
} else {
|
||||
print img_picto('', 'minus', 'class="pictofixedwidth"');
|
||||
}
|
||||
print ' MAIN_ENABLE_AJAX_TOOLTIP : ';
|
||||
print 'MAIN_ENABLE_AJAX_TOOLTIP : ';
|
||||
print yn(getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP'));
|
||||
print '<br>';
|
||||
|
||||
|
|
|
|||
|
|
@ -379,11 +379,12 @@ if (empty($dolibarr_main_stream_to_disable)) {
|
|||
} else {
|
||||
print implode(', ', $dolibarr_main_stream_to_disable);
|
||||
}
|
||||
print '<span class="bold"> -> Current PHP streams allowed = </span>';
|
||||
print '<span class="bold"> -> Current PHP streams allowed = </span>';
|
||||
$arrayofstreams = stream_get_wrappers();
|
||||
if (!empty($arrayofstreams)) {
|
||||
sort($arrayofstreams);
|
||||
print(implode(', ', $arrayofstreams)).' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("TryToKeepOnly", 'file,http,https,php,zip').')</span>'."\n";
|
||||
print '<span class="wordbreakall">'.implode(',', $arrayofstreams).'</span>';
|
||||
print ' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("TryToKeepOnly", 'file,http,https,php,zip').')</span>'."\n";
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -167,21 +167,12 @@ if ($action == 'updateMask') {
|
|||
$error++;
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('product_category_id')) {
|
||||
$param_ticket_product_category = GETPOSTINT('product_category_id');
|
||||
$res = dolibarr_set_const($db, 'TICKET_PRODUCT_CATEGORY', $param_ticket_product_category, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
$param_status = GETPOST('TICKET_SET_STATUS_ON_ANSWER');
|
||||
$res = dolibarr_set_const($db, 'TICKET_SET_STATUS_ON_ANSWER', $param_status, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
$param_delay_first_response = GETPOSTINT('delay_first_response');
|
||||
$res = dolibarr_set_const($db, 'TICKET_DELAY_BEFORE_FIRST_RESPONSE', $param_delay_first_response, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
|
|
@ -625,37 +616,6 @@ print $formcategory->textwithpicto('', $langs->trans("TicketAutoCheckNotifyThird
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Assign contact to a message
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketAssignContactToMessage").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_ASSIGN_CONTACT_TO_MESSAGE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $formcategory->selectarray("TICKET_ASSIGN_CONTACT_TO_MESSAGE", $arrval, getDolGlobalString('TICKET_ASSIGN_CONTACT_TO_MESSAGE'));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketAssignContactToMessageHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
if (isModEnabled('product')) {
|
||||
$htmlname = "product_category_id";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketChooseProductCategory").'</td>';
|
||||
print '<td class="left">';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
$formcategory->selectProductCategory(getDolGlobalString('TICKET_PRODUCT_CATEGORY'), $htmlname);
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_combobox('select_'.$htmlname);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketChooseProductCategoryHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TicketsDelayBeforeFirstAnswer")."</td>";
|
||||
print '<td class="left">
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ require '../main.inc.php';
|
|||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/ticket.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/class/html.formcategory.class.php";
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin", "ticket"));
|
||||
|
|
@ -221,6 +222,7 @@ if ($action != '') {
|
|||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
$form = new Form($db);
|
||||
$formcategory = new FormCategory($db);
|
||||
|
||||
$help_url = "FR:Module_Ticket";
|
||||
$page_name = "TicketSetup";
|
||||
|
|
@ -414,7 +416,7 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
}
|
||||
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
print '<tr class="impair"><td colspan="3" align="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></td>';
|
||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
|
@ -458,9 +460,29 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHelpMessageHelpAdmin"), 1, 'help');
|
||||
print '</td></tr>';
|
||||
|
||||
// Add first contact id found in database from submitter email entered into public interface
|
||||
// Feature disabled: This has a security trouble. The public interface is a no login interface, so being able to show the contact info from an
|
||||
// email decided by the submiter allows anybody to get information on any contact (customer or supplier) in Dolibarr database.
|
||||
// He can even check if contact exists by trying any email if this feature is enabled.
|
||||
/*
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketAssignContactToMessage").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_ASSIGN_CONTACT_TO_MESSAGE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $formcategory->selectarray("TICKET_ASSIGN_CONTACT_TO_MESSAGE", $arrval, getDolGlobalString('TICKET_ASSIGN_CONTACT_TO_MESSAGE'));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketAssignContactToMessageHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// Url public interface
|
||||
$url_interface = getDolGlobalString("TICKET_URL_PUBLIC_INTERFACE");
|
||||
print '<tr><td>'.$langs->trans("UrlPublicInterfaceLabelAdmin").'</label>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("UrlPublicInterfaceLabelAdmin").'</label>';
|
||||
print '</td><td>';
|
||||
print '<input type="text" class="minwidth500" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$url_interface.'" placeholder="https://..."></td>';
|
||||
print '</td>';
|
||||
|
|
@ -470,15 +492,17 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans("Emails"));
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
// Activate email creation to user
|
||||
print '<tr class="pair"><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketsDisableCustomerEmail"), $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
|
|
@ -493,7 +517,7 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
|
||||
// Text of email after creatio of a ticket
|
||||
$mail_mesg_new = getDolGlobalString("TICKET_MESSAGE_MAIL_NEW", $langs->trans('TicketNewEmailBody'));
|
||||
print '<tr><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketNewEmailBodyLabel"), $langs->trans("TicketNewEmailBodyHelp"), 1, 'help');
|
||||
print '</label>';
|
||||
print '</td><td>';
|
||||
|
|
@ -504,7 +528,7 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print '</tr>';
|
||||
|
||||
// Activate email notification when a new message is added
|
||||
print '<tr class="pair"><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketsPublicNotificationNewMessage"), $langs->trans("TicketsPublicNotificationNewMessageHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
|
|
@ -518,7 +542,7 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print '</tr>';
|
||||
|
||||
// Send notification when a new message is added to a email if a user is not assigned to the ticket
|
||||
print '<tr><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketPublicNotificationNewMessageDefaultEmail"), $langs->trans("TicketPublicNotificationNewMessageDefaultEmailHelp"), 1, 'help');
|
||||
print '</td><td>';
|
||||
print '<input type="text" name="TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL" value="'.getDolGlobalString("TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL").'" size="40" ></td>';
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ if ($transvalue) {
|
|||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
if (isset($optioncss) && $optioncss != '') {
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
|
|
|||
|
|
@ -234,6 +234,12 @@ $workflowcodes = array_filter(
|
|||
}
|
||||
);
|
||||
|
||||
if ($action == 'setvarworkflow') { // Test on permission already done
|
||||
if (GETPOSTISSET('product_category_id')) {
|
||||
$param_ticket_product_category = GETPOSTINT('product_category_id');
|
||||
$res = dolibarr_set_const($db, 'TICKET_PRODUCT_CATEGORY', $param_ticket_product_category, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -261,22 +267,30 @@ if (count($workflowcodes) < 1) {
|
|||
// Sort on position
|
||||
$workflowcodes = dol_sort_array($workflowcodes, 'position');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setvarworkflow">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
|
||||
$oldfamily = '';
|
||||
$tableopen = 0;
|
||||
$atleastoneline = 0;
|
||||
|
||||
foreach ($workflowcodes as $key => $params) {
|
||||
if ($params['family'] == 'separator') {
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
if ($atleastoneline) {
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
$oldfamily = '';
|
||||
$atleastoneline = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$reg = array();
|
||||
if ($oldfamily != $params['family']) {
|
||||
// New group
|
||||
if ($params['family'] == 'create') {
|
||||
$header = $langs->trans("AutomaticCreation");
|
||||
} elseif (preg_match('/classify_(.*)/', $params['family'], $reg)) {
|
||||
|
|
@ -308,6 +322,9 @@ foreach ($workflowcodes as $key => $params) {
|
|||
$header = $langs->trans("Description");
|
||||
}
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
$tableopen = 1;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>'.$header.'</th>';
|
||||
print '<th class="right">'.$langs->trans("Status").'</th>';
|
||||
|
|
@ -316,6 +333,8 @@ foreach ($workflowcodes as $key => $params) {
|
|||
$oldfamily = $params['family'];
|
||||
}
|
||||
|
||||
$atleastoneline = 1;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print img_object('', $params['picto'], 'class="pictofixedwidth"');
|
||||
|
|
@ -328,6 +347,26 @@ foreach ($workflowcodes as $key => $params) {
|
|||
print ' '.img_warning($langs->transnoentitiesnoconv("Deprecated"));
|
||||
}
|
||||
|
||||
if ($key == 'WORKFLOW_TICKET_LINK_CONTRACT' && getDolGlobalString('WORKFLOW_TICKET_LINK_CONTRACT')) {
|
||||
require_once DOL_DOCUMENT_ROOT."/core/class/html.formcategory.class.php";
|
||||
|
||||
$formcategory = new FormCategory($db);
|
||||
|
||||
$htmlname = "product_category_id";
|
||||
print '<br>';
|
||||
print $formcategory->textwithpicto($langs->trans("TicketChooseProductCategory"), $langs->trans("TicketChooseProductCategoryHelp"), 1, 'help');
|
||||
if (isModEnabled('category')) {
|
||||
print ' '.img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
$formcategory->selectProductCategory(getDolGlobalInt('TICKET_PRODUCT_CATEGORY'), $htmlname, 1);
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_combobox('select_'.$htmlname);
|
||||
}
|
||||
print '<input class="button smallpaddingimp" type="submit" value="'.$langs->trans("Save").'">';
|
||||
} else {
|
||||
print 'Module category must be enabled';
|
||||
}
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
|
|
@ -354,7 +393,12 @@ foreach ($workflowcodes as $key => $params) {
|
|||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
if ($tableopen) {
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ class Documents extends DolibarrApi
|
|||
// Move the temporary file at its final emplacement
|
||||
$result = dol_move($destfiletmp, $dest_file, '0', $overwriteifexists, 1, 1, $moreinfo);
|
||||
if (!$result) {
|
||||
throw new RestException(500, "Failed to move file into '".$destfile."'");
|
||||
throw new RestException(500, "Failed to move file into '".$dest_file."'");
|
||||
}
|
||||
|
||||
return dol_basename($destfile);
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_
|
|||
$moreforfilter.= '</div>';*/
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_
|
|||
$moreforfilter.= '</div>';*/
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Open-Dsi <support@open-dsi.fr>
|
||||
* 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
|
||||
|
|
@ -121,7 +122,7 @@ if (empty($reshook)) {
|
|||
print '</td>';
|
||||
print '<td class="valuefieldcreate">';
|
||||
if (!empty($field_info['picto'])) {
|
||||
print img_picto('', $field_info['picto'], '', false, 0, 0, '', 'pictofixedwidth');
|
||||
print img_picto('', $field_info['picto'], '', 0, 0, 0, '', 'pictofixedwidth');
|
||||
}
|
||||
if (in_array($field_info['type'], array('int', 'integer'))) {
|
||||
$value = GETPOSTISSET($html_name) ? GETPOSTINT($html_name) : $assetdepreciationoptions->$field_key;
|
||||
|
|
|
|||
|
|
@ -534,9 +534,6 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1074,9 +1074,9 @@ class BOM extends CommonObject
|
|||
|
||||
/**
|
||||
* getTooltipContentArray
|
||||
* @param array $params params to construct tooltip data
|
||||
* @param array<string,mixed> $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array{picto:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
* @return array{picto?:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -137,9 +137,9 @@ if (isModEnabled("product") || isModEnabled("service")) {
|
|||
$statustoshow = -1;
|
||||
if (getDolGlobalString('ENTREPOT_EXTRA_STATUS')) {
|
||||
// hide products in closed warehouse, but show products for internal transfer
|
||||
print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, 'warehouseopen,warehouseinternal', GETPOSTINT('combinations'), 1);
|
||||
print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), 0, $statustoshow, 2, '', 1, array(), 0, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, 'warehouseopen,warehouseinternal', GETPOSTINT('combinations'), 1);
|
||||
} else {
|
||||
print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, '', GETPOSTINT('combinations'), 1);
|
||||
print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), 0, $statustoshow, 2, '', 1, array(), 0, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, '', GETPOSTINT('combinations'), 1);
|
||||
}
|
||||
$urltocreateproduct = DOL_URL_ROOT.'/product/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
print '<a href="'.$urltocreateproduct.'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProduct").'"></span></a>';
|
||||
|
|
|
|||
|
|
@ -511,9 +511,6 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ if ($object->id > 0) {
|
|||
//$cachekey = 'count_events_myobject_'.$object->id;
|
||||
//$nbEvent = dol_getcache($cachekey);
|
||||
$titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>': '');
|
||||
|
||||
print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0);
|
||||
|
||||
// List of all actions
|
||||
|
|
|
|||
|
|
@ -492,9 +492,6 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -669,7 +669,7 @@ class Calendar extends CommonObject
|
|||
* getTooltipContentArray
|
||||
* @param array<string,mixed> $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array{picto:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
* @return array{picto?:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -93,7 +94,7 @@ function printDropdownBookmarksList()
|
|||
//$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url);
|
||||
$urltoadd = DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url);
|
||||
$newbtn .= '<a class="top-menu-dropdown-link" title="'.$langs->trans('AddThisPageToBookmarks').'" href="'.dol_escape_htmltag($urltoadd).'" >';
|
||||
$newbtn .= img_picto('', 'add', '', false, 0, 0, '', 'paddingright').dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).'</a>';
|
||||
$newbtn .= img_picto('', 'add', '', 0, 0, 0, '', 'paddingright').dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ restrictedArea($user, 'bookmark', $object);
|
|||
|
||||
$permissiontoread = $user->hasRight('bookmark', 'lire');
|
||||
$permissiontoadd = $user->hasRight('bookmark', 'creer');
|
||||
$permissiontodelete = $user->hasRight('bookmark', 'supprimer');
|
||||
$permissiontodelete = ($user->hasRight('bookmark', 'supprimer') || ($permissiontoadd && $object->fk_user == $user->id)); // Can always delete its own bookmark
|
||||
|
||||
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) {
|
|||
|
||||
// Buttons
|
||||
|
||||
print "<div class=\"tabsAction\">\n";
|
||||
print '<div class="tabsAction">'."\n";
|
||||
|
||||
// Edit
|
||||
if ($permissiontoadd && $action != 'edit') {
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
|||
$moreforfilter = '';
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -889,12 +889,14 @@ class Categorie extends CommonObject
|
|||
* @param string $sortfield Sort fields
|
||||
* @param string $sortorder Sort order ('ASC' or 'DESC');
|
||||
* @param string $filter Filter as an Universal Search string.
|
||||
* Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')'
|
||||
* Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')'
|
||||
* For multilingual fields, use: '(ol.label:like:'%value%')' and set $filterlang parameter
|
||||
* @param string $filtermode No more used
|
||||
* @param string $filterlang Language to use in Universal Search for multilingual fields ('fr_FR', 'en_US'...)
|
||||
* @return CommonObject[]|int[]|int Return -1 if KO, array of instance of object if OK
|
||||
* @see containsObject()
|
||||
*/
|
||||
public function getObjectsInCateg($type, $onlyids = 0, $limit = 0, $offset = 0, $sortfield = '', $sortorder = 'ASC', $filter = '', $filtermode = 'AND')
|
||||
public function getObjectsInCateg($type, $onlyids = 0, $limit = 0, $offset = 0, $sortfield = '', $sortorder = 'ASC', $filter = '', $filtermode = 'AND', $filterlang = '')
|
||||
{
|
||||
global $user;
|
||||
|
||||
|
|
@ -906,6 +908,9 @@ class Categorie extends CommonObject
|
|||
$sql = "SELECT c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." as fk_object";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type])." as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX.(empty($this->MAP_OBJ_TABLE[$type]) ? $type : $this->MAP_OBJ_TABLE[$type])." as o";
|
||||
if (!empty($filterlang)) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX.(empty($this->MAP_OBJ_TABLE[$type]) ? $type : $this->MAP_OBJ_TABLE[$type])."_lang as ol";
|
||||
}
|
||||
$sql .= " WHERE o.entity IN (".getEntity($obj->element).")";
|
||||
$sql .= " AND c.fk_categorie = ".((int) $this->id);
|
||||
// Compatibility with actioncomm table which has id instead of rowid
|
||||
|
|
@ -914,6 +919,10 @@ class Categorie extends CommonObject
|
|||
} else {
|
||||
$sql .= " AND c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = o.rowid";
|
||||
}
|
||||
if (!empty($filterlang)) {
|
||||
$sql .= " AND ol.fk_".(empty($this->MAP_OBJ_TABLE[$type]) ? $type : $this->MAP_OBJ_TABLE[$type])." = o.rowid";
|
||||
$sql .= " AND ol.lang = '".$this->db->escape($filterlang)."'";
|
||||
}
|
||||
// Protection for external users
|
||||
if (($type == 'customer' || $type == 'supplier') && $user->socid > 0) {
|
||||
$sql .= " AND o.rowid = ".((int) $user->socid);
|
||||
|
|
@ -1703,9 +1712,9 @@ class Categorie extends CommonObject
|
|||
|
||||
/**
|
||||
* getTooltipContentArray
|
||||
* @param array $params params to construct tooltip data
|
||||
* @param array<string,mixed> $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array
|
||||
* @return array{picto?:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ if ($type == Categorie::TYPE_PRODUCT) {
|
|||
if ($permission) {
|
||||
print '<a class="reposition" href= "'.$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".((int) $object->id)."&type=".urlencode($typeid)."&action=unlink&token=".newToken()."&removeelem=".$prod->id.'">';
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -659,7 +659,7 @@ if ($type == Categorie::TYPE_CUSTOMER) {
|
|||
if ($permission) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$soc->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -747,7 +747,7 @@ if ($type == Categorie::TYPE_SUPPLIER) {
|
|||
if ($permission) {
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$soc->id.($limit ? '&limit='.$limit : '').'">';
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -839,7 +839,7 @@ if ($type == Categorie::TYPE_MEMBER) {
|
|||
if ($permission) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$member->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -932,7 +932,7 @@ if ($type == Categorie::TYPE_CONTACT) {
|
|||
if ($permission) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$contact->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -1022,7 +1022,7 @@ if ($type == Categorie::TYPE_ACCOUNT) {
|
|||
if ($permission) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$account->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -1112,7 +1112,7 @@ if ($type == Categorie::TYPE_PROJECT) {
|
|||
if ($permission) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$project->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -1196,7 +1196,7 @@ if ($type == Categorie::TYPE_USER) {
|
|||
if ($user->hasRight('user', 'user', 'creer')) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$userentry->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -1267,7 +1267,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) {
|
|||
if ($permission) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$warehouse->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -1355,7 +1355,7 @@ if ($type == Categorie::TYPE_TICKET) {
|
|||
if ($permission) {
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&type=".$typeid."&action=unlink&token=".newToken()."&removeelem=".$ticket->id."'>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -331,6 +331,8 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
|
|||
$datep = dol_mktime(GETPOSTINT("aphour"), GETPOSTINT("apmin"), GETPOSTINT("apsec"), GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel');
|
||||
$datef = dol_mktime(GETPOSTINT("p2hour"), GETPOSTINT("p2min"), GETPOSTINT("apsec"), GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel');
|
||||
}
|
||||
//set end date to now if percentage is set to 100 and end date not set
|
||||
$datef = (!$datef && $percentage == 100)?dol_now():$datef;
|
||||
|
||||
// Check parameters
|
||||
if (!$datef && $percentage == 100) {
|
||||
|
|
@ -1225,7 +1227,29 @@ if ($action == 'create') {
|
|||
console.log("setdatefields");
|
||||
setdatefields();
|
||||
});
|
||||
|
||||
var old_startdate = null;
|
||||
$("#ap").focus(function() {
|
||||
old_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val());
|
||||
});
|
||||
$("#ap").next(".ui-datepicker-trigger").click(function() {
|
||||
old_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val());
|
||||
});
|
||||
$("#ap").change(function() {
|
||||
setTimeout(function() {
|
||||
if ($("#p2").val() !== "") {
|
||||
var new_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val());
|
||||
var old_enddate = new Date($("#p2year").val(), $("#p2month").val() - 1, $("#p2day").val());
|
||||
if (new_startdate > old_enddate) {
|
||||
var timeDiff = old_enddate - old_startdate;
|
||||
var new_enddate = new Date(new_startdate.getTime() + timeDiff);
|
||||
$("#p2").val(formatDate(new_enddate, "' . $langs->trans('FormatDateShortJavaInput') . '"));
|
||||
$("#p2day").val(new_enddate.getDate());
|
||||
$("#p2month").val(new_enddate.getMonth() + 1);
|
||||
$("#p2year").val(new_enddate.getFullYear());
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
});
|
||||
$("#actioncode").change(function() {
|
||||
if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired");
|
||||
else $("#dateend").removeClass("fieldrequired");
|
||||
|
|
@ -1817,6 +1841,29 @@ if ($id > 0) {
|
|||
$("#fullday").change(function() {
|
||||
setdatefields();
|
||||
});
|
||||
var old_startdate = null;
|
||||
$("#ap").focus(function() {
|
||||
old_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val());
|
||||
});
|
||||
$("#ap").next(".ui-datepicker-trigger").click(function() {
|
||||
old_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val());
|
||||
});
|
||||
$("#ap").change(function() {
|
||||
setTimeout(function() {
|
||||
if ($("#p2").val() !== "") {
|
||||
var new_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val());
|
||||
var old_enddate = new Date($("#p2year").val(), $("#p2month").val() - 1, $("#p2day").val());
|
||||
if (new_startdate > old_enddate) {
|
||||
var timeDiff = old_enddate - old_startdate;
|
||||
var new_enddate = new Date(new_startdate.getTime() + timeDiff);
|
||||
$("#p2").val(formatDate(new_enddate, "' . $langs->trans('FormatDateShortJavaInput') . '"));
|
||||
$("#p2day").val(new_enddate.getDate());
|
||||
$("#p2month").val(new_enddate.getMonth() + 1);
|
||||
$("#p2year").val(new_enddate.getFullYear());
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
});
|
||||
$("#actioncode").change(function() {
|
||||
if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired");
|
||||
else $("#dateend").removeClass("fieldrequired");
|
||||
|
|
@ -2334,12 +2381,13 @@ if ($id > 0) {
|
|||
// Type
|
||||
if (getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td>';
|
||||
$labeltoshow = $langs->trans("Action".$object->type_code);
|
||||
$labeltype = ($langs->transnoentities("Action".$object->type_code) != "Action".$object->type_code) ? $langs->transnoentities("Action".$object->type_code) : $object->type_label;
|
||||
$labeltoshow = $labeltype;
|
||||
if ($object->code) {
|
||||
$labeltoshow .= ' ('.$object->code.')';
|
||||
}
|
||||
print $object->getTypePicto('pictofixedwidth paddingright', $labeltoshow);
|
||||
print $langs->trans("Action".$object->type_code);
|
||||
print $labeltype;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -845,6 +845,7 @@ class ActionComm extends CommonObject
|
|||
$this->type_color = $obj->type_color;
|
||||
$this->type_picto = $obj->type_picto;
|
||||
$this->type = $obj->type_type;
|
||||
$this->type_label = $obj->type_label;
|
||||
|
||||
$this->code = $obj->code;
|
||||
$this->label = $obj->label;
|
||||
|
|
@ -1869,32 +1870,32 @@ class ActionComm extends CommonObject
|
|||
$color = 'style="color: #'.$this->type_color.' !important;"';
|
||||
}
|
||||
if ($this->type_picto) {
|
||||
$imgpicto = img_picto($titlealt, $this->type_picto, '', false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, $this->type_picto, '', 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} else {
|
||||
if ($this->type_code == 'AC_RDV') {
|
||||
$imgpicto = img_picto($titlealt, 'meeting', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'meeting', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} elseif ($this->type_code == 'AC_TEL') {
|
||||
$imgpicto = img_picto($titlealt, 'object_phoning', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'object_phoning', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} elseif ($this->type_code == 'AC_FAX') {
|
||||
$imgpicto = img_picto($titlealt, 'object_phoning_fax', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'object_phoning_fax', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN' || (!empty($this->code) && preg_match('/_SENTBYMAIL/', $this->code))) {
|
||||
$imgpicto = img_picto($titlealt, 'object_email', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'object_email', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} elseif ($this->type_code == 'AC_INT') {
|
||||
$imgpicto = img_picto($titlealt, 'object_intervention', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'object_intervention', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} elseif (!empty($this->code) && preg_match('/^TICKET_MSG/', $this->code)) {
|
||||
$imgpicto = img_picto($titlealt, 'object_conversation', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'object_conversation', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} elseif ($this->type != 'systemauto') {
|
||||
$imgpicto = img_picto($titlealt, 'user-cog', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'user-cog', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} else {
|
||||
$imgpicto = img_picto($titlealt, 'cog', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'cog', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 2 picto: 1 for auto, 1 for manual
|
||||
if ($this->type != 'systemauto') {
|
||||
$imgpicto = img_picto($titlealt, 'user-cog', '', false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'user-cog', '', 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
} else {
|
||||
$imgpicto = img_picto($titlealt, 'cog', '', false, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
$imgpicto = img_picto($titlealt, 'cog', '', 0, 0, 0, '', ($morecss ? ' '.$morecss : ''));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1563,7 +1563,7 @@ if (empty($mode) || $mode == 'show_month') { // View by month
|
|||
}
|
||||
echo ' </tr>'."\n";
|
||||
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
$todaytms = dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']);
|
||||
|
||||
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
||||
|
|
@ -1679,7 +1679,7 @@ if (empty($mode) || $mode == 'show_month') { // View by month
|
|||
}
|
||||
|
||||
$today = 0;
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $tmpmonth && $todayarray['year'] == $tmpyear) {
|
||||
$today = 1;
|
||||
}
|
||||
|
|
@ -1709,7 +1709,7 @@ if (empty($mode) || $mode == 'show_month') { // View by month
|
|||
// Code to show just one day
|
||||
$style = 'cal_current_month cal_current_month_oneday';
|
||||
$today = 0;
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
if ($todayarray['mday'] == $day && $todayarray['mon'] == $month && $todayarray['year'] == $year) {
|
||||
$today = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -832,7 +832,7 @@ while ($obj = $db->fetch_object($resql)) {
|
|||
}
|
||||
|
||||
// Loop on each user to show calendar
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
$sav = $tmpday;
|
||||
$showheader = true;
|
||||
$var = false;
|
||||
|
|
|
|||
|
|
@ -999,7 +999,7 @@ while ($currentdaytoshow < $lastdaytoshow) {
|
|||
}
|
||||
|
||||
// Loop on each user to show calendar
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
$sav = $tmpday;
|
||||
$showheader = true;
|
||||
$var = false;
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ if ($object->id > 0) {
|
|||
|
||||
|
||||
// Multiprice level
|
||||
if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) {
|
||||
if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) {
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans("PriceLevel");
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ if ($resql) {
|
|||
print '<td class="liste_titre"><input class="flat" name="search_firstname" size="12" value="'.$search_firstname.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat" name="search_company" size="12" value="'.$search_company.'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre right"><input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
||||
print '<td class="liste_titre right"><input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', 0, 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$i = 0;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ if (GETPOST('button_removefilter_x', 'alpha')) {
|
|||
$search_email = '';
|
||||
}
|
||||
$array_query = array();
|
||||
'@phan-var-force array<string,int|string|string[]> $array_query';
|
||||
$object = new Mailing($db);
|
||||
$advTarget = new AdvanceTargetingMailing($db);
|
||||
|
||||
|
|
@ -465,6 +466,10 @@ if ($object->fetch($id) >= 0) {
|
|||
|
||||
// Show email selectors
|
||||
if ($object->status == 0 && $user->hasRight('mailing', 'creer')) {
|
||||
// @phan-assert FormAdvTargetEmailing $formadvtargetemaling
|
||||
// @phan-assert AdvanceTargetingMailing $advTarget
|
||||
|
||||
// @phan-assert array<string,int|string|string[] $array_query'
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/advtarget.tpl.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1500,7 +1500,7 @@ if ($action == 'create') { // aaa
|
|||
foreach ($listofpaths as $key => $val) {
|
||||
$out .= '<div id="attachfile_'.$key.'">';
|
||||
$out .= img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name'];
|
||||
$out .= ' <input type="image" style="border: 0px;" src="'.img_picto($langs->trans("Search"), 'delete.png', '', '', 1).'" value="'.($key + 1).'" class="removedfile" id="removedfile_'.$key.'" name="removedfile_'.$key.'" />';
|
||||
$out .= ' <input type="image" style="border: 0px;" src="'.img_picto($langs->trans("Search"), 'delete.png', '', 0, 1).'" value="'.($key + 1).'" class="removedfile" id="removedfile_'.$key.'" name="removedfile_'.$key.'" />';
|
||||
$out .= '<br></div>';
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -773,10 +773,9 @@ class Mailing extends CommonObject
|
|||
|
||||
/**
|
||||
* getTooltipContentArray
|
||||
*
|
||||
* @param array $params ex option, infologin
|
||||
* @param array<string,mixed> $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array
|
||||
* @return array{picto?:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -372,9 +372,6 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array('type' => $type);
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -547,7 +547,7 @@ if (empty($reshook)) {
|
|||
$element = $subelement = 'contrat';
|
||||
}
|
||||
if ($element == 'inter') {
|
||||
$element = $subelement = 'ficheinter';
|
||||
$element = $subelement = 'fichinter';
|
||||
}
|
||||
if ($element == 'shipping') {
|
||||
$element = $subelement = 'expedition';
|
||||
|
|
@ -568,6 +568,7 @@ if (empty($reshook)) {
|
|||
|
||||
$classname = ucfirst($subelement);
|
||||
$srcobject = new $classname($db);
|
||||
'@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Can be other class, but CommonObject is too generic
|
||||
|
||||
dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines");
|
||||
$result = $srcobject->fetch($object->origin_id);
|
||||
|
|
@ -705,7 +706,7 @@ if (empty($reshook)) {
|
|||
$ret = $object->fetch($id); // Reload to get new records
|
||||
$result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) {
|
||||
dol_print_error($db, $result);
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -930,7 +931,10 @@ if (empty($reshook)) {
|
|||
|
||||
// Go back to draft
|
||||
if ($action == 'modif' && $usercancreate) {
|
||||
$object->setDraft($user);
|
||||
$result = $object->setDraft($user);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
|
||||
// Define output language
|
||||
|
|
@ -1137,8 +1141,51 @@ if (empty($reshook)) {
|
|||
$price_min_ttc = $prod->price_min_ttc;
|
||||
$price_base_type = $prod->price_base_type;
|
||||
|
||||
// If price per segment
|
||||
if (getDolGlobalString('PRODUIT_MULTIPRICES') && $object->thirdparty->price_level) {
|
||||
if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) {
|
||||
// If price per customer
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
|
||||
$prodcustprice = new ProductCustomerPrice($db);
|
||||
$filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id);
|
||||
|
||||
// If a price per customer exist
|
||||
$pricebycustomerexist = false;
|
||||
$result = $prodcustprice->fetchAll('', '', 0, 0, $filter);
|
||||
if ($result) {
|
||||
// If there is some prices specific to the customer
|
||||
if (count($prodcustprice->lines) > 0) {
|
||||
$pricebycustomerexist = true;
|
||||
$pu_ht = price($prodcustprice->lines[0]->price);
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_min = price($prodcustprice->lines[0]->price_min);
|
||||
$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
/*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
|
||||
if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
|
||||
$tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
}
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) {
|
||||
$tva_npr = 0;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
if ( !$pricebycustomerexist && $object->thirdparty->price_level) { // If price per segment
|
||||
$pu_ht = $prod->multiprices[$object->thirdparty->price_level];
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->thirdparty->price_level];
|
||||
$price_min_ttc = $prod->multiprices_min_ttc[$object->thirdparty->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level];
|
||||
if (getDolGlobalString('PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL')) { // using this option is a bug. kept for backward compatibility
|
||||
if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) {
|
||||
$tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level];
|
||||
}
|
||||
if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) {
|
||||
$tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level];
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif (getDolGlobalString('PRODUIT_MULTIPRICES') && $object->thirdparty->price_level) { // If price per segment
|
||||
$pu_ht = $prod->multiprices[$object->thirdparty->price_level];
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->thirdparty->price_level];
|
||||
|
|
@ -1276,7 +1323,7 @@ if (empty($reshook)) {
|
|||
if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
|
||||
$desc = $product_desc;
|
||||
} else {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
// Add custom code and origin country into description
|
||||
|
|
@ -1549,11 +1596,11 @@ if (empty($reshook)) {
|
|||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||
|
||||
$price_min = $product->price_min;
|
||||
if (getDolGlobalString('PRODUIT_MULTIPRICES') && !empty($object->thirdparty->price_level)) {
|
||||
if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($object->thirdparty->price_level)) {
|
||||
$price_min = $product->multiprices_min[$object->thirdparty->price_level];
|
||||
}
|
||||
$price_min_ttc = $product->price_min_ttc;
|
||||
if (getDolGlobalString('PRODUIT_MULTIPRICES') && !empty($object->thirdparty->price_level)) {
|
||||
if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($object->thirdparty->price_level)) {
|
||||
$price_min_ttc = $product->multiprices_min_ttc[$object->thirdparty->price_level];
|
||||
}
|
||||
|
||||
|
|
@ -1839,6 +1886,7 @@ if ($action == 'create') {
|
|||
|
||||
$classname = ucfirst($subelement);
|
||||
$objectsrc = new $classname($db);
|
||||
'@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc'; // Can be other class, but CommonObject is too generic
|
||||
$objectsrc->fetch($originid);
|
||||
if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
|
||||
$objectsrc->fetch_lines();
|
||||
|
|
@ -1956,7 +2004,7 @@ if ($action == 'create') {
|
|||
} else {
|
||||
print '<td class="valuefieldcreate">';
|
||||
$filter = '((s.client:IN:1,2,3) AND (s.status:=:1))';
|
||||
print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx');
|
||||
print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx');
|
||||
// reload page to retrieve customer information
|
||||
if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) {
|
||||
print '<script>
|
||||
|
|
@ -2289,7 +2337,7 @@ if ($action == 'create') {
|
|||
$formquestion = array(
|
||||
// 'text' => $langs->trans("ConfirmClone"),
|
||||
// array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, null, 0, 'maxwidth300')),
|
||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, array(), 0, 'maxwidth300')),
|
||||
array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans('PuttingPricesUpToDate'), 'value' => 0),
|
||||
array('type' => 'checkbox', 'name' => 'update_desc', 'label' => $langs->trans('PuttingDescUpToDate'), 'value' => 0),
|
||||
);
|
||||
|
|
@ -2324,6 +2372,7 @@ if ($action == 'create') {
|
|||
|
||||
if (array_key_exists('facture', $object->linkedObjects)) {
|
||||
foreach ($object->linkedObjects['facture'] as $invoice) {
|
||||
'@phan-var-force Facture $invoice';
|
||||
if ($invoice->type == Facture::TYPE_DEPOSIT) {
|
||||
$eligibleForDepositGeneration = false;
|
||||
break;
|
||||
|
|
@ -2337,6 +2386,7 @@ if ($action == 'create') {
|
|||
|
||||
if (array_key_exists('facture', $order->linkedObjects)) {
|
||||
foreach ($order->linkedObjects['facture'] as $invoice) {
|
||||
'@phan-var-force Facture $invoice';
|
||||
if ($invoice->type == Facture::TYPE_DEPOSIT) {
|
||||
$eligibleForDepositGeneration = false;
|
||||
break 2;
|
||||
|
|
@ -2583,10 +2633,10 @@ if ($action == 'create') {
|
|||
$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td>';
|
||||
print '<tr><td class="titlefieldmax45">'.$langs->trans('Discounts').'</td><td>';
|
||||
|
||||
$absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount);
|
||||
$absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote);
|
||||
$absolute_discount = $soc->getAvailableDiscounts(null, $filterabsolutediscount);
|
||||
$absolute_creditnote = $soc->getAvailableDiscounts(null, $filtercreditnote);
|
||||
$absolute_discount = price2num($absolute_discount, 'MT');
|
||||
$absolute_creditnote = price2num($absolute_creditnote, 'MT');
|
||||
|
||||
|
|
@ -2682,7 +2732,7 @@ if ($action == 'create') {
|
|||
|
||||
// Payment mode
|
||||
print '<tr class="field_mode_reglement_id">';
|
||||
print '<td class="titlefieldcreate">';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
|
|
@ -2709,7 +2759,7 @@ if ($action == 'create') {
|
|||
|
||||
// Delivery delay
|
||||
print '<tr class="fielddeliverydelay"><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
if (isModEnabled('order')) {
|
||||
print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod').' ('.$langs->trans('AfterOrder').')');
|
||||
} else {
|
||||
|
|
@ -2755,7 +2805,7 @@ if ($action == 'create') {
|
|||
$langs->load('stocks');
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
$formproduct = new FormProduct($db);
|
||||
print '<tr class="field_warehouse_id"><td class="titlefieldcreate">';
|
||||
print '<tr class="field_warehouse_id"><td>';
|
||||
$editenable = $usercancreate;
|
||||
print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $editenable);
|
||||
print '</td><td class="valuefieldcreate">';
|
||||
|
|
@ -2786,56 +2836,6 @@ if ($action == 'create') {
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency
|
||||
if (isModEnabled("multicurrency")) {
|
||||
// Multicurrency code
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT && $usercancreate) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencycode&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefield">';
|
||||
if ($object->statut == $object::STATUS_DRAFT && $action == 'editmulticurrencycode' && $usercancreate) {
|
||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_code, 'multicurrency_code');
|
||||
} else {
|
||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_code, 'none');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Multicurrency rate
|
||||
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr>';
|
||||
print '<td>';
|
||||
print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate) {
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencyrate&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td class="valuefield">';
|
||||
if ($object->statut == $object::STATUS_DRAFT && ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') && $usercancreate) {
|
||||
if ($action == 'actualizemulticurrencyrate') {
|
||||
list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code);
|
||||
}
|
||||
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||
} else {
|
||||
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
|
||||
if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
|
||||
print '<div class="inline-block"> ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($soc->outstanding_limit) {
|
||||
// Outstanding Bill
|
||||
print '<tr><td>';
|
||||
|
|
@ -2869,20 +2869,22 @@ if ($action == 'create') {
|
|||
print '</tr>';
|
||||
}
|
||||
|
||||
$tmparray = $object->getTotalWeightVolume();
|
||||
$totalWeight = isset($tmparray['weight']) ? $tmparray['weight'] : 0;
|
||||
$totalVolume = isset($tmparray['volume']) ? $tmparray['volume'] : 0;
|
||||
if ($totalWeight) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
||||
print '<td class="valuefield">';
|
||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no', 0);
|
||||
print '</td></tr>';
|
||||
}
|
||||
if ($totalVolume) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
||||
print '<td class="valuefield">';
|
||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no', 0);
|
||||
print '</td></tr>';
|
||||
if (!getDolGlobalString('PROPOSAL_HIDE_CALCULATED_WEIGHT_VOLUME')) {
|
||||
$tmparray = $object->getTotalWeightVolume();
|
||||
$totalWeight = isset($tmparray['weight']) ? $tmparray['weight'] : 0;
|
||||
$totalVolume = isset($tmparray['volume']) ? $tmparray['volume'] : 0;
|
||||
if ($totalWeight) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
||||
print '<td class="valuefield">';
|
||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'), 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
if ($totalVolume) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
||||
print '<td class="valuefield">';
|
||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'), 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
|
|
@ -2918,6 +2920,8 @@ if ($action == 'create') {
|
|||
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php';
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
|
||||
print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
|
||||
|
|
@ -2927,7 +2931,7 @@ if ($action == 'create') {
|
|||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
|
||||
print '<td>' . $langs->trans('AmountVAT') . '</td>';
|
||||
print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
|
||||
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
|
||||
print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>';
|
||||
|
|
@ -2936,7 +2940,7 @@ if ($action == 'create') {
|
|||
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
|
||||
print '<tr>';
|
||||
print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
|
||||
print '<td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
|
||||
print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . '</td>';
|
||||
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
|
||||
$object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT');
|
||||
|
|
@ -3223,7 +3227,7 @@ if ($action == 'create') {
|
|||
print $formfile->showdocuments('propal', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object);
|
||||
|
||||
// Show links to link elements
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('propal'));
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, array(), array('propal'));
|
||||
|
||||
$compatibleImportElementsList = false;
|
||||
if ($user->hasRight('propal', 'creer') && $object->statut == Propal::STATUS_DRAFT) {
|
||||
|
|
|
|||
|
|
@ -3663,9 +3663,9 @@ class Propal extends CommonObject
|
|||
|
||||
/**
|
||||
* getTooltipContentArray
|
||||
* @param array $params params to construct tooltip data
|
||||
* @param array<string,mixed> $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array
|
||||
* @return array{picto?:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,12 +42,34 @@ class PropaleStats extends Stats
|
|||
*/
|
||||
public $table_element;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $socid;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $userid;
|
||||
|
||||
/**
|
||||
* @var string sql from
|
||||
*/
|
||||
public $from;
|
||||
|
||||
/**
|
||||
* @var string sql fields
|
||||
*/
|
||||
public $field;
|
||||
|
||||
/**
|
||||
* @var string sql where
|
||||
*/
|
||||
public $where;
|
||||
|
||||
/**
|
||||
* @var string sql join
|
||||
*/
|
||||
public $join;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ if (!empty($user->socid)) {
|
|||
$hookmanager->initHooks(array('proposalcontactcard', 'globalcard'));
|
||||
$result = restrictedArea($user, 'propal', $object->id);
|
||||
|
||||
restrictedArea($user, 'propal', $object->id);
|
||||
|
||||
$usercancreate = $user->hasRight("propal", "creer");
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ $socid = '';
|
|||
if (!empty($user->socid)) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$hookmanager->initHooks(array('propaldocument', 'globalcard'));
|
||||
restrictedArea($user, 'propal', $object->id);
|
||||
|
||||
$usercancreate = $user->hasRight("propal", "creer");
|
||||
|
|
|
|||
|
|
@ -157,6 +157,8 @@ $error = 0;
|
|||
|
||||
$date_delivery = dol_mktime(GETPOSTINT('liv_hour'), GETPOSTINT('liv_min'), 0, GETPOSTINT('liv_month'), GETPOSTINT('liv_day'), GETPOSTINT('liv_year'));
|
||||
|
||||
$selectedLines = array();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -389,6 +391,7 @@ if (empty($reshook)) {
|
|||
|
||||
$classname = ucfirst($subelement);
|
||||
$srcobject = new $classname($db);
|
||||
'@phan-var-force Commande|Propal|Contrat $srcobject';
|
||||
|
||||
dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines");
|
||||
$result = $srcobject->fetch($object->origin_id);
|
||||
|
|
@ -836,6 +839,54 @@ if (empty($reshook)) {
|
|||
$price_min_ttc = $prod->price_min_ttc;
|
||||
$price_base_type = $prod->price_base_type;
|
||||
|
||||
if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) {
|
||||
// If price per customer
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
|
||||
|
||||
$prodcustprice = new ProductCustomerPrice($db);
|
||||
|
||||
$filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id);
|
||||
|
||||
// If a price per customer exist
|
||||
$pricebycustomerexist = false;
|
||||
$result = $prodcustprice->fetchAll('', '', 0, 0, $filter);
|
||||
if ($result >= 0) {
|
||||
if (count($prodcustprice->lines) > 0) {
|
||||
$pricebycustomerexist = true;
|
||||
$pu_ht = price($prodcustprice->lines[0]->price);
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_min = price($prodcustprice->lines[0]->price_min);
|
||||
$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
||||
if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
|
||||
$tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
}
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) {
|
||||
$tva_npr = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors');
|
||||
}
|
||||
|
||||
if ( !$pricebycustomerexist && !empty($object->thirdparty->price_level)) { //// If price per segment
|
||||
$pu_ht = $prod->multiprices[$object->thirdparty->price_level];
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->thirdparty->price_level];
|
||||
$price_min_ttc = $prod->multiprices_min_ttc[$object->thirdparty->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level];
|
||||
if (getDolGlobalString('PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL')) { // using this option is a bug. kept for backward compatibility
|
||||
if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) {
|
||||
$tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level];
|
||||
}
|
||||
if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) {
|
||||
$tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// If price per segment
|
||||
if (getDolGlobalString('PRODUIT_MULTIPRICES') && !empty($object->thirdparty->price_level)) {
|
||||
$pu_ht = $prod->multiprices[$object->thirdparty->price_level];
|
||||
|
|
@ -971,7 +1022,7 @@ if (empty($reshook)) {
|
|||
if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
|
||||
$desc = $product_desc;
|
||||
} else {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
// Add custom code and origin country into description
|
||||
|
|
@ -1238,11 +1289,11 @@ if (empty($reshook)) {
|
|||
$type = $product->type;
|
||||
|
||||
$price_min = $product->price_min;
|
||||
if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) && !empty($object->thirdparty->price_level)) {
|
||||
if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($object->thirdparty->price_level)) {
|
||||
$price_min = $product->multiprices_min[$object->thirdparty->price_level];
|
||||
}
|
||||
$price_min_ttc = $product->price_min_ttc;
|
||||
if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) && !empty($object->thirdparty->price_level)) {
|
||||
if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($object->thirdparty->price_level)) {
|
||||
$price_min_ttc = $product->multiprices_min_ttc[$object->thirdparty->price_level];
|
||||
}
|
||||
|
||||
|
|
@ -1765,6 +1816,7 @@ if ($action == 'create' && $usercancreate) {
|
|||
|
||||
$classname = ucfirst($subelement);
|
||||
$objectsrc = new $classname($db);
|
||||
'@phan-var-force Commande|Propal|Contrat $objectsrc'; // Can possibly be other class but CommonObject is too general
|
||||
$objectsrc->fetch($originid);
|
||||
if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
|
||||
$objectsrc->fetch_lines();
|
||||
|
|
@ -1902,7 +1954,7 @@ if ($action == 'create' && $usercancreate) {
|
|||
} else {
|
||||
print '<td class="valuefieldcreate">';
|
||||
$filter = '((s.client:IN:1,2,3) AND (s.status:=:1))';
|
||||
print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx');
|
||||
print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth175 maxwidth500 widthcentpercentminusxx');
|
||||
// reload page to retrieve customer information
|
||||
if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) {
|
||||
print '<script>
|
||||
|
|
@ -2075,7 +2127,7 @@ if ($action == 'create' && $usercancreate) {
|
|||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
|
||||
print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', 0, 'maxwidth200 widthcentpercentminusx');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
@ -2468,7 +2520,7 @@ if ($action == 'create' && $usercancreate) {
|
|||
$filter = '(s.client:IN:1,2,3)';
|
||||
// Create an array for form
|
||||
$formquestion = array(
|
||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, null, 0, 'maxwidth300'))
|
||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, array(), 0, 'maxwidth300'))
|
||||
);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
}
|
||||
|
|
@ -2564,8 +2616,8 @@ if ($action == 'create' && $usercancreate) {
|
|||
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Discounts').'</td><td class="valuefield">';
|
||||
|
||||
$absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount);
|
||||
$absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote);
|
||||
$absolute_discount = $soc->getAvailableDiscounts(null, $filterabsolutediscount);
|
||||
$absolute_creditnote = $soc->getAvailableDiscounts(null, $filtercreditnote);
|
||||
$absolute_discount = price2num($absolute_discount, 'MT');
|
||||
$absolute_creditnote = price2num($absolute_creditnote, 'MT');
|
||||
|
||||
|
|
@ -2703,45 +2755,6 @@ if ($action == 'create' && $usercancreate) {
|
|||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Multicurrency
|
||||
if (isModEnabled("multicurrency")) {
|
||||
// Multicurrency code
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
$editenable = $usercancreate && $object->statut == Commande::STATUS_DRAFT;
|
||||
print $form->editfieldkey("Currency", 'multicurrencycode', '', $object, $editenable);
|
||||
print '</td><td class="valuefield">';
|
||||
if ($action == 'editmulticurrencycode') {
|
||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_code, 'multicurrency_code');
|
||||
} else {
|
||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_code, 'none');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Multicurrency rate
|
||||
if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) {
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
$editenable = $usercancreate && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $object->statut == $object::STATUS_DRAFT;
|
||||
print $form->editfieldkey("CurrencyRate", 'multicurrencyrate', '', $object, $editenable);
|
||||
print '</td><td class="valuefield">';
|
||||
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
|
||||
if ($action == 'actualizemulticurrencyrate') {
|
||||
list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code);
|
||||
}
|
||||
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||
} else {
|
||||
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
|
||||
if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
|
||||
print '<div class="inline-block"> ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Order mode (how we receive order). Not yet implemented
|
||||
/*
|
||||
print '<tr><td>';
|
||||
|
|
@ -2762,13 +2775,13 @@ if ($action == 'create' && $usercancreate) {
|
|||
if ($totalWeight) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
||||
print '<td class="valuefield">';
|
||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
|
||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no');
|
||||
print '</td></tr>';
|
||||
}
|
||||
if ($totalVolume) {
|
||||
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
||||
print '<td class="valuefield">';
|
||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
|
||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
@ -2815,6 +2828,8 @@ if ($action == 'create' && $usercancreate) {
|
|||
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php';
|
||||
|
||||
$alert = '';
|
||||
if (getDolGlobalString('ORDER_MANAGE_MIN_AMOUNT') && $object->total_ht < $object->thirdparty->order_min_amount) {
|
||||
$alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount));
|
||||
|
|
@ -3146,7 +3161,7 @@ if ($action == 'create' && $usercancreate) {
|
|||
|
||||
|
||||
// Show links to link elements
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('order'));
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, array(), array('order'));
|
||||
|
||||
$compatibleImportElementsList = false;
|
||||
if ($usercancreate
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ class Commande extends CommonOrder
|
|||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
// Validate
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= " SET ref = '".$this->db->escape($num)."',";
|
||||
$sql .= " fk_statut = ".self::STATUS_VALIDATED.",";
|
||||
$sql .= " date_valid='".$this->db->idate($now)."',";
|
||||
|
|
@ -663,7 +663,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= " SET fk_statut = ".self::STATUS_DRAFT.",";
|
||||
$sql .= " fk_user_modif = ".((int) $user->id);
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
|
@ -741,7 +741,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= ' SET fk_statut='.self::STATUS_VALIDATED.', facture=0,';
|
||||
$sql .= " fk_user_modif = ".((int) $user->id);
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
|
@ -852,7 +852,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= " SET fk_statut = ".self::STATUS_CANCELED.",";
|
||||
$sql .= " fk_user_modif = ".((int) $user->id);
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
|
@ -970,7 +970,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande (";
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element." (";
|
||||
$sql .= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note_private, note_public, ref_ext, ref_client";
|
||||
$sql .= ", model_pdf, fk_cond_reglement, deposit_percent, fk_mode_reglement, fk_account, fk_availability, fk_input_reason, date_livraison, fk_delivery_address";
|
||||
$sql .= ", fk_shipping_method";
|
||||
|
|
@ -1108,7 +1108,7 @@ class Commande extends CommonOrder
|
|||
$initialref = $this->ref;
|
||||
}
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX."commande SET ref='".$this->db->escape($initialref)."' WHERE rowid=".((int) $this->id);
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET ref='".$this->db->escape($initialref)."' WHERE rowid=".((int) $this->id);
|
||||
if ($this->db->query($sql)) {
|
||||
$this->ref = $initialref;
|
||||
|
||||
|
|
@ -1169,7 +1169,7 @@ class Commande extends CommonOrder
|
|||
$this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object
|
||||
}
|
||||
} else {
|
||||
dol_print_error($this->db, $resqlcontact);
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1890,7 +1890,7 @@ class Commande extends CommonOrder
|
|||
$sql .= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
|
||||
$sql .= ', ca.code as availability_code, ca.label as availability_label';
|
||||
$sql .= ', dr.code as demand_reason_code';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as c';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON c.fk_cond_reglement = cr.rowid';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON c.fk_mode_reglement = p.id';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON c.fk_availability = ca.rowid';
|
||||
|
|
@ -2105,7 +2105,7 @@ class Commande extends CommonOrder
|
|||
$sql .= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,';
|
||||
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tosell as product_tosell, p.tobuy as product_tobuy, p.tobatch as product_tobatch, p.barcode as product_barcode,';
|
||||
$sql .= ' p.weight, p.weight_units, p.volume, p.volume_units';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as l';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (p.rowid = l.fk_product)';
|
||||
$sql .= ' WHERE l.fk_commande = '.((int) $this->id);
|
||||
if ($only_product) {
|
||||
|
|
@ -2260,7 +2260,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$sql = 'SELECT COUNT(DISTINCT ed.fk_expedition) as nb';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'expeditiondet as ed,';
|
||||
$sql .= ' '.MAIN_DB_PREFIX.'commandedet as cd';
|
||||
$sql .= ' '.MAIN_DB_PREFIX.$this->table_element_line.' as cd';
|
||||
$sql .= ' WHERE';
|
||||
$sql .= ' ed.fk_elementdet = cd.rowid';
|
||||
$sql .= ' AND cd.fk_commande = '.((int) $this->id);
|
||||
|
|
@ -2300,7 +2300,7 @@ class Commande extends CommonOrder
|
|||
if ($filtre_statut >= 0) {
|
||||
$sql .= ' '.MAIN_DB_PREFIX.'expedition as e,';
|
||||
}
|
||||
$sql .= ' '.MAIN_DB_PREFIX.'commandedet as cd';
|
||||
$sql .= ' '.MAIN_DB_PREFIX.$this->table_element_line.' as cd';
|
||||
$sql .= ' WHERE';
|
||||
if ($filtre_statut >= 0) {
|
||||
$sql .= ' ed.fk_expedition = e.rowid AND';
|
||||
|
|
@ -2489,7 +2489,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$remise = price2num($remise, 2);
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= ' SET remise_percent = '.((float) $remise);
|
||||
$sql .= ' WHERE rowid = '.((int) $this->id).' AND fk_statut = '.((int) self::STATUS_DRAFT);
|
||||
|
||||
|
|
@ -2556,7 +2556,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= ' SET remise_absolue = '.((float) $remise);
|
||||
$sql .= ' WHERE rowid = '.((int) $this->id).' AND fk_statut = '.self::STATUS_DRAFT;
|
||||
|
||||
|
|
@ -2616,7 +2616,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= " SET date_commande = ".($date ? "'".$this->db->idate($date)."'" : 'null');
|
||||
$sql .= " WHERE rowid = ".((int) $this->id)." AND fk_statut = ".((int) self::STATUS_DRAFT);
|
||||
|
||||
|
|
@ -2688,7 +2688,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= " SET date_livraison = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null');
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
|
|
@ -2755,7 +2755,7 @@ class Commande extends CommonOrder
|
|||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= ", sc.fk_soc, sc.fk_user";
|
||||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX.$this->table_element." as c";
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
|
|
@ -2820,7 +2820,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= ' SET fk_availability = '.((int) $availability_id);
|
||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||
|
||||
|
|
@ -2884,7 +2884,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= ' SET fk_input_reason = '.((int) $demand_reason_id);
|
||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||
|
||||
|
|
@ -2946,7 +2946,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET';
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET';
|
||||
$sql .= ' ref_client = '.(empty($ref_client) ? 'NULL' : "'".$this->db->escape($ref_client)."'");
|
||||
$sql .= ' WHERE rowid = '.((int) $this->id);
|
||||
|
||||
|
|
@ -3004,7 +3004,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 1';
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET facture = 1';
|
||||
$sql .= " WHERE rowid = ".((int) $this->id).' AND fk_statut > '.self::STATUS_DRAFT;
|
||||
|
||||
dol_syslog(get_class($this)."::classifyBilled", LOG_DEBUG);
|
||||
|
|
@ -3054,7 +3054,7 @@ class Commande extends CommonOrder
|
|||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 0';
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET facture = 0';
|
||||
$sql .= " WHERE rowid = ".((int) $this->id).' AND fk_statut > '.self::STATUS_DRAFT;
|
||||
|
||||
dol_syslog(get_class($this)."::classifyUnBilled", LOG_DEBUG);
|
||||
|
|
@ -3370,7 +3370,7 @@ class Commande extends CommonOrder
|
|||
// Put here code to add control on parameters values
|
||||
|
||||
// Update request
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET";
|
||||
|
||||
$sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").",";
|
||||
$sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").",";
|
||||
|
|
@ -3587,7 +3587,7 @@ class Commande extends CommonOrder
|
|||
$clause = " WHERE";
|
||||
|
||||
$sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut, c.total_ht";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as c";
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON c.fk_soc = sc.fk_soc";
|
||||
$sql .= " WHERE sc.fk_user = ".((int) $user->id);
|
||||
|
|
@ -3763,9 +3763,9 @@ class Commande extends CommonOrder
|
|||
|
||||
/**
|
||||
* getTooltipContentArray
|
||||
*
|
||||
* @param array $params params to construct tooltip data
|
||||
* @return array
|
||||
* @param array<string,mixed> $params params to construct tooltip data
|
||||
* @since v18
|
||||
* @return array{picto?:string,ref?:string,refsupplier?:string,label?:string,date?:string,date_echeance?:string,amountht?:string,total_ht?:string,totaltva?:string,amountlt1?:string,amountlt2?:string,amountrevenustamp?:string,totalttc?:string}|array{optimize:string}
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
|
|
@ -3957,7 +3957,7 @@ class Commande extends CommonOrder
|
|||
$sql .= ' date_valid as datev,';
|
||||
$sql .= ' date_cloture as datecloture,';
|
||||
$sql .= ' fk_user_author, fk_user_valid, fk_user_cloture';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as c';
|
||||
$sql .= ' WHERE c.rowid = '.((int) $id);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
|
|
@ -4094,7 +4094,7 @@ class Commande extends CommonOrder
|
|||
$clause = "WHERE";
|
||||
|
||||
$sql = "SELECT count(co.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande as co";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as co";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON co.fk_soc = s.rowid";
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.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
|
||||
|
|
@ -40,15 +41,49 @@ class CommandeStats extends Stats
|
|||
*/
|
||||
public $table_element;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $socid;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $userid;
|
||||
|
||||
/**
|
||||
* @var string To store the FROM part of the main table of the SQL request
|
||||
*/
|
||||
public $from;
|
||||
|
||||
/**
|
||||
* @var string To store the FROM part of the lines table of the SQL request
|
||||
*/
|
||||
public $from_line;
|
||||
|
||||
/**
|
||||
* @var string To store the field
|
||||
*/
|
||||
public $field;
|
||||
|
||||
/**
|
||||
* @var string To store the field of the line table of the SQL request
|
||||
*/
|
||||
public $field_line;
|
||||
|
||||
/**
|
||||
* @var string To store the FROM part of the categorie table of the SQL request
|
||||
*/
|
||||
public $categ_link;
|
||||
|
||||
/**
|
||||
* @var string To store the WHERE part of the main table of the SQL request
|
||||
*/
|
||||
public $where = '';
|
||||
|
||||
/**
|
||||
* @var string To store the join
|
||||
*/
|
||||
public $join;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2012 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||
* Copyright (C) 2012 David Rodriguez Martinez <davidrm146@gmail.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
|
|
@ -165,7 +166,7 @@ if ($resql) {
|
|||
print '</td>';
|
||||
|
||||
print '<td colspan="2" class="liste_titre right">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', 0, 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
|
|
|||
|
|
@ -2790,10 +2790,10 @@ while ($i < $imaxinloop) {
|
|||
}
|
||||
}
|
||||
if ($notshippable == 0) {
|
||||
$text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'green paddingleft');
|
||||
$text_icon = img_picto('', 'dolly', '', 0, 0, 0, '', 'green paddingleft');
|
||||
$text_info = $text_icon.' '.$langs->trans('Shippable').'<br>'.$text_info;
|
||||
} else {
|
||||
$text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'error paddingleft');
|
||||
$text_icon = img_picto('', 'dolly', '', 0, 0, 0, '', 'error paddingleft');
|
||||
$text_info = $text_icon.' '.$langs->trans('NonShippable').'<br>'.$text_info;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -962,7 +962,7 @@ if ($resql) {
|
|||
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
|
|
@ -2168,10 +2168,10 @@ if ($resql) {
|
|||
}
|
||||
}
|
||||
if ($notshippable == 0) {
|
||||
$text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'green paddingleft');
|
||||
$text_icon = img_picto('', 'dolly', '', 0, 0, 0, '', 'green paddingleft');
|
||||
$text_info = $text_icon.' '.$langs->trans('Shippable').'<br>'.$text_info;
|
||||
} else {
|
||||
$text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'error paddingleft');
|
||||
$text_icon = img_picto('', 'dolly', '', 0, 0, 0, '', 'error paddingleft');
|
||||
$text_info = $text_icon.' '.$langs->trans('NonShippable').'<br>'.$text_info;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2022-2024 Alexandre Spangaro <alexandre@inovea-conseil.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
|
||||
|
|
@ -867,7 +868,7 @@ if (!empty($date_start) && !empty($date_stop)) {
|
|||
$filename = ($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']);
|
||||
print '<a href='.DOL_URL_ROOT.'/'.$filecursor['link'].' target="_blank" rel="noopener noreferrer" title="'.dol_escape_htmltag($filename).'">';
|
||||
if (empty($tmppreview)) {
|
||||
print img_picto('', 'generic', '', false, 0, 0, '', 'pictonopreview pictofixedwidth paddingright');
|
||||
print img_picto('', 'generic', '', 0, 0, 0, '', 'pictonopreview pictofixedwidth paddingright');
|
||||
}
|
||||
print $filename;
|
||||
print '</a><br>';
|
||||
|
|
|
|||
|
|
@ -1966,9 +1966,9 @@ if ($resql) {
|
|||
print '<td class="right"><span class="amount">'.price($totalarray['totalcred']).'</span></td>';
|
||||
} elseif ($i == $posconciliatecol) {
|
||||
print '<td class="center">';
|
||||
if ($user->hasRight('banque', 'consolidate') && $action == 'reconcile') {
|
||||
/*if ($user->hasRight('banque', 'consolidate') && $action == 'reconcile') {
|
||||
print '<input class="button smallpaddingimp" name="confirm_reconcile" type="submit" value="'.$langs->trans("Conciliate").'">';
|
||||
}
|
||||
}*/
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td></td>';
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user