Skip to main content
This guide covers everything you need to know about creating and managing accounting entries (Asientos) in FacturaScripts.

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)
Accounting entries are the foundation of double-entry bookkeeping in FacturaScripts.

Creating a Manual Accounting Entry

1

Navigate to Accounting

Go to Accounting menu and select Accounting Entries (EditAsiento.php:86).
2

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)
3

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
4

Add Debit Line

Click New Line to add the first line (EditAsiento.php:214):
  1. Enter or search for the subaccount code (EditAsiento.php:208)
  2. The system searches the chart of accounts (EditAsiento.php:255)
  3. Enter the debit amount
  4. Add line description if needed
Use the autocomplete feature to search subaccounts by code or description (EditAsiento.php:159).
5

Add Credit Line

Add the corresponding credit line:
  1. Click New Line again (EditAsiento.php:214)
  2. Select the credit subaccount
  3. Enter the credit amount
  4. Verify the balance shows zero
The system recalculates the balance after each line (EditAsiento.php:103, EditAsiento.php:331).
6

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)
You cannot save an unbalanced entry (EditAsiento.php:307).
7

Save Entry

Click Save to record the entry (EditAsiento.php:219, EditAsiento.php:353):
  1. System validates the balance
  2. Saves the header
  3. Saves all lines (EditAsiento.php:370)
  4. Removes any deleted lines (EditAsiento.php:378)
  5. Redirects to the saved entry (EditAsiento.php:386)

Understanding the Entry Interface

The accounting entry form uses AJAX for a smooth user experience:
The header (EditAsiento.php:104) contains:
  • Entry metadata
  • Date and period selection
  • Document reference
  • Entry status
Changes update dynamically using AccountingHeaderHTML (EditAsiento.php:120).

Working with Subaccounts

1

Search Subaccounts

To find a subaccount:
  1. Start typing in the subaccount field
  2. Autocomplete shows matching accounts (EditAsiento.php:159)
  3. Select from the list
Or click the search icon to open the full modal (EditAsiento.php:208).
2

Browse Chart of Accounts

In the search modal:
  1. Navigate the account hierarchy
  2. Filter by account type
  3. Search by code or description
  4. View account balances
3

Select Account

Click on a subaccount to:
  • Populate the line with the account
  • Close the modal
  • Focus on the amount field

Adding and Removing Lines

To add a new line (EditAsiento.php:214):
  1. Click New Line button
  2. System adds an empty line
  3. Interface scrolls to the new line
  4. Focus moves to the subaccount field
The system recalculates totals immediately (EditAsiento.php:331).

Automatic Accounting Entries

FacturaScripts can generate accounting entries automatically from documents:
1

From Invoices

Customer and supplier invoices can generate entries automatically:
  1. Open the invoice
  2. Click Accounting Entries tab
  3. Click Generate Accounting Entry
  4. System creates entries for:
    • Accounts receivable/payable
    • Revenue/expense accounts
    • Tax accounts (VAT, IRPF)
2

From Other Documents

Other documents that can generate entries:
  • Bank transactions
  • Payment receipts
  • Salary payments
  • Depreciation entries
Each uses appropriate account mappings.
3

Review Generated Entry

After automatic generation:
  1. System opens the new entry
  2. Review all lines
  3. Verify amounts and accounts
  4. Make adjustments if needed
  5. Entry is already saved

Locking and Unlocking Entries

Control whether entries can be edited:
1

Lock Entry

To prevent editing (EditAsiento.php:211, EditAsiento.php:397):
  1. Open the entry
  2. Click Lock button
  3. Confirm the action
  4. Entry becomes read-only
Locked entries ensure accounting integrity.
2

Unlock Entry

To allow editing again (EditAsiento.php:225, EditAsiento.php:397):
  1. Open the locked entry
  2. Click Unlock button
  3. Confirm the action (requires permission)
  4. Entry becomes editable (EditAsiento.php:408)
Only unlock entries if absolutely necessary for corrections.

Copying Entries

To create a similar entry:
1

Open Source Entry

Navigate to the entry you want to copy.
2

Click Copy

Click the Copy button (EditAsiento.php:314).
3

Modify New Entry

System creates a new entry with:
  • Same concept
  • Same subaccounts and amounts
  • New entry number
  • Current date
Modify as needed and save.

Deleting Entries

1

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
2

Delete Entry

To delete an entry (EditAsiento.php:202, EditAsiento.php:167):
  1. Open the entry
  2. Click Delete button
  3. Confirm the deletion
  4. System validates and removes the entry (EditAsiento.php:178)
  5. Redirects to entry list (EditAsiento.php:182)
Deleting accounting entries affects your financial reports and should be done carefully. Consider correcting entries instead of deleting them.

Exporting and Printing

Generate reports and exports:
1

Open Entry

Navigate to the entry you want to export.
2

Access Export

Click the Print or Export button (EditAsiento.php:153, EditAsiento.php:232).
3

Choose Format

Select export format (EditAsiento.php:240):
  • PDF for printing
  • Excel/CSV for analysis
  • Custom formats if configured
4

Configure Options

Set export options:
  • Language preference (EditAsiento.php:244)
  • Template format (EditAsiento.php:243)
  • Additional data to include

Attaching Documents

Link supporting documents to entries:
1

Access Documents Tab

Open the entry and click the Documents tab (EditAsiento.php:135).
2

Add Files

Upload supporting documents (EditAsiento.php:196):
  • Invoices
  • Receipts
  • Bank statements
  • Contracts
  • Any relevant documentation
3

Manage Files

File management options (EditAsiento.php:199, EditAsiento.php:222):
  • View attached files
  • Download documents
  • Edit file descriptions
  • Remove attachments
  • Link to existing files (EditAsiento.php:222)

Viewing Audit Log

Track changes to accounting entries:
1

Open Log Tab

In the entry view, click the Audit Log tab (EditAsiento.php:136).
2

Review Changes

View entry history (EditAsiento.php:289):
  • Who created the entry
  • When it was modified
  • What changes were made
  • Lock/unlock events

Best Practices

Always write clear, descriptive concepts:
  • Include document references
  • Mention parties involved
  • State the transaction purpose
  • Use consistent terminology
Good: “Invoice #2025-0042 - Customer ABC Ltd” Bad: “Invoice”
Before saving:
  • Verify correct subaccount codes
  • Check debit vs. credit placement
  • Confirm amounts match documents
  • Review tax account assignments
Lock entries after verification:
  • Month-end entries
  • Tax-related entries
  • Audit-critical entries
  • Year-end closing entries
Always attach:
  • Source invoices or receipts
  • Bank statements
  • Payment confirmations
  • Approval documentation
This creates a complete audit trail.
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

If you can’t save an entry:
  1. Check if the entry is balanced (EditAsiento.php:307)
  2. Verify all subaccounts are valid
  3. Ensure you have save permissions
  4. Check for validation errors in the interface
The system shows specific error messages (EditAsiento.php:391).
If autocomplete doesn’t find an account:
  1. Verify the account exists in your chart of accounts
  2. Check the accounting exercise is correct
  3. Ensure the account is active
  4. Try searching by description instead of code
If deletion fails:
  1. Check if entry is locked (EditAsiento.php:408)
  2. Verify you have delete permission (EditAsiento.php:170)
  3. See if entry is referenced by documents
  4. Contact your administrator if needed
If the entry won’t balance:
  1. Recalculate totals (EditAsiento.php:331)
  2. Check for rounding errors
  3. Verify all amounts are entered correctly
  4. Ensure debits and credits are in correct columns

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