Commit 05f24fe2 by aagusti

Merge branch 'master' of https://git.opensipkd.com/taufik/esipkd

2 parents a260baca 67f9d846
......@@ -101,7 +101,8 @@ def set_invoice(request, data):
if not subjek:
return custom_error(-1,'Subjek Pajak id {} not found, contact admin'.format(values['subjek_pajak_id']))
values['wp_kode'] = subjek.kode
values['wp_nama'] = subjek.nama
values['wp_nama'] = 'wp_nama' in values and values['wp_nama'] and \
values['wp_nama'] or subjek.nama
values['wp_alamat_1'] = subjek.alamat_1
values['wp_alamat_2'] = subjek.alamat_2
unit = Unit.get_by_id(values['unit_id'])
......@@ -182,23 +183,15 @@ def get_payment(request, data):
rdata = []
for k in row_payment:
# if not k.ntp:
# k.ntp = ''
# else:
# k.ntb = k.ntp.strip()
# if not k.ntb:
# k.ntb = ''
# else:
# k.ntb = k.ntb.strip()
d = dict(
kd_bayar = data['kd_bayar'],
ntp = k.ntp,
ntp = hasattr(k,'ntp') and k.ntp and k.ntp.strip() or '',
pembayaran_ke = k.pembayaran_ke,
bunga = k.bunga,
bayar = k.bayar,
tgl_bayar = ymd(k.tgl_bayar),
jatuh_tempo = ymd(k.jatuh_tempo),
ntb = k.ntb,
ntb = hasattr(k,'ntb') and k.ntb and k.ntb.strip() or '',
bank_id = k.bank_id,
channel_id = k.channel_id,
)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!