Skip to content

Commit

Permalink
fix: Handle 0 tax condition (#691)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
ruuushhh and GitHub Actions authored Jan 3, 2025
1 parent 1a1bf66 commit ab14da1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/netsuite/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ def handle_taxed_line_items(self, base_line, line, workspace_id, export_module,

if general_mapping.is_tax_balancing_enabled and round(line.tax_amount, 2) != expected_tax_amount:
# Recalculate the net amount based on the modified tax
recalculated_net_amount = round((line.tax_amount * 100) / tax_item_rate, 2)
recalculated_net_amount = round((line.tax_amount * 100) / tax_item_rate, 2) if tax_item_rate != 0 else 0
untaxed_amount = round(original_amount - recalculated_net_amount - line.tax_amount, 2)

# Create a taxable line item
Expand Down

0 comments on commit ab14da1

Please sign in to comment.