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

CardColorDescription
Total InvoicesBlueTotal number of invoices
Total RevenueGreenSum of all invoice amounts (TZS)
Paid AmountPurpleTotal payments received (TZS)
OutstandingRedTotal unpaid balance (TZS)

5.2.1.2 Payment Status Breakdown

StatusDescription
PaidInvoices fully paid
UnpaidNo payment recorded
Partially PaidPartial payment received
OverduePast due date, not fully paid

5.2.1.3 Filters

FilterDescription
StoreFilter by store/location

5.2.1.4 Invoice Table Columns

ColumnDescription
Invoice #Order number
CustomerCustomer name, email, and balance
Issue DateInvoice creation date
Due DatePayment due date (red if overdue)
TotalInvoice total amount
PaidAmount paid (green)
BalanceOutstanding balance (red if > 0)
StatusPayment status badge
ActionsAction buttons

5.2.1.5 Payment Status Badges

StatusBadgeIcon
PaidGreenCheckCircle
Partially PaidYellowDollarSign
OverdueRed (destructive)AlertCircle
UnpaidSecondary-

5.2.1.6 Available Actions

ActionIconColorConditionDescription
View DetailsEyeDefaultAlwaysView invoice details
Record PaymentDollarSignGreenHas balanceRecord payment
Send InvoiceSendBlueNot sentSend invoice to customer
Download PDFPrinterDefaultAlwaysDownload invoice PDF
DeleteTrashRedAlwaysDelete invoice

5.2.1.7 Recording a Payment

  1. Click the Record Payment button on an unpaid invoice
  2. 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)
  3. 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

  1. Click the Send Invoice button
  2. Invoice is emailed to customer
  3. Status updates to "sent"

5.2.1.9 Deleting an Invoice

  1. Click the Delete button
  2. Confirm deletion in dialog
  3. 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:

ControlDescription
Select CustomerDropdown to choose existing customer or "New Customer"
Customer SearchSearch by name, email, or phone

New Customer Fields:

FieldTypeRequired
Customer NameTextYes
EmailEmailNo
PhoneTelNo
AddressTextareaNo
Due DateDateNo (defaults to 30 days)

Note: When an existing customer is selected, fields are pre-populated and disabled.

5.2.2.2 Invoice Details Section

FieldTypeRequired
StoreDropdownYes
Payment TermsDropdown (Net 30, etc.)Yes
NotesTextareaNo

5.2.2.3 Line Items Section

Each line item contains:

FieldTypeDescription
Item TypeToggleProduct or Service
Product/ServiceDropdownSelect from available items
DescriptionTextItem description
QuantityNumberQuantity ordered
Unit PriceNumberPrice per unit (TZS)
DiscountNumberDiscount amount or percentage
Discount TypeTogglePercentage or Amount
Tax RateNumberTax percentage (default 16%)
TotalCalculatedLine total after discount and tax

5.2.2.4 Line Item Actions

ActionDescription
Add ItemAdd new line item
RemoveRemove line item

5.2.2.5 Invoice Totals

FieldDescription
SubtotalSum of (quantity × unit price)
Total DiscountSum of all discounts
TaxCalculated tax on discounted amounts
TotalFinal invoice amount

5.2.2.6 Form Actions

ActionDescription
Generate InvoiceCreate 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

TypeDescriptionEffect
Credit NoteCredit issued to customerReduces balance
RefundMoney returned to customerReduces balance
DiscountPost-sale discount appliedReduces balance
CorrectionRecord correction (audit)No balance change

5.2.3.4 Creating an Adjustment

  1. Click on an invoice from the list
  2. 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
  3. Review the Adjusted Total preview
  4. 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:

ColumnDescription
Adjustment #Adjustment number
Invoice #Related invoice
TypeAdjustment type
AmountAdjustment value
ReasonJustification
Adjusted ByUser who created
DateCreation date
Statuspending/approved/rejected
ActionsView, Approve, Reject

5.2.3.6 Adjustment Actions

ActionIconColorConditionDescription
ViewEyeDefaultAlwaysView adjustment details
ApproveThumbsUpGreenPendingApprove adjustment
RejectThumbsDownRedPendingReject 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

CardColorDescription
TotalBlueTotal proforma invoices
DraftGrayDraft proformas
SentPurpleSent to customer
ApprovedGreenApproved proformas
RejectedRedRejected proformas

5.3.1.2 Filters

FilterDescription
SearchSearch by customer or proforma number
StoreFilter by store
StatusFilter by status (Draft, Sent, Pending, Approved, Rejected, Cancelled)

5.3.1.3 Proforma Table Columns

ColumnDescription
Proforma #Order number
CustomerCustomer name and email
Order DateCreation date
Due DateValidity date (red if expired)
ItemsNumber of line items
AmountTotal amount (TZS)
StatusStatus badge
ActionsAction buttons

5.3.1.4 Proforma Statuses

StatusBadge ColorIcon
DraftSecondary-
SentDefaultSend
PendingDefaultSend
ApprovedDefaultCheckCircle
ConfirmedDefaultCheckCircle
RejectedDestructiveXCircle
CancelledDestructiveXCircle

5.3.1.5 Status-Based Actions

StatusAvailable Actions
Draft/PendingView, Download PDF, Approve, Reject
ApprovedView, Download PDF, Send, Convert to Invoice
SentView, Download PDF, Convert to Invoice
Rejected/CancelledView, Download PDF

5.3.1.6 Action Buttons Detail

ActionIconColorDescription
View DetailsEyeDefaultView proforma details
Download PDFPrinterDefaultDownload as PDF
Send to CustomerSendDefaultEmail to customer
ApproveCheckCircleGreenApprove proforma
RejectXCircleRedReject proforma
Convert to InvoiceFileTextBlueConvert to invoice

5.3.1.7 Rejecting a Proforma

  1. Click the Reject button
  2. Enter a Rejection Reason in the dialog
  3. 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

ActionDescription
Save as DraftSave without submitting
Create ProformaCreate 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

CardIconDescription
Total ServicesPackageTotal number of services
Active ServicesTrendingUp (green)Currently active services
Average PriceDollarSignAverage service price

5.4.3 Filters

FilterDescription
SearchSearch services by name/code
StoreFilter by store
StatusActive or Inactive
Pricing TypeFixed, Hourly, Daily, Custom
Sort ByDate Created, Name, Price, Code

5.4.4 Services Table Columns

ColumnDescription
CodeService code (mono-spaced)
NameService name with description
Pricing TypeFixed, Hourly, Daily, Custom (badge)
UnitUnit of measure
PriceService price with tax rate
CostService cost
Profit MarginCalculated margin percentage
StatusActive/Inactive toggle switch
ActionsEdit, Delete buttons

5.4.5 Pricing Type Badges

TypeBadge Variant
FixedDefault
HourlySecondary
DailyOutline
CustomDestructive

5.4.6 Available Actions

ActionIconDescription
Add ServicePlusCreate new service
EditEditEdit service details
DeleteTrash (red)Delete service
Toggle StatusSwitchActivate/Deactivate service

5.4.7 Creating a Service

  1. Click "Add Service" button
  2. 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
  3. Click "Create Service"

5.4.8 Editing a Service

  1. Click the Edit button on a service row
  2. Modify the service details
  3. Click "Update Service"

5.4.9 Deleting a Service

  1. Click the Delete button
  2. Review the warning (services used in orders cannot be deleted)
  3. 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

  1. Click the Switch toggle in the Status column
  2. Service is immediately activated or deactivated
  3. 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