Finance QB Daily Return Import - hmislk/hmis GitHub Wiki
QuickBooks Daily Return Import
Introduction
The QuickBooks Daily Return Import generates an IIF file containing the day's OPD billing and payment journal entries. When imported into QuickBooks Desktop, it creates the corresponding journal entries in the accounting system โ one entry per bill or payment method, mapped to the configured QuickBooks accounts and classes.
Navigation
Main Menu โ Financial Reports โ QuickBooks Export โ Daily Return OR Main Menu โ Finance โ ERP Export โ Daily Return IIF
Generating the Daily Return IIF
- Navigate to the QB Daily Return export page.
- Set the date (usually yesterday's date for day-end processing).
- Select the export scope:
- All departments
- Specific department or ward
- Click Generate IIF.
- The system produces a downloadable
.iiffile. - Save the file to your computer.
IIF File Structure
Each transaction in the IIF file has this structure:
!TRNS TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM QBCLASS CUSTFLD1
!SPL TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM QBCLASS CUSTFLD1
!ENDTRNS
TRNS INVOICE 15/05/2026 OPD Revenue [Patient Name] 5000.00 B-12345 OPD [Ref]
SPL INVOICE 15/05/2026 Cash [Patient Name] -5000.00 B-12345 OPD [Ref]
ENDTRNS
The ACCNT values map to QuickBooks accounts configured in HMIS. The QBCLASS values track by department or revenue category.
Importing into QuickBooks Desktop
- Open QuickBooks Desktop.
- Go to File โ Utilities โ Import โ IIF Files.
- Browse to the saved
.iiffile. - Click Open. QuickBooks processes the file.
- Review the import summary for any errors.
- The journal entries appear in the QuickBooks transaction list.
QuickBooks Account Mapping
HMIS maps revenue categories to QuickBooks accounts as configured in the system:
| HMIS Category | QuickBooks Account (example) |
|---|---|
| OPD Consultation | 4100 ยท OPD Revenue |
| Laboratory | 4200 ยท Investigation Revenue |
| Pharmacy | 4300 ยท Pharmacy Revenue |
| Cash received | 1010 ยท Cash |
| Card received | 1020 ยท Card Receivable |
| Credit billed | 1200 ยท Debtors Control |
Account mappings are configured by your system administrator in the QuickBooks integration settings.
Troubleshooting Import Errors
| Error | Cause | Fix |
|---|---|---|
| "Account not found" | ACCNT value in IIF doesn't match QB account name | Update HMIS account mapping to match exact QB account name |
| "Class not found" | QBCLASS not defined in QB | Create the class in QuickBooks Classes list |
| Duplicate transaction | File imported twice | Check QB transaction log; delete duplicates if needed |
Technical Reference
| Item | Detail |
|---|---|
| Controller | QuickBookReportController |
| IIF entity | QuickBookFormat |
| File format | Tab-delimited IIF (TRNS/SPL/ENDTRNS) |
| Related | QB Integration Overview |