Skip to content

Commit

Permalink
Merge CIVIQBO-110 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
agileware-fj committed Oct 22, 2024
2 parents 9c71c66 + cdbc82c commit 8db3346
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
20 changes: 15 additions & 5 deletions CRM/Civiquickbooks/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,18 @@ protected function mapToAccounts($db_contribution, $accountsID, $SyncToken, $qb_

$tax_codes[] = $tmp;
} catch (CiviCRM_API3_Exception $e) {
$tax_errormsg[] = ts(
'Could not load "Sales Tax Account is" relationship for FinancialType %1. Error: %2',
[
1 => $line_item['financial_type_id'],
2 => $e->getMessage(),
]
);

$tax_types[$line_item['financial_type_id']] = [
'sale_tax_acctgCode' => NULL,
'sale_tax_account_type_code' => NULL,
];
}
}

Expand All @@ -570,8 +581,6 @@ protected function mapToAccounts($db_contribution, $accountsID, $SyncToken, $qb_

$i = 1;

$QBO_errormsg = [];

$item_errormsg = [];

$tax_errormsg = [];
Expand Down Expand Up @@ -632,12 +641,13 @@ protected function mapToAccounts($db_contribution, $accountsID, $SyncToken, $qb_
],
'UnitPrice' => $lineTotal / $line_item['qty'] * 1.00,
'Qty' => $line_item['qty'] * 1,
'TaxCodeRef' => [
'value' => $line_item_tax_ref,
],
],
];

if(!empty($line_item_tax_ref)) {
$tmp['SalesItemLineDetail']['TaxCodeRef'] = [ 'value' => $line_item_tax_ref ];
}

$line_items[] = $tmp;
$i += 1;
}
Expand Down
4 changes: 2 additions & 2 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<url desc="Support">https://agileware.com.au/contact</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2024-04-19</releaseDate>
<version>2.9.5</version>
<releaseDate>2024-10-21</releaseDate>
<version>2.9.6</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.38</ver>
Expand Down

0 comments on commit 8db3346

Please sign in to comment.