# mohammadf69/accounting architecture

> Architecture diagram of the GitHub repository mohammadf69/accounting, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohammadf69/accounting
- Repository: https://github.com/mohammadf69/accounting

## Overview

This is a Windows desktop accounting application covering journal vouchers, payment orders and checks, account/product/supplier maintenance, inventory and production flows, financial reporting, and fiscal-year operations. The principal user path starts at the main menu, opens a task form, and uses domain services that read or write through the configured SQL connections; voucher work is handled by the Sanad service. The README is empty, so capabilities are inferred from the source tree and indexed references. Unsampled branches are represented without speculative call edges.

Main entry points: [`FrmMain.cs`](https://github.com/mohammadf69/accounting/blob/master/FrmMain.cs) (Main menu), [`Connections.cs`](https://github.com/mohammadf69/accounting/blob/master/Connections.cs) (SQL connections), [`Forms/FrmPaymentMannerDemandNotes.cs`](https://github.com/mohammadf69/accounting/blob/master/Forms/FrmPaymentMannerDemandNotes.cs) (Payment orders), [`Forms/FrmSanad.cs`](https://github.com/mohammadf69/accounting/blob/master/Forms/FrmSanad.cs) (Voucher entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop workflows"]
  node_main["Main menu<br/>[FrmMain.cs]"]
  node_voucher_ui["Voucher entry<br/>[FrmSanad.cs]"]
  node_payment_ui["Payment orders"]
  node_payment_single["Payment editor"]
  node_supplier_ui["Supplier maintenance<br/>[FrmSupplaer.cs]"]
  node_product_ui["Product maintenance<br/>[FrmProduct.cs]"]
  node_product_find["Product lookup<br/>[FrmProductFind.cs]"]
  node_report_ui["Flow reporting"]
end

subgraph group_accounting["Accounting domain"]
  node_sanad["Voucher service<br/>[Sanad.cs]"]
  node_payment_order["Payment order service"]
  node_year["Fiscal years<br/>[Year.cs]"]
  node_code["Code generation<br/>[GetNewCode.cs]"]
end

subgraph group_commerce["Goods and parties"]
  node_product["Product domain<br/>[Product.cs]"]
  node_supplier["Supplier domain<br/>[Supplier.cs]"]
  node_flow["Goods flows<br/>[Flow.cs]"]
  node_analysis["Analysis accounts<br/>[Anlaysis.cs]"]
end

subgraph group_reporting["Reports and output"]
  node_reports["Report templates<br/>[CrRepFlowDetail.cs]"]
  node_payment_reports["Payment reports<br/>[CrPaymentnew.cs]"]
  node_bank_reports["Bank check forms"]
end

subgraph group_persistence["Data access"]
  node_db[("Accounting database")]
  node_connections["SQL connections<br/>[Connections.cs]"]
end

node_user(("Accounting user"))

node_user -->|"opens"| node_main
node_main -->|"opens"| node_voucher_ui
node_main -->|"opens"| node_payment_ui
node_main -->|"opens"| node_supplier_ui
node_main -->|"opens"| node_product_ui
node_main -->|"opens"| node_report_ui
node_voucher_ui -->|"uses"| node_sanad
node_voucher_ui -->|"opens"| node_product_find
node_voucher_ui -->|"uses"| node_supplier
node_payment_ui -->|"uses"| node_payment_order
node_payment_ui -->|"uses"| node_sanad
node_payment_ui -->|"renders"| node_payment_reports
node_payment_ui -->|"renders"| node_bank_reports
node_payment_single -->|"uses"| node_payment_order
node_supplier_ui -->|"uses"| node_supplier
node_product_ui -->|"opens"| node_product_find
node_product_find -->|"looks up"| node_product
node_report_ui -->|"queries"| node_flow
node_report_ui -.->|"renders"| node_reports
node_sanad -->|"uses"| node_connections
node_payment_order -->|"uses"| node_connections
node_supplier -->|"uses"| node_connections
node_flow -->|"queries"| node_connections
node_year -->|"queries"| node_connections
node_connections -.->|"connects"| node_db
node_supplier -->|"gets codes"| node_code
node_flow -.->|"uses"| node_year
node_sanad -.->|"uses"| node_year

click node_main "https://github.com/mohammadf69/accounting/blob/master/FrmMain.cs"
click node_voucher_ui "https://github.com/mohammadf69/accounting/blob/master/Forms/FrmSanad.cs"
click node_payment_ui "https://github.com/mohammadf69/accounting/blob/master/Forms/FrmPaymentMannerDemandNotes.cs"
click node_payment_single "https://github.com/mohammadf69/accounting/blob/master/Forms/FrmPaymentMannerDemandNote.cs"
click node_supplier_ui "https://github.com/mohammadf69/accounting/blob/master/Forms/GForms/FrmSupplaer.cs"
click node_product_ui "https://github.com/mohammadf69/accounting/blob/master/Forms/GForms/FrmProduct.cs"
click node_product_find "https://github.com/mohammadf69/accounting/blob/master/Forms/GForms/FrmProductFind.cs"
click node_sanad "https://github.com/mohammadf69/accounting/blob/master/Class/Sanad.cs"
click node_payment_order "https://github.com/mohammadf69/accounting/blob/master/Class/HesabPaymenOrder.cs"
click node_year "https://github.com/mohammadf69/accounting/blob/master/Class/Year.cs"
click node_code "https://github.com/mohammadf69/accounting/blob/master/Class/GetNewCode.cs"
click node_product "https://github.com/mohammadf69/accounting/blob/master/Class/GClass/Product.cs"
click node_supplier "https://github.com/mohammadf69/accounting/blob/master/Class/GClass/Supplier.cs"
click node_flow "https://github.com/mohammadf69/accounting/blob/master/Class/GClass/Flow.cs"
click node_analysis "https://github.com/mohammadf69/accounting/blob/master/Class/GClass/Anlaysis.cs"
click node_report_ui "https://github.com/mohammadf69/accounting/blob/master/Forms/GForms/FrmRepGoodAndService.cs"
click node_reports "https://github.com/mohammadf69/accounting/blob/master/Reports/GReports/CrRepFlowDetail.cs"
click node_payment_reports "https://github.com/mohammadf69/accounting/blob/master/Reports/CrPaymentnew.cs"
click node_bank_reports "https://github.com/mohammadf69/accounting/blob/master/Reports/CrTejaratPreview96.cs"
click node_connections "https://github.com/mohammadf69/accounting/blob/master/Connections.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_voucher_ui,node_payment_ui,node_payment_single,node_supplier_ui,node_product_ui,node_product_find,node_report_ui,node_user toneBlue
class node_sanad,node_payment_order,node_year,node_code toneAmber
class node_product,node_supplier,node_flow,node_analysis toneMint
class node_reports,node_payment_reports,node_bank_reports toneRose
class node_db,node_connections toneIndigo
```

## Components

### Desktop workflows

- [Main menu](https://github.com/mohammadf69/accounting/blob/master/FrmMain.cs): `FrmMain.cs`
- [Voucher entry](https://github.com/mohammadf69/accounting/blob/master/Forms/FrmSanad.cs): `Forms/FrmSanad.cs`
- [Payment orders](https://github.com/mohammadf69/accounting/blob/master/Forms/FrmPaymentMannerDemandNotes.cs): `Forms/FrmPaymentMannerDemandNotes.cs`
- [Payment editor](https://github.com/mohammadf69/accounting/blob/master/Forms/FrmPaymentMannerDemandNote.cs): `Forms/FrmPaymentMannerDemandNote.cs`
- [Supplier maintenance](https://github.com/mohammadf69/accounting/blob/master/Forms/GForms/FrmSupplaer.cs): `Forms/GForms/FrmSupplaer.cs`
- [Product maintenance](https://github.com/mohammadf69/accounting/blob/master/Forms/GForms/FrmProduct.cs): `Forms/GForms/FrmProduct.cs`
- [Product lookup](https://github.com/mohammadf69/accounting/blob/master/Forms/GForms/FrmProductFind.cs): `Forms/GForms/FrmProductFind.cs`
- [Flow reporting](https://github.com/mohammadf69/accounting/blob/master/Forms/GForms/FrmRepGoodAndService.cs): `Forms/GForms/FrmRepGoodAndService.cs`

### Accounting domain

- [Voucher service](https://github.com/mohammadf69/accounting/blob/master/Class/Sanad.cs): `Class/Sanad.cs`
- [Payment order service](https://github.com/mohammadf69/accounting/blob/master/Class/HesabPaymenOrder.cs): `Class/HesabPaymenOrder.cs`
- [Fiscal years](https://github.com/mohammadf69/accounting/blob/master/Class/Year.cs): `Class/Year.cs`
- [Code generation](https://github.com/mohammadf69/accounting/blob/master/Class/GetNewCode.cs): `Class/GetNewCode.cs`

### Goods and parties

- [Product domain](https://github.com/mohammadf69/accounting/blob/master/Class/GClass/Product.cs): `Class/GClass/Product.cs`
- [Supplier domain](https://github.com/mohammadf69/accounting/blob/master/Class/GClass/Supplier.cs): `Class/GClass/Supplier.cs`
- [Goods flows](https://github.com/mohammadf69/accounting/blob/master/Class/GClass/Flow.cs): `Class/GClass/Flow.cs`
- [Analysis accounts](https://github.com/mohammadf69/accounting/blob/master/Class/GClass/Anlaysis.cs): `Class/GClass/Anlaysis.cs`

### Reports and output

- [Report templates](https://github.com/mohammadf69/accounting/blob/master/Reports/GReports/CrRepFlowDetail.cs): `Reports/GReports/CrRepFlowDetail.cs`
- [Payment reports](https://github.com/mohammadf69/accounting/blob/master/Reports/CrPaymentnew.cs): `Reports/CrPaymentnew.cs`
- [Bank check forms](https://github.com/mohammadf69/accounting/blob/master/Reports/CrTejaratPreview96.cs): `Reports/CrTejaratPreview96.cs`

### Data access

- **Accounting database**
- [SQL connections](https://github.com/mohammadf69/accounting/blob/master/Connections.cs): `Connections.cs`

### Other components

- **Accounting user**

## Connections

- Accounting user → Main menu: opens (evidence: `FrmMain.cs`)
- Main menu → Voucher entry: opens (evidence: `FrmMain.cs`)
- Main menu → Payment orders: opens (evidence: `FrmMain.cs`)
- Main menu → Supplier maintenance: opens (evidence: `FrmMain.cs`)
- Main menu → Product maintenance: opens (evidence: `FrmMain.cs`)
- Main menu → Flow reporting: opens (evidence: `FrmMain.cs`)
- Voucher entry → Voucher service: uses (evidence: `Forms/FrmSanad.cs`)
- Voucher entry → Product lookup: opens (evidence: `Forms/FrmSanad.cs`)
- Voucher entry → Supplier domain: uses (evidence: `Forms/FrmSanad.cs`)
- Payment orders → Payment order service: uses (evidence: `Forms/FrmPaymentMannerDemandNotes.cs`)
- Payment orders → Voucher service: uses (evidence: `Forms/FrmPaymentMannerDemandNotes.cs`)
- Payment orders → Payment reports: renders (evidence: `Forms/FrmPaymentMannerDemandNotes.cs`)
- Payment orders → Bank check forms: renders (evidence: `Forms/FrmPaymentMannerDemandNotes.cs`)
- Payment editor → Payment order service: uses (evidence: `Forms/FrmPaymentMannerDemandNote.cs`)
- Supplier maintenance → Supplier domain: uses (evidence: `Forms/GForms/FrmSupplaer.cs`)
- Product maintenance → Product lookup: opens (evidence: `Forms/GForms/FrmProductFind.cs`)
- Product lookup → Product domain: looks up (evidence: `Forms/GForms/FrmProductFind.cs`)
- Flow reporting → Goods flows: queries (evidence: `Forms/GForms/FrmRepGoodAndService.cs`)
- Flow reporting → Report templates: renders
- Voucher service → SQL connections: uses (evidence: `Class/Sanad.cs`)
- Payment order service → SQL connections: uses (evidence: `Class/HesabPaymenOrder.cs`)
- Supplier domain → SQL connections: uses (evidence: `Class/GClass/Supplier.cs`)
- Goods flows → SQL connections: queries (evidence: `Class/GClass/Flow.cs`)
- Fiscal years → SQL connections: queries (evidence: `Class/Year.cs`)
- SQL connections → Accounting database: connects
- Supplier domain → Code generation: gets codes (evidence: `Class/GClass/Supplier.cs`)
- Goods flows → Fiscal years: uses (evidence: `Class/GClass/Flow.cs`)
- Voucher service → Fiscal years: uses (evidence: `Class/Sanad.cs`)
