Reports & analytics
Suppliers see how much they sold and collected, and who still owes them money. The Reports page makes the Accounts Receivable and Accounts Payable aging reports; the Sales Report page shows sales, collections and top sellers. Both open on screen; the aging reports download as a PDF.
Who uses it
- Supplier staff with access to Sales Report open the Reports and Sales Report pages to manage cash flow.
- Accountants download the aging reports as a PDF.
Report types
- Sales Report: net sales, collections, sales by order channel, fees and charges, discounts, refunds, top sold products and top customers.
- Accounts Receivable: what each customer still owes, in the buckets Current, 1-30, 31-60, 61-90 and 90+ days past due, with a total. Pick an As of date and sort by any column; View PDF downloads exactly what's on screen.
- Accounts Payable: the same view of what the supplier owes its vendors, from purchase orders.
Permissions
The Reports page needs view access to the Sales Report resource. The server only lets staff read their own supplier's reports.
Specs
receivables-report.feature
# prefix: ARV
Feature: Accounts receivable report for orders
A supplier sees what each customer still owes on sold, unpaid orders,
grouped into current and overdue buckets as of a chosen date.
Background:
Given a supplier with customers who have sold orders
Rule: Balances are bucketed by how overdue they are
Scenario: ARV-001 unpaid orders fill the current and overdue buckets
Given a customer has one unpaid order not yet due and another past its due date
When the supplier runs the report as of today
Then the not-yet-due balance is in Current
And the past-due balance is in the matching overdue bucket
And the customer's total is the sum of both
Scenario: ARV-002 a past as-of date counts only payments dated on or before it
Given a customer paid a order after the chosen as-of date
When the supplier runs the report as of that earlier date
Then the payment is not applied
And the order still shows its full balance
Scenario: ARV-003 an order invoiced after the as-of date is excluded
Given a order was invoiced after the chosen as-of date
When the supplier runs the report as of that earlier date
Then the order does not appear in the report
Rule: Only live, unpaid orders for active customers are listed
Scenario: ARV-004 archived or deleted customers are excluded
Given a customer is archived or deleted
When the supplier runs the report
Then that customer does not appear in the report
Scenario: ARV-005 paid and cancelled orders are excluded
Given a order is fully paid and another is cancelled
When the supplier runs the report
Then neither order contributes to any balance
Scenario: ARV-008 a past as-of date excludes an order sold that day but cancelled since
Given a order was sold on the chosen as-of date and has been cancelled since
When the supplier runs the report as of that date
Then the order does not appear in the report
Rule: Export formats
Scenario: ARV-006 the report exports as a PDF
When the supplier exports the report as PDF
Then a PDF document of the report is returned
Scenario: ARV-007 CSV and XLSX exports are not supported yet
When the supplier exports the report as CSV or XLSX
Then the export is refused as not yet supported
sales-metrics.feature
# prefix: SMET
Feature: Sales metrics
Every sales figure follows one set of definitions, from the supplier's side. Net Sales is what the
customer was billed for goods delivered, after discounts and returns. How the customer paid never
changes it; payment only changes where the money sits.
Background:
Given a supplier with invoices in the selected period
Rule: Net Sales is gross less discounts and returns, plus fees and any opening balance
Scenario: SMET-002 net sales add up from their parts
Given an invoice with a line total, a fee, a discount and a return
When the supplier opens the sales report
Then Net Sales equals the line total less the discount and the return, plus the fee
Scenario: SMET-003 a Clipp promo is part of Net Sales
Given an invoice billed at full price, with part of it paid by Clipp
When the supplier opens the sales report
Then Net Sales is not reduced by the promo
And the promo is shown on its own, from what Clipp paid
Scenario: SMET-010 an opening balance is part of Net Sales
Given an invoice with a carried-over opening balance
When the supplier opens the sales report
Then the opening balance is part of Net Sales
And it is also shown on its own line
Rule: An order is sold once it has gone out and carries an invoice date in the period
Scenario: SMET-004 only invoices that have gone out count
Given invoices dated in the period that are placed, confirmed, ready for delivery and delivered
When the supplier opens the sales report
Then only the ready for delivery and delivered ones are counted
Scenario: SMET-005 saved and canceled orders count nowhere
Given a saved order and a canceled invoice
When the supplier opens the sales report
Then neither is in any amount or count
Rule: Cash and store credit are separate
Scenario: SMET-006 a store credit refund is not a cash refund
Given an $85 invoice paid in cash, then returned and refunded as $85 store credit
When the supplier opens the sales report
Then Cash Collected is $85 and Cash Refunded is $0
And Store Credit Issued as refund is $85
Scenario: SMET-007 a payment counts on the day it was taken
Given an invoice dated before the period with a payment taken inside it
When the supplier opens the sales report
Then the payment is in Cash Collected for the period
Rule: What a customer owes is not floored
Scenario: SMET-008 an overpayment is the customer's credit
Given an invoice paid more than its total
When the supplier opens the sales report
Then the invoice shows no balance owed
And the excess is shown as customer credit
Scenario: SMET-009 a Clipp payout settles part of an invoice billed at full price
Given a $100 invoice with a $4 payment from Clipp and nothing else paid
When the supplier opens the sales report
Then the customer owes $96
Known limitations
- The Accounts Receivable card on the Reports page reads older orders only on production. The report that reads current orders is shown only on local and dev builds (a card with a v2 chip), so a supplier's receivables report can miss balances on newer orders.
- CSV and XLSX export from the server are not supported yet. The Reports page's Download CSV builds the file in the browser from the rows on screen.