rd order show in admin

This commit is contained in:
Sibunnayak 2025-02-08 17:50:30 +05:30
parent 2d4550f566
commit 4e4aefb84c

View File

@ -1670,6 +1670,7 @@ export const getAllOrdersforAdmin = async (req, res) => {
// Fetch orders with population
const orders = await RdOrder.find(filter)
.populate({ path: "addedBy", select: "name email" }) // Populate retailer details
.populate({path: "pd", select: "name email"}) // Populate PD details
.sort({ createdAt: -1 })
.skip(skip)
.limit(limit);