dolibarr/htdocs/commande
Frédéric FRANCE b7413ee622
NEW: Improve phpunit test coverage for Commande, Propal and Facture (#39517)
* NEW: Improve phpunit test coverage for Commande, Propal and Facture

Add line CRUD (addline/updateline/deleteLine) and total-consistency
assertions, reuse the specimen-invariant regression check (previously
only in FactureTest) across all three, and add a new integration test
covering the full Propal -> Commande -> Facture conversion chain
(thirdparty, notes, totals and object_linked propagation).

Two shared assertions were added to CommonClassTest for this:
assertLineTotalsMatchHeader() and assertMatchesFreshSpecimen().

* Update commande.class.php

* FIX PropalCommandeFactureWorkflowTest reads wrong invoice after createFromOrder

Facture::createFromOrder() returns a status flag (1/-1), not the new
invoice id, unlike Commande::createFromProposal(). The test was doing
fetch($result) with $result==1, which happened to no-op locally (no
invoice with rowid=1) but fetched an unrelated invoice in CI, causing
a spurious thirdparty mismatch. Use $facture->id, already set by
create() inside createFromOrder(), like every other caller of this
method does.
2026-08-19 02:35:04 +02:00
..
class NEW: Improve phpunit test coverage for Commande, Propal and Facture (#39517) 2026-08-19 02:35:04 +02:00
stats Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 24.0 2026-08-06 00:35:00 +02:00
tpl NEW Display thirdparty name with ref in linked objects for all document types (#37906) 2026-04-19 15:59:45 +02:00
agenda.php Devug v23 2025-11-24 16:29:21 +01:00
card.php Fix #39412 Add PRG redirect after adding a line to avoid duplicate on refresh (#39528) 2026-08-15 02:45:27 +02:00
contact.php add dolBuildUrl (#35664) 2025-10-17 02:31:07 +02:00
customer.php Qual: Fix PHPStan notices (#38021) 2026-04-28 11:08:58 +02:00
document.php Doc 2026-08-05 23:43:04 +02:00
index.php Fix option to set max short list 2026-07-04 13:33:17 +02:00
list.php FIX: require invoice right for order mass invoice action (#39139) 2026-07-13 12:01:16 +02:00
list_det.php FIX: Translate French code comments to English in commande, contrat and datapolicy modules 2026-06-28 13:15:24 +02:00
messaging.php Debug v23 - Filter on action type ko 2026-02-08 19:30:17 +01:00
note.php add dolBuildUrl with examples of use (#35549) 2025-10-06 18:17:02 +02:00