Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX 17.0: follow-up of PR #27008 #28684

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

atm-florianm
Copy link
Contributor

FIX $sInvoice->ref inconsistent with database value in some cases

This is the same problem as PR #27008: I had forgotten to also use $this->newref rather than $num to update $this->ref in that fix (because $num cannot be modified by trigger).

Here is a fictional example of the problem:

$sInvoice->fetch($draftinvoiceid);
// $sInvoice->ref === '(PROV01234)'
$sInvoice->validate();
// Dolibar core first sets ref to 'SI_TEST_01'
// Let's say a module implementing BILL_SUPPLIER_VALIDATE then changes the ref to 'SI_TEST_02' and calls $object->update()

var_dump($sInvoice->ref); // expected: 'SI_TEST_02', got: 'SI_TEST_01'

…ding to inconsistencies if BILL_SUPPLIER_VALIDATE changes the invoice's ref

this is a follow-up of PR Dolibarr#27008
@eldy eldy merged commit 7f10566 into Dolibarr:17.0 Mar 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants