GSTR 2B Auto reconciliation


Problem

Automated GSTR-2B vs. Books Reconciliation Tool. anual reconciliation of GSTR-2B (Portal) vs. Purchase Register (Books) is time-consuming and prone to human error, especially when dealing with large volumes of invoices. This prompt solves the problem by generating a robust, error-free Python script that automates the entire matching process. It specifically addresses: Bi-directional Matching: Identifies invoices missing in the Portal (Input Tax Credit loss risk) and invoices missing in Books (unaccounted purchases). Unique Identifier Logic: Uses "Document Number" as the primary key rather than fuzzy matching. Automation: Replaces complex Excel VLOOKUPs with a single-click script. Error Handling: The generated code automatically detects file path issues and missing libraries.

Prompt Input

Act as a Senior Python Developer. Task: Create a Python script to reconcile GST data from two Excel files. Input Mechanism: Ask the user to input the folder path via the console at runtime. Files: Look for 'Books.xlsx' and 'GSTportal.xlsx'. Logic: Use 'Document number' column as the primary key. Compare the two datasets to find missing entries. Required Output: Generate 'GST_Reconciliation_Output.xlsx' in the same folder with two sheets: 'In_Books_Not_Portal': Invoices in Books but missing in Portal. 'In_Portal_Not_Books': Invoices in Portal but missing in Books. Constraints: Use pandas and openpyxl libraries. Clean user input paths (remove quotes). Ensure compatibility with Python 3.14 (64-bit). Include error handling for missing files or libraries

Prompt Output

The LLM generates a complete, executable Python Script (.py). When this script is executed by the user, it produces a new Excel file (GST_Reconciliation_Output.xlsx) containing: Sheet 1 (In_Books_Not_Portal): A clean list of invoices that need to be followed up with vendors because they haven't uploaded them to the GST portal. Sheet 2 (In_Portal_Not_Books): A list of invoices present on the government portal that the accountant has forgotten to record in the books. The code includes a "Keep Window Open" feature and error logging to ensure non-technical users can run it easily.

LLM Name: Gemini