Project

General

Profile

Edit Copy Actions

Feature #5554

open

Add Purchase Stock by Scanning Invoice

Added by Yalavarthi Thriveni 5 days ago. Updated 5 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
12/04/2025
Due date:
% Done:

0%

Estimated time:
(Total: 8:00 h)

Description

As a Store/Inventory Manager
I want to upload a purchase invoice (PDF/Image) and automatically extract product details
So that I can quickly review, edit, and add purchased stock with correct quantities, taxes, and prices without manual data entry.

Acceptance Criteria
AC1 — Upload Invoice (PDF / Image)
User can upload:
PDF invoice
Image invoice (JPG/PNG/HEIC/etc.)
File size limit: 10–20 MB
Show loader while processing
On upload success → go to auto-filled “Purchase Entry Page”
On failure → show error toaster (“Unable to read invoice. Please try manual entry.”)

AC2 — Auto Extract Invoice Data (OCR + AI Extraction)
System must extract:
Product Name, Quantity, Unit Price, Tax (%), Subtotal, Invoice Date, Due Date, Vendor Name (optional), Invoice Number (optional),
Total Amount
OCR must map extracted items to:[ { product_name, qty, price, tax, subtotal }
]
AC3 — Show Extracted Data in Purchase Entry Page

Display all auto-extracted rows in a table:

Product Name (editable)

Quantity (editable)

Unit Price (editable)

Tax (editable)

Subtotal (auto-recalculated)

Header section must show:

Invoice Date

Due Date

Vendor

Total Amount

Allow user to edit any values.
AC4 — Add/Remove Products

User can:

Add a new product row manually

Remove auto-filled rows

Search dropdown for existing products

Or create a new product (optional popup)
AC5 — Save Stock & Update Product Purchase Details

On saving:

Increase product stock by given quantity

Update purchase price in Product table

Create purchase history entry:

invoice date

vendor

qty

purchase price

tax

total

reference invoice file
AC6 — Validation Rules

Product Name required

Quantity > 0

Price > 0

Tax >= 0

Invoice Date required

File must be PDF or Image

Total Amount must match sum of line items (optional warning)

AC7 — Action History

Store the full history:

Invoice upload

Auto-extraction

Manual edits

Stock update

Linked purchase record


Add

Subtasks 1 (1 open0 closed)

Feature #5569: Implement Invoice Upload API & extract the data from the image/pdf NewTeja Sriram Sangani12/04/2025

Delete link to subtaskActions

Add

Related issues

Edit Copy Actions

Also available in: Atom PDF