splitbuchung: konvertiert transfers + test
This commit is contained in:
parent
197f35d3bb
commit
c09644e660
3 changed files with 101 additions and 70 deletions
|
@ -323,7 +323,8 @@ I
|
|||
'PFoodshop Zehlendorf\nLLebensmittel\n^\nD22.10.2020\n'+
|
||||
'CX\nMLebensmittel\nT-55,84\nPreal,- Teltow\nLLebensmittel\n'+
|
||||
'SLebensmittel\nELebensmittel\n$-49,36\nSKosmetik\nEKlopapier\n'+
|
||||
'$-2,99\nSHaushaltschemie\nESagrotan\n$-3,49\n^\n')
|
||||
'$-2,99\nSHaushaltschemie\nESagrotan\n$-3,49\n'+
|
||||
'S[S-Giro]\nEtransfer out\n$-3,49\n^\n')
|
||||
|
||||
(to_create, msg_txt, fail_cnt) = QifTool.convert_transactions_to_create(books[0], tr_list)
|
||||
self.assertEqual(msg_txt, [])
|
||||
|
@ -360,17 +361,25 @@ I
|
|||
'party': parties[3].id,
|
||||
'splitlines': [
|
||||
('create', [{
|
||||
'splittype': 'cat',
|
||||
'amount': Decimal('49.36'),
|
||||
'description': 'Lebensmittel',
|
||||
'category': categories[0].id,
|
||||
}, {
|
||||
'splittype': 'cat',
|
||||
'amount': Decimal('2.99'),
|
||||
'description': 'Klopapier',
|
||||
'category': categories[2].id,
|
||||
}, {
|
||||
'splittype': 'cat',
|
||||
'amount': Decimal('3.49'),
|
||||
'description': 'Sagrotan',
|
||||
'category': categories[1].id,
|
||||
}, {
|
||||
'splittype': 'tr',
|
||||
'amount': Decimal('3.49'),
|
||||
'description': 'transfer out',
|
||||
'booktransf': books[1].id,
|
||||
}],
|
||||
)],
|
||||
}])
|
||||
|
@ -380,7 +389,7 @@ I
|
|||
'lines': [('create', to_create)],
|
||||
}])
|
||||
self.assertEqual(len(books[0].lines), 4)
|
||||
self.assertEqual(books[0].balance, Decimal('-134.09'))
|
||||
self.assertEqual(books[0].balance, Decimal('-137.58'))
|
||||
|
||||
@with_transaction()
|
||||
def test_qiftool_read_transactions(self):
|
||||
|
|
|
@ -313,7 +313,6 @@ Number of transactions: 2""")
|
|||
self.assertEqual(books[1].lines[0].rec_name, '12/04/2013|from|7.30 usd|Transfer to book [From Book | -57.55 usd | Open]')
|
||||
self.assertEqual(books[1].lines[0].state, 'check')
|
||||
|
||||
|
||||
# run wizard again - import to 'To Book'
|
||||
(sess_id, start_state, end_state) = ImportWiz.create()
|
||||
w_obj = ImportWiz(sess_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue