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 08fdddc7
authored
May 28, 2021
by
h2h
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Tambah Indramayu
1 parent
62886622
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
0 deletions
CHANGES.txt
sismiop/models/indramayu.py
sismiop/services/indramayu.py
CHANGES.txt
View file @
08fdddc
0.1.27 2021-05-27
-----------------
- Tambah Indramayu
0.1.26 2021-05-09
-----------------
- Bug fixed available invoice di modul default
...
...
sismiop/models/indramayu.py
0 → 100644
View file @
08fdddc
from
sqlalchemy
import
(
Column
,
Float
,
String
,
)
from
sqlalchemy.ext.declarative
import
declarative_base
from
.objek_pajak
import
ObjekPajakMixin
from
.sppt
import
SpptMixin
from
.pembayaran_sppt
import
BasePembayaranSpptMixin
from
.kelurahan
import
KelurahanMixin
from
.kecamatan
import
KecamatanMixin
from
.propinsi
import
PropinsiMixin
from
.tempat_pembayaran
import
TempatPembayaranMixin
Base
=
declarative_base
()
class
ObjekPajak
(
Base
,
ObjekPajakMixin
):
pass
class
Sppt
(
Base
,
SpptMixin
):
pass
class
PembayaranSppt
(
Base
,
BasePembayaranSpptMixin
):
denda_sppt
=
Column
(
Float
)
jml_sppt_yg_dibayar
=
Column
(
Float
)
nip_rekam_byr_sppt
=
Column
(
String
(
9
))
kd_kanwil
=
Column
(
String
(
2
))
kd_kantor
=
Column
(
String
(
2
))
class
Kelurahan
(
Base
,
KelurahanMixin
):
pass
class
Kecamatan
(
Base
,
KecamatanMixin
):
pass
class
Propinsi
(
Base
,
PropinsiMixin
):
pass
class
TempatPembayaran
(
Base
,
TempatPembayaranMixin
):
pass
sismiop/services/indramayu.py
0 → 100644
View file @
08fdddc
from
sqlalchemy
import
func
from
opensipkd.hitung
import
(
hitung_denda
,
round_up
,
)
from
..models.indramayu
import
(
ObjekPajak
,
Sppt
,
PembayaranSppt
,
Kelurahan
,
Kecamatan
,
Propinsi
,
)
from
.base
import
(
AvailableInvoice
as
BaseAvailableInvoice
,
Inquiry
as
BaseInquiry
,
Reversal
as
BaseReversal
,
get_db_session
,
)
class
Inquiry
(
BaseInquiry
):
def
get_op_model
(
self
):
# Override
return
ObjekPajak
def
get_invoice_model
(
self
):
# Override
return
Sppt
def
get_payment_model
(
self
):
# Override
return
PembayaranSppt
def
get_kelurahan_model
(
self
):
# Override
return
Kelurahan
def
get_kecamatan_model
(
self
):
# Override
return
Kecamatan
def
get_propinsi_model
(
self
):
# Override
return
Propinsi
def
hitung_pokok
(
self
):
# Override
db_session
=
get_db_session
()
Payment
=
self
.
get_payment_model
()
q
=
db_session
.
query
(
func
.
sum
(
Payment
.
jml_sppt_yg_dibayar
)
.
label
(
'jml_sppt_yg_dibayar'
),
func
.
sum
(
Payment
.
denda_sppt
)
.
label
(
'denda_sppt'
))
q
=
self
.
get_filter
(
q
)
bayar
=
q
.
first
()
self
.
total_bayar
=
bayar
.
jml_sppt_yg_dibayar
or
0
denda_lalu
=
bayar
.
denda_sppt
or
0
sisa
=
float
(
self
.
total_bayar
-
denda_lalu
)
tagihan
=
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
-
sisa
if
tagihan
<
0
:
self
.
tagihan
=
0
else
:
self
.
tagihan
=
round_up
(
tagihan
)
class
Reversal
(
BaseReversal
):
def
get_invoice_model
(
self
):
return
Sppt
def
get_payment_model
(
self
):
return
PembayaranSppt
class
AvailableInvoice
(
BaseAvailableInvoice
):
def
get_inquiry_class
(
self
):
return
Inquiry
def
get_invoice_model
(
self
):
return
Sppt
def
get_payment_model
(
self
):
return
PembayaranSppt
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