diff --git a/ChangeLog b/ChangeLog
index b1e050e14e1..eae34c792a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,221 @@ English Dolibarr ChangeLog
For users:
NEW: Add module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files.
NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable.
+NEW: Several security issues after a private bug bounty campaign.
+NEW: #15065 Fix formatting
+NEW: #15065 Put the product label in bold in the PDF templates if configured
+NEW: Accountancy - Add chart of sub accounts
+NEW: Accountancy - Add options to disable binding on sales, purchases & expense reports independently of the modules
+NEW: Accountancy balance - Add a input to show subtotal by group
+NEW: Accountancy - Move to real ledger, real journals, menu disposition
+NEW: Accountancy - On transfers, select the periodicity by default
+NEW: Add 2 rules for emailcollector: Message send/not sent from Dolibarr
+NEW: Add a counter of number of words of pages in website module
+NEW: add alert before change thirdparty in takepos
+NEW: Add a page to list Stock at a given date.
+NEW: Add a start date to begin binding in accountancy
+NEW: Add a stat page to list popularity of products on invoices
+NEW: Add calendar selection for agenda view
+NEW: add class for ticket edition (pdf or odt)
+NEW: Add column payment term into list of supplier invoices.
+NEW: Add column quantity in product margin page
+NEW: Add column vat rate in page to define accounting account on product/service
+NEW: Add common list function for available app/module page
+NEW: add costprice in fields of products list
+NEW: ADDED IMPORT TOOL FOR CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE
+NEW: Added incoterms to substitution array
+NEW: Add employee in expense report binding page
+NEW: Add export for various payment
+NEW: add extra fields labels and values in mail on create ticket
+NEW: Add extrafields support on ECM module
+NEW: Add filter rules "is answer" and "is not answer" in email collector
+NEW: Add focus when editing on product/stock/product.php Close #14548
+NEW: add formConfirm hook on product page
+NEW: add free text on each terminal of cash desk
+NEW: Add function dolButtonToOpenUrlInDialogPopup() to be able to open
+NEW: Add global search for customer payments and vendor payments
+NEW: Add global search for miscellaneous payments
+NEW: Add helper function for table headers with numbers
+NEW: add hooks on stats pages
+NEW: Add link to edit property from search result of website pages
+NEW: Add link to reset qty on supplier dispatch page
+NEW: add MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const to remove header in email collector
+NEW: Add Manufacturing Orders into the automatic ECM
+NEW: add margin info in invoice list
+NEW: Add mass action to set category on a list of website pages.
+NEW: Add mass deletion for events
+NEW: Add __MEMBER_TYPE__ substitution key
+NEW: Add message in error_log after detection of SQL or script injection
+NEW: Add module Credit transfer SEPA to manage payment of supplier using
+NEW: Add more filters on monthly statement list
+NEW: Add option TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT
+NEW: Add option to define a default warehouse at user level
+NEW: Add option to include products without alert in replenish
+NEW: add order by lastname and firstname by default in get sales representatives
+NEW: Add param to not show links when output tags
+NEW: Add PDF document templates for warehouses (list of stock)
+NEW: Add property cssview when declaring fields of an object
+NEW: Add prospect status managment for the contact with managment of custom icon
+NEW: Add public note on products. This also partially fix the #14342
+NEW: Add quick dropdown menu in top right menu (MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN)
+NEW: add region in export companies and contacts
+NEW: add rights on margin info on invoice list
+NEW: Add search param for close date on order list
+NEW: add send context for ticket
+NEW: Add show preview for mail attachement on form mail
+NEW: add state origin for product
+NEW: add State/Province origin for products
+NEW: Add the workflow interaction close intervention on closing ticket
+NEW: Add third order printer to TakePOS
+NEW: add tracking number in list and search_all items
+NEW: add two hooks printFieldListFrom and printFieldSearchParam
+NEW: Add __TYPE__ substitution key
+NEW: Add validation of MX domain for emails
+NEW: add vcard for aderent and user
+NEW: add week number for month view in agenda
+NEW: Algeria data (tva and forme_juridique)
+NEW: Allow click on all header numbers on commerce area
+NEW: Allow to reopen interventions (green button)
+NEW: Allow zero quality on supplier/vendor order line
+NEW: Appearance tab in TakePOS with more visual parameters
+NEW: Better currency rate editor
+NEW: Calculate the virtual stock in transverse mode ( not on getEntity('commande'), ... but on getEntity('stock') )
+NEW: Can add event to log into blockedlog module with a constant.
+NEW: Can build vendor invoice from vendor orders
+NEW: Can change a product in line of recurring invoice or contract
+NEW: Can change size of logo on PDF documents
+NEW: Can change VAT rate of all lines of a draft object in one step.
+NEW: Can define date range of validity of a login during creation
+NEW: Can disable, from edit page, the whole web site
+NEW: can edit and set sales representatives directly on thirdparty card
+NEW: Can edit the list of sending email profiles.
+NEW: Can enable/disable users in bulk actions
+NEW: Can filter on accounting system ref in export of chart of account
+NEW: Can filter on container type, language and tags in the list of pages
+NEW: Can force the antivirus from conf file or autoprepend ini setup.
+NEW: Can hide eatby, sellby dates with option PRODUCT_DISABLE_SELLBY and PRODUCT_DISABLE_EATBY
+NEW: Can import proposals, sales orders, supplier invoices
+NEW: can set a dedicated SMTP config for sending email from public ticket interface
+NEW: Can set tags/categories to website pages.
+NEW: Can set type of price without tax per default for new sale price creation
+NEW: Can use desired stock of a given warehouse for replenishment
+NEW: Can use THEME_DARKMODEENABLED=2 for a preview of theme in dark mode
+NEW: change thirdparty with barcode scan in takepos
+NEW: Common behavior for monthly leave list view
+NEW: conf to allow show full arbo in warehouse getnomurl
+NEW: convert all subscription in datetime
+NEW: create thirdparty customer from TAKEPOS
+NEW: Date shipment from order accepts hours
+NEW: Declinaison price level compatibility
+NEW: Delayed payment in TakePOS
+NEW: Development of module Recruitment
+NEW: display date range if exist in takepos
+NEW: display resiliate status in takepos for member
+NEW: display stat for BOM on "object referent"/linked Object product tab
+NEW: edit and update a ticket
+NEW: edit or delete dispatched lines
+NEW: Email configuration - Allow auto signed certificat when smtp ssl activated
+NEW: enable free emails input with select2
+NEW: endpoint getContacts and Clean results
+NEW: Events in agenda for contact
+NEW: Field to link website page to an other object
+NEW: Fill ECM src object fields in dol_add_file_process
+NEW: filter on progress column in task list
+NEW: filter product list by country and/or state/province
+NEW: format tickets sent by mail in public interface
+NEW: add juridical status for Algeria
+NEW: form to add customer/supplier into categories
+NEW: Framework is ready for CSRF token protection on explicit GET URLs.
+NEW: get all child recursively
+NEW: Get contacts list of a given order
+NEW: helper functions for export with phpspreadsheet
+NEW: hide closed contract lines
+NEW: hide label in pdf for variants
+NEW: Hook on propal card
+NEW: If specific help page is available, we change color of icon
+NEW: Include the tag editor of page as a popup into website editor
+NEW: Introduce constant FACTUREFOURN_REUSE_NOTES_ON_CREATE_FROM
+NEW: Introducing new modal boxes in TakePOS
+NEW: Keep takepos terminal when login/logout
+NEW: Link on balance to the ledger
+NEW: MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const in email collector
+NEW: manage errors on update extra fields in ticket card
+NEW: mass-actions for the event list view
+NEW: Module Intracomm report
+NEW: More filter for "View change logs"
+NEW: multicurrency total in takepos
+NEW: multiselect type and date to date filter
+NEW: Nature of product is now a dictionay
+NEW: new line template: hidden conf to fill service dates from the last service line
+NEW: PDF model storm for delivery
+NEW: possibilty to group payments by mode and show their subtotal
+NEW: Print payment method and change in TakePOS
+NEW: Priority and transparency from external calendar events
+NEW: Products Import/Export 'default warehouse' and 'use batch number' fields
+NEW: Purchase price table: Added filterable table columns
+NEW: rate editor for multicurrency
+NEW: ref_ext field for Commande lines, order lines, Attributes and Combinations, Invoice lines, payments, order lines
+NEW: remove new lines in mail on add ticket message
+NEW: restrict thirdparty to customer in takepos
+NEW: Allow to edit "demand reason" field though API
+NEW: Rule "email to" accept wildcard *
+NEW: Save filter of the project homepage
+NEW: Select-able columns on customer invoice paymnet list
+NEW: Select-able columns on miscellaneous payments + more data columns
+NEW: Select-able columns on social taxes list
+NEW: Select-able columns on supplier invoice payment list
+NEW: send context and remove new lines on create ticket
+NEW: set entity when creating invoice on takepos
+NEW: Show available stock in TakePOS
+NEW: Show category filter on lists only when user have rights to read categories
+NEW: Show header number and make it clickable in warehouse arean, payment area, shipment area
+NEW: Show image of user in the combo select of users
+NEW: Show label on batch card
+NEW: Show line number on intervention card (via MAIN_VIEW_LINE_NUMBER)
+NEW: show links for select and multi-select in category extra field
+NEW: Show module and permission ids on user/group rights (only admin)
+NEW: Show place from events on import calender
+NEW: Show references in contract form on interventions
+NEW: Show tags and status in search list of website pages
+NEW: Show user on external calender events (when found)
+NEW: subject title with company name instead of application title in ticket message
+NEW: Support for Samba4 AD
+NEW: TakePOS connector compatibility with RECEIPT PRINTERS module
+NEW: TakePOS Gift Receipt
+NEW: TakePOS Multicurrency compatibility
+NEW: The global header of a website can also have dynamic content
+NEW: Third-Party Import new fields: mother company,outstanding debt limit,bank account,incoterms
+NEW: Thirdparty module : box on customer/supplier tab for invoice outsantding amount late
+NEW: ticket classification on create from email collector
+NEW: Ticket message notifications when edited from public interface
+NEW: translate classification labels in ticket
+NEW: triggers create, modify, delete
+NEW: VAT for Algeria
+NEW: Use preselect third-party from list on new card
+NEW: Vat report - Invert constant to show by default zero vat in reports
+NEW: website page fields selection
+NEW: Weighing Scale compatibility with TakePOS connector
+NEW: When creating a user from a member linked to a thirdparty, you can choose to create if as external or internal user
+NEW: Add clone functionality on miscellaneous payment
+For developers:
+NEW: Can use dynamic code into the 'enabled' property of DAO fields
+NEW: API Can update a payment
+NEW: api get member by thirdparty
+NEW: API get thirdparty by barcode
+NEW: API get users by email / login
+NEW: fetch contact by email with REST API
+NEW: field ref_ext in llx_commandedet
+NEW: fields ref_ext for Attributes and Combinations
+NEW: get state by REST API
+NEW: get state dictionnary by REST API
+NEW: Improve Product API for variant products
+NEW: Oauth SCOPE for Admin SDK
+NEW: Retrieve discount from invoice from API
+NEW: standardizes API thirdparties by email like other object
+NEW: thirdparty REST API: endpoint to set price level
+NEW: Use new category API for project list view
+NEW: Triggers Attributes and Attributes values
WARNING:
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 94f817114aa..401a2fdd37a 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -971,6 +971,7 @@ if (empty($reshook))
elseif ($action == 'add' && $usercancreate)
{
if ($socid > 0) $object->socid = GETPOST('socid', 'int');
+ $selectedLines = GETPOST('toselect', 'array');
$db->begin();
@@ -1571,8 +1572,11 @@ if (empty($reshook))
$fk_parent_line = 0;
$num = count($lines);
+
for ($i = 0; $i < $num; $i++)
{
+ if (!in_array($lines[$i]->id, $selectedLines)) continue; // Skip unselected lines
+
// Don't add lines with qty 0 when coming from a shipment including all order lines
if ($srcobject->element == 'shipping' && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS && $lines[$i]->qty == 0) continue;
// Don't add closed lines when coming from a contract (Set constant to '0,5' to exclude also inactive lines)
@@ -3623,8 +3627,6 @@ if ($action == 'create')
print '';
print '';
- print "\n";
-
// Show origin lines
if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
print '
';
@@ -3634,12 +3636,12 @@ if ($action == 'create')
print '