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 fa99ab0d
authored
Aug 24, 2017
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
rekening
1 parent
6d513d7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
import-sipkd.py
import-sipkd.py
View file @
fa99ab0
...
...
@@ -73,18 +73,18 @@ def validate_parent(tabel, departemen_kd, departemen_nm, rekening, tanggal):
continue
induk
=
EisDBSession
.
query
(
tabel
)
.
\
filter_by
(
tahun
=
str
(
row
.
tahun
),
kode
=
row
.
kode
,
departemen_kd
=
departemen_kd
,
kode
=
row
.
kode
.
strip
()
,
departemen_kd
=
departemen_kd
.
strip
()
,
)
.
first
()
if
not
induk
:
induk
=
tabel
()
induk
.
tahun
=
str
(
tahun
)
induk
.
kode
=
row
.
kode
induk
.
departemen_kd
=
departemen_kd
induk
.
kode
=
row
.
kode
.
strip
()
induk
.
departemen_kd
=
departemen_kd
.
strip
()
induk
.
tanggal
=
tanggal
induk
.
departemen_nm
=
departemen_nm
induk
.
departemen_nm
=
departemen_nm
.
strip
()
induk
.
level_id
=
row
.
kode
.
count
(
'.'
)
induk
.
nama
=
row
.
nama
induk
.
nama
=
row
.
nama
.
strip
()
EisDBSession
.
add
(
induk
)
EisDBSession
.
flush
()
...
...
@@ -97,19 +97,19 @@ def import_ap(all=False):
for
row
in
query
.
all
():
eis
=
EisDBSession
.
query
(
EisApPayment
)
.
\
filter_by
(
tahun
=
str
(
row
.
tahun
),
kode
=
row
.
kd_rekening
,
departemen_kd
=
row
.
kd_opd
,
kode
=
row
.
kd_rekening
.
strip
()
,
departemen_kd
=
row
.
kd_opd
.
strip
()
,
tanggal
=
row
.
tanggal
,
)
.
first
()
if
not
eis
:
eis
=
EisApPayment
()
eis
.
tahun
=
str
(
row
.
tahun
)
eis
.
kode
=
row
.
kd_rekening
eis
.
departemen_kd
=
row
.
kd_opd
eis
.
kode
=
row
.
kd_rekening
.
strip
()
eis
.
departemen_kd
=
row
.
kd_opd
.
strip
()
eis
.
tanggal
=
row
.
tanggal
eis
.
level_id
=
row
.
kd_rekening
.
count
(
'.'
)
eis
.
nama
=
row
.
nm_rekening
eis
.
departemen_nm
=
row
.
nm_opd
eis
.
nama
=
row
.
nm_rekening
.
strip
()
eis
.
departemen_nm
=
row
.
nm_opd
.
strip
()
eis
.
jumlah
=
row
.
realisasi
EisDBSession
.
add
(
eis
)
EisDBSession
.
flush
()
...
...
@@ -124,19 +124,19 @@ def import_by(all=False):
for
row
in
query
.
filter
(
Realisasi
.
kd_rekening
.
like
(
'6.
%
'
))
.
all
():
eis
=
EisDBSession
.
query
(
EisByPayment
)
.
\
filter_by
(
tahun
=
str
(
row
.
tahun
),
rekening_kd
=
row
.
kd_rekening
,
departemen_kd
=
row
.
kd_opd
,
rekening_kd
=
row
.
kd_rekening
.
strip
()
,
departemen_kd
=
row
.
kd_opd
.
strip
()
,
tanggal
=
tanggal
,
)
.
first
()
if
not
eis
:
eis
=
EisByPayment
()
eis
.
tahun
=
str
(
row
.
tahun
)
eis
.
kode
=
row
.
kd_rekening
eis
.
departemen_kd
=
row
.
kd_opd
eis
.
kode
=
row
.
kd_rekening
.
strip
()
eis
.
departemen_kd
=
row
.
kd_opd
.
strip
()
eis
.
tanggal
=
tanggal
eis
.
level_id
=
row
.
kd_rekening
.
count
(
'.'
)
eis
.
nama
=
row
.
nm_rekening
eis
.
departemen_nm
=
row
.
nm_opd
eis
.
nama
=
row
.
nm_rekening
.
strip
()
eis
.
departemen_nm
=
row
.
nm_opd
.
strip
()
eis
.
jumlah
=
row
.
realisai
EisDBSession
.
add
(
eis
)
EisDBSession
.
flush
()
...
...
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