Sales Management
Comprehensive tools for managing invoices, proforma invoices (quotations), and services.
Sales Management
5.1 Overview
The Sales Management module provides comprehensive tools for managing invoices, proforma invoices (quotations), and services. It enables the complete sales cycle from quotation to invoice generation and payment tracking.
Module Structure:
- Invoices Management - Generate invoices, track payments, record adjustments
- Proforma Management - Create quotations, approve, and convert to invoices
- Services - Manage service offerings for invoicing
5.2 Invoice Management
Manage all customer invoices with three tabs: Invoice List, Generate Invoice, and Adjustments.
5.2.1 Invoice List Tab
View and manage all generated invoices.
5.2.1.1 Summary Cards
| Card | Color | Description |
|---|---|---|
| Total Invoices | Blue | Total number of invoices |
| Total Revenue | Green | Sum of all invoice amounts (TZS) |
| Paid Amount | Purple | Total payments received (TZS) |
| Outstanding | Red | Total unpaid balance (TZS) |
5.2.1.2 Payment Status Breakdown
| Status | Description |
|---|---|
| Paid | Invoices fully paid |
| Unpaid | No payment recorded |
| Partially Paid | Partial payment received |
| Overdue | Past due date, not fully paid |
5.2.1.3 Filters
| Filter | Description |
|---|---|
| Store | Filter by store/location |
5.2.1.4 Invoice Table Columns
| Column | Description |
|---|---|
| Invoice # | Order number |
| Customer | Customer name, email, and balance |
| Issue Date | Invoice creation date |
| Due Date | Payment due date (red if overdue) |
| Total | Invoice total amount |
| Paid | Amount paid (green) |
| Balance | Outstanding balance (red if > 0) |
| Status | Payment status badge |
| Actions | Action buttons |
5.2.1.5 Payment Status Badges
| Status | Badge | Icon |
|---|---|---|
| Paid | Green | CheckCircle |
| Partially Paid | Yellow | DollarSign |
| Overdue | Red (destructive) | AlertCircle |
| Unpaid | Secondary | - |
5.2.1.6 Available Actions
| Action | Icon | Color | Condition | Description |
|---|---|---|---|---|
| View Details | Eye | Default | Always | View invoice details |
| Record Payment | DollarSign | Green | Has balance | Record payment |
| Send Invoice | Send | Blue | Not sent | Send invoice to customer |
| Download PDF | Printer | Default | Always | Download invoice PDF |
| Delete | Trash | Red | Always | Delete invoice |
5.2.1.7 Recording a Payment
- Click the Record Payment button on an unpaid invoice
- Fill in the payment details:
- Outstanding Balance (display only)
- Payment Amount (required) - Cannot exceed outstanding balance
- Payment Method (required): Cash, Card, Bank Transfer, Mobile Money
- Bank Account (required) - Select company bank account
- Payment Date (required)
- Click "Record Payment"
Business Rules:
- Payment amount cannot exceed outstanding balance
- Bank account is required for tracking
- Partial payments are supported
- Payment updates invoice status (Paid/Partially Paid)
5.2.1.8 Sending an Invoice
- Click the Send Invoice button
- Invoice is emailed to customer
- Status updates to "sent"
5.2.1.9 Deleting an Invoice
- Click the Delete button
- Confirm deletion in dialog
- Invoice is permanently removed
5.2.2 Generate Invoice Tab
Create new invoices with customer and item details.
5.2.2.1 Customer Information Section
Customer Selection:
| Control | Description |
|---|---|
| Select Customer | Dropdown to choose existing customer or "New Customer" |
| Customer Search | Search by name, email, or phone |
New Customer Fields:
| Field | Type | Required |
|---|---|---|
| Customer Name | Text | Yes |
| No | ||
| Phone | Tel | No |
| Address | Textarea | No |
| Due Date | Date | No (defaults to 30 days) |
Note: When an existing customer is selected, fields are pre-populated and disabled.
5.2.2.2 Invoice Details Section
| Field | Type | Required |
|---|---|---|
| Store | Dropdown | Yes |
| Payment Terms | Dropdown (Net 30, etc.) | Yes |
| Notes | Textarea | No |
5.2.2.3 Line Items Section
Each line item contains:
| Field | Type | Description |
|---|---|---|
| Item Type | Toggle | Product or Service |
| Product/Service | Dropdown | Select from available items |
| Description | Text | Item description |
| Quantity | Number | Quantity ordered |
| Unit Price | Number | Price per unit (TZS) |
| Discount | Number | Discount amount or percentage |
| Discount Type | Toggle | Percentage or Amount |
| Tax Rate | Number | Tax percentage (default 16%) |
| Total | Calculated | Line total after discount and tax |
5.2.2.4 Line Item Actions
| Action | Description |
|---|---|
| Add Item | Add new line item |
| Remove | Remove line item |
5.2.2.5 Invoice Totals
| Field | Description |
|---|---|
| Subtotal | Sum of (quantity × unit price) |
| Total Discount | Sum of all discounts |
| Tax | Calculated tax on discounted amounts |
| Total | Final invoice amount |
5.2.2.6 Form Actions
| Action | Description |
|---|---|
| Generate Invoice | Create and save the invoice |
Business Rules:
- Store must be selected first to load products/services
- Customer name is required
- At least one line item is required
- Quantity and unit price must be positive
- Invoice number is auto-generated
5.2.3 Adjustments Tab
Create and manage invoice adjustments (credit notes, refunds, discounts, corrections).
5.2.3.1 Store Selection
Select a store to view its invoices and adjustments.
5.2.3.2 Invoice Selection
Click on an invoice from the list to open the adjustment dialog.
5.2.3.3 Adjustment Types
| Type | Description | Effect |
|---|---|---|
| Credit Note | Credit issued to customer | Reduces balance |
| Refund | Money returned to customer | Reduces balance |
| Discount | Post-sale discount applied | Reduces balance |
| Correction | Record correction (audit) | No balance change |
5.2.3.4 Creating an Adjustment
- Click on an invoice from the list
- Fill in adjustment details:
- Adjustment Type (required): Credit Note, Refund, Discount, Correction
- Amount (required): Adjustment amount
- Reason (required): Explanation for adjustment
- Apply Tax (optional): Apply 18% VAT
- Review the Adjusted Total preview
- Click "Apply Adjustment"
Business Rules:
- Amount must be positive
- Reason is mandatory
- Adjustments require approval
- Status changes to "pending" until approved
5.2.3.5 Adjustment History
View all adjustments with:
| Column | Description |
|---|---|
| Adjustment # | Adjustment number |
| Invoice # | Related invoice |
| Type | Adjustment type |
| Amount | Adjustment value |
| Reason | Justification |
| Adjusted By | User who created |
| Date | Creation date |
| Status | pending/approved/rejected |
| Actions | View, Approve, Reject |
5.2.3.6 Adjustment Actions
| Action | Icon | Color | Condition | Description |
|---|---|---|---|---|
| View | Eye | Default | Always | View adjustment details |
| Approve | ThumbsUp | Green | Pending | Approve adjustment |
| Reject | ThumbsDown | Red | Pending | Reject adjustment |
5.3 Proforma Invoice Management
Manage quotations with approval workflow and conversion to invoices.
5.3.1 Proforma List Tab
View and manage all proforma invoices.
5.3.1.1 Summary Cards
| Card | Color | Description |
|---|---|---|
| Total | Blue | Total proforma invoices |
| Draft | Gray | Draft proformas |
| Sent | Purple | Sent to customer |
| Approved | Green | Approved proformas |
| Rejected | Red | Rejected proformas |
5.3.1.2 Filters
| Filter | Description |
|---|---|
| Search | Search by customer or proforma number |
| Store | Filter by store |
| Status | Filter by status (Draft, Sent, Pending, Approved, Rejected, Cancelled) |
5.3.1.3 Proforma Table Columns
| Column | Description |
|---|---|
| Proforma # | Order number |
| Customer | Customer name and email |
| Order Date | Creation date |
| Due Date | Validity date (red if expired) |
| Items | Number of line items |
| Amount | Total amount (TZS) |
| Status | Status badge |
| Actions | Action buttons |
5.3.1.4 Proforma Statuses
| Status | Badge Color | Icon |
|---|---|---|
| Draft | Secondary | - |
| Sent | Default | Send |
| Pending | Default | Send |
| Approved | Default | CheckCircle |
| Confirmed | Default | CheckCircle |
| Rejected | Destructive | XCircle |
| Cancelled | Destructive | XCircle |
5.3.1.5 Status-Based Actions
| Status | Available Actions |
|---|---|
| Draft/Pending | View, Download PDF, Approve, Reject |
| Approved | View, Download PDF, Send, Convert to Invoice |
| Sent | View, Download PDF, Convert to Invoice |
| Rejected/Cancelled | View, Download PDF |
5.3.1.6 Action Buttons Detail
| Action | Icon | Color | Description |
|---|---|---|---|
| View Details | Eye | Default | View proforma details |
| Download PDF | Printer | Default | Download as PDF |
| Send to Customer | Send | Default | Email to customer |
| Approve | CheckCircle | Green | Approve proforma |
| Reject | XCircle | Red | Reject proforma |
| Convert to Invoice | FileText | Blue | Convert to invoice |
5.3.1.7 Rejecting a Proforma
- Click the Reject button
- Enter a Rejection Reason in the dialog
- Click "Reject" to confirm
Business Rules:
- Rejection reason is required
- Rejected proformas cannot be converted
5.3.2 Create Proforma Tab
Create new proforma invoices (quotations).
5.3.2.1 Form Fields
Same structure as Generate Invoice (see section 5.2.2):
- Customer Information
- Invoice Details (Store, Due Date, etc.)
- Line Items (Products/Services)
- Totals
5.3.2.2 Form Actions
| Action | Description |
|---|---|
| Save as Draft | Save without submitting |
| Create Proforma | Create and submit |
Business Rules:
- Same validation as invoice generation
- Proformas are created in "draft" status
- Due date represents validity period
5.4 Services Management
Manage service offerings for use in invoices and proformas.
5.4.1 Overview
Services are non-inventory items that can be sold (consulting, maintenance, etc.).
5.4.2 Summary Cards
| Card | Icon | Description |
|---|---|---|
| Total Services | Package | Total number of services |
| Active Services | TrendingUp (green) | Currently active services |
| Average Price | DollarSign | Average service price |
5.4.3 Filters
| Filter | Description |
|---|---|
| Search | Search services by name/code |
| Store | Filter by store |
| Status | Active or Inactive |
| Pricing Type | Fixed, Hourly, Daily, Custom |
| Sort By | Date Created, Name, Price, Code |
5.4.4 Services Table Columns
| Column | Description |
|---|---|
| Code | Service code (mono-spaced) |
| Name | Service name with description |
| Pricing Type | Fixed, Hourly, Daily, Custom (badge) |
| Unit | Unit of measure |
| Price | Service price with tax rate |
| Cost | Service cost |
| Profit Margin | Calculated margin percentage |
| Status | Active/Inactive toggle switch |
| Actions | Edit, Delete buttons |
5.4.5 Pricing Type Badges
| Type | Badge Variant |
|---|---|
| Fixed | Default |
| Hourly | Secondary |
| Daily | Outline |
| Custom | Destructive |
5.4.6 Available Actions
| Action | Icon | Description |
|---|---|---|
| Add Service | Plus | Create new service |
| Edit | Edit | Edit service details |
| Delete | Trash (red) | Delete service |
| Toggle Status | Switch | Activate/Deactivate service |
5.4.7 Creating a Service
- Click "Add Service" button
- Fill in service details:
- Store (required): Select store
- Service Name (required): e.g., "Web Development"
- Service Code (required): e.g., "WEB-DEV-001"
- Description (optional): Service description
- Pricing Type (required): Fixed, Hourly, Daily, Custom
- Unit (optional): e.g., "hour", "day", "project"
- Price (required): Selling price (TZS)
- Cost (optional): Service cost
- Active (checkbox): Service availability
- Click "Create Service"
5.4.8 Editing a Service
- Click the Edit button on a service row
- Modify the service details
- Click "Update Service"
5.4.9 Deleting a Service
- Click the Delete button
- Review the warning (services used in orders cannot be deleted)
- Click "Delete" to confirm
Business Rules:
- Services used in sales orders cannot be deleted
- Use deactivation instead of deletion for used services
- Code should be unique within the store
5.4.10 Toggling Service Status
- Click the Switch toggle in the Status column
- Service is immediately activated or deactivated
- Inactive services don't appear in invoice/proforma forms
5.5 Business Rules Summary
Invoice Rules
- Invoice numbers are auto-generated
- Taxes are calculated based on configured rates
- Invoices can be paid partially or in full
- Payments require bank account selection
- All payments are tracked for audit
Proforma Rules
- Proformas represent quotations/estimates
- Validity is tracked by due date
- Approval is required before sending
- Conversion to invoice creates linked document
Adjustment Rules
- Adjustments require approval workflow
- All adjustments are logged for audit
- Credit notes, refunds, discounts reduce balance
- Corrections are for record-keeping only
Service Rules
- Services are store-specific
- Services in use cannot be deleted
- Inactive services are hidden from forms