Subversion Repositories SmartDukaan

Rev

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

Rev 23493 Rev 23496
Line 572... Line 572...
572
            #FIXME line item is only one now. If multiple will come, need to fix.
572
            #FIXME line item is only one now. If multiple will come, need to fix.
573
            item_id = order.lineitems[0].item_id
573
            item_id = order.lineitems[0].item_id
574
            if pickUp == PickUpType.RUNNER or pickUp == PickUpType.SELF:
574
            if pickUp == PickUpType.RUNNER or pickUp == PickUpType.SELF:
575
                current_time = datetime.datetime.now()
575
                current_time = datetime.datetime.now()
576
                if pdu.isFofo:
576
                if pdu.isFofo:
577
                    logistics_info = logistics_client.getLogisticsInfo(order.customer_pincode, item_id, DeliveryType.PREPAID, pickUp, -1)
-
 
578
                else:
-
 
579
                    stateMaster = fetchStateMaster()
577
                    stateMaster = fetchStateMaster()
580
                    stateId = -1
578
                    stateId = -1
581
                    for k, v in stateMaster.iteritems():
579
                    for k, v in stateMaster.iteritems():
582
                        if v.stateName == order.customer_state:
580
                        if v.stateName == order.customer_state:
583
                            stateId = k
581
                            stateId = k
584
                            break
582
                            break
585
                    logistics_info = logistics_client.getLogisticsInfo(order.customer_pincode, item_id, DeliveryType.PREPAID, pickUp, stateId)
583
                    logistics_info = logistics_client.getLogisticsInfo(order.customer_pincode, item_id, DeliveryType.PREPAID, pickUp, stateId)
-
 
584
                else:
-
 
585
                    logistics_info = logistics_client.getLogisticsInfo(order.customer_pincode, item_id, DeliveryType.PREPAID, pickUp, -1)
586
                order.logistics_provider_id = logistics_info.providerId
586
                order.logistics_provider_id = logistics_info.providerId
587
                
587
                
588
                order.warehouse_id = logistics_info.warehouseId
588
                order.warehouse_id = logistics_info.warehouseId
589
                order.fulfilmentWarehouseId = logistics_info.fulfilmentWarehouseId
589
                order.fulfilmentWarehouseId = logistics_info.fulfilmentWarehouseId
590
                
590