#  Rahhed LTD . — Third Branch End-to-End Demo Test Guide

This guide creates a complete, isolated demonstration for a new third branch. Follow the steps in order because later records depend on earlier records.

## 1. Test purpose and rules

The demo will verify:

- branch isolation;
- currencies and exchange rates;
- warehouses, products, prices, batches and expiry;
- opening stock and controlled stock movements;
- purchases, supplier payables and payments;
- sales, FEFO stock issuing, customer receivables and receipts;
- purchase and sales returns;
- warehouse transfers and stock adjustments;
- accounts, expenses, other income, employees, advances and payroll;
- automatic accounting, alerts, dashboards and reports.

Important rules:

1. Log in as the **super-admin**.
2. Do not reuse Kabul records unless the guide explicitly says so.
3. Use the exact demo codes below so records are easy to search and remove later.
4. A **draft does not change stock or final balances**. When a screen has a separate Post action, save and then post it.
5. Never post the same opening stock twice.
6. Use dates near the current test date. The examples below use September 2026.
7. If a field is not listed, leave it blank or keep its default.

## 2. Demo dataset summary

| Record | Demo value |
|---|---|
| Branch | Third Demo Branch |
| Main warehouse | TDB-MAIN — Third Branch Main Warehouse |
| Cold warehouse | TDB-COLD — Third Branch Cold Storage |
| Base currency | Afghani (AFN) |
| Foreign currency | US Dollar (USD) |
| Exchange rate | 1 USD = 70 AFN |
| Supplier | DEMO — Aryana Medical Supply |
| Customer | DEMO — Herat Pharmacy |
| Employee | DEMO — Ahmad Test Employee |
| Vaccine | DEMO-VAC-001 — Demo Poultry Vaccine |
| Gloves | DEMO-MED-001 — Demo Medical Gloves |
| Expense | DEMO — Branch transport expense |

## 3. Create and open the third branch

### Tab

**Home → Company & Settings → Branches → Add Branch**

### Fill the form

| Field | Enter/select |
|---|---|
| Select User | Select the super-admin or intended branch owner |
| Branch name | `Third Demo Branch` |
| Description | `End-to-end system test branch — September 2026` |

Click **Save**.

Return to **Home**. Open **Branches**, click **Third Demo Branch**, and keep working through its branch workspace. Opening pages from this workspace scopes the admin to this branch.

### Verify

- The branch appears as a card under Home → Branches.
- Clicking it displays cards for Overview, Sales, Purchases, Inventory, Finance, People and Reports.
- Kabul branch data must not appear in lists while the Third Demo Branch context is active.

## 4. Configure currencies

### Tab

**Home → Company & Settings → Currencies**

Company configuration is opened from Home. Select **Third Demo Branch** inside each branch-specific setup form.

Create the following two records.

### Currency 1

| Field | Enter/select |
|---|---|
| Title | `Afghani` |
| Description | `AFN — demo branch base currency` |
| Branch | `Third Demo Branch` |

### Currency 2

| Field | Enter/select |
|---|---|
| Title | `US Dollar` |
| Description | `USD — demo branch foreign currency` |
| Branch | `Third Demo Branch` |

Use the displayed currency names consistently. If the system already has branch-specific currencies, do not create duplicates.

## 5. Configure the company and expiry policy

### Tab

**Home → Company & Settings → Company Settings**

| Field | Enter/select |
|---|---|
| Company name | ` Rahhed LTD .` |
| Legal name | ` Rahhed LTD .` |
| Base/reporting currency | Select the appropriate `Afghani` currency |
| Expiry warning days | `30` |
| Phone | `0700000000` |
| Email | `demo@jawidtasal.local` |
| Address | `Afghanistan — demo configuration` |

Click **Save**. Company settings are company-wide, so do not change real contact details if they are already correct. The essential checks are the base currency and the 30-day expiry warning.

## 6. Add the exchange rate

### Tab

**Home → Company & Settings → Exchange Rates → Add**

| Field | Enter/select |
|---|---|
| Branch | `Third Demo Branch` |
| From currency | `US Dollar` |
| To currency | `Afghani` |
| Rate | `70` |
| Rate date | `2026-09-06` or today |

Save it. This means **1 USD = 70 AFN**. If the form expects the inverse direction for a later transaction, create the reverse rate as **1 AFN = 0.014285714 USD**.

## 7. Create two warehouses

### Tab

**Third Demo Branch → Inventory & Stock → Warehouses → Add Warehouse**

### Main warehouse

| Field | Enter/select |
|---|---|
| Branch | `Third Demo Branch` |
| Warehouse code | `TDB-MAIN` |
| Warehouse name | `Third Branch Main Warehouse` |
| Address | `Third Demo Branch — main store` |
| Active warehouse | On |

### Cold warehouse

| Field | Enter/select |
|---|---|
| Branch | `Third Demo Branch` |
| Warehouse code | `TDB-COLD` |
| Warehouse name | `Third Branch Cold Storage` |
| Address | `Third Demo Branch — cold room` |
| Active warehouse | On |

Verify that both warehouses appear and show **Active**.

## 8. Create financial accounts

### Tab

**Third Demo Branch → Finance & Accounts → Financial Accounts → Add Account**

Create these records. Use `0` for opening balance because controlled opening balances will be tested separately.

| Account type | Name | Currency | Extra fields | Opening balance | Note |
|---|---|---|---|---:|---|
| Cash | `TDB Cash AFN` | Afghani | None | 0 | `Third branch cashbox` |
| Bank | `TDB Bank AFN` | Afghani | Bank: `Demo Bank`; Account no.: `TDB-001` | 0 | `Third branch bank` |
| Cash | `TDB Cash USD` | US Dollar | None | 0 | `Third branch USD cashbox` |
| Sarafi | `TDB Sarafi USD` | US Dollar | Sarafi name: `Demo Sarafi` | 0 | `Third branch exchange account` |

Always select **Third Demo Branch** in the Branch field.

## 9. Post controlled account opening balances

### Tab

**Third Demo Branch → Finance & Accounts → Financial Opening Balances → Add Opening**

Create and post these two openings separately.

### Cash opening

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Opening type | Cash, bank or Sarafi account |
| Target | TDB Cash AFN |
| Currency | Afghani |
| Opening amount | `50000` |
| Exchange rate to base currency | `1` |
| Opening date | `2026-09-01` |
| Reference | `TDB-OPEN-CASH-001` |
| Notes | `Approved demo opening cash` |

Click **Save draft**, then use the row Actions menu and click **Post opening**.

### Bank opening

Use the same fields, but select **TDB Bank AFN**, enter `100000`, and use reference `TDB-OPEN-BANK-001`. Save and post it.

### Verify

Open **Dashboard/Business Overview** for the Third Demo Branch. Expected starting position:

- Cash: 50,000 AFN
- Bank: 100,000 AFN

## 10. Create categories and units

### Categories tab

**Third Demo Branch → Inventory & Stock → Product Categories → Add**

Create:

| Category name | Description | Branch |
|---|---|---|
| `DEMO Vaccines` | `Batch and expiry tracked demo products` | Third Demo Branch |
| `DEMO Medical Supplies` | `General medical supply demo products` | Third Demo Branch |

### Units tab

**Third Demo Branch → Inventory & Stock → Units of Measure → Add**

Create:

| Title | Description | Branch |
|---|---|---|
| `pc` | `Piece` | Third Demo Branch |
| `box` | `Box` | Third Demo Branch |

No unit conversion is expected. A quantity entered in pieces remains pieces.

## 11. Create products

### Tab

**Third Demo Branch → Inventory & Stock → Products → Add New Product**

### Product A — vaccine

| Field | Enter/select |
|---|---|
| Product name | `Demo Poultry Vaccine` |
| Product code | `DEMO-VAC-001` |
| Barcode | `629000000001` |
| Description | `Demo vaccine used for batch, expiry and FEFO testing` |
| Category | DEMO Vaccines |
| Default unit | pc |
| Minimum stock level | `25` |
| Batch tracking | On |
| Expiry tracking | On |
| Active product | On |
| Branch | Third Demo Branch |

### Product B — gloves

| Field | Enter/select |
|---|---|
| Product name | `Demo Medical Gloves` |
| Product code | `DEMO-MED-001` |
| Barcode | `629000000002` |
| Description | `Demo non-expiry medical supply` |
| Category | DEMO Medical Supplies |
| Default unit | box |
| Minimum stock level | `10` |
| Batch tracking | Off |
| Expiry tracking | Off |
| Active product | On |
| Branch | Third Demo Branch |

## 12. Set product selling prices

### Tab

**Third Demo Branch → Inventory & Stock → Product Prices → Add Price**

Create three price records:

| Product | Currency | Price type | Amount |
|---|---|---|---:|
| Demo Poultry Vaccine | Afghani | Retail | `180` |
| Demo Poultry Vaccine | Afghani | Wholesale | `160` |
| Demo Medical Gloves | Afghani | Retail | `350` |

These are selling prices. Purchase cost is entered separately on purchases/opening inventory.

## 13. Create supplier and customer

### Supplier tab

**Third Demo Branch → Purchases & Suppliers → Suppliers → Add Supplier**

| Field | Enter/select |
|---|---|
| Supplier name | `DEMO — Aryana Medical Supply` |
| Email | `supplier.demo@example.local` |
| Contact | `0700111222` |
| Address | `Demo Supplier Address, Afghanistan` |
| Opening balance | `0` |
| Opening balance currency | Afghani, if required |
| Branch | Third Demo Branch |

### Customer tab

**Third Demo Branch → Sales & Customers → Customers → Add Customer**

| Field | Enter/select |
|---|---|
| Customer name | `DEMO — Herat Pharmacy` |
| Email | `customer.demo@example.local` |
| Contact | `0700333444` |
| Address | `Demo Customer Address, Afghanistan` |
| Opening balance/existing dues | `0` |
| Opening balance currency | Afghani, if required |
| Branch | Third Demo Branch |

Opening balances stay zero here so that receivables and payables in this test come only from posted transactions.

## 14. Post opening inventory

### Tab

**Third Demo Branch → Inventory & Stock → Opening Inventory → Enter manually**

Select:

| Field | Enter/select |
|---|---|
| Warehouse | TDB-MAIN — Third Branch Main Warehouse |
| Reference/notes | `TDB approved opening count 2026-09-01` |

Add these three lines:

| Product | Batch | Manufactured | Expires | Quantity | Unit cost | Currency |
|---|---|---|---|---:|---:|---|
| Demo Poultry Vaccine | `VAC-NEAR-001` | 2026-03-01 | 2026-09-25 | 10 | 95 | Afghani |
| Demo Poultry Vaccine | `VAC-LONG-001` | 2026-04-01 | 2027-03-31 | 100 | 100 | Afghani |
| Demo Medical Gloves | leave blank; use `DEFAULT` only if required | leave blank | leave blank | 50 | 200 | Afghani |

Click **Validate & preview**.

Do not post if the preview shows errors. Correct the relevant line and validate again. When every row is valid, click **Post opening inventory**, then **Confirm and post**.

### Verify

Open **Inventory & Stock → Current Stock** and filter to `TDB-MAIN`.

Expected:

- vaccine total: 110 pc across two batches;
- gloves total: 50 boxes;
- the vaccine batch expiring 2026-09-25 should generate a near-expiry alert when within the configured 30-day window;
- opening movements should appear in inventory reports/movement history.

If stock is missing, the opening was probably only previewed and not posted.

## 15. Create and post a purchase

### Tab

**Third Demo Branch → Purchases & Suppliers → Purchases → Add Purchase**

### Header

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Supplier | DEMO — Aryana Medical Supply |
| Warehouse | TDB-MAIN |
| Currency | Afghani |
| Purchase date | `2026-09-06` |
| Supplier invoice number | `SUP-DEMO-1001` |
| Due date | `2026-10-06` |
| Discount amount | `0` |
| Document notes | `Demo credit purchase for third branch` |

### Item 1

| Field | Enter/select |
|---|---|
| Product | Demo Poultry Vaccine |
| Unit | pc |
| Quantity | `40` |
| Buy price/final landed unit cost | `110` |
| Wholesale price | `160` |
| Retail price | `180` |
| Batch number | `VAC-NEW-001` |
| Manufacture date | `2026-08-01` |
| Expiry date | `2027-08-01` |

### Payment fields

| Field | Enter/select |
|---|---|
| Received/Paid amount | `0` |
| Account | Leave empty if allowed |
| Exchange rate | `1` |
| Converted amount | Should remain 0 |
| Payment notes | `Purchase is fully on credit` |

Click **Submit/Save**. The purchase is saved as **Draft**. Return to the purchase list, open its Actions menu, and click **Post**.

### Verify

- Status changes from Draft to Posted.
- `VAC-NEW-001` adds 40 units to TDB-MAIN.
- Vaccine total becomes 150 units.
- Supplier payable becomes 4,400 AFN.
- Stock movement contains a PURCHASE movement.
- A journal entry should be created: Inventory debit and Supplier Payable credit.

## 16. Pay part of the supplier balance

### Tab

**Third Demo Branch → Purchases & Suppliers → Supplier Payments → Add Payment**

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Supplier | DEMO — Aryana Medical Supply |
| Payment account | TDB Bank AFN |
| Currency | Afghani |
| Payment amount | `1400` |
| Service charge | `100` |
| Payment date | `2026-09-07` |
| Reference | `TDB-SP-001` |
| Notes | `Partial supplier settlement plus bank charge` |
| Allocate | Allocate `1400` to purchase SUP-DEMO-1001 |

Click **Save draft**, then use Actions to **Post** the payment.

### Verify

- Supplier payable reduces by 1,400 AFN, not by 1,500.
- Service charge 100 AFN is treated separately as an expense.
- TDB Bank AFN decreases by 1,500 AFN.
- Remaining purchase payable is 3,000 AFN before any purchase return.

## 17. Create and post a sale to test FEFO

### Tab

**Third Demo Branch → Sales & Customers → Sales → Add New Sale**

### Header

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Customer | DEMO — Herat Pharmacy |
| Warehouse | TDB-MAIN |
| Sale date | `2026-09-08` |
| Currency | Afghani |
| Discount amount | `60` |
| Employee | Leave blank for now |
| Note | `Demo FEFO partial-credit sale` |
| Price type | Retail |

### Sale item

| Field | Enter/select |
|---|---|
| Product | Demo Poultry Vaccine |
| Available quantity | Read-only; should show approximately 150 |
| Quantity | `12` |
| Unit | pc; it should select automatically |
| Sale price | `180`; it should come from Product Prices |

Gross total is 12 × 180 = 2,160 AFN. After the 60 AFN discount, the invoice total should be 2,100 AFN.

### Initial receipt

| Field | Enter/select |
|---|---|
| Received amount | `1000` |
| Account | TDB Cash AFN |
| Exchange rate | `1` |
| Converted amount | `1000` |
| Payment notes | `Cash received at sale` |

Click **Save & Post Sale**.

### Verify

- Sale status is Posted.
- Total invoice is 2,100 AFN.
- Paid is 1,000 AFN and customer receivable is 1,100 AFN.
- Stock decreases by 12 units.
- FEFO consumes all 10 units from `VAC-NEAR-001`, then 2 units from `VAC-LONG-001`.
- `VAC-NEAR-001` should have zero available quantity.
- TDB Cash AFN increases from 50,000 to 51,000 before later transactions.
- Accounting should include Cash, Accounts Receivable, Sales Revenue, Inventory and Cost of Goods Sold effects.

If the product price is empty, verify the AFN retail Product Price record. If the unit is empty, verify the product Default Unit.

## 18. Receive a partial customer payment

### Tab

**Third Demo Branch → Sales & Customers → Customer Receipts → Add Receipt**

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Customer | DEMO — Herat Pharmacy |
| Receiving account | TDB Bank AFN |
| Currency | Afghani |
| Receipt amount | `600` |
| Receipt date | `2026-09-09` |
| Reference | `TDB-CR-001` |
| Notes | `Partial settlement of demo sale` |
| Allocate | Allocate `600` to the posted demo sale |

Save the draft, then **Post** it from the Actions menu.

### Verify

- Customer receivable decreases from 1,100 to 500 AFN.
- TDB Bank AFN increases by 600 AFN.
- The sale payment history shows the initial 1,000 and the later 600 allocation.

## 19. Create a partial sales return

### Tab

**Third Demo Branch → Sales & Customers → Sales Returns → Add Return**

| Field | Enter/select |
|---|---|
| Search sale | Select the posted 2,100 AFN demo sale |
| Return reason | `Customer returned two unopened units` |
| Return quantity | `2` for Demo Poultry Vaccine |
| Cash refund now | `0` |
| Refund account | Leave empty because cash refund is zero |

Save/post the return according to the screen action.

### Verify

- Two units return to the original warehouse/batch logic.
- The customer balance or retained credit is reduced by the calculated return value.
- No cash leaves an account because Cash refund now was zero.
- Revenue, receivable/refund, stock and COGS are reversed proportionally.
- A SALE_RETURN stock movement exists.

The exact return value may reflect the invoice discount allocation; use the amount displayed by the system rather than manually assuming 2 × 180.

## 20. Create a partial purchase return

### Tab

**Third Demo Branch → Purchases & Suppliers → Purchase Returns → Add Return**

| Field | Enter/select |
|---|---|
| Search purchase | Select SUP-DEMO-1001 |
| Return reason | `Five units damaged on delivery inspection` |
| Return quantity | `5` for Demo Poultry Vaccine |

Save/post it.

### Verify

- Five units leave `VAC-NEW-001`.
- Supplier payable decreases by 5 × 110 = 550 AFN, subject to the posted document calculation.
- Remaining supplier payable should move from 3,000 to approximately 2,450 AFN.
- A PURCHASE_RETURN stock movement and reversing journal are created.

## 21. Transfer stock between warehouses

### Tab

**Third Demo Branch → Inventory & Stock → Warehouse Transfers → Add Transfer**

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Transfer date | `2026-09-10` |
| Source warehouse | TDB-MAIN |
| Destination warehouse | TDB-COLD |
| Product | Demo Poultry Vaccine |
| Batch | Select `VAC-LONG-001` |
| Quantity | `5` |
| Notes | `Move vaccine to demo cold storage` |

Click **Save draft**, then post/dispatch/receive it using the available status actions until it reaches its completed/received status.

### Verify

- TDB-MAIN loses 5 units.
- TDB-COLD gains 5 units of the same product and batch.
- Total branch stock does not change.
- TRANSFER_OUT and TRANSFER_IN movements exist.
- No sales revenue, purchase expense, receivable or payable is created.

## 22. Test a controlled stock adjustment

### Tab

**Third Demo Branch → Inventory & Stock → Stock Adjustments → Add Adjustment**

### Increase test

| Field | Enter/select |
|---|---|
| Warehouse | TDB-MAIN |
| Adjustment date | `2026-09-11` |
| Reason | `Physical count found one unopened vaccine` |
| Document notes | `Approved demo count correction` |
| Product | Demo Poultry Vaccine |
| Batch | VAC-LONG-001 |
| Direction | Increase |
| Quantity | `1` |
| Unit cost | `100` |

Save as draft and then **Post adjustment**.

### Decrease test

Create another adjustment:

| Field | Enter/select |
|---|---|
| Warehouse | TDB-MAIN |
| Adjustment date | `2026-09-11` |
| Reason | `One vaccine vial damaged during handling` |
| Product | Demo Poultry Vaccine |
| Batch | VAC-LONG-001 |
| Direction | Decrease |
| Quantity | `1` |
| Unit cost | Automatic/read-only |

Save and post.

### Verify

- The increase adds one and the decrease removes one, so the net quantity is unchanged.
- Both immutable adjustment movements remain visible.
- The system never permits a decrease greater than available stock.

## 23. Create an employee

### Tab

**Third Demo Branch → Employees & Access → Employees → Add Employee**

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Name | `DEMO — Ahmad Test Employee` |
| Email | `employee.demo@example.local` |
| Contact | `0700555666` |
| Address | `Third Demo Branch` |
| Salary | `12000` |
| Age | `28` |
| Contract date | `2026-09-01` |
| Contract duration | Select the closest available one-year/12-month option |

Save the employee.

## 24. Record an employee advance

### Tab

**Third Demo Branch → Finance & Accounts → Employee Advances → Add**

| Field | Enter/select |
|---|---|
| Employee | DEMO — Ahmad Test Employee |
| Currency | Afghani |
| Amount | `1000` |
| Account | TDB Cash AFN |
| Exchange rate | `1` |
| Converted amount | `1000` |
| Year | `2026` |
| Month | September |
| Payment date | `2026-09-12` |
| Notes | `Demo September salary advance` |

Save/post according to the available action. Verify that the cash account decreases and the advance is associated with the employee.

## 25. Record payroll

### Tab

**Third Demo Branch → Finance & Accounts → Payroll → Add Payroll**

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Employee | DEMO — Ahmad Test Employee |
| Employee salary | Should show 12,000 |
| Currency | Afghani |
| Amount | `5000` |
| Account | TDB Bank AFN |
| Exchange rate | `1` |
| Converted amount | `5000` |
| Remaining amount | Confirm the system-calculated value |
| Month/Year | September 2026 |
| Payment date | `2026-09-30` |
| Notes | `Demo partial September payroll` |

Save/post it. Verify the bank account reduction, payroll record and accounting entry.

## 26. Record an operating expense

First create an expense category.

### Category tab

**Third Demo Branch → Finance & Accounts → Expense Categories → Add**

| Field | Enter/select |
|---|---|
| Name | `DEMO Transport` |
| Description | `Demo branch delivery and transport costs` |
| Branch | Third Demo Branch |

### Expense tab

**Third Demo Branch → Finance & Accounts → Expenses → Add Expense**

| Field | Enter/select |
|---|---|
| Branch | Third Demo Branch |
| Category | DEMO Transport |
| Expense by | `DEMO — Ahmad Test Employee` or `Admin` |
| Amount | `500` |
| Currency | Afghani |
| Account | TDB Cash AFN |
| Exchange rate | `1` |
| Converted amount | `500` |
| Payment date | `2026-09-13` |
| Notes | `Demo customer delivery transport` |

Save as draft and post it. Verify that cash decreases by 500 AFN, the expense appears in the dashboard breakdown, and the accounting journal debits expense and credits cash.

## 27. Record other/passive income

### Tab

**Third Demo Branch → Finance & Accounts → Other Income → Add**

| Field | Enter/select |
|---|---|
| Name | `DEMO Storage Service Income` |
| Account | TDB Cash AFN |
| Branch | Third Demo Branch |
| Currency | Afghani |
| Amount | `700` |
| Exchange rate | `1` |
| Converted amount | `700` |
| Income date | `2026-09-14` |
| Notes | `Demo non-sales income` |

Save/post it. Verify that cash increases by 700 AFN and the entry is not counted as product sales.

## 28. Test an account transfer

### Tab

**Third Demo Branch → Finance & Accounts → Account Transfers → Add Transfer**

Use these values where the form provides the corresponding fields:

| Field | Enter/select |
|---|---|
| From account | TDB Cash AFN |
| To account | TDB Bank AFN |
| Amount | `2000` |
| Date | `2026-09-15` |
| Reference/notes | `TDB cash deposit to bank` |

Save/post the transfer.

### Verify

- Cash decreases by 2,000 AFN.
- Bank increases by 2,000 AFN.
- Total AFN across the two accounts does not change.
- Transfer history and journals show both sides.

## 29. Optional cross-currency/Sarafi test

### Tab

**Third Demo Branch → Finance & Accounts → Finance & Sarafi**

Create a draft conversion/transfer using:

| Field/concept | Value |
|---|---|
| Source account | TDB Cash AFN |
| Destination account | TDB Sarafi USD |
| Source amount | `7000 AFN` |
| Destination amount | `100 USD` |
| Exchange rate | `70 AFN per USD` |
| Fee/service charge | `5 USD` only if you specifically want to test fees |
| Reference | `TDB-FX-001` |

Review both currency amounts carefully before posting. After posting, verify the historical exchange-rate snapshot and the separate treatment of any fee.

## 30. Verify alerts

### Tab

Use the top notification bell or **Overview → Operational Alerts**.

Confirm:

- the near-expiry batch appears while its expiry is within 30 days and quantity is positive;
- a product appears as low stock when its total reaches or falls below its Minimum stock level;
- expired stock, if later created for testing, remains visible but cannot be sold;
- customer and supplier dues correspond to outstanding posted balances;
- alerts belong to Third Demo Branch, not Kabul.

To force a low-stock alert safely, sell or adjust Demo Medical Gloves until its positive quantity is 10 or lower. Do not create negative inventory.

## 31. Verify dashboards

### Business Overview

**Third Demo Branch → Overview → Business Overview**

Check:

- posted sales and purchases;
- customer receivables and supplier payables;
- cash, bank and Sarafi balances by currency;
- active alerts;
- top-selling product;
- expense breakdown;
- branch name and selected period.

### Today’s Dashboard

**Third Demo Branch → Overview → Today’s Dashboard**

Use transaction dates equal to today if you want every demo transaction to appear in today-only figures. Otherwise, use the Business Overview date filters for `2026-09-01` through `2026-09-30`.

## 32. Verify accounting

### Chart of Accounts

**Third Demo Branch → Finance & Accounts → Chart of Accounts**

Confirm required accounts exist and are grouped under Assets, Liabilities, Equity, Revenue and Expenses.

### Journal Entries

**Third Demo Branch → Finance & Accounts → Journal Entries**

Inspect journals generated by:

- financial openings;
- posted purchase;
- supplier payment and service charge;
- posted sale and initial receipt;
- customer receipt;
- sales and purchase returns;
- expense, payroll, advance and other income;
- account/Sarafi transfers.

Every posted journal must balance: **total debits = total credits**. Drafts must not affect the General Ledger.

### Accounting Reports

Open **General Ledger**, **Trial Balance**, and **Profit & Loss** for Third Demo Branch and the September 2026 period.

Confirm:

- Trial Balance total debit equals total credit.
- Sales revenue does not include passive income.
- Cost of Goods Sold comes from issued stock cost, not the selling price.
- Expenses include transport, supplier service charge and payroll where applicable.
- Voided or draft documents do not affect final totals.

## 33. Verify standardized reports

### Tab

**Third Demo Branch → Reports → Reports Center**

Use date range `2026-09-01` to `2026-09-30` and select Third Demo Branch where a branch filter is shown.

Check:

1. **Sales Performance** — demo posted sale, quantity, revenue and customer.
2. **Purchase Analysis** — SUP-DEMO-1001 and its posted totals.
3. **Inventory Report** — warehouse/batch quantities, average cost, expiry and movement history.
4. **Finance Report** — cash/bank/Sarafi movements and balances.
5. **Receivable & Payable Aging** — outstanding customer and supplier amounts in correct age buckets.
6. **Customer Statement** — sale, receipt, return and remaining balance.
7. **Supplier Statement** — purchase, payment, service charge treatment, return and remaining balance.
8. **General Ledger, Trial Balance and P&L** — balanced accounting and correct classifications.

Export each major report once to PDF and XLSX. Compare the exported totals with the screen totals.

## 34. Verify branch isolation

Return to **Home → Branches** and open the Kabul branch. Search for `DEMO-`.

Expected:

- Third Demo Branch products, customers, suppliers, accounts and transactions do not appear in Kabul.
- Reopen Third Demo Branch and the demo records reappear.
- A normal branch user assigned only to Third Demo Branch cannot manually access another branch by changing a URL or request ID.

## 35. Negative and safety tests

Perform these without completing an invalid post:

| Test | Expected result |
|---|---|
| Sell more than available stock | Posting is blocked |
| Sell an expired batch | Posting is blocked |
| Enter expiry before manufacture date | Validation error |
| Transfer more than source batch quantity | Validation/posting is blocked |
| Decrease stock below zero | Posting is blocked |
| Post an unbalanced manual journal | Posting is blocked |
| Allocate payment above payment amount | Validation is blocked |
| Allocate more than invoice outstanding | Validation is blocked |
| Edit a posted stock movement | Not allowed |
| Open another branch as restricted user | Access denied or data remains scoped |

## 36. Final pass checklist

Mark each item only after checking the resulting page/data.

- [ ] Third Demo Branch created and accessible from Home → Branches
- [ ] Branch workspace displays business-area cards
- [ ] Two active warehouses created
- [ ] AFN and USD configured with dated exchange rate
- [ ] Cash, bank and Sarafi accounts created
- [ ] Controlled financial openings posted
- [ ] Categories, units and products created
- [ ] Product retail/wholesale prices saved
- [ ] Opening inventory validated and posted once
- [ ] Stock visible by warehouse and batch
- [ ] Purchase posted and stock/payable increased
- [ ] Supplier payment posted and correctly allocated
- [ ] Sale posted and FEFO allocation confirmed
- [ ] Customer receipt posted and correctly allocated
- [ ] Sales return restored stock and adjusted finance/accounting
- [ ] Purchase return reduced stock and payable
- [ ] Warehouse transfer preserved total branch stock
- [ ] Stock adjustments created immutable movements
- [ ] Employee, advance and payroll recorded
- [ ] Expense and passive income recorded correctly
- [ ] Account and optional Sarafi transfers balanced
- [ ] Alerts show correct branch exceptions
- [ ] Dashboard totals reconcile to source transactions
- [ ] General Ledger journals balance
- [ ] Trial Balance total debit equals total credit
- [ ] Standard reports and exports match screen totals
- [ ] Branch isolation and permission tests pass

## 37. When something does not match

Record these details before reporting the issue:

1. Page/tab name.
2. Branch and warehouse selected.
3. Record number, such as sale, purchase, payment or adjustment number.
4. Document status: Draft, Posted or Void.
5. Expected value and actual value.
6. Currency and exchange rate.
7. Product, batch and quantity if inventory-related.
8. Screenshot of the form and resulting table.
9. Browser error and backend terminal error, if any.

The most common reason for a missing stock or balance change is that a document was saved as **Draft** but was not **Posted**.
