# Testing SOP

Step-by-step testing guide with real test data. Follow each section in order — later sections depend on data created earlier.

After each sub-section, verify the expected balances and stock before moving on.

***

## Test Data Reference

**Warehouses:** Haridwar, Kankhal **Vendors:** Hemkund Traders **Customers:** Arora Dairy, Mohan Puri, Mohan Sweet, Bikaner New **Items:** Amul Butter 500 GM, Amul Cream 1 LTR, Mix Veg 1 KG

***

## SECTION 1 — Master Data Setup

### 1.1 Warehouses

Navigate to **Master > Warehouses > New**

| # | Name     | Notes               |
| - | -------- | ------------------- |
| 1 | Haridwar | Primary warehouse   |
| 2 | Kankhal  | Secondary warehouse |

**Verify:** Both warehouses appear in the list.

**Combination — Duplicate name:**

* Try creating a third warehouse also named **Haridwar**
* Expected: system shows an error and does not save

***

### 1.2 Taxes

Navigate to **Master > Taxes > New**

| # | Name    | Rate | Type      |
| - | ------- | ---- | --------- |
| 1 | GST 0%  | 0%   | Inclusive |
| 2 | GST 5%  | 5%   | Inclusive |
| 3 | GST 12% | 12%  | Exclusive |
| 4 | GST 18% | 18%  | Exclusive |

**Verify:** All 4 taxes appear and are active.

**Combination — Toggle inactive:**

* Click **Toggle Active** on GST 18%
* Navigate to **Master > Items > New** and open the tax dropdown
* Expected: GST 18% does not appear
* Re-activate GST 18% before continuing

***

### 1.3 Units

Navigate to **Master > Units > New**

| # | Name   | Short Code |
| - | ------ | ---------- |
| 1 | Box    | BOX        |
| 2 | Pieces | PCS        |
| 3 | Bag    | BAG        |
| 4 | Karate | KRT        |
| 5 | Litre  | LTR        |

**Combination — Duplicate name:**

* Try creating another unit named **Box**
* Expected: system shows error, does not save

***

### 1.4 Item Companies (Brands)

Navigate to **Master > Item Companies > New**

| # | Name  |
| - | ----- |
| 1 | Amul  |
| 2 | Paras |
| 3 | Barar |

***

### 1.5 Item Categories

Navigate to **Master > Item Categories > New**

| # | Name   |
| - | ------ |
| 1 | Dairy  |
| 2 | Frozen |

***

### 1.6 Zones

Navigate to **Master > Zones > New**

| # | Name       |
| - | ---------- |
| 1 | Bhupatwala |
| 2 | Ranipur    |

> Note: System may auto-create North/South/East/West/Central. Add Bhupatwala and Ranipur on top.

***

### 1.7 Price Categories

Navigate to **Master > Price Categories > New**

| # | Name      | Default? |
| - | --------- | -------- |
| 1 | End User  | Yes      |
| 2 | Bulk User | No       |

**Verify:** End User is marked as default.

**Combination — Change default:**

* Click **Set Default** on Bulk User
* Expected: Bulk User becomes default, End User loses the default flag
* Switch back: click **Set Default** on End User before continuing

***

### 1.8 Bank Accounts

Navigate to **Master > Bank Accounts > New**

| # | Name         | Type | Default for Sales | Default for POS |
| - | ------------ | ---- | ----------------- | --------------- |
| 1 | HDFC Current | Bank | Yes               | No              |
| 2 | PhonePe UPI  | UPI  | No                | Yes             |

**Combination — Two accounts same default:**

* Try setting PhonePe UPI as default for Sales as well
* Expected: HDFC Current loses the sales default flag; only one account is default per purpose at a time

***

### 1.9 Customers (Parties)

Navigate to **Master > Parties > New** — Type: Customer

**Customer 1: Arora Dairy**

* Price Category: End User
* Opening Balance: 10,000/- (To Receive)
* Zone: Bhupatwala
* Credit Limit: Unlimited

**Customer 2: Mohan Puri**

* Price Category: Bulk User
* Opening Balance: Nil
* Zone: Bhupatwala
* Credit Limit: 10,000/-

**Customer 3: Mohan Sweet**

* Price Category: End User
* Opening Balance: Nil
* Zone: Ranipur
* Credit Limit: Unlimited

**Customer 4: Bikaner New**

* Price Category: End User
* Opening Balance: Nil
* Zone: Ranipur
* Credit Limit: Unlimited

**Verify:**

| Party       | Expected Balance    |
| ----------- | ------------------- |
| Arora Dairy | 10,000/- Receivable |
| Mohan Puri  | 0/-                 |
| Mohan Sweet | 0/-                 |
| Bikaner New | 0/-                 |

Dashboard: Total Receivable = **10,000/-**, Total Payable = **0/-**

**Combination — Toggle inactive party:**

* Click **Toggle Active** on Bikaner New
* Go to **Sales > Invoices > New Invoice** and open the party dropdown
* Expected: Bikaner New does not appear in the list
* Re-activate Bikaner New before continuing

**Combination — Duplicate phone number:**

* Try creating a 5th party with the same phone number as Arora Dairy
* Expected: system shows error or warning about duplicate phone

***

### 1.10 Vendor (Party)

Navigate to **Master > Parties > New** — Type: Vendor

**Vendor 1: Hemkund Traders**

* Opening Balance: 20,000/- (To Pay)

**Verify:**

| Party           | Expected Balance |
| --------------- | ---------------- |
| Hemkund Traders | 20,000/- Payable |

Dashboard: Total Receivable = **10,000/-**, Total Payable = **20,000/-**

***

### 1.11 Items

Navigate to **Master > Items > New**

**Item 1: Amul Butter 500 GM**

| Field           | Value                      |
| --------------- | -------------------------- |
| Name            | Amul Butter 500 GM         |
| Category        | Dairy                      |
| Brand           | Amul                       |
| Primary Unit    | Box                        |
| Secondary Unit  | Piece                      |
| Conversion      | 1 Box = 30 Pieces          |
| Purchase Price  | 9,000/-                    |
| MRP             | 10,500/-                   |
| Tax             | GST 5% (Inclusive)         |
| End User Price  | 10,500/-                   |
| Bulk User Price | 9,750/-                    |
| Warehouse       | Haridwar, Opening Stock: 0 |

**Item 2: Amul Cream 1 LTR**

| Field           | Value                      |
| --------------- | -------------------------- |
| Name            | Amul Cream 1 LTR           |
| Category        | Dairy                      |
| Brand           | Amul                       |
| Primary Unit    | Box                        |
| Secondary Unit  | Piece                      |
| Conversion      | 1 Box = 12 Pieces          |
| Purchase Price  | 2,400/-                    |
| MRP             | 3,000/-                    |
| Tax             | GST 12% (Exclusive)        |
| End User Price  | 3,000/- + tax              |
| Bulk User Price | 2,880/- + tax              |
| Warehouse       | Haridwar, Opening Stock: 0 |

**Item 3: Mix Veg 1 KG**

| Field           | Value                      |
| --------------- | -------------------------- |
| Name            | Mix Veg 1 KG               |
| Category        | Frozen                     |
| Brand           | Barar                      |
| Primary Unit    | Bag                        |
| Secondary Unit  | Piece                      |
| Conversion      | 1 Bag = 30 Pieces          |
| Purchase Price  | 3,000/-                    |
| MRP             | 4,500/-                    |
| Tax             | GST 0% (Inclusive)         |
| End User Price  | 4,500/-                    |
| Bulk User Price | 3,750/-                    |
| Warehouse       | Haridwar, Opening Stock: 0 |

**Verify:** All 3 items appear in the items list.

**Combination — Tax calculation check on item:**

* Open Amul Butter 500 GM → verify End User price 10,500/- inclusive of 5% GST means base = 10,000/-, tax = 500/-
* Open Amul Cream 1 LTR → verify End User price 3,000/- exclusive of 12% means tax = 360/-, total = 3,360/-
* Open Mix Veg 1 KG → verify 0% tax means tax = 0/- on any quantity

**Combination — Item with both warehouses:**

* Edit Amul Butter 500 GM → add Kankhal warehouse with Opening Stock: 0
* Verify item now has stock entries for both Haridwar and Kankhal

***

## SECTION 2 — Purchase Flow

### 2.1 Purchase Orders

Navigate to **Purchase > Orders > New Order**

**PO 1 — Single item:**

| Field           | Value                      |
| --------------- | -------------------------- |
| Vendor          | Hemkund Traders            |
| Item            | Amul Butter 500 GM         |
| Quantity        | 10 Box                     |
| Rate            | 9,000/- (Inclusive GST 5%) |
| Expected Amount | 9,000/-                    |

Click Save.

**PO 2 — Single item, exclusive tax:**

| Field               | Value            |
| ------------------- | ---------------- |
| Vendor              | Hemkund Traders  |
| Item                | Amul Cream 1 LTR |
| Quantity            | 5 Box            |
| Amount              | 12,000/-         |
| Tax (12% Exclusive) | 1,440/-          |
| Total Bill Amount   | 13,440/-         |

Click Save.

**PO 3 — Multi-item in one order:**

| Field  | Value                     |
| ------ | ------------------------- |
| Vendor | Hemkund Traders           |
| Item 1 | Amul Butter 500 GM, 2 Box |
| Item 2 | Mix Veg 1 KG, 3 Bag       |

Click Save. This PO stays as **Pending** — do not convert it yet (used to test cancel below).

**Verify:** All 3 POs appear with status: Pending

**Combination — Cancel a PO:**

* Select PO 3 → click **Cancel**
* Expected: PO status changes to Cancelled, no stock or ledger entries are made
* Verify Hemkund Traders balance is still 20,000/- (unchanged)

***

### 2.2 Convert Purchase Orders to Invoices

**Single convert:**

* Open PO 1 → click **Convert to Invoice**
* Verify: Amul Butter 500 GM = 10 Box in inventory

**Bulk convert:**

* Go to **Purchase > Orders** list
* Select PO 2 (only)
* Click **Bulk Convert to Invoice**

**Verify:**

* Amul Cream 1 LTR = 5 Box in inventory
* Hemkund Traders: 20,000 + 9,000 + 13,440 = **42,440/- Payable**
* Purchase > Invoices: 2 invoices listed

***

### 2.3 Purchase Invoice (Direct, zero tax)

Navigate to **Purchase > Invoices > New Invoice**

| Field       | Value           |
| ----------- | --------------- |
| Vendor      | Hemkund Traders |
| Item        | Mix Veg 1 KG    |
| Quantity    | 5 Bag           |
| Bill Amount | 15,000/-        |
| Tax         | 0/-             |
| Total       | 15,000/-        |

Click Save.

**Verify:**

* Inventory: Mix Veg 1 KG = 5 Bag
* Hemkund Traders: 42,440 + 15,000 = **57,440/- Payable**
* Purchase > Invoices: 3 invoices listed

**Combination — Multi-item invoice:**

Navigate to **Purchase > Invoices > New Invoice**

| Field  | Value                                                  |
| ------ | ------------------------------------------------------ |
| Vendor | Hemkund Traders                                        |
| Item 1 | Amul Butter 500 GM, 2 Box, 9,000/- inclusive           |
| Item 2 | Amul Cream 1 LTR, 1 Box, 2,400/- + 288/- tax = 2,688/- |
| Total  | 11,688/-                                               |

Click Save.

**Verify:**

* Amul Butter = 12 Box, Amul Cream = 6 Box
* Hemkund Traders: 57,440 + 11,688 = **69,128/- Payable**

**Combination — Copy invoice:**

* Open the multi-item invoice just created → click **Copy**
* System opens a new invoice pre-filled with same vendor and items, date reset to today
* Change Amul Butter quantity to 1 Box (remove Amul Cream line) → Save

**Verify:**

* Amul Butter = 13 Box
* Hemkund Traders: 69,128 + 9,000 = **78,128/- Payable**

***

### 2.4 Purchase Return

Navigate to **Purchase > Returns > New Return**

**Return 1 — Partial return of Amul Butter (inclusive tax):**

| Field              | Value                                        |
| ------------------ | -------------------------------------------- |
| Vendor             | Hemkund Traders                              |
| Select Invoice     | (select the original Amul Butter PO invoice) |
| Item               | Amul Butter 500 GM                           |
| Quantity           | 1 Box                                        |
| Amount (Inclusive) | 9,000/-                                      |
| Tax                | 428.57/-                                     |
| Total              | 9,000/-                                      |

Click Save.

**Verify:**

* Amul Butter = 12 Box
* Hemkund Traders: 78,128 - 9,000 = **69,128/- Payable**

**Return 2 — Partial return of Amul Cream (exclusive tax):**

| Field          | Value                              |
| -------------- | ---------------------------------- |
| Vendor         | Hemkund Traders                    |
| Select Invoice | (select the Amul Cream PO invoice) |
| Item           | Amul Cream 1 LTR                   |
| Quantity       | 1 Box                              |
| Amount         | 2,400/-                            |
| Tax (12%)      | 288/-                              |
| Total          | 2,688/-                            |

Click Save.

**Verify:**

* Amul Cream = 5 Box
* Hemkund Traders: 69,128 - 2,688 = **66,440/- Payable**

**Combination — Return more than invoiced quantity:**

* Try returning 15 Box of Amul Butter from the original 10-Box invoice
* Expected: system blocks with a validation error (max returnable is 10 Box, minus 1 already returned = 9 Box max)

**Combination — Return from already fully returned invoice:**

* Return all remaining 9 Box from the Amul Butter invoice
* Then try creating another return against the same invoice
* Expected: system shows no returnable items or blocks the return

***

### 2.5 Bill Payments

Navigate to **Purchase > Bill Payments > New Payment**

**Payment 1: Cash**

| Field          | Value           |
| -------------- | --------------- |
| Vendor         | Hemkund Traders |
| Payment Method | Cash            |
| Amount         | 1,000/-         |

Click Save.

**Verify:**

* Hemkund Traders: 66,440 - 1,000 = **65,440/- Payable**
* Dashboard: Cash Balance = -1,000/-

**Payment 2: UPI/Bank**

| Field          | Value           |
| -------------- | --------------- |
| Vendor         | Hemkund Traders |
| Payment Method | UPI/Bank        |
| Amount         | 1,000/-         |

Click Save.

**Verify:**

* Hemkund Traders: 65,440 - 1,000 = **64,440/- Payable**
* Dashboard: UPI/Bank Balance = -1,000/-

**Payment 3: Cheque → Clear**

| Field          | Value           |
| -------------- | --------------- |
| Vendor         | Hemkund Traders |
| Payment Method | Cheque          |
| Amount         | 5,000/-         |
| Cheque No      | 500001          |

Click Save → Go to **Purchase > Cheque Register** → locate cheque → click **Clear**

**Verify:**

* Hemkund Traders: 64,440 - 5,000 = **59,440/- Payable**

**Payment 4: Cheque → Bounce with charges**

| Field          | Value           |
| -------------- | --------------- |
| Vendor         | Hemkund Traders |
| Payment Method | Cheque          |
| Amount         | 2,000/-         |

Click Save → Go to **Purchase > Cheque Register** → click **Bounce**

| Field            | Value              |
| ---------------- | ------------------ |
| Reason           | Insufficient Funds |
| Bouncing Charges | 150/-              |

Click Save.

**Verify:**

* 2,000/- is reversed (cheque bounced) + 150/- charges added
* Hemkund Traders: 59,440 + 150 = **59,590/- Payable**

**Combination — Edit purchase invoice after payment:**

* Open the original Amul Butter invoice (which has at least one return and is partially paid)
* Try to edit items or amount
* Expected: system blocks editing because receipt amount > 0

***

### 2.6 Debit Note

Navigate to **Purchase > Debit Notes > New Debit Note**

**Debit Note 1:**

| Field  | Value                             |
| ------ | --------------------------------- |
| Vendor | Hemkund Traders                   |
| Amount | 1,000/-                           |
| Reason | Price difference on last shipment |

Click Save.

**Verify:** Hemkund Traders: 59,590 - 1,000 = **58,590/- Payable**

**Debit Note 2 — Higher amount:**

| Field  | Value                      |
| ------ | -------------------------- |
| Vendor | Hemkund Traders            |
| Amount | 2,500/-                    |
| Reason | Damaged goods not returned |

Click Save.

**Verify:** Hemkund Traders: 58,590 - 2,500 = **56,090/- Payable**

***

## SECTION 3 — Sales Flow

**Stock before sales section:**

* Amul Butter 500 GM: 3 Box (after all returns)
* Amul Cream 1 LTR: 5 Box
* Mix Veg 1 KG: 5 Bag

> Note: Actual numbers depend on your purchase section results. Recheck inventory before starting.

***

### 3.1 Sales Order → Convert to Invoice

Navigate to **Sales > Orders > New Order**

**Order 1 — Single item, End User pricing:**

| Field               | Value                  |
| ------------------- | ---------------------- |
| Customer            | Arora Dairy (End User) |
| Item                | Amul Cream 1 LTR       |
| Quantity            | 1 Box                  |
| Amount              | 3,000/-                |
| GST (12% Exclusive) | 360/-                  |
| Total               | 3,360/-                |

Click Save → Go to **Sales > Orders** → Convert to Invoice.

**Verify:**

* Amul Cream = 4 Box
* Arora Dairy: 10,000 (opening) + 3,360 = **13,360/- Receivable**

**Order 2 — Bulk User pricing auto-fill:**

Navigate to **Sales > Orders > New Order**

| Field    | Value                  |
| -------- | ---------------------- |
| Customer | Mohan Puri (Bulk User) |
| Item     | Amul Butter 500 GM     |
| Quantity | 1 Box                  |

**Verify that rate auto-fills as 9,750/- and NOT 10,500/-**

Click Save → Convert to Invoice.

**Verify:**

* Amul Butter = 2 Box
* Mohan Puri: **9,750/- Receivable**
* Dashboard: Total Receivable = 13,360 + 9,750 = **23,110/-**

**Order 3 — Multi-item order:**

Navigate to **Sales > Orders > New Order**

| Field    | Value                   |
| -------- | ----------------------- |
| Customer | Mohan Sweet             |
| Item 1   | Amul Cream 1 LTR, 1 Box |
| Item 2   | Mix Veg 1 KG, 1 Bag     |

Verify totals auto-calculate for each item. Click Save → Convert to Invoice.

**Verify:**

* Amul Cream = 3 Box, Mix Veg = 4 Bag
* Mohan Sweet: (3,000 + 360) + 4,500 = **7,860/- Receivable**

**Combination — Bulk convert multiple orders to invoices:**

Create 2 more orders:

* Order A: Arora Dairy — Mix Veg 1 KG, 1 Bag
* Order B: Bikaner New — Amul Cream 1 LTR, 1 Box

Go to **Sales > Orders** → select both → **Bulk Convert to Invoice**

**Verify:**

* Both invoices created simultaneously
* Mix Veg = 3 Bag, Amul Cream = 2 Box
* Arora Dairy: 13,360 + 4,500 = **17,860/-**
* Bikaner New: 3,000 + 360 = **3,360/-**

***

### 3.2 Sales Invoice (Direct)

Navigate to **Sales > Invoices > New Invoice**

**Invoice 1 — Secondary unit (Pieces):**

| Field       | Value        |
| ----------- | ------------ |
| Customer    | Arora Dairy  |
| Item        | Mix Veg 1 KG |
| Quantity    | 5 Pieces     |
| Bill Amount | 750/-        |

Click Save.

**Verify:**

* Mix Veg = 2 Bag 25 Pieces (3 Bag minus 5 Pieces = 2 Bag 25 Pieces)
* Arora Dairy: 17,860 + 750 = **18,610/-**

**Invoice 2 — With partial payment at time of invoice:**

| Field                 | Value              |
| --------------------- | ------------------ |
| Customer              | Mohan Sweet        |
| Item                  | Amul Butter 500 GM |
| Quantity              | 1 Box              |
| Bill Amount           | 10,500/-           |
| Amount Paid (Receipt) | 5,000/-            |

Click Save.

**Verify:**

* Amul Butter = 1 Box
* Mohan Sweet: 7,860 + 10,500 - 5,000 = **13,360/-**
* Cash balance increases by 5,000/-

**Combination — Copy invoice:**

* Open Invoice 2 (Mohan Sweet — Amul Butter) → click **Copy**
* System opens new invoice pre-filled: Mohan Sweet, Amul Butter 1 Box, date = today, paid amount = 0
* Change quantity to 1 Box → Save (if stock allows — if out of stock, see negative stock combo below)

**Combination — Negative stock OFF, sell beyond available:**

* Go to **Admin > Settings > Inventory** → confirm Negative Stock = OFF
* Create a sales invoice for Amul Butter 500 GM — quantity 100 Box (far beyond available stock)
* Expected: system blocks with a stock insufficient error

**Combination — Negative stock ON, sell beyond available:**

* Go to **Admin > Settings > Inventory** → set Negative Stock = ON
* Create the same invoice for 100 Box
* Expected: system allows it, stock goes negative
* Delete this invoice after verifying, then turn Negative Stock back OFF

***

### 3.3 Credit Limit Enforcement

Mohan Puri has a credit limit of 10,000/-. Current balance after Section 3.1: 9,750/-.

**Invoice within limit:**

| Field    | Value        |
| -------- | ------------ |
| Customer | Mohan Puri   |
| Item     | Mix Veg 1 KG |
| Quantity | 5 Pieces     |
| Amount   | 625/-        |

Click Save. (9,750 + 625 = 10,375 — over limit) Expected: system warns or blocks because the new invoice pushes the balance beyond 10,000/-.

**Invoice that stays under limit:**

| Field    | Value        |
| -------- | ------------ |
| Customer | Mohan Puri   |
| Item     | Mix Veg 1 KG |
| Quantity | 1 Piece      |
| Amount   | 150/-        |

Click Save. (9,750 + 150 = 9,900 — within limit) Expected: system allows this one.

**Verify:** Mohan Puri: **9,900/- Receivable**

***

### 3.4 Quotation Flow

Navigate to **Sales > Quotations > New Quotation**

**Quotation 1 — Draft to Invoice:**

| Field    | Value              |
| -------- | ------------------ |
| Customer | Bikaner New        |
| Item     | Mix Veg 1 KG       |
| Quantity | 1 Bag              |
| Rate     | 4,500/- (End User) |
| Total    | 4,500/-            |

Click Save — status: Draft Update status → **Sent** Update status → **Accepted** Click **Convert to Invoice**

**Verify:**

* Mix Veg = 1 Bag 25 Pieces (2 Bag 25 Pieces minus 1 Bag)
* Bikaner New: 3,360 + 4,500 = **7,860/-**

**Quotation 2 — Rejected quotation (no invoice):**

| Field    | Value            |
| -------- | ---------------- |
| Customer | Mohan Sweet      |
| Item     | Amul Cream 1 LTR |
| Quantity | 2 Box            |
| Total    | 7,920/-          |

Click Save → Update status → **Rejected**

**Verify:**

* Mohan Sweet balance is unchanged (no invoice created)
* Stock unchanged
* Quotation shows status: Rejected and Convert button is disabled

***

### 3.5 Sales Return

Navigate to **Sales > Returns > New Return**

**Return 1 — Full return of Bikaner New invoice:**

| Field          | Value                                     |
| -------------- | ----------------------------------------- |
| Customer       | Bikaner New                               |
| Select Invoice | (the Mix Veg quotation-converted invoice) |
| Item           | Mix Veg 1 KG                              |
| Quantity       | 1 Bag                                     |
| Amount         | 4,500/-                                   |

Click Save.

**Verify:**

* Mix Veg = 2 Bag 25 Pieces (stock restored)
* Bikaner New: 7,860 - 4,500 = **3,360/-**

**Return 2 — Partial return:**

| Field          | Value                         |
| -------------- | ----------------------------- |
| Customer       | Arora Dairy                   |
| Select Invoice | (the Mix Veg 5-piece invoice) |
| Item           | Mix Veg 1 KG                  |
| Quantity       | 2 Pieces                      |
| Amount         | 300/-                         |

Click Save.

**Verify:**

* Mix Veg increases by 2 Pieces
* Arora Dairy: 18,610 - 300 = **18,310/-**

**Combination — Return more than invoiced quantity:**

* Open the same Arora Dairy Mix Veg invoice (originally 5 Pieces, 2 already returned = 3 returnable left)
* Try creating a return for 10 Pieces
* Expected: system blocks — max returnable is 3 Pieces

**Combination — Return against already fully returned invoice:**

* Complete Return 1 above (full return of Bikaner New Mix Veg)
* Try creating another return on the same invoice
* Expected: system shows no items available to return or blocks entirely

***

### 3.6 Payment Receipts

Navigate to **Sales > Payment Receipts > New Receipt**

**Receipt 1 — Cash:**

| Field          | Value       |
| -------------- | ----------- |
| Customer       | Arora Dairy |
| Payment Method | Cash        |
| Amount         | 10,000/-    |

Click Save.

**Verify:**

* Arora Dairy: 18,310 - 10,000 = **8,310/-**
* Cash balance increases by 10,000/-

**Receipt 2 — UPI/Bank:**

| Field          | Value       |
| -------------- | ----------- |
| Customer       | Arora Dairy |
| Payment Method | UPI/Bank    |
| Amount         | 5,000/-     |

Click Save.

**Verify:**

* Arora Dairy: 8,310 - 5,000 = **3,310/-**
* Bank balance increases by 5,000/-

**Receipt 3 — Cheque → Clear:**

| Field          | Value       |
| -------------- | ----------- |
| Customer       | Arora Dairy |
| Payment Method | Cheque      |
| Amount         | 3,310/-     |
| Cheque No      | 001234      |

Click Save → Go to **Sales > Cheque Register** → locate → click **Clear**

**Verify:**

* Arora Dairy: 3,310 - 3,310 = **0/- (Nil)**

**Receipt 4 — Cheque → Bounce with charges:**

| Field          | Value      |
| -------------- | ---------- |
| Customer       | Mohan Puri |
| Payment Method | Cheque     |
| Amount         | 2,000/-    |
| Cheque No      | 001235     |

Click Save → Go to **Sales > Cheque Register** → click **Bounce**

| Field            | Value                |
| ---------------- | -------------------- |
| Reason           | Insufficient Balance |
| Bouncing Charges | 200/-                |

Click Save.

**Verify:**

* Mohan Puri: 9,900 + 200 (charges) = **10,100/- Receivable** (cheque reversed + charges added)

**Combination — View outstanding invoices while making receipt:**

* Start a new receipt for Arora Dairy
* Click **View Outstanding Invoices** (if available on receipt form)
* Expected: list shows all unpaid/partially paid invoices for Arora Dairy

***

### 3.7 Credit Note

Navigate to **Sales > Credit Notes > New Credit Note**

**Credit Note 1:**

| Field    | Value              |
| -------- | ------------------ |
| Customer | Mohan Puri         |
| Amount   | 100/-              |
| Reason   | Pricing adjustment |

Click Save.

**Verify:** Mohan Puri: 10,100 - 100 = **10,000/-**

**Credit Note 2 — Wipe remaining balance:**

| Field    | Value               |
| -------- | ------------------- |
| Customer | Bikaner New         |
| Amount   | 3,360/-             |
| Reason   | Goodwill adjustment |

Click Save.

**Verify:** Bikaner New: 3,360 - 3,360 = **0/- (Nil)**

***

## SECTION 4 — POS (Point of Sale)

**Stock before POS:**

* Mix Veg 1 KG: \~2 Bag 27 Pieces
* Amul Cream 1 LTR: 3 Box
* Amul Butter 500 GM: 1 Box

Navigate to **Sales > POS**

**POS Sale 1 — Walk-in, single item, cash:**

| Field    | Value         |
| -------- | ------------- |
| Customer | Walk-in (new) |
| Item     | Mix Veg 1 KG  |
| Quantity | 5 Pieces      |
| Amount   | 750/-         |
| Payment  | Cash          |

Click Complete. **Verify:** Cash increases by 750/-, stock reduces by 5 Pieces.

**POS Sale 2 — Walk-in, UPI, WhatsApp share:**

| Field    | Value            |
| -------- | ---------------- |
| Customer | Walk-in          |
| Item     | Amul Cream 1 LTR |
| Quantity | 2 Pieces         |
| Payment  | UPI/Bank         |

Click Complete → click **Share via WhatsApp** → verify WhatsApp link is generated and opens correctly.

**POS Sale 3 — Existing party, multiple items:**

| Field    | Value                         |
| -------- | ----------------------------- |
| Customer | Mohan Sweet (select existing) |
| Item 1   | Mix Veg 1 KG, 3 Pieces        |
| Item 2   | Amul Cream 1 LTR, 1 Piece     |
| Payment  | Cash                          |

Click Complete.

**Verify:**

* Mohan Sweet balance is updated with this POS amount
* Both items reduce in stock
* POS invoice appears in the POS list

**POS Sale 4 — Print receipt:**

| Field    | Value        |
| -------- | ------------ |
| Customer | Walk-in      |
| Item     | Mix Veg 1 KG |
| Quantity | 2 Pieces     |
| Payment  | Cash         |

Click Complete → click **Print** → verify receipt prints with item, quantity, total, and business name.

**Combination — POS out of stock:**

* Attempt a POS sale for Amul Butter 500 GM — quantity 50 Box (beyond available)
* With Negative Stock OFF: expected system blocks
* With Negative Stock ON: expected system allows

***

## SECTION 5 — Inventory Operations

### 5.1 Stock Adjustment

Navigate to **Inventory > Adjustments > New Adjustment**

**Adjustment 1 — Add stock (physical count):**

| Field     | Value                    |
| --------- | ------------------------ |
| Warehouse | Haridwar                 |
| Item      | Amul Butter 500 GM       |
| Type      | Add                      |
| Quantity  | 10 Box                   |
| Reason    | Opening stock correction |

Click Save. **Verify:** Amul Butter increases by 10 Box in Haridwar.

**Adjustment 2 — Remove stock (damaged goods):**

| Field     | Value            |
| --------- | ---------------- |
| Warehouse | Haridwar         |
| Item      | Amul Cream 1 LTR |
| Type      | Remove           |
| Quantity  | 1 Box            |
| Reason    | Damaged          |

Click Save. **Verify:** Amul Cream reduces by 1 Box.

**Combination — Remove more than available (Negative Stock OFF):**

* Go to **Admin > Settings > Inventory** → confirm Negative Stock = OFF
* Try removing 100 Box of Mix Veg (way more than available)
* Expected: system blocks with stock insufficient error

**Combination — Adjustment history:**

* Navigate to **Inventory > Adjustments** list
* Filter by Haridwar warehouse
* Verify both adjustments above appear with reason and timestamp

***

### 5.2 Warehouse Transfer

Navigate to **Inventory > Transfers > New Transfer**

**Transfer 1 — Normal transfer:**

| Field    | Value        |
| -------- | ------------ |
| From     | Haridwar     |
| To       | Kankhal      |
| Item     | Mix Veg 1 KG |
| Quantity | 1 Bag        |

Click Save.

**Verify:**

* Haridwar: Mix Veg reduces by 1 Bag
* Kankhal: Mix Veg increases by 1 Bag
* Transfer appears in history with both warehouse names

**Transfer 2 — Multiple items:**

| Field  | Value                     |
| ------ | ------------------------- |
| From   | Haridwar                  |
| To     | Kankhal                   |
| Item 1 | Amul Butter 500 GM, 2 Box |
| Item 2 | Amul Cream 1 LTR, 1 Box   |

Click Save. **Verify:** Both items reduce in Haridwar and increase in Kankhal.

**Combination — Transfer more than available:**

* Try transferring 500 Box of Amul Butter from Haridwar to Kankhal
* Expected: system blocks — cannot transfer more than current warehouse stock

**Combination — Same warehouse source and destination:**

* Try creating a transfer from Haridwar to Haridwar
* Expected: system shows validation error

***

### 5.3 Item Batches

Navigate to **Inventory > Batches > New Batch**

**Batch 1 — Expiring soon (within 30 days):**

| Field       | Value              |
| ----------- | ------------------ |
| Item        | Amul Cream 1 LTR   |
| Batch No    | BCH-001            |
| Expiry Date | 20 days from today |
| Quantity    | 2 Box              |
| Warehouse   | Haridwar           |

Click Save. Navigate to **Inventory > Batches > Expiring Soon** — BCH-001 should appear.

**Batch 2 — Already expired:**

| Field       | Value            |
| ----------- | ---------------- |
| Item        | Amul Cream 1 LTR |
| Batch No    | BCH-002          |
| Expiry Date | Yesterday        |
| Quantity    | 1 Box            |
| Warehouse   | Haridwar         |

Click Save. Navigate to **Inventory > Batches > Expired** — BCH-002 should appear.

**Write-off Batch 2:**

* Select BCH-002 → click **Write Off**
* Confirm: Amul Cream stock reduces by 1 Box in Haridwar

**Combination — Batch with far future expiry:**

| Field       | Value              |
| ----------- | ------------------ |
| Item        | Mix Veg 1 KG       |
| Batch No    | BCH-003            |
| Expiry Date | 2 years from today |
| Quantity    | 1 Bag              |
| Warehouse   | Kankhal            |

Click Save. Navigate to **Expiring Soon** — BCH-003 should NOT appear. Navigate to **Expired** — BCH-003 should NOT appear. Navigate to **All Batches** — BCH-003 should appear.

***

## SECTION 6 — Expenses

### 6.1 Expense Categories

Navigate to **Expenses > Categories > New**

| # | Name        |
| - | ----------- |
| 1 | Rent        |
| 2 | Electricity |
| 3 | Salaries    |
| 4 | Transport   |

**Combination — Duplicate category:**

* Try creating a 5th category also named **Rent**
* Expected: system shows error

***

### 6.2 Expense Entries

Navigate to **Expenses > New Expense**

**Expense 1 — Rent, Cash:**

| Field          | Value   |
| -------------- | ------- |
| Category       | Rent    |
| Amount         | 5,000/- |
| Payment Method | Cash    |
| Date           | Today   |

Click Save. **Verify:** Cash balance reduces by 5,000/-.

**Expense 2 — Electricity, UPI/Bank:**

| Field          | Value       |
| -------------- | ----------- |
| Category       | Electricity |
| Amount         | 2,500/-     |
| Payment Method | UPI/Bank    |
| Date           | Today       |

Click Save. **Verify:** Bank balance reduces by 2,500/-.

**Expense 3 — Salaries, large amount, UPI/Bank:**

| Field          | Value    |
| -------------- | -------- |
| Category       | Salaries |
| Amount         | 25,000/- |
| Payment Method | UPI/Bank |
| Date           | Today    |

Click Save. **Verify:** Bank balance reduces by 25,000/-.

**Expense 4 — Cheque → Clear:**

| Field          | Value     |
| -------------- | --------- |
| Category       | Transport |
| Amount         | 3,000/-   |
| Payment Method | Cheque    |

Click Save → Go to Cheque Register → **Clear** the cheque. **Verify:** Bank/Cheque balance reflects -3,000/-.

**Expense 5 — Cheque → Bounce:**

| Field          | Value     |
| -------------- | --------- |
| Category       | Transport |
| Amount         | 1,000/-   |
| Payment Method | Cheque    |

Click Save → Go to Cheque Register → **Bounce** **Verify:** Amount is reversed. Net effect = 0/-.

**Combination — Same category, different dates:**

* Create another Rent expense for 5,000/- but set date to **last month**
* Navigate to **Expenses** → filter by current month → last month's rent should NOT appear
* Remove filter → both Rent entries should appear

**Combination — View total expenses:**

* Navigate to **Expenses > Total**
* Set date range to today
* Verify total matches sum of today's expenses (5,000 + 2,500 + 25,000 + 3,000 = 35,500/-)

***

## SECTION 7 — Agents

### 7.1 Create Agents

Navigate to **Agents > New Agent**

| # | Name         | Phone      | Territory  |
| - | ------------ | ---------- | ---------- |
| 1 | Ramesh Kumar | 9800000001 | Bhupatwala |
| 2 | Suresh Singh | 9800000002 | Ranipur    |

**Combination — Toggle inactive:**

* Toggle Suresh Singh to inactive
* Verify he does not appear when selecting agent on a new order
* Re-activate before continuing

***

### 7.2 Agent Orders

Navigate to **Agents > Orders > New Order**

**Order 1 — Accept and convert:**

| Field    | Value              |
| -------- | ------------------ |
| Agent    | Ramesh Kumar       |
| Customer | Mohan Sweet        |
| Item     | Amul Butter 500 GM |
| Quantity | 2 Box              |

Click Save → **Accept** → Convert to Invoice

**Verify:**

* Invoice created for Mohan Sweet: 2 × 10,500 = 21,000/-
* Amul Butter stock reduces by 2 Box

**Order 2 — Partial accept:**

| Field    | Value            |
| -------- | ---------------- |
| Agent    | Ramesh Kumar     |
| Customer | Arora Dairy      |
| Item     | Amul Cream 1 LTR |
| Quantity | 3 Box            |

Click Save → **Partial Accept** → change quantity to 2 Box → Confirm

Convert to Invoice.

**Verify:**

* Invoice created for 2 Box only (not 3)
* Amul Cream reduces by 2 Box

**Order 3 — Reject:**

| Field    | Value        |
| -------- | ------------ |
| Agent    | Suresh Singh |
| Customer | Bikaner New  |
| Item     | Mix Veg 1 KG |
| Quantity | 2 Bag        |

Click Save → **Reject**

**Verify:**

* No invoice created
* Bikaner New balance unchanged
* Mix Veg stock unchanged

**Order 4 — Multi-item order:**

| Field    | Value                   |
| -------- | ----------------------- |
| Agent    | Ramesh Kumar            |
| Customer | Mohan Puri              |
| Item 1   | Mix Veg 1 KG, 1 Bag     |
| Item 2   | Amul Cream 1 LTR, 1 Box |

Click Save → **Accept** → Convert to Invoice

**Verify:**

* Invoice created with both items
* Mohan Puri balance increases accordingly

***

### 7.3 Agent Collections

Navigate to **Agents > Collections > New Collection**

**Collection 1 — Single, Cash:**

| Field          | Value        |
| -------------- | ------------ |
| Agent          | Ramesh Kumar |
| Customer       | Mohan Sweet  |
| Amount         | 5,000/-      |
| Payment Method | Cash         |

Click Save.

**Collection 2 — Single, UPI/Bank:**

| Field          | Value        |
| -------------- | ------------ |
| Agent          | Suresh Singh |
| Customer       | Mohan Puri   |
| Amount         | 3,000/-      |
| Payment Method | UPI/Bank     |

Click Save.

**Convert individually:**

* Open Collection 1 → **Convert to Receipt**
* Verify: Mohan Sweet balance reduces by 5,000/-, cash balance increases

**Bulk convert:**

* Go to **Agents > Collections** list
* Select Collection 2 (and any other pending collections)
* Click **Convert to Receipts (Bulk)**
* Verify: all selected collections become payment receipts

***

## SECTION 8 — Reports

### 8.1 Party Ledger

Navigate to **Reports > Party Ledger**

**Check Arora Dairy:**

* All invoices, receipts, returns, credit notes should be listed
* Running balance after each transaction should be correct
* Final balance should match the number shown on the party card in **Master > Parties**

**Check Hemkund Traders:**

* All purchase invoices, returns, bill payments, debit notes listed
* Running balance correct throughout
* Final balance matches party card

**Combination — Date range filter:**

* Set date to yesterday only
* Today's transactions should not appear
* Remove filter — all transactions visible again

***

### 8.2 Sales Register

Navigate to **Reports > Sales Register**

* Set date range: current month
* All sales invoices in this period should appear
* Tax columns: verify GST 0%, GST 5%, GST 12% are broken out separately
* Grand total should match the sum of all sales invoice amounts

**Combination — Filter by party:**

* Filter by **Arora Dairy** only
* Only Arora Dairy invoices should appear

**Combination — Filter by item:**

* Filter by **Amul Butter 500 GM**
* Only invoices containing that item should appear

***

### 8.3 Purchase Register

Navigate to **Reports > Purchase Register**

* Set date range: current month
* All purchase invoices should appear with tax breakdown
* Verify inclusive and exclusive tax amounts are accurate for each invoice

**Combination — Vendor filter:**

* Filter by **Hemkund Traders** only
* Only Hemkund Traders invoices appear

***

### 8.4 Day Book

Navigate to **Reports > Day Book**

* Select **today**
* All of today's transactions (sales, purchase, payments, expenses) should appear
* Verify: every entry is either a debit or credit, nothing is missing

**Combination — Past date:**

* Select a past date where data exists
* Verify only that day's transactions appear — not today's

***

### 8.5 Transaction Ledger

Navigate to **Reports > Transaction Ledger**

* Select **Cash Account** — all cash inflows (receipts) and outflows (payments, expenses) listed
* Select **HDFC Current (Bank)** — all bank transactions listed
* Running balance on each should match Dashboard figures

***

### 8.6 Profit & Loss

Navigate to **Reports > Profit & Loss**

* Set date range: current month
* Revenue = all sales (minus returns)
* Expenses = all expense entries
* Gross Profit and Net Profit shown
* Verify figures are consistent with all entries made in Sections 2–6

**Combination — Narrow date range:**

* Set date range to only the first week of testing
* P\&L should reflect only that period's transactions

***

### 8.7 Balance Sheet

Navigate to **Reports > Balance Sheet**

* Assets: Cash balance, Bank balance, Total Receivables (all customers)
* Liabilities: Total Payables (all vendors)
* Verify totals match dashboard figures exactly

***

### 8.8 Low Stock Report

Navigate to **Reports > Low Stock**

* Edit an item and set minimum stock level higher than current stock (e.g. set Amul Butter min stock = 50 Box)
* Navigate to **Reports > Low Stock** — Amul Butter should now appear in the list
* Verify quantity shown matches current warehouse stock

***

## SECTION 9 — Admin

### 9.1 Users

Navigate to **Admin > Users > New User**

**User 1: Sales Staff**

| Field            | Value            |
| ---------------- | ---------------- |
| Name             | Priya Sharma     |
| Email            | <priya@test.com> |
| Warehouse Access | Haridwar only    |

Click Save.

**User 2: Warehouse Staff**

| Field            | Value           |
| ---------------- | --------------- |
| Name             | Ravi Kumar      |
| Email            | <ravi@test.com> |
| Warehouse Access | Kankhal only    |

Click Save.

**Combination — Duplicate email:**

* Try creating a 3rd user with the same email as Priya Sharma
* Expected: system shows error

***

### 9.2 Roles and Permissions

Navigate to **Admin > Roles > New Role**

**Role 1: Sales Staff**

* Assign: View Invoice, Create Invoice, Create Receipt, View Orders
* Deny: Delete Invoice, Admin Settings, Purchase module

**Role 2: Purchase Staff**

* Assign: View Purchase Invoice, Create Purchase Invoice, Create Bill Payment
* Deny: Sales module, Admin Settings

Assign Priya Sharma → Sales Staff role Assign Ravi Kumar → Purchase Staff role

**Verify — Sales Staff login (Priya):**

* Sales menu visible: Yes
* Purchase menu visible: No
* Admin menu visible: No
* Delete button on invoices: Not visible

**Verify — Purchase Staff login (Ravi):**

* Purchase menu visible: Yes
* Sales menu visible: No
* Admin menu visible: No

**Combination — Multiple roles on one user:**

* Assign Priya both Sales Staff and Purchase Staff roles
* Verify she can now see both Sales and Purchase menus
* Remove Purchase Staff role → Purchase menu disappears again

**Combination — Warehouse access restriction:**

* Log in as Ravi Kumar (Kankhal only)
* Navigate to Inventory → Ravi should only see Kankhal stock, not Haridwar

***

### 9.3 Settings

Navigate to **Admin > Settings**

**Invoice prefix and numbering:**

* Set prefix: INV, starting number: 1001
* Create a new sales invoice → verify number shows as INV-1001
* Create another → INV-1002

**Tax defaults:**

* Set default tax to GST 5%
* Create a new item → verify GST 5% is pre-selected in tax field

**Negative stock toggle (both states):**

State 1 — OFF:

* Go to Settings > Inventory → Negative Stock = OFF
* Try to sell 1,000 Box of Amul Butter (far beyond stock)
* Expected: system blocks with stock error

State 2 — ON:

* Set Negative Stock = ON
* Try the same sale
* Expected: system allows, stock goes negative
* Discard or delete that invoice, set Negative Stock back to OFF

***

## SECTION 10 — Print and Documents

### 10.1 Print Sales Invoice

Navigate to **Sales > Invoices** → open any invoice → click **Print**

* Paper size A4: verify party name, items, quantities, GST breakdown, total, company header
* Paper size A5: verify layout adjusts, nothing is cut off
* Paper size Letter: verify layout works

### 10.2 Print Purchase Invoice

Navigate to **Purchase > Invoices** → open any invoice → click **Print**

* Verify vendor name, items, tax (inclusive vs exclusive shown correctly), total

### 10.3 Print Payment Receipt

Navigate to **Sales > Payment Receipts** → open any receipt → click **Print**

* Verify: customer name, amount, payment method, date, receipt number

### 10.4 Bulk Print Delivery Challans

Navigate to **Sales > Orders** → select 3 or more orders → **Bulk Print Challans**

* Verify: each order prints on a separate page
* Verify: party name, items, quantities on each challan

### 10.5 Document Share Link

Navigate to **Sales > Invoices** → open any invoice → click **Share**

* A unique URL is generated
* Open the URL in an incognito browser (not logged in)
* Invoice should be visible without login
* Verify: amounts, party name, items all show correctly

### 10.6 Print Settings — Branding

Navigate to **Admin > Print Settings**

* Upload a company logo image
* Set custom header text (e.g. company tagline)
* Set footer text (e.g. "Thank you for your business")
* Print any invoice → verify logo and custom text appear

**Combination — Logo size edge case:**

* Upload a very large image file (5MB+) as logo
* Expected: system either compresses it or shows an error with max file size
* Upload a small valid logo and verify it displays correctly

### 10.7 WhatsApp Share (POS)

Navigate to **Sales > POS** → open any POS invoice → click **Share via WhatsApp**

* WhatsApp share link opens (on mobile) or shows the link (on desktop)
* Verify the link contains correct invoice info

***

## Final State Verification

After completing all sections, verify the following:

| Check                | Expected                                                        |
| -------------------- | --------------------------------------------------------------- |
| Arora Dairy          | 0/- or small balance depending on Section 7 invoices            |
| Mohan Puri           | 10,000/- approx (credit limit reached)                          |
| Mohan Sweet          | Positive balance (invoiced via agent + direct)                  |
| Bikaner New          | 0/- (credit note wiped balance)                                 |
| Hemkund Traders      | Large payable balance minus all payments and debit notes        |
| Amul Butter stock    | Haridwar + Kankhal (after adjustments and transfers)            |
| Amul Cream stock     | Reduced from returns, batch write-offs, sales                   |
| Mix Veg stock        | Split across Haridwar and Kankhal                               |
| Cash balance         | Net of all cash sales receipts minus cash payments and expenses |
| Bank/UPI balance     | Net of all bank receipts minus bank payments and expenses       |
| Dashboard Receivable | Sum of all customer balances                                    |
| Dashboard Payable    | Sum of all vendor balances                                      |
| P\&L                 | Shows net profit after all sales revenue minus all expenses     |
| Balance Sheet        | Assets = Liabilities + Equity (balanced)                        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.comprogtech.com/lalaji-erp/testing-sop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
