1
<?xml version="1.0" encoding="UTF-8"?>
2
<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="ledger_jasper_report" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="bccf00f1-4850-4253-b8cb-c72b043316a4">
3
<property name="ireport.zoom" value="1.1000000000000019"/>
4
<property name="ireport.x" value="0"/>
5
<property name="ireport.y" value="0"/>
6
<parameter name="sum_balance" class="java.lang.Long">
7
<parameterDescription><![CDATA[sum_balance]]></parameterDescription>
9
<parameter name="date" class="java.lang.String">
10
<parameterDescription><![CDATA[date]]></parameterDescription>
12
<parameter name="account" class="java.lang.String">
13
<parameterDescription><![CDATA[account]]></parameterDescription>
15
<parameter name="entry_label" class="java.lang.String">
16
<parameterDescription><![CDATA[entry_label]]></parameterDescription>
18
<parameter name="debit" class="java.lang.String">
19
<parameterDescription><![CDATA[debit]]></parameterDescription>
21
<parameter name="credit" class="java.lang.String">
22
<parameterDescription><![CDATA[credit]]></parameterDescription>
24
<parameter name="balance" class="java.lang.String">
25
<parameterDescription><![CDATA[balance]]></parameterDescription>
27
<parameter name="ref" class="java.lang.String">
28
<parameterDescription><![CDATA[ref]]></parameterDescription>
30
<parameter name="partner_ledger" class="java.lang.String">
31
<parameterDescription><![CDATA[partner_ledger]]></parameterDescription>
33
<parameter name="acc_rec" class="java.lang.String">
34
<parameterDescription><![CDATA[acc_rec]]></parameterDescription>
36
<parameter name="partner" class="java.lang.String">
37
<parameterDescription><![CDATA[partner]]></parameterDescription>
39
<parameter name="fiscal_yr" class="java.lang.String">
40
<parameterDescription><![CDATA[fiscal_yr]]></parameterDescription>
42
<parameter name="filter_by" class="java.lang.String">
43
<parameterDescription><![CDATA[filter_by]]></parameterDescription>
45
<parameter name="target_move" class="java.lang.String">
46
<parameterDescription><![CDATA[target_move]]></parameterDescription>
48
<parameter name="partner_name" class="java.lang.String">
49
<parameterDescription><![CDATA[partner_name]]></parameterDescription>
51
<parameter name="fiscal_year" class="java.lang.String">
52
<parameterDescription><![CDATA[fiscal_year]]></parameterDescription>
54
<parameter name="start_period" class="java.lang.String">
55
<parameterDescription><![CDATA[start_period]]></parameterDescription>
57
<parameter name="end_period" class="java.lang.String">
58
<parameterDescription><![CDATA[end_period]]></parameterDescription>
60
<parameter name="period_from" class="java.lang.String">
61
<parameterDescription><![CDATA[period_from]]></parameterDescription>
63
<parameter name="period_to" class="java.lang.String">
64
<parameterDescription><![CDATA[period_to]]></parameterDescription>
66
<parameter name="company" class="java.lang.String">
67
<parameterDescription><![CDATA[company]]></parameterDescription>
69
<parameter name="way" class="java.lang.String">
70
<parameterDescription><![CDATA[way]]></parameterDescription>
72
<parameter name="jnl_ref" class="java.lang.String">
73
<parameterDescription><![CDATA[jnl_ref]]></parameterDescription>
75
<parameter name="doc_balance" class="java.lang.String">
76
<parameterDescription><![CDATA[doc_balance]]></parameterDescription>
78
<parameter name="tot_balance" class="java.lang.String">
79
<parameterDescription><![CDATA[tot_balance]]></parameterDescription>
81
<queryString language="xPath">
84
<field name="date" class="java.lang.String">
85
<fieldDescription><![CDATA[date]]></fieldDescription>
87
<field name="journal" class="java.lang.String">
88
<fieldDescription><![CDATA[journal]]></fieldDescription>
90
<field name="account" class="java.lang.String">
91
<fieldDescription><![CDATA[account]]></fieldDescription>
93
<field name="name" class="java.lang.String">
94
<fieldDescription><![CDATA[name]]></fieldDescription>
96
<field name="debit" class="java.math.BigDecimal">
97
<fieldDescription><![CDATA[debit]]></fieldDescription>
99
<field name="credit" class="java.math.BigDecimal">
100
<fieldDescription><![CDATA[credit]]></fieldDescription>
102
<field name="reconcile" class="java.lang.String">
103
<fieldDescription><![CDATA[reconcile]]></fieldDescription>
105
<field name="invoice_id" class="java.lang.String">
106
<fieldDescription><![CDATA[invoice_id]]></fieldDescription>
108
<field name="ref" class="java.lang.String">
109
<fieldDescription><![CDATA[ref]]></fieldDescription>
111
<variable name="debit_sum" class="java.math.BigDecimal" resetType="Group" resetGroup="Invoice Group" calculation="Sum">
112
<variableExpression><![CDATA[$F{debit}]]></variableExpression>
114
<variable name="credit_sum" class="java.math.BigDecimal" resetType="Group" resetGroup="Invoice Group" calculation="Sum">
115
<variableExpression><![CDATA[$F{credit}]]></variableExpression>
117
<variable name="total_sum" class="java.math.BigDecimal" incrementType="Group" incrementGroup="Invoice Group" calculation="Sum">
118
<variableExpression><![CDATA[( $P{way} == "debit_to_credit" ? $V{debit_sum} - $V{credit_sum} : $V{credit_sum} - $V{debit_sum} )]]></variableExpression>
120
<group name="Invoice Group">
121
<groupExpression><![CDATA[$F{invoice_id}]]></groupExpression>
124
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
125
<reportElement uuid="9e611b89-3ca9-4575-aa61-a62cfcf66902" stretchType="RelativeToTallestObject" x="644" y="0" width="84" height="20"/>
126
<box rightPadding="2"/>
127
<textElement textAlignment="Right" verticalAlignment="Middle"/>
128
<textFieldExpression><![CDATA[( $P{way} == "debit_to_credit" ? $V{debit_sum} - $V{credit_sum} : $V{credit_sum} - $V{debit_sum} )]]></textFieldExpression>
130
<textField isStretchWithOverflow="true">
131
<reportElement uuid="f80de2a3-a66e-4b1e-96e4-e27b310213b2" stretchType="RelativeToTallestObject" x="464" y="0" width="180" height="20"/>
132
<textElement textAlignment="Right" verticalAlignment="Middle">
133
<font isBold="true"/>
135
<textFieldExpression><![CDATA[$P{doc_balance} + " :"]]></textFieldExpression>
141
<band splitType="Stretch"/>
145
<textField isBlankWhenNull="true">
146
<reportElement uuid="c57c3a69-22b7-418b-a8da-8df607dfbdef" x="158" y="15" width="491" height="20"/>
147
<textElement textAlignment="Center"/>
148
<textFieldExpression><![CDATA[$P{company}]]></textFieldExpression>
151
<reportElement uuid="4dc4d737-a83a-4f77-9553-bfdf08959cc0" x="649" y="15" width="153" height="20"/>
152
<box rightPadding="2"/>
153
<textElement textAlignment="Right"/>
154
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
157
<reportElement uuid="af53d6ac-43a3-4873-bcb3-87b3ac2ee4d9" x="0" y="33" width="802" height="2"/>
159
<textField pattern="dd/MM/yyyy HH.mm.ss">
160
<reportElement uuid="bc213174-3100-4e16-ad3c-2715bceb57d6" x="0" y="15" width="158" height="20"/>
162
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
167
<band height="157" splitType="Stretch">
169
<reportElement uuid="5f63b58a-5bc2-433e-b90b-2a3dc2f64cfb" x="0" y="0" width="802" height="20"/>
170
<textElement textAlignment="Center">
173
<textFieldExpression><![CDATA[$P{partner_ledger}]]></textFieldExpression>
176
<reportElement uuid="c451aa54-d119-4fd9-b914-4be9804086c0" x="0" y="20" width="802" height="20"/>
177
<textElement textAlignment="Center">
180
<textFieldExpression><![CDATA[$P{acc_rec}]]></textFieldExpression>
183
<reportElement uuid="f0d413f6-5589-418e-86b1-9bf560428d71" x="0" y="47" width="243" height="20"/>
184
<textElement textAlignment="Center">
185
<font isBold="true"/>
187
<textFieldExpression><![CDATA[$P{partner}]]></textFieldExpression>
190
<reportElement uuid="5b6460a1-54bb-4a6f-a6ce-bd63102790f7" x="243" y="47" width="140" height="20"/>
191
<textElement textAlignment="Center">
192
<font isBold="true"/>
194
<textFieldExpression><![CDATA[$P{fiscal_yr}]]></textFieldExpression>
197
<reportElement uuid="4e976a67-31b3-46ba-86c9-3d87e81bb827" x="383" y="47" width="266" height="20"/>
198
<textElement textAlignment="Center">
199
<font isBold="true"/>
201
<textFieldExpression><![CDATA[$P{filter_by}]]></textFieldExpression>
204
<reportElement uuid="91992c95-7721-41b2-89a4-815563721fe1" x="649" y="47" width="153" height="20"/>
205
<textElement textAlignment="Center">
206
<font isBold="true"/>
208
<textFieldExpression><![CDATA[$P{target_move}]]></textFieldExpression>
210
<textField isBlankWhenNull="true">
211
<reportElement uuid="b66a9433-3027-493a-a564-bd0d90fd2efa" x="243" y="67" width="140" height="57"/>
212
<textElement textAlignment="Center"/>
213
<textFieldExpression><![CDATA[$P{fiscal_year}]]></textFieldExpression>
215
<textField isBlankWhenNull="true">
216
<reportElement uuid="76702679-615d-4495-8893-c558334012ee" x="383" y="67" width="133" height="20"/>
217
<textElement textAlignment="Center"/>
218
<textFieldExpression><![CDATA[$P{start_period}]]></textFieldExpression>
220
<textField isBlankWhenNull="true">
221
<reportElement uuid="7c82e7b3-1e4f-4716-9413-7bca0076396a" x="516" y="67" width="133" height="20"/>
222
<textElement textAlignment="Center"/>
223
<textFieldExpression><![CDATA[$P{end_period}]]></textFieldExpression>
225
<textField isBlankWhenNull="true">
226
<reportElement uuid="a5837e8e-ec99-4786-9515-9b60961fdbc7" x="383" y="86" width="133" height="37"/>
227
<textElement textAlignment="Center"/>
228
<textFieldExpression><![CDATA[$P{period_from}]]></textFieldExpression>
230
<textField isBlankWhenNull="true">
231
<reportElement uuid="dab1f709-ff99-4e05-8606-2669f5cfdb92" x="516" y="86" width="133" height="37"/>
232
<textElement textAlignment="Center"/>
233
<textFieldExpression><![CDATA[$P{period_to}]]></textFieldExpression>
235
<textField isStretchWithOverflow="true">
236
<reportElement uuid="e5d8eb0e-97cd-4bde-984e-6cd04adc379d" stretchType="RelativeToTallestObject" x="0" y="131" width="67" height="20"/>
237
<box leftPadding="2">
238
<topPen lineWidth="0.0"/>
239
<leftPen lineWidth="0.0"/>
240
<bottomPen lineWidth="0.5"/>
241
<rightPen lineWidth="0.0"/>
243
<textElement verticalAlignment="Middle">
244
<font isBold="true" isUnderline="false"/>
246
<textFieldExpression><![CDATA[$P{date}]]></textFieldExpression>
249
<reportElement uuid="2a3621f9-11d0-4b0e-acf5-117ea13a8f70" stretchType="RelativeToTallestObject" x="67" y="131" width="106" height="20"/>
250
<box leftPadding="2">
251
<topPen lineWidth="0.0"/>
252
<leftPen lineWidth="0.0"/>
253
<bottomPen lineWidth="0.5"/>
254
<rightPen lineWidth="0.0"/>
256
<textElement verticalAlignment="Middle">
257
<font isBold="true" isUnderline="false"/>
259
<text><![CDATA[JRNL]]></text>
261
<textField isStretchWithOverflow="true">
262
<reportElement uuid="4f759b8a-dd1e-4fa2-ae48-c391f09f8495" stretchType="RelativeToTallestObject" x="173" y="131" width="108" height="20"/>
263
<box leftPadding="2">
264
<topPen lineWidth="0.0"/>
265
<leftPen lineWidth="0.0"/>
266
<bottomPen lineWidth="0.5"/>
267
<rightPen lineWidth="0.0"/>
269
<textElement verticalAlignment="Middle">
270
<font isBold="true" isUnderline="false"/>
272
<textFieldExpression><![CDATA[$P{account}]]></textFieldExpression>
274
<textField isStretchWithOverflow="true">
275
<reportElement uuid="2696aa61-6def-43e0-a562-8417cbd19316" stretchType="RelativeToTallestObject" x="281" y="131" width="102" height="20"/>
276
<box leftPadding="2">
277
<topPen lineWidth="0.0"/>
278
<leftPen lineWidth="0.0"/>
279
<bottomPen lineWidth="0.5"/>
280
<rightPen lineWidth="0.0"/>
282
<textElement verticalAlignment="Middle">
283
<font isBold="true" isUnderline="false"/>
285
<textFieldExpression><![CDATA[$P{entry_label}]]></textFieldExpression>
287
<textField isStretchWithOverflow="true">
288
<reportElement uuid="a9c31ee3-2632-4aa4-a374-d01f17e76bfe" stretchType="RelativeToTallestObject" x="493" y="131" width="95" height="20"/>
289
<box leftPadding="2">
290
<topPen lineWidth="0.0"/>
291
<leftPen lineWidth="0.0"/>
292
<bottomPen lineWidth="0.5"/>
293
<rightPen lineWidth="0.0"/>
295
<textElement textAlignment="Right" verticalAlignment="Middle">
296
<font isBold="true" isUnderline="false"/>
298
<textFieldExpression><![CDATA[$P{debit}]]></textFieldExpression>
300
<textField isStretchWithOverflow="true">
301
<reportElement uuid="e7c74f2e-0011-4b36-adb5-e5405ed32e75" stretchType="RelativeToTallestObject" x="588" y="131" width="92" height="20"/>
302
<box leftPadding="2">
303
<topPen lineWidth="0.0"/>
304
<leftPen lineWidth="0.0"/>
305
<bottomPen lineWidth="0.5"/>
306
<rightPen lineWidth="0.0"/>
308
<textElement textAlignment="Right" verticalAlignment="Middle">
309
<font isBold="true" isUnderline="false"/>
311
<textFieldExpression><![CDATA[$P{credit}]]></textFieldExpression>
313
<textField isStretchWithOverflow="true">
314
<reportElement uuid="e06f7e9f-68ac-4816-bb95-7b109bba2db0" stretchType="RelativeToTallestObject" x="680" y="131" width="48" height="20"/>
315
<box leftPadding="2">
316
<topPen lineWidth="0.0"/>
317
<leftPen lineWidth="0.0"/>
318
<bottomPen lineWidth="0.5"/>
319
<rightPen lineWidth="0.0"/>
321
<textElement textAlignment="Right" verticalAlignment="Middle">
322
<font isBold="true" isUnderline="false"/>
324
<textFieldExpression><![CDATA[$P{balance}]]></textFieldExpression>
326
<textField isStretchWithOverflow="true">
327
<reportElement uuid="d95d609b-3a1d-4062-a41d-e0852374e671" stretchType="RelativeToTallestObject" x="728" y="131" width="74" height="20"/>
328
<box leftPadding="2">
329
<topPen lineWidth="0.0"/>
330
<leftPen lineWidth="0.0"/>
331
<bottomPen lineWidth="0.5"/>
332
<rightPen lineWidth="0.0"/>
334
<textElement textAlignment="Right" verticalAlignment="Middle">
335
<font isBold="true" isUnderline="false"/>
337
<textFieldExpression><![CDATA[$P{ref}]]></textFieldExpression>
339
<textField isBlankWhenNull="true">
340
<reportElement uuid="c4fd32ce-29c3-446e-8ad6-85b1cbd196aa" x="0" y="67" width="243" height="56"/>
341
<textElement textAlignment="Center"/>
342
<textFieldExpression><![CDATA[$P{partner_name}]]></textFieldExpression>
345
<reportElement uuid="92597f1b-5da1-46ee-a697-28986f096898" x="649" y="67" width="153" height="56"/>
346
<textElement textAlignment="Center"/>
347
<text><![CDATA[Posted]]></text>
349
<textField isStretchWithOverflow="true">
350
<reportElement uuid="2696aa61-6def-43e0-a562-8417cbd19316" stretchType="RelativeToTallestObject" x="383" y="131" width="110" height="20"/>
351
<box leftPadding="2">
352
<topPen lineWidth="0.0"/>
353
<leftPen lineWidth="0.0"/>
354
<bottomPen lineWidth="0.5"/>
355
<rightPen lineWidth="0.0"/>
357
<textElement verticalAlignment="Middle">
358
<font isBold="true" isUnderline="false"/>
360
<textFieldExpression><![CDATA[$P{jnl_ref}]]></textFieldExpression>
365
<band height="20" splitType="Stretch">
366
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
367
<reportElement uuid="b06b7fbc-068c-400d-8263-a3b731d028e1" stretchType="RelativeToTallestObject" x="0" y="0" width="67" height="20"/>
368
<box leftPadding="2" rightPadding="2">
369
<topPen lineWidth="0.0"/>
370
<leftPen lineWidth="0.0"/>
371
<bottomPen lineWidth="0.0"/>
372
<rightPen lineWidth="0.0"/>
374
<textElement verticalAlignment="Middle"/>
375
<textFieldExpression><![CDATA[$F{date}]]></textFieldExpression>
377
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
378
<reportElement uuid="a089440d-e2a3-4384-b9cb-e35aa350942f" stretchType="RelativeToTallestObject" x="493" y="0" width="95" height="20"/>
379
<box leftPadding="2" rightPadding="2">
380
<topPen lineWidth="0.0"/>
381
<leftPen lineWidth="0.0"/>
382
<bottomPen lineWidth="0.0"/>
383
<rightPen lineWidth="0.0"/>
385
<textElement textAlignment="Right" verticalAlignment="Middle"/>
386
<textFieldExpression><![CDATA[$F{debit}]]></textFieldExpression>
388
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
389
<reportElement uuid="59f47913-6635-44b8-a2f1-88f1a8a363de" stretchType="RelativeToTallestObject" x="588" y="0" width="92" height="20"/>
390
<box leftPadding="2" rightPadding="2">
391
<topPen lineWidth="0.0"/>
392
<leftPen lineWidth="0.0"/>
393
<bottomPen lineWidth="0.0"/>
394
<rightPen lineWidth="0.0"/>
396
<textElement textAlignment="Right" verticalAlignment="Middle"/>
397
<textFieldExpression><![CDATA[$F{credit}]]></textFieldExpression>
399
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
400
<reportElement uuid="9b3f9255-2b19-42b7-9c97-4b04e8eace5f" stretchType="RelativeToTallestObject" x="67" y="0" width="106" height="20"/>
401
<box leftPadding="2" rightPadding="2">
402
<topPen lineWidth="0.0"/>
403
<leftPen lineWidth="0.0"/>
404
<bottomPen lineWidth="0.0"/>
405
<rightPen lineWidth="0.0"/>
407
<textElement verticalAlignment="Middle"/>
408
<textFieldExpression><![CDATA[$F{journal}]]></textFieldExpression>
410
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
411
<reportElement uuid="6435a507-f62b-43de-9dd9-7fe5cd85faff" stretchType="RelativeToTallestObject" x="173" y="0" width="108" height="20"/>
412
<box leftPadding="2" rightPadding="2">
413
<topPen lineWidth="0.0"/>
414
<leftPen lineWidth="0.0"/>
415
<bottomPen lineWidth="0.0"/>
416
<rightPen lineWidth="0.0"/>
418
<textElement verticalAlignment="Middle"/>
419
<textFieldExpression><![CDATA[$F{account}]]></textFieldExpression>
421
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
422
<reportElement uuid="4296a7ea-5e77-4a40-b1f3-fedb025bacfc" stretchType="RelativeToTallestObject" x="281" y="0" width="102" height="20"/>
423
<box leftPadding="2" rightPadding="2">
424
<topPen lineWidth="0.0"/>
425
<leftPen lineWidth="0.0"/>
426
<bottomPen lineWidth="0.0"/>
427
<rightPen lineWidth="0.0"/>
429
<textElement verticalAlignment="Middle"/>
430
<textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
432
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
433
<reportElement uuid="c5849cf4-793c-419e-a1f8-1e9fe1f2d7b2" stretchType="RelativeToTallestObject" x="728" y="0" width="74" height="20"/>
434
<box leftPadding="2" rightPadding="2">
435
<topPen lineWidth="0.0"/>
436
<leftPen lineWidth="0.0"/>
437
<bottomPen lineWidth="0.0"/>
438
<rightPen lineWidth="0.0"/>
440
<textElement textAlignment="Right" verticalAlignment="Middle"/>
441
<textFieldExpression><![CDATA[$F{reconcile}]]></textFieldExpression>
444
<reportElement uuid="b4897aaa-f920-42e8-9e2a-5bfe3a98d359" stretchType="RelativeToTallestObject" x="680" y="0" width="48" height="20"/>
445
<box leftPadding="2" rightPadding="2">
446
<topPen lineWidth="0.0"/>
447
<leftPen lineWidth="0.0"/>
448
<bottomPen lineWidth="0.0"/>
449
<rightPen lineWidth="0.0"/>
452
<text><![CDATA[]]></text>
454
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
455
<reportElement uuid="4296a7ea-5e77-4a40-b1f3-fedb025bacfc" stretchType="RelativeToTallestObject" x="383" y="0" width="110" height="20"/>
456
<box leftPadding="2" rightPadding="2">
457
<topPen lineWidth="0.0"/>
458
<leftPen lineWidth="0.0"/>
459
<bottomPen lineWidth="0.0"/>
460
<rightPen lineWidth="0.0"/>
462
<textElement verticalAlignment="Middle"/>
463
<textFieldExpression><![CDATA[$F{ref}]]></textFieldExpression>
469
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
470
<reportElement uuid="1888b60f-d571-4f82-a3fc-010492589f85" stretchType="RelativeToTallestObject" x="644" y="0" width="84" height="20"/>
471
<textElement textAlignment="Right" verticalAlignment="Middle"/>
472
<textFieldExpression><![CDATA[$V{total_sum}]]></textFieldExpression>
474
<textField isStretchWithOverflow="true">
475
<reportElement uuid="569932d2-0a8d-4445-98de-d38fa3466be5" stretchType="RelativeToTallestObject" x="464" y="0" width="180" height="20"/>
476
<textElement textAlignment="Right" verticalAlignment="Middle">
477
<font isBold="true"/>
479
<textFieldExpression><![CDATA[$P{tot_balance} + " :"]]></textFieldExpression>