Sitemap
Jenishjain

Jenishjain

An electrical engineer and a passionate coder, currently Senior Product Engineer at Rapido, likes to learn and share new things.

How I automated tax reporting for my father

4 min readDec 3, 2023

--

For a task that takes just half hour every month vs weeks of head scratching to automate it via code. As a wise software engineer you will always prefer the latter. This blog covers a similar journey of mine around automating tax reporting for my father.

The premise:

My client, an owner of a traditional textile business, took my advice and began retailing his products on e-commerce platforms such as Amazon and Flipkart circa 2013. Prior to this shift, he meticulously documented sales and purchases in notebooks, a method that served him well. However, intrigued by the detailed Excel and PDF reports offered by these online marketplaces, he approached me with a request to transform his handwritten sales and purchase records into a digitized spreadsheet format accessible on his computer.

i’d like you to excel cartoon
Just excel it !

What started as a data entry job quickly became mundane task which was occasionally done by me or my client once a month. So in order to break this loop i made some google forms to help him create at entry from his phone right when the transaction was executed.

Press enter or click to view image in full size
Press enter or click to view image in full size
What did those forms look like

Excited by the newfound ability to input records directly from his phone while at the shop, we were ecstatic to bid farewell to our data entry tasks. However, a new challenge arose as he frequently forgot the links to access these forms, and my client preferred not to rely on bookmarks within the phone’s browser. Consequently, there was a demand for a mobile app equipped with easy-access buttons to open the necessary Google forms. Fortunately, having previously developed a few simple mobile applications using the MIT App Inventor, I knew precisely how to address this issue. Below, you’ll find screenshots of the application that my client has been utilizing for seamless data entry ever since.

Press enter or click to view image in full size
Press enter or click to view image in full size
Screen shots for the online buddy of my client.

The system worked smoothly until my client approached me for assistance with monthly GST filing. This required number crunching and the creation of an Excel sheet, which was then shared with our Chartered Accountant to input the data onto the portal.

The problem statement:

Basis the sales and purchase entries in the spreadsheets we had to prepare a consolidated report of total tax components on sales and purchase and a state-wise split of tax components collected and share it on a google sheet.

Solution:

TL;DR. https://github.com/jenish-jain/bean_counter

Get Jenishjain’s stories in your inbox

Join Medium for free to get updates from this writer.

The journey with this Go application initially began with a seemingly simple task: extracting data from CSV responses linked to the aforementioned form. This involved filtering the data based on inputted months, computing total sales and purchases. Thankfully, having a finalised report template given by my client streamlined the tasks for this reporting tool:

  1. Calculating total sales and purchases for the chosen month.
  2. Analysing tax components such as SGST, CGST, IGST.
  3. Determining payable tax after deducting input tax from purchases.
  4. Categorising taxes paid in specific states using their respective codes.

After evaluating these values, I utilized the Google Sheets API to present this report in CSV format on Google Sheets, allowing easy sharing with our CAs.

Yet, was the job finished? Not quite. Manually running the code in the first week of each month remained a crucial step which i wanted to eliminate.

To resolve this, I turned to Google Cloud Run for deploying the code using Go runtime to enable on-demand execution triggered by an API and scheduled the activity for the 5th of every month using a cron scheduler. This streamlined the entire process, eliminating the need for manual intervention.

Ending Notes:

As my father continues to manually cross-check the values generated by the code 🤣, he’s gradually gaining confidence, especially as the code has successfully identified mistakes twice compared to manual reporting 😉. He’s provided positive feedback on the overall setup, and I anticipate receiving more requests from him in the future 😀.

Your feedback on the code and this blog is greatly appreciated; please share suggestions on how I can improve either aspect.

--

--

Jenishjain
Jenishjain

An electrical engineer and a passionate coder, currently Senior Product Engineer at Rapido, likes to learn and share new things.