|
41 | 41 | if account:
|
42 | 42 | pprint(vars(account))
|
43 | 43 | else:
|
44 |
| - print u'Błąd: ' + nip24.getLastError() |
| 44 | + print('Błąd: ' + nip24.getLastError()) |
45 | 45 |
|
46 | 46 | # Sprawdzenie statusu fimy
|
47 | 47 | active = nip24.isActiveExt(Number.NIP, nip)
|
48 | 48 |
|
49 | 49 | if active:
|
50 |
| - print u'Firma prowadzi aktywną działalność' |
| 50 | + print('Firma prowadzi aktywną działalność') |
51 | 51 | else:
|
52 | 52 | if not nip24.getLastError():
|
53 |
| - print u'Firma zawiesiła lub zakończyła działalność' |
| 53 | + print('Firma zawiesiła lub zakończyła działalność') |
54 | 54 | else:
|
55 |
| - print u'Błąd: ' + nip24.getLastError() |
| 55 | + print('Błąd: ' + nip24.getLastError()) |
56 | 56 |
|
57 | 57 | # Sprawdzenie statusu firmy w rejestrze VAT
|
58 | 58 | vat = nip24.getVATStatusExt(Number.NIP, nip, True)
|
59 | 59 |
|
60 | 60 | if vat:
|
61 |
| - print u'NIP: ' + vat.nip |
62 |
| - print u'REGON: ' + vat.regon |
63 |
| - print u'Nazwa firmy: ' + vat.name |
64 |
| - print u'Status: ' + str(vat.status) |
65 |
| - print u'Wynik: ' + vat.result |
66 |
| - print u'Data sprawdzenia: ' + vat.date.strftime('%Y-%m-%d') |
67 |
| - print u'Źródło: ' + vat.source |
| 61 | + print('NIP: ' + vat.nip) |
| 62 | + print('REGON: ' + vat.regon) |
| 63 | + print('Nazwa firmy: ' + vat.name) |
| 64 | + print('Status: ' + str(vat.status)) |
| 65 | + print('Wynik: ' + vat.result) |
| 66 | + print('Data sprawdzenia: ' + vat.date.strftime('%Y-%m-%d')) |
| 67 | + print('Źródło: ' + vat.source) |
68 | 68 | else:
|
69 |
| - print u'Błąd: ' + nip24.getLastError() |
| 69 | + print('Błąd: ' + nip24.getLastError()) |
70 | 70 |
|
71 | 71 | # Wywołanie metody zwracającej dane do faktury
|
72 | 72 | invoice = nip24.getInvoiceDataExt(Number.NIP, nip, False)
|
73 | 73 |
|
74 | 74 | if invoice:
|
75 |
| - print u'Nazwa: ' + invoice.name |
76 |
| - print u'Imię i nazwisko: ' + invoice.firstname + ' ' + invoice.lastname |
77 |
| - print u'Adres: ' + invoice.postCode + ' ' + invoice.postCity + ' ' + invoice.street \ |
78 |
| - + ' ' + invoice.streetNumber |
79 |
| - print u'NIP: ' + invoice.nip |
| 75 | + print('Nazwa: ' + invoice.name) |
| 76 | + print('Imię i nazwisko: ' + invoice.firstname + ' ' + invoice.lastname) |
| 77 | + print('Adres: ' + invoice.postCode + ' ' + invoice.postCity + ' ' + invoice.street |
| 78 | + + ' ' + invoice.streetNumber) |
| 79 | + print('NIP: ' + invoice.nip) |
80 | 80 | else:
|
81 |
| - print u'Błąd: ' + nip24.getLastError() |
| 81 | + print('Błąd: ' + nip24.getLastError()) |
82 | 82 |
|
83 | 83 | # Wywołanie metody zwracającej szczegółowe dane firmy
|
84 | 84 | all = nip24.getAllDataExt(Number.NIP, nip, False)
|
85 | 85 |
|
86 | 86 | if all:
|
87 | 87 | pprint(vars(all))
|
88 | 88 | else:
|
89 |
| - print u'Błąd: ' + nip24.getLastError() |
| 89 | + print('Błąd: ' + nip24.getLastError()) |
90 | 90 |
|
91 | 91 | # Wywołanie metody zwracającej dane z systemu VIES
|
92 | 92 | vies = nip24.getVIESData(nip_eu)
|
93 | 93 |
|
94 | 94 | if vies:
|
95 | 95 | pprint(vars(vies))
|
96 | 96 | else:
|
97 |
| - print u'Błąd: ' + nip24.getLastError() |
| 97 | + print('Błąd: ' + nip24.getLastError()) |
98 | 98 |
|
99 | 99 | # Wywołanie metody zwracającej informacje o rachunku bankowym
|
100 | 100 | iban = nip24.getIBANStatusExt(Number.NIP, nip, account_number)
|
101 | 101 |
|
102 | 102 | if iban:
|
103 | 103 | pprint(vars(iban))
|
104 | 104 | else:
|
105 |
| - print u'Błąd: ' + nip24.getLastError() |
| 105 | + print('Błąd: ' + nip24.getLastError()) |
0 commit comments