Commit Graph

5034 Commits

Author SHA1 Message Date
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
2176229ffb Look and feel v24 2026-03-12 01:18:10 +01:00
splohmer
45d862c0e8 FIX Order API: delete order returns wrong http response in case order could not be deleted (#37472) 2026-03-11 23:44:18 +01:00
Laurent Destailleur
4ad6d1b5b3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2026-03-09 09:55:09 +01:00
Laurent Destailleur
baa1359021 FIX Bad value when entering price with multicurrency included tax.
Debug option PRODUCT_USE_CUSTOMER_PACKAGING not completely implemented
2026-03-06 01:21:04 +01:00
Laurent Destailleur
bc44247cd1 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-03-05 23:59:06 +01:00
Laurent Destailleur
c449bcf9f4 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-03-05 23:55:56 +01:00
Laurent Destailleur
dea8c0cf0e FIX #37412 Better fix 2026-03-05 23:36:54 +01:00
Henry
ba9f70dc92 Fix: Sales order add line shows 0 when only multicurrency unit price is filled (#37412)
When adding a product line to a sales order in multicurrency mode, if the user
fills only the 'UP currency' (multicurrency_price_ht) and not the local unit
price, the line was saved with price 0. The form values for multicurrency
price were never applied to pu_ht_devise, and pu_ht was not derived from
pu_ht_devise using the order rate.

- Set pu_ht_devise from multicurrency_price_ht when user entered it
- When local price is empty/zero, derive pu_ht from pu_ht_devise / multicurrency_tx
  (same convention as core/lib/price.lib.php calcul_price_total)
- Same for multicurrency_price_ttc -> pu_ttc_devise and pu_ttc

Made-with: Cursor
2026-03-05 22:37:29 +01:00
Laurent Destailleur
61c935b827 Debug v23 2026-03-02 20:07:43 +01:00
Laurent Destailleur
343edad341 Debug v23 2026-03-02 20:06:19 +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
717f315551 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-23 01:30:54 +01:00
Laurent Destailleur
c15994cbf8 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-02-23 01:29:51 +01:00
Sylvain Legrand
b34fb98b52 Update commande.class.php (#37301)
the empty qty logic → special_code = 3 ("Option" line) is not respected, unlike Propal which works correctly.
2026-02-21 12:09:17 +01:00
Zakaria Boushaba
ecb14aecf2 Fix text overflow in linked object table lists (v22) (#36776)
Co-authored-by: Zakaria Boushaba <z.boushaba@vold.africa>
2026-01-05 11:31:55 +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
7e264b0097 Merge branch '22.0' of https://github.com/Dolibarr/dolibarr into 22_fix_subtotal_attribute_copy 2025-12-04 19:58:49 +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
Florian HENRY
a38ffa02ac fix: subtotal feature button availablity according setup 2025-12-04 10:18:01 +01:00
Regis Houssin
0aa6652005 FIX #35141 (#36390)
* FIX #35141

* FIX avoid problem with chinese language
2025-11-24 16:03:38 +01:00
Laurent Destailleur
da08b2f5c3 Update status 2025-11-12 15:39:37 +01:00
splohmer
b35994bf93 FIX late customer orders are not shown on start page (#36200)
due to an mismatch of the used variable in hasDelay (status) and the setted variable (statut) the late orders where never shown in the start page as the count was always wrongly zero.
2025-11-11 17:53:40 +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
Regis Houssin
fa10fc0f94 FIX avoid NULL value (#36126) 2025-11-06 13:15:03 +01:00
Laurent Destailleur
94d1a25d67 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-11-03 14:10:57 +01:00
ldestailleur
62760d6195 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-11-03 14:05:58 +01:00
jonathan-stimactiv
6333f32c9c FIX: #35922 Lines of orders - Status filter unexpected beahavior (#35924) 2025-10-25 23:08:33 +02:00
noec764
8aabe1efb7 Fix load all line unecessary (#35783)
* FIX: Unecessary load of all order lines

* FIX: Unecessary load of all order lines

* FIX: Tabs indent instead of space

---------

Co-authored-by: Noé <noe@scopen.fr>
2025-10-21 02:16:49 +02:00
Frédéric FRANCE
18c29d0e40 fix tva can be sometimes string instead float (#35835) 2025-10-18 19:12:01 +02:00
Laurent Destailleur
17e78c99a2 Fix responsive 2025-10-17 23:50:31 +02:00
Laurent Destailleur
41634d08ca NEW Add option PROJECT_CAN_ALWAYS_LINK_TO_ALL_CUSTOMERS 2025-10-13 14:30:45 +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
ldestailleur
6ead2839d0 Fix missing several test on permission on actions 2025-09-23 16:41:53 +02:00
HENRY Florian
a69bd1ba56 fix: divided by zero with customer packaging (#35224)
* fix: divided by zero with customer packaging

* fix: divided by zero with customer packaging

* fix: divided by zero with customer packaging

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-05 12:01:26 +02:00
Frédéric FRANCE
bcbcf30959 fix CI v22 (#35227)
* fix CI v22

* Update time.php

* Update card.php

* Update card.php

* Update card.php

* Update card.php

* Update card.php

* Update card.php

* Update card.php

* Update card.php
2025-09-04 20:58:40 +02:00
ldestailleur
bdf62918e5 Fix label of tooltip not complete 2025-09-04 17:55:09 +02:00
ldestailleur
263626b2fd Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-08-20 16:51:05 +02:00
hermans
1fb37db6f6 Bug Fix for issue 34898, default warehause and obj->endbrowid not exist on receipt.class (#34959)
* bug fix for: https://github.com/Dolibarr/dolibarr/issues/34939

* Bug fix for: Dolibarr Issue #34939

* Revert "bug fix for: https://github.com/Dolibarr/dolibarr/issues/34939"

This reverts commit bd4c1ccc41.

* Revert "Bug fix for: Dolibarr Issue #34939"

This reverts commit 8e46f863b9.

* Bug fix for issue https://github.com/Dolibarr/dolibarr/issues/34898

* fix bug on reception setClosed: ->edbrowid is not exist

* Fix missing variable for obj->endbrowid in etDraft,valid,setClosed

* fix white space

* remove white space
2025-08-15 17:26:39 +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
5e31b370f8 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-07-27 13:54:02 +02:00