Understanding Accounting Entries
FacturaScripts uses the Asiento model (EditAsiento.php) for accounting entries, also known as journal entries. Each entry consists of:- Header: Entry number, date, concept, and document reference
- Lines (Partidas): Individual debit and credit lines
- Balance: Must be zero (debits = credits)
Creating a Manual Accounting Entry
Create New Entry
Click the New button to open the accounting entry form. The system displays:
- Header section for entry details (EditAsiento.php:104)
- Lines section for debit/credit entries (EditAsiento.php:105)
- Footer with balance summary (EditAsiento.php:106)
- Modal for subaccount search (EditAsiento.php:107)
Configure Entry Header
Enter the entry header information (EditAsiento.php:120):
- Date (Fecha): Transaction date
- Concept (Concepto): Description of the transaction
- Document (Documento): Reference document number (optional)
- Exercise (Ejercicio): Accounting period/year
- Channel (Canal): Entry channel or source
Add Debit Line
Click New Line to add the first line (EditAsiento.php:214):
- Enter or search for the subaccount code (EditAsiento.php:208)
- The system searches the chart of accounts (EditAsiento.php:255)
- Enter the debit amount
- Add line description if needed
Add Credit Line
Add the corresponding credit line:
- Click New Line again (EditAsiento.php:214)
- Select the credit subaccount
- Enter the credit amount
- Verify the balance shows zero
The system recalculates the balance after each line (EditAsiento.php:103, EditAsiento.php:331).
Verify Balance
Check the footer section (EditAsiento.php:106):
- Total Debit: Sum of all debit amounts
- Total Credit: Sum of all credit amounts
- Unbalanced: Difference (must be 0)
Understanding the Entry Interface
The accounting entry form uses AJAX for a smooth user experience:- Header Section
- Lines Section
- Search Modal
The header (EditAsiento.php:104) contains:
- Entry metadata
- Date and period selection
- Document reference
- Entry status
Working with Subaccounts
Search Subaccounts
To find a subaccount:
- Start typing in the subaccount field
- Autocomplete shows matching accounts (EditAsiento.php:159)
- Select from the list
Browse Chart of Accounts
In the search modal:
- Navigate the account hierarchy
- Filter by account type
- Search by code or description
- View account balances
Adding and Removing Lines
- Add Line
- Remove Line
- Recalculate
To add a new line (EditAsiento.php:214):
- Click New Line button
- System adds an empty line
- Interface scrolls to the new line
- Focus moves to the subaccount field
Automatic Accounting Entries
FacturaScripts can generate accounting entries automatically from documents:From Invoices
Customer and supplier invoices can generate entries automatically:
- Open the invoice
- Click Accounting Entries tab
- Click Generate Accounting Entry
- System creates entries for:
- Accounts receivable/payable
- Revenue/expense accounts
- Tax accounts (VAT, IRPF)
From Other Documents
Other documents that can generate entries:
- Bank transactions
- Payment receipts
- Salary payments
- Depreciation entries
Locking and Unlocking Entries
Control whether entries can be edited:Lock Entry
To prevent editing (EditAsiento.php:211, EditAsiento.php:397):
- Open the entry
- Click Lock button
- Confirm the action
- Entry becomes read-only
Copying Entries
To create a similar entry:Deleting Entries
Verify Deletion Allowed
Entries can only be deleted if:
- Entry is unlocked (editable)
- User has delete permission (EditAsiento.php:170)
- Entry is not referenced by documents
Exporting and Printing
Generate reports and exports:Choose Format
Select export format (EditAsiento.php:240):
- PDF for printing
- Excel/CSV for analysis
- Custom formats if configured
Attaching Documents
Link supporting documents to entries:Add Files
Upload supporting documents (EditAsiento.php:196):
- Invoices
- Receipts
- Bank statements
- Contracts
- Any relevant documentation
Viewing Audit Log
Track changes to accounting entries:Best Practices
Descriptive Concepts
Descriptive Concepts
Always write clear, descriptive concepts:
- Include document references
- Mention parties involved
- State the transaction purpose
- Use consistent terminology
Double-Check Subaccounts
Double-Check Subaccounts
Before saving:
- Verify correct subaccount codes
- Check debit vs. credit placement
- Confirm amounts match documents
- Review tax account assignments
Lock Important Entries
Lock Important Entries
Lock entries after verification:
- Month-end entries
- Tax-related entries
- Audit-critical entries
- Year-end closing entries
Attach Supporting Documents
Attach Supporting Documents
Always attach:
- Source invoices or receipts
- Bank statements
- Payment confirmations
- Approval documentation
Regular Reconciliation
Regular Reconciliation
Reconcile accounts regularly:
- Bank accounts daily/weekly
- Customer accounts monthly
- Supplier accounts monthly
- Tax accounts quarterly
Common Entry Types
Sales Entry
Debit: Accounts Receivable
Credit: Sales Revenue
Credit: VAT PayableRecords customer sales with taxes.
Purchase Entry
Debit: Expenses/Inventory
Debit: VAT Receivable
Credit: Accounts PayableRecords supplier purchases.
Payment Entry
Debit: Accounts Payable
Credit: Bank AccountRecords payment to suppliers.
Receipt Entry
Debit: Bank Account
Credit: Accounts ReceivableRecords customer payments received.
Adjustment Entry
Various accounts for:
- Error corrections
- Accruals
- Depreciation
- Provisions
Closing Entry
Debit: Revenue Accounts
Credit: Income SummaryYear-end closing entries.
Common Issues
Entry Won't Save
Entry Won't Save
If you can’t save an entry:
- Check if the entry is balanced (EditAsiento.php:307)
- Verify all subaccounts are valid
- Ensure you have save permissions
- Check for validation errors in the interface
Subaccount Not Found
Subaccount Not Found
If autocomplete doesn’t find an account:
- Verify the account exists in your chart of accounts
- Check the accounting exercise is correct
- Ensure the account is active
- Try searching by description instead of code
Can't Delete Entry
Can't Delete Entry
If deletion fails:
- Check if entry is locked (EditAsiento.php:408)
- Verify you have delete permission (EditAsiento.php:170)
- See if entry is referenced by documents
- Contact your administrator if needed
Balance Won't Zero
Balance Won't Zero
If the entry won’t balance:
- Recalculate totals (EditAsiento.php:331)
- Check for rounding errors
- Verify all amounts are entered correctly
- Ensure debits and credits are in correct columns
Related Topics
Creating Invoices
Learn how invoices generate accounting entries
Accounting Features
Explore advanced accounting features
Reports
Generate accounting reports and statements
Configuration
Configure accounting settings and chart of accounts

