Fix missing information propagated to trigger
This commit is contained in:
parent
35ac8923dd
commit
b55830d205
@ -1135,6 +1135,8 @@ if (empty($reshook)) {
|
|||||||
$facture_source->fetchPreviousNextSituationInvoice();
|
$facture_source->fetchPreviousNextSituationInvoice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$id = $object->create($user);
|
$id = $object->create($user);
|
||||||
if ($id < 0) {
|
if ($id < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -1262,6 +1264,7 @@ if (empty($reshook)) {
|
|||||||
$line->multicurrency_total_tva = -$line->multicurrency_total_tva;
|
$line->multicurrency_total_tva = -$line->multicurrency_total_tva;
|
||||||
$line->multicurrency_total_ttc = -$line->multicurrency_total_ttc;
|
$line->multicurrency_total_ttc = -$line->multicurrency_total_ttc;
|
||||||
|
|
||||||
|
$line->context['createcreditnotefrominvoice'] = 1;
|
||||||
$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount alreayd linked
|
$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount alreayd linked
|
||||||
|
|
||||||
$object->lines[] = $line; // insert new line in current object
|
$object->lines[] = $line; // insert new line in current object
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user