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 a8bf1b39
authored
Aug 21, 2017
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
anggaran
1 parent
a0a1101a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
import-sipkd-anggaran.py
import-sipkd-anggaran.py
View file @
a8bf1b3
...
@@ -71,7 +71,7 @@ def validate_parent(departemen_kd, departemen_nm, rekening):
...
@@ -71,7 +71,7 @@ def validate_parent(departemen_kd, departemen_nm, rekening):
)
.
first
()
)
.
first
()
if
not
induk
:
if
not
induk
:
induk
=
EisAnggaran
()
induk
=
EisAnggaran
()
induk
.
tahun
=
tahun
induk
.
tahun
=
str
(
tahun
)
induk
.
kode
=
row
.
kode
induk
.
kode
=
row
.
kode
induk
.
departemen_kd
=
departemen_kd
induk
.
departemen_kd
=
departemen_kd
induk
.
level_id
=
row
.
kode
.
count
(
'.'
)
induk
.
level_id
=
row
.
kode
.
count
(
'.'
)
...
@@ -80,16 +80,16 @@ def validate_parent(departemen_kd, departemen_nm, rekening):
...
@@ -80,16 +80,16 @@ def validate_parent(departemen_kd, departemen_nm, rekening):
EisDBSession
.
flush
()
EisDBSession
.
flush
()
def
import_anggaran
():
def
import_anggaran
():
query
=
DBSession
.
query
(
Anggaran
)
.
filter_by
(
tahun
=
tahun
)
query
=
DBSession
.
query
(
Anggaran
)
.
filter_by
(
tahun
=
str
(
tahun
)
)
for
row
in
query
.
all
():
for
row
in
query
.
all
():
anggaran
=
EisDBSession
.
query
(
EisAnggaran
)
.
\
anggaran
=
EisDBSession
.
query
(
EisAnggaran
)
.
\
filter_by
(
tahun
=
row
.
tahun
,
filter_by
(
tahun
=
str
(
row
.
tahun
)
,
kode
=
row
.
kd_rekening
,
kode
=
row
.
kd_rekening
,
departemen_kd
=
row
.
kd_opd
,
departemen_kd
=
row
.
kd_opd
,
)
.
first
()
)
.
first
()
if
not
anggaran
:
if
not
anggaran
:
anggaran
=
EisAnggaran
()
anggaran
=
EisAnggaran
()
anggaran
.
tahun
=
row
.
tahun
anggaran
.
tahun
=
str
(
row
.
tahun
)
anggaran
.
kode
=
row
.
kd_rekening
anggaran
.
kode
=
row
.
kd_rekening
anggaran
.
departemen_kd
=
row
.
kd_opd
anggaran
.
departemen_kd
=
row
.
kd_opd
anggaran
.
level_id
=
row
.
kd_rekening
.
count
(
'.'
)
anggaran
.
level_id
=
row
.
kd_rekening
.
count
(
'.'
)
...
...
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