Keystone Accounting Lite
Application User Manual
Introduction
Welcome to the Keystone Accounting Lite user manual. This application is a comprehensive PHP-based system designed to help you manage your business's finances, including quotes, invoicing, expenses, inventory, and customer relationships.
This manual is for both regular **Users** (who can manage finances) and **Admins** (who can also configure the system). It will guide you through every screen and feature, from logging in to setting up automated invoices.
Getting Started
Login & Accounts
The system has two different "login" areas:
- Admin/User Login: This is for you and your staff. You log in using the main login page with your user account. Users can manage the business, while Admins can also change system settings.
- Customer Portal Login: This is for your clients. If a customer's email is used on the main login page, the system will check if they are a customer and log them into the portal.
My Account (for Admins/Users)
After logging in, you can click "My Account" in the sidebar at any time.
- Profile Details: This page allows you to update your first name, last name, and email address.
- Change Password: This page allows you to change your own login password. You must provide your current password to set a new one.
Core Features (Main Menu)
This section covers the day-to-day functions of the application, all accessible from the main sidebar.
Home Dashboard
This is the first screen you see after logging in. It provides a quick financial overview of your business.
At-a-Glance Stats
- Amount Outstanding: The total value of all invoices that are 'Sent', 'Overdue', or 'Partially paid'.
- Total Paid (All Time): The sum of all payments received.
- Total Expenses (All Time): The sum of all expenses recorded.
- Active Quotes: The number of quotes currently in 'Draft' or 'Sent' status.
Recent Activity
The dashboard also shows lists of your 5 most recent invoices and 5 most recent quotes for quick access.
Reports
The Reports hub provides detailed insights into your business. Most reports allow you to filter by a custom date range.
- Sales Report (P&L): Shows your total Income (from invoices), total Expenses, and the resulting Net Profit or Loss for the period.
- Expense Report: A breakdown of all expenses, grouped by category, with totals.
- VAT Report: (Only available if VAT is enabled) Shows your VAT Output (from invoices) and VAT Input (from expenses) to calculate your Net VAT Due.
- Sales by Customer: Ranks your customers by total sales (excluding VAT) for the period.
- Aged Receivables: Shows all customers who currently owe you money (on invoices not 'Paid in full', 'Draft', or 'Cancelled') and how many days their payment is overdue.
- Quote Conversion: Analyzes your sales pipeline by showing how many quotes (by count and value) were Converted (Approved/Invoiced) versus those that were Sent or Declined.
- Payment History: A complete log of all payments received from all customers.
- Sales by Item: Ranks your best-selling items by total revenue (excluding VAT) and quantity sold.
- Stock Valuation: Shows the total value of your inventory (Current Stock x Last Cost Price) for all items with stock management enabled.
- Low Stock Report: Lists all items with stock management enabled, highlighting any that are at or below their "Re-order Level".
Quotes
Manage your quotes and sales pipeline.
- Quote List: Shows all quotes. Statuses include:
- Draft: Not yet sent to the customer.
- Sent: Emailed to the customer, awaiting a response.
- Approved: Customer has accepted the quote.
- Declined: Customer has rejected the quote.
- Invoiced: A final invoice has been generated from this quote.
- Creating a Quote: The "Add Quote" page lets you select a customer, set dates, and add line items. You can add items from your Inventory or create custom "on-the-fly" items. The Quote Number is generated automatically based on your settings.
- Editing a Quote: From the edit screen, you can:
- Send Quote: Emailed the PDF quote to the customer and marks it as 'Sent'.
- View PDF: Opens the PDF in a new tab.
- Convert to Invoice: (If 'Approved') Automatically creates a new draft invoice using all the details from the quote.
Invoices
Manage your billing and get paid.
- Invoice List: Shows all invoices. Statuses include:
- Draft: Not yet sent.
- Sent: Emailed to the customer, awaiting payment.
- Overdue: The due date has passed and it is not fully paid.
- Partially paid: A payment has been recorded, but there is still a balance.
- Paid in full: The total paid matches the invoice total.
- Cancelled: A voided invoice.
- Creating an Invoice: You can create a new, blank invoice or create one directly from an approved quote. The Invoice Number is automatically generated and is non-editable.
- Editing an Invoice: From the edit screen, you can:
- Send Invoice: Emailed the PDF invoice to the customer and marks it as 'Sent'.
- View PDF: Opens the PDF in a new tab.
- Record Payment: Opens a modal to record a payment against this invoice. You can log the amount, date, method, and upload a Proof of Payment (POP). The system will automatically update the invoice status (e.g., to 'Partially paid' or 'Paid in full') based on the payments received.
Recurring Invoices
Automate your regular billing (e.g., for retainers or service contracts).
- Recurring List: Shows all *templates* for recurring invoices.
- Creating a Template: You define a customer, line items, and a schedule.
- Schedule Options: You can set invoices to be generated:
- Weekly: On a specific day of the week (e.g., "Weekly on Monday").
- Monthly: On a specific day of the month (e.g., "Monthly on day 25" or "Monthly on last day").
- Quarterly: Every 3 months on a specific day.
- Yearly: On a specific month and day.
- Automation: The **Cron Job** (see Admin Area) runs once per day, finds any recurring templates that are due, generates a new invoice, and automatically emails it to the customer.
Payments
This screen provides a central list of all individual payments received from all customers, sorted by date. You can see which invoice the payment was for and view any uploaded Proof of Payment (POP).
Expenses
Track your business spending to use in financial reports.
- Expense List: Shows all recorded expenses.
- Record New Expense: A form to enter the date, vendor, description, and total amount. If you are VAT registered, you can specify the VAT amount. You can also upload a receipt/slip.
- Manage Categories: A separate screen to add, edit, or delete your expense categories (e.g., "Office Supplies", "Fuel", "Software").
Customers
Your central client database.
- Customer List: Shows all customers (Companies and Individuals) and their "Total Due" (the same as on the Aged Receivables report).
- Adding a Customer: You can add a customer as an Individual or a Company. When you create a new customer, the system automatically:
- Creates a customer record.
- Generates a secure temporary password.
- Creates a Customer Portal login for them.
- Sends them the **"customer_welcome"** email template with their login details and temporary password.
- View Customer: A 360-degree view of the customer, including:
- Key stats (Total Invoiced, Amount Outstanding).
- Contact and Address details.
- Tabs to view all Invoices, Quotes, and Payments related to this customer.
- Impersonate: The icon allows an Admin to log in *as* that customer to see the Customer Portal exactly as they see it.
Inventory
Manage your products and services.
- Inventory List: Shows all items. If stock is managed, it displays the quantity and highlights low stock in red.
- Adding/Editing an Item:
- Item Type: Can be a 'Product' (stocked item) or 'Service' (non-stocked item).
- Manage Stock: If checked for a Product, you can set the "Current Stock Quantity" and "Re-order Level". When this item is added to an *invoice* (not a quote), the stock level will be automatically reduced.
- Pricing: When you change an item's price and save, the system keeps a history of the old price. This ensures that old quotes and invoices are not affected.
- Manage Categories: A separate screen to organize your items (e.g., "Hardware", "Consulting", "Software").
Admin Area (Admin-Only)
This section of the sidebar is only visible to users with the "Admin" role.
Admin Dashboard
Provides high-level system statistics, such as total user count, admin count, customer count, and inventory item count.
Manage Users
This screen allows you to manage the *internal* users of the system (your staff), not your customers.
- User: Can access the core features (Invoices, Quotes, etc.).
- Admin: Can access core features AND the Admin Area (Settings, Users, etc.).
You can add, edit, or delete users from here. You cannot delete yourself or change your own role.
Site Settings
This is the most important configuration screen, broken into tabs:
- General & Contact: Set your Company Name, Email, Phone, and Address. This information appears on all PDFs and emails.
- Branding: Upload your logo (for PDFs/emails) and favicon (for the browser tab), and set the primary theme color for the app.
- Financial: Set your currency (e.g., ZAR) and enable/disable VAT. If enabled, you must provide your VAT Number and Percentage.
- Banking Details: Your bank account details, which will be printed on invoices and quotes for payment.
- Document Settings:
- Prefix: The text before your document number (e.g., `INV-` or `QU-`).
- Next Number: The *next* number to be used. The system will auto-increment this for you.
- Number Padding: Set to `5` to make `INV-1` become `INV-00001`. Set to `0` to disable padding.
- Default Terms: The default text that appears in the "Terms & Conditions" box on new quotes and invoices.
- Email (SMTP): Your settings for your outgoing mail server (e.g., mail.yourdomain.co.za) needed to send emails. You can use the "Send Test Email" button to confirm your settings are correct.
Email Templates
This screen allows you to edit the content of all emails sent by the system (e.g., the welcome email, overdue invoice reminder, etc.). You can use special placeholders like `{{name}}` which the system will replace with the correct value.
Cron / Automation
This page provides the commands needed to set up a "cron job" on your web server. This is a scheduled task that runs automatically.
You must set up this command to run **Once Per Day**.
The cron job is responsible for:
- Finding and emailing **Overdue Invoices**.
- Marking **Expired Quotes** as 'Declined'.
- Generating and emailing **Recurring Invoices** that are due.
This page also shows a log of the last 20 times the cron job has run, so you can see if it was successful.
The Customer Portal
Portal Login
As mentioned, when you create a customer, they are automatically sent a welcome email with a temporary password. They can then log in using the *main login page* (`user/login`). The system will recognize their email as a customer and redirect them to the portal.
Impersonation
If you are logged in as an Admin, you can go to the "Customers" list and click the "Impersonate" icon for any customer. This will log you in as them.
When you are impersonating, you will see a yellow banner at the top of the screen. You can click "Return to Admin" to securely log back into your admin account.
Forced Password Reset
When a customer logs in for the first time (or after an admin impersonation created their login), they will be immediately redirected to a "Reset Your Password" screen. They cannot access any other part of the portal until they have set their own private password.
Portal Pages
The customer portal is a simplified, read-only version of the main app. It allows customers to:
- Dashboard: See their stats (Amount Outstanding, Active Invoices, Active Quotes).
- My Profile: Update their own contact and address details.
- My Quotes: View a list of their quotes and download the PDFs.
- My Invoices: View a list of their invoices and download the PDFs.
- Payment History: View a list of all payments they have made.
Database Reset
A special SQL script is included in `dev/reset_database.sql`. Running this script in phpMyAdmin will completely wipe all transactional data from the system:
- Customers
- Quotes, Invoices, Payments
- Inventory Items & Categories
- Expenses & Categories
- All logs
This script **WILL NOT** delete your `users`, `settings`, or `email_templates`. It will also automatically reset your invoice and quote counters back to 1. This is useful for clearing out test data before going live.