|  |  |  | @ -9,8 +9,6 @@ const fastify = require("fastify")({ | 
			
		
	
		
			
				
					|  |  |  |  | const { Tanker, Tankerbooking,Bore,GovtPipeLine } = require('../models/tankers') | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | exports.orderNow = async (req, reply) => { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     try { | 
			
		
	
	
		
			
				
					|  |  |  | @ -33,7 +31,6 @@ exports.orderNow = async (req, reply) => { | 
			
		
	
		
			
				
					|  |  |  |  |         booking_info.delivery_agent_alternative_mobile = agent_alternative_mobile | 
			
		
	
		
			
				
					|  |  |  |  |         booking_info.price = price | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |              } | 
			
		
	
		
			
				
					|  |  |  |  |      else { | 
			
		
	
		
			
				
					|  |  |  |  |         booking_info.orderStatus = "rejected" | 
			
		
	
	
		
			
				
					|  |  |  | @ -61,8 +58,6 @@ exports.orderNow = async (req, reply) => { | 
			
		
	
		
			
				
					|  |  |  |  |       // const userInfo = await User.findOne({ username: username.toString() });
 | 
			
		
	
		
			
				
					|  |  |  |  |       // const updateData = req.body;
 | 
			
		
	
		
			
				
					|  |  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |  |       // console.log("This is the reply in the handler after the validations", reply);
 | 
			
		
	
		
			
				
					|  |  |  |  |        deliveryData = { | 
			
		
	
		
			
				
					|  |  |  |  |         supplierId: supplierId, | 
			
		
	
	
		
			
				
					|  |  |  | @ -73,7 +68,7 @@ exports.orderNow = async (req, reply) => { | 
			
		
	
		
			
				
					|  |  |  |  |         city:req.body.city, | 
			
		
	
		
			
				
					|  |  |  |  |         state:req.body.state, | 
			
		
	
		
			
				
					|  |  |  |  |         zip:req.body.zip, | 
			
		
	
		
			
				
					|  |  |  |  |         | 
			
		
	
		
			
				
					|  |  |  |  |        status:req.body.status, | 
			
		
	
		
			
				
					|  |  |  |  |       }; | 
			
		
	
		
			
				
					|  |  |  |  |        | 
			
		
	
		
			
				
					|  |  |  |  |       var agent_mobile = req.body.phone | 
			
		
	
	
		
			
				
					|  |  |  | @ -98,6 +93,7 @@ exports.orderNow = async (req, reply) => { | 
			
		
	
		
			
				
					|  |  |  |  |         agent.city = usertobeInserted.city | 
			
		
	
		
			
				
					|  |  |  |  |         agent.state = usertobeInserted.state | 
			
		
	
		
			
				
					|  |  |  |  |         agent.zip = usertobeInserted.zip | 
			
		
	
		
			
				
					|  |  |  |  |         agent.status = usertobeInserted.status | 
			
		
	
		
			
				
					|  |  |  |  |         | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |