From 189e6c3d05d87ab3dd686009477a32a6c252c7ed Mon Sep 17 00:00:00 2001 From: Francis Whittle Date: Mon, 16 Oct 2023 13:49:44 +1100 Subject: [PATCH] CIVIQBO-107 Prevent undefined index warning for account_type_code --- CRM/Civiquickbooks/Invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Civiquickbooks/Invoice.php b/CRM/Civiquickbooks/Invoice.php index fbd10f1..9a0c8d3 100644 --- a/CRM/Civiquickbooks/Invoice.php +++ b/CRM/Civiquickbooks/Invoice.php @@ -553,7 +553,7 @@ protected function mapToAccounts($db_contribution, $accountsID, $SyncToken, $qb_ // We will use account type code to get state tax code id for US companies $tax_types[$line_item['financial_type_id']] = [ 'sale_tax_acctgCode' => $tmp, - 'sale_tax_account_type_code' => htmlspecialchars_decode($entityFinancialAccount['financial_account_id.account_type_code']), + 'sale_tax_account_type_code' => htmlspecialchars_decode($entityFinancialAccount['financial_account_id.account_type_code'] ?? NULL), ]; $tax_codes[] = $tmp;