Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
eis
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 7ca34d70
authored
Jun 11, 2025
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perhitungan webr
1 parent
1e43b80c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
50 deletions
eispajak/models/payment.py
eispajak/scripts/data/routes.csv
eispajak/views/pcpd.py
eispajak/models/payment.py
View file @
7ca34d7
...
...
@@ -6,7 +6,7 @@ from opensipkd.base.models import (
)
from
sqlalchemy
import
(
Column
,
Integer
,
DateTime
,
String
,
Text
,
ForeignKey
,
Float
,
Boolean
,
BigInteger
,
SmallInteger
,
desc
,
asc
,
Date
,
Time
,
UniqueConstraint
,
func
)
UniqueConstraint
,
func
,
literal_column
)
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy
import
engine_from_config
from
opensipkd.tools
import
get_settings
...
...
@@ -69,24 +69,7 @@ class PaymentPBB(PCBase, DefaultModel):
for
col
in
columns
:
qry
=
qry
.
add_columns
(
col
)
return
qry
@classmethod
def
sum_data
(
cls
):
return
PCDBSession
.
query
(
func
.
to_char
(
cls
.
tgl_pembayaran_sppt
,
'yyyy-mm-dd'
)
.
label
(
'tanggal'
),
func
.
sum
(
cls
.
jml_sppt_yg_dibayar
)
.
label
(
'bayar'
),
func
.
sum
(
cls
.
denda_sppt
)
.
label
(
'denda'
))
\
.
group_by
(
func
.
to_char
(
cls
.
tgl_pembayaran_sppt
,
'yyyy-mm-dd'
))
@classmethod
def
sum_daily
(
cls
,
length
=
0
):
now
=
datetime
.
now
()
tod
=
now
.
date
tom
=
tod
+
timedelta
(
days
=
1
)
if
length
:
tod
=
tod
-
timedelta
(
days
=
length
)
return
cls
.
sum_data
()
.
filter
(
cls
.
tgl_pembayaran_sppt
.
between
(
tod
,
tom
))
# baru dari db BPHTB
...
...
@@ -119,16 +102,15 @@ class PaymentBPHTB(PCBase, CommonModel):
)
@classmethod
def
sum_data
(
cls
):
return
PCDBSession
.
query
(
func
.
sum
(
cls
.
nilai_bphtb
)
.
label
(
'bayar'
),
func
.
sum
(
'0'
)
.
label
(
'denda'
))
@classmethod
def
sum_today
(
cls
):
now
=
datetime
.
now
()
tom
=
timedelta
(
now
.
date
,
days
=
1
)
qry
=
cls
.
sum_data
()
.
filter
(
cls
.
tgl
.
between
(
now
.
date
,
tom
))
return
qry
.
first
()
def
qry_sum
(
cls
,
columns
=
[]):
qry
=
PCDBSession
.
query
(
func
.
sum
(
cls
.
nilai_bphtb
)
.
label
(
'bayar'
),
literal_column
(
"0"
)
.
label
(
'denda'
),
func
.
count
(
cls
.
id
)
.
label
(
'trx'
))
.
select_from
(
cls
)
for
col
in
columns
:
qry
=
qry
.
add_columns
(
col
)
return
qry
# baru PAD
...
...
@@ -175,16 +157,14 @@ class PaymentPAD(PCBase, CommonModel):
)
@classmethod
def
sum_data
(
cls
):
return
PCDBSession
.
query
(
func
.
sum
(
cls
.
jml_bayar
)
.
label
(
'bayar'
),
func
.
sum
(
cls
.
denda
+
cls
.
bunga
)
.
label
(
'denda'
))
@classmethod
def
sum_today
(
cls
):
now
=
datetime
.
now
()
tom
=
timedelta
(
now
.
date
,
days
=
1
)
qry
=
cls
.
sum_data
()
.
filter
(
cls
.
tgl
.
between
(
now
.
date
,
tom
))
return
qry
.
first
()
def
qry_sum
(
cls
,
columns
=
[]):
qry
=
PCDBSession
.
query
(
func
.
sum
(
cls
.
jml_bayar
)
.
label
(
'bayar'
),
func
.
sum
(
cls
.
denda
+
cls
.
bunga
)
.
label
(
'denda'
),
func
.
count
(
cls
.
id
)
.
label
(
'trx'
))
.
select_from
(
cls
)
for
col
in
columns
:
qry
=
qry
.
add_columns
(
col
)
return
qry
# baru PAD
...
...
@@ -218,17 +198,15 @@ class PaymentWEBR(PCBase, CommonModel):
)
@classmethod
def
sum_data
(
cls
):
return
PCDBSession
.
query
(
func
.
sum
(
cls
.
jml_bayar
)
.
label
(
'bayar'
),
func
.
sum
(
cls
.
denda
)
.
label
(
'denda'
))
@classmethod
def
sum_today
(
cls
):
now
=
datetime
.
now
()
tom
=
timedelta
(
now
.
date
,
days
=
1
)
qry
=
cls
.
sum_data
()
.
filter
(
cls
.
tgl
.
between
(
now
.
date
,
tom
))
return
qry
.
first
()
def
qry_sum
(
cls
,
columns
=
[]):
qry
=
PCDBSession
.
query
(
func
.
sum
(
cls
.
jml_bayar
)
.
label
(
'bayar'
),
func
.
sum
(
cls
.
denda
)
.
label
(
'denda'
),
func
.
count
(
cls
.
id
)
.
label
(
'trx'
))
.
select_from
(
cls
)
for
col
in
columns
:
qry
=
qry
.
add_columns
(
col
)
return
qry
def
get_connection
(
settings
):
...
...
eispajak/scripts/data/routes.csv
View file @
7ca34d7
...
...
@@ -14,7 +14,7 @@ eis-minerba,Minerba,/eis/minerba,1,0,1,eis-pajak,pcpd,Views,view_minerba,eis,pcp
eis-reklame,Reklame,/eis/reklame,1,0,1,eis-pajak,pcpd,Views,view_reklame,eis,pcpd.pt
eis-atd,Air Tanah,/eis/atd,1,0,1,eis-pajak,pcpd,Views,view_atd,eis,pcpd.pt
eis-opsen,Opsen,/eis/opsen,1,0,1,eis-pajak,pcpd,Views,view_opsen,eis,pcpd.pt
eis-
retribusi,Retribusi,/eis/webr,1,0,1,
,Views,view_webr,eis,pcpd.pt
eis-
webr,Retribusi,/eis/webr,1,0,1,,pcpd
,Views,view_webr,eis,pcpd.pt
eis,EIS,/eis,1,0,0
eis-carousel,Carousel,/eis/carousel,1,0,0
eis-carousel-act,Carousel Action,/eis/carousel/{act}/act,1,0
...
...
eispajak/views/pcpd.py
View file @
7ca34d7
This diff is collapsed.
Click to expand it.
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