Watch
1
0
Fork
You've already forked arc
0
forked from hesabix/arc
arc/hesabixUI/hesabix_ui/lib/widgets
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Motamed ASA fa730b6ab0 feat(tax): add Motamed ASA as a tax submission provider
«معتمد آسا» becomes a third, optional sending method beside «ارسال مستقیم»
and «همراه فن‌آوا». It follows the Fanava provider pattern and reuses
tax_provider_credentials, business_tax_provider_accounts and
tax_settings.submission_provider: no new table and no migration. Direct and
Fanava behaviour is unchanged; the default stays moadian_direct.

Connection (informed consent):
- The tax settings page shows what is shared with Motamed ASA and why, with
  links to its terms and to https://asatsp.ir/privacy#partner-software, and
  asks for explicit consent; consent user and time are stored as for Fanava.
- The owner signs up on Motamed ASA's own page (tax-system one-time code);
  Hesabix collects no identity documents. The business API key is handed to
  Hesabix once, after the owner agrees there; a business that already has an
  ASA API v2 key can enter its client id/secret instead.
- The business private key and memory id are not needed: the trusted
  company signs and sends.

Sending (ASA TSP API v2, https://api-v2.asatsp.ir):
- original: POST /api/invoice/send with a stable internalId per document;
  a rejected or unsent invoice is edited in place (editInvoice);
- correction: editInvoice with confirmCorrection;
- cancellation: cancelInvoice; marked cancelled only once accepted;
- sales return: ins=4 whose Body is the rows remaining after the return
  (RC_IITP.IS_V7.9 table 1), read from the chain's accepted invoice;
- timeouts are reconciled by internalId and never re-sent blindly;
- ASA issues the tax id; Hesabix stores it from the answer.

Inquiry and the tax workspace:
- inquire_tax_status, the auto-inquiry loop and the workspace health check
  read Motamed ASA invoices from ASA (inquiryInternalIds).
- The کارپوشه status (buyer reaction) and the Article 6 status (عدول /
  عدم عدول) of the document's own invoice are kept and shown as two new
  workspace columns (tax_workspace_status, tax_article6_status). A buyer
  rejection is shown there and no longer marks a registered invoice failed.
- «پرداخت‌ها و ثبت در کارپوشه» on a sent Motamed ASA invoice opens its
  payment table: every row with its registration status, and new rows
  (method, date/time, amount with VAT, trace and terminal numbers)
  registered through ASA's registerPayment; locked rows stay read-only and a
  lost answer reads the rows back instead of sending them again.

Admin: «اتصال معتمد آسا» under system settings › external services holds
the partner client id/secret Motamed ASA issues for Hesabix.

Tests: tests/test_motamed_asa_{client,invoice_payload,provider_service}.py

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 02:01:02 +03:00
..
admin/file_storage some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
ai add ai widget with hold Q + type A + I 2026-09-22 19:10:09 +00:00
android_update some more bug fixes that users reported 2026-09-15 08:53:44 +00:00
attached_files some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
auth some more bug fix in android build and login buttons 2026-07-26 21:54:49 +00:00
banking some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
barcode bug fix in brackets 2026-05-26 11:32:41 +00:00
barcode_label bug fix in barcode prints 2026-08-19 18:01:58 +00:00
biometric bug fix in android updater and mobile luncher 2026-08-08 12:38:01 +00:00
business bug fix in telephony icon in bussiness dashboard menu 2026-08-03 07:22:50 +00:00
calculator change file permissions 2026-04-14 19:34:55 +03:30
category bug fix in catugore 2026-07-17 22:45:45 +00:00
common bug fix in imprt excell dialog in mobile view. thanks mohammad for your fedback 2026-08-02 11:19:02 +00:00
crm some stability in ai 2026-08-21 14:14:21 +00:00
data_table fix(ui): prevent fixed-width table assertion 2026-09-30 22:17:04 +03:30
distribution almost finish dertribition plugin update 2026-09-07 17:33:35 +00:00
document bug fix in invoices 2026-09-03 00:02:08 +00:00
expense_income start working on smart sms banking 2026-07-30 16:06:32 +00:00
fx some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
hscript hscript v2 published 2026-07-26 16:46:22 +00:00
inputs add most des 2026-05-17 23:37:03 +03:30
invoice fix(invoice): defer product picker loading per row 2026-10-18 12:42:00 +03:30
marketplace some more bug fixes that users reported 2026-09-15 08:53:44 +00:00
memorial bug fix in local deployment 2026-04-25 02:31:13 +03:30
money bug fix in number to text tooltip 2026-07-20 10:40:47 +00:00
monitoring some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
notification some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
permission some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
person some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
ping_pong more bug fix 2026-04-25 12:59:05 +00:00
product feat(products): add product bundles to sales invoices 2026-10-03 20:56:26 +03:30
profile some more bug fixes that users reported 2026-09-15 08:53:44 +00:00
project some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
quick_sales fix(quick-sales): harden invoice and payment workflows 2026-10-17 20:53:41 +03:30
report_template feat(report-templates): add block-based invoice studio 2026-10-19 22:16:13 +03:30
reports some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
sms_bank some bug fix in sms banking finder 2026-08-06 12:31:36 +00:00
support some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
tax feat(tax): add Motamed ASA as a tax submission provider 2026-10-20 02:01:02 +03:00
telephony bug fix in syntax 2026-08-09 02:42:59 +03:30
transfer start working on smart sms banking 2026-07-30 16:06:32 +00:00
wallet some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
warehouse some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
warranty more bug fix 2026-04-25 12:59:05 +00:00
windows_close some more bug fixes that users reported 2026-09-15 08:53:44 +00:00
windows_update some more bug fixes that users reported 2026-09-15 08:53:44 +00:00
workflow some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
zohal some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
android_system_notification_settings_section.dart some more bug fixes that users reported 2026-09-15 08:53:44 +00:00
auth_footer.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
business_subpage_back_leading.dart some bug fix in back botton 2026-08-15 11:51:17 +00:00
calendar_switcher.dart coporative update 2026-05-02 02:00:28 +00:00
combined_user_menu_button.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
date_input_field.dart feat(quick-sales): improve checkout controls and reliability 2026-10-17 15:10:04 +03:30
error_notice.dart change file permissions 2026-04-14 19:34:55 +03:30
fiscal_year_switcher.dart bug fix in editor backup 2026-04-18 09:30:21 +03:30
in_app_notification_behavior_section.dart more bug fix in permission control and reports 2026-05-07 22:21:45 +03:30
in_app_notification_strings.dart more bug fix in permission control and reports 2026-05-07 22:21:45 +03:30
jalali_date_picker.dart progress in chat ai agent and some bug fix in shamsi calndar 2026-05-26 14:03:49 +00:00
language_switcher.dart coporative update 2026-05-02 02:00:28 +00:00
loading_indicator.dart change file permissions 2026-04-14 19:34:55 +03:30
logout_button.dart coporative update 2026-05-02 02:00:28 +00:00
multi_currency_gate.dart add fx providers 2026-07-18 08:28:23 +00:00
notification_bell_button.dart progress in notification system 2026-07-24 19:28:23 +00:00
progress_splash_screen.dart start working on rebranding 2026-09-04 20:45:15 +00:00
settings_menu_button.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
simple_splash_screen.dart start working on rebranding 2026-09-04 20:45:15 +00:00
splash_screen.dart bug fix in migrations 2026-09-05 22:09:09 +00:00
theme_mode_switcher.dart coporative update 2026-05-02 02:00:28 +00:00
theme_palette_switcher.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
url_tracker.dart bug fix in windows last visited page 2026-08-02 19:11:23 +00:00
user_account_menu_button.dart change file permissions 2026-04-14 19:34:55 +03:30
user_activity_heartbeat.dart more bug fix in permission control and reports 2026-05-07 22:21:45 +03:30
user_menu_button.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00