Exemplo n.º 1
0
 def test_get_full_number_with_settings(self):
     settings.PLANS_INVOICE_NUMBER_FORMAT = "{{ invoice.issued|date:'Y' }}." \
         "{{ invoice.number }}.{{ invoice.issued|date:'m' }}"
     i = Invoice()
     i.number = 123
     i.issued = date(2010, 5, 30)
     self.assertEqual(i.get_full_number(), "2010.123.05")
Exemplo n.º 2
0
 def test_get_full_number_with_settings(self):
     settings.INVOICE_NUMBER_FORMAT = "{{ invoice.issued|date:'Y' }}." \
                                      "{{ invoice.number }}.{{ invoice.issued|date:'m' }}"
     i = Invoice()
     i.number = 123
     i.issued = date(2010, 5, 30)
     self.assertEqual(i.get_full_number(), "2010.123.05")
Exemplo n.º 3
0
 def test_get_full_number_type3(self):
     i = Invoice()
     i.type = Invoice.INVOICE_TYPES.PROFORMA
     i.number = 123
     i.issued = date(2010, 5, 30)
     self.assertEqual(i.get_full_number(), "123/PF/05/2010")
Exemplo n.º 4
0
 def test_get_full_number_type2(self):
     i = Invoice()
     i.type = Invoice.INVOICE_TYPES.DUPLICATE
     i.number = 123
     i.issued = date(2010, 5, 30)
     self.assertEqual(i.get_full_number(), "123/FV/05/2010")
Exemplo n.º 5
0
 def test_get_full_number(self):
     i = Invoice()
     i.number = 123
     i.issued = date(2010, 5, 30)
     self.assertEqual(i.get_full_number(), "123/FV/05/2010")
Exemplo n.º 6
0
 def test_get_full_number_type3(self):
     i = Invoice()
     i.type = Invoice.INVOICE_TYPES.PROFORMA
     i.number = 123
     i.issued = date(2010, 5, 30)
     self.assertEqual(i.get_full_number(), "123/PF/05/2010")
Exemplo n.º 7
0
 def test_get_full_number_type2(self):
     i = Invoice()
     i.type = Invoice.INVOICE_TYPES.DUPLICATE
     i.number = 123
     i.issued = date(2010, 5, 30)
     self.assertEqual(i.get_full_number(), "123/FV/05/2010")
Exemplo n.º 8
0
 def test_get_full_number(self):
     i = Invoice()
     i.number = 123
     i.issued = date(2010, 5, 30)
     self.assertEqual(i.get_full_number(), "123/FV/05/2010")