Component evidence
A database schema for tracking product returns, including quantities, tax, and condition status. Use this when implementing return management or inventory reconciliation features.
// Source: https://github.com/orion-ai-community/BizzAI | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import mongoose from "mongoose";
const returnItemSchema = new mongoose.Schema({
product: {
type: mongoose.Schema.Types.ObjectId,
ref: "Item",
required: true,
},
productName: {
type: String,
required: true,
},
originalQty: {
type: Number,
required: true,
},
returnedQty: {
type: Number,
required: true,
},
rate: {
type: Number,
required: true,
},
taxPercent: {
type: Number,
default: 0,
},
taxAmount: {
type: Number,
... (truncated -- full source via MCP)