diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon
index b583aaafdd1..049fc06a132 100644
--- a/build/phpstan/phpstan-baseline.neon
+++ b/build/phpstan/phpstan-baseline.neon
@@ -2652,12 +2652,6 @@ parameters:
count: 1
path: ../../htdocs/blockedlog/class/blockedlog.class.php
- -
- message: '#^Variable \$aaa might not be defined\.$#'
- identifier: variable.undefined
- count: 1
- path: ../../htdocs/blockedlog/class/blockedlog.class.php
-
-
message: '#^Property BOM\:\:\$status \(int\) in isset\(\) is not nullable\.$#'
identifier: isset.property
@@ -8142,12 +8136,6 @@ parameters:
count: 1
path: ../../htdocs/core/actions_massactions.inc.php
- -
- message: '#^Variable \$action might not be defined\.$#'
- identifier: variable.undefined
- count: 14
- path: ../../htdocs/core/actions_massactions.inc.php
-
-
message: '#^Variable \$from might not be defined\.$#'
identifier: variable.undefined
@@ -8166,12 +8154,6 @@ parameters:
count: 1
path: ../../htdocs/core/actions_massactions.inc.php
- -
- message: '#^Variable \$month might not be defined\.$#'
- identifier: variable.undefined
- count: 2
- path: ../../htdocs/core/actions_massactions.inc.php
-
-
message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#'
identifier: empty.variable
@@ -8202,12 +8184,6 @@ parameters:
count: 1
path: ../../htdocs/core/actions_massactions.inc.php
- -
- message: '#^Variable \$year might not be defined\.$#'
- identifier: variable.undefined
- count: 2
- path: ../../htdocs/core/actions_massactions.inc.php
-
-
message: '#^Variable \$classfile might not be defined\.$#'
identifier: variable.undefined
@@ -17340,18 +17316,6 @@ parameters:
count: 4
path: ../../htdocs/cron/class/cronjob.class.php
- -
- message: '#^Variable \$ExecTimeLimit in empty\(\) always exists and is not falsy\.$#'
- identifier: empty.variable
- count: 1
- path: ../../htdocs/cron/class/cronjob.class.php
-
- -
- message: '#^Variable \$MemoryLimit in empty\(\) always exists and is always falsy\.$#'
- identifier: empty.variable
- count: 1
- path: ../../htdocs/cron/class/cronjob.class.php
-
-
message: '#^Ternary operator condition is always true\.$#'
identifier: ternary.alwaysTrue
@@ -25356,36 +25320,6 @@ parameters:
count: 1
path: ../../htdocs/product/class/product.class.php
- -
- message: '#^Property Product\:\:\$stats_bom has no type specified\.$#'
- identifier: missingType.property
- count: 1
- path: ../../htdocs/product/class/product.class.php
-
- -
- message: '#^Property Product\:\:\$stats_facture_fournisseur has no type specified\.$#'
- identifier: missingType.property
- count: 1
- path: ../../htdocs/product/class/product.class.php
-
- -
- message: '#^Property Product\:\:\$stats_facturerec has no type specified\.$#'
- identifier: missingType.property
- count: 1
- path: ../../htdocs/product/class/product.class.php
-
- -
- message: '#^Property Product\:\:\$stats_mrptoconsume has no type specified\.$#'
- identifier: missingType.property
- count: 1
- path: ../../htdocs/product/class/product.class.php
-
- -
- message: '#^Property Product\:\:\$stats_mrptoproduce has no type specified\.$#'
- identifier: missingType.property
- count: 1
- path: ../../htdocs/product/class/product.class.php
-
-
message: '#^Property Product\:\:\$status \(int\) in isset\(\) is not nullable\.$#'
identifier: isset.property
@@ -25416,12 +25350,6 @@ parameters:
count: 2
path: ../../htdocs/product/class/product.class.php
- -
- message: '#^Ternary operator condition is always true\.$#'
- identifier: ternary.alwaysTrue
- count: 1
- path: ../../htdocs/product/class/product.class.php
-
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
@@ -27762,12 +27690,6 @@ parameters:
count: 2
path: ../../htdocs/projet/tasks.php
- -
- message: '#^Variable \$param might not be defined\.$#'
- identifier: variable.undefined
- count: 17
- path: ../../htdocs/projet/tasks.php
-
-
message: '#^Variable \$permissiontodelete might not be defined\.$#'
identifier: variable.undefined
@@ -28428,42 +28350,6 @@ parameters:
count: 1
path: ../../htdocs/public/payment/newpayment.php
- -
- message: '#^Variable \$PAYPAL_API_KO might not be defined\.$#'
- identifier: variable.undefined
- count: 2
- path: ../../htdocs/public/payment/newpayment.php
-
- -
- message: '#^Variable \$PAYPAL_API_OK might not be defined\.$#'
- identifier: variable.undefined
- count: 2
- path: ../../htdocs/public/payment/newpayment.php
-
- -
- message: '#^Variable \$PAYPAL_API_PASSWORD might not be defined\.$#'
- identifier: variable.undefined
- count: 1
- path: ../../htdocs/public/payment/newpayment.php
-
- -
- message: '#^Variable \$PAYPAL_API_SANDBOX might not be defined\.$#'
- identifier: variable.undefined
- count: 1
- path: ../../htdocs/public/payment/newpayment.php
-
- -
- message: '#^Variable \$PAYPAL_API_SIGNATURE might not be defined\.$#'
- identifier: variable.undefined
- count: 1
- path: ../../htdocs/public/payment/newpayment.php
-
- -
- message: '#^Variable \$PAYPAL_API_USER might not be defined\.$#'
- identifier: variable.undefined
- count: 1
- path: ../../htdocs/public/payment/newpayment.php
-
-
message: '#^Variable \$attendee might not be defined\.$#'
identifier: variable.undefined
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index ffe840e9483..26833536fee 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -374,7 +374,7 @@ class Adherent extends CommonObject
*/
const STATUS_VALIDATED = 1;
/**
- * Resiliated
+ * Resiliated (membership end and was not renew)
*/
const STATUS_RESILIATED = 0;
/**
diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php
index 2fe24da05e9..0aa392a0c52 100644
--- a/htdocs/admin/index.php
+++ b/htdocs/admin/index.php
@@ -61,16 +61,16 @@ print load_fiche_titre($langs->trans("SetupArea"), '', 'tools');
if (getDolGlobalString('MAIN_MOTD_SETUPPAGE')) {
- $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/ /i', ' ', $conf->global->MAIN_MOTD_SETUPPAGE);
+ $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/ /i', ' ', getDolGlobalString('MAIN_MOTD_SETUPPAGE'));
if (getDolGlobalString('MAIN_MOTD_SETUPPAGE')) {
$i = 0;
$reg = array();
- while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100) {
+ while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', getDolGlobalString('MAIN_MOTD_SETUPPAGE'), $reg) && $i < 100) {
$tmp = explode('|', $reg[1]);
if (!empty($tmp[1])) {
$langs->load($tmp[1]);
}
- $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/__\('.preg_quote($reg[1]).'\)__/i', $langs->trans($tmp[0]), $conf->global->MAIN_MOTD_SETUPPAGE);
+ $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/__\('.preg_quote($reg[1]).'\)__/i', $langs->trans($tmp[0]), getDolGlobalString('MAIN_MOTD_SETUPPAGE'));
$i++;
}
diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index b4e9267eec0..afda0e31733 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -1059,9 +1059,24 @@ if ($action == 'edit') {
$text .= /* ($text ? '
' : ''). */$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD'));
}
if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) { // Not defined by default. Depend on platform.
+ $ipstoshow = '';
// List of IP shown as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]'
- // TODO Add a key to allow to show the IP/name of server detected dynamically
- $text .= ($text ? '
' : '').$langs->trans("WarningPHPMail2", getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
+ $arrayipstoshow = explode(',', getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
+ foreach ($arrayipstoshow as $iptoshow) {
+ // If MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is an URL to get/show the public IP/name of server detected dynamically
+ if (preg_match('/^http/i', $iptoshow)) {
+ $tmpresult = getURLContent($iptoshow, 'GET', '', 1, array(), array('http', 'https'), 0);
+ if (!empty($tmpresult['content'])) {
+ $iptoshow = $tmpresult['content'];
+ } else {
+ $iptoshow = ''; // Failed to get IP
+ }
+ }
+ $ipstoshow .= ($ipstoshow ? ', ' : '').trim($iptoshow);
+ }
+ if ($ipstoshow) {
+ $text .= ($text ? '
';
+ break;
+ }
+ }
+}
+
// Move fields of totalizable into the common array pos and val
if (!empty($totalarray['totalizable']) && is_array($totalarray['totalizable'])) {
foreach ($totalarray['totalizable'] as $keytotalizable => $valtotalizable) {
@@ -107,40 +147,3 @@ if (isset($totalarray['pos'])) {
}
//print '';
}
-
-/** print a total cell value according to its type
- *
- * @param string $type of field (duration, string..)
- * @param string $val the value to display
- *
- * @return void (direct print)
- */
-function printTotalValCell($type, $val)
-{
- // if $totalarray['type'] not present we consider it as number
- if (empty($type)) {
- $type = 'real';
- }
- switch ($type) {
- case 'duration':
- print '
';
- break;
- }
-}
diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index e50370f4c45..9e34f4ba39f 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -312,8 +312,8 @@ $tooltiponpricemultiprice = '';
$tooltiponpriceend = '';
$tooltiponpriceendmultiprice = '';
if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
- $tooltiponprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht, 0, '', 0, 0);
- $tooltiponpricemultiprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->multicurrency_total_ht, 0, '', 0, 0);
+ $tooltiponprice .= $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht, 0, '', 0, 0);
+ $tooltiponpricemultiprice .= $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->multicurrency_total_ht, 0, '', 0, 0);
$tooltiponprice .= ' '.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_tva, 0, '', 0, 0);
$tooltiponpricemultiprice .= ' '.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->multicurrency_total_tva, 0, '', 0, 0);
if (is_object($object->thirdparty)) {
@@ -347,6 +347,19 @@ if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
$tooltiponprice .= ' '.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->total_ttc, 0, '', 0, 0);
$tooltiponpricemultiprice .= ' '.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->multicurrency_total_ttc, 0, '', 0, 0);
+ if (!empty($line->special_code) || $line->product_type == 9) {
+ $tooltiponprice .= ' ';
+ $tooltiponpricemultiprice .= ' ';
+ if (!empty($line->special_code)) {
+ $tooltiponprice .= ' '.$langs->trans("SpecialLine").' : '.getLabelSpecialCode($line->special_code);
+ $tooltiponpricemultiprice .= ' '.$langs->trans("SpecialLine").' : '.getLabelSpecialCode($line->special_code);
+ }
+ if ($line->product_type == 9) {
+ $tooltiponprice .= ' '.$langs->trans("SpecialLine").' : '.$langs->trans("GroupingLine");
+ $tooltiponpricemultiprice .= ' '.$langs->trans("SpecialLine").' : '.$langs->trans("GroupingLine");
+ }
+ }
+
$tooltiponprice = '';
$tooltiponpricemultiprice = '';
diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php
index f7bb85395c8..b814567f710 100644
--- a/htdocs/cron/class/cronjob.class.php
+++ b/htdocs/cron/class/cronjob.class.php
@@ -1223,7 +1223,7 @@ class Cronjob extends CommonObject
dol_syslog(get_class($this)."::run_jobs jobtype=".$this->jobtype." userlogin=".$userlogin, LOG_DEBUG);
// Increase limit of time. Works only if we are not in safe mode
- $ExecTimeLimit = 600;
+ $ExecTimeLimit = getDolGlobalInt('MAIN_CRON_EXEC_TIME_LIMIT', 600);
if (!empty($ExecTimeLimit)) {
$err = error_reporting();
error_reporting(0); // Disable all errors
@@ -1231,7 +1231,7 @@ class Cronjob extends CommonObject
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
error_reporting($err);
}
- $MemoryLimit = 0;
+ $MemoryLimit = getDolGlobalString('MAIN_CRON_MEMORY_LIMIT');
if (!empty($MemoryLimit)) {
@ini_set('memory_limit', $MemoryLimit);
}
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 90e30555733..3a7196da08f 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -2144,10 +2144,10 @@ MAIN_PDF_NO_RECIPENT_FRAME=Hide borders on recipient address frame
MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code
MAIN_PDF_HIDE_CUSTOMER_ACCOUNTING_CODE=Hide customer accounting code
MAIN_PDF_HIDE_SENDER_NAME=Hide sender/company name in address block
-TERMSOFSALE=Conditions de vente
-MAIN_PDF_ADD_TERMSOFSALE_PROPAL=Add the conditions of sale after the proposal
-MAIN_PDF_ADD_TERMSOFSALE_ORDER=Add the conditions of sale after the order
-MAIN_PDF_ADD_TERMSOFSALE_INVOICE=Add the conditions of sale after the invoice
+TERMSOFSALE=Terms and conditions of sale
+MAIN_PDF_ADD_TERMSOFSALE_PROPAL=Add the terms and conditions of sale after the proposal
+MAIN_PDF_ADD_TERMSOFSALE_ORDER=Add the terms and conditions of sale after the order
+MAIN_PDF_ADD_TERMSOFSALE_INVOICE=Add the terms and conditions of sale after the invoice
PROPOSAL_PDF_HIDE_PAYMENTTERM=Hide payments conditions
PROPOSAL_PDF_HIDE_PAYMENTMODE=Hide payment mode
MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add a hidden markup into the signature area to allow electronic signature tool to reuse it. May be used by external tools or in the future by the online signature feature.
@@ -2582,7 +2582,7 @@ DolibarrStandardCaptcha=A native captcha generated by Dolibarr
SALES_ORDER_SHOW_SHIPPING_ADDRESS=Show shipping address
SALES_ORDER_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...)
PDF_INVOICE_SHOW_VAT_ANALYSIS=Show vat analysis per rate
-MaxNbOfRecordOnListIsOk=You have a max size for lists is set to %s lines. This is a good value.
+MaxNbOfRecordOnListIsOk=You have a max size for lists set to %s lines. This is a good value.
YouHaveALargeAmountOfRecordOnLists=You have a default max size for lists set to %s lines. This is a large value that need scrolling to see all answers. It is better to have a value lower than %s and use pagination to see record over this number. Change this in menu Home - Setup - Display.
RoundBorders=Round borders
CheckIfModuleIsNotBlackListed=Block install for modules found into the Remote blacklist
@@ -2593,7 +2593,7 @@ SensitiveData=Sensitive data
ToolToDecryptAString=Tool to decrypt a string
Decrypt=Decrypt
FilesIntegrityDesc=If you want to check the integrity of files instead of database, you can do it by using this tool.
-AttributeCodeHelp=A code of your choice (without special char and space) to identify the property. Note that if an object B is created from an existing object A that has a different type (for example creation of an invoice from an order), the value of the complementary attributes of A are also copied into the complementary attributes of B when the code of the attribute is the same.
+AttributeCodeHelp=A code of your choice (without special chars and spaces) to identify the property. Note that if an object B is created from an existing object A that has a different type (for example creation of an invoice from an order), the value of the complementary attributes of A are also copied into the complementary attributes of B when the code of the attribute is the same.
ThereIsMoreThanXAnswers=There is more than %s answers with your filter. Please add more filters...
-PdfAddTermOfSaleHelp=Upload the condition of sales from file input at the bottom of this setup page
-WarningOnlineSignature=Please note that this function allows a person (customer, supplier...) to insert, online, the image of his signature in the PDF document. As for a handwritten signature, such a signature can be made by anyone and does not have the same legal value as a legal electronic signature system going through a paying trusted third party. If you need this level of security, you can contact an integrator for more information or check for addons on www.dolistore.org.
+PdfAddTermOfSaleHelp=You can upload the terms and conditions of sale file at the bottom of this setup page
+WarningOnlineSignature=Please note that this function allows a person (customer, supplier...) to insert, online, the image of his signature in the PDF document. As for a handwritten signature, such a signature can be made by anyone and might not have the same legal value as a legal electronic signature system going through an authorized trusted third party. If you need this level of security, you can contact an integrator for more information or check for addons on www.dolistore.org.
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 8e2381466f8..e6f04f74572 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -523,6 +523,7 @@ SendTo=sent to
PaymentByTransferOnThisBankAccount=Payment by transfer to the following bank account
VATIsNotUsedForInvoice=* Non applicable VAT art-293B of CGI
VATIsNotUsedForInvoiceAsso=* Non applicable VAT art-261-7 of CGI
+VATIsNotUsedReverseChargeProcedure=* Non applicable VAT art-259-1 of CGI
LawApplicationPart1=By application of the law 80.335 of 12/05/80
LawApplicationPart2=the goods remain the property of
LawApplicationPart3=the seller until full payment of
diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang
index 75ab23f6b73..3b399063ad2 100644
--- a/htdocs/langs/en_US/blockedlog.lang
+++ b/htdocs/langs/en_US/blockedlog.lang
@@ -7,7 +7,7 @@ BrowseBlockedLog=Unalterable logs
ShowAllFingerPrintsMightBeTooLong=Show all archived logs (might be long)
ShowAllFingerPrintsErrorsMightBeTooLong=Show all non-valid archive logs (might be long)
DownloadBlockChain=Download fingerprints
-KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, or has erased the previous archived record (check that line with previous # exists) or has modified checksum of the previous record.
+KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, OR has erased the previous archived record (check that the line with previous # exists) OR has modified the checksum of the previous record.
OkCheckFingerprintValidity=Archived log record is valid. The data on this line was not modified and the entry follows the previous one.
OkCheckFingerprintValidityButChainIsKo=Archived log seems valid compared to previous one but the chain was corrupted previously.
AddedByAuthority=Stored into remote authority
@@ -18,9 +18,9 @@ BlockedlogInfoDialog=Log Details
ListOfTrackedEvents=List of tracked events
Fingerprint=Fingerprint
DownloadLogCSV=Export archived logs (CSV)
-DataOfArchivedEvent=Full data of archived event
-DataOfArchivedEventHelp=This field contains the unalterable and structured data that was archived on real time. Even if some parent business event could have been purged or modified, the data archived here is the original data, and it can't be modified.
-DataOfArchivedEventHelp2=Its integrity is guaranteed if the status of the line is OK
+DataOfArchivedEvent=Complementary data of archived event
+DataOfArchivedEventHelp=This field contains the complementary data that was archived on real time. Even if some parent business event could have been purged or modified, the data archived here is the original data, and it can't be modified.
+DataOfArchivedEventHelp2=The integrity of data on each lines is guaranteed if the status of the line is OK
ImpossibleToReloadObject=Original object (type %s, id %s) not linked (see 'Full datas' column to get unalterable saved data)
BlockedLogAreRequiredByYourCountryLegislation=Unalterable Logs module may be required by the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they can not be validated by a tax audit.
BlockedLogActivatedBecauseRequiredByYourCountryLegislation=Unalterable Logs module was activated because of the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they cannot be validated by a tax audit.
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 0e6576f3176..485917e7d86 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -344,8 +344,8 @@ ErrorStartHourIsNull=Start date field cannot be empty
ErrorTooManyLinesToProcessPleaseUseAMoreSelectiveFilter=Too many lines to process. Please use a more selective filter.
ErrorEmptyValueForQty=Quantity cannot be zero.
ErrorNoCloneWithoutName=The new user must have a name
-ErrorNoCloneWithoutEmail=The new user must have a email
-ErrorUserClone=Error when clone categories user
+ErrorNoCloneWithoutEmail=The new user must have an email
+ErrorUserClone=Error in user clone categories
ErrorQtyOrderedLessQtyShipped = The quantity ordered cannot be less than the quantity shipped.
ErrorVariousPaymentOnBankAccountWithADifferentCurrencyNotYetSupported=Error, creating a various payment on a bank account with a currency different than the currency of the company is not yet supported.
ErrorStreamMustBeEnabled=The PHP stream %s is not available. Check your PHP modules and Dolibarr parameter $dolibarr_main_stream_to_disable.
diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang
index c2a7d07b030..b7ca6c62f19 100644
--- a/htdocs/langs/en_US/mails.lang
+++ b/htdocs/langs/en_US/mails.lang
@@ -32,7 +32,7 @@ NewMailing=New mass Email
NewSMSing=New smsing
EditMailing=Edit mass Email
ResetMailing=Resend mass Email
-ConfirmResetMailingTargetMassaction=Confirmation of the reset of targets statusin error
+ConfirmResetMailingTargetMassaction=Confirmation of the reset of targets status in error
ResetMailingTargetMassaction=Reset status in error
DeleteMailing=Delete mass Email
PreviewMailing=Preview mass Email
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 4b451e58c72..16db52a9770 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -498,7 +498,7 @@ ActionRunningNotStarted=To start
ActionRunningShort=In progress
ActionDoneShort=Finished
ActionUncomplete=Incomplete
-LatestLinkedEvents=Latest %s linked events
+LatestLinkedEvents=The last %s events
CompanyFoundation=Company/Organization
Accountant=Accountant
ContactsForCompany=Contacts for this third party
@@ -1341,3 +1341,6 @@ Operator=Operator
AllFieldsRequired=All fields are required.
IsDefined=Is defined
IsNotDefined=Is not defined
+SpecialLine=Special Line
+EcoTax=Eco-Tax
+GroupingLine=Grouping line
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index 22a9411997d..3c45a60d556 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -496,7 +496,7 @@ ActionRunningNotStarted=A réaliser
ActionRunningShort=En cours
ActionDoneShort=Terminé
ActionUncomplete=Incomplet
-LatestLinkedEvents=Les %s derniers événements liés
+LatestLinkedEvents=Les %s derniers événements
CompanyFoundation=Société/Organisation
Accountant=Comptable
ContactsForCompany=Contacts de ce tiers
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 6bde6bf10d1..864ad8adf9d 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -343,8 +343,14 @@ foreach ($search as $key => $val) {
}
$mode_search = 2;
}
- if ($search[$key] != '') {
- $sql .= natural_search("t.".$db->sanitize($key), $search[$key], (($key == 'status') ? 2 : $mode_search));
+ if (empty($object->fields[$key]['searchmulti'])) {
+ if (!is_array($search[$key]) && $search[$key] != '') {
+ $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search));
+ }
+ } else {
+ if (is_array($search[$key]) && !empty($search[$key])) {
+ $sql .= natural_search("t.".$db->escape($key), implode(',', $search[$key]), (($key == 'status') ? 2 : $mode_search));
+ }
}
} else {
if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
@@ -632,7 +638,11 @@ foreach ($object->fields as $key => $val) {
if (!empty($arrayfields['t.'.$key]['checked'])) {
print '
';
@@ -374,17 +374,19 @@ print 'Your API authentication information can be found with following steps. We
print '';
if (!empty($conf->use_javascript_ajax)) {
- print "\n".'';
+ print '
+
+ ';
}
print '
';
diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php
index 15ed29f8d9f..cd942116585 100644
--- a/htdocs/paypal/lib/paypal.lib.php
+++ b/htdocs/paypal/lib/paypal.lib.php
@@ -1,7 +1,8 @@
- * Copyright (C) 2011-2012 Regis Houssin
- * Copyright (C) 2024 MDW
+/* Copyright (C) 2008-2012 Laurent Destailleur
+ * Copyright (C) 2011-2012 Regis Houssin
+ * Copyright (C) 2024 MDW
+ * Copyright (C) 2024 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -467,22 +468,10 @@ function hash_call($methodName, $nvpStr)
}
// Clean parameters
- $PAYPAL_API_USER = "";
- if (getDolGlobalString('PAYPAL_API_USER')) {
- $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
- }
- $PAYPAL_API_PASSWORD = "";
- if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
- $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
- }
- $PAYPAL_API_SIGNATURE = "";
- if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
- $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
- }
- $PAYPAL_API_SANDBOX = "";
- if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
- $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
- }
+ $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
+ $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
+ $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
+ $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
// TODO END problem with triggers
dol_syslog("Paypal API endpoint ".$API_Endpoint);
@@ -514,8 +503,8 @@ function hash_call($methodName, $nvpStr)
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, ($ssl_verifypeer ? true : false));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, ($ssl_verifypeer ? true : false));
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, !getDolGlobalString('MAIN_USE_CONNECT_TIMEOUT') ? 5 : $conf->global->MAIN_USE_CONNECT_TIMEOUT);
- curl_setopt($ch, CURLOPT_TIMEOUT, !getDolGlobalString('MAIN_USE_RESPONSE_TIMEOUT') ? 30 : $conf->global->MAIN_USE_RESPONSE_TIMEOUT);
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, getDolGlobalInt('MAIN_USE_CONNECT_TIMEOUT', 5));
+ curl_setopt($ch, CURLOPT_TIMEOUT, getDolGlobalInt('MAIN_USE_RESPONSE_TIMEOUT', 30));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php
index b3a714489a2..eba524caab4 100644
--- a/htdocs/paypal/lib/paypalfunctions.lib.php
+++ b/htdocs/paypal/lib/paypalfunctions.lib.php
@@ -1,7 +1,8 @@
- * Copyright (C) 2011 Regis Houssin
- * Copyright (C) 2024 MDW
+/* Copyright (C) 2010-2011 Laurent Destailleur
+ * Copyright (C) 2011 Regis Houssin
+ * Copyright (C) 2024 MDW
+ * Copyright (C) 2024 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -57,22 +58,10 @@ if (getDolGlobalString('PAYPAL_API_SANDBOX') || GETPOST('forcesandbox', 'alpha')
}
// Clean parameters
-$PAYPAL_API_USER = "";
-if (getDolGlobalString('PAYPAL_API_USER')) {
- $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
-}
-$PAYPAL_API_PASSWORD = "";
-if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
- $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
-}
-$PAYPAL_API_SIGNATURE = "";
-if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
- $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
-}
-$PAYPAL_API_SANDBOX = "";
-if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
- $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
-}
+$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
+$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
+$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
+$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
// Proxy
$PROXY_HOST = getDolGlobalString('MAIN_PROXY_HOST');
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index c5ab3793d34..a94aa6d490a 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -646,10 +646,30 @@ class Product extends CommonObject
* @var array{}|array{customers_toconsume:int,nb_toconsume:int,qty_toconsume:float,customers_consumed:int,nb_consumed:int,qty_consumed:float,customers_toproduce:int,nb_toproduce:int,qty_toproduce:float,customers_produced:int,nb_produced:int,qty_produced:float} stats by role toconsume, consumed, toproduce, produced
*/
public $stats_mo = array();
+
+ /**
+ * @var array{}|array{nb_toproduce:int,nb_toconsume:int,qty_toproduce:float,qty_toconsume:float}
+ */
public $stats_bom = array();
+
+ /**
+ * @var array{}|array{customers:int,nb:int,rows:int,qty:float} stats mrp to consume
+ */
public $stats_mrptoconsume = array();
+
+ /**
+ * @var array{}|array{customers:int,nb:int,rows:int,qty:float} stats mrp to produce
+ */
public $stats_mrptoproduce = array();
+
+ /**
+ * @var array{}|array{customers:int,nb:int,rows:int,qty:float} stats facture rec
+ */
public $stats_facturerec = array();
+
+ /**
+ * @var array{}|array{suppliers:int,nb:int,rows:int,qty:float} stats supplier invoices
+ */
public $stats_facture_fournisseur = array();
/**
@@ -1137,10 +1157,10 @@ class Product extends CommonObject
if ($id > 0) {
$this->id = $id;
- $this->price = $price_ht;
- $this->price_ttc = $price_ttc;
- $this->price_min = $price_min_ht;
- $this->price_min_ttc = $price_min_ttc;
+ $this->price = $price_ht;
+ $this->price_ttc = $price_ttc;
+ $this->price_min = $price_min_ht;
+ $this->price_min_ttc = $price_min_ttc;
$result = $this->_log_price($user);
if ($result > 0) {
@@ -3079,7 +3099,7 @@ class Product extends CommonObject
$this->multiprices_min_ttc[$i] = $result ? $result["price_min_ttc"] : null;
$this->multiprices_base_type[$i] = $result ? $result["price_base_type"] : null;
// Next two fields are used only if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on
- $this->multiprices_tva_tx[$i] = $result ? $result["tva_tx"].($result ? ' ('.$result['default_vat_code'].')' : '') : null;
+ $this->multiprices_tva_tx[$i] = $result ? $result["tva_tx"].(!empty($result['default_vat_code']) ? ' ('.$result['default_vat_code'].')' : '') : null;
$this->multiprices_recuperableonly[$i] = $result ? $result["recuperableonly"] : null;
// Price by quantity
@@ -3909,36 +3929,36 @@ class Product extends CommonObject
$this->stats_mrptoconsume['customers'] = 0;
$this->stats_mrptoconsume['nb'] = 0;
$this->stats_mrptoconsume['rows'] = 0;
- $this->stats_mrptoconsume['qty'] = 0;
+ $this->stats_mrptoconsume['qty'] = 0.0;
$this->stats_mrptoproduce['customers'] = 0;
$this->stats_mrptoproduce['nb'] = 0;
$this->stats_mrptoproduce['rows'] = 0;
- $this->stats_mrptoproduce['qty'] = 0;
+ $this->stats_mrptoproduce['qty'] = 0.0;
}
$result = $this->db->query($sql);
if ($result) {
while ($obj = $this->db->fetch_object($result)) {
if ($obj->role == 'toconsume' && empty($warehouseid)) {
- $this->stats_mrptoconsume['customers'] += $obj->nb_customers;
- $this->stats_mrptoconsume['nb'] += $obj->nb;
- $this->stats_mrptoconsume['rows'] += $obj->nb_rows;
- $this->stats_mrptoconsume['qty'] += ($obj->qty ? $obj->qty : 0);
+ $this->stats_mrptoconsume['customers'] += (int) $obj->nb_customers;
+ $this->stats_mrptoconsume['nb'] += (int) $obj->nb;
+ $this->stats_mrptoconsume['rows'] += (int) $obj->nb_rows;
+ $this->stats_mrptoconsume['qty'] += ($obj->qty ? (float) $obj->qty : 0.0);
}
if ($obj->role == 'consumed' && empty($warehouseid)) {
//$this->stats_mrptoconsume['customers'] += $obj->nb_customers;
//$this->stats_mrptoconsume['nb'] += $obj->nb;
//$this->stats_mrptoconsume['rows'] += $obj->nb_rows;
- $this->stats_mrptoconsume['qty'] -= ($obj->qty ? $obj->qty : 0);
+ $this->stats_mrptoconsume['qty'] -= ($obj->qty ? (float) $obj->qty : 0.0);
}
if ($obj->role == 'toproduce') {
if ($warehouseid) {
- $this->stock_warehouse[$warehouseid]->stats_mrptoproduce['qty'] += ($obj->qty ? $obj->qty : 0);
+ $this->stock_warehouse[$warehouseid]->stats_mrptoproduce['qty'] += ($obj->qty ? (float) $obj->qty : 0.0);
} else {
- $this->stats_mrptoproduce['customers'] += $obj->nb_customers;
- $this->stats_mrptoproduce['nb'] += $obj->nb;
- $this->stats_mrptoproduce['rows'] += $obj->nb_rows;
- $this->stats_mrptoproduce['qty'] += ($obj->qty ? $obj->qty : 0);
+ $this->stats_mrptoproduce['customers'] += (int) $obj->nb_customers;
+ $this->stats_mrptoproduce['nb'] += (int) $obj->nb;
+ $this->stats_mrptoproduce['rows'] += (int) $obj->nb_rows;
+ $this->stats_mrptoproduce['qty'] += ($obj->qty ? (float) $obj->qty : 0.0);
}
}
if ($obj->role == 'produced') {
@@ -4164,10 +4184,10 @@ class Product extends CommonObject
$result = $this->db->query($sql);
if ($result) {
$obj = $this->db->fetch_object($result);
- $this->stats_facturerec['customers'] = $obj->nb_customers;
- $this->stats_facturerec['nb'] = $obj->nb;
- $this->stats_facturerec['rows'] = $obj->nb_rows;
- $this->stats_facturerec['qty'] = $obj->qty ? $obj->qty : 0;
+ $this->stats_facturerec['customers'] = (int) $obj->nb_customers;
+ $this->stats_facturerec['nb'] = (int) $obj->nb;
+ $this->stats_facturerec['rows'] = (int) $obj->nb_rows;
+ $this->stats_facturerec['qty'] = $obj->qty ? (float) $obj->qty : 0.0;
// if it's a virtual product, maybe it is in invoice by extension
if (getDolGlobalString('PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC')) {
@@ -4238,10 +4258,10 @@ class Product extends CommonObject
$result = $this->db->query($sql);
if ($result) {
$obj = $this->db->fetch_object($result);
- $this->stats_facture_fournisseur['suppliers'] = $obj->nb_suppliers;
- $this->stats_facture_fournisseur['nb'] = $obj->nb;
- $this->stats_facture_fournisseur['rows'] = $obj->nb_rows;
- $this->stats_facture_fournisseur['qty'] = $obj->qty ? $obj->qty : 0;
+ $this->stats_facture_fournisseur['suppliers'] = (int) $obj->nb_suppliers;
+ $this->stats_facture_fournisseur['nb'] = (int) $obj->nb;
+ $this->stats_facture_fournisseur['rows'] = (int) $obj->nb_rows;
+ $this->stats_facture_fournisseur['qty'] = $obj->qty ? (float) $obj->qty : 0.0;
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('loadStatsSupplierInvoice', $parameters, $this, $action);
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 6df3685b01a..7d41c983205 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -448,6 +448,7 @@ $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
llxHeader("", $title, $help_url, '', 0, 0, '', '', '', 'mod-project page-card_tasks');
$arrayofselected = is_array($toselect) ? $toselect : array();
+$param = '';
if ($id > 0 || !empty($ref)) {
$result = $object->fetch($id, $ref);
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index 54af1723370..3ad6cbb59fa 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -231,6 +231,12 @@ $ref = $REF = GETPOST('ref', 'alpha');
$TAG = GETPOST("tag", 'alpha');
$FULLTAG = GETPOST("fulltag", 'alpha'); // fulltag is tag with more information
$SECUREKEY = GETPOST("securekey"); // Secure key
+$PAYPAL_API_OK = "";
+$PAYPAL_API_KO = "";
+$PAYPAL_API_SANDBOX = "";
+$PAYPAL_API_USER = "";
+$PAYPAL_API_PASSWORD = "";
+$PAYPAL_API_SIGNATURE = "";
if ($paymentmethod && !preg_match('/'.preg_quote('PM='.$paymentmethod, '/').'/', $FULLTAG)) {
$FULLTAG .= ($FULLTAG ? '.' : '').'PM='.$paymentmethod;
@@ -286,6 +292,7 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last &
';
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypal')) {
+ global $PAYPAL_API_SANDBOX, $PAYPAL_API_OK, $PAYPAL_API_KO, $PAYPAL_API_USER, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE;
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php';
diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php
index f99deda6845..a8ae18fb64d 100644
--- a/htdocs/public/payment/paymentko.php
+++ b/htdocs/public/payment/paymentko.php
@@ -71,7 +71,8 @@ if (isModEnabled('paypal')) {
*/
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe"));
-
+$PAYPALTOKEN = "";
+$PAYPALPAYERID = "";
if (isModEnabled('paypal')) {
$PAYPALTOKEN = GETPOST('TOKEN');
if (empty($PAYPALTOKEN)) {
diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php
index 8fa92e88b89..2abb3b01311 100644
--- a/htdocs/public/payment/paymentok.php
+++ b/htdocs/public/payment/paymentok.php
@@ -77,23 +77,17 @@ $hookmanager->initHooks(array('newpayment'));
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe"));
// Clean parameters
+$PAYPAL_API_USER = "";
+$PAYPAL_API_PASSWORD = "";
+$PAYPAL_API_SIGNATURE = "";
+$PAYPAL_API_SANDBOX = "";
+$PAYPALTOKEN = "";
+$PAYPALPAYERID = "";
if (isModEnabled('paypal')) {
- $PAYPAL_API_USER = "";
- if (getDolGlobalString('PAYPAL_API_USER')) {
- $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
- }
- $PAYPAL_API_PASSWORD = "";
- if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
- $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
- }
- $PAYPAL_API_SIGNATURE = "";
- if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
- $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
- }
- $PAYPAL_API_SANDBOX = "";
- if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
- $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
- }
+ $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
+ $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
+ $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
+ $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
/*$PAYPAL_API_OK = "";
if ($urlok) {
$PAYPAL_API_OK = $urlok;
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 15558ad11d7..88adc86552b 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -4695,12 +4695,11 @@ table.hidepaginationnext .paginationnext {
}
-
/* Set the color for hover lines */
-.oddeven:hover, .evenodd:hover, .oddevenimport:hover, .evenoddimport:hover, .impair:hover, .pair:hover
-{
+.oddeven:hover:not(.nohover), .evenodd:hover:not(.nohover), .oddevenimport:hover:not(.nohover), .evenoddimport:hover:not(.nohover), .impair:hover:not(.nohover), .pair:hover:not(.nohover) {
background: var(--colorbacklinepairhover) !important; /* Must be background to be stronger than background of odd or even */
}
+
.tredited, .tredited td {
background: var(--colorbacklinepairchecked) !important; /* Must be background to be stronger than background of odd or even */
border-bottom: 0 !important;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index fcdc79aeb95..8dbb46a008d 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -4761,7 +4761,6 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
/* Set the color for hover lines */
-
.tmenucompanylogo.nohover, .tmenucompanylogo.nohover:hover {
opacity: unset !important;
}
@@ -4770,11 +4769,11 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
box-shadow: unset;
-webkit-box-shadow: unset;
}
-
-.oddeven:hover, .evenodd:hover, .oddevenimport:hover, .evenoddimport:hover, .impair:hover, .pair:hover
+.oddeven:hover:not(.nohover), .evenodd:hover:not(.nohover), .oddevenimport:hover:not(.nohover), .evenoddimport:hover:not(.nohover), .impair:hover:not(.nohover), .pair:hover:not(.nohover) {
{
background: rgb() !important;
}
+
.tredited {
background: rgb() !important; /* Must be background to be stronger than background of odd or even */
}