TL;DR — Quick Summary

Fix CONTPAQi Contabilidad journal entry errors: unbalanced debits and credits, posting errors, closed period, and SAT XML generation. Step-by-step guide.

When working with journal entries (pólizas contables) in CONTPAQi Contabilidad, the most common errors include “La póliza no cuadra” when debits do not equal credits, “Error al afectar póliza” when trying to post to the general ledger with an incorrect account, and “Período cerrado” when recording transactions outside the active period. This article covers all these errors, their root causes, and the complete workflow to resolve them, including generating the journal entries XML for SAT audits (Annex 24, Electronic Accounting).

The Error

The most common error messages when creating, editing, or posting journal entries in CONTPAQi Contabilidad are:

  • “La póliza no cuadra” — the sum of debits does not equal the sum of credits. This can appear when saving or when trying to post the entry to the general ledger. The system does not allow posting an unbalanced entry.
  • “Error al afectar póliza” — occurs when one or more accounts used in the entry are parent accounts that do not accept direct postings, or when the account does not exist in the current chart of accounts.
  • “Error: Período cerrado” — the accounting month for the entry has already been closed. Only administrators with the appropriate permissions can reopen it.
  • “La cuenta no existe en el catálogo” — when importing entries from Excel or XML, the account codes in the file do not match accounts in the company’s chart of accounts.
  • “Número de póliza duplicado” — when two users create entries simultaneously in the same series and period, CONTPAQi may assign the same number to both entries.
  • “Error al generar XML de pólizas para SAT” — required data is missing, such as the SAT order or case number, or the selected period has no posted entries that match the criteria for the selected request type.
  • Automatic entries with incorrect accounts — the accounting interface with CONTPAQi Comercial or Nóminas generates entries with parent accounts or non-existent accounts because the chart of accounts was modified without updating the interface mapping.
  • Slow performance when querying entries — periods with thousands of entries can take minutes to open if the database has not been maintained with periodic reindexing.

Cause of the Problem

Balance differences from rounding or foreign currency conversion

The “La póliza no cuadra” error occurs when debits and credits differ, even by just a few cents. The most common causes are:

  • Decimal rounding: when entering amounts with more than 2 decimal places or calculating VAT and income tax on bases that produce fractions, the system can accumulate differences of $0.01 or $0.02.
  • Foreign currency conversion: entries in USD, EUR, or other currencies convert at the daily exchange rate, and rounding of the conversion can generate differences that must be recorded in the exchange differences account.
  • Import from Excel: Excel formulas can produce results with up to 15 decimal places that CONTPAQi truncates on import, creating a mismatch between the entered sum and the recorded sum.

Parent accounts that do not accept direct postings

The CONTPAQi chart of accounts has a hierarchy: parent accounts (higher levels) and detail accounts (lower levels). Parent accounts are for grouping only; they do not accept direct debits or credits. If the entry uses a parent account, the system throws “Error al afectar póliza.” The solution is always to use the most specific detail sub-account in the chart, which is the only one with the accept-movements parameter enabled.

Closed accounting period

CONTPAQi Contabilidad manages monthly periods that can be in the status: open, closed, or permanently closed. When a period is closed, the system protects the balances from being altered. Trying to record, modify, or delete an entry in a closed period generates the closed-period error. Permanently closed periods require a special reopening process that only the system administrator can execute.

Incorrect mapping in the accounting interface

The accounting interface in CONTPAQi allows external modules such as CONTPAQi Comercial (sales, purchases, inventory) or CONTPAQi Nóminas to generate automatic entries. If the account mapping in the interface configuration points to a parent account, an account with an incorrect SAT grouper code, or an account that was deleted from the chart, all entries generated by that module will have the error. A single incorrect mapping can affect hundreds of entries simultaneously.

Numbering issues and concurrent access

CONTPAQi Contabilidad can assign duplicate entry numbers when two users create entries in the same series and period simultaneously, especially in high-latency network environments. This does not generate a visible error immediately, but causes inconsistencies when generating reports and auditing period entries.


Step-by-Step Solution

Step 1: Identify the type and source of the journal entry error

  1. Open the entry with the error in CONTPAQi Contabilidad.
  2. Identify the exact error message (write it down or take a screenshot).
  3. Determine the source of the entry:
    • Manual: created directly in the journal entry editor.
    • Imported: from Excel or XML using the import function.
    • Automatic: generated by the accounting interface from CONTPAQi Comercial or Nóminas.
  4. Review the entry type: ingreso (income), egreso (expense), diario (general), or cheque (check). The type determines which accounts are valid and whether the entry affects bank or third-party accounts.

Step 2: Balance the entry by adjusting debits and credits

  1. Open the entry in the CONTPAQi Contabilidad editor.
  2. Review the Total Debit and Total Credit columns at the bottom of the editor.
  3. If there is a difference, identify the causative line:
    • Look for amounts with more than 2 decimal places.
    • In multi-currency entries, review the exchange rate applied to each line.
  4. For rounding differences less than $1.00 MXN: add an additional line to the exchange differences account (or the adjustment account defined in your chart) for the exact difference amount.
  5. For larger differences: review the original source document calculations (invoice, receipt, payroll) and correct the amount on the corresponding line.
  6. When the Debit and Credit columns show the same total, the entry is balanced and can be posted to the general ledger.

Step 3: Verify that accounts accept direct postings

  1. In the entry with the error, note the code of each account used.
  2. Go to Catálogos > Cuentas contables in CONTPAQi.
  3. Find each account and review its level in the chart:
    • If it has dependent sub-accounts and is not marked to accept direct movements, it is a parent account.
    • Detail accounts (lowest level of the hierarchy) are the only ones that accept direct debits and credits.
  4. In the entry, replace each parent account with the corresponding detail sub-account.
  5. Also verify that the account has the correct SAT grouper code from Annex 24 of the RMF assigned, which is mandatory for generating the electronic accounting XML.

Step 4: Manage the accounting period status

  1. Go to Configuración > Períodos contables in CONTPAQi Contabilidad.
  2. Locate the period (month and year) for the entry.
  3. Check the status:
    • Open: you can record and modify entries without restriction.
    • Closed: requires reopening. Select the period and use Abrir período.
    • Permanently closed: requires system administrator permissions and a justification in the audit log.
  4. Once the period is open, record or correct the entry.
  5. Close the period again using Cerrar período to protect the balances.
  6. Document any period reopening with the date, user, and reason as backup for a potential SAT review.

Step 5: Configure the accounting interface correctly

  1. Go to Configuración > Interfaz contable in CONTPAQi Contabilidad.
  2. Select the external module generating entries with errors (Comercial, Nóminas, etc.).
  3. Review the account mapping for each transaction type:
    • Sales: revenue account, output VAT, accounts receivable.
    • Purchases: expense or inventory account, input VAT, accounts payable.
    • Payroll: salaries, IMSS contributions, income tax withholdings, provisions.
  4. For each account in the mapping, verify in the chart that it is a detail account (not a parent account) and that the SAT grouper code is assigned.
  5. Fix the incorrect accounts and save the configuration.
  6. Regenerate the automatic entries for the affected period from the external module (CONTPAQi Comercial > Procesos > Generar pólizas contables).

Step 6: Generate and validate the SAT journal entries XML

  1. Go to Reportes > Contabilidad electrónica > Pólizas in CONTPAQi Contabilidad.
  2. Select the SAT request type:
    • AF (Tax audit act): audit initiated by SAT, requires the order number.
    • FC (Third-party audit): review of a related third party, requires the case number.
    • DE (Refund or offset): your own tax refund request.
  3. Enter the SAT order or case number exactly as it appears in the official request document.
  4. Select the period (month and year) of the requested entries.
  5. Click Generar XML. CONTPAQi will create the file with the RFC, period, and request type in the filename.
  6. Validate the XML with the SAT electronic accounting verifier before signing it.
  7. Sign the file with the active CSD of the company and submit it to SAT only as a response to the formal request. Journal entry XML files are not submitted proactively each month — only when SAT explicitly requests them through an official notification.

Alternative Solution

Correct import of entries from Excel or XML

If the error comes from imported entries with incorrect accounts or that do not balance:

  1. Download the journal entry import template from CONTPAQi (Procesos > Importar pólizas > Descargar plantilla).
  2. In the Excel template, verify that each Debit column has its counterpart in the Credit column with the same amount.
  3. Use only detail account codes from the current CONTPAQi chart of accounts. Parent account codes will generate an error on import.
  4. In the currency column, always specify MXN for pesos or the ISO code for the foreign currency. Use the official SAT exchange rate published for the date of the transaction.
  5. Import the corrected file and review the CONTPAQi import error report before confirming the batch.

Database maintenance to improve performance

If the issue is slowness when accessing entries in high-volume periods:

  1. In CONTPAQi Contabilidad, go to Herramientas > Mantenimiento de la empresa.
  2. Run Verificar y reparar to detect database inconsistencies.
  3. Run Reindexar to rebuild indexes and speed up entry queries.
  4. Perform this operation at least once a month, preferably at the start of the workday with all users disconnected from the company.
  5. Always take a full company backup before running any maintenance operation.

Prevention

To avoid recurring errors in CONTPAQi Contabilidad journal entries:

  • Review the chart of accounts at the start of each fiscal year. Verify that all detail accounts have an assigned SAT grouper code (Annex 24 of the current RMF) and that parent accounts are correctly configured as not accepting direct movements.
  • Configure automatic entry numbering. In multi-user environments, enable automatic sequential numbering by series to avoid duplicates. Assign a different series to each user or department.
  • Close accounting periods promptly. Closing each month after reconciling balances protects historical data from accidental modifications. Set a closing calendar and adhere to it with all system users.
  • Validate automatic entries from the accounting interface at least once a week. Review the entry reports generated by CONTPAQi Comercial and Nóminas to detect incorrect accounts before month-end close.
  • Standardize decimal usage. Configure CONTPAQi to always round to 2 decimal places in MXN. For foreign currencies, define a rounding policy and always use the official SAT exchange rate published on the date of the transaction.
  • Take daily company backups and perform monthly database maintenance. A database without maintenance accumulates fragmentation that slows access to entries and can corrupt records.
  • Train users on the correct use of entry types (ingreso, egreso, diario, cheque) and on properly selecting detail accounts rather than parent accounts.

Summary

  • The “La póliza no cuadra” error is fixed by adjusting the difference in the exchange differences account or correcting amounts with 2-decimal rounding.
  • The “Error al afectar póliza” occurs from using parent accounts; the solution is to always use detail sub-accounts from the chart.
  • Closed periods must be reopened at Configuración > Períodos contables, with administrator permissions and documentation of the reason.
  • Incorrect automatic entries originate in the accounting interface mapping; fix the mapping and regenerate the entries for the period.
  • The journal entries XML for SAT (Annex 24) is only generated upon formal request from the tax authority — it is not submitted monthly like the trial balance.
  • Monthly database maintenance (verify, repair, reindex) prevents slowness and record corruption in periods with high entry volume.