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 891b22f6
authored
Jul 02, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed set_faktor_pengurangan_sppt()
1 parent
73cb49e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
21 deletions
sismiop/services/base.py
sismiop/services/tangkota/__init__.py
sismiop/services/tangsel/__init__.py
sismiop/services/base.py
View file @
891b22f
...
...
@@ -123,6 +123,13 @@ class Query:
def
is_available
(
self
):
return
self
.
invoice
.
status_pembayaran_sppt
==
'0'
def
set_faktor_pengurang_sppt
(
self
,
penambah
):
not_null
(
self
.
invoice
)
self
.
invoice
.
faktor_pengurang_sppt
+=
penambah
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
=
\
self
.
invoice
.
pbb_terhutang_sppt
-
\
self
.
invoice
.
faktor_pengurang_sppt
class
Inquiry
(
Query
):
def
__init__
(
...
...
@@ -273,19 +280,14 @@ class Inquiry(Query):
DBSession
.
add
(
self
.
invoice
)
return
bayar
def
set_faktor_pengurang_sppt
(
self
):
if
not
self
.
discount_pokok
:
return
not_null
(
self
.
invoice
)
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
=
\
self
.
invoice
.
pbb_terhutang_sppt
-
\
self
.
invoice
.
faktor_pengurang_sppt
-
\
self
.
discount_pokok
self
.
invoice
.
faktor_pengurang_sppt
+=
self
.
discount_pokok
def
before_save
(
self
,
bayar
):
pass
def
set_faktor_pengurang_sppt
(
self
,
payment
):
if
not
payment
.
discount_pokok
:
return
Query
.
set_faktor_pengurang_sppt
(
self
,
payment
.
discount_pokok
)
class
Reversal
(
Query
):
def
__init__
(
self
,
invoice_id
):
...
...
@@ -308,12 +310,7 @@ class Reversal(Query):
def
set_faktor_pengurang_sppt
(
self
):
if
not
self
.
payment
.
discount_pokok
:
return
not_null
(
self
.
invoice
)
self
.
invoice
.
pbb_yg_harus_dibayar_sppt
=
\
self
.
invoice
.
pbb_terhutang_sppt
-
\
self
.
invoice
.
faktor_pengurang_sppt
+
\
self
.
payment
.
discount_pokok
self
.
invoice
.
faktor_pengurang_sppt
-=
self
.
payment
.
discount_pokok
Query
.
set_faktor_pengurang_sppt
(
self
,
-
self
.
payment
.
discount_pokok
)
def
not_null
(
invoice
):
...
...
sismiop/services/tangkota/__init__.py
View file @
891b22f
...
...
@@ -54,9 +54,6 @@ class Inquiry(BaseInquiry):
return
self
.
denda
def
hitung_discount_pokok
(
self
):
faktor_pengurang
=
self
.
invoice
.
faktor_pengurang_sppt
or
0
if
faktor_pengurang
>
0
:
return
0
if
self
.
invoice
.
thn_pajak_sppt
not
in
TAHUN_PAJAK_DISC_POKOK
:
return
0
if
self
.
tgl_bayar
.
year
not
in
PERIODE_DISC_POKOK
:
...
...
@@ -76,7 +73,7 @@ class Inquiry(BaseInquiry):
def
before_save
(
self
,
payment
):
# Override
payment
.
denda_sblm_diskon
=
self
.
denda_sblm_diskon
payment
.
discount_pokok
=
self
.
discount_pokok
self
.
set_faktor_pengurang_sppt
()
self
.
set_faktor_pengurang_sppt
(
payment
)
class
AvailableInvoice
(
BaseAvailableInvoice
):
...
...
sismiop/services/tangsel/__init__.py
View file @
891b22f
...
...
@@ -110,7 +110,7 @@ class Inquiry(BaseInquiry):
payment
.
jml_sppt_yg_dibayar
=
tagihan_netto
+
denda_netto
payment
.
denda_sppt
=
denda_netto
self
.
set_faktor_pengurang_sppt
()
self
.
set_faktor_pengurang_sppt
(
payment
)
class
Reversal
(
BaseReversal
):
...
...
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