forked from hesabix/arc
| Filename | Latest commit message | Latest commit date |
|---|---|---|
«معتمد آسا» 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> |
||
| .. | ||
| barcode_label | ||
| account_model.dart | ||
| account_tree_node.dart | ||
| ai_models.dart | ||
| ai_stream_event.dart | ||
| ai_voice_models.dart | ||
| bank_account_model.dart | ||
| bom_models.dart | ||
| bulk_price_update_data.dart | ||
| business_dashboard_models.dart | ||
| business_models.dart | ||
| business_user_model.dart | ||
| cash_register.dart | ||
| catalog_specification_item.dart | ||
| credit_models.dart | ||
| customer_model.dart | ||
| document_model.dart | ||
| document_numbering_models.dart | ||
| email_models.dart | ||
| event_key_info.dart | ||
| expense_income_document.dart | ||
| frequent_description_item.dart | ||
| invoice_line_item.dart | ||
| invoice_list_item.dart | ||
| invoice_tag_ref.dart | ||
| invoice_transaction.dart | ||
| invoice_type_model.dart | ||
| notification_history_item.dart | ||
| notification_template_model.dart | ||
| paginated_response.dart | ||
| person_group_model.dart | ||
| person_model.dart | ||
| person_share_link.dart | ||
| person_social_platforms.dart | ||
| petty_cash.dart | ||
| ping_pong_score_model.dart | ||
| product_bundle.dart | ||
| product_form_data.dart | ||
| product_model.dart | ||
| product_supplier_item.dart | ||
| project_model.dart | ||
| public_invoice_details.dart | ||
| public_person_share_payload.dart | ||
| quick_link_tile_models.dart | ||
| quick_sales_change_resolution.dart | ||
| quick_sales_parked_sale.dart | ||
| quick_sales_payment_button.dart | ||
| receipt_payment_document.dart | ||
| repair_order_model.dart | ||
| repair_settings_model.dart | ||
| repair_technician_model.dart | ||
| response_template.dart | ||
| saved_filter.dart | ||
| support_models.dart | ||
| tax_settings_model.dart | ||
| transfer_document.dart | ||
| warehouse_document_model.dart | ||
| warehouse_invoice_source.dart | ||
| warehouse_model.dart | ||
| warranty_models.dart | ||
| workflow_editor_models.dart | ||
| workflow_editor_state.dart | ||
| workflow_history.dart | ||