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:
| Tab | Purpose |
|---|---|
| Sales Orders | Create, view, and manage all sales orders |
| AR Invoices | Generate and track invoices against sales |
| Payments | Record 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
| Column | Description |
|---|---|
| Date | The date the sale was created |
| Customer | The customer company name linked to the sale |
| Product | The cooking oil product sold |
| Qty | The quantity ordered |
| Total | The total amount (Qty × Unit Price) |
| Status | Current status of the sale (see below) |
| Actions | Edit, delete, and view options |
Status Badges
Each sale displays a color-coded status badge:
| Status | Badge Color | Meaning |
|---|---|---|
| Pending | Yellow | Sale has been created but not yet fulfilled |
| Completed | Green | Sale has been fulfilled and is ready for invoicing |
| Cancelled | Red | Sale has been cancelled and is no longer active |
Creating a New Sale
- Click the + New Sale button at the top of the Sales Orders tab.
- 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
- Locate the sale in the Sales Orders list.
- Click the Edit (pencil) icon in the Actions column.
- The Edit Sale form opens with the existing data pre-filled.
- Modify the fields as needed (Customer, Product, Quantity, Unit Price, Status, Notes).
- 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
- Locate the sale in the Sales Orders list.
- Click the Delete (trash) icon in the Actions column.
- A ConfirmDialog appears asking you to confirm the deletion.
- 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
| Transition | When to Use |
|---|---|
| Pending → Completed | The order has been picked, packed, or delivered |
| Pending → Cancelled | The customer cancelled before fulfillment |
| Completed → Invoice Generated | An 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:
- A toast notification appears with the option to Create Invoice.
- Click Create Invoice to immediately generate an AR Invoice linked to this sale.
- The invoice is pre-filled with the sale details (customer, amount, date).
- 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
.csvfile. - 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:
- Filter by date range using the search or date columns to view sales within a specific period.
- Sort by Total to identify the highest-value sales.
- Sort by Status to group pending, completed, or cancelled sales together.
- Export to CSV and open in a spreadsheet application to create pivot charts, calculate totals, or generate formal reports.
Role Access Summary
| Role | Access Level |
|---|---|
| Admin | Full access — create, edit, delete, export |
| Sales | Full access — create, edit, delete, export |
| Production | No access to Sales module |
| Accountant | No access to Sales module (has access to Expenses and AR) |