Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4d23405e
authored
Oct 01, 2024
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbuhanan denda pbb
1 parent
37a0b573
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
13 deletions
opensipkd/tools/pbb.py
opensipkd/tools/pbb.py
View file @
4d23405
...
@@ -3,17 +3,17 @@
...
@@ -3,17 +3,17 @@
# from types import (
# from types import (
# StringType,
# StringType,
# UnicodeType)
# UnicodeType)
from
sqlalchemy
import
func
import
re
from
..tools
import
FixLength
,
get_settings
# from models import pbbDBSession
# from models import pbbDBSession
# from models.ref import TempatPembayaran
# from models.ref import TempatPembayaran
# from models.pegawai import DatLogin
# from models.pegawai import DatLogin
from
datetime
import
timedelta
,
datetime
from
datetime
import
datetime
from
math
import
ceil
from
math
import
ceil
import
re
from
sqlalchemy
import
func
from
.
import
left
,
right
from
.
import
left
,
right
from
..tools
import
FixLength
,
get_settings
PROPINSI
=
[(
'kd_propinsi'
,
2
,
'N'
),
]
PROPINSI
=
[(
'kd_propinsi'
,
2
,
'N'
),
]
...
@@ -213,18 +213,22 @@ class FixBerkas(BaseFixLength):
...
@@ -213,18 +213,22 @@ class FixBerkas(BaseFixLength):
def
get_nopel_det
(
self
):
def
get_nopel_det
(
self
):
return
get_value
(
self
,
NOPELDET
)
return
get_value
(
self
,
NOPELDET
)
class
FixFormulir
(
BaseFixLength
):
class
FixFormulir
(
BaseFixLength
):
def
get_structure
(
self
):
def
get_structure
(
self
):
return
FORMULIR
return
FORMULIR
########### baru untuk penagihan ###########
########### baru untuk penagihan ###########
UPTD
=
list
(
DATI2
)
UPTD
=
list
(
DATI2
)
UPTD
.
append
((
'kd_uptd'
,
2
,
'N'
))
UPTD
.
append
((
'kd_uptd'
,
2
,
'N'
))
class
FixUptd
(
BaseFixLength
):
class
FixUptd
(
BaseFixLength
):
def
get_structure
(
self
):
def
get_structure
(
self
):
return
UPTD
return
UPTD
############################################
############################################
def
ensure_datetime
(
d
):
def
ensure_datetime
(
d
):
...
@@ -257,6 +261,9 @@ def hitung_denda(piutang_pokok, jatuh_tempo, tanggal=None, max_denda=24):
...
@@ -257,6 +261,9 @@ def hitung_denda(piutang_pokok, jatuh_tempo, tanggal=None, max_denda=24):
if
bln_tunggakan
>
max_denda
:
if
bln_tunggakan
>
max_denda
:
bln_tunggakan
=
max_denda
bln_tunggakan
=
max_denda
if
jatuh_tempo
.
year
>
2023
:
persen_denda
=
1
return
int
(
ceil
(
bln_tunggakan
*
persen_denda
/
100.0
*
piutang_pokok
))
return
int
(
ceil
(
bln_tunggakan
*
persen_denda
/
100.0
*
piutang_pokok
))
...
@@ -264,8 +271,8 @@ def nop_formatted(row):
...
@@ -264,8 +271,8 @@ def nop_formatted(row):
if
type
(
row
)
==
str
:
if
type
(
row
)
==
str
:
row
=
FixNop
(
row
)
row
=
FixNop
(
row
)
return
"
%
s.
%
s-
%
s.
%
s-
%
s.
%
s.
%
s"
%
(
return
"
%
s.
%
s-
%
s.
%
s-
%
s.
%
s.
%
s"
%
(
row
.
kd_propinsi
,
row
.
kd_dati2
,
row
.
kd_kecamatan
,
row
.
kd_propinsi
,
row
.
kd_dati2
,
row
.
kd_kecamatan
,
row
.
kd_kelurahan
,
row
.
kd_blok
,
row
.
no_urut
,
row
.
kd_jns_op
)
row
.
kd_kelurahan
,
row
.
kd_blok
,
row
.
no_urut
,
row
.
kd_jns_op
)
def
nop_to_id
(
row
):
def
nop_to_id
(
row
):
...
@@ -278,12 +285,24 @@ def nop_to_id(row):
...
@@ -278,12 +285,24 @@ def nop_to_id(row):
def
query_nop
(
table
):
def
query_nop
(
table
):
return
func
.
concat
(
table
.
kd_propinsi
,
func
.
concat
(
'.'
,
return
func
.
concat
(
table
.
kd_propinsi
,
func
.
concat
(
'.'
,
func
.
concat
(
table
.
kd_dati2
,
func
.
concat
(
'-'
,
func
.
concat
(
table
.
kd_dati2
,
func
.
concat
(
'-'
,
func
.
concat
(
table
.
kd_kecamatan
,
func
.
concat
(
'.'
,
func
.
concat
(
func
.
concat
(
table
.
kd_kelurahan
,
func
.
concat
(
'-'
,
table
.
kd_kecamatan
,
func
.
concat
(
table
.
kd_blok
,
func
.
concat
(
'.'
,
func
.
concat
(
func
.
concat
(
table
.
no_urut
,
func
.
concat
(
'-'
,
'.'
,
table
.
kd_jns_op
))))))))))))
func
.
concat
(
table
.
kd_kelurahan
,
func
.
concat
(
'-'
,
func
.
concat
(
table
.
kd_blok
,
func
.
concat
(
'.'
,
func
.
concat
(
table
.
no_urut
,
func
.
concat
(
'-'
,
table
.
kd_jns_op
))))))))))))
# JEnis REstitusi Kompensasi
# JEnis REstitusi Kompensasi
...
...
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