|
|
|
|
@ -10,7 +10,7 @@ const fastify = require("fastify")({
|
|
|
|
|
return uuidv4();
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const { Install, ProfilePictureInstall, SensorQuotation,generateinstallationId,Store,WaterLeverSensor,MotorSwitchSenso,Insensors,generatequatationId, HardwareCart, ServiceCart, Sales} = require("../models/store");
|
|
|
|
|
const {Iotprice, Install, ProfilePictureInstall, SensorQuotation,generateinstallationId,Store,WaterLeverSensor,MotorSwitchSenso,Insensors,generatequatationId, HardwareCart, ServiceCart, Sales} = require("../models/store");
|
|
|
|
|
const { User,Counter, generateBookingId,resetCounter,generateCustomerId,ProfilePicture} = require('../models/User')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1585,7 +1585,7 @@ exports.createEstimationPrice = async (req, reply) => {
|
|
|
|
|
const { name, type, quantity } = item;
|
|
|
|
|
|
|
|
|
|
// Fetch the unit price from IotPrice collection
|
|
|
|
|
const priceEntry = await IotPrice.findOne({ name, type });
|
|
|
|
|
const priceEntry = await Iotprice.findOne({ name, type });
|
|
|
|
|
|
|
|
|
|
if (!priceEntry) {
|
|
|
|
|
itemDetails.push({
|
|
|
|
|
|