Skip to content

use correct debit and credit values, handle journal entries with multiple legs and docs#36

Merged
dvdl16 merged 6 commits into
version-15from
fix/vat-return
Oct 27, 2025
Merged

use correct debit and credit values, handle journal entries with multiple legs and docs#36
dvdl16 merged 6 commits into
version-15from
fix/vat-return

Conversation

@dvdl16
Copy link
Copy Markdown
Collaborator

@dvdl16 dvdl16 commented Oct 27, 2025

Description

  • fix: use correct debit and credit values
  • feat: handle journal entries with multiple legs
  • chore: standardise docs to vuepress

Type of change

  • ⚪ Bug fix (change which fixes an issue)
  • 🟢 New feature (change which adds functionality)
  • ⚪ Breaking change (fix or feature that would cause existing functionality to not work as expected)

Tests

  • Unit Tests have been updated or added, as required
  • UI Tests have been updated or added, as required

Checklist:

  • My code follows Naming Guidelines (DocType, Field and Variable naming)
  • No Form changes / My code follows the Form Design Guidelines
  • My code follows the Coding Standards of this project
  • My code follows the Code Security Guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas / No comments necessary
  • I have made corresponding additions/changes to the documentation
  • All business logic and validations are on the server-side / No business logic or validation changes
  • No patches are necessary / Migration Patches have been added to the correct subdirectory of /patches and patches.txt have been updated

User Experience:

N/A

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 51.72414% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.14%. Comparing base (79c029f) to head (41f7c57).

Files with missing lines Patch % Lines
...e/value_added_tax_return/value_added_tax_return.py 51.85% 13 Missing ⚠️
csf_za/__init__.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           version-15      #36      +/-   ##
==============================================
- Coverage       40.16%   39.14%   -1.03%     
==============================================
  Files              10        9       -1     
  Lines             473      442      -31     
==============================================
- Hits              190      173      -17     
+ Misses            283      269      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dvdl16 dvdl16 merged commit 2e2a33d into version-15 Oct 27, 2025
3 checks passed
@Starktail-Christo
Copy link
Copy Markdown

@dvdl16 What changes were made on this PR?

@dvdl16
Copy link
Copy Markdown
Collaborator Author

dvdl16 commented Feb 17, 2026

@dvdl16 What changes were made on this PR?

@Starktail-Christo

  • fix: use correct debit and credit values

For invoices in foreign currencies, use the ZAR value, not the foreign currency value

  • feat: handle journal entries with multiple legs

Before this PR, auto-classification only worked for simple journal entries with VAT, e.g.

Bought office supplies for 100 + 15 VAT, paid from bank.
Total paid = 115.

| Account                     | Debit | Credit |
|-----------------------------|-------|--------|
| Office Supplies (Expense)   | 100   |        |
| VAT                         | 15    |        |
| Bank                        |       | 115    |

The added code handles more scenarios of messy/real-world journal entries where VAT appears as one line, but the other side is split across multiple lines

@dvdl16
Copy link
Copy Markdown
Collaborator Author

dvdl16 commented Feb 17, 2026

@Starktail-Christo was part of work done for HD Ticket 854

@Starktail-Christo
Copy link
Copy Markdown

@dvdl16 Thank you for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants