Subversion Repositories SmartDukaan

Rev

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

Rev 3098 Rev 3103
Line 118... Line 118...
118
        session.commit()
118
        session.commit()
119
        return awb.awb_number
119
        return awb.awb_number
120
    except:
120
    except:
121
        raise LogisticsServiceException(103, "Unable to get an AWB for the given Provider: " + str(provider_id))
121
        raise LogisticsServiceException(103, "Unable to get an AWB for the given Provider: " + str(provider_id))
122
 
122
 
123
def get_free_awb_count(provider_id):
123
def get_free_awb_count(provider_id, type):
124
    count = Awb.query.filter_by(provider_id = provider_id, is_available = True).count()
124
    count = Awb.query.filter_by(provider_id = provider_id, is_available = True, type=type).count()
125
    if count == None:
125
    if count == None:
126
        count = 0
126
        count = 0
127
    return count
127
    return count
128
   
128
   
129
def get_shipment_info(awb_number, provider_id):
129
def get_shipment_info(awb_number, provider_id):