Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-pad-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 3f15b2e0
authored
Aug 25, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
available_invoice.py tambah opsi --nominal-min dan --nominal-max
1 parent
17e1bdb9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
CHANGES.txt
opensipkd/pad/scripts/available_invoice.py
opensipkd/pad/services/default/__init__.py
CHANGES.txt
View file @
3f15b2e
0.2.2 2020-08-
04
0.2.2 2020-08-
25
----------------
----------------
- Tambah get_jenis_usaha()
- Tambah get_jenis_usaha()
- available_invoice.py tambah opsi --nominal-min dan --nominal-max
0.2.1 2020-07-24
0.2.1 2020-07-24
----------------
----------------
...
...
opensipkd/pad/scripts/available_invoice.py
View file @
3f15b2e
...
@@ -17,6 +17,8 @@ def get_option(argv):
...
@@ -17,6 +17,8 @@ def get_option(argv):
pars
.
add_argument
(
'--tahun'
,
type
=
int
)
pars
.
add_argument
(
'--tahun'
,
type
=
int
)
pars
.
add_argument
(
'--belum-jatuh-tempo'
,
action
=
'store_true'
)
pars
.
add_argument
(
'--belum-jatuh-tempo'
,
action
=
'store_true'
)
pars
.
add_argument
(
'--lewat-jatuh-tempo'
,
action
=
'store_true'
)
pars
.
add_argument
(
'--lewat-jatuh-tempo'
,
action
=
'store_true'
)
pars
.
add_argument
(
'--nominal-min'
,
type
=
int
)
pars
.
add_argument
(
'--nominal-max'
,
type
=
int
)
pars
.
add_argument
(
pars
.
add_argument
(
'--count'
,
type
=
int
,
default
=
default_count
,
help
=
help_count
)
'--count'
,
type
=
int
,
default
=
default_count
,
help
=
help_count
)
return
pars
.
parse_args
(
argv
)
return
pars
.
parse_args
(
argv
)
...
...
opensipkd/pad/services/default/__init__.py
View file @
3f15b2e
...
@@ -322,7 +322,7 @@ class AvailableInvoice:
...
@@ -322,7 +322,7 @@ class AvailableInvoice:
continue
continue
count
+=
1
count
+=
1
no
=
str
(
count
)
.
zfill
(
max_count_length
)
no
=
str
(
count
)
.
zfill
(
max_count_length
)
msg
=
'#{}/{} {}'
.
format
(
no
,
self
.
option
.
count
,
msg
)
msg
=
f
'#{no}/{self.option.count} {msg}'
print
(
msg
)
print
(
msg
)
if
count
==
self
.
option
.
count
:
if
count
==
self
.
option
.
count
:
break
break
...
@@ -363,6 +363,14 @@ class AvailableInvoice:
...
@@ -363,6 +363,14 @@ class AvailableInvoice:
if
self
.
option
.
jenis
:
if
self
.
option
.
jenis
:
pola
=
'
%
{}
%
'
.
format
(
self
.
option
.
jenis
)
pola
=
'
%
{}
%
'
.
format
(
self
.
option
.
jenis
)
q
=
q
.
filter
(
Usaha
.
usahanm
.
ilike
(
pola
))
q
=
q
.
filter
(
Usaha
.
usahanm
.
ilike
(
pola
))
if
self
.
option
.
nominal_min
:
q
=
q
.
filter
(
Invoice
.
pajak_terhutang
-
Invoice
.
bunga
>=
self
.
option
.
nominal_min
)
if
self
.
option
.
nominal_max
:
q
=
q
.
filter
(
Invoice
.
pajak_terhutang
-
Invoice
.
bunga
<=
self
.
option
.
nominal_max
)
return
q
return
q
def
get_message
(
self
,
row
):
def
get_message
(
self
,
row
):
...
...
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