diff --git a/ChangeLog b/ChangeLog
index 2996e26f862..dd2fc646f7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -152,6 +152,52 @@ Dolibarr better:
- The trigger that activate or close a contract line is run on a contract line, not on contract.
+***** ChangeLog for 4.0.3 to 4.0.2 *****
+FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
+FIX: #5958 no discount on supplier command made by replenishment
+FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
+FIX: #5972 #5734
+FIX: #6007
+FIX: #6010
+FIX: #6029
+FIX: #6043 - Payment mode not visible on supplier invoice list
+FIX: #6051
+FIX: #6062
+FIX: #6088
+FIX: A draft can be deleted by a user with create permission.
+FIX: bad permission to see contract on home page
+FIX: bad permission to see contract statistics
+FIX: Bcc must not appears to recipient when using SMTPs lib
+FIX: Consistent description for add or edit product
+FIX: delete contract extrafields on contract deletion
+FIX: Deposits and credit notes weren't added in the received and pending columns
+FIX: export extrafields must not include separe type
+FIX: Export of opportunity status must be code, not id.
+FIX: False positive on services not activated
+FIX: Filter was wrong or lost during navigation
+FIX: HT and TTC price should always be displayed together
+FIX: if a supplier price reference is changed after creating an order, we can't clone order.
+FIX: in export. Error when using a separate extrafields.
+FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
+FIX: javascript error when using on mobile/smartphone
+FIX: javascript xss injection and a translation
+FIX: Label of project is in field title not label.
+FIX: List of people able to validate an expense report was not complete.
+FIX: Missing field
+FIX: Module gravatar was not triggered on thirdparty and contact card
+FIX: Must use external link into a forged email content.
+FIX: Pb in management of date end of projects
+FIX: Regression when deleting product
+FIX: rendering of output of estimated amount on project overview page.
+FIX: Sanitize title of ajax_dialog
+FIX: Security to restrict email sending was not efficient
+FIX: Setting supplier as client when accept a supplier proposal
+FIX: Some statistics not compatible with multicompany module.
+FIX: the time spent on project was not visible in its overwiew
+FIX: Update intervention lline crash with PgSQL
+FIX: wrong test on dict.php
+FIX: wrong var name
+
***** ChangeLog for 4.0.2 compared to 4.0.1 *****
FIX: #5340
FIX: #5779
diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php
index 268b5fa69c2..524326e320c 100644
--- a/htdocs/accountancy/class/accountancyexport.class.php
+++ b/htdocs/accountancy/class/accountancyexport.class.php
@@ -357,7 +357,7 @@ class AccountancyExport
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20);
$Tab['sens'] = $data->sens; // C or D
$Tab['signe_montant'] = '+';
- $Tab['montant'] = str_pad(abs($data->montant) * 100, 12, '0', STR_PAD_LEFT); // TODO manage negative amount
+ $Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount
$Tab['contrepartie'] = str_repeat(' ', 8);
if (! empty($data->date_echeance))
$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php
index 7c34498e6b4..c37c61ca88c 100644
--- a/htdocs/comm/mailing/card.php
+++ b/htdocs/comm/mailing/card.php
@@ -756,8 +756,9 @@ else
$sendingmode=$conf->global->MAIN_MAIL_SENDMODE;
if (empty($sendingmode)) $sendingmode='mail'; // If not defined, we use php mail function
- // MAILING_NO_USING_PHPMAIL may be defined or not
- // MAILING_LIMIT_SENDBYWEB is always defined to something != 0, MAILING_LIMIT_SENDBYCLI may be defined ot not.
+ // MAILING_NO_USING_PHPMAIL may be defined or not.
+ // MAILING_LIMIT_SENDBYWEB is always defined to something != 0 (-1=forbidden).
+ // MAILING_LIMIT_SENDBYCLI may be defined ot not (-1=forbidden, 0=no limit).
if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail')
{
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
@@ -797,7 +798,7 @@ else
}
$text.=$langs->trans('ConfirmSendingEmailing').'
';
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
- print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270);
+ print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,300);
}
}
@@ -844,23 +845,28 @@ else
print $langs->trans("TotalNbOfDistinctRecipients");
print '
| '; @@ -1028,10 +1030,10 @@ if ($resql) if (! empty($arrayfields['dynamount_payed']['checked'])) { - print ' | '.(! empty($paiement)?price($paiement,0,$langs):' ').' | '; // TODO Use a denormalized field + print ''.(! empty($totalpay)?price($totalpay,0,$langs):' ').' | '; // TODO Use a denormalized field if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalamfield']=$totalarray['nbfield']; - $totalarray['totalam'] += $paiement; + $totalarray['totalam'] += $totalpay; } if (! empty($arrayfields['rtp']['checked'])) diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index c03e41b386c..89e1458d4fd 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -250,11 +250,16 @@ $dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore'; $dolibarr_nocsrfcheck='0'; // dolibarr_mailing_limit_sendbyweb -// Can set a limit for mailing send by web. Can be used for a restricted mode. -// Default value: 0 (use database value if exist) -// Examples: -// $dolibarr_mailing_limit_sendbyweb='0'; +// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level. +// Default value: '25' +// Examples: '-1' (sending by web is forbidden) +// $dolibarr_mailing_limit_sendbyweb='25'; +// dolibarr_mailing_limit_sendbycli +// Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level. +// Default value: '0' (no hard limit, use soft database value if exists) +// Examples: '-1' (sending by cli is forbidden) +// $dolibarr_mailing_limit_sendbycli='0'; //################## @@ -273,18 +278,6 @@ $dolibarr_nocsrfcheck='0'; // Examples: // $dolibarr_main_limit_users='0'; -// dolibarr_mailing_limit_sendbyweb -// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level. -// Default value: '0' (no overwrite, use database value if exists) -// Examples: '-1' (sending by web is forbidden) -// $dolibarr_mailing_limit_sendbyweb='0'; - -// dolibarr_mailing_limit_sendbycli -// Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level. -// Default value: '0' (no overwrite, use database value if exists) -// Examples: '-1' (sending by cli is forbidden) -// $dolibarr_mailing_limit_sendbycli='0'; - // dolibarr_strict_mode // Set this to 1 to enable the PHP strict mode. For dev environment only. // Default value: 0 (use database value if exist) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 4ba153ad5da..9e11001745c 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -488,28 +488,35 @@ class CMailFile // Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10; - $tmparray = explode(',', $this->addr_to); - if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) + $tmparray1 = explode(',', $this->addr_to); + if (count($tmparray1) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL) { $this->error = 'Too much recipients in to:'; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - $tmparray = explode(',', $this->addr_cc); - if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) + $tmparray2 = explode(',', $this->addr_cc); + if (count($tmparray2) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL) { $this->error = 'Too much recipients in cc:'; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - $tmparray = explode(',', $this->addr_bcc); - if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) + $tmparray3 = explode(',', $this->addr_bcc); + if (count($tmparray3) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL) { $this->error = 'Too much recipients in bcc:'; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - + if ((count($tmparray1)+count($tmparray2)+count($tmparray3)) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) + { + $this->error = 'Too much recipients in to:, cc:, bcc:'; + dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); + return false; + } + + // Action according to choosed sending method if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') { diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 6b14a6c99fa..b1c674ef5ca 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -129,6 +129,7 @@ class pdf_einstein extends ModelePDFCommandes $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 1701f82c47b..cd864e0d766 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -135,12 +135,14 @@ class pdf_crabe extends ModelePDFFactures $this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images if ($this->page_largeur < 210) // To work with US executive format { - $this->posxpicture-=20; - $this->posxtva-=20; - $this->posxup-=20; - $this->posxqty-=20; - $this->posxdiscount-=20; - $this->postotalht-=20; + $this->posxpicture-=20; + $this->posxtva-=20; + $this->posxup-=20; + $this->posxqty-=20; + $this->posxunit-=20; + $this->posxdiscount-=20; + $this->posxprogress-=20; + $this->postotalht-=20; } $this->tva=array(); @@ -297,7 +299,7 @@ class pdf_crabe extends ModelePDFFactures $this->atleastonediscount++; } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) + if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) // retreive space not used by discount { $this->posxpicture+=($this->postotalht - $this->posxdiscount); $this->posxtva+=($this->postotalht - $this->posxdiscount); @@ -527,9 +529,9 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($this->posxprogress-$this->posxdiscount+2, 3, $remise_percent, 0, 'R'); } + // Situation progress if ($this->situationinvoice) { - // Situation progress $progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxprogress, $curY); $pdf->MultiCell($this->postotalht-$this->posxprogress, 3, $progress, 0, 'R'); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 9aa1ca994ef..c5b546bd72f 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -127,6 +127,7 @@ class pdf_azur extends ModelePDFPropales $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index c5f68df95c1..01d5da92d50 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -113,6 +113,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index e76da5abef3..9a5132a8bea 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -127,6 +127,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 953b1a46206..e73e7f0f1c6 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -115,6 +115,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/langs/eu_ES/mails.lang b/htdocs/langs/eu_ES/mails.lang index 1d3552bb262..fa189fd4bf3 100644 --- a/htdocs/langs/eu_ES/mails.lang +++ b/htdocs/langs/eu_ES/mails.lang @@ -27,7 +27,7 @@ DeleteAMailing=Delete an emailing PreviewMailing=Preview emailing CreateMailing=Create emailing TestMailing=Test email -ValidMailing=Valid emailing +ValidMailing=Validate emailing MailingStatusDraft=Draft MailingStatusValidated=Validated MailingStatusSent=Sent