Skip to content

Commit

Permalink
Merge branch 'release/0.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Otetz committed Mar 2, 2017
2 parents 12a8a55 + f5707c4 commit 37e01ca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions 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:
"""
Expand Down
2 changes: 1 addition & 1 deletion modulbank/client_bank_exchange.py
Expand Up @@ -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):
Expand Down
5 changes: 5 additions & 0 deletions modulbank/structs.py
Expand Up @@ -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:
"""
Expand Down
2 changes: 1 addition & 1 deletion modulbank/version.py
@@ -1 +1 @@
__version__ = '0.0.5'
__version__ = '0.0.6'

0 comments on commit 37e01ca

Please sign in to comment.