| Line 655... |
Line 655... |
| 655 |
else:
|
655 |
else:
|
| 656 |
noCostFoundCount = noCostFoundCount +1
|
656 |
noCostFoundCount = noCostFoundCount +1
|
| 657 |
continue
|
657 |
continue
|
| 658 |
else:
|
658 |
else:
|
| 659 |
print "No provider assigned for pincode: " + str(pincode)
|
659 |
print "No provider assigned for pincode: " + str(pincode)
|
| 660 |
return None
|
660 |
raise LogisticsServiceException(103, "Unable to get Provider for given pincode: " + str(pincode)+" Amount:- "+str(transactionAmount)+" Weight:- "+ str(weight))
|
| 661 |
|
661 |
|
| 662 |
|
662 |
|
| 663 |
if noCostFoundCount == len(serviceability):
|
663 |
if noCostFoundCount == len(serviceability):
|
| 664 |
print "No Costing Found for this pincode: " + str(pincode) +" for any of the provider"
|
664 |
print "No Costing Found for this pincode: " + str(pincode) +" for any of the provider"
|
| 665 |
return None
|
- |
|
| - |
|
665 |
raise LogisticsServiceException(103, "Unable to get Provider for given pincode: " + str(pincode)+" Amount:- "+str(transactionAmount)+" Weight:- "+ str(weight)+". Due to no costing found")
|
| 666 |
|
666 |
|
| 667 |
allSla = sorted(deliveryEstimate.keys())
|
667 |
allSla = sorted(deliveryEstimate.keys())
|
| 668 |
if len(allSla)==1:
|
668 |
if len(allSla)==1:
|
| 669 |
allEligibleProviders = deliveryEstimate.get(allSla[0])
|
669 |
allEligibleProviders = deliveryEstimate.get(allSla[0])
|
| 670 |
if len(allEligibleProviders)==1:
|
670 |
if len(allEligibleProviders)==1:
|
| Line 679... |
Line 679... |
| 679 |
delEstCostObj.otgAvailable = serviceability[allEligibleProviders[0]][3]
|
679 |
delEstCostObj.otgAvailable = serviceability[allEligibleProviders[0]][3]
|
| 680 |
delEstCostObj.logisticsCost = costingDetails[0]-costingDetails[1]
|
680 |
delEstCostObj.logisticsCost = costingDetails[0]-costingDetails[1]
|
| 681 |
delEstCostObj.codCollectionCharges = costingDetails[1]
|
681 |
delEstCostObj.codCollectionCharges = costingDetails[1]
|
| 682 |
return delEstCostObj
|
682 |
return delEstCostObj
|
| 683 |
except:
|
683 |
except:
|
| 684 |
return None
|
684 |
raise LogisticsServiceException(103, "Unable to get Provider for given pincode: " + str(pincode)+" Amount:- "+str(transactionAmount)+" Weight:- "+ str(weight)+".")
|
| 685 |
else:
|
685 |
else:
|
| 686 |
costingListOrder = []
|
686 |
costingListOrder = []
|
| 687 |
for providerId in allEligibleProviders:
|
687 |
for providerId in allEligibleProviders:
|
| 688 |
costingDetails = providerCostingMap.get(providerId)
|
688 |
costingDetails = providerCostingMap.get(providerId)
|
| 689 |
if costingDetails and costingDetails[0] not in costingListOrder:
|
689 |
if costingDetails and costingDetails[0] not in costingListOrder:
|
| Line 704... |
Line 704... |
| 704 |
delEstCostObj.logisticsCost = costingDetails[0]-costingDetails[1]
|
704 |
delEstCostObj.logisticsCost = costingDetails[0]-costingDetails[1]
|
| 705 |
delEstCostObj.codCollectionCharges = costingDetails[1]
|
705 |
delEstCostObj.codCollectionCharges = costingDetails[1]
|
| 706 |
return delEstCostObj
|
706 |
return delEstCostObj
|
| 707 |
else:
|
707 |
else:
|
| 708 |
continue
|
708 |
continue
|
| 709 |
return None
|
709 |
raise LogisticsServiceException(103, "Unable to get Provider for given pincode: " + str(pincode)+" Amount:- "+str(transactionAmount)+" Weight:- "+ str(weight)+".")
|
| 710 |
else:
|
710 |
else:
|
| 711 |
allEligibleProviders = []
|
711 |
allEligibleProviders = []
|
| 712 |
virtualDelayCostMap = {}
|
712 |
virtualDelayCostMap = {}
|
| 713 |
virtualCommercialsCostMap = {}
|
713 |
virtualCommercialsCostMap = {}
|
| 714 |
for sla in allSla:
|
714 |
for sla in allSla:
|
| Line 775... |
Line 775... |
| 775 |
delEstCostObj.logisticsCost = costingDetails[0]-costingDetails[1]
|
775 |
delEstCostObj.logisticsCost = costingDetails[0]-costingDetails[1]
|
| 776 |
delEstCostObj.codCollectionCharges = costingDetails[1]
|
776 |
delEstCostObj.codCollectionCharges = costingDetails[1]
|
| 777 |
return delEstCostObj
|
777 |
return delEstCostObj
|
| 778 |
else:
|
778 |
else:
|
| 779 |
continue
|
779 |
continue
|
| 780 |
return None
|
- |
|
| 781 |
|
780 |
raise LogisticsServiceException(103, "Unable to get Provider for given pincode: " + str(pincode)+" Amount:- "+str(transactionAmount)+" Weight:- "+ str(weight)+".")
|
| - |
|
781 |
|
| 782 |
|
782 |
|