Private
Tracker *Bug Feature Support Testing
Subject *
Description Edit *Code Location:* Vendors.js *What is happening in code:* The invoice and return controllers actively write and update fields like: outstandingBalance creditBalance totalPurchases lastPurchaseDate totalReturnsValue None of these fields are declared in the Mongoose schema Vendors.js. *Real-Life Example:* A developer or query runs Vendor.create(...) or Vendor.find().select(...) using standard Mongoose queries. Because Mongoose operates in strict mode by default, it silently ignores or strips any field not defined in the schema. Business Impact: Accounting balances randomly disappear, fail to show up in API responses, or are lost when a vendor profile is edited and saved from the UI. *Simple Fix:* Explicitly declare these fields in Vendors.js: outstandingBalance: { type: Number, default: 0 }, creditBalance: { type: Number, default: 0 }, totalPurchases: { type: Number, default: 0 }, lastPurchaseDate: { type: Date, default: null }, totalReturnsValue: { type: Number, default: 0 }
Status Resolved
Priority *Low Normal High Immediate
Assignee Ajit ABindu DandaChandra SekharDivya InapakurthiKarthik PalakondaPavan Kumar MuralaRavi Shankar PalleRavindra AtthotaSai MahanandaSai Priyatham SadineniSowjanya atthotaSravani RangannapalemTeja Sriram SanganiYalavarthi Thriveni
Target version Sprint (10/05/2026- 10/09/2026) sprint (10/12/2026 - 10/31/2026) Backlog
Parent task
Start date
Due date
Estimated time Hours
% Done0 % 10 % 20 % 30 % 40 % 50 % 60 % 70 % 80 % 90 % 100 %