FIX Tax 2 is lost when order is invoiced

This commit is contained in:
javierybar 2022-04-10 15:33:35 +02:00 committed by GitHub
parent 857048c9bd
commit d7da57960f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -657,6 +657,7 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders.
} else {
// If we want one invoice per order or if there is no first invoice yet for this thirdparty.
$objecttmp->socid = $cmd->socid;
$objecttmp->fetch_thirdparty();
$objecttmp->type = $objecttmp::TYPE_STANDARD;
$objecttmp->cond_reglement_id = !empty($cmd->cond_reglement_id) ? $cmd->cond_reglement_id : $cmd->thirdparty->cond_reglement_id;
$objecttmp->mode_reglement_id = !empty($cmd->mode_reglement_id) ? $cmd->mode_reglement_id : $cmd->thirdparty->mode_reglement_id;