# Mahendra Jewellers - Retail Jewellery Shop Management System

## Project Overview

Mahendra Jewellers is a comprehensive retail jewellery shop management application for managing daily operations of a jewellery business dealing in **silver jewellery, gold jewellery, diamond jewellery, gold coins & bars, silver bars, and silver murti**.

---

## Modules

1. [Inventory](#1-inventory)
2. [Sales](#2-sales)
3. [Sales Return](#3-sales-return)
4. [Sales Orders](#4-sales-orders)
5. [Purchase Accounts](#5-purchase-accounts)
6. [Mortgage](#6-mortgage)
7. [Karighar Accounts](#7-karighar-accounts)
8. [Repairing](#8-repairing)
9. [Ledgers](#9-ledgers)
10. [Dashboard & Reports](#10-dashboard--reports)

---

## 1. Inventory

Inventory is **independent of purchase accounts** and is managed **product-wise**.

### 1.1 Add Product to Inventory

| Field               | Type        | Details                                      |
| ------------------- | ----------- | -------------------------------------------- |
| Product Code        | Auto-gen    | System-generated unique code                 |
| Category            | Dropdown    | Ornament type - Chain, Earring, Necklace, Bangles, Ring, Pendant, Mangalsutra, Payal, Coin, Bar, Murti, Utensils, etc. (admin can add more) |
| Weight              | Numeric     | Weight of the ornament in grams              |
| Purity              | Numeric     | Purity value (e.g., 916, 999, 925, etc.)     |
| HUID                | Text        | Optional - Hallmark Unique Identification    |
| Photo               | File Upload | Optional - Product image                     |
| Description/Remarks | Text        | Optional - Any additional details            |
| Metal Type          | Dropdown    | Gold / Silver / Diamond / Platinum           |
| Stone Weight        | Numeric     | Optional - If product has stones             |
| Date Added          | Date        | Auto-captured date of entry                  |
| Status              | System      | In Stock / Sold / On Approval / In Repair    |

### 1.2 Tag Printing

Generate printable tags for each product with:
- **Product Code**
- **Purity**
- **Weight**
- **HUID** (if available)

Format: Small barcode/QR label suitable for jewellery tags.

### 1.3 Inventory Reports

| Report                  | Description                                      |
| ----------------------- | ------------------------------------------------ |
| Day-wise Product Sales  | Products sold on a given date                    |
| Product Code-wise Sales | Sale history of a specific product               |
| Stock Summary           | Current stock grouped by category/metal type     |
| Stock Valuation         | Weight-wise and value-wise stock on hand          |

---

## 2. Sales

Sales are of **two types**: GST Sales and On Approval Sales.

### 2.1 GST Sales

#### Bill Creation Form

| Field                | Type        | Details                                              |
| -------------------- | ----------- | ---------------------------------------------------- |
| Customer Name        | Dropdown    | Searchable dropdown of existing customers + add new  |
| Mobile Number        | Auto-fetch  | Auto-populated from system; editable for new entries  |
| GST Number           | Text        | Optional - Customer's GSTIN if provided              |
| Product Code         | Text/Scan   | Enter code; all product details auto-fetched from inventory |
| Product Details      | Auto-fetch  | Category, weight, purity, HUID - from inventory      |
| Multiple Products    | List        | Ability to add multiple products to one bill          |
| Final Amount         | Numeric     | User enters the final (inclusive) amount              |
| Taxable Value        | Auto-calc   | Reverse-calculated from final amount                 |
| CGST (1.5%)          | Auto-calc   | Calculated from taxable value                        |
| SGST (1.5%)          | Auto-calc   | Calculated from taxable value                        |
| Payment Mode         | Dropdown    | Cash / Card / UPI / Bank Transfer / Mixed            |
| Date                 | Date        | Date of sale                                         |
| Bill Number          | Auto-gen    | Sequential; **resets every financial year** (Apr 1)  |
| Payment Type         | Radio       | Full Payment / Credit Payment                        |
| Credit Amount        | Numeric     | If credit - outstanding amount                       |
| Old Gold/Silver      | Section     | Optional - Deduction for old ornaments exchanged     |

#### Bill Number Format
`MJ/GST/2526/0001` - Prefix + Financial Year + Sequential Number. Resets to 0001 on April 1 each year.

#### Reverse Tax Calculation (GST @ 3%)
```
Taxable Value = Final Amount / 1.03
CGST (1.5%)   = Taxable Value * 0.015
SGST (1.5%)   = Taxable Value * 0.015
```

#### Post-Sale Actions
- Product status in inventory changes to **Sold**
- Product mapped to **Bill Number** and **Customer Name**
- If **credit payment**: outstanding amount reflected in customer ledger with alerts on dashboard
- Bill can be **shared via WhatsApp** or **downloaded as PDF**

### 2.2 On Approval Sales

Identical to GST Sales in billing and bill generation with one key difference:

> On Approval sales are **NOT included** in monthly GST sales reports.

On Approval bills have a separate bill number series: `MJ/APR/2526/0001`

Workflow:
- Products are marked as **On Approval** in inventory (not Sold)
- If customer confirms: convert to GST Sale
- If customer returns: move product back to **In Stock**

---

## 3. Sales Return

When a customer returns an ornament:

### Credit Note Generation

| Field              | Type       | Details                                        |
| ------------------ | ---------- | ---------------------------------------------- |
| Original Bill No   | Search     | Search and link to the original sale bill       |
| Customer Name      | Auto-fetch | From original bill                              |
| Return Date        | Date       | Date of return                                  |
| Product Code(s)    | Select     | Select products being returned from the bill    |
| Reason for Return  | Text       | Optional                                        |
| Credit Note Number | Auto-gen   | Sequential: `MJ/CN/2526/0001`                  |
| Refund Mode        | Dropdown   | Cash / Bank Transfer / Adjust Against Future    |

### Post-Return Actions
- Returned product goes back to **In Stock** in inventory
- Credit note linked to original bill
- If original sale was on credit, adjust the ledger accordingly
- Credit note can be printed/shared as PDF

---

## 4. Sales Orders

Orders taken from customers for custom/specific products.

### Order Form

| Field                 | Type        | Details                                       |
| --------------------- | ----------- | --------------------------------------------- |
| Order Number          | Auto-gen    | `MJ/SO/2526/0001`                             |
| Customer Name         | Text        | Name of the ordering customer                 |
| Mobile Number         | Text        | Customer mobile                               |
| Estimated Weight      | Numeric     | Expected weight of the product                |
| Purity                | Numeric     | Required purity                               |
| Photo Upload          | File        | Reference image for the order                 |
| Customisation Notes   | Textarea    | Any special instructions                      |
| Width                 | Numeric     | Optional - Width dimension                    |
| Height                | Numeric     | Optional - Height dimension                   |
| Length                 | Numeric     | Optional - Length dimension                    |
| Delivery Date         | Date        | Expected delivery date                        |
| Rate Booked           | Boolean     | Whether rate is locked for the customer        |
| Booked Rate           | Numeric     | If rate booked - the locked rate per gram      |
| Approx Order Value    | Numeric     | Estimated total value                         |
| Advance Amount        | Numeric     | Advance paid by customer (0 if none)           |
| Payment Mode          | Dropdown    | Cash / UPI / Bank Transfer / Card              |
| Order Status          | System      | Pending / In Progress / Ready / Delivered      |

### Order Actions
- Generate **PDF** of order details
- **Print** order slip
- **Share via WhatsApp** to customer or vendor/karighar
- Link order to Karighar when assigned for making

---

## 5. Purchase Accounts

Purchase is done in terms of **gold/silver weight**, not individual products.

Purchase can be of **2 types**: Fine or Rate Cut.

### 5.1 Purchase Entry Form

| Field                  | Type        | Details                                       |
| ---------------------- | ----------- | --------------------------------------------- |
| Supplier/Party Name    | Dropdown    | Searchable with add-new option                |
| Mobile Number          | Text        | Supplier contact                              |
| Date                   | Date        | Purchase date                                 |
| Purchase Type          | Radio       | Fine / Rate Cut                               |
| Gross Weight           | Numeric     | Total weight including impurities              |
| Net Weight             | Numeric     | Pure metal weight                             |
| Purity                 | Numeric     | Purity of the metal                           |
| Wastage                | Numeric     | Wastage percentage/value                      |
| Rate                   | Numeric     | Optional - Can be added later                 |
| Rate Added Date        | Date        | Auto-recorded when rate is entered/updated    |
| Hallmarking Charges    | Numeric     | Optional                                      |
| Stone Charges          | Numeric     | Optional                                      |
| Other Charges          | Numeric     | Optional - Any miscellaneous charges          |

### 5.2 Fine Calculation
```
Total Fine = Net Weight * (Purity + Wastage)
```
Example: Net Weight 100g, Purity 0.916, Wastage 0.02 => Fine = 100 * (0.916 + 0.02) = 93.6g fine gold

### 5.3 Final Amount Calculation
```
Final Amount = (Total Fine * Rate) + Hallmarking Charges + Stone Charges + Other Charges
```

### 5.4 Purchase Payment

| Payment Type         | Details                                     |
| -------------------- | ------------------------------------------- |
| Cash                 | Direct cash payment                         |
| Metal                | Payment in form of gold/silver weight        |
| Cheque/Bank Transfer | Cheque number or transaction reference       |

Multiple partial payments allowed; tracked in purchase ledger.

### 5.5 Rate Cut Feature (Purchase Ledger)

This is a critical feature for purchase account reconciliation:

- Cash paid earlier or now is **converted to gold weight** using a specified rate and purity
- Cash amount is adjusted and reflected as gold weight in the ledger
- Gold weight credit is added and adjusted against the outstanding balance on the account

**Rate Cut Calculation:**
```
Gold Weight Equivalent = Cash Amount / (Rate * Purity)
```

### 5.6 Purchase GST Bills

For GST-registered purchases, enter bill details:

| Field              | Type       | Details                                        |
| ------------------ | ---------- | ---------------------------------------------- |
| Supplier GSTIN     | Text       | Supplier's GST number                          |
| Bill Number        | Text       | Supplier's bill number                         |
| Bill Date          | Date       | Date on supplier bill                          |
| Gross Weight       | Numeric    | Weight of goods                                |
| Purity             | Numeric    | Purity of goods                                |
| Rate               | Numeric    | Per gram rate                                  |
| Description        | Text       | Description of goods purchased                 |
| Total Taxable      | Numeric    | Taxable value                                  |
| CGST               | Numeric    | Central GST (if intra-state)                   |
| SGST               | Numeric    | State GST (if intra-state)                     |
| IGST               | Numeric    | Integrated GST (if inter-state, based on GSTIN)|

> These entries feed into the **monthly GST purchase report**.

### 5.7 Purchase Reports

| Report                        | Description                                    |
| ----------------------------- | ---------------------------------------------- |
| Purchase Register             | All purchases with date, party, weight, amount |
| Party-wise Purchase Summary   | Total purchase per supplier                    |
| GST Purchase Report (Monthly) | For GST filing - all purchase GST bills        |
| Sale vs Purchase Report       | Overall comparison to track growth             |

---

## 6. Mortgage

Customers pledge jewellery as collateral for a loan.

### 6.1 Mortgage Entry Form

| Field                | Type       | Details                                        |
| -------------------- | ---------- | ---------------------------------------------- |
| Mortgage Number      | Auto-gen   | `MJ/MG/2526/0001`                              |
| Customer Name        | Text       | Borrower name                                  |
| Mobile Number        | Text       | Contact number                                 |
| Date                 | Date       | Mortgage date                                  |
| Product Description  | Text       | Description of pledged items                   |
| Gross Weight         | Numeric    | Total weight                                   |
| Net Weight           | Numeric    | Net weight after deductions                    |
| Purity               | Numeric    | Purity of the pledged item                     |
| Amount Given         | Numeric    | Loan amount disbursed                          |
| Interest Rate        | Numeric    | Monthly interest rate (%)                      |
| Interest Customised  | Boolean    | Can be changed per individual item             |

### 6.2 Mortgage Transactions

A mortgage account supports multiple transactions over its lifetime:

| Transaction Type       | Details                                          |
| ---------------------- | ------------------------------------------------ |
| Additional Loan        | Customer takes more money on existing products    |
| Interest Payment       | Customer deposits interest amount                 |
| Partial Repayment      | Customer pays back part of the principal          |
| Full Settlement        | Complete repayment - items released               |

Every transaction records: **Date, Amount, Type, Running Balance**.

### 6.3 Interest Calculation
```
Monthly Interest = Outstanding Principal * (Monthly Rate / 100)
```
Interest is calculated based on exact dates between transactions for accuracy.

### 6.4 Loss Alert System

The system continuously evaluates mortgage risk:

```
Actual Product Value = Net Weight * Purity * Last Sale Rate (from system)
Total Liability      = Amount Given + Accrued Interest Till Today

IF Total Liability > Actual Product Value => ALERT (Loss Warning)
```

**Dashboard Alert**: Red flag on mortgage items where liability exceeds collateral value.

### 6.5 Mortgage Reports

| Report               | Description                                       |
| -------------------- | ------------------------------------------------- |
| Active Mortgages     | All currently active mortgage accounts             |
| Loss Alert Report    | Items where liability > collateral value           |
| Interest Due Report  | Pending interest payments                          |
| Mortgage Ledger      | Full transaction history per mortgage account      |

---

## 7. Karighar Accounts

Karighar (artisan) management for ornament making and repair work.

### 7.1 Karighar Profile

| Field          | Type    | Details                        |
| -------------- | ------- | ------------------------------ |
| Karighar Name  | Text    | Artisan name                   |
| Mobile Number  | Text    | Contact                        |
| Specialisation | Text    | Type of work they handle       |
| Address        | Text    | Optional                       |

### 7.2 Order Assignment to Karighar

| Field              | Type       | Details                                     |
| ------------------ | ---------- | ------------------------------------------- |
| Linked Sales Order | Reference  | Link to sales order if applicable            |
| Order Description  | Text       | What needs to be made                        |
| Metal Given        | Numeric    | Weight of metal given as advance material    |
| Metal Purity       | Numeric    | Purity of metal given                        |
| Cash Advance       | Numeric    | Cash given as advance                        |
| Expected Delivery  | Date       | When the work is expected                    |
| Status             | System     | Assigned / In Progress / Completed / Received|

### 7.3 Karighar Ledger

Track all transactions with each karighar:

| Transaction        | Details                                          |
| ------------------ | ------------------------------------------------ |
| Metal Given        | Weight and purity of metal issued                |
| Cash Given         | Cash advances paid                               |
| Ornament Received  | Finished product received (added to inventory)   |
| Metal Returned     | Unused metal returned by karighar                |
| Labour Payment     | Making charges paid                              |

**Running balance** maintained in both **metal weight (fine)** and **cash**.

### 7.4 Inventory Link

When karighar delivers a finished ornament:
- Product is added to inventory with all details (weight, purity, etc.)
- Karighar ledger is updated (metal debit adjusted)
- If linked to a sales order, order status updates to **Ready**

---

## 8. Repairing

Customer repair jobs managed through karighars.

### 8.1 Repair Job Entry

| Field              | Type       | Details                                     |
| ------------------ | ---------- | ------------------------------------------- |
| Repair Job Number  | Auto-gen   | `MJ/RP/2526/0001`                           |
| Date               | Date       | Date item received for repair                |
| Customer Name      | Text       | Customer name                                |
| Mobile Number      | Text       | Customer contact                             |
| Description of Work| Textarea   | What repair is needed                        |
| Weight             | Numeric    | Weight of the item                           |
| Purity             | Numeric    | Purity of the item                           |
| Cost of Repairing  | Numeric    | Estimated/final repair cost                  |
| Delivery Date      | Date       | Expected date of return to customer          |
| Assigned Karighar  | Dropdown   | Which karighar will do the repair            |
| Status             | System     | Received / Sent to Karighar / Repaired / Delivered |

### 8.2 Repair Actions
- Generate **PDF** receipt for customer
- **Print** repair slip
- **Share via WhatsApp** to customer
- Track status through the repair lifecycle

---

## 9. Ledgers

Centralised ledger system for all account types.

### 9.1 Ledger Types

| Ledger Type                | Purpose                                          |
| -------------------------- | ------------------------------------------------ |
| Credit Sales Customers     | Outstanding amounts from credit sales             |
| Purchase Accounts          | Metal and cash balances with suppliers (Fine)     |
| Purchase Bill Accounts     | GST purchase bill tracking                        |
| Mortgage Clients           | Loan amounts, interest, and repayment tracking    |
| Karighar Accounts          | Metal and cash balances with artisans             |

### 9.2 Ledger Features
- **Date-wise transaction history** for every account
- **Running balance** (cash and/or metal as applicable)
- **Filter** by date range, party name, transaction type
- **Export** to PDF/Excel
- **Outstanding alerts** on dashboard for overdue amounts

---

## 10. Dashboard & Reports

### 10.1 Dashboard Widgets

| Widget                    | Description                                       |
| ------------------------- | ------------------------------------------------- |
| Today's Sales             | Total sales amount and count for today             |
| Outstanding Credits       | Total credit sales pending with alerts             |
| Mortgage Loss Alerts      | Items where liability exceeds collateral           |
| Pending Sales Orders      | Orders not yet delivered                           |
| Pending Repairs           | Repair jobs not yet completed                      |
| Low Stock Alerts          | Categories with minimal inventory                  |
| Monthly Revenue Snapshot  | Current month sales vs previous month              |

### 10.2 Reports Summary

| Report                          | Module          | Frequency      |
| ------------------------------- | --------------- | -------------- |
| Day-wise Product Sales          | Inventory       | Daily          |
| Product Code-wise Sales         | Inventory       | On Demand      |
| GST Sales Report                | Sales           | Monthly        |
| On Approval Sales Report        | Sales           | On Demand      |
| Credit Sales Outstanding        | Sales/Ledger    | On Demand      |
| Credit Notes Report             | Sales Return    | On Demand      |
| Sales Order Status              | Sales Orders    | On Demand      |
| Purchase Register               | Purchase        | On Demand      |
| GST Purchase Report             | Purchase        | Monthly        |
| Sale vs Purchase Growth Report  | Cross-module    | Monthly        |
| Mortgage Active Report          | Mortgage        | On Demand      |
| Mortgage Loss Alert Report      | Mortgage        | Daily/On Demand|
| Karighar Ledger                 | Karighar        | On Demand      |
| Repair Jobs Status              | Repairing       | On Demand      |
| Party-wise Ledger Statement     | Ledgers         | On Demand      |

---

## 11. System Categories (Master Data)

### 11.1 Ornament Categories (by type, not metal)
- Chain
- Necklace
- Bangles
- Ring
- Earrings
- Pendant
- Mangalsutra
- Payal (Anklet)
- Coin
- Bar
- Murti
- Utensils
- Bracelet
- Nose Pin
- Haar
- Tikka
- *(Admin can add/edit categories)*

### 11.2 Purity Standards

| Metal    | Common Purities          |
| -------- | ------------------------ |
| Gold     | 999, 916 (22K), 750 (18K), 585 (14K) |
| Silver   | 999, 925, 900            |
| Diamond  | VVS1, VVS2, VS1, VS2, SI1, SI2 |

### 11.3 GST Configuration
- GST Rate: **3%** on jewellery (1.5% CGST + 1.5% SGST or 3% IGST)
- HSN Code: **7113** (Gold/Silver Jewellery), **7108** (Gold), **7106** (Silver)
- Making charges GST: **5%** (if billed separately)
- Shop GSTIN: Configurable in settings
- Financial Year: April 1 - March 31

---

## 12. User Roles & Access

| Role           | Access                                              |
| -------------- | --------------------------------------------------- |
| Admin/Owner    | Full access to all modules, settings, reports        |
| Sales Staff    | Sales, inventory view, customer management           |
| Accountant     | Ledgers, purchase, reports, GST filing data          |
| Karighar Mgr   | Karighar accounts, repair management                |

---

## 13. Technical Specifications (Proposed)

### 13.1 Bill Number Series (Financial Year Reset)

| Document        | Format                  | Example           |
| --------------- | ----------------------- | ----------------- |
| GST Sale Bill   | MJ/GST/YYMM/NNNN       | MJ/GST/2526/0001  |
| Approval Bill   | MJ/APR/YYMM/NNNN       | MJ/APR/2526/0001  |
| Credit Note     | MJ/CN/YYMM/NNNN        | MJ/CN/2526/0001   |
| Sales Order     | MJ/SO/YYMM/NNNN        | MJ/SO/2526/0001   |
| Mortgage        | MJ/MG/YYMM/NNNN        | MJ/MG/2526/0001   |
| Repair Job      | MJ/RP/YYMM/NNNN        | MJ/RP/2526/0001   |
| Purchase Entry  | MJ/PU/YYMM/NNNN        | MJ/PU/2526/0001   |

All series reset to 0001 on April 1 of each year.

### 13.2 Sharing & Export
- **PDF Generation**: For all bills, credit notes, orders, repair slips
- **WhatsApp Sharing**: Direct share via WhatsApp API/deep link
- **Print**: Thermal printer support for tags; A4/A5 for bills
- **Excel Export**: For all reports

### 13.3 Key Formulae

| Calculation              | Formula                                              |
| ------------------------ | ---------------------------------------------------- |
| GST Reverse Calc         | Taxable = Final Amount / 1.03                        |
| CGST                     | Taxable * 0.015                                      |
| SGST                     | Taxable * 0.015                                      |
| Purchase Fine            | Net Weight * (Purity + Wastage)                      |
| Rate Cut (Cash to Gold)  | Gold Weight = Cash / (Rate * Purity)                 |
| Mortgage Interest        | Principal * Monthly Rate% (pro-rated by days)        |
| Mortgage Product Value   | Net Weight * Purity * Last System Sale Rate           |
| Loss Alert               | (Amount Given + Interest) > Product Value             |

---

## 14. Data Relationships

```
Customer
  ├── Sales (GST / On Approval)
  │     ├── Bill Items (linked to Inventory Product Codes)
  │     └── Credit Ledger (if credit sale)
  ├── Sales Returns → Credit Notes
  ├── Sales Orders
  │     └── Assigned to Karighar
  ├── Mortgage Accounts
  │     └── Transactions (loans, repayments, interest)
  └── Repair Jobs
        └── Assigned to Karighar

Supplier/Party
  ├── Purchase Entries (Fine / Rate Cut)
  │     └── Purchase Ledger (metal + cash)
  └── Purchase GST Bills
        └── Purchase Bill Ledger

Karighar
  ├── Orders Received
  ├── Metal Given / Returned
  ├── Ornaments Delivered → Inventory
  ├── Repair Jobs Assigned
  └── Karighar Ledger (metal + cash)

Inventory (Product)
  ├── Tag Printing
  ├── Linked to Sale Bill (when sold)
  ├── Linked to Karighar (when received)
  └── Status Tracking (In Stock / Sold / On Approval / In Repair)
```

---

## 15. Phase-wise Development Plan

### Phase 1: Foundation & Core
- Project setup (tech stack, database schema, authentication)
- System categories & master data management
- User roles & access control
- Inventory module (CRUD, tag printing, status tracking)

### Phase 2: Sales & Billing
- Customer management
- GST Sales billing with reverse tax calculation
- On Approval Sales
- Bill PDF generation & WhatsApp sharing
- Bill number series with financial year reset
- Inventory stock-out on sale

### Phase 3: Sales Return & Sales Orders
- Credit note generation
- Inventory stock-in on return
- Sales order creation & management
- Order PDF/WhatsApp sharing
- Order status tracking

### Phase 4: Purchase & Karighar
- Purchase entry (Fine & Rate Cut)
- Purchase payment tracking (Cash, Metal, Cheque)
- Purchase GST bill entry
- Rate cut feature for ledger reconciliation
- Karighar profiles & order assignment
- Karighar ledger (metal + cash tracking)
- Karighar to inventory flow

### Phase 5: Mortgage & Repairing
- Mortgage entry & transaction management
- Interest calculation with date-based pro-rating
- Additional loan on existing mortgage
- Loss alert system
- Repair job management
- Repair to karighar assignment flow

### Phase 6: Ledgers, Reports & Dashboard
- All ledger types with running balances
- Dashboard widgets & alerts
- All reports (daily, monthly, on-demand)
- GST reports for filing (sales & purchase)
- Sale vs purchase growth report
- Export functionality (PDF, Excel)

### Phase 7: Polish & Deployment
- WhatsApp integration
- Thermal printer tag printing
- Performance optimisation
- Data backup & recovery
- User training documentation
- Production deployment

---

*Document Version: 1.0*
*Created: 2026-04-10*
*Project: Mahendra Jewellers - Shop Management System*
