Watch
1
0
Fork
You've already forked arc
0
forked from hesabix/arc
arc/hesabixAPI
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Motamed ASA 23d5fa4b49 refactor(tax): send Motamed ASA sales returns as the return document's lines
As agreed in the review, Hesabix no longer rebuilds the rows left after a
return. The return document's own lines go to /api/invoice/send with
ins=4 and returnRows "returned"; Motamed ASA (API v2 1.0.0.71) matches each
line to the registered reference rows by goods id, unit price, VAT rate and
discount per unit, refuses an ambiguous line instead of guessing
(INVOICE_RETURN_ROW_AMBIGUOUS), spreads a line over identical rows, and
builds the remaining rows with every tax field (vop, ssrv, ...) of the
reference.

- irtaxid is the sale's tax id as Motamed ASA gave it; ASA finds the
  chain's latest invoice itself, so no inquiry is needed first.
- buyer fields are left out of a return (outside the pattern; they come
  from the reference).
- a return already rejected at ASA is not rewritten through editInvoice.

Removes build_motamed_asa_return_invoice and _remaining_row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:06:42 +03:00
..
.github/workflows change file permissions 2026-04-14 19:34:55 +03:30
.migrate_venv bug fix in local deployment 2026-04-25 02:31:13 +03:30
adapters feat(tax): add Motamed ASA as a tax submission provider 2026-10-20 02:01:02 +03:00
app refactor(tax): send Motamed ASA sales returns as the return document's lines 2026-10-20 17:06:42 +03:00
assets more bug fix in permission control and reports 2026-05-07 22:21:45 +03:30
build/lib some bug fixes 2026-05-18 16:50:15 +00:00
deployment/systemd change py mirrors 2026-08-17 13:16:25 +00:00
docs fix(invoices): allow sales at exact stock 2026-10-03 17:11:35 +03:30
examples change file permissions 2026-04-14 19:34:55 +03:30
hesabix_api.egg-info update localizations 2026-10-13 13:15:18 +03:30
locales bug fix in fiscal roolback conflit with plugins activators 2026-09-22 08:34:32 +00:00
migrations fix(quick-sales): restore stock shortage workflow for async invoices 2026-10-19 16:43:11 +03:30
nginx-conf.d some more bug fix in telephony connector 2026-08-06 07:12:10 +00:00
nginx-snippets some more bug fix in telephony connector 2026-08-06 07:12:10 +00:00
scripts some more bug fixes that users reported 2026-09-15 08:53:44 +00:00
templates some bug fix in rebranding and parsian gatepay 2026-09-23 18:10:39 +00:00
tests refactor(tax): send Motamed ASA sales returns as the return document's lines 2026-10-20 17:06:42 +03:00
vendor/voice_wheels progress in ai 2026-05-28 14:18:39 +00:00
.gitignore change file permissions 2026-04-14 19:34:55 +03:30
.pre-commit-config.yaml change file permissions 2026-04-14 19:34:55 +03:30
=0.9.14 change file permissions 2026-04-14 19:34:55 +03:30
=1.15.0 change file permissions 2026-04-14 19:34:55 +03:30
=3.1.0 change file permissions 2026-04-14 19:34:55 +03:30
=5.9.0 change file permissions 2026-04-14 19:34:55 +03:30
alembic.ini change file permissions 2026-04-14 19:34:55 +03:30
alembic_build.ini change file permissions 2026-04-14 19:34:55 +03:30
analyze_business_endpoints.py change file permissions 2026-04-14 19:34:55 +03:30
analyze_migrations.py change file permissions 2026-04-14 19:34:55 +03:30
api.hesabix.ir.conf change file permissions 2026-04-14 19:34:55 +03:30
check_notification_issue.py change file permissions 2026-04-14 19:34:55 +03:30
check_ticket_notification.py change file permissions 2026-04-14 19:34:55 +03:30
debug_telegram_notification.py change file permissions 2026-04-14 19:34:55 +03:30
docker-compose.yml some security bug fix 2026-06-19 22:03:43 +00:00
Dockerfile change file permissions 2026-04-14 19:34:55 +03:30
env.example BUG fix in secrets keys keep 2026-07-12 22:12:18 +00:00
f.mirror.hesabix.ir.conf add shabake tamin network 2026-05-20 15:30:21 +00:00
fix_null_strings.sql change file permissions 2026-04-14 19:34:55 +03:30
gradle.mirror.hesabix.ir.conf add shabake tamin network 2026-05-20 15:30:21 +00:00
hesabix.db change file permissions 2026-04-14 19:34:55 +03:30
maven.mirror.hesabix.ir.conf add shabake tamin network 2026-05-20 15:30:21 +00:00
migration_checkpoint.json change file permissions 2026-04-14 19:34:55 +03:30
migrations_backup_20251206_031601.tar.gz change file permissions 2026-04-14 19:34:55 +03:30
mysql.conf change file permissions 2026-04-14 19:34:55 +03:30
p-mirror-pypi.conf add shabake tamin network 2026-05-20 15:30:21 +00:00
pyproject.toml bug fix in tty pyton 3.13 with unsafe libs 2026-07-12 22:03:23 +00:00
pytest.ini bug fix in ai 2026-07-16 07:39:13 +00:00
README.md fix(products): optimize Excel import opening balance 2026-10-01 19:44:08 +03:30
rq_worker.py add calendar and note taking 2026-04-15 17:33:30 +00:00
run_migrations.py change file permissions 2026-04-14 19:34:55 +03:30
run_notification_worker.sh big progress 2025-12-09 02:51:12 +00:00
test_create_ticket.sh change file permissions 2026-04-14 19:34:55 +03:30
test_create_ticket_via_api.sh big progress 2025-12-09 02:51:12 +00:00
test_notification_manual.md change file permissions 2026-04-14 19:34:55 +03:30
test_notification_simple.py change file permissions 2026-04-14 19:34:55 +03:30
test_notify_operators.py change file permissions 2026-04-14 19:34:55 +03:30
test_ticket_notification.py change file permissions 2026-04-14 19:34:55 +03:30
test_ticket_with_notification.py change file permissions 2026-04-14 19:34:55 +03:30

Hesabix API

Monolithic modular backend (DDD-lite) using FastAPI + SQLAlchemy + MySQL.

Quickstart (Dev)

  1. Create and fill .env from .env.example.
  2. Install dependencies:
pip install -e .[dev]
  1. Run app:
uvicorn app.main:app --reload

Health endpoint: GET /api/v1/health.

Configuration

  • See app/core/settings.py and .env.example.
  • چت CRM و WebSocket: اگر Redis برای API خاموش است، برای رویدادهای زندهٔ چت باید تک worker یا sticky وب‌سوکت باشد؛ جزییات: docs/CRM_CHAT_WEBSOCKET_DEPLOYMENT.md.
  • معماری، رفتار تراکنشی و راهنمای پایش ایمپورت Excel کالا/خدمت: docs/PRODUCT_EXCEL_IMPORT_PERFORMANCE.md.