add: populate return reason

This commit is contained in:
morteza-mortezai
2025-10-12 16:54:08 +03:30
parent d8f533ee32
commit 27ff577313
+1 -1
View File
@@ -218,7 +218,7 @@ class ReturnService {
//#######################################################
//#######################################################
async getReturnReasons() {
const reasons = await this.returnReasonRep.findAll();
const reasons = await this.returnReasonRep.model.find().populate({ path: "fineRule" }).sort({ createdAt: -1 });
return { reasons };
}
//#######################################################