Complete User Guide v1.0

XCRETCH Business ERP

A complete, double-entry accounting system designed for modern businesses that handle both traditional banking and cryptocurrency. This guide covers every feature, workflow, and screen in the system.

System Overview

This ERP system manages your complete business lifecycle:

Client Management
Track clients, generate invoices, record payments
Banking
Manage multiple bank accounts in different currencies
Crypto Portfolio
Track crypto wallets, transactions, and conversions
Expense Management
Categorize and track all business expenses
Payroll
Manage employees and process monthly salaries
Double-Entry Accounting
Full general ledger with journal entries
Financial Reports
P&L, Balance Sheet, Cash Flow, and more
Multi-Currency
PKR, USD, EUR, GBP, AED, USDC, USDT supported
RBAC Security
Role-based access control with 35+ permissions
Audit Trail
Complete tracking of every system action
Login Credentials (Demo)
EmailPasswordRole
admin@xcretch.compasswordSuper Admin (full access)

Login & Access

How to Login

1Open your browser and navigate to http://localhost/x_erp
2Enter your email address and password
3Click Sign In — you'll be redirected to the Dashboard
Tip: Your session stays active while you're working. If idle for a long time, you'll need to login again.

Logging Out

Click your name in the top-right corner and select Logout. Always log out when using shared computers.

Dashboard

The Dashboard is your business command center. It shows real-time financial data at a glance.

Widgets Explained

WidgetWhat It Shows
Total BalanceCombined balance across all bank accounts and crypto wallets in base currency (PKR)
Monthly RevenueTotal invoiced amount for the current month
OutstandingTotal unpaid amount across all issued invoices
Monthly ExpensesTotal expenses recorded for the current month
Recent InvoicesLast 5 invoices with status badges
Recent PaymentsLast 5 client payments received
Expenses by CategoryTop expense categories for the month
Revenue ChartMonthly revenue vs expenses bar chart (last 12 months)
Tip: The Dashboard updates in real-time. Every time you create an invoice, record a payment, or post an expense, the dashboard reflects it immediately.

The left sidebar organizes all modules into sections:

SectionModules
DashboardMain overview screen
AccountingChart of Accounts, Journal Entries, General Ledger
Audit & LogsAudit Trail
ClientsClient list, Invoices, Payments
BankingBank Accounts, Transfers, Reconciliation
CryptoWallets, Transactions
ExpensesExpenses, Categories, Salaries
EmployeesEmployee directory
Reports10 financial reports
AdministrationSettings, Users, Roles, Currencies
Tip: The active page is highlighted in the sidebar. Breadcrumb navigation at the top shows your current location.

Clients

Manage all your business clients. Every client can have invoices, payments, and balances tracked in their preferred currency.

Viewing Clients

Navigate to Clients in the sidebar. The list shows:

  • Client code (auto-generated: CLT-001, CLT-002, etc.)
  • Company name and contact person
  • Email and phone
  • Currency
  • Status (Active/Inactive)
  • Outstanding balance

Creating a New Client

1Click + New Client button
2Fill in required fields: Company Name, Currency
3Fill optional fields: Contact Person, Email, Phone, Address, Tax Number
4Click Save — the client is created with status "Active"

Client Detail Page

Click any client row to see their detail page with:

  • Client Info — Full profile, contact details, address
  • Outstanding Balance — Total unpaid invoices in their currency
  • Invoice History — All invoices for this client with status
  • Payment History — All payments received from this client

Editing a Client

Click Edit on the client detail page. Change any field and click Update.

Deactivating a Client

Set status to Inactive to hide them from dropdowns while preserving all historical data.

Client Payments

Record payments received from clients against their invoices.

Recording a Payment

1Go to Clients → Payments
2Click + Record Payment
3Select the Client from dropdown
4Enter Amount received
5Select Payment Method (Bank Transfer, Cash, Crypto, etc.)
6Select Received In — which bank/wallet received the money
7Set Payment Date
8Optionally link to specific invoices (auto-suggests outstanding invoices)
9Click Save
What happens in accounting: When you record a payment, the system automatically creates a journal entry:
Debit: Bank Account (money comes in)
Credit: Accounts Receivable (client's outstanding decreases)

Invoices

Create professional invoices for your clients with full line-item detail, tax, and discount support.

Invoice Lifecycle

DRAFT ISSUED PARTIALLY_PAID PAID

Can be cancelled at DRAFT or ISSUED stage. OVERDUE status auto-applies after due date.

Creating an Invoice

1Go to Clients → Invoices and click + New Invoice
2Select Client — their currency auto-fills
3Set Invoice Date and Due Date
4Add line items: Description, Quantity, Rate
5Optionally set Discount % and Tax % per line
6Add Notes (visible on invoice) and Terms (payment terms)
7Click Save — invoice created as DRAFT

Issuing an Invoice

When the invoice is ready to send to the client, click Issue on the invoice detail page. This:

  • Changes status from DRAFT → ISSUED
  • Automatically creates a journal entry (Debit: Accounts Receivable, Credit: Revenue)
  • The invoice now appears in the client's outstanding balance

Downloading Invoice PDF

Click the red PDF button on any invoice to download a professional PDF with:

  • Company header with logo area
  • Invoice number, date, due date, status badge
  • Bill-to client details
  • Itemized table with quantities, rates, amounts
  • Subtotal, discount, tax, total, paid, outstanding
  • Notes and terms

Cancelling an Invoice

Click Cancel on the invoice detail page. This reverses the journal entry and sets status to CANCELLED.

Important: You can only cancel ISSUED or DRAFT invoices. PAID invoices cannot be cancelled — record a credit note instead.

Invoice Payments

When a client pays an invoice (partially or fully), record it through the Payment system.

Partial Payments

You can record multiple partial payments against one invoice. The system tracks:

  • Paid Amount — Total received
  • Outstanding Amount — Remaining balance
  • Status — Automatically changes to PARTIALLY_PAID or PAID

Bank Accounts

Track all your bank accounts with real-time balances in any currency.

Creating a Bank Account

1Go to Banking in the sidebar
2Click + New Account
3Enter: Account Name (e.g. "HBL Main"), Bank Name, Account Number, SWIFT/BIC
4Select Currency (PKR, USD, EUR, etc.)
5Enter Opening Balance (initial amount)
6Click Save

Understanding Balances

Each bank account shows three balance types:

  • Book Balance — What the system calculates based on all transactions
  • Statement Balance — What you manually enter from your bank statement
  • Difference — Gap between book and statement (should be zero)

Reconciling an Account

Click Reconcile on any bank account to match your records with the bank statement:

1Enter the Statement Balance from your bank
2Set the Statement Date
3Click Reconcile — the system saves the statement balance

Transfers

Move money between your accounts (bank-to-bank, bank-to-crypto, crypto-to-crypto).

Creating a Transfer

1Go to Banking → Transfers
2Click + New Transfer
3Select From Account (source)
4Select To Account (destination)
5Enter Amount
6If currencies differ, enter the Exchange Rate
7Add a description and set the date
8Click Save
Accounting impact: Transfers are asset-to-asset movements, NOT revenue. The journal entry is:
Debit: Destination Account (increases)
Credit: Source Account (decreases)
No income is double-counted.

Currency Conversion

When transferring between different currencies (e.g., PKR → USD), the system handles the exchange rate and records any gain/loss automatically.

Crypto Wallets

Track your cryptocurrency holdings across multiple wallets and chains.

Supported Coins

USDC and USDT are pre-configured. You can add any coin through the currency system.

Creating a Crypto Wallet

1Go to Crypto in the sidebar
2Click + New Wallet
3Enter: Wallet Name (e.g. "Binance USDT"), Coin/Token (USDT, USDC, BTC, etc.)
4Optionally enter Wallet Address and Network (ERC-20, TRC-20, etc.)
5Enter Opening Balance
6Click Save

Portfolio View

The crypto dashboard shows:

  • Total portfolio value in base currency (PKR)
  • Individual wallet balances with current value
  • Recent transactions

Crypto Transactions

Record all crypto activity: buys, sells, conversions, and transfers.

Transaction Types

TypeDescriptionAccounting Impact
BUYPurchased crypto with fiatDebit: Crypto Wallet, Credit: Bank Account
SELLSold crypto for fiatDebit: Bank Account, Credit: Crypto Wallet
CONVERTSwapped one crypto for anotherDebit: New Wallet, Credit: Old Wallet
TRANSFERMoved between walletsDebit: Destination, Credit: Source

Recording a Crypto Transaction

1Go to Crypto → Transactions
2Click + New Transaction
3Select Type (Buy, Sell, Convert, Transfer)
4Select the Wallet
5Enter Amount (in coin units, e.g., 1000 USDT)
6Enter Rate (price per unit in PKR/USD)
7For conversions: select the Target Wallet
8Click Save
Portfolio tracking: The system calculates your total crypto holdings value in base currency (PKR) using current exchange rates.

Expenses

Track all business spending with categories, attachments, and accounting integration.

Recording an Expense

1Go to Expenses in the sidebar
2Click + New Expense
3Enter: Description, Amount, Date
4Select Category (Office Rent, Utilities, Salaries, etc.)
5Select Payment Account (which bank/wallet paid)
6Select Currency and enter Exchange Rate if different from base
7Optionally upload Attachment (receipt PDF, image)
8Click Save — journal entry is created automatically

Expense Categories

Pre-configured categories include:

CategoryCOA Account
Office RentRent Expense
UtilitiesUtilities Expense
Office SuppliesOffice Supplies
SalariesSalary Expense
MarketingMarketing Expense
TravelTravel Expense
Professional FeesProfessional Fees
Software & ToolsSoftware Expense
InsuranceInsurance Expense
MaintenanceMaintenance Expense
CommunicationCommunication Expense
Bank ChargesBank Charges
MiscellaneousMiscellaneous Expense

Custom Categories

Go to Expenses → Categories to add your own. Each category maps to a Chart of Accounts entry for proper accounting.

Expense Categories

Create and manage expense categories. Each category links to a Chart of Accounts entry.

Adding a Category

1Go to Expenses → Categories
2Click + Add Category
3Enter: Name, select COA Account, add Description
4Click Save
Important: You cannot delete a category that has expenses linked to it. Deactivate it instead.

Employees

Maintain your employee directory with designations, departments, and salary info.

Adding an Employee

1Go to Employees in the sidebar
2Click + Add Employee
3Fill in: Name, Designation, Department, Email, Phone
4Set Monthly Salary and Currency
5Set Joining Date
6Click Save
Employee ID: Auto-generated as EMP-001, EMP-002, etc. Cannot be changed after creation.

Employee Detail Page

Shows complete employee profile, salary history, and all salary slips.

Salaries & Payslips

Process monthly payroll with automatic accounting entries and PDF payslip generation.

Salary Processing Workflow

DRAFT PAID

Creating a Salary Record (Single)

1Go to Expenses → Salaries
2Click + New Salary
3Select Employee
4Enter Salary Month (e.g., August 2026)
5Gross Salary auto-fills from employee record
6Enter any Deductions (advances, loans, etc.)
7Enter any Bonus
8Net Salary auto-calculates: Gross + Bonus - Deductions
9Click Save

Bulk Salary Processing

Process multiple employees at once:

1Go to Expenses → Salaries
2Click Bulk Process
3Select the Month
4Check the employees to process
5Click Process — salary records created for all selected

Marking a Salary as Paid

1Open the salary record (DRAFT status)
2Click Mark as Paid
3Select the Payment Account (bank account used)
4Confirm — journal entry created automatically
Accounting impact: When paid, the system creates:
Debit: Salary Expense
Credit: Bank Account

Downloading Salary Slip PDF

Click the red PDF Slip button on any salary record to download a professional payslip showing:

  • Company header and employee details
  • Earnings section: Basic Salary, Bonus
  • Deductions section
  • Net Salary highlight
  • Payment date and status

Chart of Accounts (COA)

The backbone of your accounting system. Every financial transaction maps to accounts here.

Account Types

TypeDescriptionExamples
ASSETWhat you ownCash, Bank Accounts, Receivables, Crypto
LIABILITYWhat you owePayables, Loans, Credit Cards
EQUITYOwner's stakeCapital, Retained Earnings
REVENUEIncome earnedService Revenue, Sales
EXPENSECosts incurredRent, Salaries, Utilities
OTHER_INCOMENon-operating incomeInterest Income, Gain on Sale
OTHER_LOSSNon-operating lossesLoss on Sale, Penalties

Default Accounts (Pre-configured)

  • 1000 — Assets (parent)
  • 1100 — Cash in Hand
  • 1110 — Bank Accounts
  • 1120 — Petty Cash
  • 1200 — Accounts Receivable
  • 1300 — Prepaid Expenses
  • 2000 — Liabilities (parent)
  • 2100 — Accounts Payable
  • 2200 — Salary Payable
  • 3000 — Owner's Equity
  • 4000 — Revenue
  • 5000 — Cost of Goods Sold
  • 6000 — Salary Expense
  • 6100 — Rent Expense
  • 6200 — Utilities Expense
  • 6300 — Office Supplies

Creating a New Account

1Go to Accounting → Chart of Accounts
2Click + New Account
3Enter: Code (e.g., 6400), Name, Type, Sub-Type
4Optionally set a Parent Account for grouping
5Click Save

Account Sub-Types

Each account can be a Header (grouping only) or Detail (used in transactions). Only Detail accounts can be used in journal entries.

Journal Entries

The heart of double-entry accounting. Every financial transaction creates a journal entry.

Understanding Journal Entries

Every journal entry has:

  • Entry Number — Auto-generated: JV-2026-000001
  • Date — Transaction date
  • Description — What this entry is for
  • Lines — At least 2 lines (debit + credit)
  • Status — DRAFT, POSTED, CANCELLED, REVERSED

Golden Rule: Total Debits MUST equal Total Credits. The system enforces this.

Creating a Manual Journal Entry

1Go to Accounting → Journal Entries
2Click + New Entry
3Set Date and Description
4Add lines: Select Account, enter Debit OR Credit amount
5Add at least 2 lines. The system validates: Debits = Credits
6Click Save — entry created as DRAFT

Posting a Journal Entry

Click Post on a DRAFT entry. This:

  • Changes status to POSTED
  • Updates account balances in the account_balances table
  • Makes the entry permanent (cannot be edited, only reversed)
Warning: Posted entries are IMMUTABLE. To correct a posted entry, you must create a REVERSAL entry.

Automatic Journal Entries

The system creates journal entries automatically for:

ActionJournal Entry
Issue InvoiceDr: Accounts Receivable → Cr: Revenue
Record Client PaymentDr: Bank Account → Cr: Accounts Receivable
Record ExpenseDr: Expense Account → Cr: Bank Account
Pay SalaryDr: Salary Expense → Cr: Bank Account
Bank TransferDr: Destination Bank → Cr: Source Bank
Crypto BuyDr: Crypto Wallet → Cr: Bank Account
Crypto SellDr: Bank Account → Cr: Crypto Wallet

General Ledger

View the complete transaction history for any account.

Using the General Ledger

1Go to Accounting → General Ledger
2Select an Account from the dropdown (or leave blank for all)
3Optionally set Date Range
4Click Filter

Reading the Ledger

ColumnMeaning
DateTransaction date
Entry #Journal entry reference
DescriptionTransaction description
DebitAmount debited to this account
CreditAmount credited to this account
BalanceRunning balance after this transaction

Trial Balance

A snapshot of all account balances at a specific date. Total debits must equal total credits.

Using the Trial Balance

1Go to Reports → Trial Balance
2Set the As Of Date
3Click Generate

What It Shows

  • Every account with a non-zero balance
  • Debit and Credit columns
  • Total row at the bottom — both sides MUST match
  • If they don't match, there's an accounting error that needs investigation
Tip: Export to CSV using the CSV button for spreadsheet analysis.

Reports

The system includes 10 comprehensive financial reports. All support date filtering and CSV export.

Profit & Loss Statement

Shows your revenue, expenses, and net profit for a period.

  • Revenue Section — All revenue accounts with totals
  • Expense Section — All expense accounts grouped and totalled
  • Net Profit/Loss — Revenue minus Expenses
  • Set From Date and To Date to filter

Balance Sheet

A snapshot of your financial position at a specific date:

  • Assets — What you own (bank, crypto, receivables)
  • Liabilities — What you owe (payables, loans)
  • Equity — Owner's stake
  • Balance Check: Assets = Liabilities + Equity

Cash Flow Statement

Tracks where your cash came from and where it went:

  • Operating Activities — Revenue, expenses, payments
  • Investing Activities — Asset purchases/sales
  • Financing Activities — Loans, capital contributions

Accounts Receivable

Shows all outstanding invoices grouped by client with aging buckets.

Aging Report

Categorizes outstanding receivables by age:

BucketMeaning
CurrentNot yet due
1–30 DaysOverdue by 1–30 days
31–60 DaysOverdue by 31–60 days
61–90 DaysOverdue by 61–90 days
90+ DaysSeverely overdue

Expense by Category

Bar chart and table showing expenses broken down by category. Helps identify where money is going.

General Ledger Report

Detailed transaction listing for any account with date filtering. Shows every journal entry affecting the selected account.

Revenue by Client

Shows how much revenue each client has generated. Useful for identifying your most valuable clients.

Currency Position

Shows your asset balances broken down by currency. Useful for multi-currency businesses to monitor FX exposure.

Currencies

Manage the currencies your business operates in.

Pre-configured Currencies

CodeNameSymbolType
PKRPakistani RupeeRs.Fiat (Base)
USDUS Dollar$Fiat
EUREuroFiat
GBPBritish Pound£Fiat
AEDUAE Dirhamد.إFiat
USDCUSD Coin$Crypto
USDTTether$Crypto

Adding a Currency

1Go to Administration → Currencies
2Click + Add Currency
3Enter: Code (3 letters), Name, Symbol, Type (Fiat/Crypto)
4Click Save
Note: The base currency (PKR) cannot be changed once set. All reports are generated in base currency.

Exchange Rates

Manage exchange rates for currency conversions.

Setting Exchange Rates

1Go to Administration → Exchange Rates
2Select the currency and enter the rate against base currency (PKR)
3Click Add Rate

Example: If 1 USD = 278.50 PKR, enter rate 278.50 for USD.

Users

Manage who can access the system and what they can do.

Creating a User

1Go to Administration → Users
2Click + Add User
3Enter: Name, Email, Password, Phone (optional)
4Assign a Role (determines permissions)
5Click Save

User Detail Page

Shows user profile, assigned roles, and activity. You can:

  • Edit user details
  • Change role assignment
  • Deactivate the user
  • Reset password

Roles & Permissions

Define what each user can see and do in the system.

Default Roles

RoleDescriptionKey Permissions
Super AdminFull system accessEverything
AdminAdministrative accessMost operations except user/role management
AccountantFinancial operationsJournal entries, reports, invoices, expenses
ManagerTeam managementView reports, manage employees, approve expenses
StaffBasic operationsView-only for most modules, create expenses
ViewerRead-only accessView everything, cannot edit

Available Permissions (35+)

Permissions are grouped by module:

  • Clients: clients.view, clients.create, clients.edit, clients.delete
  • Invoices: invoices.view, invoices.create, invoices.edit, invoices.delete
  • Payments: payments.view, payments.create, payments.edit, payments.delete
  • Banking: bank-accounts.view, bank-accounts.manage, transfers.view, transfers.create
  • Crypto: crypto.view, crypto.manage
  • Expenses: expenses.view, expenses.create, expenses.edit, expenses.delete
  • Employees: employees.view, employees.manage
  • Salaries: salaries.view, salaries.manage
  • Journal: journal.view, journal.create
  • Reports: reports.view
  • Settings: settings.manage
  • Users: users.view, users.manage
  • Roles: roles.view, roles.manage
  • Currencies: currencies.view, currencies.manage
  • Audit: audit.view

Creating a Custom Role

1Go to Administration → Roles
2Click + Add Role
3Enter a Role Name and Description
4Check the permissions this role should have
5Click Save
Note: System roles (Super Admin, Admin, etc.) cannot be deleted. You can create custom roles with specific permission sets.

System Settings

Configure your company profile, system preferences, and invoicing defaults.

Company Profile Tab

SettingCurrent ValueUsed In
Company NameXCRETCH Business ERPPDF headers, reports, footer
AddressKarachi, PakistanPDF headers
Phone+92-300-1234567PDF headers
Emailinfo@xcretch.comPDF headers
Websitehttps://xcretch.comPDF footers
Tax NumberNTN-1234567Invoice PDFs

System Tab

  • Base Currency — PKR (all reports convert to this)
  • Fiscal Year Start — January (month 1)

Invoicing Tab

  • Invoice Prefix — INV (invoices numbered INV-2026-000001)
  • Default Payment Terms — Net 30
  • Default Invoice Notes — Thank you for your business!

Audit Trail

Every action in the system is logged for security and compliance.

What Gets Logged

  • User logins and logouts
  • Record creation, updates, and deletions
  • Invoice issuing and cancelling
  • Salary processing and payments
  • Journal entry posting
  • Settings changes
  • User and role changes

Viewing the Audit Trail

1Go to Audit & Logs → Audit Trail
2Use filters: Module, Action, Date Range
3Each log shows: Timestamp, User, Module, Action, Record ID, IP Address

Filter Options

FilterValues
Moduleclients, invoices, payments, transfers, bank_accounts, crypto_wallets, expenses, salaries, employees, journal_entries, users, roles, settings
Actioncreate, update, delete, post, cancel, login

Notifications

System alerts and updates appear in the bell icon on the top bar.

Notification Types

  • info — General information
  • success — Successful operations
  • warning — Attention needed
  • error — Failed operations

Managing Notifications

  • Click the bell icon in the top bar to see recent notifications
  • Click View All to go to the full notifications page
  • Click the checkmark to mark individual notifications as read
  • Click Mark All Read to clear all unread notifications
  • Click the trash icon to delete notifications

My Profile

Manage your personal account settings.

Editing Your Profile

1Click your name in the top-right corner
2Select Profile
3Update your Name, Email, or Phone
4Click Save Changes

Changing Your Password

1Go to Profile
2Scroll to Change Password section
3Enter current password, new password, confirm new password
4Click Update Password

Keyboard Shortcuts

ActionHow
Navigate sidebarClick any section link
Search/FilterUse filter bars on list pages
Export CSVClick CSV button on any report or list
PrintClick Print button or use Ctrl+P
Download PDFClick PDF button on invoices and salary slips
PaginationUse page numbers at bottom of lists

Frequently Asked Questions

Q: Can I edit a posted journal entry?

A: No. Posted entries are immutable. To correct one, create a reversing entry (DR→CR, CR→DR) with the same amounts, then create the correct entry.

Q: What happens when I delete an invoice?

A: The invoice is cancelled (not truly deleted). The journal entry is reversed and the client's outstanding balance updates.

Q: Can I change the base currency?

A: No. The base currency is set once and cannot be changed. All reports are in base currency.

Q: How do multi-currency transfers work?

A: When transferring between different currencies, you enter the exchange rate. The system calculates the equivalent amount and may record a forex gain/loss.

Q: Can I delete an employee with salary records?

A: You can deactivate an employee, but you cannot delete one with existing salary records.

Q: How are PDFs generated?

A: The system uses Dompdf library. Click the PDF button on any invoice or salary slip to download a professional A4 PDF.

Q: What if my trial balance doesn't balance?

A: Check the General Ledger for the period. Look for missing entries, duplicate entries, or incorrect amounts. The audit trail can help identify when the discrepancy was introduced.

Troubleshooting

Common Issues

IssueSolution
Page shows 404Check the URL matches the sidebar link exactly
"Permission denied" errorAsk your admin to grant the required permission for your role
PDF not downloadingCheck your browser's popup blocker — PDFs open in a new tab
Dashboard shows zero balancesEnsure journal entries are POSTED, not just DRAFT
Client balance wrongCheck if all invoices are properly linked to payments
Transfer not appearingEnsure both accounts exist and the amount is valid
CSV export emptyCheck if filters are hiding data — click Clear to reset