Commit ab6acf1c by aagusti

gilang-020217

1 parent d1c5b406
Showing 77 changed files with 5260 additions and 155 deletions
File mode changed
......@@ -383,44 +383,6 @@ class ARInvoice(CommonModel, Base):
units = relationship("Unit", backref=backref('arinvoices'))
UniqueConstraint(tahun_id,unit_id,no_id,name='arinvoice_uq')
## Untuk Item Invoice di SPTPD ##
class InvoiceDet(CommonModel, Base):
__tablename__ = 'invoicedets'
id = Column(Integer, primary_key=True)
#-------------------------------Relasi--------------------------------------------------#
invoice_id = Column(Integer, ForeignKey("arinvoices.id"))
wilayah_id = Column(Integer, ForeignKey("wilayahs.id"))
subjek_pajak_id = Column(Integer, ForeignKey("subjekpajaks.id"))
objek_pajak_id = Column(Integer, ForeignKey("objekpajaks.id"))
produk_id = Column(Integer, ForeignKey("produks.id")) ## Jenis BBM ##
pajak_id = Column(Integer, ForeignKey("pajaks.id"))
peruntukan_id = Column(Integer, ForeignKey("peruntukans.id")) ## Peruntukan BBM ##
#---------------------------------------------------------------------------------------#
sektor_nm = Column(String(64)) ## Sektor Peruntukan BBM ##
wilayah_nm = Column(String(64))
nama = Column(String(64))
alamat = Column(String(255))
peruntukan_nm = Column(String(64))
produk_nm = Column(String(64))
#------------------------------Perhitungan----------------------------------------------#
volume = Column(BigInteger, default=0)
harga_jual = Column(BigInteger, default=0)
dpp = Column(BigInteger, default=0) ## Volume * Harga_jual ##
tarif = Column(Float , default=0) ## Dari pajak_id berupa persen ##
total_pajak = Column(BigInteger, default=0) ## dpp * tarif ##
#---------------------------------------------------------------------------------------#
keterangan = Column(String(255))
#status = Column(Integer, default=0) ## 0-> Tidak Aktif, 1-> Aktif ##
arinvoices = relationship("ARInvoice", backref=backref('invoicedets'))
subjekpajaks = relationship("SubjekPajak", backref=backref('invoicedets'))
objekpajaks = relationship("ObjekPajak", backref=backref('invoicedets'))
wilayahs = relationship("Wilayah", backref=backref('invoicedets'))
pajaks = relationship('Pajak', backref=backref('invoicedets'))
produks = relationship("Produk", backref=backref('invoicedets'))
peruntukans = relationship('Peruntukan', backref=backref('invoicedets'))
UniqueConstraint(subjek_pajak_id,objek_pajak_id,wilayah_id,pajak_id,name='inv_det_uq')
class ARSspd(CommonModel, Base):
__tablename__ = 'arsspds'
id = Column(Integer, primary_key=True)
......@@ -533,3 +495,78 @@ class ARTbp(CommonModel, Base):
wilayahs = relationship("Wilayah", backref=backref('artbp'))
units = relationship("Unit", backref=backref('artbp'))
UniqueConstraint(tahun_id,unit_id,no_id,name='artbp_uq')
class Sptpd(CommonModel, Base):
__tablename__ = 'sptpds'
id = Column(Integer, primary_key=True)
kode = Column(String(32), unique=True) #Tahun(2)-unit_kode(6)-no_id(8) 00.000.000
nama = Column(String(255))
tahun_id = Column(Integer)
unit_id = Column(Integer, ForeignKey("units.id"))
unit_kode = Column(String(32))
unit_nama = Column(String(255))
unit_alamat = Column(String(255))
no_id = Column(Integer)
subjek_pajak_id = Column(Integer, ForeignKey("subjekpajaks.id"))
wp_kode = Column(String(50))
wp_nama = Column(String(100))
wp_alamat_1 = Column(String(255))
wp_alamat_2 = Column(String(255))
rekening_id = Column(Integer, ForeignKey("rekenings.id"))
rek_kode = Column(String(16))
rek_nama = Column(String(64))
jumlah = Column(BigInteger)
periode_1 = Column(Date)
periode_2 = Column(Date)
tgl_sptpd = Column(Date)
status_invoice = Column(SmallInteger, nullable=False, default=0) # 0 belum dibuat invoice - 1 sudah dibuat - 2 batal
invoice_id = Column(Integer, nullable=True, default=0)
invoice_kode = Column(String(32))
create_uid = Column(Integer)
update_uid = Column(Integer)
create_date = Column(DateTime(timezone=True))
update_date = Column(DateTime(timezone=True))
subjekpajaks = relationship("SubjekPajak", backref=backref('sptpds'))
rekenings = relationship("Rekening", backref=backref('sptpds'))
units = relationship("Unit", backref=backref('sptpds'))
UniqueConstraint(tahun_id,unit_id,no_id,name='sptpd_uq')
## Untuk Item Invoice di SPTPD ##
class InvoiceDet(CommonModel, Base):
__tablename__ = 'invoicedets'
id = Column(Integer, primary_key=True)
#-------------------------------Relasi--------------------------------------------------#
sptpd_id = Column(Integer, ForeignKey("sptpds.id"))
sektor_id = Column(Integer, ForeignKey("sektors.id"))
produk_id = Column(Integer, ForeignKey("produks.id")) ## Jenis BBM ##
wilayah_id = Column(Integer, ForeignKey("wilayahs.id"))
peruntukan_id = Column(Integer, ForeignKey("peruntukans.id")) ## Peruntukan BBM ##
subjek_pajak_id = Column(Integer, ForeignKey("subjekpajaks.id"))
#pajak_id = Column(Integer, ForeignKey("pajaks.id"))
#objek_pajak_id = Column(Integer, ForeignKey("objekpajaks.id"))
#---------------------------------------------------------------------------------------#
sektor_nm = Column(String(64)) ## Sektor Peruntukan BBM ##
wilayah_nm = Column(String(64))
nama = Column(String(64))
alamat = Column(String(255))
peruntukan_nm = Column(String(64))
produk_nm = Column(String(64))
#------------------------------Perhitungan----------------------------------------------#
volume = Column(BigInteger, default=0)
harga_jual = Column(BigInteger, default=0)
dpp = Column(BigInteger, default=0) ## Volume * Harga_jual ##
tarif = Column(Float , default=0) ## Dari pajak_id berupa persen ##
total_pajak = Column(BigInteger, default=0) ## dpp * tarif ##
#---------------------------------------------------------------------------------------#
keterangan = Column(String(255))
#status = Column(Integer, default=0) ## 0-> Tidak Aktif, 1-> Aktif ##
sptpds = relationship("Sptpd", backref=backref('invoicedets'))
subjekpajaks = relationship("SubjekPajak", backref=backref('invoicedets'))
wilayahs = relationship("Wilayah", backref=backref('invoicedets'))
sektors = relationship("Sektor", backref=backref('invoicedets'))
produks = relationship("Produk", backref=backref('invoicedets'))
peruntukans = relationship('Peruntukan', backref=backref('invoicedets'))
#pajaks = relationship('Pajak', backref=backref('invoicedets'))
#objekpajaks = relationship("ObjekPajak", backref=backref('invoicedets'))
#UniqueConstraint(sptpd_id,subjek_pajak_id,sektor_id,wilayah_id,peruntukan_id,produk_id,name='inv_det_uq')
\ No newline at end of file
File mode changed
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">BADAN PENDAPATAN DAERAH</para>
......
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">Badan Pendapatan Daerah</para>
......
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
<document>
<template pagesize="29.7cm, 21cm" orientation="auto">
<pageTemplate id="main">
<!--pageGraphics>
<setFont name="Helvetica" size="10"/>
<drawString x="2cm" y="27.7cm">PT. Properindo Jasatama</drawString>
<drawRightString x="19cm" y="27.7cm">www.opensipkd.com</drawRightString>
</pageGraphics-->
<pageGraphics>
<lines> 20 520 825 520</lines>
<lineMode width="20"/>
<setFont name="Helvetica" size="10"/>
<drawString x="2cm" y="1.5cm">{waktu}</drawString>
<drawRightString x="27cm" y="1.5cm">Halaman <pageNumber/> / <getName id="last-page" default="1"/></drawRightString>
</pageGraphics>
<frame id="content" x1="2cm" y1="3.5cm" width="26cm" height="17cm"/>
</pageTemplate>
</template>
<stylesheet>
<paraStyle name="title1"
fontName="Helvetica-Bold"
fontSize="14"
spaceAfter="5"
alignment="CENTER"/>
<paraStyle name="title2"
fontName="Helvetica-Bold"
fontSize="12"
spaceAfter="5"
alignment="CENTER"/>
<paraStyle name="title3"
fontName="Helvetica-Bold"
fontSize="11"
spaceAfter="23"
alignment="CENTER"/>
<paraStyle name="title4"
fontName="Helvetica-Bold"
fontSize="11"
spaceAfter="6"
alignment="CENTER"/>
<paraStyle name="heading1"
fontName="Helvetica-Bold"
fontSize="12"
spaceAfter="8"
alignment="CENTER"/>
<paraStyle name="heading2"
fontName="Helvetica-Bold"
fontSize="10"
spaceAfter="5"
alignment="CENTER"/>
<paraStyle name="heading3"
fontName="Helvetica-Bold"
fontSize="10"
spaceAfter="10"
alignment="CENTER"/>
<paraStyle name="body"
fontName="Helvetica"
fontSize="12"
spaceAfter="10"/>
<blockTableStyle id="table">
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">BADAN PENDAPATAN DAERAH</para>
<para style="title3">Jl. Soekarno Hatta, No. 528, Bandung</para>
<para style="heading1">REGISTER NOMOR BAYAR</para>
<para style="heading3">Periode {awal} s.d {akhir}</para>
</imageAndFlowables>
<drawCenteredString x="2cm" y="1.5cm"></drawCenteredString>
<blockTable colWidths="4cm,4cm,4cm,5cm,2.5cm,3cm,5cm" style="table" repeatRows="1">
<tr>
<td><para style="heading2">No. Bayar</para></td>
<td><para style="heading2">Penyetor</para></td>
<td><para style="heading2">Objek</para></td>
<td><para style="heading2">Uraian</para></td>
<td><para style="heading2">Tgl. Tetap</para></td>
<td><para style="heading2">Jumlah</para></td>
<td><para style="heading2">OPD</para></td>
</tr>
{rows2}
</blockTable>
<namedString id="last-page"><pageNumber/></namedString>
</story>
</document>
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">Badan Pendapatan Daerah</para>
......
......@@ -68,7 +68,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
......@@ -68,7 +68,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">Badan Pendapatan Daerah</para>
......
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">BADAN PENDAPATAN DAERAH</para>
......
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">BADAN PENDAPATAN DAERAH</para>
......
......@@ -63,7 +63,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
......@@ -58,7 +58,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">BADAN PENDAPATAN DAERAH</para>
......
......@@ -58,7 +58,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
......@@ -58,7 +58,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
......@@ -10,8 +10,8 @@ from string import ascii_lowercase
from z3c.rml import rml2pdf
#rpt_path = "/home/opensid/domains/webr-devel.opensipkd.com/webr/webr/reports/"
rpt_path = "/home/web-r/e-sipkd/esipkd/reports/"
#rpt_path = "/home/aagusti/env/e-sipkd/esipkd/reports/"
#rpt_path = "/home/web-r/e-sipkd/esipkd/reports/"
rpt_path = "/home/aagusti/env/e-sipkd/esipkd/reports/"
import pkg_resources
print pkg_resources.resource_filename('os.path', 'reports')
......
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="sptpd_rincian" pageWidth="612" pageHeight="1008" columnWidth="512" leftMargin="50" rightMargin="50" topMargin="28" bottomMargin="20">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
<property name="ireport.zoom" value="1.24184264611831"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="129"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<queryString language="xPath">
<![CDATA[/webr/sptpd]]>
</queryString>
<field name="logo" class="java.lang.String">
<fieldDescription><![CDATA[logo]]></fieldDescription>
</field>
<field name="id" class="java.lang.String">
<fieldDescription><![CDATA[id]]></fieldDescription>
</field>
<field name="kode" class="java.lang.String">
<fieldDescription><![CDATA[kode]]></fieldDescription>
</field>
<field name="nama" class="java.lang.String">
<fieldDescription><![CDATA[nama]]></fieldDescription>
</field>
<field name="sektor_nm" class="java.lang.String">
<fieldDescription><![CDATA[sektor_nm]]></fieldDescription>
</field>
<field name="tgl_sptpd" class="java.lang.String">
<fieldDescription><![CDATA[tgl_sptpd]]></fieldDescription>
</field>
<field name="periode_1" class="java.lang.String">
<fieldDescription><![CDATA[periode_1]]></fieldDescription>
</field>
<field name="wilayah_nm" class="java.lang.String">
<fieldDescription><![CDATA[wilayah_nm]]></fieldDescription>
</field>
<field name="peruntukan_nm" class="java.lang.String">
<fieldDescription><![CDATA[peruntukan_nm]]></fieldDescription>
</field>
<field name="produk_nm" class="java.lang.String">
<fieldDescription><![CDATA[produk_nm]]></fieldDescription>
</field>
<field name="volume" class="java.lang.String">
<fieldDescription><![CDATA[volume]]></fieldDescription>
</field>
<field name="dpp" class="java.lang.String">
<fieldDescription><![CDATA[dpp]]></fieldDescription>
</field>
<field name="tarif" class="java.lang.String">
<fieldDescription><![CDATA[tarif]]></fieldDescription>
</field>
<field name="total_pajak" class="java.lang.String">
<fieldDescription><![CDATA[total_pajak]]></fieldDescription>
</field>
<field name="periode_2" class="java.lang.String">
<fieldDescription><![CDATA[periode_2]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="213" splitType="Stretch">
<staticText>
<reportElement x="0" y="188" width="512" height="25"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="0" y="105" width="512" height="73"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="0" y="62" width="512" height="37"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[S P T P D
(SURAT PEMBERITAHUAN PAJAK DAERAH)
PAJAK BAHAN BAKAR KENDARAAN BERMOTOR]]></text>
</staticText>
<image>
<reportElement x="0" y="1" width="55" height="53"/>
<imageExpression><![CDATA[$F{logo}]]></imageExpression>
</image>
<staticText>
<reportElement x="0" y="58" width="512" height="5"/>
<box>
<topPen lineWidth="0.25"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="60" y="11" width="198" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[PEMERINTAH PROVINSI JAWA BARAT]]></text>
</staticText>
<staticText>
<reportElement x="140" y="113" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="9" y="113" width="131" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[NAMA WAJIP PUNGUT]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="145" y="113" width="357" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="145" y="128" width="357" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="9" y="128" width="131" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[ALAMAT]]></text>
</staticText>
<staticText>
<reportElement x="140" y="128" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="140" y="143" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="9" y="143" width="131" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[NPWPD]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="145" y="143" width="357" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="25" width="198" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["BADAN PENDAPATAN DAERAH"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="39" width="198" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Jl. Soekarno Hatta No. 528 Bandung"]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="298" y="11" width="122" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[NO. SPTPD]]></text>
</staticText>
<staticText>
<reportElement x="298" y="25" width="122" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[MASA PAJAK]]></text>
</staticText>
<staticText>
<reportElement x="298" y="39" width="122" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[TAHUN PAJAK]]></text>
</staticText>
<staticText>
<reportElement x="9" y="158" width="131" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[MASA PAJAK]]></text>
</staticText>
<staticText>
<reportElement x="140" y="158" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="145" y="158" width="357" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{periode_1}.substring(8,10)+"-"+$F{periode_1}.substring(5,7)+"-"+$F{periode_1}.substring(0,4)+" s.d "+$F{periode_1}.substring(8,10)+"-"+$F{periode_2}.substring(5,7)+"-"+$F{periode_2}.substring(0,4)]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="420" y="11" width="6" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="420" y="25" width="6" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="420" y="39" width="6" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<textField>
<reportElement x="426" y="11" width="72" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["......../X/XXX"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="426" y="26" width="72" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["MM"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="426" y="39" width="72" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["YYYY"]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="9" y="191" width="493" height="22"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[I. PEMUNGUTAN PBBKB KEPADA SEKTOR TRANSPORTASI & KONTRAKTOR JALAN:
TARIF PBBKB 5%]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="15" splitType="Stretch">
<staticText>
<reportElement x="204" y="0" width="108" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[VOLUME (LT)]]></text>
</staticText>
<staticText>
<reportElement x="27" y="0" width="177" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[NAMA PRODUK]]></text>
</staticText>
<staticText>
<reportElement x="312" y="0" width="95" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[DPP (RUPIAH)]]></text>
</staticText>
<staticText>
<reportElement x="407" y="0" width="95" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[PBBKB (RUPIAH)]]></text>
</staticText>
<staticText>
<reportElement x="9" y="0" width="18" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[NO]]></text>
</staticText>
<staticText>
<reportElement x="0" y="0" width="512" height="15"/>
<box>
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="12" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="512" height="12"/>
<box>
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="27" y="0" width="177" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{wilayah_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="204" y="0" width="108" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{produk_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="312" y="0" width="95" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="9" y="0" width="18" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$V{COLUMN_NUMBER}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="407" y="0" width="95" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="19" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="151" splitType="Stretch">
<textField>
<reportElement x="0" y="1" width="512" height="12"/>
<textElement textAlignment="Center" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="0" width="512" height="1"/>
<graphicElement>
<pen lineWidth="0.25"/>
</graphicElement>
</line>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="204" y="0" width="108" height="13"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="9" y="0" width="195" height="13"/>
<box>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[JUMLAH PEMUNGUTAN PBBKBBKB ( I + II + III + IV)]]></text>
</staticText>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="312" y="1" width="95" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="407" y="1" width="95" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="9" y="35" width="493" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[DEMIKIAN LAPORAN SPTPD BESERTA LAMPIRAN, KAMI SAMPAIKAN DENGAN BENDAHARA, LENGKAP DAN JELAS.]]></text>
</staticText>
<staticText>
<reportElement x="341" y="64" width="161" height="73"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[BANDUNG, DD-MM-YYYY
PT. XXXXX
XXXXXXX]]></text>
</staticText>
</band>
</summary>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="sptpd_rincian" pageWidth="612" pageHeight="1008" columnWidth="512" leftMargin="50" rightMargin="50" topMargin="28" bottomMargin="20">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
<property name="ireport.zoom" value="1.24184264611831"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="95"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<queryString language="xPath">
<![CDATA[/webr/sptpd_sspd]]>
</queryString>
<field name="logo" class="java.lang.String">
<fieldDescription><![CDATA[logo]]></fieldDescription>
</field>
<field name="id" class="java.lang.String">
<fieldDescription><![CDATA[id]]></fieldDescription>
</field>
<field name="kode" class="java.lang.String">
<fieldDescription><![CDATA[kode]]></fieldDescription>
</field>
<field name="nama" class="java.lang.String">
<fieldDescription><![CDATA[nama]]></fieldDescription>
</field>
<field name="sektor_nm" class="java.lang.String">
<fieldDescription><![CDATA[sektor_nm]]></fieldDescription>
</field>
<field name="tgl_sptpd" class="java.lang.String">
<fieldDescription><![CDATA[tgl_sptpd]]></fieldDescription>
</field>
<field name="periode_1" class="java.lang.String">
<fieldDescription><![CDATA[periode_1]]></fieldDescription>
</field>
<field name="periode_2" class="java.lang.String">
<fieldDescription><![CDATA[periode_2]]></fieldDescription>
</field>
<field name="wilayah_nm" class="java.lang.String">
<fieldDescription><![CDATA[wilayah_nm]]></fieldDescription>
</field>
<field name="peruntukan_nm" class="java.lang.String">
<fieldDescription><![CDATA[peruntukan_nm]]></fieldDescription>
</field>
<field name="produk_nm" class="java.lang.String">
<fieldDescription><![CDATA[produk_nm]]></fieldDescription>
</field>
<field name="volume" class="java.lang.String">
<fieldDescription><![CDATA[volume]]></fieldDescription>
</field>
<field name="dpp" class="java.lang.String">
<fieldDescription><![CDATA[dpp]]></fieldDescription>
</field>
<field name="tarif" class="java.lang.String">
<fieldDescription><![CDATA[tarif]]></fieldDescription>
</field>
<field name="total_pajak" class="java.lang.String">
<fieldDescription><![CDATA[total_pajak]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="213" splitType="Stretch">
<staticText>
<reportElement x="0" y="188" width="512" height="25"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="0" y="105" width="512" height="73"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="0" y="62" width="512" height="37"/>
<box>
<pen lineWidth="0.25"/>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[S P T P D
(SURAT PEMBERITAHUAN PAJAK DAERAH)
PAJAK BAHAN BAKAR KENDARAAN BERMOTOR]]></text>
</staticText>
<image>
<reportElement x="0" y="1" width="55" height="53"/>
<imageExpression><![CDATA[$F{logo}]]></imageExpression>
</image>
<staticText>
<reportElement x="0" y="58" width="512" height="5"/>
<box>
<topPen lineWidth="0.25"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="60" y="11" width="198" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[PEMERINTAH PROVINSI JAWA BARAT]]></text>
</staticText>
<staticText>
<reportElement x="140" y="113" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="9" y="113" width="131" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[NAMA WAJIP PUNGUT]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="145" y="113" width="357" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="145" y="128" width="357" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="9" y="128" width="131" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[ALAMAT]]></text>
</staticText>
<staticText>
<reportElement x="140" y="128" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="140" y="143" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="9" y="143" width="131" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[NPWPD]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="145" y="143" width="357" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="25" width="198" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["BADAN PENDAPATAN DAERAH"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="39" width="198" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Jl. Soekarno Hatta No. 528 Bandung"]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="275" y="11" width="227" height="43"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[LAMPIRAN SURAT PEMBERITAHUAN PAJAK DAERAH
PAJAK BAHAN BAKAR KENDARAAN BERMOTOR
LAMPIRAN (SPTPD PBBKB)]]></text>
</staticText>
<staticText>
<reportElement x="9" y="158" width="131" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[MASA PAJAK]]></text>
</staticText>
<staticText>
<reportElement x="140" y="158" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="145" y="158" width="357" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{periode_1}.substring(8,10)+"-"+$F{periode_1}.substring(5,7)+"-"+$F{periode_1}.substring(0,4)+" s.d "+$F{periode_1}.substring(8,10)+"-"+$F{periode_2}.substring(5,7)+"-"+$F{periode_2}.substring(0,4)]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="19" y="191" width="475" height="22"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[I. PEMUNGUTAN PBBKB KEPADA SEKTOR TRANSPORTASI & KONTRAKTOR JALAN:
TARIF PBBKB 5%]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="15" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="512" height="15"/>
<box>
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="196" y="0" width="90" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[VOLUME (LT)]]></text>
</staticText>
<staticText>
<reportElement x="286" y="0" width="77" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[DPP (RUPIAH)]]></text>
</staticText>
<staticText>
<reportElement x="363" y="0" width="54" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[TARIF]]></text>
</staticText>
<staticText>
<reportElement x="19" y="0" width="18" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[NO]]></text>
</staticText>
<staticText>
<reportElement x="417" y="0" width="77" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[PBBKB (RUPIAH)]]></text>
</staticText>
<staticText>
<reportElement x="37" y="0" width="159" height="15"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[NAMA PRODUK]]></text>
</staticText>
<staticText>
<reportElement x="0" y="0" width="512" height="15"/>
<box>
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="12" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="512" height="12"/>
<box>
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="37" y="0" width="159" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{wilayah_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="196" y="0" width="90" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{produk_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="286" y="0" width="77" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="19" y="0" width="18" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$V{COLUMN_NUMBER}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="417" y="0" width="77" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="20" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="151" splitType="Stretch">
<staticText>
<reportElement x="0" y="1" width="512" height="12"/>
<box>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" markup="none">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<line>
<reportElement x="0" y="0" width="512" height="1"/>
<graphicElement>
<pen lineWidth="0.25"/>
</graphicElement>
</line>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="196" y="0" width="90" height="13"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="19" y="0" width="177" height="13"/>
<box>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[JUMLAH PEMUNGUTAN PBBKBBKB ( I + II + III + IV)]]></text>
</staticText>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="286" y="1" width="77" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="417" y="1" width="77" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="9" y="35" width="493" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[DEMIKIAN LAPORAN SPTPD BESERTA LAMPIRAN, KAMI SAMPAIKAN DENGAN BENDAHARA, LENGKAP DAN JELAS.]]></text>
</staticText>
<staticText>
<reportElement x="341" y="64" width="161" height="73"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[BANDUNG, DD-MM-YYYY
PT. XXXXX
XXXXXXX]]></text>
</staticText>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="363" y="1" width="54" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
</band>
</summary>
</jasperReport>
No preview for this file type
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="sptpd_rincian" pageWidth="612" pageHeight="1008" columnWidth="512" leftMargin="50" rightMargin="50" topMargin="28" bottomMargin="20">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="19"/>
<property name="ireport.y" value="0"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<queryString language="xPath">
<![CDATA[/webr/sptpd_rincian]]>
</queryString>
<field name="logo" class="java.lang.String">
<fieldDescription><![CDATA[logo]]></fieldDescription>
</field>
<field name="id" class="java.lang.String">
<fieldDescription><![CDATA[id]]></fieldDescription>
</field>
<field name="kode" class="java.lang.String">
<fieldDescription><![CDATA[kode]]></fieldDescription>
</field>
<field name="nama" class="java.lang.String">
<fieldDescription><![CDATA[nama]]></fieldDescription>
</field>
<field name="sektor_nm" class="java.lang.String">
<fieldDescription><![CDATA[sektor_nm]]></fieldDescription>
</field>
<field name="tgl_sptpd" class="java.lang.String">
<fieldDescription><![CDATA[tgl_sptpd]]></fieldDescription>
</field>
<field name="periode_1" class="java.lang.String">
<fieldDescription><![CDATA[periode_1]]></fieldDescription>
</field>
<field name="wilayah_nm" class="java.lang.String">
<fieldDescription><![CDATA[wilayah_nm]]></fieldDescription>
</field>
<field name="peruntukan_nm" class="java.lang.String">
<fieldDescription><![CDATA[peruntukan_nm]]></fieldDescription>
</field>
<field name="produk_nm" class="java.lang.String">
<fieldDescription><![CDATA[produk_nm]]></fieldDescription>
</field>
<field name="volume" class="java.lang.String">
<fieldDescription><![CDATA[volume]]></fieldDescription>
</field>
<field name="dpp" class="java.lang.String">
<fieldDescription><![CDATA[dpp]]></fieldDescription>
</field>
<field name="tarif" class="java.lang.String">
<fieldDescription><![CDATA[tarif]]></fieldDescription>
</field>
<field name="total_pajak" class="java.lang.String">
<fieldDescription><![CDATA[total_pajak]]></fieldDescription>
</field>
<field name="periode_2" class="java.lang.String">
<fieldDescription><![CDATA[periode_2]]></fieldDescription>
</field>
<variable name="jum_sektor_vol" class="java.lang.Double" resetType="Group" resetGroup="sektor" calculation="Sum">
<variableExpression><![CDATA[Double.valueOf($F{volume})]]></variableExpression>
</variable>
<variable name="jum_sektor_dpp" class="java.lang.Double" resetType="Group" resetGroup="sektor" calculation="Sum">
<variableExpression><![CDATA[Double.valueOf($F{dpp})]]></variableExpression>
</variable>
<variable name="jum_sektor_total" class="java.lang.Double" resetType="Group" resetGroup="sektor" calculation="Sum">
<variableExpression><![CDATA[Double.valueOf($F{total_pajak})]]></variableExpression>
</variable>
<group name="sektor" isStartNewPage="true" keepTogether="true">
<groupExpression><![CDATA[$F{sektor_nm}]]></groupExpression>
<groupHeader>
<band height="40">
<textField isBlankWhenNull="true">
<reportElement x="35" y="0" width="477" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{sektor_nm}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="18" y="15" width="86" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[KABUPATEN / KOTA]]></text>
</staticText>
<staticText>
<reportElement x="0" y="15" width="18" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[NO]]></text>
</staticText>
<staticText>
<reportElement x="104" y="15" width="117" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[PERUSAHAAN/CUSTOMER/PENGGUNA AKHIR]]></text>
</staticText>
<staticText>
<reportElement x="221" y="15" width="71" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[DIGUNAKAN SENDIRI / PENGGUNA AKHIR / DIJUAL KEMBALI]]></text>
</staticText>
<staticText>
<reportElement x="292" y="15" width="44" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[JENIS BBM]]></text>
</staticText>
<staticText>
<reportElement x="336" y="15" width="44" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[VOLUME BBM (LITER)]]></text>
</staticText>
<staticText>
<reportElement x="380" y="15" width="44" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[DPP (RUPIAH)]]></text>
</staticText>
<staticText>
<reportElement x="424" y="15" width="44" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[TARIF]]></text>
</staticText>
<staticText>
<reportElement x="468" y="15" width="44" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[TOTAL]]></text>
</staticText>
<staticText>
<reportElement x="0" y="0" width="35" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[SEKTOR :]]></text>
</staticText>
</band>
</groupHeader>
<groupFooter>
<band height="17">
<staticText>
<reportElement x="0" y="0" width="336" height="13"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[TOTAL]]></text>
</staticText>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="336" y="1" width="44" height="12"/>
<box leftPadding="0" rightPadding="1">
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[NumberFormat.getInstance().getNumberInstance(Locale.ITALIAN).format($V{jum_sektor_vol})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="380" y="0" width="44" height="13"/>
<box leftPadding="0" rightPadding="1">
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[NumberFormat.getInstance().getNumberInstance(Locale.ITALIAN).format($V{jum_sektor_dpp})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="424" y="0" width="44" height="13"/>
<box leftPadding="0" rightPadding="1">
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="468" y="0" width="44" height="13"/>
<box leftPadding="0" rightPadding="1">
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[NumberFormat.getInstance().getNumberInstance(Locale.ITALIAN).format($V{jum_sektor_total})]]></textFieldExpression>
</textField>
</band>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="110" splitType="Stretch">
<staticText>
<reportElement x="60" y="62" width="452" height="15"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<text><![CDATA[REKAPITULASI PENJUALAN]]></text>
</staticText>
<image>
<reportElement x="0" y="1" width="55" height="53"/>
<imageExpression><![CDATA[$F{logo}]]></imageExpression>
</image>
<staticText>
<reportElement x="0" y="58" width="512" height="5"/>
<box>
<topPen lineWidth="0.25"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="60" y="11" width="452" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[PEMERINTAH PROVINSI JAWA BARAT]]></text>
</staticText>
<staticText>
<reportElement x="104" y="79" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="79" width="104" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[PEYEDIA / PENYALUR / WAPU]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="109" y="79" width="403" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{nama}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="104" y="92" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="92" width="104" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[PERIODE BULAN]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="109" y="92" width="49" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{periode_1}.substring(8,10)+"-"+$F{periode_1}.substring(5,7)+"-"+$F{periode_1}.substring(0,4)]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="25" width="452" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["BADAN PENDAPATAN DAERAH"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="39" width="452" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Jl. Soekarno Hatta No. 528 Bandung"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="160" y="92" width="49" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{periode_2}.substring(8,10)+"-"+$F{periode_2}.substring(5,7)+"-"+$F{periode_2}.substring(0,4)]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="12">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="18" y="0" width="86" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{wilayah_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="104" y="0" width="117" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{produk_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="221" y="0" width="71" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{peruntukan_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="18" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[String.valueOf($V{sektor_COUNT})]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="292" y="0" width="44" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{produk_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="336" y="0" width="44" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[NumberFormat.getInstance().getNumberInstance(Locale.ITALIAN).format(Double.valueOf($F{volume}))]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="380" y="0" width="44" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[NumberFormat.getInstance().getNumberInstance(Locale.ITALIAN).format(Double.valueOf($F{dpp}))]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="424" y="0" width="44" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{tarif}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="468" y="0" width="44" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[NumberFormat.getInstance().getNumberInstance(Locale.ITALIAN).format(Double.valueOf($F{total_pajak}))]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="19" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="21" splitType="Stretch">
<line>
<reportElement x="0" y="0" width="512" height="1"/>
<graphicElement>
<pen lineWidth="0.25"/>
</graphicElement>
</line>
</band>
</summary>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="sptpd_sspd" pageWidth="612" pageHeight="1008" columnWidth="512" leftMargin="50" rightMargin="50" topMargin="28" bottomMargin="20">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="84"/>
<property name="ireport.y" value="24"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<queryString language="xPath">
<![CDATA[/webr/sptpd_sspd]]>
</queryString>
<field name="logo" class="java.lang.String">
<fieldDescription><![CDATA[logo]]></fieldDescription>
</field>
<field name="id" class="java.lang.String">
<fieldDescription><![CDATA[id]]></fieldDescription>
</field>
<field name="kode" class="java.lang.String">
<fieldDescription><![CDATA[kode]]></fieldDescription>
</field>
<field name="nama" class="java.lang.String">
<fieldDescription><![CDATA[nama]]></fieldDescription>
</field>
<field name="sektor_nm" class="java.lang.String">
<fieldDescription><![CDATA[sektor_nm]]></fieldDescription>
</field>
<field name="tgl_sptpd" class="java.lang.String">
<fieldDescription><![CDATA[tgl_sptpd]]></fieldDescription>
</field>
<field name="periode_1" class="java.lang.String">
<fieldDescription><![CDATA[periode_1]]></fieldDescription>
</field>
<field name="wilayah_nm" class="java.lang.String">
<fieldDescription><![CDATA[wilayah_nm]]></fieldDescription>
</field>
<field name="peruntukan_nm" class="java.lang.String">
<fieldDescription><![CDATA[peruntukan_nm]]></fieldDescription>
</field>
<field name="produk_nm" class="java.lang.String">
<fieldDescription><![CDATA[produk_nm]]></fieldDescription>
</field>
<field name="volume" class="java.lang.String">
<fieldDescription><![CDATA[volume]]></fieldDescription>
</field>
<field name="dpp" class="java.lang.String">
<fieldDescription><![CDATA[dpp]]></fieldDescription>
</field>
<field name="tarif" class="java.lang.String">
<fieldDescription><![CDATA[tarif]]></fieldDescription>
</field>
<field name="total_pajak" class="java.lang.String">
<fieldDescription><![CDATA[total_pajak]]></fieldDescription>
</field>
<field name="alamat_1" class="java.lang.String">
<fieldDescription><![CDATA[alamat_1]]></fieldDescription>
</field>
<field name="periode_2" class="java.lang.String">
<fieldDescription><![CDATA[periode_2]]></fieldDescription>
</field>
<variable name="jum_set_pjk" class="java.lang.Double" calculation="Sum">
<variableExpression><![CDATA[Double.valueOf($F{total_pajak})]]></variableExpression>
</variable>
<variable name="jml_pajak" class="java.lang.Double" calculation="Sum">
<variableExpression><![CDATA[Double.valueOf($F{total_pajak})]]></variableExpression>
</variable>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="186" splitType="Stretch">
<image>
<reportElement x="0" y="1" width="55" height="53"/>
<imageExpression><![CDATA[$F{logo}]]></imageExpression>
</image>
<staticText>
<reportElement x="0" y="58" width="512" height="5"/>
<box>
<topPen lineWidth="0.25"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[]]></text>
</staticText>
<staticText>
<reportElement x="60" y="11" width="196" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[PEMERINTAH PROVINSI JAWA BARAT]]></text>
</staticText>
<staticText>
<reportElement x="99" y="87" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="87" width="99" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[NAMA]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="104" y="87" width="408" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{nama}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="104" y="102" width="408" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{alamat_1}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="102" width="99" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[ALAMAT]]></text>
</staticText>
<staticText>
<reportElement x="99" y="102" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="99" y="117" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="117" width="99" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[NPWPD]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="104" y="117" width="408" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{kode}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="25" width="196" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["BADAN PENDAPATAN DAERAH"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="39" width="196" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Jl. Soekarno Hatta, No. 528 Bandung"]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="256" y="11" width="254" height="29"/>
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
<font size="10" isBold="true"/>
</textElement>
<text><![CDATA[SSPD
(SURAT SETORAN PAJAK DAERAH)]]></text>
</staticText>
<staticText>
<reportElement x="0" y="132" width="99" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[MENYETOR BERDASARKAN]]></text>
</staticText>
<staticText>
<reportElement x="99" y="132" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="99" y="147" width="111" height="35"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="false"/>
</textElement>
<text><![CDATA[1. SPTPD
2. SK. PEMBETULAN
3. SK. KEBERATAN
4. LAIN-LAIN]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="27" y="67" width="441" height="15"/>
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
<font size="8" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{periode_1}.substring(8,10)+"-"+$F{periode_1}.substring(5,7)+"-"+$F{periode_1}.substring(0,4) +" s.d "+$F{periode_2}.substring(8,10)+"-"+$F{periode_2}.substring(5,7)+"-"+$F{periode_2}.substring(0,4)]]></textFieldExpression>
</textField>
<textField>
<reportElement x="256" y="40" width="254" height="14"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["TAHUN :" +$F{tgl_sptpd}.substring(0,4)]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="24" splitType="Stretch">
<staticText>
<reportElement x="132" y="0" width="246" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[JENIS PAJAK (PBB-KB)]]></text>
</staticText>
<staticText>
<reportElement x="53" y="0" width="79" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[AYAT]]></text>
</staticText>
<staticText>
<reportElement x="0" y="0" width="53" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[NOMOR]]></text>
</staticText>
<staticText>
<reportElement x="378" y="0" width="134" height="24"/>
<box>
<topPen lineWidth="0.25"/>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[JUMLAH]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="12" splitType="Stretch">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="53" y="0" width="79" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{wilayah_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="132" y="0" width="246" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{produk_nm}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="378" y="0" width="134" height="12"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[NumberFormat.getInstance().getNumberInstance(Locale.ITALIAN).format(Double.valueOf($F{total_pajak}))]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="53" height="12"/>
<box leftPadding="2">
<leftPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[String.valueOf($V{REPORT_COUNT})]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="19" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="115" splitType="Stretch">
<line>
<reportElement x="0" y="0" width="512" height="1"/>
<graphicElement>
<pen lineWidth="0.25"/>
</graphicElement>
</line>
<staticText>
<reportElement x="132" y="0" width="246" height="13"/>
<box>
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[JUMLAH SETORAN PAJAK]]></text>
</staticText>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="378" y="0" width="134" height="13"/>
<box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/>
<bottomPen lineWidth="0.25"/>
<rightPen lineWidth="0.25"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[NumberFormat.getInstance().getNumberInstance(Locale.ITALIAN).format($V{jml_pajak})]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="53" y="23" width="459" height="25"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[DENGAN HURUF :]]></text>
</staticText>
<staticText>
<reportElement x="0" y="48" width="132" height="67"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[RUANG UNTUK TERAAN KAS REGISTER / TANDA TANGAN PETUGAS PENERIMA]]></text>
</staticText>
<staticText>
<reportElement x="132" y="48" width="246" height="67"/>
<textElement verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[DITERIMA OLEH
PETUGAS TEMPAT PEMBAYARAN
TANGGAL
TANDA TERIMA
NAMA TERANG]]></text>
</staticText>
<staticText>
<reportElement x="378" y="48" width="134" height="67"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[BANDUNG, DD-MM-YYY
PENYETOR
XXXXXXX]]></text>
</staticText>
</band>
</summary>
</jasperReport>
......@@ -58,7 +58,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">BADAN PENDAPATAN DAERAH</para>
......
......@@ -58,7 +58,7 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
......
......@@ -9,6 +9,8 @@
<drawRightString x="19cm" y="27.7cm">www.opensipkd.com</drawRightString>
</pageGraphics-->
<pageGraphics>
<lines> 20 520 825 520</lines>
<lineMode width="20"/>
<setFont name="Helvetica" size="10"/>
<drawString x="2cm" y="1.5cm">{waktu}</drawString>
<drawRightString x="27.6cm" y="1.5cm">Halaman <pageNumber/> / <getName id="last-page" default="1"/></drawRightString>
......@@ -30,7 +32,7 @@
<paraStyle name="title3"
fontName="Helvetica-Bold"
fontSize="11"
spaceAfter="1"
spaceAfter="25"
alignment="CENTER"/>
<paraStyle name="title4"
fontName="Helvetica-Bold"
......@@ -56,13 +58,12 @@
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="e-sipkd/esipkd/static/img/logo-pemda-small.png"
imageWidth="76" imageHeight="76" imageSide="left">
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">BADAN PENDAPATAN DAERAH</para>
<para style="title3">Jl. Soekarno Hatta, No. 528, Bandung</para>
<para style="title4">_________________________________________________________________________________________________</para>
<para style="heading1">DAFTAR WAJIB PAJAK</para>
<para style="heading1">DAFTAR WAJIB PUNGUT</para>
</imageAndFlowables>
<drawCenteredString x="2cm" y="1.5cm"></drawCenteredString>
<blockTable colWidths="3.1cm,3.5cm,5cm,2.7cm,2.7cm,3.3cm,3.5cm,4.3cm" style="table" repeatRows="1">
......
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
<document>
<template pagesize="29.7cm, 21cm" orientation="auto">
<pageTemplate id="main">
<!--pageGraphics>
<setFont name="Helvetica" size="10"/>
<drawString x="2cm" y="27.7cm">PT. Properindo Jasatama</drawString>
<drawRightString x="19cm" y="27.7cm">www.opensipkd.com</drawRightString>
</pageGraphics-->
<pageGraphics>
<lines> 20 520 825 520</lines>
<lineMode width="20"/>
<setFont name="Helvetica" size="10"/>
<drawString x="2cm" y="1.5cm">{waktu}</drawString>
<drawRightString x="27.6cm" y="1.5cm">Halaman <pageNumber/> / <getName id="last-page" default="1"/></drawRightString>
</pageGraphics>
<frame id="content" x1="2cm" y1="3.5cm" width="26cm" height="17cm"/>
</pageTemplate>
</template>
<stylesheet>
<paraStyle name="title1"
fontName="Helvetica-Bold"
fontSize="14"
spaceAfter="5"
alignment="CENTER"/>
<paraStyle name="title2"
fontName="Helvetica-Bold"
fontSize="12"
spaceAfter="5"
alignment="CENTER"/>
<paraStyle name="title3"
fontName="Helvetica-Bold"
fontSize="11"
spaceAfter="23"
alignment="CENTER"/>
<paraStyle name="title4"
fontName="Helvetica-Bold"
fontSize="11"
spaceAfter="6"
alignment="CENTER"/>
<paraStyle name="heading1"
fontName="Helvetica-Bold"
fontSize="12"
spaceAfter="7"
alignment="CENTER"/>
<paraStyle name="heading2"
fontName="Helvetica"
fontSize="9"
spaceAfter="5"
alignment="CENTER"/>
<paraStyle name="body"
fontName="Helvetica"
fontSize="12"
spaceAfter="10"/>
<blockTableStyle id="table">
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
</stylesheet>
<story>
<imageAndFlowables imageName="esipkd/static/img/logo-pemda-small.png"
imageWidth="60" imageHeight="60" imageSide="left">
<para style="title1">PEMERINTAH PROVINSI JAWA BARAT</para>
<para style="title2">{un_nm}</para>
<para style="title3">{un_al}</para>
<para style="heading1">DAFTAR WAJIB PUNGUT</para>
</imageAndFlowables>
<drawCenteredString x="2cm" y="1.5cm"></drawCenteredString>
<blockTable colWidths="3.1cm,3.5cm,5cm,2.7cm,2.7cm,3.3cm,3.5cm,4.3cm" style="table" repeatRows="1">
<tr>
<td><para style="heading2">NPWPD</para></td>
<td><para style="heading2">Nama</para></td>
<td><para style="heading2">Alamat</para></td>
<td><para style="heading2">Kelurahan</para></td>
<td><para style="heading2">Kecamatan</para></td>
<td><para style="heading2">Kabupaten/Kota</para></td>
<td><para style="heading2">E-mail</para></td>
<td><para style="heading2">OPD</para></td>
</tr>
{rows2}
</blockTable>
<namedString id="last-page"><pageNumber/></namedString>
</story>
</document>
File mode changed
id,kode,nama,status
1,"001","Digunakan Sendiri",1
2,"002","Pengguna Akhir",1
3,"003","Dijual Kembali",1
\ No newline at end of file
1,"001","DIGUNAKAN SENDIRI",1
2,"002","PENGGUNA AKHIR",1
3,"003","DIJUAL KEMBALI",1
\ No newline at end of file
id,kode,nama,status
1,"001","Bio Solar",1
2,"002","Bio Premium",1
3,"003","Bio Pertamax",1
4,"004","Solar",1
5,"005","Premium",1
6,"006","Pertalite",1
7,"007","Pertamax",1
8,"008","Pertamax Plus",1
9,"009","Pertamax Racing",1
10,"010","Pertamina Dex",1
1,"001","BIO SOLAR",1
2,"002","BIO PREMIUM",1
3,"003","BIO PERTAMAX",1
4,"004","SOLAR",1
5,"005","PREMIUM",1
6,"006","PERTALITE",1
7,"007","PERTAMAX",1
8,"008","PERTAMAX PLUS",1
9,"009","PERTAMAX RACING",1
10,"010","PERTAMINA DEX",1
11,"011","BBG",1
\ No newline at end of file
File mode changed
id,kode,nama,status
1,"001","Umum",1
2,"002","Transportasi dan Kontraktor Jalan",1
3,"003","Pertambangan dan Kehutanan",1
4,"004","Industri",1
5,"005","WAPU PBBKB Lainnya",1
\ No newline at end of file
1,"001","UMUM",1
2,"002","TRANSPORTASI DAN KONTRAKTOR JALAN",1
3,"003","PERTAMBANGAN DAN KEHUTANAN",1
4,"004","INDUSTRI",1
5,"005","WAPU PBBKB LAINNYA",1
\ No newline at end of file
id,kode,nama,level_id,parent_id
1,"32.00","PROPINSI JAWA BARAT",2,
1,"32.00","PROVINSI JAWA BARAT",2,
2,"32.01","KABUPATEN BOGOR",2,1
3,"32.02","KABUPATEN SUKABUMI",2,1
4,"32.03","KABUPATEN CIANJUR",2,1
......
......@@ -8,6 +8,9 @@ import colander
import locale
import pytz
import io
import random
from string import ascii_uppercase,ascii_lowercase,digits
from email.utils import parseaddr
from types import (
IntType,
......@@ -358,12 +361,32 @@ class CSVRenderer(object):
return fout.getvalue()
########
# File #
########
# http://stackoverflow.com/questions/2257441/random-string-generation-with-upper-case-letters-and-digits-in-python
def get_random_string():
return ''.join(random.choice(ascii_uppercase + ascii_lowercase + digits) \
for _ in range(6))
def get_ext(filename):
return os.path.splitext(filename)[-1]
def file_type(filename):
ctype, encoding = mimetypes.guess_type(filename)
if ctype is None or encoding is not None:
ctype = 'application/octet-stream'
return ctype
class SaveFile(object):
def __init__(self, dir_path):
self.dir_path = dir_path
# Awalan nama file diacak sedangkan akhirannya tidak berubah
def create_fullpath(self, ext=''):
while True:
filename = get_random_string() + ext
fullpath = os.path.join(self.dir_path, filename)
if not os.path.exists(fullpath):
return fullpath
def save(self, content, filename=None):
......@@ -373,24 +396,26 @@ class SaveFile(object):
f.close()
return fullpath
def get_random_string():
return ''.join(choice(ascii_uppercase + ascii_lowercase + digits) \
for _ in range(6))
def get_ext(filename):
return os.path.splitext(filename)[-1]
class Upload(SaveFile):
def __init__(self):
settings = get_settings()
dir_path = os.path.realpath(settings['static_files'])
SaveFile.__init__(self, dir_path)
def save(self, request, name):
input_file = request.POST[name].file
ext = get_ext(request.POST[name].filename)
fullpath = self.create_fullpath(ext)
output_file = open(fullpath, 'wb')
input_file.seek(0)
while True:
data = input_file.read(2<<16)
if not data:
break
output_file.write(data)
output_file.close()
return fullpath
def save(self, file):
input_file = file['fp']
ext = get_ext(file['filename'])
filename = '%s%s' % (uuid.uuid4(),ext)
fullpath = os.path.join(self.dir_path, filename)
class UploadFiles(SaveFile):
def save(self, fs):
input_file = fs.file
ext = get_ext(fs.filename)
fullpath = self.create_fullpath(ext)
output_file = open(fullpath, 'wb')
input_file.seek(0)
while True:
......@@ -399,7 +424,8 @@ class Upload(SaveFile):
break
output_file.write(data)
output_file.close()
return filename
return fullpath
def to_str(v):
typ = type(v)
print typ, v
......
......@@ -413,8 +413,9 @@ def view_posting(request):
).filter(ARInvoice.status_grid==0,
ARInvoice.tgl_tetap.between(awal,akhir),
ARInvoice.is_sts==0,
or_(ARInvoice.is_tbp==1,
ARInvoice.is_sspd==1)
ARInvoice.is_sspd==1
#or_(ARInvoice.is_tbp==1,
# ARInvoice.is_sspd==1)
).group_by(ARInvoice.unit_id,
ARInvoice.unit_kode,
ARInvoice.unit_nama
......@@ -462,8 +463,9 @@ def view_posting(request):
).filter(ARInvoice.status_grid==0,
ARInvoice.tgl_tetap.between(awal,akhir),
ARInvoice.is_sts==0,
or_(ARInvoice.is_tbp==1,
ARInvoice.is_sspd==1),
ARInvoice.is_sspd==1,
#or_(ARInvoice.is_tbp==1,
# ARInvoice.is_sspd==1),
ARInvoice.unit_id==b1
).order_by(ARInvoice.rek_kode,
ARInvoice.kode)
......
......@@ -110,6 +110,18 @@ class AddSchema(colander.Schema):
widget=widget.HiddenWidget(),
oid = "subjek_pajak_un"
)
wp_nama = colander.SchemaNode(
colander.String(),
#widget=auto_wp_nm3,
title="Nama Lainnya",
oid = "wp_nama"
)
wp_alamat_1 = colander.SchemaNode(
colander.String(),
#widget=auto_wp_nm3,
title="Alamat",
oid = "wp_alamat_1"
)
objek_pajak_id = colander.SchemaNode(
colander.Integer(),
title="Objek",
......@@ -228,8 +240,8 @@ def save(request, values, row=None):
row.unit_nama = ref.nama
ref = SubjekPajak.get_by_id(row.subjek_pajak_id)
row.wp_kode = ref.kode
row.wp_nama = ref.nama
row.wp_alamat_1 = ref.alamat_1
#row.wp_nama = ref.nama
#row.wp_alamat_1 = ref.alamat_1
row.wp_alamat_2 = ref.alamat_2
ref = ObjekPajak.get_by_id(row.objek_pajak_id)
......@@ -386,11 +398,14 @@ def view_edit(request):
return route_list(request)
elif SESS_EDIT_FAILED in request.session:
return session_failed(request, SESS_EDIT_FAILED)
print "---------------",row
values = row.to_dict()
values['objek_pajak_nm'] = row.objekpajaks.nama
values['subjek_pajak_nm'] = row.subjekpajaks.nama
values['subjek_pajak_us'] = row.subjekpajaks.user_id
values['subjek_pajak_un'] = row.subjekpajaks.unit_id
values['objek_pajak_nm'] = row.objekpajaks and row.objekpajaks.nama or row.op_nama
values['subjek_pajak_nm'] = row.subjekpajaks and row.subjekpajaks.nama or row.wp_nama
values['objek_pajak_id'] = row.objek_pajak_id or 0
values['subjek_pajak_id'] = row.subjek_pajak_id or 0
values['subjek_pajak_us'] = row.subjekpajaks and row.subjekpajaks.user_id or 0
values['subjek_pajak_un'] = row.subjekpajaks and row.subjekpajaks.unit_id or 0
values['unit_nm'] = row.units.nama
form.set_appstruct(values)
return dict(form=form)
......@@ -422,8 +437,9 @@ def view_posting(request):
).filter(ARInvoice.status_grid==0,
ARInvoice.tgl_tetap.between(awal,akhir),
ARInvoice.is_sts==0,
or_(ARInvoice.is_tbp==1,
ARInvoice.is_sspd==1)
ARInvoice.is_sspd==1,
#or_(ARInvoice.is_tbp==1,
# ARInvoice.is_sspd==1)
).group_by(ARInvoice.unit_id,
ARInvoice.unit_kode,
ARInvoice.unit_nama
......@@ -471,8 +487,9 @@ def view_posting(request):
).filter(ARInvoice.status_grid==0,
ARInvoice.tgl_tetap.between(awal,akhir),
ARInvoice.is_sts==0,
or_(ARInvoice.is_tbp==1,
ARInvoice.is_sspd==1),
ARInvoice.is_sspd==1,
#or_(ARInvoice.is_tbp==1,
# ARInvoice.is_sspd==1),
ARInvoice.unit_id==b1
).order_by(ARInvoice.rek_kode,
ARInvoice.kode)
......@@ -584,7 +601,7 @@ def view_act(request):
columns.append(ColumnDT('is_sspd'))
columns.append(ColumnDT('is_sts'))
query = DBSession.query(ARInvoice
).filter(ARInvoice.status_grid==0,
).filter(#ARInvoice.status_grid==0,
ARInvoice.tgl_tetap.between(awal,akhir)
).order_by(desc(ARInvoice.tgl_tetap),desc(ARInvoice.kode))
if u != 1:
......
......@@ -607,6 +607,7 @@ def view_pdf(request):
unit_al = DBSession.query(Unit.alamat).filter(UserUnit.unit_id==unit_id, Unit.id==unit_id).first()
unit_al = '%s' % unit_al
#unal = DBSession.query(Unit.alamat).filter(UserUnit.unit_id==unit_id, Unit.id==unit_id).first()
awal = 'awal' in request.params and request.params['awal']\
or datetime.now().strftime('%Y-%m-%d')
akhir = 'akhir' in request.params and request.params['akhir']\
......
......@@ -309,6 +309,7 @@ def query_invoice(kode):
return DBSession.query(ARInvoice).\
filter(ARInvoice.kode==kode,
ARInvoice.status_bayar==0,
ARInvoice.jumlah!=0,
ARInvoice.is_sspd==0,
#ARInvoice.is_tbp==0,
ARInvoice.is_sts==0).first()
......@@ -340,7 +341,7 @@ def view_add(request):
values['bayar'] = pokok+denda
values['tgl_bayar'] = datetime.now()
else:
request.session.flash('Tagihan %s tidak ditemukan atau Tagihan tersebut hasil dari TBP.' % kode)
request.session.flash('Nomor bayar %s tidak ditemukan atau jumlah tagihannya Nol Rupiah.' % kode)
form.set_appstruct(values)
return dict(form=form)
......
......@@ -110,12 +110,14 @@ class MasterAddSchema(colander.Schema):
wp_alamat_1 = colander.SchemaNode(
colander.String(),
title="Alamat Pertama",
missing = colander.drop,
oid = "wp_alamat_1"
)
wp_alamat_2 = colander.SchemaNode(
colander.String(),
title="Alamat Kedua",
missing = colander.drop,
oid = "wp_alamat_2"
)
......@@ -141,12 +143,14 @@ class MasterAddSchema(colander.Schema):
op_alamat_1 = colander.SchemaNode(
colander.String(),
title="Alamat Pertama",
missing = colander.drop,
oid = "op_alamat_1"
)
op_alamat_2 = colander.SchemaNode(
colander.String(),
title="Alamat Kedua",
missing = colander.drop,
oid = "op_alamat_2"
)
......@@ -288,7 +292,14 @@ def save(request, values, row=None):
if not row.tahun_id:
row.tahun_id = datetime.now().strftime('%Y')
if not row.wp_alamat_1:
row.wp_alamat_1 = '-'
if not row.wp_alamat_2:
row.wp_alamat_2 = '-'
if not row.op_alamat_1:
row.op_alamat_1 = '-'
if not row.op_alamat_2:
row.op_alamat_2 = '-'
# unit = Unit.get_by_id(row.unit_id)
# row.unit_kd = unit.kode
# row.unit_nm = unit.nama
......@@ -432,7 +443,7 @@ def view_add(request):
########
def query_id(request):
query = DBSession.query(ARTbp).filter(ARTbp.id==request.matchdict['id'])
if request.user.id != 1:
if group_in(request, 'bendahara'):
query = query.join(Unit).join(UserUnit).\
filter(UserUnit.user_id==request.user.id)
return query
......@@ -533,7 +544,8 @@ def view_posting(request):
func.sum(ARTbp.bunga).label('bunga'),
func.sum(ARTbp.jumlah).label('jumlah')
).filter(ARTbp.tgl_terima.between(awal,akhir),
ARTbp.status_invoice==0
ARTbp.status_invoice==0,
ARTbp.jumlah!=0
).group_by(ARTbp.wilayah_id,
ARTbp.unit_id,
ARTbp.unit_kode,
......@@ -646,6 +658,7 @@ def view_posting(request):
rows1 = DBSession.query(ARTbp
).filter(ARTbp.tgl_terima.between(awal,akhir),
ARTbp.status_invoice==0,
ARTbp.jumlah!=0,
ARTbp.wilayah_id==row.wil_id,
ARTbp.unit_id==row.un_id,
ARTbp.rek_kode==row.rek_kd
......
......@@ -288,6 +288,11 @@ def daftar_route():
######################################
## Kumpulan Headofkode & Headofname ##
######################################
auto_unit_nm_sptpd = widget.AutocompleteInputWidget(
size=60,
values = '/skpd/hon_sptpd/act',
min_length=1)
auto_unit_nm2 = widget.AutocompleteInputWidget(
size=60,
values = '/skpd/hon_tbp/act',
......
No preview for this file type
......@@ -450,8 +450,9 @@ def view_posting(request):
).filter(ARInvoice.status_grid==1,
ARInvoice.tgl_tetap.between(awal,akhir),
ARInvoice.is_sts==0,
or_(ARInvoice.is_tbp==1,
ARInvoice.is_sspd==1)
ARInvoice.is_sspd==1
#or_(ARInvoice.is_tbp==1,
# ARInvoice.is_sspd==1)
).group_by(ARInvoice.unit_id,
ARInvoice.unit_kode,
ARInvoice.unit_nama
......@@ -499,8 +500,9 @@ def view_posting(request):
).filter(ARInvoice.status_grid==1,
ARInvoice.tgl_tetap.between(awal,akhir),
ARInvoice.is_sts==0,
or_(ARInvoice.is_tbp==1,
ARInvoice.is_sspd==1),
ARInvoice.is_sspd==1,
#or_(ARInvoice.is_tbp==1,
# ARInvoice.is_sspd==1),
ARInvoice.unit_id==b1
).order_by(ARInvoice.rek_kode,
ARInvoice.kode)
......
......@@ -274,3 +274,28 @@ def view_act(request):
r.append(d)
print '------------- Rekening --------- ',r
return r
elif url_dict['act']=='hon_sptpd':
print "-- Lewat ----------------- "
u = request.user.id
term = 'term' in params and params['term'] or ''
rows = DBSession.query(Rekening.id, Rekening.nama, Rekening.kode).\
filter(Rekening.level_id.in_([5]),
Rekening.kode=='4.1.1.05.01.',
Rekening.nama.ilike('%%%s%%' % term))
if group_in(request, 'bendahara'):
x = DBSession.query(UserUnit.unit_id).filter(UserUnit.user_id==u).first()
y = '%s' % x
z = int(y)
print "-- Unit ID ----------------- ",z
rows = rows.join(UnitRekening).filter(UnitRekening.unit_id==z)
r = []
for k in rows.all():
d={}
d['id'] = k[0]
d['value'] = k[1]
d['nama'] = k[1]
d['kode'] = k[2]
r.append(d)
print '------------- Rekening --------- ',r
return r
\ No newline at end of file
......@@ -193,6 +193,7 @@ class ViewLaporan(BaseViews):
rek = 'rek' in params and params['rek'] and str(params['rek']) or ''
h2h = 'h2h' in params and params['h2h'] and str(params['h2h']) or ''
unit = 'unit' in params and params['unit'] and str(params['unit']) or ''
sptpd_id = 'sptpd_id' in params and params['sptpd_id'] and str(params['sptpd_id']) or ''
if group_in(req, 'bendahara'):
unit_id = DBSession.query(UserUnit.unit_id).filter(UserUnit.user_id==u).first()
......@@ -217,11 +218,6 @@ class ViewLaporan(BaseViews):
##----------------------- Query laporan -------------------------------------##
if url_dict['act']=='Laporan_1' :
print "--------- Status Jenis Lap --------- ",jenis
print "--------- Status Pembayaran --------- ",bayar
print "--------- ID Rekening --------------- ",rek
print "--------- Tanggal Awal -------------- ",awal
print "--------- Tanggal Akhir ------------- ",akhir
if bayar == '1':
query = DBSession.query(ARInvoice.unit_id.label('un_id'),
ARInvoice.unit_kode.label('un_kd'),
......@@ -1744,6 +1740,148 @@ class ViewLaporan(BaseViews):
response.write(pdf)
return response
### SPTPD RINCIAN ###
elif url_dict['act']=='sptpd_rincian' :
query = DBSession.query(Sptpd.id,
Sptpd.kode,
Sptpd.nama,
InvoiceDet.sektor_nm,
Sptpd.tgl_sptpd,
Sptpd.periode_1,
Sptpd.periode_2,
InvoiceDet.wilayah_nm,
InvoiceDet.peruntukan_nm,
InvoiceDet.produk_nm,
InvoiceDet.nama.label('wp'),
InvoiceDet.volume,
InvoiceDet.dpp,
InvoiceDet.tarif,
InvoiceDet.total_pajak,
).filter(Sptpd.id==req.params['sptpd_id'],
InvoiceDet.sptpd_id==Sptpd.id
).order_by(Sptpd.kode,
InvoiceDet.sektor_nm,
InvoiceDet.wilayah_nm,
InvoiceDet.nama,
InvoiceDet.peruntukan_nm,
InvoiceDet.produk_nm
).all()
generator = rSptpdRincianGenerator()
pdf = generator.generate(query)
response=req.response
response.content_type="application/pdf"
response.content_disposition='filename=output.pdf'
response.write(pdf)
return response
### SPTPD SSPD ###
elif url_dict['act']=='sptpd_sspd' :
query = DBSession.query(Sptpd.id,
Sptpd.nama,
Sptpd.wp_alamat_1,
InvoiceDet.produk_nm,
Sptpd.periode_1,
Sptpd.periode_2,
Sptpd.tgl_sptpd,
SubjekPajak.kode,
func.sum(InvoiceDet.total_pajak).label('total_pajak')
).filter(Sptpd.id==req.params['sptpd_id'],
InvoiceDet.sptpd_id==Sptpd.id,
SubjekPajak.id==Sptpd.subjek_pajak_id
).group_by(Sptpd.id,
SubjekPajak.kode,
Sptpd.nama,
Sptpd.wp_alamat_1,
InvoiceDet.produk_nm,
Sptpd.periode_1,
Sptpd.periode_2,
Sptpd.tgl_sptpd,
).order_by(Sptpd.kode,
InvoiceDet.produk_nm
).all()
generator = rSptpdSspdGenerator()
pdf = generator.generate(query)
response=req.response
response.content_type="application/pdf"
response.content_disposition='filename=output.pdf'
response.write(pdf)
return response
### SPTPD Lampiran ###
elif url_dict['act']=='sptpd_lampiran' :
query = DBSession.query(Sptpd.id,
Sptpd.kode,
Sptpd.nama,
InvoiceDet.sektor_nm,
Sptpd.tgl_sptpd,
Sptpd.periode_1,
Sptpd.periode_2,
InvoiceDet.produk_nm,
InvoiceDet.tarif,
func.sum(InvoiceDet.volume).label('volume'),
func.sum(InvoiceDet.dpp).label('dpp'),
func.sum(InvoiceDet.total_pajak).label('total_pajak'),
).filter(Sptpd.id==req.params['sptpd_id'],
InvoiceDet.sptpd_id==Sptpd.id
).group_by(Sptpd.id,
Sptpd.kode,
Sptpd.nama,
InvoiceDet.sektor_nm,
Sptpd.tgl_sptpd,
Sptpd.periode_1,
Sptpd.periode_2,
InvoiceDet.produk_nm,
InvoiceDet.tarif,
).order_by(Sptpd.kode,
InvoiceDet.sektor_nm,
InvoiceDet.produk_nm,
).all()
generator = rSptpdLampiranGenerator()
pdf = generator.generate(query)
response=req.response
response.content_type="application/pdf"
response.content_disposition='filename=output.pdf'
response.write(pdf)
return response
### SPTPD ###
elif url_dict['act']=='sptpd' :
query = DBSession.query(Sptpd.id,
Sptpd.kode,
Sptpd.nama,
InvoiceDet.sektor_nm,
Sptpd.tgl_sptpd,
Sptpd.periode_1,
Sptpd.periode_2,
InvoiceDet.produk_nm,
InvoiceDet.tarif,
func.sum(InvoiceDet.volume).label('volume'),
func.sum(InvoiceDet.dpp).label('dpp'),
func.sum(InvoiceDet.total_pajak).label('total_pajak'),
).filter(Sptpd.id==req.params['sptpd_id'],
InvoiceDet.sptpd_id==Sptpd.id
).group_by(Sptpd.id,
Sptpd.kode,
Sptpd.nama,
InvoiceDet.sektor_nm,
InvoiceDet.tarif,
Sptpd.tgl_sptpd,
Sptpd.periode_1,
Sptpd.periode_2,
InvoiceDet.produk_nm,
).order_by(Sptpd.kode,
InvoiceDet.sektor_nm,
InvoiceDet.tarif,
InvoiceDet.produk_nm,
).all()
generator = rSptpdLampiranGenerator()
pdf = generator.generate(query)
response=req.response
response.content_type="application/pdf"
response.content_disposition='filename=output.pdf'
response.write(pdf)
return response
###################### E-SAMSAT
elif url_dict['act']=='esamsat' :
query = self.request.params
......@@ -1769,6 +1907,106 @@ class ViewLaporan(BaseViews):
else:
return HTTPNotFound() #TODO: Warning Hak Akses
class rSptpdRincianGenerator(JasperGenerator):
def __init__(self):
super(rSptpdRincianGenerator, self).__init__()
self.reportname = get_rpath('sptpd_rincian.jrxml')
self.xpath = '/webr/sptpd_rincian'
self.root = ET.Element('webr')
def generate_xml(self, tobegreeted):
for row in tobegreeted:
xml_greeting = ET.SubElement(self.root, 'sptpd_rincian')
ET.SubElement(xml_greeting, "id").text = unicode(row.id)
ET.SubElement(xml_greeting, "kode").text = row.kode
ET.SubElement(xml_greeting, "nama").text = row.nama
ET.SubElement(xml_greeting, "sektor_nm").text = row.sektor_nm
ET.SubElement(xml_greeting, "produk_nm").text = row.produk_nm
ET.SubElement(xml_greeting, "wilayah_nm").text = row.wilayah_nm
ET.SubElement(xml_greeting, "peruntukan_nm").text = row.peruntukan_nm
ET.SubElement(xml_greeting, "wp").text = row.wp
ET.SubElement(xml_greeting, "tgl_sptpd").text = unicode(row.tgl_sptpd)
ET.SubElement(xml_greeting, "periode_1").text = unicode(row.periode_1)
ET.SubElement(xml_greeting, "periode_2").text = unicode(row.periode_2)
ET.SubElement(xml_greeting, "volume").text = unicode(row.volume)
ET.SubElement(xml_greeting, "dpp").text = unicode(row.dpp)
ET.SubElement(xml_greeting, "tarif").text = unicode(row.tarif)
ET.SubElement(xml_greeting, "total_pajak").text = unicode(row.total_pajak)
ET.SubElement(xml_greeting, "logo").text = logo_pemda
return self.root
class rSptpdSspdGenerator(JasperGenerator):
def __init__(self):
super(rSptpdSspdGenerator, self).__init__()
self.reportname = get_rpath('sptpd_sspd.jrxml')
self.xpath = '/webr/sptpd_sspd'
self.root = ET.Element('webr')
def generate_xml(self, tobegreeted):
for row in tobegreeted:
xml_greeting = ET.SubElement(self.root, 'sptpd_sspd')
ET.SubElement(xml_greeting, "id").text = unicode(row.id)
ET.SubElement(xml_greeting, "kode").text = row.kode
ET.SubElement(xml_greeting, "nama").text = row.nama
ET.SubElement(xml_greeting, "alamat_1").text = row.wp_alamat_1
ET.SubElement(xml_greeting, "produk_nm").text = row.produk_nm
ET.SubElement(xml_greeting, "periode_1").text = unicode(row.periode_1)
ET.SubElement(xml_greeting, "periode_2").text = unicode(row.periode_2)
ET.SubElement(xml_greeting, "tgl_sptpd").text = unicode(row.tgl_sptpd)
ET.SubElement(xml_greeting, "total_pajak").text = unicode(row.total_pajak)
ET.SubElement(xml_greeting, "logo").text = logo_pemda
return self.root
class rSptpdLampiranGenerator(JasperGenerator):
def __init__(self):
super(rSptpdLampiranGenerator, self).__init__()
self.reportname = get_rpath('sptpd_lampiran.jrxml')
self.xpath = '/webr/sptpd_lampiran'
self.root = ET.Element('webr')
def generate_xml(self, tobegreeted):
for row in tobegreeted:
xml_greeting = ET.SubElement(self.root, 'sptpd_lampiran')
ET.SubElement(xml_greeting, "id").text = unicode(row.id)
ET.SubElement(xml_greeting, "kode").text = row.kode
ET.SubElement(xml_greeting, "nama").text = row.nama
ET.SubElement(xml_greeting, "sektor_nm").text = row.sektor_nm
ET.SubElement(xml_greeting, "produk_nm").text = row.produk_nm
ET.SubElement(xml_greeting, "tgl_sptpd").text = unicode(row.tgl_sptpd)
ET.SubElement(xml_greeting, "periode_1").text = unicode(row.periode_1)
ET.SubElement(xml_greeting, "periode_2").text = unicode(row.periode_2)
ET.SubElement(xml_greeting, "volume").text = unicode(row.volume)
ET.SubElement(xml_greeting, "dpp").text = unicode(row.dpp)
ET.SubElement(xml_greeting, "tarif").text = unicode(row.tarif)
ET.SubElement(xml_greeting, "total_pajak").text = unicode(row.total_pajak)
ET.SubElement(xml_greeting, "logo").text = logo_pemda
return self.root
class rSptpdGenerator(JasperGenerator):
def __init__(self):
super(rSptpdGenerator, self).__init__()
self.reportname = get_rpath('sptpd.jrxml')
self.xpath = '/webr/sptpd'
self.root = ET.Element('webr')
def generate_xml(self, tobegreeted):
for row in tobegreeted:
xml_greeting = ET.SubElement(self.root, 'sptpd')
ET.SubElement(xml_greeting, "id").text = unicode(row.id)
ET.SubElement(xml_greeting, "kode").text = row.kode
ET.SubElement(xml_greeting, "nama").text = row.nama
ET.SubElement(xml_greeting, "sektor_nm").text = row.sektor_nm
ET.SubElement(xml_greeting, "produk_nm").text = row.produk_nm
ET.SubElement(xml_greeting, "tgl_sptpd").text = unicode(row.tgl_sptpd)
ET.SubElement(xml_greeting, "periode_1").text = unicode(row.periode_1)
ET.SubElement(xml_greeting, "periode_2").text = unicode(row.periode_2)
ET.SubElement(xml_greeting, "volume").text = unicode(row.volume)
ET.SubElement(xml_greeting, "dpp").text = unicode(row.dpp)
ET.SubElement(xml_greeting, "tarif").text = unicode(row.tarif)
ET.SubElement(xml_greeting, "total_pajak").text = unicode(row.total_pajak)
ET.SubElement(xml_greeting, "logo").text = logo_pemda
return self.root
## ----------------- LAPORAN -------------------------------------------##
class lap1Generator(JasperGenerator):
def __init__(self):
......
......@@ -328,6 +328,23 @@ def view_act(request):
print '---------------Unit------------------',r
return r
elif url_dict['act']=='hon_sptpd':
term = 'term' in params and params['term'] or ''
rows = DBSession.query(Unit.id, Unit.nama, Unit.kode
).filter(Unit.nama.ilike('%%%s%%' % term),
Unit.level_id.in_([3,4])
).all()
r = []
for k in rows:
d={}
d['id'] = k[0]
d['value'] = k[1]
d['nama'] = k[1]
d['kode'] = k[2]
r.append(d)
print '---------------Unit------------------',r
return r
elif url_dict['act']=='hon_fast':
term = 'term' in params and params['term'] or ''
rows = DBSession.query(Unit.id, Unit.nama
......
import sys
import re
import os
import xlrd
from email.utils import parseaddr
from sqlalchemy import not_, func, cast, BigInteger, String, or_, desc
from datetime import datetime
from time import gmtime, strftime
from pyramid.view import (
view_config,
)
from pyramid.httpexceptions import (
HTTPFound,
)
import colander
from deform import (
Form,
widget,
ValidationFailure,
FileData,
)
from deform.interfaces import FileUploadTempStore
from ..tools import _DTnumberformat, create_now, UploadFiles, get_settings, file_type,_DTstrftime
from ..models import DBSession
from ..models.isipkd import(
ObjekPajak,
SubjekPajak,
Unit,
UserUnit,
Wilayah,
Pajak,
Rekening,
ARInvoice,
InvoiceDet,
User,
Produk,
Peruntukan,
Sptpd,
Sektor
)
from ..models.__init__ import(
UserGroup
)
from datatables import (
ColumnDT, DataTables)
from daftar import (STATUS, deferred_status,
daftar_subjekpajak, deferred_subjekpajak,
daftar_wilayah, deferred_wilayah,
daftar_unit, deferred_unit,
daftar_pajak, deferred_pajak, auto_wp_nm2, auto_pajak_nm, auto_unit_nm_sptpd
)
from daftar import STATUS
from ..security import group_finder,group_in
SESS_ADD_FAILED = 'Gagal tambah SPTPD WAPU'
SESS_EDIT_FAILED = 'Gagal edit SPTPD WAPU'
########
# List #
########
@view_config(route_name='sptpd-wapu', renderer='templates/wapu/list.pt',
permission='read')
def view_list(request):
awal = 'awal' in request.GET and request.GET['awal'] or datetime.now().strftime('%Y-%m-%d')
akhir = 'akhir' in request.GET and request.GET['akhir'] or datetime.now().strftime('%Y-%m-%d')
return dict(rows={"awal":awal, "akhir":akhir})
##########
# Action #
##########
def qry_arinv():
return DBSession.query(ARInvoice).join(Unit)
@view_config(route_name='sptpd-wapu-act', renderer='json',
permission='read')
def view_act(request):
req = request
params = req.params
url_dict = req.matchdict
awal = 'awal' in request.GET and request.GET['awal'] or datetime.now().strftime('%Y-%m-%d')
akhir = 'akhir' in request.GET and request.GET['akhir'] or datetime.now().strftime('%Y-%m-%d')
if url_dict['act']=='grid':
u = request.user.id
print '--------user--------',u
columns = []
columns.append(ColumnDT('id'))
columns.append(ColumnDT('kode'))
columns.append(ColumnDT('nama'))
columns.append(ColumnDT('wp_nama'))
columns.append(ColumnDT('tgl_sptpd' , filter=_DTstrftime))
columns.append(ColumnDT('jumlah', filter=_DTnumberformat))
columns.append(ColumnDT('status_invoice'))
query = DBSession.query(Sptpd
).filter(Sptpd.tgl_sptpd.between(awal,akhir)
).order_by(desc(Sptpd.tgl_sptpd),desc(Sptpd.kode))
if group_in(request, 'bendahara'):
query = query.join(Unit).join(UserUnit).\
filter(UserUnit.user_id==request.user.id)
rowTable = DataTables(req, Sptpd, query, columns)
return rowTable.output_result()
#######
# Add #
#######
tmpstore = FileUploadTempStore()
class Uploads(colander.SequenceSchema):
upload = colander.SchemaNode(
FileData(),
widget=widget.FileUploadWidget(tmpstore),
validator = None,
title="Upload File CSV"
)
class AddSchema(colander.Schema):
moneywidget = widget.MoneyInputWidget(
size=20,
options={'allowZero':True,
'precision':0})
unit_id = colander.SchemaNode(
colander.Integer(),
widget=widget.HiddenWidget(),
oid="unit_id",
title="OPD",
)
unit_kd = colander.SchemaNode(
colander.String(),
#widget=auto_unit_nm2,
title="OPD",
oid="unit_kd"
)
unit_nm = colander.SchemaNode(
colander.String(),
widget=auto_unit_nm_sptpd,
#title="OPD",
oid="unit_nm"
)
subjek_pajak_id = colander.SchemaNode(
colander.Integer(),
widget=widget.HiddenWidget(),
oid = "subjek_pajak_id"
)
subjek_pajak_nm = colander.SchemaNode(
colander.String(),
title="Wajib Pungut",
oid = "subjek_pajak_nm"
)
#wp_nama = colander.SchemaNode(
# colander.String(),
# title="Nama Lain",
# oid = "wp_nama"
# )
#wp_alamat_1 = colander.SchemaNode(
# colander.String(),
# title="Alamat",
# missing = colander.drop,
# oid = "wp_alamat_1"
# )
#rekening_id = colander.SchemaNode(
# colander.Integer(),
# widget=widget.HiddenWidget(),
# oid = "rekening_id"
# )
#rekening_nm = colander.SchemaNode(
# colander.String(),
# title="Kode Rekening",
# oid = "rekening_nm"
# )
#kode = colander.SchemaNode(
# colander.String(),
# title="No. SPTPD",
# oid = "kode",
# missing = colander.drop,
# )
nama = colander.SchemaNode(
colander.String(),
title="Uraian SPTPD",
oid = "nama",
missing = colander.drop,
)
periode_1 = colander.SchemaNode(
colander.Date(),
title="Periode",
oid = "periode_1",
widget = widget.DateInputWidget()
)
periode_2 = colander.SchemaNode(
colander.Date(),
title="Periode 2",
oid = "periode_2",
)
tgl_sptpd = colander.SchemaNode(
colander.Date(),
oid = "tgl_sptpd",
title="Tgl. SPTPD",
)
jumlah = colander.SchemaNode(
colander.String(),
default = 0,
missing=colander.drop,
oid = "jum"
)
uploads = Uploads()
class EditSchema(AddSchema):
id = colander.SchemaNode(colander.Integer(),
missing=colander.drop,
widget=widget.HiddenWidget(readonly=True),
oid='id')
def get_form(request, class_form):
schema = class_form()
schema = schema.bind(daftar_status=STATUS)
schema.request = request
return Form(schema, buttons=('simpan','batal'))
def save(request, values, row=None):
if not row:
row = Sptpd()
row.create_date = datetime.now()
row.create_uid = request.user.id
row.from_dict(values)
row.update_uid = request.user.id
row.jumlah = re.sub("[^0-9]", "", row.jumlah)
if not row.tahun_id:
row.tahun_id = datetime.now().strftime('%Y')
if not row.wp_alamat_1:
row.wp_alamat_1 = '-'
if not row.wp_alamat_2:
row.wp_alamat_2 = '-'
ref = Unit.get_by_id(row.unit_id)
row.unit_kode = ref.kode
row.unit_nama = ref.nama
row.unit_alamat = ref.alamat
ref = SubjekPajak.get_by_id(row.subjek_pajak_id)
row.wp_kode = ref.kode
row.wp_nama = ref.nama
row.wp_alamat_1 = ref.alamat_1
row.wp_alamat_2 = ref.alamat_2
#ref = Rekening.get_by_id(row.rekening_id)
#row.rek_kode = ref.kode
#row.rek_nama = ref.nama
u = request.user.id
if u!=1:
print '----------------User_Login---------------',u
x = DBSession.query(UserGroup.group_id).filter(UserGroup.user_id==u).first()
y = '%s' % x
z = int(y)
print '----------------Group_id-----------------',z
if z == 2:
prefix = '21'
else:
prefix = '20'
else:
prefix = '20'
tanggal = datetime.now().strftime('%d')
bulan = datetime.now().strftime('%m')
tahun = datetime.now().strftime('%y')
if not row.kode and not row.no_id:
if prefix == '20':
sptpd_no = DBSession.query(func.max(Sptpd.no_id)).\
filter(Sptpd.tahun_id==row.tahun_id,
Sptpd.unit_id==row.unit_id,
func.substr(Sptpd.kode,1,2)=='20').scalar()
elif prefix == '21':
sptpd_no = DBSession.query(func.max(Sptpd.no_id)).\
filter(Sptpd.tahun_id==row.tahun_id,
Sptpd.unit_id==row.unit_id,
func.substr(Sptpd.kode,1,2)=='21').scalar()
if not sptpd_no:
row.no_id = 1
else:
row.no_id = sptpd_no+1
row.kode = "".join([prefix,
str(tahun).rjust(2,'0'),
str(row.unit_id).rjust(4,'0'),
str(row.no_id).rjust(8,'0')])
print "----------- LEWAT kdieu ------------"
DBSession.add(row)
DBSession.flush()
print "----------- LEWAT kdieu ------------",row
return row
def get_seq(controls, name):
start = False
key_value = ':'.join([name, 'sequence'])
r = []
for key, value in controls:
if key == '__start__' and value == key_value:
start = True
continue
if key == '__end__' and value == key_value:
start = False
if start:
r.append(value)
return r
class DbUpload(UploadFiles):
def save_request1(self, row1=None):
row1 = Sptpd()
return row1
def save_request2(self, rows=None):
rows = Sptpd()
return rows
def __init__(self):
settings = get_settings()
dir_path = os.path.realpath(settings['static_files'])
UploadFiles.__init__(self, dir_path)
def save(self, request, names, sptpd_id):
fileslist = request.POST.getall(names)
for f in fileslist:
fullpath = UploadFiles.save(self, f)
print '-------- Full------- : ',fullpath
xl_workbook = xlrd.open_workbook(fullpath)
sheet_names = xl_workbook.sheet_names()
print '-------- Sheet Names : ',sheet_names
xl_sheet = xl_workbook.sheet_by_name(sheet_names[0])
row = xl_sheet.row(0) # 1st row
from xlrd.sheet import ctype_text
print('(Column #) type:value')
for idx, cell_obj in enumerate(row):
cell_type_str = ctype_text.get(cell_obj.ctype, 'unknown type')
print('(%s) %s %s' % (idx, cell_type_str, cell_obj.value))
##--------------- Menampilkan data per Baris dan Kolom ---------------##
num_cols = xl_sheet.ncols # Variabel nomor Kolom
for row_idx in range(1, xl_sheet.nrows): # Array dimulai dari Baris Isi
print ('-'*60) # Pembatas
print ('Row: %s' % row_idx) # Menampilkan nomor Baris
a1 = xl_sheet.cell(row_idx, 0) # Variabel untuk Baris dan Kolom yg diambil contoh a1=xl_sheet.cell(Baris 1, Kolom 0)
a11 = a1.value # Variabel ke-2 untuk mengambil Nilai dari variabel diatas
print "-------- Sektor --------- ",a11
a2 = xl_sheet.cell(row_idx, 1)
a21 = a2.value
print "-------- Wilayah -------- ",a21
a3 = xl_sheet.cell(row_idx, 2)
a31 = a3.value
print "-------- Pengguna ------- ",a31
a4 = xl_sheet.cell(row_idx, 3)
a41 = a4.value
print "-------- Peruntukan ----- ",a41
a5 = xl_sheet.cell(row_idx, 4)
a51 = a5.value
print "-------- Jenis BBM ------ ",a51
a6 = xl_sheet.cell(row_idx, 5)
a61 = a6.value
print "-------- Volume --------- ",a61
a7 = xl_sheet.cell(row_idx, 6)
a71 = a7.value
print "-------- DPP ------------ ",a71
a8 = xl_sheet.cell(row_idx, 7)
a81 = a8.value
print "-------- Tarif ---------- ",a81
a9 = xl_sheet.cell(row_idx, 8)
a91 = a9.value
print "-------- Total ---------- ",a91
#for col_idx in range(0, num_cols): # Iterate through columns
# cell_obj = xl_sheet.cell(row_idx, col_idx) # Get cell object by row, col
# print ('Column: [%s] cell_obj: [%s]' % (col_idx, cell_obj))
row = InvoiceDet()
row.sptpd_id = sptpd_id
row.volume = a61
row.dpp = a71
row.harga_jual = a71/a61
row.tarif = a81
row.total_pajak = a91
row.nama = a31
row.alamat = '-'
row.keterangan = '-'
sktr = DBSession.query(Sektor.id.label('pi'),
Sektor.kode.label('pk'),
Sektor.nama.label('pn'),
).filter(Sektor.nama.ilike('%s%%' % a11)
).first()
if not sktr:
return 'Sektor %s tidak ditemukan' % a11
row.sektor_nm = sktr.pn
row.sektor_id = sktr.pi
pro = DBSession.query(Produk.id.label('pi'),
Produk.kode.label('pk'),
Produk.nama.label('pn'),
).filter(Produk.nama.ilike('%s%%' % a51)
).first()
if not pro:
return 'Produk %s tidak ditemukan' % a51
row.produk_nm = pro.pn
row.produk_id = pro.pi
row.p_kode = pro.pk
per = DBSession.query(Peruntukan.id.label('peri'),
Peruntukan.kode.label('perk'),
Peruntukan.nama.label('pern'),
).filter(Peruntukan.nama.ilike('%%%s%%' % a41)
).first()
if not per:
return 'Peruntukan %s tidak ditemukan' % a41
row.peruntukan_id = per.peri
row.peruntukan_nm = per.pern
wil = DBSession.query(Wilayah.id.label('wili'),
Wilayah.kode.label('wilk'),
Wilayah.nama.label('wiln'),
).filter(Wilayah.nama.ilike('%%%s%%' % a21)
).first()
if not wil:
return 'Wilayah %s tidak ditemukan' % a21
row.wilayah_id = wil.wili
row.wilayah_nm = wil.wiln
sptpd = DBSession.query(Sptpd.subjek_pajak_id.label('sp')
).join(SubjekPajak
).filter(Sptpd.id == sptpd_id,
Sptpd.subjek_pajak_id == SubjekPajak.id
).first()
row.subjek_pajak_id = sptpd.sp
DBSession.add(row)
DBSession.flush()
row2 = DBSession.query(func.sum(InvoiceDet.dpp).label('a'),
func.sum(InvoiceDet.total_pajak).label('b')
).filter(InvoiceDet.sptpd_id==sptpd_id
).all()
print '----- Item keseluruhan -----: ',row2
for rowa in row2:
g1 = rowa.a
g2 = rowa.b
row1 = DBSession.query(Sptpd).filter(Sptpd.id==sptpd_id).first()
row1.jumlah = g2
self.save_request1(row1)
#return row1
def save_request(values, request, row=None):
if 'id' in request.matchdict:
values['id'] = request.matchdict['id']
row = save(request, values, row)
if row:
print "----------- LEWAT KDIEU ------------",row
dbu = DbUpload()
xls_ret=dbu.save(request, 'upload', row.id)
if xls_ret:
request.session.flash("Gagal proses %s " % xls_ret, "error")
else:
request.session.flash('SPTPD No. %s sudah disimpan.' % row.kode)
return row
def route_list(request):
return HTTPFound(location=request.route_url('sptpd-wapu'))
def session_failed(request, session_name):
r = dict(form=request.session[session_name])
del request.session[session_name]
return r
@view_config(route_name='sptpd-wapu-add', renderer='templates/wapu/add.pt',
permission='add')
def view_add(request):
form = get_form(request, AddSchema)
values = {}
values['tgl_sptpd'] = datetime.now()
values['periode_1'] = datetime.now()
values['periode_2'] = datetime.now()
u = request.user.id
if u != 1:
print '----------------User_Login---------------',u
x = DBSession.query(UserGroup.group_id).filter(UserGroup.user_id==u).first()
y = '%s' % x
z = int(y)
print '----------------Group_id-----------------',z
if z == 1: ## Wapu ##
a = DBSession.query(User.email).filter(User.id==u).first()
print '----------------Email---------------------',a
rows = DBSession.query(SubjekPajak.id.label('sid'),
SubjekPajak.kode.label('skd'),
SubjekPajak.nama.label('snm'),
SubjekPajak.unit_id.label('sui'),
SubjekPajak.user_id.label('sus'),
).filter(SubjekPajak.email==a,
).first()
values['subjek_pajak_id'] = rows.sid
print '----------------Subjek id-----------------------',values['subjek_pajak_id']
values['subjek_pajak_nm'] = rows.snm
print '----------------Subjek nama---------------------',values['subjek_pajak_nm']
values['unit_id'] = rows.sui
print '----------------Subjek unit---------------------',values['unit_id']
unit = DBSession.query(Unit.nama.label('unm'),
Unit.kode.label('unk')
).filter(Unit.id==values['unit_id'],
).first()
values['unit_kd'] = unit.unk
values['unit_nm'] = unit.unm
print '----------------Unit nama-----------------------',values['unit_nm']
elif z == 2: ## Bendahara ##
print '----------------User_id-------------------',u
a = DBSession.query(UserUnit.unit_id).filter(UserUnit.user_id==u).first()
b = '%s' % a
c = int(b)
values['unit_id'] = c
print '----------------Unit id-------------------------',values['unit_id']
unit = DBSession.query(Unit.nama.label('unm'),
Unit.kode.label('unk')
).filter(Unit.id==c,
).first()
values['unit_kd'] = unit.unk
values['unit_nm'] = unit.unm
print '----------------Unit nama-----------------------',values['unit_nm']
form.set_appstruct(values)
if request.POST:
if 'simpan' in request.POST:
controls = request.POST.items()
print "--------------- Control ADD -------",controls
row = save_request(dict(controls), request)
print "--------------- Row ADD -----------",row
return HTTPFound(location=request.route_url('sptpd-wapu-edit',id=row.id))
return route_list(request)
elif SESS_ADD_FAILED in request.session:
return session_failed(request, SESS_ADD_FAILED)
return dict(form=form)
########
# Edit #
########
def query_id(request):
return DBSession.query(Sptpd).filter_by(id=request.matchdict['id'])
def id_not_found(request):
msg = 'SPTPD ID %s not found.' % request.matchdict['id']
request.session.flash(msg, 'error')
return route_list(request)
@view_config(route_name='sptpd-wapu-edit', renderer='templates/wapu/edit.pt',
permission='edit')
def view_edit(request):
row = query_id(request).first()
id = row.id
kode = row.kode
if not row:
return id_not_found(request)
if row.status_invoice:
request.session.flash('Data sudah masuk di Nomor Bayar', 'error')
return route_list(request)
form = get_form(request, EditSchema)
if request.POST:
if 'simpan' in request.POST:
controls = request.POST.items()
print "---------------control-------------",controls
save_request(dict(controls), request, row)
return route_list(request)
elif SESS_EDIT_FAILED in request.session:
return session_failed(request, SESS_EDIT_FAILED)
values = row.to_dict()
values['subjek_pajak_nm'] = row and row.subjekpajaks.nama or ''
#values['wp_nama'] = row and row.wp_nama or ''
#values['wp_alamat_1'] = row and row.wp_alamat_1 or ''
#values['rekening_nm'] = row and row.rek_nama or ''
values['unit_kd'] = row and row.unit_kode or ''
values['unit_nm'] = row and row.unit_nama or ''
form.set_appstruct(values)
return dict(form=form)
##########
# Delete #
##########
@view_config(route_name='sptpd-wapu-delete', renderer='templates/wapu/delete.pt',
permission='delete')
def view_delete(request):
q = query_id(request)
row = q.first()
id = row.id
if not row:
return id_not_found(request)
if row.status_invoice:
request.session.flash('Data sudah masuk di Nomor Bayar', 'error')
return route_list(request)
x = DBSession.query(InvoiceDet).filter(InvoiceDet.sptpd_id==id).first()
if x:
request.session.flash('Tidak bisa dihapus, karena masih mempunyai detail.','error')
return route_list(request)
form = Form(colander.Schema(), buttons=('hapus','batal'))
if request.POST:
if 'hapus' in request.POST:
msg = 'SPTPD no. %s sudah berhasil dihapus.' % (row.kode)
q.delete()
DBSession.flush()
request.session.flash(msg)
return route_list(request)
return dict(row=row, form=form.render())
\ No newline at end of file
import sys
import re
from email.utils import parseaddr
from sqlalchemy import not_, func, cast, BigInteger, String
from pyramid.view import (
view_config,
)
from pyramid.httpexceptions import (
HTTPFound,
)
import colander
from deform import (
Form,
widget,
ValidationFailure,
)
from ..models import DBSession
from ..models.isipkd import(
ObjekPajak,
SubjekPajak,
Unit,
UserUnit,
Wilayah,
Pajak,
Rekening,
ARInvoice,
InvoiceDet,
Sptpd,
User,
Sektor,
Produk,
Peruntukan
)
from ..models.__init__ import(
UserGroup
)
from datatables import ColumnDT, DataTables
from datetime import datetime,date
from time import gmtime, strftime
from ..tools import create_now, _DTnumberformat
SESS_ADD_FAILED = 'Tambah sptpd-invoice-detail gagal'
SESS_EDIT_FAILED = 'Edit sptpd-invoice-detail gagal'
##########
# Action #
##########
@view_config(route_name='sptpd-invoice-detail-act', renderer='json',
permission='read')
def view_act(request):
ses = request.session
req = request
params = req.params
url_dict = req.matchdict
if url_dict['act']=='grid':
# defining columns
sptpd_id = url_dict['sptpd_id'].isdigit() and url_dict['sptpd_id'] or 0
columns = []
columns.append(ColumnDT('id')) # 0
columns.append(ColumnDT('sptpd_id')) # 1
columns.append(ColumnDT('produk_id')) # 2
columns.append(ColumnDT('peruntukan_id')) # 3
columns.append(ColumnDT('produks.kode')) # 4
columns.append(ColumnDT('sektor_nm')) # 5
columns.append(ColumnDT('wilayah_nm')) # 6
columns.append(ColumnDT('nama')) # 7
columns.append(ColumnDT('peruntukans.nama')) # 8
columns.append(ColumnDT('produks.nama')) # 9
columns.append(ColumnDT('volume', filter=_DTnumberformat)) # 10
columns.append(ColumnDT('harga_jual', filter=_DTnumberformat)) # 11
columns.append(ColumnDT('dpp', filter=_DTnumberformat)) # 12
columns.append(ColumnDT('tarif')) #, filter=_DTnumberformat)) # 13
columns.append(ColumnDT('total_pajak',filter=_DTnumberformat)) # 14
columns.append(ColumnDT('alamat')) # 15
columns.append(ColumnDT('keterangan')) # 16
columns.append(ColumnDT('wilayah_id')) # 17
query = DBSession.query(InvoiceDet).\
join(Sptpd,Produk,Peruntukan).\
filter(InvoiceDet.sptpd_id==sptpd_id,
InvoiceDet.produk_id==Produk.id,
InvoiceDet.peruntukan_id==Peruntukan.id,
InvoiceDet.wilayah_id==Wilayah.id
)
rowTable = DataTables(req, InvoiceDet, query, columns)
return rowTable.output_result()
#######
# Add #
#######
@view_config(route_name='sptpd-invoice-detail-add', renderer='json',
permission='add')
def view_add(request):
req = request
ses = req.session
params = req.params
url_dict = req.matchdict
sptpd_id = 'sptpd_id' in url_dict and url_dict['sptpd_id'] or 0
controls = dict(request.POST.items())
invoice_item_id = 'invoice_item_id' in controls and controls['invoice_item_id'] or 0
produk_id = 'produk_id' in controls and controls['produk_id'] or 0
wilayah_id = 'wilayah_id' in controls and controls['wilayah_id'] or 0
peruntukan_id = 'peruntukan_id' in controls and controls['peruntukan_id'] or 0
#Cek dulu ada penyusup gak dengan mengecek sessionnya
invoice = DBSession.query(Sptpd)\
.filter(Sptpd.id==sptpd_id).first()
if not invoice:
return {"success": False, 'msg':'Tagihan SPTPD WAPU tidak ditemukan'}
#Cek apakah produk sudah terpakai apa belum
produk = DBSession.query(InvoiceDet)\
.filter(InvoiceDet.sptpd_id == sptpd_id,
InvoiceDet.produk_id == produk_id).first()
if produk:
return {"success": False, 'msg':'Item produk tidak boleh sama.'}
#Cek lagi ditakutkan skpd ada yang iseng inject script
if invoice_item_id:
row = DBSession.query(InvoiceDet)\
.join(Sptpd)\
.filter(InvoiceDet.id==invoice_item_id,
InvoiceDet.sptpd_id==sptpd_id).first()
if not row:
return {"success": False, 'msg':'Item tidak ditemukan'}
else:
row = InvoiceDet()
row.sptpd_id = sptpd_id
row.produk_id = controls['produk_id']
row.peruntukan_id = controls['peruntukan_id']
row.p_kode = controls['p_kode']
row.produk_nm = controls['produk_nm']
row.peruntukan_nm = controls['peruntukan_nm']
row.wilayah_id = controls['wilayah_id']
row.wilayah_nm = controls['wilayah_nm']
row.volume = controls['volume'].replace('.','')
row.harga_jual = controls['harga_jual'].replace('.','')
a = float(controls['volume'].replace('.',''))*float(controls['harga_jual'].replace('.',''))
row.dpp = int(float(a))
row.nama = controls['p_nama']
row.alamat = controls['p_almt']
row.keterangan = controls['p_ket']
#inv = DBSession.query(ARInvoice.subjek_pajak_id.label('sp'),
# ARInvoice.objek_pajak_id.label('op'),
# ObjekPajak.pajak_id.label('pid'),
# ObjekPajak.wilayah_id.label('wid'),
# Pajak.tarif.label('ptr'),
# Wilayah.nama.label('wnm'),
# Sektor.nama.label('snm'),
# ).join(ObjekPajak, SubjekPajak
# ).filter(ARInvoice.id == invoice_id,
# ARInvoice.subjek_pajak_id == SubjekPajak.id,
# ARInvoice.objek_pajak_id == ObjekPajak.id,
# ).outerjoin(Wilayah, ObjekPajak.wilayah_id == Wilayah.id
# ).outerjoin(Pajak, ObjekPajak.pajak_id == Pajak.id
# ).outerjoin(Sektor, Pajak.sektor_id == Sektor.id
# ).first()
#row.subjek_pajak_id = inv.sp
#row.objek_pajak_id = inv.op
#row.pajak_id = inv.pid
row.sektor_nm = controls['sektor_nm']
row.tarif = controls['tarif']
b = float(row.dpp)*float(row.tarif/100)
row.total_pajak = int(float(b))
DBSession.add(row)
DBSession.flush()
x = row.invoice_id
#------------------------Dasar Invoice-------------------#
d = DBSession.query(func.sum(InvoiceDet.dpp)).filter(InvoiceDet.sptpd_id == x).first()
d1 = "%s" % d
if d1 == 'None':
d1 = 0
das = d1
else:
das = d1
#------------------------Pokok Invoice-------------------#
p = DBSession.query(func.sum(InvoiceDet.total_pajak)).filter(InvoiceDet.sptpd_id == x).first()
p1 = "%s" % p
if p1 == 'None':
p1 = 0
pok = p1
else:
pok = p1
#------------------------Denda Invoice-------------------#
#de = DBSession.query(ARInvoice.denda).filter(ARInvoice.id == x).first()
#de1 = "%s" % de
#------------------------Bunga Invoice-------------------#
#b = DBSession.query(ARInvoice.bunga).filter(ARInvoice.id == x).first()
#bu1 = "%s" % b
#------------------------Jumlah Invoice------------------#
ju = float(p1)
juu = int(float(ju))
ju1 = "%s" % juu
if ju1 == 'None':
ju1 = 0
jum = ju1
else:
jum = ju1
#------------------------Tarif Invoice-------------------#
t = float(d1)/float(ju1)
ta1 = "%s" % t
if ta1 == 'None':
ta1 = 0
tar = ta1[0:4]
else:
tar = ta1[0:4]
print'****--Sum DPP---------**** ',das
print'****--Sum Total-------**** ',pok
print'****--Denda-----------**** ',de1
print'****--Bunga-----------**** ',bu1
print'****--Jumlah----------**** ',jum
print'****--Tarif-----------**** ',tar
print'****--Tarif Awal------**** ',ta1
return {"success": True, 'id': row.id, "msg":'Success tambah item produk.', 'das':das, 'pok':pok, 'jum':jum, 'tar':tar}
########
# Edit #
########
def route_list(request):
return HTTPFound(location=request.route_url('sptpd-invoice'))
def query_id(request):
return DBSession.query(InvoiceDet).filter(InvoiceDet.id==request.matchdict['id'],
InvoiceDet.sptpd_id==request.matchdict['sptpd_id'])
def id_not_found(request):
msg = 'SPTPD WAPU ID %s not found.' % request.matchdict['id']
request.session.flash(msg, 'error')
return route_list(request)
##########
# Delete #
##########
@view_config(route_name='sptpd-invoice-detail-delete', renderer='json',
permission='delete')
def view_delete(request):
q = query_id(request)
row = q.first()
x = row.sptpd_id
z = row.tarif
#s = z[0:4]
if not row:
return {'success':False, "msg":self.id_not_found()}
msg = 'Data sudah dihapus'
query_id(request).delete()
DBSession.flush()
#------------------------Dasar Invoice-------------------#
d = DBSession.query(func.sum(InvoiceDet.dpp)).filter(InvoiceDet.sptpd_id == x).first()
d1 = "%s" % d
if d1 == 'None':
d1 = 0
das = d1
else:
das = d1
#------------------------Pokok Invoice-------------------#
p = DBSession.query(func.sum(InvoiceDet.total_pajak)).filter(InvoiceDet.sptpd_id == x).first()
p1 = "%s" % p
if p1 == 'None':
p1 = 0
pok = p1
else:
pok = p1
#------------------------Denda Invoice-------------------#
#de = DBSession.query(ARInvoice.denda).filter(ARInvoice.id == x).first()
#de1 = "%s" % de
#------------------------Bunga Invoice-------------------#
#b = DBSession.query(ARInvoice.bunga).filter(ARInvoice.id == x).first()
#bu1 = "%s" % b
#------------------------Jumlah Invoice------------------#
ju = float(p1) #+float(de1)+float(bu1)
juu = int(float(ju))
ju1 = "%s" % juu
if ju1 == 'None':
ju1 = 0
jum = ju1
else:
jum = ju1
#------------------------Tarif Invoice-------------------#
#t = float(d1)/float(ju1)
#ta1 = "%s" % t
#if ta1 == 'None':
# ta1 = 0
# tar = ta1[0:4]
#else:
# tar = ta1[0:4]
print'****--Sum DPP---------**** ',das
print'****--Sum Total-------**** ',pok
print'****--Denda-----------**** ',de1
print'****--Bunga-----------**** ',bu1
print'****--Jumlah----------**** ',jum
#print'****--Tarif-----------**** ',tar
#print'****--Tarif Awal------**** ',ta1
return {'success':True, "msg":msg, 'das':das, 'pok':pok, 'jum':jum, 'tar':z}
\ No newline at end of file
......@@ -61,6 +61,28 @@
${error}</p>
</div>
</div>
<div class="form-group" tal:define="field form['wp_nama']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-3" id="req-${field.oid}">
${field.title}<span id="error-${field.oid}" class="text text-danger"
tal:condition="field.required">&nbsp*</span></label>
<div class="col-md-9">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div class="form-group" tal:define="field form['wp_alamat_1']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-3" id="req-${field.oid}">
${field.title}<span id="error-${field.oid}" class="text text-danger"
tal:condition="field.required">&nbsp*</span></label>
<div class="col-md-9">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<!--unit_nm ------------------------------->
<div class="form-group" tal:define="field form['unit_nm']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-3" id="req-${field.oid}">
......@@ -243,6 +265,9 @@
$('#subjek_pajak_id').val(datum.id);
$('#subjek_pajak_us').val(datum.user);
$('#subjek_pajak_un').val(datum.unit);
$('#wp_nama').val(datum.value);
$('#wp_alamat_1').val(datum.alamat);
//Untuk headof Objek
$('#objek_pajak_nm').typeahead({
......
......@@ -34,7 +34,7 @@
<tr>
<th>ID</th>
<th>No. TBP</th>
<th>Subjek</th>
<th>Penyetor</th>
<th>Objek</th>
<th>Rekening</th>
<th>Terima</th>
......
......@@ -50,25 +50,16 @@
<li class="dropdown" tal:attributes="class request.matched_route.name in ['wp', 'wp-add', 'wp-edit', 'wp-delete'] and 'active'">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">e-Payment<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/wp">Penyetor</a></li>
<li><a href="/op">Objek</a></li>
<li><a href="/artbp">TBP</a></li>
<li><a href="/fast-pay">No. Bayar</a></li>
<li><a href="/arinvoice">No. Bayar (BUD)</a></li>
<li><a href="/arinvoiceb">No. Bayar (Bendahara)</a></li>
<li><a href="/arinvoicewp">No. Bayar (WP)</a></li>
<li><a href="/artbp">TBP</a></li>
<li><a href="/wp">Penyetor</a></li>
<li><a href="/op">Objek</a></li>
<li><a href="/report">Laporan</a></li>
</ul>
</li>
<!--li class="dropdown" tal:attributes="class request.matched_route.name in ['sptpd-wapu', 'sptpd-wapu-add', 'sptpd-wapu-edit', 'sptpd-wapu-delete'] and 'active'">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">e-SPTPD<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/sptpd/wajib">Wajib Pajak</a></li>
<li><a href="/sptpd/objek">Objek Pajak</a></li>
<li><a href="/sptpd/wapu">SPTPD WAPU</a></li>
<li><a href="/sptpd/report">Laporan</a></li>
</ul>
</li-->
<li class="dropdown" tal:attributes="class request.matched_route.name in ['arsspd', 'arsspd-add', 'arsspd-edit', 'arsspd-delete'] and 'active'">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Penerimaan<b class="caret"></b></a>
<ul class="dropdown-menu">
......@@ -76,6 +67,15 @@
<li><a href="/report/sspd">Laporan</a></li>
</ul>
</li>
<li class="dropdown" tal:attributes="class request.matched_route.name in ['sptpd-wapu', 'sptpd-wapu-add', 'sptpd-wapu-edit', 'sptpd-wapu-delete'] and 'active'">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">e-SPTPD<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/sptpd/wajib">Wajib Pungut</a></li>
<!--li><a href="/sptpd/objek">Objek Pajak</a></li-->
<li><a href="/sptpd/wapu">SPTPD</a></li>
<li><a href="/sptpd/report">Laporan</a></li>
</ul>
</li>
<!--li tal:attributes="class request.path == '/arsspd' and 'active'"><a href="/arsspd">Penerimaan</a></li-->
<li tal:attributes="class request.path == '/arsts' and 'active'"><a href="/arsts">STS</a></li>
......
<html metal:use-macro="load: ../base.pt">
<div metal:fill-slot="content">
<link href="/static/datatables/extensions/TableTools/css/dataTables.tableTools.min.css" rel="stylesheet">
<link href="/static/datatables/media/css/dataTables.bootstrap.css" rel="stylesheet">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Tambah SPTPD</h3>
</div>
<div class="panel-body">
<form id="myform" method="post" enctype="multipart/form-data" accept-charset="utf-8"
class="form-horizontal">
<fieldset class="deformFormFieldset">
<input type="hidden" name="_charset_" />
<input type="hidden" name="__formid__" value="deform"/>
<div tal:condition="'id' in form">
<div tal:define="field form['id']">
${structure:field.serialize()}
</div>
</div>
<div class="form-group">
<div tal:define="field form['unit_id']" style="display: none;">
${structure:field.serialize()}
</div>
<div tal:define="field form['unit_kd']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['unit_nm']" id="item-${field.oid}">
<div class="col-md-6">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['subjek_pajak_id']" style="display: none;">
${structure:field.serialize()}
</div>
<div tal:define="field form['subjek_pajak_nm']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-5">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['nama']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-5">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['periode_1']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['periode_2']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
s.d</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['tgl_sptpd']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['jumlah']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<script>
//$("#kode").attr('readonly',true);
//$("#das").attr('readonly',true);
//$("#pok").attr('readonly',true);
$("#jum").attr('readonly',true);
$("#tar").attr('readonly',true);
$("#unit_kd").attr('readonly',true);
</script>
</div>
<div class="form-group">
<div class="form-group col-md-2">
</div>
<div class="form-group col-md-6">
<div tal:define="field form['uploads']" id="item-${field.oid}">
<div class="col-md-12">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<label class="control-label col-md-4"></label>
<button id="deformsave" name="simpan" type="submit" class="btn btn-primary "
value="simpan">Simpan</button>
<button id="deformcancel" name="batal" type="submit" class="btn btn-danger "
value="batal">Batal</button>
</div><br><br>
</fieldset>
</form>
<script>
$(document).ready( function(){
$('#unit_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#unit_id').val(datum.id);
$('#unit_kd').val(datum.kode);
$('#subjek_pajak_nm').typeahead('setQuery', '');
$('#subjek_pajak_id').val('');
});
$('#subjek_pajak_nm').typeahead({
remote: {
url: "/sptpd/wajib/hon_sptpd/act?term=%QUERY&unit_id=",
replace: function () {
var q = "/sptpd/wajib/hon_sptpd/act?term="+$('#subjek_pajak_nm').val();
if ($('#unit_id').val()) {
q += "&unit_id="+encodeURIComponent($('#unit_id').val());
}
return q;
}
},
"hint" : true,
"cache" : false,
"highlight" : true,
"minLength" : 1,
"limit" : 15
},{
"name" : 'subjek_pajak_nm',
"displayKey": 'value',
});
$('#subjek_pajak_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#subjek_pajak_id').val(datum.id);
//$('#wp_nama').val(datum.value);
//$('#wp_alamat_1').val(datum.alamat_1);
});
});
</script>
</div>
</div>
</div>
</html>
\ No newline at end of file
<html metal:use-macro="load: ../base.pt">
<div metal:fill-slot="content">
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">Warning</h3>
</div>
<div class="panel-body">
Hapus SPTPD Wapu dengan No.Bayar ${row.kode} ?
</div>
</div>
<div tal:content="structure form"/>
</div>
</html>
<html metal:use-macro="load: ../base.pt">
<div metal:fill-slot="content">
<link href="/static/datatables/extensions/TableTools/css/dataTables.tableTools.min.css" rel="stylesheet">
<link href="/static/datatables/media/css/dataTables.bootstrap.css" rel="stylesheet">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Edit SPTPD</h3>
</div>
<div class="panel-body">
<form id="myform" method="post" enctype="multipart/form-data" accept-charset="utf-8"
class="form-horizontal">
<fieldset class="deformFormFieldset">
<input type="hidden" name="_charset_" />
<input type="hidden" name="__formid__" value="deform"/>
<div tal:condition="'id' in form">
<div tal:define="field form['id']">
${structure:field.serialize()}
</div>
</div>
<div class="form-group">
<div tal:define="field form['unit_id']" style="display: none;">
${structure:field.serialize()}
</div>
<div tal:define="field form['unit_kd']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['unit_nm']" id="item-${field.oid}">
<div class="col-md-6">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['subjek_pajak_id']" style="display: none;">
${structure:field.serialize()}
</div>
<div tal:define="field form['subjek_pajak_nm']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-5">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['nama']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-5">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['periode_1']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['periode_2']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
s.d</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['tgl_sptpd']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['jumlah']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<script>
//$("#kode").attr('readonly',true);
//$("#das").attr('readonly',true);
//$("#pok").attr('readonly',true);
$("#jum").attr('readonly',true);
$("#tar").attr('readonly',true);
$("#unit_kd").attr('readonly',true);
//$("#kode").attr('readonly',true);
</script>
</div>
<div class="form-group">
<div class="form-group col-md-2">
</div>
<div class="form-group col-md-6">
<div tal:define="field form['uploads']" id="item-${field.oid}">
<div class="col-md-12">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
</div>
<script>
$(document).ready( function(){
$('#unit_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#unit_id').val(datum.id);
$('#unit_kd').val(datum.kode);
$('#subjek_pajak_nm').typeahead('setQuery', '');
$('#subjek_pajak_id').val('');
});
$('#subjek_pajak_nm').typeahead({
remote: {
url: "/sptpd/wajib/hon_sptpd/act?term=%QUERY&unit_id=",
replace: function () {
var q = "/sptpd/wajib/hon_sptpd/act?term="+$('#subjek_pajak_nm').val();
if ($('#unit_id').val()) {
q += "&unit_id="+encodeURIComponent($('#unit_id').val());
}
return q;
}
},
"hint" : true,
"cache" : false,
"highlight" : true,
"minLength" : 1,
"limit" : 15
},{
"name" : 'subjek_pajak_nm',
"displayKey": 'value',
});
$('#subjek_pajak_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#subjek_pajak_id').val(datum.id);
$('#wp_nama').val(datum.value);
$('#wp_alamat_1').val(datum.alamat_1);
});
});
</script>
<div class="col-md-6">
<label class="control-label col-md-4"></label>
<button id="deformsave" name="simpan" type="submit" class="btn btn-primary "
value="simpan">Simpan</button>
<button id="deformcancel" name="batal" type="submit" class="btn btn-danger "
value="batal">Batal</button>
</div>
</fieldset>
</form>
</div>
</div>
<table id="table1" name="table1" class="table table-bordered table-hover table-condensed" >
<thead>
<tr>
<th>Index</th>
<th>SPTPD ID</th>
<th>Produk ID</th>
<th>Peruntukan ID</th>
<th>Kode Produk</th>
<th>Sektor</th>
<th>Kabupaten / Kota</th>
<th>Perusahaan / Costumer</th>
<th>Peruntukan</th>
<th>Jenis BBM</th>
<th>Volume BBM (liter)</th>
<th>Harga Jual Per Liter</th>
<th>DPP (Rp.)</th>
<th>Tarif</th>
<th>Total PBBKB</th>
<th>Alamat</th>
<th>Keterangan</th>
<th>Wilayah ID</th>
</tr>
</thead>
<tbody>
</tbody>
</table><br><br><br>
<script src="/static/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="/static/datatables/media/js/jquery.dataTables.ext.js"></script>
<script src="/static/datatables/extensions/TableTools/media/js/ZeroClipboard.js"></script>
<script src="/static/datatables/media/js/dataTables.bootstrap.js"></script>
<script>
var mID;
var oTable;
var iPos;
var sptpd_id = $('#id').val();
var oTableUrl = "/sptpd/invoice/detail/"+sptpd_id+"/grid/act";
var tb_array = [
'<div class="btn-group pull-left">',
//'<button id="btn_import" class="btn btn btn-success" type="button">Import</button>',
'<button id="btn_delete" class="btn btn btn-danger" type="button">Hapus</button>',
'&nbsp;',
'</div>',
];
var tb = tb_array.join(' ');
function formatNumber(n) {
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
}
$(document).ready(function () {
oTable = $('#table1').DataTable({
ajaxSource : oTableUrl,
//"bStateSave" : true,
serverSide : true,
"bProcessing" : true,
"sDom" : '<"toolbar">lfrtip',
"bScrollCollapse": true,
"bSort" : true,
"bSearch" : true,
"bInfo" : false,
"bFilter" : false,
"bAutoWidth" : false,
"bPaginate" : true,
"sPaginationType": "full_numbers",
"lengthMenu": [
[5, 10, 15],
[5, 10, 15]
],
"aoColumnDefs": [{
"bSearchable": false,
"bVisible" : false,
"aTargets" : [0,1,2,3,4,15,16,17]
},{
"bSearchable": false,
"bSortable" : false,
"aTargets" : [5,6,7,8,9,10,11,12,13,14]
}
],
"aoColumns": [
null,
{"sWidth": "10px"}, // 1
{"sWidth": "10px"}, // 2
{"sWidth": "10px"}, // 3
{"sWidth": "10px"}, // 4
{"sWidth": "70px"}, // 5
{"sWidth": "60px"}, // 6
{"sWidth": "70px"}, // 7
{"sWidth": "80px"}, // 8
{"sWidth": "80px"}, // 9
{"sWidth": "10px", "sClass": "right"}, // 10
{"sWidth": "35px", "sClass": "right"}, // 11
{"sWidth": "35px", "sClass": "right"}, // 12
{"sWidth": "10px", "sClass": "right"}, // 13
{"sWidth": "35px", "sClass": "right"}, // 14
{"sWidth": "10px"}, // 15
{"sWidth": "10px"}, // 16
{"sWidth": "10px"}, // 17
],
"fnRowCallback": function (nRow, aData, iDisplayIndex) {
$(nRow).on("click", function (event) {
if ($(this).hasClass('row_selected')) {
/* mID = '';
$(this).removeClass('row_selected'); */
} else {
var data = oTable.fnGetData(this);
mID = data[0];
$("#invoice_item_id").val(data[0]);
$("#sptpd_id").val(data[1]);
$("#produk_id").val(data[2]);
$('#peruntukan_id').val(data[3]);
$('#p_kode').val(data[4]);
$('#sektor_nm').val(data[5]);
$('#wilayah_nm').val(data[6]);
$('#p_nama').val(data[7]);
$('#peruntukan_nm').val(data[8]);
$('#produk_nm').val(data[9]);
$('#volume').val(data[10]);
$('#harga_jual').val(data[11]);
$('#dpp').val(data[12]);
$('#p_tarif').val(data[13]);
$('#total_pajak').val(data[14]);
$('#p_almt').val(data[15]);
$('#p_ket').val(data[16]);
$('#wilayah_id').val(data[17]);
oTable.$('tr.row_selected').removeClass('row_selected');
$(this).addClass('row_selected');
}
})
},
});
$("div.toolbar").html(tb);
$('#table1 tbody').on('click', 'tr', function () {
if ($(this).hasClass('selected')) {
$(this).removeClass('selected');
} else {
var aData = oTable.row( this ).data();
mID = aData[0];
oTable.$('tr.selected').removeClass('selected');
$(this).addClass('selected');
}
});
$('#btn_delete').click(function () {
if (mID) {
if (confirm('Yakin dihapus?')==true){
$.ajax({
type: "POST",
url: "/sptpd/invoice/detail/"+$("#id").val()+"/"+mID+"/delete",
success: function (html) {
if (html.success == true) {
$("#errors").html("<span class='glyphicon glyphicon-ok'></span> " + html.msg);
$("#invoice_item_id").val('');
$("#sptpd_id").val('');
$("#produk_id").val('');
$('#wilayah_id').val('');
$('#peruntukan_id').val('');
$('#p_kode').val('');
$('#produk_nm').val('');
$('#peruntukan_nm').val('');
$('#volume').val(0);
$('#harga_jual').val(0);
$('#dpp').val(0);
$('#p_tarif').val(0);
$('#total_pajak').val(0);
$('#p_nama').val('');
$('#p_almt').val('');
$('#wilayah_nm').val('');
$('#sektor_nm').val('');
$('#p_ket').val('');
$('#das').val(formatNumber(html.das));
$('#pok').val(formatNumber(html.pok));
$('#jum').val(formatNumber(html.jum));
$('#tar').val(formatNumber(html.tar));
oTable.fnReloadAjax(oTableUrl);
} else {
$("#errors").css('display', 'inline', 'important');
$("#errors").html("<span class='glyphicon glyphicon-remove'></span> " + html.msg);
}
},
beforeSend: function () {
$("#errors").css('display', 'inline', 'important');
}
});
} else {
alert('Silahkan pilih data yang akan di hapus');
}
}
});
$('#btn_print').click(function () {
alert('not implemented');
});
$("#btn_close").click(function () {
window.location = '/sptpd/wapu';
return false;
});
$("#p_kode").attr('readonly',true);
//a=$("#das").val();
//$("#das").val(formatNumber(a));
//
//b=$("#pok").val();
//$("#pok").val(formatNumber(b));
//
c=$("#jum").val();
$("#jum").val(formatNumber(c));
});
</script>
</div>
</html>
\ No newline at end of file
<html metal:use-macro="load: ../base.pt">
<div metal:fill-slot="content">
<link href="/static/datatables/extensions/TableTools/css/dataTables.tableTools.min.css" rel="stylesheet">
<link href="/static/datatables/media/css/dataTables.bootstrap.css" rel="stylesheet">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${request.title}</h3>
</div>
<div class="panel-body">
<form id="myform" method="post" enctype="multipart/form-data" accept-charset="utf-8"
class="form-horizontal">
<fieldset class="deformFormFieldset">
<input type="hidden" name="_charset_" />
<input type="hidden" name="__formid__" value="deform"/>
<div tal:condition="'id' in form">
<div tal:define="field form['id']">
${structure:field.serialize()}
</div>
</div>
<div class="form-group">
<div tal:define="field form['subjek_pajak_id']" style="display: none;">
${structure:field.serialize()}
</div>
<div tal:define="field form['subjek_pajak_nm']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-5">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['dasar']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['subjek_pajak_us']" style="display: none;">
${structure:field.serialize()}
</div>
<div tal:define="field form['subjek_pajak_un']" style="display: none;">
${structure:field.serialize()}
</div>
</div>
<div class="form-group">
<div tal:define="field form['unit_id']" style="display: none;">
${structure:field.serialize()}
</div>
<div tal:define="field form['unit_nm']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-5">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['pokok']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['objek_pajak_id']" style="display: none;">
${structure:field.serialize()}
</div>
<div tal:define="field form['objek_pajak_nm']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-5">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['denda']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<script>
$('#subjek_pajak_nm').typeahead({
"hint" : true,
"highlight": true,
"minLength": 1,
"limit" : 15,
"remote" : "/sptpd/wajib/headofnama/act?term=%QUERY",
},{
"name" : 'subjek_pajak_nm',
"displayKey": 'value',
});
$('#subjek_pajak_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#subjek_pajak_id').val(datum.id);
$('#subjek_pajak_us').val(datum.user);
$('#subjek_pajak_un').val(datum.unit);
$('#unit_nm').typeahead({
"hint" : true,
"highlight": true,
"minLength": 1,
"limit" : 15,
"remote" : "/skpd/hon_objek_sptpd/act?unit="+$("#subjek_pajak_un").val()+"&term=%QUERY",
},{
"name" : 'unit_nm',
"displayKey": 'value',
});
/* headof objek */
$('#objek_pajak_nm').typeahead({
"hint" : true,
"highlight": true,
"minLength": 1,
"limit" : 15,
"remote" : "/sptpd/objek/hon/act?subjek_pajak_id="+$("#subjek_pajak_id").val()+"&term=%QUERY",
},{
"name" : 'objek_pajak_nm',
"displayKey": 'value',
});
});
$('#unit_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#unit_id').val(datum.id);
});
$('#objek_pajak_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#objek_pajak_id').val(datum.id);
});
</script>
</div>
<div class="form-group">
<div tal:define="field form['kode']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-5">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['bunga']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['periode_1']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['periode_2']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
s.d</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['jumlah']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
<div class="form-group">
<div tal:define="field form['tgl_tetap']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-2" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['jatuh_tempo']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<div tal:define="field form['tarif']" id="item-${field.oid}">
<label for="${field.oid}" class="control-label col-md-1" id="req-${field.oid}">
${field.title}</label>
<div class="col-md-2">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
<script>
$("#kode").attr('readonly',true);
$("#das").attr('readonly',true);
$("#pok").attr('readonly',true);
$("#jum").attr('readonly',true);
$("#tar").attr('readonly',true);
</script>
</div>
<div class="form-group">
<div class="form-group col-md-2">
</div>
<div class="form-group col-md-6">
<div tal:define="field form['uploads']" id="item-${field.oid}">
<div class="col-md-12">
${structure:field.serialize()}
<p id="error-${field.oid}" class="help-block" tal:condition="field.error"
tal:repeat="error field.error.messages()">
${error}</p>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<label class="control-label col-md-4"></label>
<button id="deformsave" name="simpan" type="submit" class="btn btn-primary "
value="simpan">Simpan</button>
<button id="deformcancel" name="batal" type="submit" class="btn btn-danger "
value="batal">Batal</button>
</div>
</fieldset>
</form>
</div>
</div>
<table id="table1" name="table1" class="table table-bordered table-hover table-condensed" >
<thead>
<tr>
<th>Index</th>
<th>Invoice ID</th>
<th>Produk ID</th>
<th>Peruntukan ID</th>
<th>Kode Produk</th>
<th>Sektor</th>
<th>Kabupaten / Kota</th>
<th>Perusahaan / Costumer</th>
<th>Peruntukan</th>
<th>Jenis BBM</th>
<th>Volume BBM (liter)</th>
<th>Harga Jual Per Liter</th>
<th>DPP (Rp.)</th>
<th>Tarif</th>
<th>Total PBBKB</th>
<th>Alamat</th>
<th>Keterangan</th>
<th>Wilayah ID</th>
</tr>
</thead>
<tbody>
</tbody>
</table><br><br><br>
<div class="panel panel-default">
<div class="panel-heading">
<h5 class="panel-title">Detail</h5>
</div>
<div class="panel-body">
<form method="post" id="detail" accept-charset="utf-8" id="myform" class="form-horizontal" enctype="multipart/form-data">
<fieldset class="deformFormFieldset">
<!--------------------------------------------------------------->
<input id="invoice_item_id" type="hidden" value="" name="invoice_item_id">
<input id="invoice_id" type="hidden" value="" name="invoice_id">
<input id="produk_id" type="hidden" value="" name="produk_id">
<input id="wilayah_id" type="hidden" value="" name="wilayah_id">
<input id="peruntukan_id" type="hidden" value="" name="peruntukan_id">
<div class="form-group">
<label class="control-label col-md-1">Produk</label>
<div class="col-md-2">
<input id="p_kode" class=" form-control " type="text" value="" name="p_kode" readonly>
</div>
<div class="col-md-4">
<input id="produk_nm" class=" form-control " type="text" value="" name="produk_nm">
</div>
<label class="control-label col-md-1">Peruntukan</label>
<div class="col-md-4">
<input id="peruntukan_nm" class=" form-control " type="text" value="" name="peruntukan_nm">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-1">Volume</label>
<div class="col-md-1">
<input id="volume" class=" form-control " type="text" value="0" name="volume">
</div>
<label class="control-label col-md-1">Harga Jual</label>
<div class="col-md-1">
<input id="harga_jual" class=" form-control " type="text" value="0" name="harga_jual">
</div>
<label class="control-label col-md-1">DPP</label>
<div class="col-md-2">
<input id="dpp" class=" form-control " type="text" value="0" name="dpp" readonly>
</div>
<label class="control-label col-md-1">Tarif (%)</label>
<div class="col-md-1">
<input id="p_tarif" class=" form-control " type="text" value="0" name="p_tarif" readonly>
</div>
<label class="control-label col-md-1">Total Pajak</label>
<div class="col-md-2">
<input id="total_pajak" class=" form-control " type="text" value="0" name="total_pajak" readonly>
</div>
</div><hr>
<div class="form-group">
<label class="control-label col-md-1">Wilayah</label>
<div class="col-md-3">
<input id="wilayah_nm" class=" form-control " type="text" value="" name="wilayah_nm">
</div>
<label class="control-label col-md-1">Sektor</label>
<div class="col-md-7">
<input id="sektor_nm" class=" form-control " type="text" value="" name="sektor_nm" readonly>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-1">Perusahaan</label>
<div class="col-md-3">
<input id="p_nama" class=" form-control " type="text" value="" name="p_nama">
</div>
<label class="control-label col-md-1">Alamat</label>
<div class="col-md-7">
<input id="p_almt" class=" form-control " type="text" value="" name="p_almt">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-1">Keterangan</label>
<div class="col-md-11">
<input id="p_ket" class=" form-control " type="text" value="" name="p_ket">
</div>
</div><br>
<div class="form-group">
<label class="control-label col-md-1"></label>
<!--Button----------------------------------------------------------->
<div class="col-md-2">
<button id="produk_add" name="baru" type="button" class="btn btn-primary "
value="baru">Tambah</button>
<button id="produk_cancel" name="batal" type="reset" class="btn btn-danger "
value="batal">Batal</button>
</div>
</div>
<script>
// save
$('#produk_add').click(function () {
$('#invoice_item_id').val('');
$('#detail').submit();
});
//hon_produk
$('#produk_nm').typeahead({
"hint" : true,
"highlight": true,
"minLength": 1,
"limit" : 15,
"remote" : "/sptpd/produk/hon_produk/act?term=%QUERY",
},{
"name" : 'produk_nm',
"displayKey": 'value',
});
$('#produk_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#produk_id').val(datum.id);
$('#p_kode').val(datum.kode);
});
//hon_peruntukan
$('#peruntukan_nm').typeahead({
"hint" : true,
"highlight": true,
"minLength": 1,
"limit" : 15,
"remote" : "/sptpd/peruntukan/hon_peruntukan/act?term=%QUERY",
},{
"name" : 'peruntukan_nm',
"displayKey": 'value',
});
$('#peruntukan_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#peruntukan_id').val(datum.id);
});
//hon_wilayah
$('#wilayah_nm').typeahead({
"hint" : true,
"highlight": true,
"minLength": 1,
"limit" : 15,
"remote" : "/wilayah/hon_detail_sptpd_wapu/act?term=%QUERY",
},{
"name" : 'wilayah_nm',
"displayKey": 'value',
});
$('#wilayah_nm').bind('typeahead:selected', function(obj, datum, name) {
$('#wilayah_id').val(datum.id);
});
$( "#detail" ).submit(function( event ) {
var invoice_id;
var is_success;
is_success = true;
invoice_id = $('#id').val();
if (!invoice_id) {
is_success = false;
$("#errors").css('display', 'inline', 'important');
$("#errors").html("<span class='glyphicon glyphicon-remove'></span> " + 'Simpan Dulu Headernya');
}
if (is_success){
$.ajax({
type: "POST",
url: "/sptpd/invoice/detail/"+invoice_id+"/add",
data: $('#detail').serialize(),
success: function (html) {
if (html.success == true) {
$("#errors").html("<span class='glyphicon glyphicon-ok'></span> " + html.msg);
$("#invoice_item_id").val('');
$("#invoice_id").val('');
$("#produk_id").val('');
$('#wilayah_id').val('');
$('#peruntukan_id').val('');
$('#p_kode').val('');
$('#produk_nm').val('');
$('#peruntukan_nm').val('');
$('#volume').val(0);
$('#harga_jual').val(0);
$('#dpp').val(0);
$('#p_tarif').val(0);
$('#total_pajak').val(0);
$('#p_nama').val('');
$('#p_almt').val('');
$('#wilayah_nm').val('');
$('#sektor_nm').val('');
$('#p_ket').val('');
$('#das').val(formatNumber(html.das));
$('#pok').val(formatNumber(html.pok));
$('#jum').val(formatNumber(html.jum));
$('#tar').val(formatNumber(html.tar));
oTable.fnReloadAjax(oTableUrl);
} else {
$("#errors").css('display', 'inline', 'important');
$("#errors").html("<span class='glyphicon glyphicon-remove'></span> " + html.msg);
var a = html.msg;
alert(a);
}
},
beforeSend: function () {
$("#errors").css('display', 'inline', 'important');
}
});
}
event.preventDefault();
});
</script>
</fieldset>
</form>
</div> <!--panel-body-->
</div>
<script src="/static/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="/static/datatables/media/js/jquery.dataTables.ext.js"></script>
<script src="/static/datatables/extensions/TableTools/media/js/ZeroClipboard.js"></script>
<script src="/static/datatables/media/js/dataTables.bootstrap.js"></script>
<script>
var mID;
var oTable;
var iPos;
var invoice_id = $('#id').val();
var oTableUrl = "/sptpd/invoice/detail/"+invoice_id+"/grid/act";
var tb_array = [
'<div class="btn-group pull-left">',
//'<button id="btn_import" class="btn btn btn-success" type="button">Import</button>',
'<button id="btn_delete" class="btn btn btn-danger" type="button">Hapus</button>',
'&nbsp;',
'</div>',
];
var tb = tb_array.join(' ');
function formatNumber(n) {
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
}
$(document).ready(function () {
oTable = $('#table1').dataTable({
"sAjaxSource" : oTableUrl,
"bStateSave" : true,
"bServerSide" : true,
"bProcessing" : true,
"sDom" : '<"toolbar">lfrtip',
"bScrollCollapse": true,
"bSort" : true,
"bInfo" : false,
"bFilter" : false,
"bAutoWidth" : false,
"bPaginate" : true,
"sPaginationType": "full_numbers",
"lengthMenu": [
[5, 10, 15],
[5, 10, 15]
],
"aoColumnDefs": [{
"bSearchable": false,
"bVisible" : false,
"aTargets" : [0,1,2,3,4,15,16,17]
},{
"bSearchable": false,
"bSortable" : false,
"aTargets" : [5,6,7,8,9,10,11,12,13,14]
}
],
"aoColumns": [
null,
{"sWidth": "10px"}, // 1
{"sWidth": "10px"}, // 2
{"sWidth": "10px"}, // 3
{"sWidth": "10px"}, // 4
{"sWidth": "70px"}, // 5
{"sWidth": "60px"}, // 6
{"sWidth": "70px"}, // 7
{"sWidth": "80px"}, // 8
{"sWidth": "80px"}, // 9
{"sWidth": "10px", "sClass": "right"}, // 10
{"sWidth": "35px", "sClass": "right"}, // 11
{"sWidth": "35px", "sClass": "right"}, // 12
{"sWidth": "10px", "sClass": "right"}, // 13
{"sWidth": "35px", "sClass": "right"}, // 14
{"sWidth": "10px"}, // 15
{"sWidth": "10px"}, // 16
{"sWidth": "10px"}, // 17
],
"fnRowCallback": function (nRow, aData, iDisplayIndex) {
$(nRow).on("click", function (event) {
if ($(this).hasClass('row_selected')) {
/* mID = '';
$(this).removeClass('row_selected'); */
} else {
var data = oTable.fnGetData(this);
mID = data[0];
$("#invoice_item_id").val(data[0]);
$("#invoice_id").val(data[1]);
$("#produk_id").val(data[2]);
$('#peruntukan_id').val(data[3]);
$('#p_kode').val(data[4]);
$('#sektor_nm').val(data[5]);
$('#wilayah_nm').val(data[6]);
$('#p_nama').val(data[7]);
$('#peruntukan_nm').val(data[8]);
$('#produk_nm').val(data[9]);
$('#volume').val(data[10]);
$('#harga_jual').val(data[11]);
$('#dpp').val(data[12]);
$('#p_tarif').val(data[13]);
$('#total_pajak').val(data[14]);
$('#p_almt').val(data[15]);
$('#p_ket').val(data[16]);
$('#wilayah_id').val(data[17]);
oTable.$('tr.row_selected').removeClass('row_selected');
$(this).addClass('row_selected');
}
})
},
});
$("div.toolbar").html(tb);
$('#table1 tbody').on('click', 'tr', function () {
if ($(this).hasClass('selected')) {
$(this).removeClass('selected');
} else {
iPos = oTable.fnGetPosition(this);
var aData = oTable.fnGetData(iPos);
mID = aData[0];
oTable.$('tr.selected').removeClass('selected');
$(this).addClass('selected');
}
});
$('#btn_delete').click(function () {
if (mID) {
if (confirm('Yakin dihapus?')==true){
$.ajax({
type: "POST",
url: "/sptpd/invoice/detail/"+$("#id").val()+"/"+mID+"/delete",
success: function (html) {
if (html.success == true) {
$("#errors").html("<span class='glyphicon glyphicon-ok'></span> " + html.msg);
$("#invoice_item_id").val('');
$("#invoice_id").val('');
$("#produk_id").val('');
$('#wilayah_id').val('');
$('#peruntukan_id').val('');
$('#p_kode').val('');
$('#produk_nm').val('');
$('#peruntukan_nm').val('');
$('#volume').val(0);
$('#harga_jual').val(0);
$('#dpp').val(0);
$('#p_tarif').val(0);
$('#total_pajak').val(0);
$('#p_nama').val('');
$('#p_almt').val('');
$('#wilayah_nm').val('');
$('#sektor_nm').val('');
$('#p_ket').val('');
$('#das').val(formatNumber(html.das));
$('#pok').val(formatNumber(html.pok));
$('#jum').val(formatNumber(html.jum));
$('#tar').val(formatNumber(html.tar));
oTable.fnReloadAjax(oTableUrl);
} else {
$("#errors").css('display', 'inline', 'important');
$("#errors").html("<span class='glyphicon glyphicon-remove'></span> " + html.msg);
}
},
beforeSend: function () {
$("#errors").css('display', 'inline', 'important');
}
});
} else {
alert('Silahkan pilih data yang akan di hapus');
}
}
});
$('#btn_print').click(function () {
alert('not implemented');
});
$("#btn_close").click(function () {
window.location = '/sptpd/wapu';
return false;
});
$("#p_kode").attr('readonly',true);
a=$("#das").val();
$("#das").val(formatNumber(a));
b=$("#pok").val();
$("#pok").val(formatNumber(b));
c=$("#jum").val();
$("#jum").val(formatNumber(c));
});
</script>
</div>
</html>
\ No newline at end of file
<html metal:use-macro="load: ../base.pt">
<div metal:fill-slot="content">
<link href="/static/datatables/extensions/TableTools/css/dataTables.tableTools.min.css" rel="stylesheet">
<link href="/static/datatables/media/css/dataTables.bootstrap.css" rel="stylesheet">
<h4>Surat Pemberitahuan Pajak Daerah (SPTPD)</h4>
<hr>
<table id="table1" name="table1" class="table table-bordered table-hover table-condensed" >
<thead>
<tr>
<th>ID</th>
<th>No. SPTPD</th>
<th>Uraian</th>
<th>Wajib Pungut</th>
<th>Tgl. SPTPD</th>
<th>Jumlah</th>
<th>Status</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<script src="/static/datatables/media/js/jquery.dataTables.min.js"></script>
<!--script src="/static/datatables/media/js/jquery.jeditable.js')}"></script-->
<script src="/static/datatables/media/js/jquery.dataTables.ext.js"></script>
<script src="/static/datatables/extensions/TableTools/media/js/ZeroClipboard.js"></script>
<script src="/static/datatables/media/js/dataTables.bootstrap.js"></script>
<script>
var mID;
var oTable;
var iPos;
var oFormUrl = "/sptpd/wapu/";
var oTableUrl = oFormUrl+"grid/act";
$(document).ready(function () {
oTable = $('#table1').DataTable({
ajaxSource : oTableUrl,
//"bStateSave" : true,
serverSide : true,
"bProcessing" : true,
"sDom" : '<"toolbar">lfrtip',
"bScrollCollapse" : true,
"bSort" : true,
"bSearch" : true,
"bInfo" : false,
"bFilter" : true,
"bAutoWidth" : false,
"bPaginate" : true,
"sPaginationType" : "full_numbers",
"lengthMenu": [
[10, 25, 50, 100],
[10, 25, 50, 100]
],
"aoColumnDefs": [
{ "bSearchable": false,
"bVisible" : false,
"aTargets" : [0]
},{
"aTargets" : [6], // Untuk status invoice
"mRender" : function (data, type, full) {
if (data == "0") {
return 'N';
} else if (data == "1") {
return 'Posting';
}
}
}],
"aoColumns": [
null,
{"sWidth": "50px"},
{"sWidth": "100px"},
{"sWidth": "70px"},
{"sWidth": "50px"},
{"sWidth": "75px", "sClass": "right"},
{"sWidth": "20px", "sClass": "center"},
],
"fnRowCallback": function (nRow, aData, iDisplayIndex) {
$(nRow).on("click", function (event) {
if ($(this).hasClass('row_selected')) {
/* mID = '';
$(this).removeClass('row_selected'); */
} else {
var data = oTable.fnGetData(this);
oTable.$('tr.row_selected').removeClass('row_selected');
$(this).addClass('row_selected');
}
})
//Kondisi Background-color Invoice
switch(aData[6]){
case '1' :
$('td',nRow).css("background-color","#ddffdd")
break;
}
},
"language": {
"search": "Cari: ",
"paginate":{
"first": "Pertama ",
"last": "Terakhir ",
"previous": "Sebelumnya ",
"next": "Selanjutnya ",
},
"lengthMenu": "Tampil _MENU_ baris "
}
});
var tb_array = [
'<div class="btn-group pull-left">',
' <button id="btn_tambah" class="btn btn btn-primary pull-left" type="button">Tambah</button>',
' <button id="btn_edit" class="btn btn btn-primary pull-left" type="button">Edit</button>',
' <button id="btn_delete" class="btn btn btn-danger pull-left" type="button">Hapus</button>',
' <button id="btn_rincian" class="btn btn btn-primary pull-left" type="button">Rincian</button>',
' <button id="btn_sspd" class="btn btn btn-primary pull-left" type="button">SSPD</button>',
' <button id="btn_lampiran" class="btn btn btn-primary pull-left" type="button">Lampiran</button>',
' <button id="btn_sptpd" class="btn btn btn-primary pull-left" type="button">SPTPD</button>',
' <button id="btn_close" class="btn btn btn-warning" type="button">Tutup</button>',
' &nbsp;',
' <label class="pull-left">Periode',
' <input id="awal" class="input-sm" name="awal" type="text" value="${rows.awal}">',
' s.d <input id="akhir" class="input-sm" name="akhir" type="text" value="${rows.akhir}">',
' </label>',
' &nbsp;',
'</div>',
];
var tb = tb_array.join(' ');
$("div.toolbar").html(tb);
var tb_periode = [
];
var tb = tb_periode.join(' ');
$("div.periode").html(tb);
$('#awal').pickadate({"selectMonths": true,
"submitFormat": "yyyy-mm-dd",
"selectYears": true, "format": "yyyy-mm-dd"});
$('#akhir').pickadate({"selectMonths": true,
"submitFormat": "yyyy-mm-dd",
"selectYears": true, "format": "yyyy-mm-dd"});
$('#awal, #akhir').change(function(){
oTableUrl = oFormUrl+"grid/act?awal="+$('#awal').val()+"&akhir="+$('#akhir').val();
oTable.ajax.url(oTableUrl).load();
});
$('#table1 tbody').on('click', 'tr', function () {
if ($(this).hasClass('selected')) {
mID = '';
$(this).removeClass('selected');
} else {
var aData = oTable.row( this ).data();
mID = aData[0];
oTable.$('tr.selected').removeClass('selected');
$(this).addClass('selected');
}
});
$('#btn_tambah').click(function () {
window.location = oFormUrl+'add';
});
$('#btn_edit').click(function () {
if (mID) {
window.location = oFormUrl+mID+'/edit';
} else {
alert('Silahkan pilih data yang akan diedit');
}
});
$('#btn_rincian').click(function () {
url = '/reports/act/sptpd_rincian?sptpd_id='+mID
if(mID) window.open(url);
else alert('Silahkan pilih data yang akan dicetak');
});
$('#btn_sspd').click(function () {
url = '/reports/act/sptpd_sspd?sptpd_id='+mID
if(mID) window.open(url);
else alert('Silahkan pilih data yang akan dicetak');
});
$('#btn_lampiran').click(function () {
url = '/reports/act/sptpd_lampiran?sptpd_id='+mID
if(mID) window.open(url);
else alert('Silahkan pilih data yang akan dicetak');
});
$('#btn_sptpd').click(function () {
url = '/reports/act/sptpd?sptpd_id='+mID
if(mID) window.open(url);
else alert('Silahkan pilih data yang akan dicetak');
});
$('#btn_close').click(function () {
window.location = "/"
});
$('#btn_delete').click(function () {
if (mID) {
var hapus = confirm('Hapus data ini?');
if (hapus == true) {
window.location = oFormUrl+mID+'/delete';
};
} else {
alert('Silahkan pilih data yang akan dihapus');
}
});
});
</script>
</div>
</html>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<thead>
<tr>
<th>ID</th>
<th>NPWPD/ Registrasi</th>
<th>No. Registrasi</th>
<th>Nama</th>
<th>Alamat</th>
<th>Alamat ke-2</th>
......
<html metal:use-macro="load: ../base.pt">
<div metal:fill-slot="content" class="form-550">
<h4>Tambah Wajib Pajak</h4>
<h4>Tambah Wajib Pungut</h4>
<hr>
<form id="deform" method="POST" enctype="multipart/form-data" accept-charset="utf-8"
class="form-horizontal">
......
......@@ -6,7 +6,7 @@
<h3 class="panel-title">Warning</h3>
</div>
<div class="panel-body">
Hapus Wajib Pajak dengan NPWPD # ${row.kode} ${row.nama} ?
Hapus Wajib Pungut dengan NPWPD # ${row.kode} ${row.nama} ?
</div>
</div>
......
<html metal:use-macro="load: ../base.pt">
<div metal:fill-slot="content" class="form-550">
<h4>Edit Wajib Pajak</h4>
<h4>Edit Wajib Pungut</h4>
<hr>
<form id="deform" method="POST" enctype="multipart/form-data" accept-charset="utf-8"
class="form-horizontal">
......
......@@ -2,7 +2,7 @@
<div metal:fill-slot="content">
<link href="/static/datatables/extensions/TableTools/css/dataTables.tableTools.min.css" rel="stylesheet">
<link href="/static/datatables/media/css/dataTables.bootstrap.css" rel="stylesheet">
<h4>Wajib Pajak</h4>
<h4>Wajib Pungut</h4>
<hr>
<div class="container">
<!--form class="form-inline" role="form" id="frm_upload" name="frm_upload">
......
......@@ -106,7 +106,7 @@ class AddSchema(colander.Schema):
kode = colander.SchemaNode(
colander.String(),
missing=colander.drop,
title ="NPWPD/No.Reg"
title ="No. Registrasi"
)
nama = colander.SchemaNode(
colander.String()
......@@ -181,7 +181,7 @@ def get_form(request, class_form):
schema.request = request
return Form(schema, buttons=('simpan','batal'))
def save(request,values, row=None):
def save(request, values, row=None):
login = None
if not row:
......@@ -226,7 +226,7 @@ def save(request,values, row=None):
login.status = values['status']
login.user_name = values['email']
login.email = values['email']
login.password = values['kode']
login.password = row.kode
DBSession.add(login)
DBSession.flush()
......@@ -548,7 +548,11 @@ def view_act(request):
elif url_dict['act']=='hon2':
term = 'term' in params and params['term'] or ''
u = request.user.id
rows = DBSession.query(SubjekPajak.id, SubjekPajak.nama, SubjekPajak.user_id, SubjekPajak.unit_id
rows = DBSession.query(SubjekPajak.id,
SubjekPajak.nama,
SubjekPajak.user_id,
SubjekPajak.unit_id,
SubjekPajak.alamat_1
).join(Unit
).outerjoin(UserUnit
).filter(SubjekPajak.nama.ilike('%%%s%%' % term),
......@@ -565,6 +569,7 @@ def view_act(request):
d['value'] = k[1]
d['user'] = k[2]
d['unit'] = k[3]
d['alamat'] = k[4]
r.append(d)
return r
......
......@@ -231,7 +231,7 @@ def save_request(values, request, row=None):
row = save(request, values, row)
print '----------------ROW-------------------',row
if row:
request.session.flash('Wajib Pajak %s %s sudah disimpan.' % (row.kode, row.nama))
request.session.flash('Wajib Pungut %s %s sudah disimpan.' % (row.kode, row.nama))
def route_list(request):
return HTTPFound(location=request.route_url('sptpd-wajib'))
......@@ -333,7 +333,7 @@ def view_edit(request):
return id_not_found(request)
x = DBSession.query(ARInvoice).filter(ARInvoice.subjek_pajak_id==uid).first()
if x:
request.session.flash('Tidak bisa diedit, karena penyetor sudah digunakan di daftar bayar.','error')
request.session.flash('Tidak bisa diedit, karena Wajib Pungut sudah digunakan di daftar bayar.','error')
return route_list(request)
y = DBSession.query(User.email).filter(User.email==email).first()
......@@ -405,12 +405,12 @@ def view_delete(request):
x = DBSession.query(ObjekPajak).filter(ObjekPajak.subjekpajak_id==id).first()
if x:
request.session.flash('Tidak bisa dihapus, karena penyetor sudah digunakan di Objek Pajak.','error')
request.session.flash('Tidak bisa dihapus, karena Wajib Pungut sudah digunakan di Objek Pajak.','error')
return route_list(request)
y = DBSession.query(ARInvoice).filter(ARInvoice.subjek_pajak_id==id).first()
if y:
request.session.flash('Tidak bisa dihapus, karena penyetor sudah digunakan di daftar bayar.','error')
request.session.flash('Tidak bisa dihapus, karena Wajib Pungut sudah digunakan di daftar bayar.','error')
return route_list(request)
if not row:
......@@ -418,7 +418,7 @@ def view_delete(request):
form = Form(colander.Schema(), buttons=('hapus','batal'))
if request.POST:
if 'hapus' in request.POST:
msg = 'Wajib pajak dengan NPWPD %s %s sudah dihapus.' % (row.kode, row.nama)
msg = 'Wajib pungut dengan NPWPD %s %s sudah dihapus.' % (row.kode, row.nama)
q.delete()
DBSession.flush()
request.session.flash(msg)
......@@ -472,8 +472,10 @@ def view_act(request):
SubjekPajak.kode,
SubjekPajak.nama,
SubjekPajak.user_id,
SubjekPajak.unit_id
SubjekPajak.unit_id,
SubjekPajak.alamat_1,
).filter(SubjekPajak.status_grid==1,
SubjekPajak.status==1,
SubjekPajak.nama.ilike('%%%s%%' % term)
).all()
r = []
......@@ -484,6 +486,45 @@ def view_act(request):
d['kode'] = k[1]
d['user'] = k[3]
d['unit'] = k[4]
d['alamat_1'] = k[5]
r.append(d)
return r
elif url_dict['act']=='hon_sptpd':
term = 'term' in params and params['term'] or ''
unit_id = 'unit_id' in params and params['unit_id'] or ''
if group_in(request, 'bendahara'):
print "----- Unit SPTPD ----- ",unit_id
rows = DBSession.query(SubjekPajak.id,
SubjekPajak.nama,
SubjekPajak.alamat_1,
SubjekPajak.alamat_2
).join(Unit
).outerjoin(UserUnit
).filter(SubjekPajak.nama.ilike('%%%s%%' % term),
SubjekPajak.status==1,
SubjekPajak.status_grid==1,
Unit.id==SubjekPajak.unit_id,
UserUnit.unit_id==Unit.id,
UserUnit.user_id==u
).all()
else:
rows = DBSession.query(SubjekPajak.id,
SubjekPajak.nama,
SubjekPajak.alamat_1,
SubjekPajak.alamat_2
).filter(SubjekPajak.nama.ilike('%%%s%%' % term),
SubjekPajak.status==1,
SubjekPajak.status_grid==1,
SubjekPajak.unit_id==unit_id
).all()
r = []
for k in rows:
d={}
d['id'] = k[0]
d['value'] = k[1]
d['alamat_1'] = k[2]
d['alamat_2'] = k[3]
r.append(d)
return r
......@@ -726,9 +767,25 @@ def view_csv(request):
##########
@view_config(route_name='sptpd-wajib-pdf', permission='read')
def view_pdf(request):
global awal,akhir,unit_nm,unit_al,unit_kd
params = request.params
url_dict = request.matchdict
u = request.user.id
if group_in(request, 'bendahara'):
unit_id = DBSession.query(UserUnit.unit_id).filter(UserUnit.user_id==u).first()
unit_id = '%s' % unit_id
unit_id = int(unit_id)
unit_kd = DBSession.query(Unit.kode).filter(UserUnit.unit_id==unit_id, Unit.id==unit_id).first()
unit_kd = '%s' % unit_kd
unit_nm = DBSession.query(Unit.nama).filter(UserUnit.unit_id==unit_id, Unit.id==unit_id).first()
unit_nm = '%s' % unit_nm
unit_al = DBSession.query(Unit.alamat).filter(UserUnit.unit_id==unit_id, Unit.id==unit_id).first()
unit_al = '%s' % unit_al
if url_dict['pdf']=='reg' :
query = query_reg()
if group_in(request, 'bendahara'):
......@@ -747,5 +804,10 @@ def view_pdf(request):
unit=r.unit)
rows.append(s)
print "--- ROWS ---- ",rows
if group_in(request, 'bendahara'):
pdf, filename = open_rml_pdf('wp_sptpd_ben.rml', rows2=rows,
un_nm=unit_nm,
un_al=unit_al)
else:
pdf, filename = open_rml_pdf('wp_sptpd.rml', rows2=rows)
return pdf_response(request, pdf, filename)
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!