Subversion Repositories SmartDukaan

Rev

Rev 7410 | Rev 8020 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7410 Rev 7643
Line 238... Line 238...
238
    query = query.filter(UserEmailArchive.timestamp >= start_datetime)
238
    query = query.filter(UserEmailArchive.timestamp >= start_datetime)
239
    query = query.filter(UserEmailArchive.timestamp <= end_datetime)
239
    query = query.filter(UserEmailArchive.timestamp <= end_datetime)
240
    return query.all()
240
    return query.all()
241
def get_order_confirmation_mail(order_id):
241
def get_order_confirmation_mail(order_id):
242
    email = UserEmailArchive.get_by(emailType = 'TransactionInfo', source = order_id)
242
    email = UserEmailArchive.get_by(emailType = 'TransactionInfo', source = order_id)
-
 
243
    #Start:- Added by Manish Sharma for resolving Exception for getting order delivery and confirmation mail on 27-Jun-2013
-
 
244
    if email:
243
    return email.body
245
        return email.body
-
 
246
    else:
-
 
247
        return ''
-
 
248
    #End:- Added by Manish Sharma for resolving Exception for getting order delivery and confirmation mail on 27-Jun-2013
244
    
249
    
245
def get_order_delivery_mail(order_id):
250
def get_order_delivery_mail(order_id):
246
    email = UserEmailArchive.get_by(emailType = 'DeliverySuccess', source = order_id)
251
    email = UserEmailArchive.get_by(emailType = 'DeliverySuccess', source = order_id)
-
 
252
    #Start:- Added by Manish Sharma for resolving Exception for getting order delivery and confirmation mail on 27-Jun-2013
-
 
253
    if email:
247
    return email.body
254
        return email.body
-
 
255
    else:
-
 
256
        return ''
-
 
257
    #End:- Added by Manish Sharma for resolving Exception for getting order delivery and confirmation mail on 27-Jun-2013
248
 
258
 
249
def get_warehouseIds_for_agent(agent_emailId):
259
def get_warehouseIds_for_agent(agent_emailId):
250
    agent = Agent.get_by(emailId = agent_emailId)
260
    agent = Agent.get_by(emailId = agent_emailId)
251
    agent_warehouse_mappings = AgentWarehouseMapping.query.filter(AgentWarehouseMapping.agentId == agent.id).all()
261
    agent_warehouse_mappings = AgentWarehouseMapping.query.filter(AgentWarehouseMapping.agentId == agent.id).all()
252
    warehouseIds = []
262
    warehouseIds = []