Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
sismiop-models
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b89a16d4
authored
Jun 23, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed localization di Windows
1 parent
404b1850
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
sismiop/scripts/inquiry.py
sismiop/services/base.py
sismiop/scripts/inquiry.py
View file @
b89a16d
import
sys
import
locale
from
datetime
import
date
from
configparser
import
ConfigParser
from
optparse
import
OptionParser
...
...
@@ -8,13 +7,7 @@ from sqlalchemy import create_engine
from
sqlalchemy.orm
import
sessionmaker
from
zope.sqlalchemy
import
register
import
sismiop.services.base
locale
.
setlocale
(
locale
.
LC_ALL
,
'id_ID.utf8'
)
def
thousand
(
n
):
return
locale
.
format
(
'
%.0
f'
,
n
,
True
)
from
sismiop.services.base
import
thousand
def
show_val
(
label
,
value
):
...
...
@@ -84,6 +77,10 @@ def show_payment(module_name, inq, pay):
show_fields
(
row
,
fields
)
ERR_PAYMENT_NOT_FOUND
=
'Pembayaran tidak ditemukan, '
\
'tidak ada yang perlu dibatalkan.'
def
main
(
argv
=
sys
.
argv
):
option
,
remain
=
get_option
(
argv
[
1
:])
invoice_id
=
option
.
invoice_id
...
...
@@ -129,7 +126,7 @@ def main(argv=sys.argv):
rev
=
Reversal
(
invoice_id
)
pay
=
rev
.
payment
if
not
pay
:
print
(
'Pembayaran tidak ditemukan, tidak ada yang perlu dibatalkan.'
)
print
(
ERR_PAYMENT_NOT_FOUND
)
return
rev
.
do_reversal
()
print
(
...
...
sismiop/services/base.py
View file @
b89a16d
import
sys
from
time
import
time
from
datetime
import
(
date
,
...
...
@@ -20,7 +21,11 @@ def get_db_session():
return
DBSession
locale
.
setlocale
(
locale
.
LC_ALL
,
'id_ID.utf8'
)
if
sys
.
platform
==
'linux'
:
localization
=
'id_ID.utf8'
else
:
localization
=
'English_Australia.1252'
locale
.
setlocale
(
locale
.
LC_ALL
,
localization
)
# Nomor Objek Pajak
NOP
=
[
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment