Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
e813de1595
@ -1126,6 +1126,8 @@ if (empty($reshook)) {
|
||||
$facture_source->fetchPreviousNextSituationInvoice();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$id = $object->create($user);
|
||||
if ($id < 0) {
|
||||
$error++;
|
||||
@ -1253,6 +1255,7 @@ if (empty($reshook)) {
|
||||
$line->multicurrency_total_tva = -$line->multicurrency_total_tva;
|
||||
$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
|
||||
|
||||
$object->lines[] = $line; // insert new line in current object
|
||||
|
||||
Loading…
Reference in New Issue
Block a user