From 677e6e1e72dbfabe23200800cf45b4d688a39c62 Mon Sep 17 00:00:00 2001 From: Alexey Shevchenko Date: Thu, 2 Mar 2017 20:06:44 +0200 Subject: [PATCH 1/4] FIX: empty exchange.document. --- modulbank/client_bank_exchange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modulbank/client_bank_exchange.py b/modulbank/client_bank_exchange.py index e115430..d99af01 100644 --- a/modulbank/client_bank_exchange.py +++ b/modulbank/client_bank_exchange.py @@ -47,7 +47,7 @@ def __format_value(value) -> str: return value.strftime('%H:%M:%S') if isinstance(value, Decimal): return str(value.quantize(Decimal('.01'), rounding=ROUND_HALF_DOWN)) - return '' + return value class GeneralSection(BaseSection): From 990943f2641824ec28b11656e28c5a14ff1dc9a4 Mon Sep 17 00:00:00 2001 From: Alexey Shevchenko Date: Thu, 2 Mar 2017 20:07:04 +0200 Subject: [PATCH 2/4] Logging support. --- modulbank/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modulbank/client.py b/modulbank/client.py index f7efeac..bfa5322 100644 --- a/modulbank/client.py +++ b/modulbank/client.py @@ -1,12 +1,15 @@ import datetime from decimal import Decimal, InvalidOperation +import logging import requests from .client_bank_exchange import ClientBankExchange from .exceptions import * from .structs import Company, Operation, OperationCategory, PaymentOrder +log = logging.getLogger(__name__) + class SearchOptions: """ From 889fe6a05ff5b04c1adf04e6f42d0234e81493fe Mon Sep 17 00:00:00 2001 From: Alexey Shevchenko Date: Thu, 2 Mar 2017 20:07:37 +0200 Subject: [PATCH 3/4] String representation for PaymentOrder. --- modulbank/structs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modulbank/structs.py b/modulbank/structs.py index 064653a..660e601 100644 --- a/modulbank/structs.py +++ b/modulbank/structs.py @@ -798,6 +798,11 @@ def __init__(self, doc_num: str, account_num: str, amount: Decimal, purpose: str self.__priority = priority self.__date = date is not None and date or datetime.date.today() + def __str__(self): + return ('<%s ' % self.__class__.__name__) + ' '.join( + ['%s:%s' % (k.replace('_' + self.__class__.__name__, '').lstrip('_'), str(self.__dict__[k])) + for k in self.__dict__]) + '>' + @property def doc_num(self) -> str: """ From f5707c4c73ca526183b880ad8d7c4d6279b17252 Mon Sep 17 00:00:00 2001 From: Alexey Shevchenko Date: Thu, 2 Mar 2017 20:09:41 +0200 Subject: [PATCH 4/4] Version change. --- modulbank/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modulbank/version.py b/modulbank/version.py index eead319..fa9c4ec 100644 --- a/modulbank/version.py +++ b/modulbank/version.py @@ -1 +1 @@ -__version__ = '0.0.5' +__version__ = '0.0.6'