Skip to main content

Sales Management Guide

Module: Sales Roles: Admin, Sales Last Updated: July 2026


Overview

The Sales module is the central hub for managing all customer transactions in the Lofty Golden Oil ERP system. It allows you to create and track sales orders, generate accounts receivable invoices, record payments, and manage customer relationships.

The Sales page is organized into three tabs:

TabPurpose
Sales OrdersCreate, view, and manage all sales orders
AR InvoicesGenerate and track invoices against sales
PaymentsRecord and view payment transactions

Sales Orders Tab

Viewing the Sales Orders List

Navigate to Sales in the main menu. The Sales Orders tab is displayed by default. All sales orders are presented in a sortable, searchable, paginated DataTable.

Columns Explained

ColumnDescription
DateThe date the sale was created
CustomerThe customer company name linked to the sale
ProductThe cooking oil product sold
QtyThe quantity ordered
TotalThe total amount (Qty × Unit Price)
StatusCurrent status of the sale (see below)
ActionsEdit, delete, and view options

Status Badges

Each sale displays a color-coded status badge:

StatusBadge ColorMeaning
PendingYellowSale has been created but not yet fulfilled
CompletedGreenSale has been fulfilled and is ready for invoicing
CancelledRedSale has been cancelled and is no longer active

Creating a New Sale

  1. Click the + New Sale button at the top of the Sales Orders tab.
  2. The Create Sale form opens. Fill in the following fields:

Step-by-Step Form Completion

Step 1: Select Customer

  • Click the Customer dropdown.
  • Search for an existing customer by typing the company name.
  • If the customer is not listed, click + Add New Customer to create one (see the Customer Management Guide).

Step 2: Select Product

  • Click the Product dropdown to select a product from inventory.
  • The available stock quantity is displayed beside the product name so you can confirm availability before proceeding.

Step 3: Enter Quantity

  • Type the quantity being ordered in the Quantity field.
  • Ensure the quantity does not exceed available stock.

Step 4: Unit Price

  • The Unit Price auto-fills based on the product master data.
  • You may override the unit price if a custom price is agreed upon with the customer.

Step 5: Total Calculation

  • The Total field is automatically calculated as: Quantity × Unit Price.
  • This value updates in real time as you change the quantity or unit price.

Step 6: Select Date

  • The Date field defaults to today's date.
  • You may change it to backdate or future-date the sale as needed.

Step 7: Set Status

  • Select the initial status from the dropdown:
    • Pending — Use this for orders that are yet to be processed.
    • Completed — Use this if the sale has already been fulfilled.

Step 8: Add Notes (Optional)

  • Enter any relevant notes, special instructions, or internal comments in the Notes field.

Step 9: Save

  • Click Save to create the sale record.
  • A toast notification confirms the sale was created successfully.

Editing a Sale

  1. Locate the sale in the Sales Orders list.
  2. Click the Edit (pencil) icon in the Actions column.
  3. The Edit Sale form opens with the existing data pre-filled.
  4. Modify the fields as needed (Customer, Product, Quantity, Unit Price, Status, Notes).
  5. Click Save to apply changes.

Note: You can edit any field on a pending or completed sale. Cancelled sales are read-only.


Deleting a Sale

  1. Locate the sale in the Sales Orders list.
  2. Click the Delete (trash) icon in the Actions column.
  3. A ConfirmDialog appears asking you to confirm the deletion.
  4. Click Confirm to permanently remove the sale, or Cancel to abort.

Warning: Deleting a sale is irreversible. If an invoice has been generated from this sale, the invoice will also be affected.


Understanding Status Flow

Sales orders follow a defined status lifecycle:

Pending ──────────► Completed ──────────► Invoice Generated

└──────────────► Cancelled
TransitionWhen to Use
Pending → CompletedThe order has been picked, packed, or delivered
Pending → CancelledThe customer cancelled before fulfillment
Completed → Invoice GeneratedAn AR invoice has been created from this sale (see Invoicing Guide)

Note: A sale must be in Completed status before an AR invoice can be generated from it.


After Saving a Sale

Once you save a new sale, the system provides a quick-action prompt:

  1. A toast notification appears with the option to Create Invoice.
  2. Click Create Invoice to immediately generate an AR Invoice linked to this sale.
  3. The invoice is pre-filled with the sale details (customer, amount, date).
  4. After saving the invoice, you can send it to the customer via email using the Resend API (see the Invoicing Guide).

If you dismiss the prompt, you can always create an invoice later from the AR Invoices tab.


Managing Sales

Search and Filter

  • Use the search bar at the top of the DataTable to search by customer name, product name, or notes.
  • Results filter in real time as you type.

Sort

  • Click any column header to sort the table by that column.
  • Click again to toggle between ascending and descending order.

Pagination

  • Navigate between pages using the pagination controls at the bottom of the table.
  • Adjust the number of rows displayed per page using the page size selector.

CSV Export

  • Click the Export CSV button to download the current filtered view of sales data as a .csv file.
  • This is useful for reporting in Excel, Google Sheets, or other spreadsheet tools.

Sales Reports

While the Sales module does not have a dedicated reports page, you can use the DataTable to generate on-the-fly analyses:

  1. Filter by date range using the search or date columns to view sales within a specific period.
  2. Sort by Total to identify the highest-value sales.
  3. Sort by Status to group pending, completed, or cancelled sales together.
  4. Export to CSV and open in a spreadsheet application to create pivot charts, calculate totals, or generate formal reports.

Role Access Summary

RoleAccess Level
AdminFull access — create, edit, delete, export
SalesFull access — create, edit, delete, export
ProductionNo access to Sales module
AccountantNo access to Sales module (has access to Expenses and AR)