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 @@
# from types import (
# StringType,
# UnicodeType)
from
sqlalchemy
import
func
from
..tools
import
FixLength
,
get_settings
import
re
# from models import pbbDBSession
# from models.ref import TempatPembayaran
# from models.pegawai import DatLogin
from
datetime
import
timedelta
,
datetime
from
datetime
import
datetime
from
math
import
ceil
import
re
from
sqlalchemy
import
func
from
.
import
left
,
right
from
..tools
import
FixLength
,
get_settings
PROPINSI
=
[(
'kd_propinsi'
,
2
,
'N'
),
]
...
...
@@ -213,18 +213,22 @@ class FixBerkas(BaseFixLength):
def
get_nopel_det
(
self
):
return
get_value
(
self
,
NOPELDET
)
class
FixFormulir
(
BaseFixLength
):
def
get_structure
(
self
):
return
FORMULIR
########### baru untuk penagihan ###########
UPTD
=
list
(
DATI2
)
UPTD
.
append
((
'kd_uptd'
,
2
,
'N'
))
class
FixUptd
(
BaseFixLength
):
def
get_structure
(
self
):
return
UPTD
############################################
def
ensure_datetime
(
d
):
...
...
@@ -257,6 +261,9 @@ def hitung_denda(piutang_pokok, jatuh_tempo, tanggal=None, max_denda=24):
if
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
))
...
...
@@ -264,8 +271,8 @@ def nop_formatted(row):
if
type
(
row
)
==
str
:
row
=
FixNop
(
row
)
return
"
%
s.
%
s-
%
s.
%
s-
%
s.
%
s.
%
s"
%
(
row
.
kd_propinsi
,
row
.
kd_dati2
,
row
.
kd_kecamatan
,
row
.
kd_kelurahan
,
row
.
kd_blok
,
row
.
no_urut
,
row
.
kd_jns_op
)
row
.
kd_propinsi
,
row
.
kd_dati2
,
row
.
kd_kecamatan
,
row
.
kd_kelurahan
,
row
.
kd_blok
,
row
.
no_urut
,
row
.
kd_jns_op
)
def
nop_to_id
(
row
):
...
...
@@ -278,12 +285,24 @@ def nop_to_id(row):
def
query_nop
(
table
):
return
func
.
concat
(
table
.
kd_propinsi
,
func
.
concat
(
'.'
,
func
.
concat
(
table
.
kd_dati2
,
func
.
concat
(
'-'
,
func
.
concat
(
table
.
kd_kecamatan
,
func
.
concat
(
'.'
,
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
))))))))))))
func
.
concat
(
table
.
kd_dati2
,
func
.
concat
(
'-'
,
func
.
concat
(
table
.
kd_kecamatan
,
func
.
concat
(
'.'
,
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
...
...
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