Ejemplo n.º 1
0
 def add_line_final(self, account, comment=''):
     """Insert final TransactionLine"""
     diff = self.total_delta
     if diff < 0:
         self.lines.append(
             trl.TransactionLine(account, cfg.DEBIT, -diff, comment))
     elif diff > 0:
         self.lines.append(
             trl.TransactionLine(account, cfg.CREDIT, diff, comment))
Ejemplo n.º 2
0
 def test_001(self):
     tl = ts.TransactionLine('70.00.024', 1, 30)
     self.assertEqual(tl.value_delta, 30)
Ejemplo n.º 3
0
 def test_012(self):
     tl = ts.TransactionLine('70.00.024', 2, 20)
     self.assertEqual(tl.is_apotelesma, True)
Ejemplo n.º 4
0
 def test_011(self):
     tl = ts.TransactionLine('54.00.024', 2, 20)
     self.assertEqual(tl.is_apotelesma, False)
Ejemplo n.º 5
0
 def test_009(self):
     tl = ts.TransactionLine('54.00.024', 2, 20)
     self.assertEqual(tl.account_type, "LINE-FPA")
Ejemplo n.º 6
0
 def test_008(self):
     tl = ts.TransactionLine('64.00.024', 1, -20)
     self.assertEqual(tl.account_type, "LINE-EKSODA")
Ejemplo n.º 7
0
 def test_007(self):
     with self.assertRaises(Exception):
         ts.TransactionLine('64.00.024', 3, -20)
Ejemplo n.º 8
0
 def test_006(self):
     tl = ts.TransactionLine('64.00.024', 2, -20)
     self.assertEqual(tl.line_type, 'normal')
Ejemplo n.º 9
0
 def test_004(self):
     tl = ts.TransactionLine('70.00.024', 1, 20)
     self.assertEqual(tl.line_type, 'credit')
Ejemplo n.º 10
0
 def add_line_dc(self, account, debit, credit, comnt='', acc_name=''):
     """Insert a new transaction line from debit credit values"""
     delta = debit - credit
     nli = trl.TransactionLine(account, Decr.DEBIT.value, delta, comnt,
                               acc_name)
     self.lines.append(nli)
Ejemplo n.º 11
0
 def add_line(self, account, ttype, value, comment='', accname=''):
     """Insert a new transactionLine"""
     new_line = trl.TransactionLine(account, ttype, value, comment, accname)
     self.lines.append(new_line)