From 5722f28835c5283f385cb84be0e386bd193cc992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Sep 2018 17:29:17 +0200 Subject: [PATCH] Inverse credit balance sign of start balance The debit and credit must be positive. issue7745 review56401002 --- account.py | 2 +- tests/FEC.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/account.py b/account.py index 0b6c097031..05c2c8ff9f 100644 --- a/account.py +++ b/account.py @@ -234,7 +234,7 @@ class AccountFrFEC(Wizard): if balance > 0: debit, credit = balance, 0 else: - debit, credit = 0, balance + debit, credit = 0, -balance yield [ OPENING_CODE, OPENING_NAME, diff --git a/tests/FEC.csv b/tests/FEC.csv index 7ed753bd09..c41cdeaaae 100644 --- a/tests/FEC.csv +++ b/tests/FEC.csv @@ -1,5 +1,5 @@ JournalCode JournalLib EcritureNum EcritureDate CompteNum CompteLib CompAuxNum CompAuxLib PieceRef PieceDate EcritureLib Debit Credit EcritureLet DateLet ValidDate Montantdevise Idevise -OUV Balance Initiale 0 20180101 797 Transferts de charges exceptionnelles - 20180101 - 0,00 -5,00 20180101 +OUV Balance Initiale 0 20180101 797 Transferts de charges exceptionnelles - 20180101 - 0,00 5,00 20180101 OUV Balance Initiale 0 20180101 4967 Autres comptes débiteurs 2 Party - 20180101 - 5,00 0,00 20180101 REV Revenue 1 20180101 797 Transferts de charges exceptionnelles - 20180101 - 0,00 10,00 20180101 REV Revenue 1 20180101 4967 Autres comptes débiteurs 2 Party - 20180101 - 10,00 0,00 20180101