diff --git a/ChangeLog b/ChangeLog
index c425872e9c2..cb4ad0c3982 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,115 @@ Following changes may create regressions for some external modules, but were nec
* Removed the method liste_array() of project class. It was not used by core code.
+
+***** ChangeLog for 10.0.1 compared to 10.0.0 *****
+FIX: #10930
+FIX: #10984
+FIX: reposition on "Build backup" button
+FIX: #11400
+FIX: #11412
+FIX: #11460
+FIX: #11463
+FIX: #11466
+FIX: #11492
+FIX: #11498
+FIX: #11505
+FIX: #11506
+FIX: #11507
+FIX: #11509
+FIX: #11537
+FIX: #11543
+FIX: #11553
+FIX: #11576
+FIX: #11584
+FIX: #11590
+FIX: accounting mode must be taken from global conf, because there's no way to choose a mode with interface
+FIX: Add message from public interface
+FIX: add missing hook calls
+FIX: Add warning when setup is strange
+FIX: ajax call for line positioning when CSRFCHECK_WITH_TOKEN is on
+FIX: API return 404 sometimes even if API exists
+FIX: Attachment was lost when we validate an expense report
+FIX: avoid conflict with "$classname" in card.php
+FIX: Bad sql request
+FIX: better compatibility with multicompany transverse mode
+FIX: Better PHP compatibility
+FIX: Block to link with tickets
+FIX: Can't submit a ticket from public interface
+FIX: categories import: prevent mismatch between category type and object type
+FIX: Closing ticket from public interface
+FIX: Column 'paid' missing in expense report
+FIX: compatibility mysql 8. rank is reserved
+FIX: Computed field were not calculated into lists.
+FIX: Content of email for subscription
+FIX: correct error in files with multiple spaces
+FIX: CVE-2019-11199
+FIX: delete of links between objects
+FIX: div not balanced
+FIX: do not return formatted prices in json string
+FIX: duplicate on the check (TODO field $onetrtd not used ?)
+FIX: element name in update_price
+FIX: empty product_use_units in product configuration
+FIX: expedition card: infinite loop for printObjectLine hook if return > 0
+FIX: extrafield loading bug due to assumption that an object is a third party while it may be a contact if MAIN_USE_COMPANY_NAME_OF_CONTACT is set.
+FIX: Fatal error on dol_htmloutput_mesg with corrupted array
+FIX: Fatal situation if payment removed on expense report. Action
+FIX: FEC Format - Missing date_creation in general ledger when you add a new transaction
+FIX: FEC Format - Save translation of the journal label in database & nowrap on amount
+FIX: floating point precision errors in the triggers of the workflow module
+FIX: for #11232
+FIX: format of field with type timestamp
+FIX: fournrprice log for insert
+FIX: help text
+FIX: import filter error
+FIX: __INFOS__ tag not exists
+FIX: issue #9300: install error with PostgreSQL when using custom table prefix
+FIX: Language key
+FIX: Limit of uploaded files (max_post_size was not used)
+FIX: list of balance of leaves
+FIX: minor spelling issues
+FIX: missing "dropdown-icon" replacement
+FIX: Missing field "Conciliated" into bank transaction export
+FIX: missing filter by current contact
+FIX: missing token
+FIX: Missing where on entity
+FIX: move sql request in INNER JOIN
+FIX: name was able to be in field but went back to new line
+FIX: Nowrap on amount
+FIX: Online payment
+FIX: on shipment delete confirm dialog, a new checkbox allows the user to choose if they want their stock re-incremented after the deletion.
+FIX: option EXPORT_LABEL_FOR_SELECT to restore compatibility in export
+FIX: Option THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION
+FIX: outdated phpdoc
+FIX: Permission for BOM menu
+FIX: permission to delete a draft purchase order
+FIX: phpcs
+FIX: Position was lost when we edit the line of template invoice
+FIX: product_use_units was set to 0 each time a conf in block other was set
+FIX: propal createFrom hook: undefined parameter attached
+FIX: Responsive of public interface of ticket
+FIX: search by phone pro
+FIX: Setup of TakePos was not possible after a clean install
+FIX: Show list of events on tickets
+FIX: socpeople assigned list in action com list
+FIX: SQL problem on donation & nowrap on amount
+FIX: stock increase on shipment deletion if STOCK_CALCULATE_ON_SHIPMENT_NEW: is set
+FIX: stripe webhook ID constant set
+FIX: summary of time spent in preview tab of projects
+FIX: the feature to bill time spent was not enabled.
+FIX: The new feature to attach document on lines was not correclty
+FIX: The proposed new supplier code does not work
+FIX: this function can not be private
+FIX: tk9877 - PDF rouget requires product.lib.php (otherwise measuring_units_string() is not defined)
+FIX: Update the file index table when we validate/rename a ref.
+FIX: use rounding to compare the amounts
+FIX: We must save code instead of value in database for template invoice modelpdf
+FIX: we need to be able to add freeline with qty between 0 & 1 in supplierorder line
+FIX: We should remove property comments only for project and task api.
+FIX: When saving an action it didn't save the label based on the type of event if the label is empty and the type is customized
+FIX: when STOCK_CALCULATE_ON_SHIPMENT_NEW: is set, deleting a "closed" shipment now increases stock as expected
+FIX: wrong path sociales/index.php doesnt exist anymore
+
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
For Users:
NEW: Module "Ticket" is available as a stable module.
diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php
index f4a7084b336..48d6bf5b903 100644
--- a/htdocs/api/class/api_documents.class.php
+++ b/htdocs/api/class/api_documents.class.php
@@ -368,7 +368,7 @@ class Documents extends DolibarrApi
throw new RestException(404, 'Product not found');
}
- $upload_dir = $conf->product->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'product');
+ $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref);
}
elseif ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event')
{
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index 07cfc9d4a14..1dff7d5050b 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -1227,7 +1227,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @param string $titlekey Translation key to show as title of document
- * @return void
+ * @return int Return topshift value
*/
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle")
{
diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php
index 2adec21a865..b6c7fe6d78f 100644
--- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php
@@ -67,13 +67,13 @@ class pdf_proforma extends pdf_einstein
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @param string $titlekey Translation key to show as title of document
- * @return void
+ * @return int Return topshift value
*/
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma")
{
// phpcs:enable
global $conf,$langs,$hookmanager;
- parent::_pagehead($pdf, $object, $showaddress, $outputlangs, $titlekey);
+ return parent::_pagehead($pdf, $object, $showaddress, $outputlangs, $titlekey);
}
}
diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
index 5fd43a69a37..5fe00b80346 100644
--- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
+++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
@@ -130,7 +130,8 @@ class InterfaceWorkflowManager extends DolibarrTriggers
if ($action == 'BILL_VALIDATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
-
+ $ret = 0;
+
// First classify billed the order to allow the proposal classify process
if (! empty($conf->commande->enabled) && ! empty($conf->workflow->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER))
{
@@ -151,7 +152,6 @@ class InterfaceWorkflowManager extends DolibarrTriggers
}
}
}
- return $ret;
}
// Second classify billed the proposal.
@@ -174,8 +174,9 @@ class InterfaceWorkflowManager extends DolibarrTriggers
}
}
}
- return $ret;
}
+
+ return $ret;
}
// classify billed order & billed propososal
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index c7cb9776aeb..07318bc0571 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -1024,6 +1024,34 @@ if (empty($reshook))
}
}
+ if ($action == 'set_unpaid' && $id > 0 && $user->rights->expensereport->to_paid)
+ {
+ $object = new ExpenseReport($db);
+ $object->fetch($id);
+
+ $result = $object->set_unpaid($user);
+
+ if ($result > 0)
+ {
+ // Define output language
+ if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
+ {
+ $outputlangs = $langs;
+ $newlang = '';
+ if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
+ if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
+ if (! empty($newlang)) {
+ $outputlangs = new Translate("", $conf);
+ $outputlangs->setDefaultLang($newlang);
+ }
+ $model=$object->modelpdf;
+ $ret = $object->fetch($id); // Reload to get new records
+
+ $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
+ }
+ }
+ }
+
if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
{
$object = new ExpenseReport($db);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 48d4d898de6..f07ff068e17 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -400,6 +400,7 @@ OldVATRates=Old VAT rate
NewVATRates=New VAT rate
PriceBaseTypeToChange=Modify on prices with base reference value defined on
MassConvert=Launch bulk conversion
+PriceFormatInCurrentLanguage=Price Format In Current Language
String=String
TextLong=Long text
HtmlText=Html text
diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php
index 45a851b43a5..9109247d462 100644
--- a/htdocs/livraison/card.php
+++ b/htdocs/livraison/card.php
@@ -568,7 +568,7 @@ else
}
// Other attributes
- if ($action = 'create_delivery') {
+ if ($action == 'create_delivery') {
// copy from expedition
$expeditionExtrafields = new Extrafields($db);
$expeditionExtrafieldLabels = $expeditionExtrafields->fetch_name_optionals_label($expedition->table_element);
@@ -681,7 +681,7 @@ else
$mode = ($object->statut == 0) ? 'edit' : 'view';
$line = new LivraisonLigne($db);
$line->fetch_optionals($object->lines[$i]->id);
- if ($action = 'create_delivery') {
+ if ($action == 'create_delivery') {
$srcLine = new ExpeditionLigne($db);
$expeditionLineExtrafields = new Extrafields($db);
$expeditionLineExtrafieldLabels = $expeditionLineExtrafields->fetch_name_optionals_label($srcLine->table_element);
diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php
index a7e45d488e1..83e5936f092 100644
--- a/htdocs/product/admin/product.php
+++ b/htdocs/product/admin/product.php
@@ -556,7 +556,14 @@ if (! empty($conf->fournisseur->enabled)) $rowspan++;
print '