Ejemplo n.º 1
0
 def test_trunc_obl_nbr(self):
     from efms.utils import trunc_obl_nbr
     expected = 'D1234'
     obl_nbr = 'D1234'
     self.assertEquals(expected, trunc_obl_nbr(obl_nbr))
     obl_nbr = 'D1234-1'
     self.assertEquals(expected, trunc_obl_nbr(obl_nbr))
     obl_nbr = 'D1234-1#'
     self.assertEquals(expected, trunc_obl_nbr(obl_nbr))
Ejemplo n.º 2
0
 def _ancestors(self):
     return ControlPointLineItem.objects.filter(
         obl_nbr__startswith=utils.trunc_obl_nbr(self.obl_nbr), fyqseq__lt=self.fyqseq
     ).order_by("fyqseq")
Ejemplo n.º 3
0
def decoration_items(obl_nbr, fyqseq):
    return ControlPointLineItem.objects.\
        filter(obl_nbr__startswith=utils.trunc_obl_nbr(obl_nbr), fyqseq__gte=fyqseq).\
        order_by('fyqseq')