# 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 1. Navigate to the QB Daily Return export page. 2. Set the **date** (usually yesterday's date for day-end processing). 3. Select the **export scope**: - All departments - Specific department or ward 4. Click **Generate IIF**. 5. The system produces a downloadable `.iif` file. 6. 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 1. Open QuickBooks Desktop. 2. Go to **File** → **Utilities** → **Import** → **IIF Files**. 3. Browse to the saved `.iif` file. 4. Click **Open**. QuickBooks processes the file. 5. Review the import summary for any errors. 6. 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](Finance-QB-Integration-Overview.md) |