Commit fb6334a0 by aagusti

update esipkd 25-06-2015

1 parent 6a36f63b
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<property name="ireport.scriptlethandling" value="0"/> <property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/> <property name="ireport.encoding" value="UTF-8"/>
<property name="ireport.zoom" value="1.24184264611831"/> <property name="ireport.zoom" value="1.24184264611831"/>
<property name="ireport.x" value="0"/> <property name="ireport.x" value="171"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="0"/>
<import value="net.sf.jasperreports.engine.*"/> <import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/> <import value="java.util.*"/>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{op_kode}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{op_kode}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="495" y="0" width="68" height="12"/> <reportElement stretchType="RelativeToBandHeight" x="495" y="0" width="68" height="12"/>
<box rightPadding="1"> <box rightPadding="1">
<leftPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/>
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
<textElement textAlignment="Center"> <textElement textAlignment="Center">
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{tgl_bayar}.substring(8,10)+"-"+$F{tgl_bayar}.substring(5,7)+"-"+$F{tgl_bayar}.substring(0,4)]]></textFieldExpression> <textFieldExpression><![CDATA[$F{tgl_bayar}=="None" ? "" : $F{tgl_bayar}.substring(8,10)+"-"+$F{tgl_bayar}.substring(5,7)+"-"+$F{tgl_bayar}.substring(0,4)]]></textFieldExpression>
</textField> </textField>
</band> </band>
</detail> </detail>
......
...@@ -26,17 +26,32 @@ ...@@ -26,17 +26,32 @@
<field name="logo" class="java.lang.String"> <field name="logo" class="java.lang.String">
<fieldDescription><![CDATA[logo]]></fieldDescription> <fieldDescription><![CDATA[logo]]></fieldDescription>
</field> </field>
<field name="id" class="java.lang.String">
<fieldDescription><![CDATA[id]]></fieldDescription>
</field>
<field name="tgl_sts" class="java.lang.String">
<fieldDescription><![CDATA[tgl_sts]]></fieldDescription>
</field>
<field name="unit_kd" class="java.lang.String">
<fieldDescription><![CDATA[unit_kd]]></fieldDescription>
</field>
<field name="rek_kd" class="java.lang.String">
<fieldDescription><![CDATA[rek_kd]]></fieldDescription>
</field>
<field name="rek_nm" class="java.lang.String">
<fieldDescription><![CDATA[rek_nm]]></fieldDescription>
</field>
<background> <background>
<band splitType="Stretch"/> <band splitType="Stretch"/>
</background> </background>
<title> <title>
<band height="107" splitType="Stretch"> <band height="170" splitType="Stretch">
<staticText> <staticText>
<reportElement x="0" y="82" width="495" height="15"/> <reportElement x="0" y="82" width="495" height="15"/>
<textElement textAlignment="Center"> <textElement textAlignment="Center">
<font isBold="true"/> <font isBold="true"/>
</textElement> </textElement>
<text><![CDATA[DAFTAR STS]]></text> <text><![CDATA[SURAT TANDA SETORAN]]></text>
</staticText> </staticText>
<image> <image>
<reportElement x="0" y="1" width="55" height="60"/> <reportElement x="0" y="1" width="55" height="60"/>
...@@ -73,6 +88,69 @@ ...@@ -73,6 +88,69 @@
</textElement> </textElement>
<text><![CDATA[Jl. Soekarno Hatta no. 528 Bandung]]></text> <text><![CDATA[Jl. Soekarno Hatta no. 528 Bandung]]></text>
</staticText> </staticText>
<staticText>
<reportElement x="55" y="114" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="9" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="114" width="55" height="15"/>
<textElement verticalAlignment="Top">
<font size="9" isBold="false"/>
</textElement>
<text><![CDATA[Nomor STS]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="60" y="114" width="435" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="9" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{kode}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="60" y="129" width="435" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="9" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{nama}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="129" width="55" height="15"/>
<textElement verticalAlignment="Top">
<font size="9" isBold="false"/>
</textElement>
<text><![CDATA[Uraian STS]]></text>
</staticText>
<staticText>
<reportElement x="55" y="129" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="9" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="55" y="144" width="5" height="15"/>
<textElement verticalAlignment="Top">
<font size="9" isBold="false"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="144" width="55" height="15"/>
<textElement verticalAlignment="Top">
<font size="9" isBold="false"/>
</textElement>
<text><![CDATA[Tanggal STS]]></text>
</staticText>
<textField isBlankWhenNull="true">
<reportElement x="60" y="144" width="435" height="15"/>
<textElement verticalAlignment="Top" markup="none">
<font size="9" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{tgl_sts}=="None" ? "" : $F{tgl_sts}.substring(8,10)+"-"+$F{tgl_sts}.substring(5,7)+"-"+$F{tgl_sts}.substring(0,4)]]></textFieldExpression>
</textField>
</band> </band>
</title> </title>
<pageHeader> <pageHeader>
...@@ -101,7 +179,7 @@ ...@@ -101,7 +179,7 @@
<textElement textAlignment="Center"> <textElement textAlignment="Center">
<font size="8" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
<text><![CDATA[Kode]]></text> <text><![CDATA[Kode Rekening]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="361" y="0" width="134" height="12"/> <reportElement x="361" y="0" width="134" height="12"/>
...@@ -145,7 +223,7 @@ ...@@ -145,7 +223,7 @@
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{kode}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{rek_kd}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="76" y="0" width="215" height="12"/> <reportElement stretchType="RelativeToBandHeight" x="76" y="0" width="215" height="12"/>
...@@ -156,7 +234,7 @@ ...@@ -156,7 +234,7 @@
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{nama}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{rek_nm}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="361" y="0" width="134" height="12"/> <reportElement stretchType="RelativeToBandHeight" x="361" y="0" width="134" height="12"/>
...@@ -169,7 +247,7 @@ ...@@ -169,7 +247,7 @@
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{unit_nm}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{unit_nm}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="291" y="0" width="70" height="12"/> <reportElement stretchType="RelativeToBandHeight" x="291" y="0" width="70" height="12"/>
<box leftPadding="0" rightPadding="1"> <box leftPadding="0" rightPadding="1">
<leftPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/>
......
...@@ -299,7 +299,11 @@ class ViewLaporan(BaseViews): ...@@ -299,7 +299,11 @@ class ViewLaporan(BaseViews):
###################### ARSTS ###################### ARSTS
elif url_dict['act']=='r300' : elif url_dict['act']=='r300' :
query = DBSession.query(ARSts).join(Unit).order_by(ARSts.kode).all() query = DBSession.query(ARSts.id, ARSts.kode, ARSts.nama, ARSts.tgl_sts,
Unit.kode.label('unit_kd'), Unit.nama.label('unit_nm'),
Rekening.kode.label('rek_kd'), Rekening.nama.label('rek_nm'),
ARStsItem.jumlah
).filter(ARSts.unit_id==Unit.id, ARSts.id==ARStsItem.sts_id, ARStsItem.rekening_id==Rekening.id, ARSts.id==id).order_by(Rekening.kode).all()
generator = r300Generator() generator = r300Generator()
pdf = generator.generate(query) pdf = generator.generate(query)
response=req.response response=req.response
...@@ -568,8 +572,12 @@ class r300Generator(JasperGenerator): ...@@ -568,8 +572,12 @@ class r300Generator(JasperGenerator):
ET.SubElement(xml_greeting, "id").text = unicode(row.id) ET.SubElement(xml_greeting, "id").text = unicode(row.id)
ET.SubElement(xml_greeting, "kode").text = row.kode ET.SubElement(xml_greeting, "kode").text = row.kode
ET.SubElement(xml_greeting, "nama").text = row.nama ET.SubElement(xml_greeting, "nama").text = row.nama
ET.SubElement(xml_greeting, "tgl_sts").text = unicode(row.tgl_sts)
ET.SubElement(xml_greeting, "unit_kd").text = row.unit_kd
ET.SubElement(xml_greeting, "unit_nm").text = row.unit_nm
ET.SubElement(xml_greeting, "rek_kd").text = row.rek_kd
ET.SubElement(xml_greeting, "rek_nm").text = row.rek_nm
ET.SubElement(xml_greeting, "jumlah").text = unicode(row.jumlah) ET.SubElement(xml_greeting, "jumlah").text = unicode(row.jumlah)
ET.SubElement(xml_greeting, "unit_nm").text = row.units.nama
ET.SubElement(xml_greeting, "logo").text = logo ET.SubElement(xml_greeting, "logo").text = logo
return self.root return self.root
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
'<div class="btn-group pull-left">', '<div class="btn-group pull-left">',
'<button id="btn_tambah" class="btn btn btn-primary pull-left" type="button">Pilih</button>', '<button id="btn_tambah" class="btn btn btn-primary pull-left" type="button">Pilih</button>',
'<button id="btn_delete" class="btn btn btn-danger pull-left" type="button">Hapus</button>', '<button id="btn_delete" class="btn btn btn-danger pull-left" type="button">Hapus</button>',
'<button id="btn_print" class="btn btn btn-primary pull-left" type="button">Cetak</button>', //'<button id="btn_print" class="btn btn btn-primary pull-left" type="button">Cetak</button>',
//' <button id="btn_close" class="btn btn btn-warning" type="button">Tutup</button>', //' <button id="btn_close" class="btn btn btn-warning" type="button">Tutup</button>',
' &nbsp;', ' &nbsp;',
'</div>', '</div>',
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
window.location = "/" window.location = "/"
}); });
$('#tanggal').click( /*$('#tanggal').click(
function(){ function(){
if (!Modernizr.inputtypes['date'] || if (!Modernizr.inputtypes['date'] ||
"date" != "date"){ "date" != "date"){
...@@ -137,10 +137,16 @@ ...@@ -137,10 +137,16 @@
"selectYears": true, "format": "yyyy-mm-dd"}); "selectYears": true, "format": "yyyy-mm-dd"});
} }
} }
); );*/
$('#btn_print').click(function () { $('#btn_print').click(function () {
$('#dlgRpt').modal('show'); //$('#dlgRpt').modal('show');
url = "/reports/act/r300?id="+mID;
if (mID) {
window.open(url);
} else {
alert('Silahkan pilih Kode STS');
}
}); });
$('#btn_pil_rpt').click(function () { $('#btn_pil_rpt').click(function () {
......
...@@ -109,7 +109,8 @@ ...@@ -109,7 +109,8 @@
}); });
$('#btn_print').click(function () { $('#btn_print').click(function () {
url = "/reports/act/r100" url = "/reports/act/r100?id="+mID;
//url = "/reports/act/r100"
if (mID) { if (mID) {
window.open(url); window.open(url);
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!