Skip to content

Commit 36f413a

Browse files
committed
Encoding fixes
1 parent 5cb2f55 commit 36f413a

File tree

11 files changed

+35
-12
lines changed

11 files changed

+35
-12
lines changed
3.89 MB
Binary file not shown.

finvoice/finvoice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def gds_reverse_node_mapping(cls, mapping):
394394
# Globals
395395
#
396396

397-
ExternalEncoding = 'iso8859-15'
397+
ExternalEncoding = 'iso-8859-15'
398398
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
399399
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
400400
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')

finvoice/finvoice201.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def gds_reverse_node_mapping(cls, mapping):
391391
# Globals
392392
#
393393

394-
ExternalEncoding = 'ascii'
394+
ExternalEncoding = 'iso-8859-15'
395395
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
396396
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
397397
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')

finvoice/finvoice201subs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def parsexml_(*args, **kwargs):
8282
# Globals
8383
#
8484

85-
ExternalEncoding = 'ascii'
85+
ExternalEncoding = 'iso-8859-15'
8686

8787
#
8888
# Data representation classes

finvoice/finvoicesubs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def parsexml_(*args, **kwargs):
8686
# Globals
8787
#
8888

89-
ExternalEncoding = 'iso8859-15'
89+
ExternalEncoding = 'iso-8859-15'
9090

9191
#
9292
# Data representation classes

finvoice/soap/envelope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def gds_reverse_node_mapping(cls, mapping):
391391
# Globals
392392
#
393393

394-
ExternalEncoding = 'ISO-8859-15'
394+
ExternalEncoding = 'iso-8859-15'
395395
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
396396
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
397397
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')

finvoice/soap/envelopesubs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def parsexml_(*args, **kwargs):
8282
# Globals
8383
#
8484

85-
ExternalEncoding = 'ISO-8859-15'
85+
ExternalEncoding = 'iso-8859-15'
8686

8787
#
8888
# Data representation classes

finvoice/soap/msgheader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def gds_reverse_node_mapping(cls, mapping):
391391
# Globals
392392
#
393393

394-
ExternalEncoding = 'ISO-8859-15'
394+
ExternalEncoding = 'iso-8859-15'
395395
Tag_pattern_ = re_.compile(r'({.*})?(.*)')
396396
String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
397397
Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')

finvoice/soap/msgheadersubs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def parsexml_(*args, **kwargs):
8282
# Globals
8383
#
8484

85-
ExternalEncoding = 'ISO-8859-15'
85+
ExternalEncoding = 'iso-8859-15'
8686

8787
#
8888
# Data representation classes

finvoice/tieke/members.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
##
1919

2020
class MemberLists:
21-
def get_BanksList():
21+
def get_BanksList(self):
2222
return [
2323
'OKOYFIHH', # OP-Pohjola-ryhmä
2424
'NDEAFIHH', # Nordea
@@ -30,7 +30,7 @@ def get_BanksList():
3030
'SBANFIHH', # S-Pankki
3131
'DNBAFIHX', # DnB NOR Bank
3232
]
33-
def get_ServicePorvidersList():
33+
def get_ServicePorvidersList(self):
3434
return [
3535
'FIYAPSOL', # YAP Solutions Oy
3636
'003723327487', # Apix Messaging Oy
@@ -49,4 +49,27 @@ def get_ServicePorvidersList():
4949
'00885060259470028', # Tradeshift
5050
]
5151
def get_MembersList():
52-
return self.get_BanksList() + self.get_MembersList()
52+
return self.get_BanksList() + self.get_MembersList()
53+
54+
class PrintServiceList:
55+
def get_PrintServiceList(self):
56+
return {
57+
'NDEAFIHH': 'tulostukseen',
58+
'PSPBFIHH': '003718062728810P',
59+
'DABAFIHH': '003718062728810P',
60+
'HELSFIHH': 'TULOSTUSPALVELU',
61+
'OKOYFIHH': 'TULOSTUSPALVELU',
62+
'003710948874': 'EKIRJE',
63+
'003723327487': 'TULOSTUS',
64+
'003721291126': 'PRINT',
65+
}
66+
67+
class PrintService():
68+
def get_PrintService(self, member_id):
69+
psl = PrintServiceList()
70+
l = psl.get_PrintServiceList()
71+
if (l[member_id]):
72+
return l[member_id];
73+
return ''
74+
75+

0 commit comments

Comments
 (0)