Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b418e8e1e5
143 changed files with 1708 additions and 705 deletions
|
|
@ -112,8 +112,8 @@ before_install:
|
|||
#ps fauxww | grep postgres
|
||||
ls /etc/postgresql/13/main/
|
||||
|
||||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/13/main/pg_hba.conf
|
||||
sudo cat /etc/postgresql/13/main/pg_hba.conf
|
||||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf
|
||||
sudo cat /etc/postgresql/14/main/pg_hba.conf
|
||||
|
||||
sudo service postgresql restart
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/accountancy/admin/journals_list.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/accountancy/admin/productaccount.php
|
||||
|
||||
-
|
||||
message: '#^Right side of && is always true\.$#'
|
||||
identifier: booleanAnd.rightAlwaysTrue
|
||||
|
|
@ -138,18 +144,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/accountancy/class/accountancyexport.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$invoice might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 4
|
||||
path: ../../../htdocs/accountancy/class/accountancyexport.class.php
|
||||
|
||||
-
|
||||
message: '#^Call to function array_key_exists\(\) with ''error'' and array\{ref\: mixed, label\: mixed, acquisition_value_ht\: mixed, depreciation\: non\-empty\-array\<array\{date\: mixed, ref\: mixed, lines\: non\-empty\-array\}\>, disposal\?\: array\{date\: mixed, amount\: mixed, subject_to_vat\: bool\}\} will always evaluate to false\.$#'
|
||||
identifier: function.impossibleType
|
||||
count: 1
|
||||
path: ../../../htdocs/accountancy/class/accountingjournal.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$callback of function array_filter expects \(callable\(string\)\: bool\)\|null, ''strlen'' given\.$#'
|
||||
identifier: argument.type
|
||||
|
|
@ -168,18 +162,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/accountancy/class/lettering.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$save_element_by_link might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/accountancy/class/lettering.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$save_link_by_element might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/accountancy/class/lettering.class.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$callback of function array_filter expects \(callable\(string\)\: bool\)\|null, ''strlen'' given\.$#'
|
||||
identifier: argument.type
|
||||
|
|
@ -192,12 +174,6 @@ parameters:
|
|||
count: 2
|
||||
path: ../../../htdocs/accountancy/closure/index.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$current_fiscal_period in isset\(\) always exists and is not nullable\.$#'
|
||||
identifier: isset.variable
|
||||
count: 4
|
||||
path: ../../../htdocs/accountancy/closure/index.php
|
||||
|
||||
-
|
||||
message: '#^Right side of && is always true\.$#'
|
||||
identifier: booleanAnd.rightAlwaysTrue
|
||||
|
|
@ -318,12 +294,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/accountancy/journal/expensereportsjournal.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$def_tva might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/accountancy/journal/expensereportsjournal.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
|
|
@ -774,12 +744,24 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/admin/modules.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''common''\|''commonkanban'' and ''expdev'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/admin/modules.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/admin/modules.php
|
||||
|
||||
-
|
||||
message: '#^Result of && is always false\.$#'
|
||||
identifier: booleanAnd.alwaysFalse
|
||||
count: 2
|
||||
path: ../../../htdocs/admin/modules.php
|
||||
|
||||
-
|
||||
message: '#^Right side of && is always true\.$#'
|
||||
identifier: booleanAnd.rightAlwaysTrue
|
||||
|
|
@ -870,6 +852,18 @@ parameters:
|
|||
count: 5
|
||||
path: ../../../htdocs/admin/sms.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''add'' and ''add'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/admin/spip.php
|
||||
|
||||
-
|
||||
message: '#^Result of \|\| is always true\.$#'
|
||||
identifier: booleanOr.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/admin/spip.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
|
|
@ -906,18 +900,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/admin/system/dolibarr.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/admin/system/filecheck.php
|
||||
|
||||
-
|
||||
message: '#^Left side of && is always true\.$#'
|
||||
identifier: booleanAnd.leftAlwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/admin/system/filecheck.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \!\= between '''' and ''kanban'' will always evaluate to true\.$#'
|
||||
identifier: notEqual.alwaysTrue
|
||||
|
|
@ -1662,6 +1644,18 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/categories/card.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''hierarchy'' and ''common'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/categories/categorie_list.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''hierarchy'' and ''hierarchy'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/categories/categorie_list.php
|
||||
|
||||
-
|
||||
message: '#^Method Categorie\:\:get_full_arbo\(\) should return \-1\|array\<int, array\{rowid\: int, id\: int, fk_parent\: int, label\: string, description\: string, color\: string, position\: string, visible\: int, \.\.\.\}\> but returns array\<array\{rowid\: mixed, id\: mixed, fk_parent\: mixed, label\: mixed, description\: mixed, color\: mixed, position\: mixed, visible\: mixed, \.\.\.\}\>\.$#'
|
||||
identifier: return.type
|
||||
|
|
@ -1842,6 +1836,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/comm/action/index.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#16 \$usergroupid of function print_actions_filter expects array\<int\>\|int, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 3
|
||||
path: ../../../htdocs/comm/action/index.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
|
|
@ -1902,12 +1902,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/comm/action/pertype.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/comm/action/pertype.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \!\= between ''show_pertype'' and ''show_day'' will always evaluate to true\.$#'
|
||||
identifier: notEqual.alwaysTrue
|
||||
|
|
@ -2220,6 +2214,30 @@ parameters:
|
|||
count: 4
|
||||
path: ../../../htdocs/comm/mailing/targetemailing.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''setemail_errorsto''\|''setevenunsubscribe''\|''setreplyto'' and ''setemail_replyto'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/comm/mailing/targetemailing.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''setevenunsubscribe''\|''setreplyto'' and ''setfrom'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/comm/mailing/targetemailing.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''setevenunsubscribe''\|''setreplyto'' and ''settitle'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/comm/mailing/targetemailing.php
|
||||
|
||||
-
|
||||
message: '#^Result of && is always false\.$#'
|
||||
identifier: booleanAnd.alwaysFalse
|
||||
count: 2
|
||||
path: ../../../htdocs/comm/mailing/targetemailing.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$filter might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -2307,7 +2325,7 @@ parameters:
|
|||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
count: 3
|
||||
path: ../../../htdocs/commande/list.php
|
||||
|
||||
-
|
||||
|
|
@ -2370,6 +2388,18 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/accounting-files.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#1 \$array of function array_sum expects array, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 2
|
||||
path: ../../../htdocs/compta/ajaxpayment.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$array of function array_key_exists expects array, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/ajaxpayment.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$ve might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -2406,6 +2436,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/bank/bankentries_list.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
count: 2
|
||||
path: ../../../htdocs/compta/bank/bankentries_list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
|
|
@ -2694,6 +2730,48 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''close'' and ''close'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 4
|
||||
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''close'' and ''start'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 4
|
||||
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''create''\|''start'' and ''close'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 2
|
||||
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''start'' and ''close'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 2
|
||||
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''start'' and ''start'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
|
||||
|
||||
-
|
||||
message: '#^Result of && is always false\.$#'
|
||||
identifier: booleanAnd.alwaysFalse
|
||||
count: 6
|
||||
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
|
||||
|
||||
-
|
||||
message: '#^Result of \|\| is always true\.$#'
|
||||
identifier: booleanOr.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -3084,6 +3162,12 @@ parameters:
|
|||
count: 2
|
||||
path: ../../../htdocs/compta/facture/list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 2
|
||||
path: ../../../htdocs/compta/facture/list.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
|
|
@ -3468,12 +3552,24 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/prelevement/create.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \!\= between ''''\|''0''\|''direct\-debit'' and ''bank\-transfer'' will always evaluate to true\.$#'
|
||||
identifier: notEqual.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/prelevement/create.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$massaction might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/prelevement/demandes.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''bank\-transfer'' and ''bank\-transfer'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/prelevement/list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
|
|
@ -3492,6 +3588,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/recap-compta.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''RECETTES\-DEPENSES'' and ''CREANCES\-DETTES'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/resultat/clientfourn.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$description might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -3510,12 +3612,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/resultat/index.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$sql might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 5
|
||||
path: ../../../htdocs/compta/resultat/index.php
|
||||
|
||||
-
|
||||
message: '#^Call to function is_array\(\) with non\-empty\-array\<array\{NP\: mixed, N\?\: \(float\|int\), M\?\: non\-empty\-array\<0\|1\|2\|3\|4\|5\|6\|7\|8\|9\|10\|11, mixed\>\}\> will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
|
|
@ -3798,12 +3894,24 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/stats/index.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''BOOKKEEPINGCOLLECTED''\|''RECETTES\-DEPENSES'' and ''RECETTES\-DEPENSES'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/stats/supplier_turnover.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/stats/supplier_turnover.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/stats/supplier_turnover.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$description might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -4101,7 +4209,7 @@ parameters:
|
|||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
count: 6
|
||||
path: ../../../htdocs/contact/list.php
|
||||
|
||||
-
|
||||
|
|
@ -9198,12 +9306,6 @@ parameters:
|
|||
count: 3
|
||||
path: ../../../htdocs/exports/export.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$heightforframes might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/externalsite/frames.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
|
|
@ -9924,6 +10026,12 @@ parameters:
|
|||
count: 3
|
||||
path: ../../../htdocs/holiday/define_holiday.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#1 \$array of function array_keys expects array, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../../htdocs/holiday/define_holiday.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -10248,6 +10356,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/hrm/compare.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''edit'' and ''edit'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/hrm/establishment/card.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$k might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -10968,6 +11082,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/modulebuilder/index.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''objects'' and ''specifications'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/modulebuilder/index.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
|
|
@ -11574,6 +11694,18 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/opensurvey/results.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#5 \$day of function dol_mktime expects int, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 2
|
||||
path: ../../../htdocs/opensurvey/wizard/choix_date.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#5 \$day of function mktime expects int\|null, string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 2
|
||||
path: ../../../htdocs/opensurvey/wizard/choix_date.php
|
||||
|
||||
-
|
||||
message: '#^Left side of && is always false\.$#'
|
||||
identifier: booleanAnd.leftAlwaysFalse
|
||||
|
|
@ -12162,6 +12294,12 @@ parameters:
|
|||
count: 2
|
||||
path: ../../../htdocs/product/list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../../htdocs/product/list.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''add_customer_price'' and ''add_customer_price'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
|
|
@ -12828,6 +12966,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/projet/agenda.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''gettasks'' and ''gettasks'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/projet/ajax/projects.php
|
||||
|
||||
-
|
||||
message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
|
|
@ -13167,7 +13311,7 @@ parameters:
|
|||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
count: 2
|
||||
path: ../../../htdocs/projet/list.php
|
||||
|
||||
-
|
||||
|
|
@ -13296,12 +13440,6 @@ parameters:
|
|||
count: 5
|
||||
path: ../../../htdocs/projet/tasks/list.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''0''\|array\{\} and '''' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/projet/tasks/list.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between 0 and 0 will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
|
|
@ -13662,6 +13800,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/public/onlinesign/newonlinesign.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''expedition'' and ''expedition'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/public/onlinesign/newonlinesign.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always false\.$#'
|
||||
identifier: booleanNot.alwaysFalse
|
||||
|
|
@ -14340,12 +14484,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/reception/class/reception.class.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/reception/class/receptionlinebatch.class.php
|
||||
|
||||
-
|
||||
message: '#^Property ReceptionLineBatch\:\:\$batch \(string\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
|
|
@ -15168,6 +15306,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/societe/consumption.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 5
|
||||
path: ../../../htdocs/societe/list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
|
|
@ -15595,7 +15739,7 @@ parameters:
|
|||
path: ../../../htdocs/takepos/printbox.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \!\= between mixed and '''' will always evaluate to true\.$#'
|
||||
message: '#^Loose comparison using \!\= between non\-empty\-string and '''' will always evaluate to true\.$#'
|
||||
identifier: notEqual.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/takepos/receipt.php
|
||||
|
|
@ -16404,6 +16548,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/webhook/target_list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$mode in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../../htdocs/webhook/target_list.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''auto'' and ''auto'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
|
|
@ -16674,12 +16824,42 @@ parameters:
|
|||
count: 2
|
||||
path: ../../../htdocs/website/index.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \!\= between ''editcss'' and ''createcontainer'' will always evaluate to true\.$#'
|
||||
identifier: notEqual.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/website/index.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''createcontainer'' and ''createcontainer'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/website/index.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''createsite'' and ''createcontainer'' will always evaluate to false\.$#'
|
||||
identifier: equal.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/website/index.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison using \=\= between ''createsite'' and ''createsite'' will always evaluate to true\.$#'
|
||||
identifier: equal.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/website/index.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always false\.$#'
|
||||
identifier: booleanNot.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/website/index.php
|
||||
|
||||
-
|
||||
message: '#^Result of \|\| is always true\.$#'
|
||||
identifier: booleanOr.alwaysTrue
|
||||
count: 2
|
||||
path: ../../../htdocs/website/index.php
|
||||
|
||||
-
|
||||
message: '#^Right side of && is always true\.$#'
|
||||
identifier: booleanAnd.rightAlwaysTrue
|
||||
|
|
|
|||
|
|
@ -221,13 +221,13 @@ foreach (array('proj', 'dep') as $source) {
|
|||
$arrayofmetrics[$source]['Bytes'] = $reg[1];
|
||||
}
|
||||
|
||||
if (preg_match('/^(.*)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)$/', $line, $reg)) {
|
||||
$arrayoflineofcode[$source][$reg[1]]['Files'] = $reg[2];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Lines'] = $reg[3];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Blanks'] = $reg[4];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Comments'] = $reg[5];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Code'] = $reg[6];
|
||||
$arrayoflineofcode[$source][$reg[1]]['Complexity'] = $reg[7];
|
||||
if (preg_match('/^(.*)\s+([\d,]+)\s+([\d,]+)\s+([\d,]+)\s+([\d,]+)\s+([\d,]+)\s+([\d,]+)$/', $line, $reg)) {
|
||||
$arrayoflineofcode[$source][$reg[1]]['Files'] = str_replace(array(',', ' '), array('', ''), $reg[2]);
|
||||
$arrayoflineofcode[$source][$reg[1]]['Lines'] = str_replace(array(',', ' '), array('', ''), $reg[3]);
|
||||
$arrayoflineofcode[$source][$reg[1]]['Blanks'] = str_replace(array(',', ' '), array('', ''), $reg[4]);
|
||||
$arrayoflineofcode[$source][$reg[1]]['Comments'] = str_replace(array(',', ' '), array('', ''), $reg[5]);
|
||||
$arrayoflineofcode[$source][$reg[1]]['Code'] = str_replace(array(',', ' '), array('', ''), $reg[6]);
|
||||
$arrayoflineofcode[$source][$reg[1]]['Complexity'] = str_replace(array(',', ' '), array('', ''), $reg[7]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +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-2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -69,7 +69,6 @@ $formSetup = new FormSetup($db);
|
|||
// Main options
|
||||
$formSetup->newItem('BANK_DISABLE_DIRECT_INPUT')->setAsYesNo();
|
||||
|
||||
|
||||
$formSetup->newItem('ACCOUNTANCY_COMBO_FOR_AUX')->setAsYesNo();
|
||||
|
||||
$item = $formSetup->newItem('ACCOUNTING_MANAGE_ZERO')->setAsYesNo();
|
||||
|
|
@ -177,20 +176,27 @@ if ($action == 'updatemode') {
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'update2') {
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
foreach ($list as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if ($error) {
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'update_binding') {
|
||||
$error = 0;
|
||||
|
||||
// option in section binding
|
||||
foreach ($list_binding as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
|
|
@ -203,16 +209,39 @@ if ($action == 'update2') {
|
|||
}
|
||||
}
|
||||
|
||||
// options in section other
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'update_advanced') {
|
||||
$error = 0;
|
||||
|
||||
if (GETPOSTISSET('ACCOUNTING_LETTERING_NBLETTERS')) {
|
||||
if (!dolibarr_set_const($db, 'ACCOUNTING_LETTERING_NBLETTERS', GETPOST('ACCOUNTING_LETTERING_NBLETTERS'), 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'update_export') {
|
||||
$error = 0;
|
||||
|
||||
// Export options
|
||||
$modelcsv = GETPOSTINT('ACCOUNTING_EXPORT_MODELCSV');
|
||||
|
||||
// reload
|
||||
$configuration = $accountancyexport->getTypeConfig();
|
||||
$listparam = $configuration['param'];
|
||||
|
||||
if (!empty($modelcsv)) {
|
||||
if (!dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
|
|
@ -243,12 +272,6 @@ if ($action == 'update2') {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
// reload
|
||||
$configuration = $accountancyexport->getTypeConfig();
|
||||
$listparam = $configuration['param'];
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
|
|
@ -483,20 +506,19 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1) {
|
|||
print '</form>';
|
||||
|
||||
|
||||
print '<br><br><br>';
|
||||
print '<br><br>';
|
||||
}
|
||||
|
||||
|
||||
// Show form for main parameters
|
||||
// Show form main options
|
||||
print $formSetup->generateOutput(true);
|
||||
|
||||
|
||||
print '<br><br><br>';
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update2">';
|
||||
print '<input type="hidden" name="action" value="update_binding">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
|
||||
// Binding params
|
||||
|
|
@ -631,12 +653,11 @@ print '</tr>';
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button reposition" value="'.dol_escape_htmltag($langs->trans('Save')).'" name="button"></div>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button button-edit reposition" name="button" value="'.dol_escape_htmltag($langs->trans('Save')).'"></div>';
|
||||
print '</form>';
|
||||
|
||||
// Show numbering options
|
||||
print '<br><br><br>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
// Accountancy Numbering model
|
||||
$dirmodels = array_merge(array('/'), $conf->modules_parts['models']);
|
||||
|
|
@ -751,13 +772,12 @@ print '</div>';
|
|||
print '</form>';
|
||||
|
||||
// Show advanced options
|
||||
print '<br><br><br>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
// Advanced params
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update2">';
|
||||
print '<input type="hidden" name="action" value="update_advanced">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
|
|
@ -847,12 +867,17 @@ print '</div>';
|
|||
|
||||
|
||||
print '<div class="center"><input type="submit" class="button button-edit reposition" name="button" value="'.$langs->trans('Save').'"></div>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
print '<br><br><br>';
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
// Export options
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update_export">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
print 'jQuery(document).ready(function () {'."\n";
|
||||
|
|
@ -898,8 +923,6 @@ print ' });'."\n";
|
|||
print '})'."\n";
|
||||
print '</script>'."\n";
|
||||
|
||||
// Main Options
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans('ExportOptions').'</td>';
|
||||
|
|
@ -961,7 +984,6 @@ if ($num2) {
|
|||
|
||||
print '<div class="center"><input type="submit" class="button reposition" value="'.dol_escape_htmltag($langs->trans('Save')).'" name="button"></div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
|
|
|
|||
|
|
@ -451,44 +451,14 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'clonebookkeepingwriting' && $permissiontoadd) {
|
||||
if ($action == 'clonebookkeepingwriting' && $confirm == "yes" && $permissiontoadd) {
|
||||
// Reread the values sent by the validated form
|
||||
$piece_num = GETPOST('piece_num', 'alpha');
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$journal_code = GETPOST('code_journal', 'alpha');
|
||||
|
||||
$form = new Form($db);
|
||||
$input1 = $form->selectDate('', 'clonedate', 0, 0, 0, "create_mvt", 1, 1);
|
||||
$input2 = $formaccounting->select_journal($journal_code, 'code_journal', 0, 0, 1, 1).'</td>';
|
||||
$inputHidden = '<input type="hidden" name="piece_num_hidden" id="piece_num_hidden" value="'.$piece_num.'">';
|
||||
// Reconstruct the selected date
|
||||
$clonedate = dol_mktime(0, 0, 0, GETPOSTINT('clonedatemonth'), GETPOSTINT('clonedateday'), GETPOSTINT('clonedateyear'));
|
||||
|
||||
$formquestion = array(
|
||||
array(
|
||||
'type' => 'date',
|
||||
'name' => 'clonedate',
|
||||
'label' => '<span class="fieldrequired">' . $langs->trans("Docdate") . '</span>',
|
||||
'value' => $input1
|
||||
)
|
||||
);
|
||||
|
||||
if (getDolGlobalString('ACCOUNTING_CLONING_ENABLE_INPUT_JOURNAL')) {
|
||||
$formquestion[] = array(
|
||||
'type' => 'text',
|
||||
'name' => 'code_journal',
|
||||
'label' => '<span class="fieldrequired">' . $langs->trans("Codejournal") . '</span>',
|
||||
'value' => $input2
|
||||
);
|
||||
}
|
||||
|
||||
print $form->formconfirm(
|
||||
$_SERVER["PHP_SELF"],
|
||||
$langs->trans("ConfirmMassCloneBookkeepingWriting"),
|
||||
$langs->trans("ConfirmMassCloneBookkeepingWritingQuestion", count($toselect)),
|
||||
"clonebookkeepingwriting",
|
||||
$formquestion,
|
||||
'', 0, 300, 1000, 1
|
||||
);
|
||||
}
|
||||
|
||||
if ($action == 'preclonebookkeepingwriting' && $confirm == "yes" && $permissiontoadd) {
|
||||
$result = $object->newClone($piece_num, $journal_code, $clonedate);
|
||||
|
||||
if ($result == -1) {
|
||||
|
|
@ -497,7 +467,7 @@ if (empty($reshook)) {
|
|||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . "?piece_num=" . $object->getNextNumMvt() - 1);
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . "?piece_num=" . ($object->getNextNumMvt() - 1));
|
||||
exit();
|
||||
} else {
|
||||
$db->rollback();
|
||||
|
|
@ -635,6 +605,7 @@ if ($action == 'create') {
|
|||
}*/
|
||||
|
||||
$head = accounting_transaction_prepare_head($object, $mode, $type, $backtopage);
|
||||
|
||||
print dol_get_fiche_head($head, 'transaction', '', -1);
|
||||
|
||||
//$object->label = $object->doc_ref;
|
||||
|
|
@ -651,6 +622,46 @@ if ($action == 'create') {
|
|||
|
||||
dol_banner_tab($object, 'ref', $backlink, 1, 'piece_num', 'piece_num', $morehtmlref);
|
||||
|
||||
|
||||
if ($action == 'clonebookkeepingwriting' && $confirm != 'yes' && $permissiontoadd) {
|
||||
$piece_num = GETPOST('piece_num', 'alpha');
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$form = new Form($db);
|
||||
$input1 = $form->selectDate('', 'clonedate', 0, 0, 0, "", 1, 1);
|
||||
$input2 = $formaccounting->select_journal($journal_code, 'code_journal', 0, 0, 1, 1);
|
||||
|
||||
$formquestion = array(
|
||||
array(
|
||||
'type' => 'other',
|
||||
'name' => 'clonedate',
|
||||
'label' => '<span class="fieldrequired">' . $langs->trans("Docdate") . '</span>',
|
||||
'value' => $input1
|
||||
)
|
||||
);
|
||||
|
||||
$formquestion[] = array('type' => 'hidden', 'name' => 'piece_num', 'value' => $piece_num);
|
||||
|
||||
if (getDolGlobalString('ACCOUNTING_CLONING_ENABLE_INPUT_JOURNAL')) {
|
||||
$formquestion[] = array(
|
||||
'type' => 'text',
|
||||
'name' => 'code_journal',
|
||||
'label' => '<span class="fieldrequired">' . $langs->trans("Codejournal") . '</span>',
|
||||
'value' => $input2
|
||||
);
|
||||
}
|
||||
|
||||
print $form->formconfirm(
|
||||
$_SERVER["PHP_SELF"],
|
||||
$langs->trans("ConfirmMassCloneBookkeepingWriting"),
|
||||
$langs->trans("ConfirmMassCloneBookkeepingWritingQuestion", 1),
|
||||
"clonebookkeepingwriting",
|
||||
$formquestion,
|
||||
'', 0, 300, 1000, 0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="fichehalfleft">';
|
||||
|
|
|
|||
|
|
@ -1371,9 +1371,9 @@ class AccountancyExport
|
|||
$end_line = "\n";
|
||||
|
||||
// parcours du tableau pour recuperation des numero de compte des tiers pour pouvoir les fournir dans la bonne ligne pour istea
|
||||
$tiers=[];
|
||||
$tiers = [];
|
||||
foreach ($objectLines as $line) {
|
||||
if ( $line->subledger_account && substr($line->subledger_account, 0, 1) == '4' ) {
|
||||
if ($line->subledger_account && substr($line->subledger_account, 0, 1) == '4') {
|
||||
$tiers[$line->piece_num] = $line->subledger_label;
|
||||
}
|
||||
}
|
||||
|
|
@ -1394,11 +1394,11 @@ class AccountancyExport
|
|||
$tab[] = $line->piece_num; // colonne 1 : numero de piece ISTEA
|
||||
$tab[] = $date_document; // colonne 2 : date ISTEA
|
||||
$tab[] = $line->doc_ref; // colonne 3 : reference piece ISTEA
|
||||
$tab[] = array_key_exists($line->piece_num, $tiers)?$tiers[$line->piece_num]:''; // colonne 4 : nom tiers ISTEA
|
||||
$tab[] = length_accountg(($line->subledger_account && ( substr($line->subledger_account, 0, 2) == substr($line->numero_compte, 0, 2) ) )?$line->subledger_account:$line->numero_compte); // colonne 5 : numero de compte ISTEA
|
||||
$tab[] = length_accountg($line->subledger_account?$line->subledger_account:$line->numero_compte); // colonne 6 : numero de compte
|
||||
$tab[] = length_accountg($line->subledger_account?$line->numero_compte:''); // G // colonne 7 : numero de compte principal (divers paiement ou 40100000 ou 41100000)
|
||||
$tab[] = ($line->doc_type == 'bank')?$label_operation:($line->subledger_account?$line->subledger_label:$line->label_compte); // colonne 8 : label de l'operation ISTEA
|
||||
$tab[] = array_key_exists($line->piece_num, $tiers) ? $tiers[$line->piece_num] : ''; // colonne 4 : nom tiers ISTEA
|
||||
$tab[] = length_accountg(($line->subledger_account && (substr($line->subledger_account, 0, 2) == substr($line->numero_compte, 0, 2))) ? $line->subledger_account : $line->numero_compte); // colonne 5 : numero de compte ISTEA
|
||||
$tab[] = length_accountg($line->subledger_account ? $line->subledger_account : $line->numero_compte); // colonne 6 : numero de compte
|
||||
$tab[] = length_accountg($line->subledger_account ? $line->numero_compte : ''); // G // colonne 7 : numero de compte principal (divers paiement ou 40100000 ou 41100000)
|
||||
$tab[] = ($line->doc_type == 'bank') ? $label_operation : ($line->subledger_account ? $line->subledger_label : $line->label_compte); // colonne 8 : label de l'operation ISTEA
|
||||
$tab[] = $label_operation; // colonne 9 : label de l'operation (semble non prise en compte par ISTEA)
|
||||
$tab[] = price2num($line->debit); // colonne 10 : debit ISTEA
|
||||
$tab[] = price2num($line->credit); // colonne 11 : credit ISTEA
|
||||
|
|
@ -1474,6 +1474,7 @@ class AccountancyExport
|
|||
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||
|
||||
$refInvoice = '';
|
||||
$invoice = null;
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
// Customer invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
|
@ -1576,10 +1577,9 @@ class AccountancyExport
|
|||
if (!getDolGlobalInt('ACCOUNTING_EXPORT_REMOVE_EXPENSEREPORT_SOURCE_FILE')) {
|
||||
$objectDirPath = !empty($conf->expensereport->multidir_output[$conf->entity]) ? $conf->expensereport->multidir_output[$conf->entity] : $conf->expensereport->dir_output;
|
||||
}
|
||||
} elseif ($line->doc_type == 'supplier_invoice') {
|
||||
} elseif ($line->doc_type == 'supplier_invoice' && $invoice instanceof FactureFournisseur) {
|
||||
if (!getDolGlobalInt('ACCOUNTING_EXPORT_REMOVE_SUPPLIERINVOICE_SOURCE_FILE')) {
|
||||
'@phan-var-force FactureFournisseur $invoice';
|
||||
/** @var FactureFournisseur $invoice */
|
||||
$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
|
||||
$objectDirPath .= '/' . rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
|
||||
}
|
||||
|
|
@ -1694,6 +1694,7 @@ class AccountancyExport
|
|||
$date_limit_payment = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||
|
||||
$refInvoice = '';
|
||||
$invoice = null;
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
// Customer invoice
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
|
@ -1796,10 +1797,9 @@ class AccountancyExport
|
|||
if (!getDolGlobalInt('ACCOUNTING_EXPORT_REMOVE_EXPENSEREPORT_SOURCE_FILE')) {
|
||||
$objectDirPath = !empty($conf->expensereport->multidir_output[$conf->entity]) ? $conf->expensereport->multidir_output[$conf->entity] : $conf->expensereport->dir_output;
|
||||
}
|
||||
} elseif ($line->doc_type == 'supplier_invoice') {
|
||||
} elseif ($line->doc_type == 'supplier_invoice' && $invoice instanceof FactureFournisseur) {
|
||||
if (!getDolGlobalInt('ACCOUNTING_EXPORT_REMOVE_SUPPLIERINVOICE_SOURCE_FILE')) {
|
||||
'@phan-var-force FactureFournisseur $invoice';
|
||||
/** @var FactureFournisseur $invoice */
|
||||
$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
|
||||
$objectDirPath .= '/' . rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -378,15 +378,21 @@ class AccountingJournal extends CommonObject
|
|||
case 1: // Various Journal
|
||||
if (isModEnabled('asset') && !getDolGlobalInt('ACCOUNTING_DISABLE_TRANSFER_ON_ASSETS')) {
|
||||
$tmp = $this->getAssetData($user, $type, $date_start, $date_end, $in_bookkeeping);
|
||||
if (is_array($tmp)) $data = array_merge($data, $tmp);
|
||||
if (is_array($tmp)) {
|
||||
$data = array_merge($data, $tmp);
|
||||
}
|
||||
}
|
||||
if (isModEnabled('invoice') && !getDolGlobalInt('ACCOUNTING_DISABLE_TRANSFER_ON_DISCOUNTS')) {
|
||||
$tmp = $this->getDiscountCustomer($user, $type, $date_start, $date_end, $in_bookkeeping);
|
||||
if (is_array($tmp)) $data = array_merge($data, $tmp);
|
||||
if (is_array($tmp)) {
|
||||
$data = array_merge($data, $tmp);
|
||||
}
|
||||
}
|
||||
if (isModEnabled('supplier_invoice') && !getDolGlobalInt('ACCOUNTING_DISABLE_TRANSFER_ON_DISCOUNTS')) {
|
||||
$tmp = $this->getDiscountSupplier($user, $type, $date_start, $date_end, $in_bookkeeping);
|
||||
if (is_array($tmp)) $data = array_merge($data, $tmp);
|
||||
if (is_array($tmp)) {
|
||||
$data = array_merge($data, $tmp);
|
||||
}
|
||||
}
|
||||
break;
|
||||
// case 2: // Sells Journal
|
||||
|
|
@ -520,7 +526,7 @@ class AccountingJournal extends CommonObject
|
|||
|
||||
$element = array(
|
||||
'ref' => dol_trunc($element_static->ref, 16, 'right', 'UTF-8', 1),
|
||||
'error' => array_key_exists('error', $pre_data_info) ? $pre_data_info['error'] : '',
|
||||
'error' => array_key_exists('error', $pre_data_info) ? $pre_data_info['error'] : '', // @phpstan-ignore-line
|
||||
'blocks' => array(),
|
||||
);
|
||||
|
||||
|
|
@ -745,8 +751,12 @@ class AccountingJournal extends CommonObject
|
|||
$langs->loadLangs(array('bills'));
|
||||
|
||||
// Clean parameters
|
||||
if (empty($type)) $type = 'view';
|
||||
if (empty($in_bookkeeping)) $in_bookkeeping = 'notyet';
|
||||
if (empty($type)) {
|
||||
$type = 'view';
|
||||
}
|
||||
if (empty($in_bookkeeping)) {
|
||||
$in_bookkeeping = 'notyet';
|
||||
}
|
||||
|
||||
// Build SQL - Customer invoices closed by discount
|
||||
$sql = "SELECT f.rowid, f.ref, f.datef, f.fk_soc, f.total_ttc";
|
||||
|
|
@ -794,7 +804,9 @@ class AccountingJournal extends CommonObject
|
|||
$acc_vat_coll_def = getDolGlobalString('ACCOUNTING_VAT_BUY_ACCOUNT'); // Normal to apply vat default account for buy with customer's discount
|
||||
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
if ($invoice_static->fetch((int) $obj->rowid) <= 0) continue;
|
||||
if ($invoice_static->fetch((int) $obj->rowid) <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$customer_static->fetch($invoice_static->socid);
|
||||
$account_customer_general = !empty($customer_static->accountancy_code_customer_general) ? $customer_static->accountancy_code_customer_general : getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER');
|
||||
|
|
@ -808,18 +820,25 @@ class AccountingJournal extends CommonObject
|
|||
$useddep = (float) price2num($invoice_static->getSumDepositsUsed(), 'MT');
|
||||
$ttc_inv = (float) price2num($invoice_static->total_ttc, 'MT');
|
||||
$escompte_ttc = (float) price2num(max(0, $ttc_inv - $paid - $usedcn - $useddep), 'MT');
|
||||
if ($escompte_ttc <= 0) continue;
|
||||
if ($escompte_ttc <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$bookkeeping_static = new BookKeeping($this->db);
|
||||
$label_discount = $bookkeeping_static->accountingLabelForOperation($customer_static->getNomUrl(1, 'customer'), $invoice_static->ref, $langs->trans('DiscountGranted'));
|
||||
|
||||
// Distribution including VAT by rate
|
||||
$ttcByRate = array(); $totalTTC = 0.0;
|
||||
$ttcByRate = array();
|
||||
$totalTTC = 0.0;
|
||||
foreach ((array) $invoice_static->lines as $li) {
|
||||
$ttc = (float) $li->total_ttc;
|
||||
if (!$ttc) continue;
|
||||
if (!$ttc) {
|
||||
continue;
|
||||
}
|
||||
$key = number_format((float) $li->tva_tx, 3, '.', '');
|
||||
if (!isset($ttcByRate[$key])) $ttcByRate[$key] = 0.0;
|
||||
if (!isset($ttcByRate[$key])) {
|
||||
$ttcByRate[$key] = 0.0;
|
||||
}
|
||||
$ttcByRate[$key] += $ttc;
|
||||
$totalTTC += $ttc;
|
||||
}
|
||||
|
|
@ -831,7 +850,7 @@ class AccountingJournal extends CommonObject
|
|||
$element = array(
|
||||
'ref' => dol_trunc($invoice_static->ref, 16, 'right', 'UTF-8', 1),
|
||||
'error' => '',
|
||||
'blocks'=> array(),
|
||||
'blocks' => array(),
|
||||
);
|
||||
|
||||
$docdate = $this->db->jdate($obj->datef);
|
||||
|
|
@ -853,10 +872,11 @@ class AccountingJournal extends CommonObject
|
|||
}
|
||||
|
||||
if ($rate > 0) {
|
||||
$ht_part = (float) price2num($ttc_part / (1 + $rate/100), 'MT');
|
||||
$ht_part = (float) price2num($ttc_part / (1 + $rate / 100), 'MT');
|
||||
$tva_part = (float) price2num($ttc_part - $ht_part, 'MT');
|
||||
} else {
|
||||
$ht_part = $ttc_part; $tva_part = 0.0;
|
||||
$ht_part = $ttc_part;
|
||||
$tva_part = 0.0;
|
||||
}
|
||||
|
||||
// VAT deductible account (by rate if available)
|
||||
|
|
@ -1035,8 +1055,12 @@ class AccountingJournal extends CommonObject
|
|||
$langs->loadLangs(array('suppliers'));
|
||||
|
||||
// Clean parameters
|
||||
if (empty($type)) $type = 'view';
|
||||
if (empty($in_bookkeeping)) $in_bookkeeping = 'notyet';
|
||||
if (empty($type)) {
|
||||
$type = 'view';
|
||||
}
|
||||
if (empty($in_bookkeeping)) {
|
||||
$in_bookkeeping = 'notyet';
|
||||
}
|
||||
|
||||
// SQL - Supplier invoices closed by discount
|
||||
$sql = "SELECT ff.rowid, ff.ref, ff.datef, ff.fk_soc, ff.total_ttc";
|
||||
|
|
@ -1084,7 +1108,9 @@ class AccountingJournal extends CommonObject
|
|||
$acc_vat_ded_def = getDolGlobalString('ACCOUNTING_VAT_SOLD_ACCOUNT'); // Normal to apply vat default account for sold with supplier's discount
|
||||
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
if ($invoicesupplier_static->fetch((int) $obj->rowid) <= 0) continue;
|
||||
if ($invoicesupplier_static->fetch((int) $obj->rowid) <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$supplier_static->fetch($invoicesupplier_static->socid);
|
||||
$account_supplier_general = !empty($supplier_static->accountancy_code_supplier_general) ? $supplier_static->accountancy_code_supplier_general : getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER');
|
||||
|
|
@ -1098,33 +1124,45 @@ class AccountingJournal extends CommonObject
|
|||
$useddep = (float) price2num($invoicesupplier_static->getSumDepositsUsed(), 'MT');
|
||||
$ttc_inv = (float) price2num($invoicesupplier_static->total_ttc, 'MT');
|
||||
$escompte_ttc = (float) price2num(max(0, $ttc_inv - $paid - $usedcn - $useddep), 'MT');
|
||||
if ($escompte_ttc <= 0) continue;
|
||||
if ($escompte_ttc <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$bookkeeping_static = new BookKeeping($this->db);
|
||||
$label_discount = $bookkeeping_static->accountingLabelForOperation($supplier_static->getNomUrl(1, 'supplier'), $invoicesupplier_static->ref, $langs->trans('DiscountReceived'));
|
||||
|
||||
// Distribution including VAT by rate
|
||||
$ttcByRate = array(); $totalTTC = 0.0;
|
||||
$ttcByRate = array();
|
||||
$totalTTC = 0.0;
|
||||
foreach ((array) $invoicesupplier_static->lines as $li) {
|
||||
$ttc = (float) $li->total_ttc;
|
||||
if (!$ttc) continue;
|
||||
if (!$ttc) {
|
||||
continue;
|
||||
}
|
||||
$key = number_format((float) $li->tva_tx, 3, '.', '');
|
||||
if (!isset($ttcByRate[$key])) $ttcByRate[$key] = 0.0;
|
||||
if (!isset($ttcByRate[$key])) {
|
||||
$ttcByRate[$key] = 0.0;
|
||||
}
|
||||
$ttcByRate[$key] += $ttc;
|
||||
$totalTTC += $ttc;
|
||||
}
|
||||
if ($totalTTC <= 0) { $ttcByRate = array("0.000" => $escompte_ttc); $totalTTC = $escompte_ttc; }
|
||||
if ($totalTTC <= 0) {
|
||||
$ttcByRate = array("0.000" => $escompte_ttc);
|
||||
$totalTTC = $escompte_ttc;
|
||||
}
|
||||
|
||||
$element = array(
|
||||
'ref' => dol_trunc($invoicesupplier_static->ref, 16, 'right', 'UTF-8', 1),
|
||||
'error' => '',
|
||||
'blocks'=> array(),
|
||||
'blocks' => array(),
|
||||
);
|
||||
|
||||
$docdate = $this->db->jdate($obj->datef);
|
||||
$docdate_fmt = dol_print_date($docdate, 'day');
|
||||
|
||||
$sumTTC = 0.0; $i = 0; $n = count($ttcByRate);
|
||||
$sumTTC = 0.0;
|
||||
$i = 0;
|
||||
$n = count($ttcByRate);
|
||||
foreach ($ttcByRate as $rateStr => $ttcRateOnInvoice) {
|
||||
$i++;
|
||||
$rate = (float) $rateStr;
|
||||
|
|
@ -1138,9 +1176,12 @@ class AccountingJournal extends CommonObject
|
|||
}
|
||||
|
||||
if ($rate > 0) {
|
||||
$ht_part = (float) price2num($ttc_part / (1 + $rate/100), 'MT');
|
||||
$ht_part = (float) price2num($ttc_part / (1 + $rate / 100), 'MT');
|
||||
$tva_part = (float) price2num($ttc_part - $ht_part, 'MT');
|
||||
} else { $ht_part = $ttc_part; $tva_part = 0.0; }
|
||||
} else {
|
||||
$ht_part = $ttc_part;
|
||||
$tva_part = 0.0;
|
||||
}
|
||||
|
||||
// VAT collected account (by rate if available)
|
||||
// TODO write function to search the same vat code like the supplier invoice
|
||||
|
|
@ -1273,9 +1314,11 @@ class AccountingJournal extends CommonObject
|
|||
}
|
||||
} else {
|
||||
// si TVA = 0, pousser les 2 lignes view/bookkeeping déjà constituées
|
||||
if ($type == 'view') $element['blocks'][] = $lines_view;
|
||||
elseif ($type == 'bookkeeping') $element['blocks'][] = $lines_book;
|
||||
else { // csv
|
||||
if ($type == 'view') {
|
||||
$element['blocks'][] = $lines_view;
|
||||
} elseif ($type == 'bookkeeping') {
|
||||
$element['blocks'][] = $lines_book;
|
||||
} else { // csv
|
||||
$element['blocks'][] = array($docdate, $invoicesupplier_static->ref, length_accountg($account_supplier_general), $label_discount.' - '.$langs->transnoentitiesnoconv('Supplier'), price($ttc_part), '');
|
||||
$element['blocks'][] = array($docdate, $invoicesupplier_static->ref, length_accountg($acc_disc_recv), $label_discount.' ('.$rateStr.'%)', '', price($ht_part));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -929,6 +929,10 @@ class Lettering extends BookKeeping
|
|||
// Save list when is the first step of the recursive recursive function
|
||||
$save_link_by_element = $link_by_element;
|
||||
$save_element_by_link = $element_by_link;
|
||||
} else {
|
||||
// To satisfy static analysis (phpstan)
|
||||
$save_link_by_element = null;
|
||||
$save_element_by_link = null;
|
||||
}
|
||||
|
||||
do {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ if (empty($reshook)) {
|
|||
if ($result > 0) {
|
||||
setEventMessages($langs->trans("AllMovementsWereRecordedAsValidated"), null, 'mesgs');
|
||||
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
|
||||
exit;
|
||||
} else {
|
||||
setEventMessages($langs->trans("NotAllMovementsCouldBeRecordedAsValidated"), null, 'errors');
|
||||
|
|
@ -176,7 +176,7 @@ if (empty($reshook)) {
|
|||
} else {
|
||||
setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs');
|
||||
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ if (empty($reshook)) {
|
|||
} else {
|
||||
setEventMessages($langs->trans("AccountancyClosureInsertAccountingReversalSuccessfully"), null, 'mesgs');
|
||||
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . '?fiscal_period_id=' . $current_fiscal_period['id']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
@ -345,7 +345,7 @@ $fiscal_period_nav_text = $langs->trans("FiscalPeriod");
|
|||
$fiscal_period_nav_text .= ' <a href="' . (isset($last_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $last_fiscal_period['id'] : '#" class="disabled') . '">' . img_previous() . '</a>';
|
||||
$fiscal_period_nav_text .= ' <a href="' . (isset($next_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $next_fiscal_period['id'] : '#" class="disabled') . '">' . img_next() . '</a>';
|
||||
if (!empty($current_fiscal_period)) {
|
||||
$fiscal_period_nav_text .= $current_fiscal_period['label'].' (' . (isset($current_fiscal_period) ? dol_print_date($current_fiscal_period['date_start'], 'day') . ' - ' . dol_print_date($current_fiscal_period['date_end'], 'day') . ')' : '');
|
||||
$fiscal_period_nav_text .= $current_fiscal_period['label'].' (' . dol_print_date($current_fiscal_period['date_start'], 'day') . ' - ' . dol_print_date($current_fiscal_period['date_end'], 'day') . ')';
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans("Closure") . " - " . $fiscal_period_nav_text, '', 'title_accountancy');
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ if ($action == 'exportcsv' && !$error) { // ISO and not UTF8 !
|
|||
print '"'.$date.'"'.$sep;
|
||||
print '"'.$val["ref"].'"'.$sep;
|
||||
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||
print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $langs->trans("VAT").implode($def_tva[$key][$k]).' %')).'"'.$sep;
|
||||
print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $langs->trans("VAT").(isset($def_tva[$key]) ? implode($def_tva[$key][$k]) : '').' %')).'"'.$sep;
|
||||
print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep;
|
||||
print '"'.($mt < 0 ? price(-$mt) : '').'"';
|
||||
print "\n";
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
* Copyright (C) 2017-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2025 Hannes Hieronimi <hannes@innwerk.org>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -1206,15 +1207,15 @@ if ($action == 'writebookkeeping' /* && $user->hasRight('accounting', 'bind', 'w
|
|||
$accountingAccountInfos = $tabaccountingaccount[$accountancy_code];
|
||||
if ($idx < $nb_operation) {
|
||||
$amount = price2num($payment_total_ht * $operation['total_ht'] / $objectInfos['total_ht'], 'MT');
|
||||
$total_operation += $amount;
|
||||
$total_operation += (float) $amount;
|
||||
} else {
|
||||
$amount = $payment_total_ht - $total_operation;
|
||||
}
|
||||
$total_check -= $amount;
|
||||
$total_check -= (float) $amount;
|
||||
|
||||
$bookkeepingToCreate = new BookKeeping($db);
|
||||
//$result = $bookkeepingToCreate->createFromValues($payment["date"], $objectInfos['ref'], 'bank', $payment_id, $objectInfos['id'], $accountancy_code, $accountingAccountInfos['label'], (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), -$amount, $journal, $journal_label, '');
|
||||
$result = $bookkeepingToCreate->createFromValues($payment["date"], $objectInfos['ref'], 'bank', $payment_id, 0, $accountancy_code, $accountingAccountInfos['label'], (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), -$amount, $journal, $journal_label, '');
|
||||
$result = $bookkeepingToCreate->createFromValues($payment["date"], $objectInfos['ref'], 'bank', $payment_id, 0, $accountancy_code, $accountingAccountInfos['label'], (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), - (float) $amount, $journal, $journal_label, '');
|
||||
if ($result < 0) {
|
||||
$errorforline++;
|
||||
|
||||
|
|
@ -1482,11 +1483,11 @@ if (empty($action) || $action == 'view') {
|
|||
if (!empty($operation['total_ht'])) {
|
||||
if ($idx < $nb_operation) {
|
||||
$value = price2num($payment_total_ht * $operation['total_ht'] / $objectInfos['total_ht'], 'MT');
|
||||
$total_operation += $value;
|
||||
$total_operation += (float) $value;
|
||||
} else {
|
||||
$value = $payment_total_ht - $total_operation;
|
||||
}
|
||||
FormAccounting::printJournalLine($langs, $date, $objectInfos['url'], $accountancy_code, (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), $payment['type_payment'], -$value);
|
||||
FormAccounting::printJournalLine($langs, $date, $objectInfos['url'], $accountancy_code, (!empty($operation['label']) ? $operation['label'] : $accountingAccountInfos['label']), $payment['type_payment'], - (float) $value);
|
||||
}
|
||||
$idx++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class Subscription extends CommonObject
|
|||
public $fk_bank;
|
||||
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -105,6 +105,11 @@ class ExternalModules
|
|||
*/
|
||||
public $githubFileError;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $error;
|
||||
|
||||
/**
|
||||
* @var int // number of online providers
|
||||
*/
|
||||
|
|
@ -130,11 +135,6 @@ class ExternalModules
|
|||
*/
|
||||
public $numberOfProducts;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $error;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -60,8 +60,14 @@ if (!$user->admin) {
|
|||
}
|
||||
|
||||
$moduledir = 'workstation';
|
||||
$myTmpObjects = array();
|
||||
$myTmpObjects['workstation'] = array('label' => 'Workstation', 'includerefgeneration' => 1, 'includedocgeneration' => 0, 'class' => 'Workstation');
|
||||
$myTmpObjects = [
|
||||
'workstation' => [
|
||||
'label' => 'Workstation',
|
||||
'includerefgeneration' => 1,
|
||||
'includedocgeneration' => 0,
|
||||
'class' => 'Workstation',
|
||||
],
|
||||
];
|
||||
|
||||
$tmpobjectkey = GETPOST('object', 'aZ09');
|
||||
if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) {
|
||||
|
|
@ -97,9 +103,7 @@ if ($action == 'updateMask') {
|
|||
} elseif ($action == 'specimen') {
|
||||
$modele = GETPOST('module', 'alpha');
|
||||
|
||||
$nameofclass = ucfirst($tmpobjectkey);
|
||||
$tmpobject = new $nameofclass($db);
|
||||
'@phan-var-force Workstation $tmpobject';
|
||||
$tmpobject = new Workstation($db);
|
||||
$tmpobject->initAsSpecimen();
|
||||
|
||||
// Search template files
|
||||
|
|
@ -359,6 +363,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force ModelePDFWorkstation $module';
|
||||
/** @var ModelePDFWorkstation $module */
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
@ -441,9 +446,6 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
}
|
||||
}
|
||||
|
||||
/*if (empty($setupnotempty)) {
|
||||
print '<br>'.$langs->trans("NothingToSetup");
|
||||
}*/
|
||||
|
||||
// Page end
|
||||
print dol_get_fiche_end();
|
||||
|
|
|
|||
|
|
@ -255,6 +255,8 @@ if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $
|
|||
$modulenameforenabled = 'supplier_proposal';
|
||||
} elseif ($module == 'ficheinter') {
|
||||
$modulenameforenabled = 'intervention';
|
||||
} elseif ($module == 'product' && !isModEnabled('product') && isModEnabled('service')) {
|
||||
$modulenameforenabled = 'service';
|
||||
}
|
||||
|
||||
dol_syslog("Found module file ".$file." - module=".$module." - modulenameforenabled=".$modulenameforenabled." - moduledirforclass=".$moduledirforclass);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class Asset extends CommonObject
|
|||
*/
|
||||
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Jose <jose.martinez@pichinov.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
|
|
@ -67,7 +67,7 @@ class AssetDepreciationOptions extends CommonObject
|
|||
*/
|
||||
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2021 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -89,7 +89,7 @@ class AssetModel extends CommonObject
|
|||
*/
|
||||
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -61,7 +61,13 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-system_filecheck');
|
|||
|
||||
print load_fiche_titre($langs->trans("FileCheckDolibarr"), '', 'title_setup');
|
||||
|
||||
print '<div class="opacitymedium justify">'.$langs->trans("FileCheckDesc").'</div><br><br>';
|
||||
print '<div class="opacitymedium hideonsmartphone justify">'.$langs->trans("FileCheckDesc");
|
||||
if (isModEnabled('blockedlog')) {
|
||||
$s = $langs->trans("DataIntegrityDesc", '{s}');
|
||||
$s = str_replace('{s}', DOL_URL_ROOT.'/blockedlog/admin/blockedlog_list.php', $s);
|
||||
print '<br>'.$s;
|
||||
}
|
||||
print'</div><br><br>';
|
||||
|
||||
// Version
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class BOM extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2023 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
* Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -80,7 +80,7 @@ class BOMLine extends CommonObjectLine
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'LineID', 'enabled' => 1, 'visible' => -1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Availabilities extends CommonObject
|
|||
public $TRIGGER_PREFIX = 'AVAILABILITIES';
|
||||
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored. This is also the key used for extrafields management.
|
||||
* @var string Name of table without prefix where object is stored. This is also the key used for extrafields management.
|
||||
*/
|
||||
public $table_element = 'bookcal_availabilities';
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ class Availabilities extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 2, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class Calendar extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'right', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -177,8 +177,8 @@ class Categorie extends CommonObject
|
|||
'invoice' => 'Facture',
|
||||
'supplier_order' => 'CommandeFournisseur',
|
||||
'supplier_invoice' => 'FactureFournisseur',
|
||||
'supplier_proposal' => 'SupplierProposal',
|
||||
'propal' => 'Propal',
|
||||
'supplier_proposal' => 'SupplierProposal',
|
||||
'propal' => 'Propal'
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
@ -205,8 +205,8 @@ class Categorie extends CommonObject
|
|||
'invoice' => 'Invoices',
|
||||
'supplier_order' => 'SuppliersOrders',
|
||||
'supplier_invoice' => 'SuppliersInvoices',
|
||||
'propal' => 'Proposals',
|
||||
'supplier_proposal' => 'SupplierProposals',
|
||||
'propal' => 'Proposals',
|
||||
'supplier_proposal' => 'SupplierProposals'
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -71,7 +71,7 @@ class ActionCommReminder extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'visible' => -1, 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ require_once DOL_DOCUMENT_ROOT.'/subtotals/class/commonsubtotal.class.php';
|
|||
*/
|
||||
class Propal extends CommonObject
|
||||
{
|
||||
use CommonIncoterm, CommonSubtotal;
|
||||
use CommonIncoterm;
|
||||
use CommonSubtotal;
|
||||
|
||||
/**
|
||||
* @var string code
|
||||
|
|
@ -364,7 +365,7 @@ class Propal extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ class Commande extends CommonOrder
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
@ -3806,7 +3806,7 @@ class Commande extends CommonOrder
|
|||
'mode' => $mode,
|
||||
'billed' => $billed,
|
||||
'donotshowbilled' => $donotshowbilled,
|
||||
'paramsBadge' =>& $paramsBadge
|
||||
'paramsBadge' => & $paramsBadge
|
||||
);
|
||||
|
||||
$reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class OrderLine extends CommonOrderLine
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -486,17 +486,14 @@ if ($search_status != '') {
|
|||
$sql .= ' AND c.fk_statut = '.((int) $search_status); // draft, validated, in process or canceled
|
||||
}
|
||||
}
|
||||
if ($search_status == -2) { // To process
|
||||
if ($search_status == -2) { // "validated + in progress"
|
||||
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
|
||||
$sql .= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
|
||||
$sql .= " AND c.fk_statut IN (1,2)";
|
||||
}
|
||||
if ($search_status == -3) { // To bill
|
||||
if ($search_status == -3) { // "validated + in progress + shipped"
|
||||
//$sql.= ' AND c.fk_statut in (1,2,3)';
|
||||
//$sql.= ' AND c.facture = 0'; // invoice not created
|
||||
$sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed
|
||||
}
|
||||
if ($search_status == -4) { // "validate and in progress"
|
||||
$sql .= ' AND (c.fk_statut IN (1,2))'; // validated, in process
|
||||
$sql .= ' AND c.fk_statut IN (1,2,3)'; // validated, in process or closed
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -729,9 +726,6 @@ if ($resql) {
|
|||
if ($search_status == -3) {
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(!isModEnabled('shipping') ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||
}
|
||||
if ($search_status == -4) {
|
||||
$title .= ' - '.$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort");
|
||||
}
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ class Account extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class PaymentVarious extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
// TODO: fill this array
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ if ($resql) {
|
|||
print '<div class="inline-block amount width100"></div>';
|
||||
print '<div class="inline-block amount width100">'.price($cash).'</div>';
|
||||
}
|
||||
if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && $newcash != $object->cash) {
|
||||
if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && price2num($newcash) != price2num($object->cash)) {
|
||||
print ' <div class="inline-block amountremaintopay fontsizeunset small"><> '.$langs->trans("Declared").': '.price($object->cash).'</div>';
|
||||
}
|
||||
print "<br>";
|
||||
|
|
@ -415,7 +415,7 @@ if ($resql) {
|
|||
print $langs->trans("PaymentTypeCHQ").(!empty($transactionspertype['CHQ']) ? ' ('.$transactionspertype['CHQ'].' '.$langs->trans("Articles").')' : '').' : ';
|
||||
print '<div class="inline-block amount width100"></div>';
|
||||
print '<div class="inline-block amount width100">'.price($cheque).'</div>';
|
||||
if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && $cheque != $object->cheque) {
|
||||
if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && price2num($cheque) != price2num($object->cheque)) {
|
||||
print ' <div class="inline-block amountremaintopay fontsizeunset small"><> '.$langs->trans("Declared").' : '.price($object->cheque).'</div>';
|
||||
}
|
||||
print "<br>";
|
||||
|
|
@ -424,7 +424,7 @@ if ($resql) {
|
|||
print $langs->trans("PaymentTypeCB").(!empty($transactionspertype['CB']) ? ' ('.$transactionspertype['CB'].' '.$langs->trans("Articles").')' : '').' : ';
|
||||
print '<div class="inline-block amount width100"></div>';
|
||||
print '<div class="inline-block amount width100">'.price($bank).'</div>';
|
||||
if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && $bank != $object->card) {
|
||||
if (!$summaryonly && $object->status == $object::STATUS_VALIDATED && price2num($bank) != price2num($object->card)) {
|
||||
print ' <div class="inline-block amountremaintopay fontsizeunset small"><> '.$langs->trans("Declared").': '.price($object->card).'</div>';
|
||||
}
|
||||
print "<br>";
|
||||
|
|
|
|||
|
|
@ -395,6 +395,7 @@ class Invoices extends DolibarrApi
|
|||
*
|
||||
* @throws RestException 400
|
||||
* @throws RestException 401
|
||||
* @throws RestException 403 Access not allowed for login
|
||||
* @throws RestException 404
|
||||
* @throws RestException 405
|
||||
*/
|
||||
|
|
@ -411,6 +412,9 @@ class Invoices extends DolibarrApi
|
|||
if (empty($orderid)) {
|
||||
throw new RestException(400, 'Order ID is mandatory');
|
||||
}
|
||||
if (!DolibarrApi::_checkAccessToResource('commande', $orderid)) {
|
||||
throw new RestException(403, 'Access not allowed on order for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$order = new Commande($this->db);
|
||||
$result = $order->fetch($orderid);
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ class FactureRec extends CommonInvoice
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ class Facture extends CommonInvoice
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 1),
|
||||
|
|
@ -4226,7 +4226,7 @@ class Facture extends CommonInvoice
|
|||
if (empty($fk_prev_id)) {
|
||||
$fk_prev_id = 'null';
|
||||
}
|
||||
if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '' || $situation_percent == null) {
|
||||
if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') {
|
||||
// INVOICE_USE_SITUATION = 2 - Lines situation percent on new lines must be 0 (No cumulative)
|
||||
if ($this->isSituationInvoice() && getDolGlobalInt('INVOICE_USE_SITUATION') == 2) {
|
||||
$situation_percent = 0;
|
||||
|
|
|
|||
|
|
@ -868,6 +868,7 @@ while ($i < $imaxinloop) {
|
|||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
|
||||
// Status
|
||||
if (!empty($arrayfields['p.statut']['checked'])) {
|
||||
print '<td class="right">';
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ class BonPrelevement extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 10, 'notnull' => 1, 'visible' => 0,),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2014-2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright (C) 2014-2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2021-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Yoan Mollard <ymollard@users.noreply.github.com>
|
||||
|
|
@ -424,32 +424,29 @@ if (isModEnabled('invoice') && ($modecompta == 'CREANCES-DETTES' || $modecompta
|
|||
/*
|
||||
* Donations
|
||||
*/
|
||||
|
||||
if (isModEnabled('don')) {
|
||||
echo '<tr class="trforbreak"><td colspan="4">'.$langs->trans("Donations").'</td></tr>';
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') {
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT p.rowid as rowid, p.ref as project_ref, sum(d.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as d";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON d.fk_projet = p.rowid";
|
||||
$sql .= " WHERE d.entity IN (".getEntity('donation').")";
|
||||
$sql .= " AND d.fk_statut in (1,2)";
|
||||
} else {
|
||||
$sql = "SELECT p.rowid as rowid, p.ref as project_ref, sum(d.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as d";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = d.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON d.fk_projet = p.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id";
|
||||
$sql .= " WHERE d.entity IN (".getEntity('donation').")";
|
||||
$sql .= " AND d.fk_statut >= 2";
|
||||
}
|
||||
if (!empty($date_start)) {
|
||||
$sql .= " AND d.datedon >= '".$db->idate($date_start)."'";
|
||||
}
|
||||
if (!empty($date_end)) {
|
||||
$sql .= " AND d.datedon <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT p.rowid as rowid, p.ref as project_ref, sum(d.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as d";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON d.fk_projet = p.rowid";
|
||||
$sql .= " WHERE d.entity IN (".getEntity('donation').")";
|
||||
$sql .= " AND d.fk_statut in (1,2)";
|
||||
} else {
|
||||
$sql = "SELECT p.rowid as rowid, p.ref as project_ref, sum(d.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as d";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = d.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON d.fk_projet = p.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id";
|
||||
$sql .= " WHERE d.entity IN (".getEntity('donation').")";
|
||||
$sql .= " AND d.fk_statut >= 2";
|
||||
}
|
||||
if (!empty($date_start)) {
|
||||
$sql .= " AND d.datedon >= '".$db->idate($date_start)."'";
|
||||
}
|
||||
if (!empty($date_end)) {
|
||||
$sql .= " AND d.datedon <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
$sql .= " GROUP BY p.rowid, p.ref";
|
||||
$newsortfield = $sortfield;
|
||||
|
|
@ -635,57 +632,54 @@ if (isModEnabled('invoice') && ($modecompta == 'CREANCES-DETTES' || $modecompta
|
|||
/*
|
||||
* Salaries
|
||||
*/
|
||||
|
||||
if (isModEnabled('salaries')) {
|
||||
echo '<tr class="trforbreak"><td colspan="4">'.$langs->trans("Salaries").'</td></tr>';
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') {
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$column = 's.dateep'; // We use the date of end of period of salary
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$column = 's.dateep'; // We use the date of end of period of salary
|
||||
|
||||
$sql = "SELECT p.rowid as rowid, p.ref as project_ref, sum(s.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."salary as s";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = s.fk_user";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON s.fk_projet = p.rowid";
|
||||
$sql .= " WHERE s.entity IN (".getEntity('salary').")";
|
||||
if (!empty($date_start)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." >= '".$db->idate($date_start)."'";
|
||||
}
|
||||
if (!empty($date_end)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
} else {
|
||||
$column = 'ps.datep';
|
||||
$sql = "SELECT p.rowid as rowid, p.ref as project_ref, sum(s.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."salary as s";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = s.fk_user";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON s.fk_projet = p.rowid";
|
||||
$sql .= " WHERE s.entity IN (".getEntity('salary').")";
|
||||
if (!empty($date_start)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." >= '".$db->idate($date_start)."'";
|
||||
}
|
||||
if (!empty($date_end)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
} else {
|
||||
$column = 'ps.datep';
|
||||
|
||||
$sql = "SELECT pr.rowid as rowid, pr.ref as project_ref, sum(ps.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as ps";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."salary as s ON s.rowid = ps.fk_salary";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = s.fk_user";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as pr ON s.fk_projet = pr.rowid";
|
||||
$sql .= " WHERE ps.entity IN (".getEntity('payment_salary').")";
|
||||
if (!empty($date_start)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." >= '".$db->idate($date_start)."'";
|
||||
}
|
||||
if (!empty($date_end)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
$sql = "SELECT pr.rowid as rowid, pr.ref as project_ref, sum(ps.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as ps";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."salary as s ON s.rowid = ps.fk_salary";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = s.fk_user";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as pr ON s.fk_projet = pr.rowid";
|
||||
$sql .= " WHERE ps.entity IN (".getEntity('payment_salary').")";
|
||||
if (!empty($date_start)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." >= '".$db->idate($date_start)."'";
|
||||
}
|
||||
|
||||
|
||||
$sql .= " GROUP BY rowid, project_ref";
|
||||
$newsortfield = $sortfield;
|
||||
if ($newsortfield == 's.nom, s.rowid') {
|
||||
$newsortfield = 'project_ref';
|
||||
if (!empty($date_end)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
if ($newsortfield == 'amount_ht') {
|
||||
$newsortfield = 'amount';
|
||||
}
|
||||
if ($newsortfield == 'amount_ttc') {
|
||||
$newsortfield = 'amount';
|
||||
}
|
||||
$sql .= $db->order($newsortfield, $sortorder);
|
||||
}
|
||||
|
||||
|
||||
$sql .= " GROUP BY rowid, project_ref";
|
||||
$newsortfield = $sortfield;
|
||||
if ($newsortfield == 's.nom, s.rowid') {
|
||||
$newsortfield = 'project_ref';
|
||||
}
|
||||
if ($newsortfield == 'amount_ht') {
|
||||
$newsortfield = 'amount';
|
||||
}
|
||||
if ($newsortfield == 'amount_ttc') {
|
||||
$newsortfield = 'amount';
|
||||
}
|
||||
$sql .= $db->order($newsortfield, $sortorder);
|
||||
|
||||
dol_syslog("by project, get salaries");
|
||||
$result = $db->query($sql);
|
||||
$subtotal_ht = 0;
|
||||
|
|
@ -750,44 +744,41 @@ if (isModEnabled('invoice') && ($modecompta == 'CREANCES-DETTES' || $modecompta
|
|||
/*
|
||||
* Expense report
|
||||
*/
|
||||
|
||||
if (isModEnabled('expensereport')) {
|
||||
if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') {
|
||||
$langs->load('trips');
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT ed.rowid as rowid, ed.fk_projet, p.rowid as project_rowid, p.ref as project_ref, sum(ed.total_ht) as amount_ht, sum(ed.total_ttc) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as ed";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."expensereport as e ON ed.fk_expensereport = e.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON ed.fk_projet = p.rowid";
|
||||
$sql .= " WHERE e.entity IN (".getEntity('expensereport').")";
|
||||
$sql .= " AND e.fk_statut >= 5";
|
||||
$langs->load('trips');
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT ed.rowid as rowid, ed.fk_projet, p.rowid as project_rowid, p.ref as project_ref, sum(ed.total_ht) as amount_ht, sum(ed.total_ttc) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as ed";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."expensereport as e ON ed.fk_expensereport = e.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON ed.fk_projet = p.rowid";
|
||||
$sql .= " WHERE e.entity IN (".getEntity('expensereport').")";
|
||||
$sql .= " AND e.fk_statut >= 5";
|
||||
|
||||
$column = 'e.date_valid';
|
||||
} else {
|
||||
$sql = "SELECT ed.rowid as rowid, ed.fk_projet, p.rowid as project_rowid, p.ref as project_ref, sum(DISTINCT pe.amount) as amount_ht, sum(DISTINCT pe.amount) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as ed";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."expensereport as e ON ed.fk_expensereport = e.rowid";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_expensereport as pe ON pe.fk_expensereport = e.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON ed.fk_projet = p.rowid";
|
||||
$sql .= " WHERE e.entity IN (".getEntity('expensereport').")";
|
||||
$sql .= " AND e.fk_statut >= 5";
|
||||
$column = 'e.date_valid';
|
||||
} else {
|
||||
$sql = "SELECT ed.rowid as rowid, ed.fk_projet, p.rowid as project_rowid, p.ref as project_ref, sum(DISTINCT pe.amount) as amount_ht, sum(DISTINCT pe.amount) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as ed";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."expensereport as e ON ed.fk_expensereport = e.rowid";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_expensereport as pe ON pe.fk_expensereport = e.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON ed.fk_projet = p.rowid";
|
||||
$sql .= " WHERE e.entity IN (".getEntity('expensereport').")";
|
||||
$sql .= " AND e.fk_statut >= 5";
|
||||
|
||||
$column = 'pe.datep';
|
||||
}
|
||||
if (!empty($date_start)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." >= '".$db->idate($date_start)."'";
|
||||
}
|
||||
if (!empty($date_end)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
|
||||
$sql .= " GROUP BY ed.rowid, ed.fk_projet, p.rowid, p.ref";
|
||||
$newsortfield = $sortfield;
|
||||
if ($newsortfield == 's.nom, s.rowid') {
|
||||
$newsortfield = 'project_ref';
|
||||
}
|
||||
$sql .= $db->order($newsortfield, $sortorder);
|
||||
$column = 'pe.datep';
|
||||
}
|
||||
if (!empty($date_start)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." >= '".$db->idate($date_start)."'";
|
||||
}
|
||||
if (!empty($date_end)) {
|
||||
$sql .= " AND ".$db->sanitize($column)." <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
|
||||
$sql .= " GROUP BY ed.rowid, ed.fk_projet, p.rowid, p.ref";
|
||||
$newsortfield = $sortfield;
|
||||
if ($newsortfield == 's.nom, s.rowid') {
|
||||
$newsortfield = 'project_ref';
|
||||
}
|
||||
$sql .= $db->order($newsortfield, $sortorder);
|
||||
|
||||
echo '<tr class="trforbreak"><td colspan="4">'.$langs->trans("ExpenseReport").'</td></tr>';
|
||||
|
||||
|
|
@ -860,8 +851,7 @@ if (isModEnabled('invoice') && ($modecompta == 'CREANCES-DETTES' || $modecompta
|
|||
* Various Payments
|
||||
*/
|
||||
//$conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY = 1;
|
||||
|
||||
if (getDolGlobalString('ACCOUNTING_REPORTS_INCLUDE_VARPAY') && isModEnabled("bank") && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
if (getDolGlobalString('ACCOUNTING_REPORTS_INCLUDE_VARPAY') && isModEnabled("bank")) {
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
|
||||
|
|
@ -953,8 +943,7 @@ if (isModEnabled('invoice') && ($modecompta == 'CREANCES-DETTES' || $modecompta
|
|||
/*
|
||||
* Payment Loan
|
||||
*/
|
||||
|
||||
if (getDolGlobalString('ACCOUNTING_REPORTS_INCLUDE_LOAN') && isModEnabled('don') && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
if (getDolGlobalString('ACCOUNTING_REPORTS_INCLUDE_LOAN') && isModEnabled('don')) {
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Benjamin B. <b.crozon@trebisol.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ class Contrat extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
@ -1271,7 +1271,9 @@ class Contrat extends CommonObject
|
|||
// Delete record into ECM index and physically
|
||||
if (!$error) {
|
||||
$res = $this->deleteEcmFiles(0); // Deleting files physically is done later with the dol_delete_dir_recursive
|
||||
if ($res) $res = $this->deleteEcmFiles(1); // Deleting files physically is done later with the dol_delete_dir_recursive
|
||||
if ($res) {
|
||||
$res = $this->deleteEcmFiles(1);
|
||||
} // Deleting files physically is done later with the dol_delete_dir_recursive
|
||||
if (!$res) {
|
||||
$error++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class ContratLigne extends CommonObjectLine
|
|||
public $fk_remise_except;
|
||||
|
||||
/**
|
||||
* @var float $subprice Unit price before taxes
|
||||
* @var float Unit price before taxes
|
||||
*/
|
||||
public $subprice;
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ class ContratLigne extends CommonObjectLine
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class Ccountry extends CommonDict
|
|||
|
||||
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}>
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}>
|
||||
*/
|
||||
public $fields = array(
|
||||
'label' => array('type' => 'varchar(250)', 'label' => 'Label', 'enabled' => 1, 'visible' => 1, 'position' => 15, 'notnull' => -1, 'showoncombobox' => 1)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class CEmailTemplate extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
"rowid" => array("type" => "integer", "label" => "TechnicalID", 'enabled' => 1, 'position' => 10, 'notnull' => 1, 'visible' => -1,),
|
||||
|
|
@ -280,7 +280,7 @@ class CEmailTemplate extends CommonObject
|
|||
$sql .= " ".((int) $this->datec).",";
|
||||
}
|
||||
$sql .= " '".$this->db->escape($this->label)."',";
|
||||
$sql .= " ".((int) $this->position).", ".((int) $this->defaultfortype ).",";
|
||||
$sql .= " ".((int) $this->position).", ".((int) $this->defaultfortype).",";
|
||||
if (is_null($this->enabled)) {
|
||||
$sql .= " 1,";
|
||||
} else {
|
||||
|
|
@ -497,7 +497,7 @@ class CEmailTemplate extends CommonObject
|
|||
public function apifetch($id, $label = '')
|
||||
{
|
||||
// Check parameters
|
||||
if (($id ==0 || empty($id)) && empty($label)) {
|
||||
if (($id == 0 || empty($id)) && empty($label)) {
|
||||
dol_syslog(get_class($this)."::apifetch id and label are empty", LOG_DEBUG);
|
||||
$this->error = 'id='.$id.' and label are empty';
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2021 Florian HENRY <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -76,7 +76,7 @@ class DefaultValues extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -87,7 +87,7 @@ class EmailSenderProfile extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'visible' => -1, 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => 'Id',),
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -127,7 +127,7 @@ class Events // extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'noteditable' => 1, 'notnull' => 1, 'index' => 1, 'position' => 1, 'comment' => 'Id'),
|
||||
|
|
|
|||
|
|
@ -3046,8 +3046,9 @@ class Form
|
|||
|
||||
$out .= '<select class="flat' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '" id="' . $htmlname . '">';
|
||||
|
||||
$sql = 'SELECT b.rowid, b.ref, b.label, b.fk_product';
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'bom_bom as b';
|
||||
$sql = 'SELECT b.rowid, b.ref, b.label as bomLabel, p.label as productLabel';
|
||||
$sql .= ' FROM ' . $this->db->prefix() . 'bom_bom as b';
|
||||
$sql .= ' INNER JOIN ' . $this->db->prefix() . 'product as p ON b.fk_product = p.rowid';
|
||||
$sql .= ' WHERE b.entity IN (' . getEntity('bom') . ')';
|
||||
if (!empty($status)) {
|
||||
$sql .= ' AND status = ' . (int) $status;
|
||||
|
|
@ -3071,13 +3072,11 @@ class Form
|
|||
$out .= '> </option>';
|
||||
}
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
$product = new Product($db);
|
||||
$res = $product->fetch($obj->fk_product);
|
||||
$out .= '<option value="' . $obj->rowid . '"';
|
||||
if ($obj->rowid == $selected) {
|
||||
$out .= 'selected';
|
||||
}
|
||||
$out .= '>' . $obj->ref . ' - ' . $product->label . ' - ' . $obj->label . '</option>';
|
||||
$out .= '>' . $obj->ref . ' - ' . $obj->productLabel . ' - ' . $obj->bomLabel . '</option>';
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -917,9 +917,9 @@ class FormSetupItem
|
|||
$forcereload = empty($this->fieldParams['forcereload']) ? 0 : 1;
|
||||
$suffixarray = array('ifoff' => empty($this->fieldParams['alertifoff']) ? '' : '_red', 'ifon' => empty($this->fieldParams['alertifon']) ? '' : '_red');
|
||||
|
||||
$out .= ajax_constantonoff($this->confKey, $input, $this->entity, $revertonoff, 0, $forcereload, 2, 0, 0, $suffixarray);
|
||||
$out .= ajax_constantonoff($this->confKey, $input, $this->entity, $revertonoff, 0, $forcereload, 2, 0, 0, $suffixarray, '', $this->cssClass);
|
||||
} else {
|
||||
$out .= $this->form->selectyesno($this->confKey, $this->fieldValue, 1);
|
||||
$out .= $this->form->selectyesno($this->confKey, $this->fieldValue, 1, false, 0, 0, $this->cssClass);
|
||||
}
|
||||
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
||||
$out .= $this->generateInputFieldEmailTemplate();
|
||||
|
|
@ -1298,7 +1298,7 @@ class FormSetupItem
|
|||
$revertonoff = empty($this->fieldParams['revertonoff']) ? 0 : 1;
|
||||
$forcereload = empty($this->fieldParams['forcereload']) ? 0 : 1;
|
||||
|
||||
$out .= ajax_constantonoff($this->confKey, array(), $this->entity, $revertonoff, 0, $forcereload);
|
||||
$out .= ajax_constantonoff($this->confKey, array(), $this->entity, $revertonoff, 0, $forcereload, 2, 0, 0, '', '', $this->cssClass); // TODO possibility to add $input parameter
|
||||
} else {
|
||||
if ($this->fieldValue == 1) {
|
||||
$out .= $langs->trans('yes');
|
||||
|
|
|
|||
|
|
@ -668,7 +668,8 @@ class Notify
|
|||
$application = (preg_match('/^\+/', $applicationcustom) ? $application : '').$applicationcustom;
|
||||
}
|
||||
|
||||
$from = getDolGlobalString('NOTIFICATION_EMAIL_FROM');
|
||||
$from = getDolGlobalString('NOTIFICATION_EMAIL_FROM', getDolGlobalString('MAIN_MAIL_EMAIL_FROM'));
|
||||
|
||||
$object_type = '';
|
||||
$link = '';
|
||||
$num = 0;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -99,7 +99,7 @@ class TimeSpent extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -1585,14 +1585,20 @@ jQuery(document).ready(function() {
|
|||
|
||||
// Code to manage the js for combo list with dependencies (called by extrafields_view.tpl.php)
|
||||
function showOptions(child_list, parent_list) {
|
||||
var val = $("select[name="+parent_list+"]").val();
|
||||
var parentVal = parent_list + ":" + val;
|
||||
if(val > 0) {
|
||||
$("select[name=\""+child_list+"\"] option[parent]").hide();
|
||||
$("select[name=\""+child_list+"\"] option[parent=\""+parentVal+"\"]").show();
|
||||
var parentInput = $("select[name="+parent_list+"]");
|
||||
if (parentInput.length === 0) { // when parent extra-field is in view mode and the child is edited directly on card (on line edit)
|
||||
parentInput = $("input[name="+parent_list+"]");
|
||||
}
|
||||
if (parentInput.length > 0) {
|
||||
var val = parentInput.val();
|
||||
var parentVal = parent_list + ":" + val;
|
||||
if (val > 0) {
|
||||
$("select[name=\""+child_list+"\"] option[parent]").prop("disabled", true).hide(); // hide not work with select2 element so disabled it
|
||||
$("select[name=\""+child_list+"\"] option[parent=\""+parentVal+"\"]").prop('disabled', false).show(); // show not work with select2 element so enabled it
|
||||
} else {
|
||||
$("select[name=\""+child_list+"\"] option").show();
|
||||
$("select[name=\""+child_list+"\"] option").prop("disabled", false).show(); // show not work with select2 element so enabled it
|
||||
}
|
||||
}
|
||||
}
|
||||
function setListDependencies() {
|
||||
console.log("setListDependencies");
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ function societe_prepare_head(Societe $object)
|
|||
$sql .= " FROM " . MAIN_DB_PREFIX . "societe_rib as n";
|
||||
$sql .= " WHERE n.fk_soc = " . ((int) $object->id);
|
||||
if (!isModEnabled('stripe')) {
|
||||
$sql .= " AND n.stripe_card_ref IS NULL";
|
||||
$sql .= " AND (n.stripe_card_ref IS NULL OR n.stripe_card_ref ='')";
|
||||
} else {
|
||||
$sql .= " AND (n.stripe_card_ref IS NULL OR (n.stripe_card_ref IS NOT NULL AND n.status = " . ((int) $servicestatus) . "))";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param CommonObject $object Object related to tabs
|
||||
* @param Fichinter $object Object related to tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function fichinter_prepare_head($object)
|
||||
|
|
@ -221,7 +221,7 @@ function fichinter_admin_prepare_head()
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @param FichinterRec $object Object related to tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function fichinter_rec_prepare_head($object)
|
||||
|
|
|
|||
|
|
@ -822,30 +822,39 @@ function GETPOSTISARRAY($paramname, $method = 0)
|
|||
* Note: The property $user->default_values is loaded by main.php when loading the user.
|
||||
*
|
||||
* @param string $paramname Name of parameter to found
|
||||
* @param string $check Type of check
|
||||
* '' or 'none'=no check (deprecated)
|
||||
* 'password'=allow characters for a password
|
||||
* 'email'=allow characters for an email "email@domain.com"
|
||||
* 'url'=allow characters for an url
|
||||
* 'array', 'array:restricthtml' or 'array:aZ09' to check it's an array
|
||||
* 'int'=check it's numeric (integer or float)
|
||||
* 'intcomma'=check it's integer+comma ('1,2,3,4...')
|
||||
* 'alphanohtml'=check there is no html content and no " and no ../ ('alpha' is an alias of 'alphanohtml')
|
||||
* 'alphawithlgt'=alpha with lgt and no " and no ../ (Can be used for email string like "Name <email@domain.com>")
|
||||
* 'aZ'=check it's a-z only
|
||||
* 'aZ09'=check it's simple alpha string (recommended for keys, it includes a-z0-9_\-\.)
|
||||
* 'aZ09arobase'=check it's a string for an element type ('myobject@mymodule')
|
||||
* 'aZ09comma'=check it's a string for a sortfield or sortorder
|
||||
* 'san_alpha'=Use filter_var with FILTER_SANITIZE_STRING (do not use this for free text string)
|
||||
* 'nohtml'=check there is no html content
|
||||
* 'restricthtml'=check html content is restricted to some tags only
|
||||
* 'custom'= custom filter specify $filter and $options)
|
||||
* @param 'int'|'intcomma'|'array'|'array:int'|'array:intcomma'|'array:alpha'|'array:alphanohtml'|'array:aZ09'|'array:restricthtml'|'password'|'email'|'alpha'|'alphanohtml'|'nohtml'|'restricthtml'|'alphawithlgt'|'aZ09'|'aZ'|'aZ09arobase'|'aZ09comma'|'url'|'san_alpha'|'custom'|'none'|'restricthtmlallowclass'|'restricthtmlallowunvalid'|'restricthtmlallowiframe'|'restricthtmlallowlinkscript'|'' $check Type of check
|
||||
* '' or 'none'=no check (deprecated)
|
||||
* 'password'=allow characters for a password
|
||||
* 'email'=allow characters for an email "email@domain.com"
|
||||
* 'url'=allow characters for an url
|
||||
* 'array', 'array:restricthtml' or 'array:aZ09' to check it's an array
|
||||
* 'int'=check it's numeric (integer or float)
|
||||
* 'intcomma'=check it's integer+comma ('1,2,3,4...')
|
||||
* 'alphanohtml'=check there is no html content and no " and no ../ ('alpha' is an alias of 'alphanohtml')
|
||||
* 'alphawithlgt'=alpha with lgt and no " and no ../ (Can be used for email string like "Name <email@domain.com>")
|
||||
* 'aZ'=check it's a-Z only
|
||||
* 'aZ09'=check it's simple alpha string (recommended for keys, it includes a-Z0-9_\-\.)
|
||||
* 'aZ09arobase'=check it's a string for an element type ('myobject@mymodule')
|
||||
* 'aZ09comma'=check it's a string for a sortfield or sortorder
|
||||
* 'san_alpha'=Use filter_var with FILTER_SANITIZE_STRING (do not use this for free text string)
|
||||
* 'nohtml'=check there is no html content
|
||||
* 'restricthtml'=check html content is restricted to some tags only
|
||||
* 'custom'= custom filter specify $filter and $options)
|
||||
* 'restricthtmlallowclass'
|
||||
* 'restricthtmlallowunvalid'
|
||||
* 'restricthtmlallowiframe'
|
||||
* 'restricthtmlallowlinkscript'
|
||||
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get)
|
||||
* @param ?int $filter Filter to apply when $check is set to 'custom'. (See http://php.net/manual/en/filter.filters.php for détails)
|
||||
* @param mixed $options Options to pass to filter_var when $check is set to 'custom'
|
||||
* @param int $noreplace Force disable of replacement of __xxx__ strings.
|
||||
* @return string|array<mixed> Value found (string or array), or '' if check fails
|
||||
* @phpstan-return ($check is 'array:int' ? numeric-string[]|array{} : ($check is 'array:az09' ? string[] : ($check is 'array:restricthtml' ? string[] : string|array<mixed>)))
|
||||
* @phpstan-return (
|
||||
* $check is 'int' ? numeric-string|'' :
|
||||
* $check is 'array:int' ? numeric-string[]|array{} :
|
||||
* $check is 'array' | 'array:aZ09' | 'array:alpha' | 'array:intcomma' | 'array:restricthtml' ? string[] :
|
||||
* $check is 'alpha' | 'aZ' | 'aZ09' | 'aZ09arobase' | 'aZ09comma' | 'password' | 'email' | 'url' | 'alphanohtml' |'nohtml' | 'restricthtml' | 'alphawithlgt' | 'intcomma' | 'restricthtmlallowclass' | 'restricthtmlallowunvalid' | 'restricthtmlallowiframe' | 'restricthtmlallowlinkscript' ? string : string|array<mixed>
|
||||
* )
|
||||
*/
|
||||
function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null, $options = null, $noreplace = 0)
|
||||
{
|
||||
|
|
@ -4120,14 +4129,14 @@ function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = 'auto',
|
|||
/**
|
||||
* Return date for now. In most cases, we use this function without parameters (that means GMT time).
|
||||
*
|
||||
* @param string $mode 'auto' => for backward compatibility (avoid this),
|
||||
* 'gmt' => we return GMT timestamp,
|
||||
* 'tzserver' => we add the PHP server timezone
|
||||
* 'tzref' => we add the company timezone. Not implemented.
|
||||
* 'tzuser' or 'tzuserrel' => we add the user timezone
|
||||
* @param 'auto'|'gmt'|'tzserver'|'tzuser'|'tzuserrel' $mode 'auto' => for backward compatibility (avoid this),
|
||||
* 'gmt' => we return GMT timestamp,
|
||||
* 'tzserver' => we add the PHP server timezone
|
||||
* 'tzref' => we add the company timezone. Not implemented.
|
||||
* 'tzuser' or 'tzuserrel' => we add the user timezone
|
||||
* @return int $date Timestamp
|
||||
*/
|
||||
function dol_now($mode = 'auto')
|
||||
function dol_now($mode = 'gmt')
|
||||
{
|
||||
$ret = 0;
|
||||
|
||||
|
|
@ -4141,14 +4150,13 @@ function dol_now($mode = 'auto')
|
|||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
$tzsecond = getServerTimeZoneInt('now'); // Contains tz+dayling saving time
|
||||
$ret = (int) (dol_now('gmt') + ($tzsecond * 3600));
|
||||
//} elseif ($mode == 'tzref') {// Time for now with parent company timezone is added
|
||||
// require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
// $tzsecond=getParentCompanyTimeZoneInt(); // Contains tz+dayling saving time
|
||||
// $ret=dol_now('gmt')+($tzsecond*3600);
|
||||
//}
|
||||
// } elseif ($mode == 'tzref') {// Time for now with parent company timezone is added
|
||||
// require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
// $tzsecond=getParentCompanyTimeZoneInt(); // Contains tz+dayling saving time
|
||||
// $ret=dol_now('gmt')+($tzsecond*3600);
|
||||
} elseif ($mode == 'tzuser' || $mode == 'tzuserrel') {
|
||||
// Time for now with user timezone added
|
||||
//print 'time: '.time();
|
||||
// print 'time: '.time();
|
||||
$offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60;
|
||||
$offsetdst = (empty($_SESSION['dol_dst']) ? 0 : $_SESSION['dol_dst']) * 60 * 60;
|
||||
$ret = (int) (dol_now('gmt') + ($offsettz + $offsetdst));
|
||||
|
|
@ -4253,7 +4261,7 @@ function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0, $mor
|
|||
* @param string $morecss More CSS
|
||||
* @return string HTML Link
|
||||
*/
|
||||
function dol_print_email($email, $contactid = 0, $socid = 0, $addlink = 0, $max = 64, $showinvalid = 1, $withpicto = 0, $morecss = 'paddingrightonly')
|
||||
function dol_print_email($email, $contactid = 0, $socid = 0, $addlink = 0, $max = 0, $showinvalid = 1, $withpicto = 0, $morecss = 'paddingrightonly')
|
||||
{
|
||||
global $user, $langs, $hookmanager;
|
||||
|
||||
|
|
@ -4855,7 +4863,7 @@ function dol_print_phone($phone, $countrycode = '', $contactid = 0, $socid = 0,
|
|||
if ($withpicto == 'fax') {
|
||||
$picto = 'phoning_fax';
|
||||
} elseif ($withpicto == 'phone') {
|
||||
$picto = 'phoning';
|
||||
$picto = 'phone';
|
||||
} elseif ($withpicto == 'mobile') {
|
||||
$picto = 'phoning_mobile';
|
||||
} else {
|
||||
|
|
@ -4869,7 +4877,7 @@ function dol_print_phone($phone, $countrycode = '', $contactid = 0, $socid = 0,
|
|||
}
|
||||
|
||||
$rep .= $newphoneastart;
|
||||
$rep .= ($withpicto ? img_picto($titlealt, 'object_' . $picto . '.png') : '');
|
||||
$rep .= ($withpicto ? img_picto($titlealt, $picto) : '');
|
||||
if ($separ != 'hidenum') {
|
||||
$rep .= ($withpicto ? ' ' : '') . $newphone;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
/**
|
||||
* Return array head with list of tabs to view object information
|
||||
*
|
||||
* @param Object $object Holiday
|
||||
* @param Holiday $object Holiday
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function holiday_prepare_head($object)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @param Loan $object Object related to tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function loan_prepare_head($object)
|
||||
|
|
|
|||
|
|
@ -1075,7 +1075,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl
|
|||
$sql .= " AND (sc.fk_user = ".((int) $user->id);
|
||||
if (getDolGlobalInt('MAIN_SEE_SUBORDINATES')) {
|
||||
$userschilds = $user->getAllChildIds();
|
||||
$sql .= " OR sc.fk_user IN (".$db->sanitize(implode(',', $userschilds)).")";
|
||||
if (!empty($userschilds)) $sql .= " OR sc.fk_user IN (".$db->sanitize(implode(',', $userschilds)).")";
|
||||
}
|
||||
$sql .= ")";
|
||||
$sql .= " AND sc.fk_soc = s.rowid";
|
||||
|
|
@ -1185,9 +1185,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl
|
|||
$sql .= " AND (sc.fk_user = ".((int) $user->id);
|
||||
if (getDolGlobalInt('MAIN_SEE_SUBORDINATES')) {
|
||||
$userschilds = $user->getAllChildIds();
|
||||
foreach ($userschilds as $key => $value) {
|
||||
$sql .= ' OR sc.fk_user = '.((int) $value);
|
||||
}
|
||||
if (!empty($userschilds)) $sql .= " OR sc.fk_user IN (".$db->sanitize(implode(',', $userschilds)).")";
|
||||
}
|
||||
$sql .= ')';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @param Entrepot $object Object related to tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function stock_prepare_head($object)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
/* Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @param Tva $object Object related to tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function vat_prepare_head($object)
|
||||
|
|
|
|||
|
|
@ -323,6 +323,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att
|
|||
|
||||
//var_dump($tmpkeyextra.'-'.$value.'-'.$object->table_element);
|
||||
print $extrafields->showOutputField($tmpkeyextra, $value, '', $object->table_element, null, $object);
|
||||
print '<input type="hidden" value="' . $value . '" name="options_' . $tmpkeyextra . '" id="options_' . $tmpkeyextra . '"/>'; // it's needed when to get parent value when extra-field list depend on parent extra-field list
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ if (!empty($captcha)) {
|
|||
}
|
||||
|
||||
// List of directories where we can find captcha handlers
|
||||
$dirModCaptcha = array_merge(array('main' => '/core/modules/security/captcha/'), is_array($conf->modules_parts['captcha']) ? $conf->modules_parts['captcha'] : array());
|
||||
$dirModCaptcha = array_merge(array('main' => '/core/modules/security/captcha/'), ((isset($conf->modules_parts['captcha']) && is_array($conf->modules_parts['captcha'])) ? $conf->modules_parts['captcha'] : array()));
|
||||
$fullpathclassfile = '';
|
||||
foreach ($dirModCaptcha as $dir) {
|
||||
$fullpathclassfile = dol_buildpath($dir."modCaptcha".ucfirst($captcha).'.class.php', 0, 2);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2008-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -135,7 +135,7 @@ if ($action == 'add' && $permissiontoadd) {
|
|||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
} else {
|
||||
header("Location: ".DOL_URL_ROOT.'/ecm/index.php?action=file_manager'.($module ? '&module='.$module : ''));
|
||||
header("Location: ".DOL_URL_ROOT.'/ecm/index.php?action=file_manager&module='.$module);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ $cancel = GETPOST('cancel', 'aZ09');
|
|||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$module = GETPOST('module', 'alpha');
|
||||
$module = GETPOST('module', 'alpha');
|
||||
$website = GETPOST('website', 'alpha');
|
||||
$pageid = GETPOSTINT('pageid');
|
||||
$pageid = GETPOSTINT('pageid');
|
||||
if (empty($module)) {
|
||||
$module = 'ecm';
|
||||
}
|
||||
|
|
@ -465,16 +465,16 @@ if ($action != 'edit' && $action != 'delete' && $action != 'deletefile') {
|
|||
print '<div class="tabsAction">';
|
||||
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().($module ? '&module='.$module : '').'§ion='.$section.'">'.$langs->trans('Edit').'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&module='.$module.'§ion='.$section.'">'.$langs->trans('Edit').'</a>';
|
||||
}
|
||||
|
||||
if ($permissiontoadd) {
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php?action=create&token='.newToken().($module ? '&module='.$module : '').'&catParent='.$section.'">'.$langs->trans('ECMAddSection').'</a>';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php?action=create&token='.newToken().'&module='.$module.'&catParent='.$section.'">'.$langs->trans('ECMAddSection').'</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans('ECMAddSection').'</a>';
|
||||
}
|
||||
|
||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().($module ? '&module='.urlencode($module) : '').'§ion='.urlencode($section).($backtopage ? '&backtopage='.urlencode($backtopage) : ''), '', $permissiontoadd);
|
||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&module='.urlencode($module).'§ion='.urlencode($section).($backtopage ? '&backtopage='.urlencode($backtopage) : ''), '', $permissiontoadd);
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
|
|
@ -497,7 +497,7 @@ if ($action == 'delete' || $action == 'delete_dir') {
|
|||
);
|
||||
}
|
||||
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.urlencode(GETPOST('section', 'alpha')).($module ? '&module='.$module : '').($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $relativepathwithoutslash), 'confirm_deletedir', $formquestion, 1, 1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.urlencode(GETPOST('section', 'alpha')).'&module='.$module.($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $relativepathwithoutslash), 'confirm_deletedir', $formquestion, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class EmailCollector extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'visible' => -2, 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'index' => 1),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -70,7 +70,7 @@ class EmailCollectorAction extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -72,7 +72,7 @@ class EmailCollectorFilter extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class ConferenceOrBooth extends ActionComm
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'csslist' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -86,7 +86,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class Expedition extends CommonObject
|
|||
|
||||
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array();
|
||||
|
||||
|
|
@ -565,7 +565,9 @@ class Expedition extends CommonObject
|
|||
if ($line_id <= 0) {
|
||||
$error++;
|
||||
}
|
||||
if (isset($kits_list[$line->fk_product])) $kits_id_cached[$line->fk_product] = $line_id;
|
||||
if (isset($kits_list[$line->fk_product])) {
|
||||
$kits_id_cached[$line->fk_product] = $line_id;
|
||||
}
|
||||
} else { // with batch management
|
||||
if ($this->create_line_batch($line, $line->array_options) <= 0) {
|
||||
$error++;
|
||||
|
|
@ -1045,9 +1047,9 @@ class Expedition extends CommonObject
|
|||
// Change status of order to "shipment in process"
|
||||
$triggerKey = 'SHIPPING_'; // Because when the trigger is fired the object is a shipping and not the real target object, so I add a prefix like SHIPPING_ to avoid confusion
|
||||
if ($this->origin == 'commande') {
|
||||
$triggerKey.= 'ORDER_SHIPMENTONPROCESS';
|
||||
$triggerKey .= 'ORDER_SHIPMENTONPROCESS';
|
||||
} else {
|
||||
$triggerKey.= strtoupper($this->origin).'_SHIPMENTONPROCESS';
|
||||
$triggerKey .= strtoupper($this->origin).'_SHIPMENTONPROCESS';
|
||||
}
|
||||
|
||||
// TODO : load the origin object to trigger the right setStatus according to origin object
|
||||
|
|
@ -1276,7 +1278,7 @@ class Expedition extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Add a simple expedition line.
|
||||
* Add a simple expedition line.
|
||||
*
|
||||
* @param float $qty Quantity
|
||||
* @param string $element_type Element type
|
||||
|
|
@ -2809,7 +2811,7 @@ class Expedition extends CommonObject
|
|||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$label = $langs->trans('SendingMethod'.$obj->code);
|
||||
$this->listmeths[$i]= [
|
||||
$this->listmeths[$i] = [
|
||||
'rowid' => (int) $obj->rowid,
|
||||
'code' => $obj->code,
|
||||
'libelle' => ($label != 'SendingMethod'.$obj->code ? $label : $obj->label),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||
* Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 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
|
||||
|
|
@ -73,7 +73,7 @@ class ExpenseReportIk extends CommonObject
|
|||
|
||||
/**
|
||||
* Attribute object linked with database
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'ID', 'enabled' => 1, 'index' => 1, 'visible' => -1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||
* Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 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
|
||||
|
|
@ -110,7 +110,7 @@ class ExpenseReportRule extends CommonObject
|
|||
|
||||
/**
|
||||
* Attribute object linked with database
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'index' => 1, 'label' => 'ID', 'enabled' => 1, 'visible' => -1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ class FactureFournisseurRec extends CommonInvoice
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
|
||||
|
|
|
|||
|
|
@ -730,6 +730,11 @@ while ($i < $imaxinloop) {
|
|||
}
|
||||
}
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
|
|
@ -747,6 +752,7 @@ while ($i < $imaxinloop) {
|
|||
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class Evaluation extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -96,7 +96,7 @@ class EvaluationLine extends CommonObjectLine
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class Job extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class Position extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 2, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class Skill extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -99,7 +99,7 @@ class Skilldet extends CommonObjectLine
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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 +93,7 @@ class SkillRank extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ if (empty($reshook)) {
|
|||
$ret = -1;
|
||||
foreach ($TSkillsToAdd as $k => $v) {
|
||||
$skillAdded = new SkillRank($db);
|
||||
$skillAdded->fk_skill = $v;
|
||||
$skillAdded->fk_skill = (int) $v;
|
||||
$skillAdded->fk_object = $id;
|
||||
$skillAdded->objecttype = $objecttype;
|
||||
$ret = $skillAdded->create($user);
|
||||
|
|
@ -177,7 +177,7 @@ if (empty($reshook)) {
|
|||
$objEval = $db->fetch_object($result);
|
||||
$line = new EvaluationLine($db);
|
||||
$line->fk_evaluation = $objEval->rowid;
|
||||
$line->fk_skill = $v;
|
||||
$line->fk_skill = (int) $v;
|
||||
$line->required_rank = 0;
|
||||
$line->fk_rank = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ if (getDolGlobalString('MAIN_MOTD')) {
|
|||
*/
|
||||
|
||||
// Specific warning to propose to upgrade invoice situation to progressive mode
|
||||
if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1) {
|
||||
if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1) { // Note that we must also be in v22 or +, but this is the case now in this branch
|
||||
$langs->loadLangs(array("admin"));
|
||||
print info_admin($langs->trans("WarningExperimentalFeatureInvoiceSituationNeedToUpgradeToProgressiveMode", 'https://partners.dolibarr.org'));
|
||||
//print "<br>";
|
||||
|
|
|
|||
|
|
@ -44,6 +44,21 @@ ALTER TABLE llx_opensurvey_user_studs ADD COLUMN tms timestamp DEFAULT CURRENT_T
|
|||
-- V23 migration
|
||||
ALTER TABLE llx_usergroup ADD color VARCHAR(6) AFTER tms;
|
||||
|
||||
create table llx_categorie_project_task (
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_project_task integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
|
||||
--noqa:disable=PRS
|
||||
ALTER TABLE llx_categorie_project_task ADD PRIMARY KEY pk_categorie_propal (fk_categorie, fk_task);
|
||||
--noqa:enable=PRS
|
||||
ALTER TABLE llx_categorie_project_task ADD INDEX idx_categorie_project_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_project_task ADD INDEX idx_categorie_project_fk_task (fk_task);
|
||||
|
||||
ALTER TABLE llx_categorie_project_task ADD CONSTRAINT fk_categorie_project_task_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_project_task ADD CONSTRAINT fk_categorie_project_task_rowid FOREIGN KEY (fk_task) REFERENCES llx_projet (rowid);
|
||||
|
||||
UPDATE llx_actioncomm SET elementtype = 'project_task' WHERE elementtype = 'task';
|
||||
|
||||
ALTER TABLE llx_document_model ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
|
|
@ -153,6 +168,7 @@ ALTER TABLE llx_user DROP COLUMN egroupware_id;
|
|||
ALTER TABLE llx_adherent ADD COLUMN birth_place varchar(64) after birth;
|
||||
|
||||
ALTER TABLE llx_societe ADD COLUMN birth date DEFAULT NULL after fk_forme_juridique;
|
||||
ALTER TABLE llx_societe ADD vatexemptcode varchar(24) DEFAULT NULL;
|
||||
|
||||
DELETE FROM llx_user_rights WHERE fk_id IN (SELECT id FROM llx_rights_def WHERE module = 'webhook' AND perms = 'webhook_target');
|
||||
DELETE FROM llx_usergroup_rights WHERE fk_id IN (SELECT id FROM llx_rights_def WHERE module = 'webhook' AND perms = 'webhook_target');
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
-- ============================================================================
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
-- Copyright (C) 2025 Charlene Benke <charlene@patas-monkey.com>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
ALTER TABLE llx_categorie_project_task ADD PRIMARY KEY pk_categorie_project (fk_categorie, fk_task);
|
||||
ALTER TABLE llx_categorie_project_task ADD INDEX idx_categorie_project_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_project_task ADD INDEX idx_categorie_project_fk_task (fk_task);
|
||||
|
||||
ALTER TABLE llx_categorie_project_task ADD CONSTRAINT fk_categorie_project_task_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_project_task ADD CONSTRAINT fk_categorie_project_task_rowid FOREIGN KEY (fk_task) REFERENCES llx_projet (rowid);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
-- ============================================================================
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
-- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
-- Copyright (C) 2025 Charlene Benke <charlene@patas-monkey.com>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_categorie_project_task
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_project_task integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
|
@ -81,8 +81,8 @@ create table llx_societe
|
|||
fk_stcomm integer DEFAULT 0 NOT NULL, -- commercial status
|
||||
note_private text, --
|
||||
note_public text, --
|
||||
model_pdf varchar(255),
|
||||
last_main_doc varchar(255), -- relative filepath+filename of last main generated document
|
||||
model_pdf varchar(255), -- the last tempate used to generate a document
|
||||
last_main_doc varchar(255), -- relative filepath+filename of the last main generated document
|
||||
prefix_comm varchar(5), -- prefix commercial (deprecated)
|
||||
client tinyint DEFAULT 0, -- client 0/1/2
|
||||
fournisseur tinyint DEFAULT 0, -- fournisseur 0/1
|
||||
|
|
@ -103,8 +103,9 @@ create table llx_societe
|
|||
cond_reglement_supplier tinyint, -- payment term supplier
|
||||
transport_mode_supplier tinyint, -- transport mode supplier (Intracomm report)
|
||||
fk_shipping_method integer, -- preferred shipping method id
|
||||
tva_assuj tinyint DEFAULT 1, -- assujetti ou non a la TVA
|
||||
vat_reverse_charge tinyint DEFAULT 0, -- By default, company not concerned by vat reverse charge
|
||||
tva_assuj tinyint DEFAULT 1, -- if company using VAT or is exempted
|
||||
vatexemptcode varchar(24), -- if company is exempted, the VAT reason code of exemption
|
||||
vat_reverse_charge tinyint DEFAULT 0, -- By default, company is not concerned by vat reverse charge
|
||||
localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1
|
||||
localtax1_value double(7,4),
|
||||
localtax2_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 2
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ $error = 0;
|
|||
// This page can be long. We increase the allowed delay, but this does not work when we are in safe_mode.
|
||||
$err = error_reporting();
|
||||
error_reporting(0);
|
||||
if (getDolGlobalString('MAIN_OVERRIDE_TIME_LIMIT')) {
|
||||
@set_time_limit((int) $conf->global->MAIN_OVERRIDE_TIME_LIMIT);
|
||||
if (getDolGlobalInt('MAIN_OVERRIDE_TIME_LIMIT')) {
|
||||
@set_time_limit(getDolGlobalInt('MAIN_OVERRIDE_TIME_LIMIT'));
|
||||
} else {
|
||||
@set_time_limit(600);
|
||||
}
|
||||
|
|
@ -200,6 +200,53 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
|||
$conf->setValues($db);
|
||||
|
||||
|
||||
// Reforce log activation (samecode than into the inc.php)
|
||||
$conf->global->MAIN_ENABLE_LOG_TO_HTML = 1;
|
||||
$conf->modules['syslog'] = 'syslog';
|
||||
$conf->global->SYSLOG_LEVEL = constant('LOG_DEBUG');
|
||||
if (!defined('SYSLOG_HANDLERS')) {
|
||||
define('SYSLOG_HANDLERS', '["mod_syslog_file"]');
|
||||
}
|
||||
if (!defined('SYSLOG_FILE')) { // To avoid warning on systems with constant already defined
|
||||
if (@is_writable('/tmp')) {
|
||||
define('SYSLOG_FILE', '/tmp/dolibarr_install.log');
|
||||
} elseif (!empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) {
|
||||
define('SYSLOG_FILE', $_ENV["TMP"].'/dolibarr_install.log');
|
||||
} elseif (!empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) {
|
||||
define('SYSLOG_FILE', $_ENV["TEMP"].'/dolibarr_install.log');
|
||||
} elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) {
|
||||
define('SYSLOG_FILE', '../../../../dolibarr_install.log'); // For DoliWamp
|
||||
} elseif (@is_writable('../../')) {
|
||||
define('SYSLOG_FILE', '../../dolibarr_install.log'); // For others
|
||||
}
|
||||
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
||||
}
|
||||
if (defined('SYSLOG_FILE')) {
|
||||
$conf->global->SYSLOG_FILE = constant('SYSLOG_FILE');
|
||||
}
|
||||
if (!defined('SYSLOG_FILE_NO_ERROR')) {
|
||||
define('SYSLOG_FILE_NO_ERROR', 1);
|
||||
}
|
||||
// We init log handler for install
|
||||
$handlers = array('mod_syslog_file');
|
||||
foreach ($handlers as $handler) {
|
||||
$file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php';
|
||||
if (!file_exists($file)) {
|
||||
throw new Exception('Missing log handler file '.$handler.'.php');
|
||||
}
|
||||
|
||||
require_once $file;
|
||||
$loghandlerinstance = new $handler();
|
||||
if (!$loghandlerinstance instanceof LogHandler) {
|
||||
throw new Exception('Log handler does not extend LogHandler');
|
||||
}
|
||||
|
||||
if (empty($conf->loghandlers[$handler])) {
|
||||
$conf->loghandlers[$handler] = $loghandlerinstance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$listofentities = array(1);
|
||||
|
||||
// Create the global $hookmanager object
|
||||
|
|
@ -4323,7 +4370,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
|
|||
$user = new User($db); // To avoid error during migration
|
||||
}
|
||||
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules force=".$force.", listofmodule=".implode(',', array_keys($listofmodule)));
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules force=".$force.", listofmodule=".implode(',', array_keys($listofmodule)), LOG_NOTICE);
|
||||
|
||||
$reloadactionformodules = array(
|
||||
'MAIN_MODULE_AGENDA' => array('class' => 'modAgenda', 'remove' => 1),
|
||||
|
|
@ -4392,7 +4439,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
|
|||
$moduletoreloadshort = $reg[1];
|
||||
}
|
||||
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ".$moduletoreloadshort." with mode ".$reloadmode." (generic code)");
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ".$moduletoreloadshort." with mode ".$reloadmode." (generic code)", LOG_NOTICE);
|
||||
|
||||
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php';
|
||||
if ($res) {
|
||||
|
|
@ -4404,7 +4451,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
|
|||
$mod->delete_menus(); // We must delete to be sure it is inserted with new values
|
||||
$mod->init($reloadmode);
|
||||
} else {
|
||||
dolibarr_install_syslog('Failed to include '.DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php');
|
||||
dolibarr_install_syslog('Failed to include '.DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php', LOG_ERR);
|
||||
|
||||
$res = @dol_include_once(strtolower($moduletoreloadshort).'/core/modules/mod'.$moduletoreloadshort.'.class.php');
|
||||
if ($res) {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class IntracommReport extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array of properties of field to show
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array of properties of field to show
|
||||
*/
|
||||
public $fields = array(
|
||||
"rowid" => array("type" => "integer", "label" => "TechnicalID", "enabled" => 1, 'position' => 10, 'notnull' => 1, "visible" => "0",),
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class KnowledgeRecord extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
//if ($user->socid > 0) accessforbidden();
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element.'&'.$object->element, $object->element, '', 'rowid', $isdraft);
|
||||
|
||||
$permissiontoadd = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_addupdatedelete.inc.php
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2017-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 Alexandre Spangaro <alexandre@inovea-conseil.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
|
||||
|
|
@ -96,7 +97,7 @@ $upload_dir = $conf->knowledgemanagement->multidir_output[isset($object->entity)
|
|||
//if ($user->socid > 0) accessforbidden();
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element.'&'.$object->element, $object->element, '', 'rowid', $isdraft);
|
||||
//if (empty($conf->knowledgemanagement->enabled)) accessforbidden();
|
||||
//if (empty($permissiontoread)) accessforbidden();
|
||||
|
||||
|
|
@ -516,8 +517,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
if ($permissiontoadd) {
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken().'">'.$langs->trans("SetObsolete").'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("Re-Open").'</a>'."\n";
|
||||
} elseif ($object->status == $object::STATUS_CANCELED) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("ReOpen").'</a>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'inclu
|
|||
//if ($user->socid > 0) accessforbidden();
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element.'&'.$object->element, $object->element, '', 'rowid', $isdraft);
|
||||
|
||||
$permission = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write');
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
//if ($user->socid > 0) accessforbidden();
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element.'&'.$object->element, $object->element, '', 'rowid', $isdraft);
|
||||
|
||||
$permissiontoadd = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
|
||||
|
|
|
|||
|
|
@ -26,14 +26,6 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/class/knowledgerecord.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
|
|
@ -41,6 +33,13 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
|||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/class/knowledgerecord.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("knowledgemanagement", "other"));
|
||||
|
|
@ -154,12 +153,12 @@ $permissiontovalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $pe
|
|||
if (empty($conf->knowledgemanagement->enabled)) {
|
||||
accessforbidden('Module not enabled');
|
||||
}
|
||||
$socid = 0;
|
||||
//$socid = 0;
|
||||
if ($user->socid > 0) { // Protection if external user
|
||||
//$socid = $user->socid;
|
||||
accessforbidden();
|
||||
}
|
||||
$result = restrictedArea($user, 'knowledgemanagement', 0, '', 'knowledgerecord');
|
||||
restrictedArea($user, 'knowledgemanagement', 0, '', 'knowledgerecord');
|
||||
//if (!$permissiontoread) accessforbidden();
|
||||
|
||||
|
||||
|
|
@ -195,6 +194,7 @@ if (empty($reshook)) {
|
|||
$search[$key.'_dtend'] = '';
|
||||
}
|
||||
}
|
||||
$search_all = '';
|
||||
$toselect = array();
|
||||
$search_array_options = array();
|
||||
}
|
||||
|
|
@ -400,7 +400,6 @@ if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $s
|
|||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-knowledgemanagement page-list bodyforlist');
|
||||
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
$param = '';
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ $permissiontoadd = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'wr
|
|||
//if ($user->socid > 0) accessforbidden();
|
||||
//if ($user->socid > 0) $socid = $user->socid;
|
||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element, $object->element, '', 'rowid', $isdraft);
|
||||
restrictedArea($user, $object->module, $object->id, $object->table_element.'&'.$object->element, $object->element, '', 'rowid', $isdraft);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -2111,7 +2111,7 @@ ExpectedChecksum=Expected Checksum
|
|||
CurrentChecksum=Current Checksum
|
||||
ExpectedSize=Expected size
|
||||
CurrentSize=Current size
|
||||
ForcedConstants=Required constant values
|
||||
ForcedConstants=Required setup
|
||||
MailToSendProposal=Customer proposals
|
||||
MailToSendOrder=Sales orders
|
||||
MailToSendInvoice=Customer invoices
|
||||
|
|
@ -2669,6 +2669,7 @@ SensitiveData=Sensitive data
|
|||
ToolToDecryptAString=Tool to decrypt a string
|
||||
Decrypt=Decrypt
|
||||
FilesIntegrityDesc=If you want to check the integrity of files instead of database, you can do it by using <a href="%s"><span class="fas fa-external-link-alt pictofixedwidth"></span>this tool</a>.
|
||||
DataIntegrityDesc=If you want to check the integrity of unalterable data, you can do it by using <a href="%s"><span class="fas fa-external-link-alt pictofixedwidth"></span>this tool</a>.
|
||||
AttributeCodeHelp=A code of your choice (without special chars and spaces) to identify the property.<br>Note that if an object B is created from an existing object A that has a different type (for example creation of an invoice from an order), the value of the complementary attributes of A are also copied into the complementary attributes of B when the code of the attribute is the same.
|
||||
ThereIsMoreThanXAnswers=There is more than %s answers with your filter. Please add more filters...
|
||||
PdfAddTermOfSaleHelp=You can upload the file at the bottom of this setup page
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ BlockedLog=Unalterable Logs
|
|||
BlockedLogDesc=This module tracks some events into an unalterable log (that you can't modify once recorded) into a block chain, in real time. This module provides compatibility with requirements of laws of some countries (like France with the law Finance 2016 - Norme NF525).
|
||||
Fingerprints=Archived events and fingerprints
|
||||
FingerprintsDesc=This is the tool to browse or extract the unalterable logs. Unalterable logs are generated and store into a dedicated table of the systel, in real time when a business event appears. You can use this tool to export this into archive files to store them an external support.
|
||||
UnalterableLogTool1=Some countries law (like France), ask that you do it on a regular basis.
|
||||
UnalterableLogTool1=The law of some countries (like in France when doing B2C), ask that you do it on a regular basis.
|
||||
UnalterableLogTool1FR=In france, you MUST do it at least, once every year, we recommand to do it once per month.
|
||||
UnalterableLogTool2=It is recommended to store the exported archive files in different places (Secured cloud, External USB drive, ...).
|
||||
UnalterableLogTool3=Note that, there is no feature to purge this log and every change tried to be done directly into this log (by a hacker for example) will be reported with a non-valid fingerprint.
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class Mo extends CommonObject
|
|||
*/
|
||||
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class Opensurveysondage extends CommonObject
|
|||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
* @var array<string,array{type:string,label:string,langfile?:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int<-6,6>|string,alwayseditable?:int<0,1>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,cssview?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>|string,disabled?:int<0,1>,arrayofkeyval?:array<int|string,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields = array(
|
||||
'id_sondage' => array('type' => 'varchar(16)', 'label' => 'Idsondage', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => -1,),
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue