'Check packed qty across packing slips and delivery note'

def validate_qty(self):

    (dn_details, ps_item_qty, no_of_cases) = self.get_details_for_packing()
    for item in dn_details:
        new_packed_qty = ((flt(ps_item_qty[item[u'item_code']]) * no_of_cases) + flt(item[u'packed_qty']))
        if ((new_packed_qty > flt(item[u'qty'])) and no_of_cases):
            self.recommend_new_qty(item, ps_item_qty, no_of_cases)
