Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Project
/
import-sipkd-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 545f22da
authored
Aug 22, 2017
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
anggaran
1 parent
a8bf1b39
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
import-sipkd-anggaran.py
import-sipkd-anggaran.py
View file @
545f22d
...
...
@@ -23,7 +23,7 @@ tahun = now.strftime('%Y')
def
calculate
():
rows
=
EisDBSession
.
query
(
EisAnggaran
)
.
filter_by
(
tahun
=
str
(
tahun
))
.
\
order_by
(
EisAnggaran
.
kode
.
desc
())
order_by
(
EisAnggaran
.
departemen_kd
,
EisAnggaran
.
kode
.
desc
())
old_level
=
0
levels
=
{}
murnis
=
{}
...
...
@@ -33,7 +33,7 @@ def calculate():
old_level
=
row
.
level_id
key
=
'a'
+
str
(
row
.
level_id
)
#
print(row.kode, row.level_id, old_level, key, row.murni)
print
(
row
.
kode
,
row
.
level_id
,
old_level
,
key
,
row
.
murni
)
#JIKA level sama dengan sebelumnya jumlahkan
if
row
.
level_id
==
old_level
:
if
not
key
in
murnis
:
...
...
@@ -99,7 +99,7 @@ def import_anggaran():
anggaran
.
perubahan
=
row
.
ang_perubahan
EisDBSession
.
add
(
anggaran
)
EisDBSession
.
flush
()
validate_parent
(
row
.
kd_opd
,
row
.
nm_opd
,
row
.
kd_rekening
)
validate_parent
(
row
.
kd_opd
.
strip
(),
row
.
nm_opd
.
strip
(),
row
.
kd_rekening
.
strip
()
)
EisDBSession
.
commit
()
import_anggaran
()
...
...
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