Subversion Repositories SmartDukaan

Rev

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

Rev 23127 Rev 23128
Line 443... Line 443...
443
def get_empty_AWB(provider_id, logisticsTransactionId):
443
def get_empty_AWB(provider_id, logisticsTransactionId):
444
    try:
444
    try:
445
        if logisticsTransactionId is None:
445
        if logisticsTransactionId is None:
446
            return ""
446
            return ""
447
        if provider_id ==1:
447
        if provider_id ==1:
448
            bluedartAttribute = BluedartAttribute.query.filter_by(logisticsTransactionId=logisticsTransactionId,name="awb")
448
            bluedartAttribute = BluedartAttribute.get_by(logisticsTransactionId=logisticsTransactionId,name="awb")
449
            if bluedartAttribute is None:
449
            if bluedartAttribute is None:
450
                client = TransactionClient().get_client()
450
                client = TransactionClient().get_client()
451
                orders_list = client.getGroupOrdersByLogisticsTxnId(logisticsTransactionId)
451
                orders_list = client.getGroupOrdersByLogisticsTxnId(logisticsTransactionId)
452
                bluedartResponse = BluedartService.generate_awb(orders_list)
452
                bluedartResponse = BluedartService.generate_awb(orders_list)
453
                bluedartAttribute = BluedartAttribute()
453
                bluedartAttribute = BluedartAttribute()
Line 612... Line 612...
612
            return sp.recommendedPrice, False
612
            return sp.recommendedPrice, False
613
#Start:- Added by Manish Sharma for Multiple Pincode Updation on 05-Jul-2013
613
#Start:- Added by Manish Sharma for Multiple Pincode Updation on 05-Jul-2013
614
    
614
    
615
def run_Logistics_Location_Info_Update(logisticsLocationInfoList, runCompleteUpdate, providerId):
615
def run_Logistics_Location_Info_Update(logisticsLocationInfoList, runCompleteUpdate, providerId):
616
    if runCompleteUpdate == True :
616
    if runCompleteUpdate == True :
617
        serviceableLocationDetails = ServiceableLocationDetails.get_by(provider_id=providerId).all()
617
        serviceableLocationDetails = ServiceableLocationDetails.query.filter_by(provider_id=providerId).all()
618
        for serviceableLocationDetail in serviceableLocationDetails:
618
        for serviceableLocationDetail in serviceableLocationDetails:
619
            serviceableLocationDetail.exp = False
619
            serviceableLocationDetail.exp = False
620
            serviceableLocationDetail.cod = False
620
            serviceableLocationDetail.cod = False
621
    for logisticsLocationInfo in logisticsLocationInfoList:
621
    for logisticsLocationInfo in logisticsLocationInfoList:
622
        serviceableLocationDetail = ServiceableLocationDetails.get_by(provider_id = logisticsLocationInfo.providerId, dest_pincode = logisticsLocationInfo.pinCode)
622
        serviceableLocationDetail = ServiceableLocationDetails.get_by(provider_id = logisticsLocationInfo.providerId, dest_pincode = logisticsLocationInfo.pinCode)