Watch
1
0
Fork
You've already forked arc
0
forked from hesabix/arc
arc/hesabixUI/hesabix_ui/lib/pages/admin
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
..
system_reports some bug fixes 2026-05-18 16:50:15 +00:00
admin_user_password_dialog.dart more bug fix 2026-04-25 12:59:05 +00:00
ai_eval_admin_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
ai_marketplace_settings_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
ai_models_admin_page.dart progressinve ai 2026-06-19 18:48:21 +00:00
ai_plans_admin_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
ai_prompts_admin_page.dart progress in ai 2026-06-13 23:49:34 +00:00
ai_provider_credentials_admin_page.dart add multi agent in ai and fast sell notification 2026-06-13 20:35:02 +00:00
ai_settings_page.dart more bug fix 2026-04-25 12:59:05 +00:00
ai_skills_admin_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
ai_voice_models_admin_page.dart bug fix in ai url sound customizer 2026-08-18 18:00:11 +00:00
announcements_admin_page.dart more bug fix 2026-04-25 12:59:05 +00:00
business_activity_logs_admin_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
businesses_list_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
currencies_admin_page.dart more bug fix 2026-04-25 12:59:05 +00:00
database_backup_page.dart bug fixin pdf export 2026-07-27 15:31:36 +00:00
document_monetization_page.dart more bug fix 2026-04-25 12:59:05 +00:00
email_settings_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
file_storage_settings_page.dart change file permissions 2026-04-14 19:34:55 +03:30
firewall_admin_page.dart add crm webchat 2026-04-26 02:08:31 +00:00
fx_providers_admin_page.dart add cloude code plugin 2026-10-18 17:17:25 +03:30
legacy_database_import_page.dart progress in latency import 2026-05-29 18:22:11 +03:30
marketplace_plugins_admin_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
motamed_asa_provider_admin_page.dart feat(tax): add Motamed ASA as a tax submission provider 2026-10-20 02:01:02 +03:00
notification_moderation_queue_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
notification_sms_pricing_page.dart more bug fix 2026-04-25 12:59:05 +00:00
payment_gateways_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
redis_settings_page.dart more bug fix 2026-04-25 12:59:05 +00:00
service_logs_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
share_link_settings_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
storage_management_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
storage_plans_admin_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
support_billing_stats_admin_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
support_operators_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
support_plans_admin_page.dart some bug fix in support ticket billings 2026-07-21 13:34:42 +00:00
system_configuration_page.dart some progress and bug fix 2026-10-16 21:37:05 +03:30
system_monitoring_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
system_monitoring_page_improved.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
system_monitoring_page_old.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
system_scripts_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
tax_product_codes_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
tax_provider_admin_page.dart start working with fanava modian broker 2026-10-13 12:57:27 +03:30
user_app_permissions_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
user_management_page.dart some more bug fixes that users reported 2026-09-15 08:53:44 +00:00
wallet_payouts_admin_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00
wallet_settings_page.dart more bug fix 2026-04-25 12:59:05 +00:00
zohal_services_admin_page.dart more bug fix 2026-04-25 12:59:05 +00:00
zohal_settings_page.dart more bug fix 2026-04-25 12:59:05 +00:00
zohal_statistics_page.dart some bug fix and 3 new themes 2026-09-01 20:52:34 +00:00