Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/openconsignment/common/Constants.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package openconsignment.common;

public class Constants {
public static final String ORGANIZATION_NAME_KEY = "organizationName";
public static final String ORGANIZATION_NAME = "SATYAM AGENCIES";
public static final String REPORT_FILE_NAME = "report.pdf";
public static final String DATE_TIME_FORMAT = "dd-MM-yyyy";
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/openconsignment/service/BuyerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.List;
import java.util.Map;
import net.sf.jasperreports.engine.*;
import openconsignment.common.Constants;
import openconsignment.common.Utils;
import openconsignment.model.BuyerLedgerAgeRow;
import openconsignment.model.BuyerLedgerRow;
Expand Down Expand Up @@ -41,6 +42,7 @@ public void renameBuyer(String oldName, String newName) throws SQLException {
public void generatePdf(String buyerName, boolean isAgewise) throws SQLException, JRException {

Map<String, Object> payload = new HashMap<>();
payload.put(Constants.ORGANIZATION_NAME_KEY, Constants.ORGANIZATION_NAME);
payload.put("buyerName", buyerName);

if (isAgewise) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/openconsignment/service/SupplierService.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.List;
import java.util.Map;
import net.sf.jasperreports.engine.*;
import openconsignment.common.Constants;
import openconsignment.common.Utils;
import openconsignment.model.SupplierLedgerAgeRow;
import openconsignment.model.SupplierLedgerRow;
Expand Down Expand Up @@ -41,6 +42,7 @@ public void renameSupplier(String oldName, String newName) throws SQLException {
public void generatePdf(String supplierName, boolean isAgewise) throws SQLException, JRException {

Map<String, Object> payload = new HashMap<>();
payload.put(Constants.ORGANIZATION_NAME_KEY, Constants.ORGANIZATION_NAME);
payload.put("supplierName", supplierName);

if (isAgewise) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/openconsignment/service/TransportService.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.List;
import java.util.Map;
import net.sf.jasperreports.engine.*;
import openconsignment.common.Constants;
import openconsignment.common.Utils;
import openconsignment.model.TransportLedgerRow;
import openconsignment.repository.TransportRepository;
Expand Down Expand Up @@ -38,6 +39,7 @@ public void generatePdf(String transportName, String fromDate, String toDate) th
transportRepository.getTransportReportFor(transportName, fromDate, toDate);

Map<String, Object> payload = new HashMap<>();
payload.put(Constants.ORGANIZATION_NAME_KEY, Constants.ORGANIZATION_NAME);
payload.put("transportName", transportName);
payload.put("fromDate", fromDate);
payload.put("toDate", toDate);
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/jrxml/BuyerLedger.jrxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.21.5.final using JasperReports Library version 6.21.5-74d586df47b25dbd05bd0957999819196e59934a -->
<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="BuyerLedger" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="73ce7514-71bf-4202-9720-ccec39087a66">
<parameter name="organizationName"/>
<parameter name="buyerName"/>
<field name="supplierName"/>
<field name="billNo"/>
Expand All @@ -17,7 +18,7 @@
</background>
<title>
<band height="51" splitType="Stretch">
<staticText>
<textField>
<reportElement x="0" y="10" width="210" height="30" uuid="c4f6e52a-068d-4846-b1c6-b70e6015f7aa">
<property name="fontSize" value="20"/>
</reportElement>
Expand All @@ -27,8 +28,8 @@
<textElement textAlignment="Center">
<font size="19"/>
</textElement>
<text><![CDATA[SATYAM AGENCIES]]></text>
</staticText>
<textFieldExpression><![CDATA[$P{organizationName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="230" y="10" width="440" height="30" uuid="80ff1af8-f7f2-4e68-8d5b-387678364bf0"/>
<textElement textAlignment="Center">
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/jrxml/BuyerLedgerAge.jrxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
name="BuyerLedgerAge" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20"
topMargin="20" bottomMargin="20" uuid="f86cb926-fbcc-4cdf-8db2-487e31f42b8a">
<parameter name="organizationName"/>
<parameter name="buyerName"/>
<field name="supplierName"/>
<field name="billNo"/>
Expand All @@ -15,7 +16,7 @@
</background>
<title>
<band height="47" splitType="Stretch">
<staticText>
<textField>
<reportElement x="0" y="8" width="180" height="30" uuid="63fe7772-b0d0-45e8-974e-ec50c4f7451d">
<property name="fontSize" value="20"/>
</reportElement>
Expand All @@ -25,8 +26,8 @@
<textElement textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[SATYAM AGENCIES]]></text>
</staticText>
<textFieldExpression><![CDATA[$P{organizationName}]]></textFieldExpression>
</textField>
<textField pattern="dd-MM-yyyy">
<reportElement x="450" y="14" width="100" height="19" uuid="ad9b4073-2ddb-497f-9aa5-cf76f1c28800"/>
<textElement textAlignment="Center">
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/jrxml/SupplierLedger.jrxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.21.5.final using JasperReports Library version 6.21.5-74d586df47b25dbd05bd0957999819196e59934a -->
<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="SupplierLedger" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="2b5461f1-4580-477e-9d69-6885b2c7bb67">
<parameter name="organizationName"/>
<parameter name="supplierName"/>
<field name="billNo"/>
<field name="billDate"/>
Expand Down Expand Up @@ -29,7 +30,7 @@
</background>
<title>
<band height="41" splitType="Stretch">
<staticText>
<textField>
<reportElement x="1" y="6" width="210" height="30" uuid="28592f8c-7d39-4d94-ae26-3f6ae5dbe0cb">
<property name="fontSize" value="20"/>
</reportElement>
Expand All @@ -39,8 +40,8 @@
<textElement textAlignment="Center">
<font size="19"/>
</textElement>
<text><![CDATA[SATYAM AGENCIES]]></text>
</staticText>
<textFieldExpression><![CDATA[$P{organizationName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="209" y="0" width="411" height="30" uuid="e11f7e9c-526b-4807-9cae-6aada8ebde23"/>
<textElement textAlignment="Center">
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/jrxml/SupplierLedgerAge.jrxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<import value="org.apache.commons.lang.time.*"/>
<parameter name="organizationName"/>
<parameter name="supplierName"/>
<parameter name="today" class="java.util.Date" isForPrompting="false">
<defaultValueExpression><![CDATA[new Date()]]></defaultValueExpression>
Expand All @@ -30,7 +31,7 @@
</background>
<title>
<band height="35" splitType="Stretch">
<staticText>
<textField>
<reportElement x="0" y="0" width="180" height="30" uuid="28592f8c-7d39-4d94-ae26-3f6ae5dbe0cb">
<property name="fontSize" value="20"/>
</reportElement>
Expand All @@ -40,8 +41,8 @@
<textElement textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[SATYAM AGENCIES]]></text>
</staticText>
<textFieldExpression><![CDATA[$P{organizationName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="183" y="0" width="247" height="30" uuid="e11f7e9c-526b-4807-9cae-6aada8ebde23"/>
<textElement textAlignment="Center">
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/jrxml/TransportLedger.jrxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.18.1.final using JasperReports Library version 6.18.1-9d75d1969e774d4f179fb3be8401e98a0e6d1611 -->
<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="TransportLedger" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="e8ccdac5-9d4c-4c9c-941d-bdcc2145c1f0">
<parameter name="organizationName"/>
<parameter name="transportName"/>
<parameter name="fromDate"/>
<parameter name="toDate"/>
Expand All @@ -15,7 +16,7 @@
</background>
<title>
<band height="38" splitType="Stretch">
<staticText>
<textField>
<reportElement x="2" y="3" width="180" height="30" uuid="a619f4fe-0242-4078-a2fb-d49343ff4a6d">
<property name="fontSize" value="20"/>
</reportElement>
Expand All @@ -25,8 +26,8 @@
<textElement textAlignment="Center">
<font size="18"/>
</textElement>
<text><![CDATA[SATYAM AGENCIES]]></text>
</staticText>
<textFieldExpression><![CDATA[$P{organizationName}]]></textFieldExpression>
</textField>
<textField pattern="dd-MM-yyyy">
<reportElement x="454" y="11" width="100" height="19" uuid="2e2e7861-3454-41fd-96a0-8ebbe49ce397"/>
<textElement textAlignment="Center">
Expand Down
Loading