From d7da57960f36d9fb104bc47b45c4ecffc93ce6ea Mon Sep 17 00:00:00 2001 From: javierybar <36415318+javierybar@users.noreply.github.com> Date: Sun, 10 Apr 2022 15:33:35 +0200 Subject: [PATCH] FIX Tax 2 is lost when order is invoiced --- htdocs/core/actions_massactions.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 22e5bb3f1a6..a45d4a3b17f 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -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;