Модуль интеграции Kapital Bank-а с Jey ERP
Go to file
Ali 62bc550186 fix: correct multi-currency amounts in Journal Entry creation
Replace ad-hoc if/elif branches with a unified approach:
1. Read txn_currency from the transaction data
2. Convert amount → company currency via txn_rate
3. Derive each account's amount in its own currency
4. Recompute exact exchange rates from rounded amounts
   to keep Frappe's debit == credit in company currency

Fixes the bug where a $40 debit was recorded as ~$25 debit
and 40 AZN credit due to dividing instead of multiplying
when the transaction currency matched the foreign account.

Applies to both bank_api.py (_import_one_transaction JE path)
and mapping.py (_create_journal_entry_for_brt).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 15:10:27 +04:00
birbank_docs added kapital bank settings and app rework 2026-02-25 22:07:07 +04:00
kapital_bank fix: correct multi-currency amounts in Journal Entry creation 2026-03-16 15:10:27 +04:00
.editorconfig feat: Initialize App 2026-02-20 14:13:47 +04:00
.eslintrc feat: Initialize App 2026-02-20 14:13:47 +04:00
.gitignore feat: Initialize App 2026-02-20 14:13:47 +04:00
.pre-commit-config.yaml feat: Initialize App 2026-02-20 14:13:47 +04:00
CLAUDE.md changed purpose mapping and more 2026-03-05 17:57:43 +04:00
README.md feat: Initialize App 2026-02-20 14:13:47 +04:00
api_endpoints.txt added kapital bank settings and app rework 2026-02-25 22:07:07 +04:00
license.txt feat: Initialize App 2026-02-20 14:13:47 +04:00
pyproject.toml feat: Initialize App 2026-02-20 14:13:47 +04:00
www.kapitalbank.az_Archive [26-03-12 17-06-17].har added mapping without party 2026-03-13 17:20:08 +04:00

README.md

Kapital Bank

Kapital Bank Integration

Installation

You can install this app using the bench CLI:

cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch main
bench install-app kapital_bank

Contributing

This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:

cd apps/kapital_bank
pre-commit install

Pre-commit is configured to use the following tools for checking and formatting your code:

  • ruff
  • eslint
  • prettier
  • pyupgrade

License

unlicense