Project

General

Profile

Actions

BUG #2731

open

[SQA] Negative Stock Not Reflected When Creating Sales Invoice Without Stock

Added by Md. Abdul Hamid 9 months ago.

Status:
Pending
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
07/25/2025
Due date:
% Done:

0%

Estimated time:

Description

Problem

Currently, the system allows sales officers to create a Sales Invoice even when the product's stock is null or 0.
However, after the invoice is saved and delivery status is marked as Delivered, the stock is not updated to show a negative value.

Expected Behavior

  • If a product has insufficient stock (including zero or null), and a Sales Invoice is created and marked as Delivered, the system should:
    • Deduct stock accordingly
    • Show negative stock values (e.g., -3, -5)
    • Optionally, trigger a warning or alert for stock shortage

Requirements

  • Allow Sales Invoice creation (as-is) — no change to current flow
  • Ensure:
    • Product stock goes negative after delivery is confirmed
    • Negative stock is reflected in:
      • Product details view
      • Stock reports
      • Inventory logs (if any)
  • Add warning during invoice creation if stock is 0/null:

    "Warning: Product has insufficient stock. This action will create a negative balance."

Acceptance Criteria

  • System allows invoice creation even with no stock
  • After marking delivery as Delivered, product stock is reduced and can go negative
  • Negative stock is visible in UI and reports
  • Warning shown before submission (optional, based on UX decision)

Notes

  • Check current stock calculation logic post-invoice delivery
  • Ensure updates are reflected in all relevant modules (e.g., inventory tracking)

No data to display

Actions

Also available in: Atom PDF