Commit graph

1 commit

Author SHA1 Message Date
Frédéric FRANCE
efe2137240
NEW: Add phpunit test for RemiseCheque class (#39543)
Add a test for RemiseCheque (chequereceipt / bank check remittance
slip), which had no test coverage yet.

RemiseCheque does not create a standalone record: it gathers existing
not-yet-remitted check payments (llx_bank rows with fk_type='CHQ' and
fk_bordereau=0) for a given bank account into a receipt. The fixture
therefore goes through the real path: create+validate an invoice, pay
it with a CHQ-coded payment, reconcile it to a bank account (this is
what produces the llx_bank row RemiseCheque::create() picks up), then
remit that check. Covers create/fetch/validate/delete.

Note: unlike most other classes in this suite, RemiseCheque::delete()/
updateAmount() return an "errno" convention (0=success, <0=error)
rather than the usual ">0=success" one used by create()/validate() in
the same class - see docblock and inline comments.

No module activation needed here: the cheque receipt feature is not
gated behind any separately activatable module (only the always-on
bank module).
2026-08-19 01:39:35 +02:00