Table of Contents
1 Accounting Module Audit Report
Project: Invoice / Accounting System Auditor: Senior Backend Engineer
(Accounting/Audit Review) Date: 2026-05-03 Codebase: Laravel (PHP) — c:\wamp64\
www\invoice Compliance Context: Saudi Arabia (ZATCA e-invoicing Phase 2)
1.1 1. Current Feature Summary
1.1.1 Sales Module
Feature Status
Sales Quotations Present — full CRUD, email, PDF, clone,
convert to Proforma/Invoice,
soft-delete/restore
Proforma Invoices Present — full CRUD, PDF, clone, convert to
final Invoice
Sales Invoices Present — full CRUD, recurring, email, PDF,
print, clone, ZATCA compliance
Customer Refunds / Credit Notes Present — partial, refund from invoice
with cash/method/system_adjustment,
ZATCA-compliant credit note
Customer Payments (Receipt) Present — create, reverse, invoice
matching, advance payments
Customer Advance Payments Present — model + routes exist
1.1.2 Purchase Module
Feature Status
Purchase Bills (Supplier Invoices) Present — full CRUD, email, PDF, print,
clone, status tracking
Purchase Returns Present — full CRUD, email, PDF, print,
status tracking
Supplier Payments (Payment Voucher) Present — create, reverse, bill matching,
advance payments
Supplier Advance Payments Present — model + routes exist
Purchase Orders Partial — PurchaseOrder model +
migration exists but no controller, no
routes, no views
1.1.3 Accounts & Ledger Module
Feature Status
Chart of Accounts Present — hierarchical (parent/child),
account types (Asset, Liability, Income,
Expense, Equity)
Account Ledger Entries Present — debit/credit journal entries
with reference_type/reference_id
polymorphic link
Trial Balance Present — date-filtered, balance check
Balance Sheet Present — view exists at admin/balance-
sheet/[Link]
Vouchers (printed) Present — 21 voucher templates in
resources/views/vouchers/
1.1.4 HR & Payroll Module
Feature Status
Employee Master Present — create, edit,
salary/advance/loan account linkage
Salary Payments Present — CRUD, disbursement tracking
Employee Loans Present — full lifecycle with repayment
schedule (JSON)
Loan Repayments Present — CRUD, per-installment tracking
1.1.5 Inventory & Items
Feature Status
Item / Service Catalog Present — SKU, barcode, cost/sale price,
parent-child hierarchy
Item Categories & Types Present — categorization and type
classification
Item Stock Levels Present — per-location stock with
item_stocks table
Stock Ledger / History Present — movement history via
stock_ledgers
Item Ledger (per item) Present — per-item ledger view
1.1.6 CRM & Contacts
Feature Status
Customer Management Present — full CRUD, national address, tabs
(invoices, payments, quotations, vouchers)
Vendor / Supplier Management Present — full CRUD, national address, tabs
(bills, items, payments, vouchers)
1.1.7 Configuration & System
Feature Status
Tax Management Present — tax codes, percentage, item-level
assignment
Currency Management Present — multi-currency with set-
currency functionality
Business Management Present — multi-business/cost-center with
document prefixes
Multi-company (Tenant) Present — company-level segregation
throughout
Roles & Permissions Present — role-based with granular
permission middleware
Users Management Present — CRUD with role assignment
Audit Logs Present — owenIt/auditing package,
business/company scoped
Document Templates Present — customizable per document
type
Document Numbering Present — business-specific prefix + auto-
increment
1.1.8 Reports
Report Status
Profit & Loss Present — date range,
monthly/quarterly/yearly breakdown,
comparison
Cash Flow Present — route + controller + view exist
Expense Report Present — route + controller + view exist
Revenue Report Present — route + controller + view exist
Receivable Aging Present — route + controller + view exist
Payable Aging Present — route + controller + view exist
Account Statement Present — date-range, per-account,
printable
VAT Report Present — ZATCA quarterly view, pending
submissions, sales/purchase breakdown
Trial Balance Present — date-filtered
Balance Sheet Present — view exists
1.1.9 Compliance
Feature Status
ZATCA E-Invoicing (Saudi Arabia) Present — UUID, hash, QR code, XML
Feature Status
generation, clearance/approval status, ICV
allocation
1.2 2. Missing Standard Accounting Features
1.2.1 2.1 Financial Year Management
Missing completely. No financial_years table, no concept of year-open/year-close, no
period locking. Why it matters: Without financial year boundaries, there is no way to
prevent backdating entries into closed periods, no year-end closing process, and reports
cannot be reliably generated for a complete fiscal year. Required for statutory compliance.
1.2.2 2.2 Opening Balances
Missing completely. No mechanism to enter account opening balances when onboarding
existing businesses. Why it matters: Without opening balances, the ledger and all financial
reports (trial balance, balance sheet, P&L) will be incorrect for any business that was
previously operational. This is a Day-1 requirement for real-world use.
1.2.3 2.3 Closing Balances / Period Close
Missing completely. No year-end close, no retained earnings computation, no balance
carry-forward. Why it matters: Every accounting system must transfer net profit/loss to
retained earnings at year end and zero out income/expense accounts. Without this, P&L
reports bleed across financial years.
1.2.4 2.4 Bank Reconciliation
Missing completely. No bank statement import, no matching of ledger entries to bank
statement lines, no reconciliation status tracking. Why it matters: Bank reconciliation is a
core month-end control that ensures the bank balance per books matches the bank
statement. Its absence is a major gap for any business doing real accounting.
1.2.5 2.5 Sales Orders
Missing completely (from the user-facing workflow). The PurchaseOrder model exists in
skeleton form but there are no SalesOrder model, controller, views, or routes. Why it
matters: The sales workflow is Quotation → Proforma → Invoice. A Sales Order stage
between Proforma and Invoice is expected in product-based businesses for fulfillment
tracking before billing.
1.2.6 2.6 Delivery Slips / Delivery Challans
Missing completely. No delivery note or challan document type. Why it matters: For
inventory-based businesses, a delivery challan proves goods were dispatched before
billing. It is legally required in many jurisdictions and ties inventory movement to the
billing cycle.
1.2.7 2.7 Contra Vouchers
Missing. No contra voucher type for cash-to-bank or bank-to-cash transfers. Why it
matters: Moving funds between a cash account and a bank account is one of the most
common daily transactions. Without a contra voucher, these must be entered as manual
journal entries, which is error-prone.
1.2.8 2.8 Cash Slips / Petty Cash Management
Missing completely. No petty cash fund, no petty cash slip/voucher, no petty cash
replenishment flow. Why it matters: Most businesses maintain a petty cash fund for small
daily expenses. Without it, staff must raise full expense entries for minor purchases, or cash
handling goes untracked.
1.2.9 2.9 Approval Workflows
Missing completely. No approval states on invoices, bills, payments, or journal entries. No
approver assignment, no approval queue. Why it matters: Authorization controls are
mandatory for any business with financial separation of duties. Without approval
workflows, any user with create permission can post financial transactions without review.
1.2.10 2.10 Notifications & Reminders
Missing completely. No scheduled reminders for overdue invoices, upcoming due bills, or
recurring invoice alerts. No in-app notification center. Why it matters: Proactive alerts
reduce overdue receivables and prevent missed supplier payments. Most competing
products include automated email/SMS reminders.
1.2.11 2.11 Import / Export (Data)
Partial at best. Export to Excel/PDF exists for some reports but the export stubs in
ProfitLossController return stub JSON responses ("Excel export functionality
to be implemented"). No bulk data import for customers, suppliers, items, or opening
balances. Why it matters: Onboarding and migration from other accounting systems
requires bulk import. Auditors and accountants require Excel exports of all reports.
1.2.12 2.12 Cash Book / Bank Book (Dedicated Reports)
Missing as dedicated reports. Cash flow report exists but it is not the same as a
traditional cash book (chronological listing of all cash receipts and payments) or bank book
(same for bank transactions). Why it matters: Cash book and bank book are among the
most referenced day-to-day accounting records. They differ from a cash flow statement,
which is a summary report.
1.2.13 2.13 General Ledger Report (Consolidated)
Partial. Account statement exists per-account but there is no consolidated general ledger
report showing all accounts side-by-side with running balances. Why it matters: Auditors
and accountants regularly need to pull a full general ledger dump across all accounts for a
date range.
1.2.14 2.14 Customer Statement
Missing as a dedicated report. Per-customer tabs show invoices and payments but there
is no printable/exportable customer account statement showing outstanding balance,
aging, and transaction history. Why it matters: Customer statements are sent to clients
monthly as collection tools and are expected in every invoicing product.
1.2.15 2.15 Vendor Statement
Missing as a dedicated report. Same gap as customer statement but for suppliers. Why it
matters: Vendor statements help reconcile what the system owes against what the
supplier claims.
1.2.16 2.16 Journal Voucher (Manual Journal Entry UI)
Partial. AccountsLedgerEntryController and
resources/views/admin/transactions/[Link] exist, but the
VoucherController::show() method resolves voucher type from a Voucher model that
is empty (no $fillable, no relationships). It is unclear whether full manual journal entry
creation is operational. Why it matters: Accountants need to post adjusting entries,
accruals, and corrections that do not originate from invoices or payments. A robust journal
entry screen is non-negotiable.
1.3 3. Incomplete or Weak Features
1.3.1 3.1 Profit & Loss — Uses Hardcoded COGS Split
In [Link], cost of goods sold and operating expenses are calculated as
hardcoded 60%/40% splits of total bill spend:
$costOfGoodsSold = $netExpenses * 0.6; // Example: 60% of expenses
$operatingExpenses = $netExpenses * 0.4; // Example: 40% of expenses
This means the P&L report is not driven by the chart of accounts and will be wrong for
any business with a different cost structure. The fix requires classifying expenses through
account types or expense categories.
1.3.2 3.2 Profit & Loss Export — Stub Only
Both exportToPdf() and exportToExcel() in [Link] return a JSON
stub message. The export buttons on the P&L report screen do nothing useful.
1.3.3 3.3 Trial Balance — No Opening Balance Awareness
The [Link] calculates balances purely from ledger entries within the
date range. It does not incorporate account opening balances, so the report is only accurate
if the business started from zero on the system.
1.3.4 3.4 Purchase Orders — Skeleton Only
The PurchaseOrder model (app/Models/[Link]) and migration exist with
proper fields, but there is no controller, no views, and no routes. The feature is unusable.
1.3.5 3.5 Expense Model — Disconnected from Ledger
The Expense model (app/Models/[Link]) has no account_id field and no ledger
entry creation. Expenses entered via the expense module do not flow into the chart of
accounts or affect the trial balance. Views exist for expenses (admin/expenses/) but the
accounting impact is nil.
1.3.6 3.6 Income Model — Same Problem as Expenses
The Income model (evidenced by admin/incomes/ views and IncomeCategory model)
similarly appears disconnected from the ledger. Ad-hoc income entries do not post to
accounts.
1.3.7 3.7 Voucher System — Empty Core Model
The Voucher model (app/Models/[Link]) has no fields or relationships defined. The
VoucherController queries it by group field but the model provides no guidance on its
structure. The 21 voucher print templates exist but the underlying data integrity is unclear.
1.3.8 3.8 Balance Sheet — No Implementation Visible
The balance sheet view exists at
resources/views/admin/balance-sheet/[Link] but there is no
BalanceSheetController in the controllers directory and no route pointing to it. The
view may be unreachable.
1.3.9 3.9 Dashboard — Invoice-Only Metrics
The [Link] shows invoice/bill counts, total revenue (paid invoices only),
and employee/loan counts. It does not show accounts receivable balance, accounts payable
balance, cash position, or any accounting-derived KPIs.
1.3.10 3.10 Recurring Invoices — No Auto-Generation
RecurringInvoiceController only lists upcoming recurring invoices. There is no
scheduled job or queue worker to automatically generate invoices when they fall due.
1.3.11 3.11 Multi-Currency — Rate Not Applied to Ledger
Currency support exists at the settings level but it is not clear that exchange rate
differences are tracked in the ledger. There is no exchange_rate_gain_loss account or
revaluation mechanism.
1.3.12 3.12 Salary Slips — No Printable Document
Salary payments are tracked but there is no salary slip document template (PDF/print) for
distributing to employees. The vouchers/[Link] exists as a voucher print
but a proper salary slip is a different document.
1.4 4. Voucher and Slip Gap Analysis
Voucher / Slip Type Status Notes
Sales Voucher Present vouchers/
[Link]
template
Purchase Voucher Present vouchers/
[Link]
template
Sales Receipt — Cash Present vouchers/
sales_receipt_cash.bl
[Link]
Sales Receipt — Cheque Present vouchers/
sales_receipt_cheque.
[Link]
Sales Receipt — Transfer Present vouchers/
sales_receipt_transfe
[Link]
Purchase Payment — Cash Present vouchers/
purchase_payment_cash
.[Link]
Purchase Payment — Present vouchers/
Cheque purchase_payment_cheq
[Link]
Purchase Payment — Present vouchers/
Transfer purchase_payment_tran
[Link]
Journal Voucher Partial Template
vouchers/journal_entr
[Link] exists;
manual creation UI is
unclear
Credit Note Voucher Present vouchers/
credit_note.[Link]
Debit Note Voucher Present vouchers/
debit_note.[Link]
Purchase Return Voucher Present vouchers/
purchase_return.blade
Voucher / Slip Type Status Notes
.php
Sales Return Voucher Present vouchers/
sales_return.[Link]
p
Employee Payment Present vouchers/
(Payroll) employee_payment.blad
[Link] +
vouchers/[Link]
[Link]
Employee Advance Present vouchers/
employee_advance.blad
[Link]
Loan Repayment Voucher Present vouchers/
employee_loan_repayme
[Link]
Stock Adjustment Voucher Present vouchers/
stock_adjustment.blad
[Link]
Stock Issue Voucher Present vouchers/
stock_issue.[Link]
Stock Receipt Voucher Present vouchers/
stock_receipt.blade.p
hp
Stock Transfer Voucher Present vouchers/
stock_transfer.blade.
php
Contra Voucher Missing No cash↔bank transfer
voucher
Delivery Challan / Slip Missing No goods delivery
document
Cash Slip Missing No petty cash slip
Expense Slip Partial Expense model + views
exist but no print template
Salary Slip (Payslip) Missing Payroll voucher exists but a
proper formatted salary slip
is absent
Petty Cash Slip Missing No petty cash module
Receipt Voucher Present (via Sales Receipt Covered by payment receipt
cash/cheque/transfer) vouchers
Payment Voucher Present (via Purchase Covered by supplier
Payment payment vouchers
cash/cheque/transfer)
1.5 5. Accounting Logic Gap Analysis
Accounting Concept Status Notes
Double-Entry Bookkeeping Partial Debit/credit entries post via
AccountLedgerEntry with
entry_type. Invoice,
payment, and payroll
transactions create entries.
However, Expense and
Income models do not
create ledger entries — a
major gap.
Chart of Accounts Present Hierarchical accounts with
types (Asset, Liability,
Income, Expense, Equity).
Account number
generation, tree view.
Debit/Credit Balance Rules Present Account::calculateBal
anceBasedOnType()
correctly applies normal
balance rules
(Asset/Expense = Debit
normal;
Liability/Income/Equity =
Credit normal).
Ledger Posting on Partial Invoices, payments, salary,
Transactions loans post to ledger.
Standalone
expenses/incomes do not.
Stock adjustments have
templates but ledger
integration is unverified.
Opening Balances Missing No mechanism to seed
initial account balances. All
reports assume zero
starting position.
Closing Balances / Year-End Missing No year-end close process,
Close no retained earnings
transfer, no period locking.
Financial Year / Period Missing No financial_years
Management table. Dates are free-form
with no period boundaries
enforced.
Accounting Concept Status Notes
Audit Trail Present owenIt/auditing on
Account, Expense, and
other models. AuditLog
model and views exist.
Payment reversals tracked
with reversal_reason.
Bank Reconciliation Missing No bank statement
matching or reconciliation
workflow.
Currency Revaluation / Missing Multi-currency exists but no
Exchange Differences revaluation or gain/loss
posting.
Inter-Account Transfers Missing No dedicated contra
(Contra) transaction type for
cash↔bank.
1.6 6. Reports Gap Analysis
Report Status Notes
Trial Balance Present Date-filtered. Does not
include opening balances.
Profit & Loss Statement Partial Present but COGS/OpEx
split is hardcoded (60/40)
— not account-driven.
Exports are stubs.
Balance Sheet Partial View exists; no confirmed
controller or route.
General Ledger Missing Only per-account statement.
(Consolidated) No all-accounts ledger view.
Customer Statement Missing No printable per-customer
statement with running
balance.
Vendor Statement Missing No printable per-vendor
statement with running
balance.
Tax / VAT Report Present Excellent — quarterly view,
pending submissions,
sales/purchase split, export.
Sales Report Partial Revenue report exists; no
drill-down by item,
customer, or rep.
Report Status Notes
Purchase Report Partial No dedicated purchase
summary report; bills
listing only.
Expense Report Present Route + controller + view
exist.
Inventory Report Partial Stock ledger and item
ledger exist. No stock
valuation report
(FIFO/weighted avg).
Cash Book Missing No dedicated chronological
cash receipts/payments
report.
Bank Book Missing No dedicated bank
transaction listing report.
Receivables Aging Present Route + controller + view
exist.
Payables Aging Present Route + controller + view
exist.
Account Statement (per Present Date range, printable,
account) multiple template styles.
Cash Flow Statement Present Route + controller + view
exist.
1.7 7. Priority Recommendations
1.7.1 Critical (Blocks accurate accounting)
1. Opening Balances — Without this, the system cannot be used by any live business
migrating from another system. Every financial report will show incorrect figures.
2. Fix P&L COGS Split — The hardcoded 60/40 split makes the P&L report unreliable.
It must be driven by account classifications.
3. Connect Expense/Income models to Ledger — Standalone expense and income
entries must post double-entry ledger entries or they are invisible to financial
reports.
4. Financial Year Management — Required for period-based reporting, year-end
close, and statutory compliance.
5. Fix P&L and other Report Exports — Export stubs must be completed.
Accountants need Excel/PDF exports.
6. Balance Sheet Controller & Route — The view exists but the feature is
unreachable without a controller and route.
1.7.2 Important (Expected in accounting software)
7. Bank Reconciliation — Required for any business using bank accounts. Month-end
closing depends on it.
8. Closing Balances / Year-End Close — Without period close, P&L bleeds across
years.
9. Customer Statement Report — Printable customer statement is a minimum
expectation.
10. Vendor Statement Report — Same as above for suppliers.
11. Cash Book & Bank Book Reports — Standard daily accounting records.
12. General Ledger (Consolidated) Report — Auditors expect this.
13. Contra Voucher — Common daily transaction type for cash↔bank transfers.
14. Petty Cash Module — Standard for any office environment.
15. Approval Workflows — Required for financial controls and separation of duties.
16. Sales Orders — Complete the procurement/sales order lifecycle.
17. Delivery Challans — Required for inventory-based businesses.
18. Complete the Purchase Orders feature — The skeleton exists; finish the
controller and UI.
19. Salary Slip PDF — Employees expect a printable payslip.
1.7.3 Nice to Have (Enhances product quality)
20. Notifications & Reminders — Invoice overdue alerts, upcoming bill reminders.
21. Recurring Invoice Auto-Generation — Scheduled job to auto-create recurring
invoices.
22. Bulk Import — CSV/Excel import for customers, suppliers, items, opening balances.
23. Stock Valuation Report — FIFO/weighted average cost report.
24. Inter-company / Multi-currency Revaluation — Exchange gain/loss tracking.
25. Dashboard Accounting KPIs — AR balance, AP balance, cash position, overdue
invoices.
26. Expense Slip Print Template — Printable expense slip for reimbursements.
1.8 8. Implementation Roadmap
1.8.1 Phase 1 — Must-Have Accounting Foundation
Goal: Make the existing data accurate and complete. Nothing else matters if the ledger is
wrong.
• ☐ Opening Balances — Add account_opening_balances table (account_id,
financial_year_id, amount, nature). Build UI for accountant to enter balances
on setup.
• ☐ Financial Year — Add financial_years table (start_date, end_date,
status: open|closed|locked). Enforce date filtering in all reports.
• ☐ Fix Expense & Income Ledger Posting — Every Expense::created and
Income::created event must generate paired debit/credit AccountLedgerEntry
rows (expense debit + cash/AP credit).
• ☐ Fix P&L COGS Calculation — Replace hardcoded split with actual account-type-
driven aggregation from the chart of accounts.
• ☐ Balance Sheet Controller — Implement BalanceSheetController that
queries Assets (debit-balance accounts) vs Liabilities + Equity (credit-balance
accounts) and add the missing route.
• ☐ Complete P&L & Cash Flow Exports — Implement Excel export using Laravel
Excel (already likely in [Link]) and PDF via existing DomPDF.
1.8.2 Phase 2 — Operational Accounting Features
Goal: Support daily accounting operations end to end.
• ☐ Bank Reconciliation — bank_statements table, import CSV, match-to-ledger
UI, reconciliation status.
• ☐ Year-End Close — Close financial year, transfer net profit/loss to retained
earnings account, lock period.
• ☐ Contra Voucher — UI + ledger entry for cash-to-bank and bank-to-cash
transfers.
• ☐ Petty Cash Module — Petty cash fund, petty cash slips, replenishment workflow.
• ☐ Customer & Vendor Statements — Printable/exportable statement with
running balance.
• ☐ Cash Book & Bank Book Reports — Chronological ledger reports filtered by
account type.
• ☐ General Ledger Report — All accounts with date-range filter, running balance
per account.
• ☐ Sales Orders — SalesOrder model + full CRUD, convert from Quotation,
convert to Invoice.
• ☐ Delivery Challans — Linked to sales orders/invoices, inventory movement
trigger.
• ☐ Complete Purchase Orders — Controller, views, routes for the existing PO
model.
• ☐ Salary Slips — PDF payslip template per salary payment.
• ☐ Approval Workflows — Approval state on invoices, bills, payments; approver
assignment; notification on pending approval.
1.8.3 Phase 3 — Advanced Accounting and Automation
Goal: Move from manual accounting to automated, insight-driven operations.
• ☐ Notifications & Reminders — Queue-based overdue invoice alerts, due bill
reminders, recurring invoice warnings.
• ☐ Recurring Invoice Auto-Generation — Laravel scheduler job to create invoices
when due.
• ☐ Bulk Import — Excel/CSV import for customers, suppliers, items, journal entries,
and opening balances.
• ☐ Stock Valuation Report — FIFO and weighted average cost reporting.
• ☐ Multi-Currency Revaluation — Period-end revaluation of foreign currency
balances, exchange gain/loss posting.
• ☐ Dashboard Accounting KPIs — Total AR, total AP, net cash position, overdue
count, monthly trend charts driven from actual ledger balances.
• ☐ Global Search — The GlobalSearchController route is currently commented
out; re-enable and implement.
1.9 9. Developer Notes
1.9.1 Database / Entity Changes Needed
Change Details
financial_years table id, company_id, business_id, label,
start_date, end_date, status
ENUM(open, closed, locked),
closed_at, closed_by
account_opening_balances table id, account_id, financial_year_id,
opening_balance, nature
ENUM(debit, credit), entered_at,
entered_by
bank_statements table id, account_id, statement_date,
closing_balance, file_path,
imported_at
bank_statement_lines table id, bank_statement_id, date,
description, amount, type
ENUM(debit, credit),
matched_entry_id, reconciled
financial_year_id FK Add to account_ledger_entries,
invoices, bills, customer_payments,
supplier_payments
petty_cash_funds table id, account_id, custodian_user_id,
float_amount, current_balance
petty_cash_slips table id, fund_id, amount, description,
category, voucher_no, created_by,
approved_by
sales_orders table id, company_id, business_id,
customer_id, order_number,
order_date, status, notes
delivery_challans table id, company_id, business_id,
sales_order_id, invoice_id,
Change Details
challan_number, dispatch_date,
delivery_date, status
approval_requests table (polymorphic) approvable_type, approvable_id,
requested_by, assigned_to, status
ENUM(pending, approved, rejected),
note, actioned_at
Add expense_account_id to expenses Link to Chart of Accounts for proper ledger
posting
Add income_account_id to incomes Link to Chart of Accounts for proper ledger
posting
Fix Voucher model Add $fillable, $casts, and relationships
— currently an empty stub
1.9.2 UI Screens Needed
Screen Description
Financial Year Management List, create, close/lock years; prevent
entries in locked periods
Opening Balances Entry Spreadsheet-style form to enter
debit/credit opening balance per account
Bank Reconciliation Statement upload, line matching UI,
reconciled vs unreconciled view
Year-End Close Confirm net profit/loss account transfer,
mark year closed
Contra Voucher Simple two-account cash↔bank transfer
with amount + date
Petty Cash Slip Create slip, fund balance display,
replenishment request
Customer Statement Date-range filter, balance forward,
transaction list, running balance, PDF
export
Vendor Statement Same as customer statement for suppliers
Cash Book Report Date range, cash account filter, debit/credit
columns, running balance
Bank Book Report Same as cash book for bank accounts
General Ledger Report All accounts, date range, running balance
column
Sales Order CRUD form similar to quotation, convert to
delivery + invoice
Delivery Challan CRUD, link to sales order/invoice, dispatch
details, PDF print
Screen Description
Approval Queue Pending approvals list, approve/reject with
comment
Salary Slip (PDF) Printable payslip template with
earnings/deductions breakdown
Dashboard Enhancement Add AR/AP totals, cash position, overdue
count widgets
1.9.3 Validation Rules and Edge Cases
1. Period Locking — All entry creation endpoints must check that the entry date falls
within an open financial year. Return a validation error if posting to a locked/closed
period.
2. Double-Entry Balance Check — Every transaction must have equal total debits
and total credits before saving. This should be enforced at the service layer, not just
in templates.
3. Opening Balance Date — Opening balances should be backdated to the day before
the financial year start to keep them separate from period transactions.
4. Payment Allocation — When a payment exceeds the invoice balance, the
remainder must be allocated to advance payment or flagged. Currently, over-
payment scenarios are not explicitly validated.
5. Contra Voucher — Must prevent selecting the same account for both sides of the
entry.
6. Recurring Invoice Due Dates — Scheduler must handle timezones per business
setting, not server time.
7. ZATCA Credit Notes — Already handled: credit notes post to ZATCA. Ensure debit
note ZATCA flow is also covered when debit notes are fully implemented.
8. Stock Negative Balance — The inventory module should prevent stock quantities
from going negative unless explicitly allowed per item setting.
9. Soft-Delete Cascade — When a customer or supplier is soft-deleted, associated
invoices/bills should not be accessible from active lists but must remain queryable
for financial reports.
10. Multi-Currency Ledger Entries — Entries must store both original currency
amount and base currency equivalent. The current AccountLedgerEntry has only
amount — add currency_id and exchange_rate columns.
1.10 10. Final Verdict
1.10.1 Current Classification
Billing + Basic Accounting Software (approaching intermediate accounting
software in some areas)
The application has moved well beyond a simple invoicing tool. It has: - A working chart of
accounts with hierarchical structure - Double-entry ledger posting (for invoices and
payments) - Trial balance, balance sheet view, and P&L report - Full voucher template
library (21 voucher types) - ZATCA Phase 2 compliance (advanced feature) - HR/payroll
module with loans - Inventory with stock ledger
However, several foundational accounting principles are not yet implemented:
Gap Impact
No opening balances Every financial report is inaccurate for live
businesses
No financial year management Reports cannot be bounded to a fiscal
period
No year-end close P&L and balance sheet bleed across years
P&L uses hardcoded 60/40 cost split Core financial report is unreliable
Expenses and incomes not posted to ledger Significant spend goes unrecorded in
accounts
No bank reconciliation Month-end close is not possible
1.10.2 What Is Needed to Reach Full Accounting Software
1. Complete the accounting foundation (Phase 1 above): opening balances, financial
years, fix P&L logic, fix expense ledger posting — approximately 3–4 weeks of
focused backend work.
2. Add operational workflows (Phase 2): bank reconciliation, year-end close,
statements, delivery challans, approval workflows — approximately 6–8 weeks.
3. Add automation and advanced features (Phase 3): recurring jobs, notifications,
bulk import — approximately 4–5 weeks.
With Phase 1 and Phase 2 complete, the application would qualify as Full Accounting
Software suitable for SME use with Saudi ZATCA compliance. Phase 3 would bring it to the
level of commercially competitive SaaS accounting products.