FIFO Stock Report Automation Tally TDL

Job ID: 40543249

Budget: ₹600 – ₹1,500 INR

I want a small utility that reads my purchase and sales transactions, applies strict FIFO logic, and spits out a neatly formatted stock balance just like the sample below:

Date   Voucher   Qty   Rate
01-Apr Purchase 001 10 100
05-Apr Purchase 002 5 110
10-Apr Purchase 003 8 120

Sales in the period: 12

Expected remaining-stock view:
Voucher   Remaining Qty   Rate
Purchase 002 3 110
Purchase 003 8 120

Key needs
• FIFO calculation must be exact, even when sales span multiple purchase lots.
• The finished report has to arrive as a plain tcp/txt file; if it’s easier to generate in Excel or CSV first and then export, that’s fine as long as the final deliverable is the txt version.
• Layout and column order should mirror the sample so I can copy-paste straight into my existing workflow.

You’ll receive the raw data as a simple table (date, voucher, qty, rate, and a type field indicating purchase or sale). Send me back either:
1. a lightweight script (Python, VBA, or similar) with clear instructions, or
2. the one-off processed report plus brief notes so I can rerun it later.

I’ll test by feeding a fresh data set and checking that the remaining quantities and cost layers line up with manual calculations. Once those numbers match, the job is complete.
Related categories: Python Tally Definition Language