Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-webr-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 0cffb59e
authored
Apr 08, 2021
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Variabel total bertipe int ketimbang Decimal
1 parent
e7aa398c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
CHANGES.txt
opensipkd/webr/scripts/available_invoice.py
opensipkd/webr/scripts/inquiry.py
opensipkd/webr/services/default.py
CHANGES.txt
View file @
0cffb59
0.2.1 2021-04-08
----------------
- Variabel total bertipe int ketimbang Decimal
0.2 2021-01-11
--------------
- Tambah Provinsi Jawa Barat
...
...
opensipkd/webr/scripts/available_invoice.py
View file @
0cffb59
...
...
@@ -26,14 +26,14 @@ def main(argv=sys.argv):
option
=
get_option
(
argv
[
1
:])
conf
=
ConfigParser
()
conf
.
read
(
option
.
conf
)
module_name
=
'services'
module
=
__import__
(
'opensipkd.webr.'
+
module_name
)
services
=
getattr
(
module
.
webr
,
module_name
)
module_name
=
conf
.
get
(
'main'
,
'module'
)
module
=
__import__
(
'opensipkd.webr.
services.
'
+
module_name
)
services
=
getattr
(
module
.
webr
.
services
,
module_name
)
AvailableInvoice
=
services
.
AvailableInvoice
db_url
=
conf
.
get
(
'main'
,
'db_url'
)
persen_denda
=
conf
.
getfloat
(
'main'
,
'persen_denda'
)
engine
=
create_engine
(
db_url
)
session_factory
=
sessionmaker
(
bind
=
engine
)
module
.
webr
.
services
.
DBSession
=
session_factory
()
module
.
webr
.
services
.
base
.
DBSession
=
session_factory
()
a
=
AvailableInvoice
(
persen_denda
,
option
)
a
.
show
()
opensipkd/webr/scripts/inquiry.py
View file @
0cffb59
...
...
@@ -59,6 +59,7 @@ def show(inq):
show_val
(
'Nama Rekening'
,
inq
.
get_nama_rekening
())
show_val
(
'Kode SKPD'
,
inq
.
get_kode_departemen
())
show_val
(
'Nama SKPD'
,
inq
.
get_nama_departemen
())
show_val
(
'Jatuh Tempo'
,
inq
.
get_jatuh_tempo
())
show_rp
(
'Tagihan Pokok'
,
inq
.
tagihan
)
show_rp
(
'Denda'
,
inq
.
denda
)
show_rp
(
'Total Tagihan'
,
inq
.
total
)
...
...
opensipkd/webr/services/default.py
View file @
0cffb59
...
...
@@ -61,7 +61,7 @@ class Inquiry:
func
.
sum
(
self
.
payment_model
.
bayar
)
.
label
(
'jml'
))
q
=
q
.
filter_by
(
ar_invoice_id
=
self
.
invoice
.
id
)
pay
=
q
.
first
()
return
pay
and
pay
.
jml
or
0
return
pay
and
int
(
pay
.
jml
)
or
0
def
hitung
(
self
):
bunga
=
self
.
invoice
.
bunga
or
0
...
...
@@ -106,6 +106,9 @@ class Inquiry:
def
get_nama_departemen
(
self
):
return
self
.
invoice
.
departemen_nama
.
upper
()
def
get_jatuh_tempo
(
self
):
return
self
.
invoice
.
jatuh_tempo
def
get_no_urut
(
self
):
DBSession
=
get_db_session
()
q
=
DBSession
.
query
(
self
.
payment_model
)
.
filter_by
(
...
...
@@ -176,6 +179,8 @@ class Reversal(Inquiry):
class
AvailableInvoice
:
invoice_model
=
Invoice
def
__init__
(
self
,
persen_denda
=
2
,
option
=
None
):
self
.
option
=
option
self
.
persen_denda
=
persen_denda
...
...
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