Commit graph

784 commits

Author SHA1 Message Date
minimexat
049851bc31
FIX: require invoice right for order mass invoice action (#39139)
* FIX: Require invoice right for order mass invoice

* Update list.php

* Update ChangeLog

---------

Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-07-13 12:01:16 +02:00
Laurent Destailleur
0ffa7cf839 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-07-02 12:49:14 +02:00
tcesar
2d7a3d2a66
Fix: mass createbills could invoice canceled or already-billed orders (#39015)
* Fix: mass createbills could invoice canceled or already-billed orders

* Update orders.lang

* fix indent
2026-06-29 20:27:37 +02:00
tcesar
9f50160528
Fix: mass createbills success message showed draft PROV ref instead … (#39013)
* Fix: mass createbills success message showed draft PROV ref instead of final ref

Extended description (corps de la PR)

  When creating an invoice from several orders at once via the order list
  mass action ("Create invoice for this customer"), with the "Validate
  generated invoices" option set to "yes", the success message and its link
  displayed the temporary draft reference (PROVxxxx) instead of the final
  validated invoice reference.

  Root cause:
  In htdocs/commande/list.php, during the confirm_createbills action, $lastref
  is captured right after $objecttmp->create($user), at which point the invoice
  is still a draft (PROVxxxx). When the "validate invoices" option is enabled,
  each invoice is then validated through $objecttmp->validate($user), which
  assigns the definitive reference to the object. However $lastref was never
  refreshed afterwards, so the "BillXCreated" message (single-invoice case) kept
  showing the draft ref.

  Fix:
  Refresh $lastref from the object inside the validation loop, after a successful
  validate(), so the success message links to and displays the final reference.

  Only the single-invoice success message exposes a reference, so this is the only
  case affected; the multi-invoice message only shows a counter.

  Steps to reproduce:
  1. Go to the orders list.
  2. Select several orders (or one), and choose the "Create invoice for this
     customer" mass action.
  3. Set "Validate generated invoices" to "Yes".
  4. Confirm.
  => Before: the success message links to the draft ref PROVxxxx.
  => After: the success message links to the final validated invoice ref.

* Fix indent
2026-06-29 20:26:29 +02:00
Frédéric FRANCE
a02658b709
FIX: Translate French code comments to English in commande, contrat and datapolicy modules 2026-06-28 13:15:24 +02:00
Maxime Kohlhaas
761b724100
NEW : stats button on lists (#38852)
* NEW : Add stats button on Propal list

* NEW : Add stats button on Task list

* NEW : Add stats button on Order list

* NEW : Add stats button on Contract list

* NEW : Add stats button on Supplier Order list

* NEW : Add stats button on Invoice list

* NEW : Add stats button on Supplier Invoice list

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-06-22 13:54:14 +02:00
Laurent Destailleur
b116273033 Clean code 2026-04-23 17:41:15 +02:00
Frédéric FRANCE
88d9d1301f
clean code (#37953)
* clean code

* clean code

* clean code
2026-04-21 13:31:24 +02:00
Laurent Destailleur
8012822e81 Clean code. Must use USF everywhere. 2026-04-03 21:20:59 +02:00
splohmer
adf9e3d270
FIX - show correct shippable icon if order has multiple lines with same product (#37656)
In the current implementation it checks only line by line against the stock. This can lead to not correct show of shippable orders icon as this can be incorrect due to multiple lines with the same product.
Example: Stock of product A is 2. There are two lines with this product A. In the previous implementation it will check the first line against the stock 2-2=0 -> ok and then the same result for the next line but this is not correct as it doesn't reflect previous lines.
2026-03-30 20:06:24 +02:00
atm-jonathan
f00da89480
separate new and conf condition (#37547)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-03-20 18:03:18 +01:00
boudet jean pascal
a4b8cb7008
NEW : adds visual indicators on the Sales Order card (commande/card.php) (#37460)
* This PR adds visual indicators on the Sales Order card (commande/card.php) to quickly identify if an order or its lines are shippable based on current stock levels. This feature mirrors the existing functionality found in the Orders List, bringing valuable logistics information directly into the Order Card context.

Key Features:
Global Shippable Status: Adds a "shippable" icon (Truck) next to the "Planned delivery date" field.

Logic: Checks if all products in the order are in stock.

Condition: Visible only if Stock and Shipment modules are enabled, a delivery date is set, and the order is validated.

Visual: Green icon if fully shippable, Red/Warning if stock is insufficient. Includes a detailed tooltip.

Per-Line Shippable Status: Adds a new "Shippable" column in the product lines table.

Logic: Compares real stock vs. remaining quantity to ship for each line.

Visual: Displays a green/red status bullet (standard Dolibarr status icons) directly in the line.

Implementation: Done by updating objectline_title.tpl.php and objectline_view.tpl.php with specific checks for the commande element.

New Configuration Option: Added a hidden option ORDER_DISABLE_SHIPPABLE_ICON_ON_CARD to disable this feature if needed (configurable in Home > Setup > Other Setup or via module settings).

Backend Optimization: Added a new method getShippableInfos() in commande.class.php to centralize the stock check logic (optimized with stock caching to avoid N+1 query issues).

Technical Details:
Modified Files:

commande/card.php: Integration of the global icon next to the date.

commande/class/commande.class.php: Added getShippableInfos() method.

core/tpl/objectline_title.tpl.php: Added "Shippable" column header (conditional for Orders).

core/tpl/objectline_view.tpl.php: Added "Shippable" column cell content (conditional for Orders).

Performance: Logic uses static caching for product stock to minimize database impact when rendering large orders.

* missed element

* img_picto

* phan add

* load_stock and global $i

* phan

* ci retour

* change icon
change phan directive

* phan

* Fight against optionflation

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>

* Change condition for displaying shippable icon

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>

* Change condition for displaying shippable status icon

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>

* Update card.php

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>

* Update shippable status condition in template

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>

* Update shippable status condition logic

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>

---------

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: jpb <jean-pascal.boudet@atm-consulting>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-03-12 14:42:31 +01:00
Laurent Destailleur
1ee077f797 CI 2026-03-12 02:02:58 +01:00
Laurent Destailleur
a9c85c78e2 Automated merge from 23.0 to develop 2026-02-28 12:17:11 +01:00
Laurent Destailleur
6a458223b1 Automated merge from 22.0 by tool pullmerge.sh 2026-02-28 11:31:01 +01:00
Anthony Berton
ce02010542
FIX - Show POS in Order and Invoice list (#37364)
* FIX - Show POS in Order and Invoice list

* Update list.php

* Change $showpos value type from int to string

* Refactor POS fields visibility logic

---------

Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-27 17:15:41 +01:00
Laurent Destailleur
3d55a7a792 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-12-22 15:11:32 +01:00
Frédéric FRANCE
ec46ff9b10
fix search import key filter not working 2025-12-18 13:28:16 +01:00
Florian HENRY
12936afb13 review 2025-12-04 19:58:42 +01:00
Florian HENRY
7f3ac106fc fix: when create bills from orders list, title and subtotal attribute is now copied 2025-12-04 11:00:58 +01:00
Florian HENRY
c39cba8395 fix: when create bills from orders list, title and subtotal attribute is now copied 2025-12-04 10:57:24 +01:00
Francis Appels
079a55153f
Fix php warning in order list (#36202)
* Fix order list php warning

* missing td
2025-11-11 17:42:03 +01:00
Laurent Destailleur
17e78c99a2 Fix responsive 2025-10-17 23:50:31 +02:00
HENRY Florian
b117b315a2
fix: if MAXREFONDOC is set to -1 do not output Orders in Pulbic note (#35493)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-28 21:01:10 +02:00
ldestailleur
f65903d006 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-09-26 01:23:02 +02:00
atm-GregM
35bb894393
FIX check commande liste validate (#35479) 2025-09-25 11:57:49 +02:00
Laurent Destailleur
d8e1560275 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-08-01 00:13:19 +02:00
Mohamed DAOUD
04672e1d80
fix use delivery date v21 (#34831) 2025-07-29 21:09:46 +02:00
ldestailleur
80e5f7fe66 Fix tooltip 2025-07-21 18:58:25 +02:00
ldestailleur
270caf0dcb Debug v22 2025-07-17 19:30:58 +02:00
ldestailleur
423b302a2b Debug v22 2025-07-17 19:30:58 +02:00
Quentin-Seekness
b91b46d898
Filter on search_project lost on next pages (#34646)
The filter on the p.title of the command list doesn't work if you switch result pages. It's simply not kept in the next page url.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-27 00:28:36 +02:00
ldestailleur
0ae1f2fb9d Fix CI 2025-06-18 16:53:20 +02:00
ldestailleur
65bb64e9cd Fix CI 2025-06-18 16:24:37 +02:00
ldestailleur
5e4f167815 Debug v22 - missing module_source in view mode of card 2025-06-16 23:49:56 +02:00
atm-lena
50f9ec8b52
Invoice List : add tag filter (#34521)
* Invoice List : add tag filter

* Invoice List : Add operator to invoice filter

* Add tag filter in order list

* Clean code

---------

Co-authored-by: atm-lena <lena.papazian@atm-consulting.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-15 03:02:13 +02:00
ldestailleur
7ad71279a7 Fix CI 2025-06-11 17:33:07 +02:00
ldestailleur
45c7c7f9bc Fix variable not defined 2025-06-11 17:15:58 +02:00
ldestailleur
9e26f5a98e Debug v22 2025-06-11 12:45:15 +02:00
ldestailleur
b5a871bf99 Close #34344 2025-06-04 10:48:29 +02:00
Frédéric FRANCE
de763b4b43
clean code of order (#33880)
* clean code of order

* clean code of order

* clean code of order

* clean code of order
2025-04-16 21:09:45 +02:00
lvessiller-opendsi
4963639d67
NEW input reason for customer invoice (#33599)
* NEW input reason for customer invoice

* Fix CI error

* Fix format fk_input_reason in array of fileds

* Add invoices in translate key of source dictionary
2025-04-16 01:02:26 +02:00
ldestailleur
d9753254b1 Look and feel v22 for description/notes into lines 2025-03-26 14:39:42 +01:00
ldestailleur
ec0b487b28 NEW Can filter on public/private notes in list sale orders thirdparties 2025-03-26 14:12:55 +01:00
Laurent Destailleur
41377a9917
Merge pull request #33313 from mdeweerd/phan/big_violators
Fix PhanTypeMismatchArgument in commonobject, commande/card,
2025-03-05 13:05:42 +01:00
ldestailleur
6c9e25677c close #33310 2025-03-05 13:03:35 +01:00
MDW
4096d0ee2f
Qual: Fix phan notices for commande 2025-03-05 12:15:14 +01:00
ldestailleur
e8f8416215 NEW Filter on date creation/date modification in invoice list 2025-02-18 13:56:44 +01:00
Laurent Destailleur (aka Eldy)
9bc2a3a6bd Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-02-11 22:24:47 +01:00
Laurent Destailleur (aka Eldy)
2fc2e045be NEW Add link to create shipment on picto 2025-02-11 18:45:39 +01:00