Skip to content

Commit

Permalink
Applying suggestion for change
Browse files Browse the repository at this point in the history
  • Loading branch information
JantBogard committed Nov 12, 2024
1 parent 8590b0d commit 6155fc0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Binary file modified rpt_base/Inventory.jasper
Binary file not shown.
10 changes: 5 additions & 5 deletions rpt_base/Inventory.jrxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parameter name="inventoryDate" class="java.lang.String" isForPrompting="false"/>
<parameter name="inventoryReference" class="java.lang.String" isForPrompting="false"/>
<parameter name="inventoryStatus" class="java.lang.String" isForPrompting="false"/>
<parameter name="printQtyReal" class="java.lang.Integer" isForPrompting="false"/>
<parameter name="printRealQty" class="java.lang.Integer" isForPrompting="false"/>
<parameter name="PATH_LOGO" class="java.lang.String">
<defaultValueExpression><![CDATA["./rsc/images/"]]></defaultValueExpression>
</parameter>
Expand All @@ -34,7 +34,7 @@
FROM ((`oh_medicaldsrinventoryrow` join `oh_medicaldsrinventory` ON MINVTR_INVT_ID=MINVT_ID)
join `oh_medicaldsr` on MINVTR_MDSR_ID=MDSR_ID)
left join `oh_medicaldsrlot` on MINVTR_LT_ID_A=LT_ID_A
where MINVTR_INVT_ID = $P{inventoryId} ORDER BY MDSR_DESC asc]]>
where MINVTR_INVT_ID = $P{inventoryId} ORDER BY MDSR_DESC asc]]>
</queryString>
<field name="LT_DUE_DATE" class="java.lang.String"/>
<field name="MDSR_CODE" class="java.lang.String"/>
Expand Down Expand Up @@ -135,7 +135,7 @@
<textElement>
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{PrincipalWardInventory}+ ":" + $P{inventoryId}]]></textFieldExpression>
<textFieldExpression><![CDATA[$R{MainStoreInventoryID}+ ":" + $P{inventoryId}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement key="textField-13" x="0" y="48" width="273" height="22" uuid="c36a0f89-2260-4f94-83f3-5ae60fe10808"/>
Expand Down Expand Up @@ -199,7 +199,7 @@
<textElement textAlignment="Center" verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{WardCode}]]></textFieldExpression>
<textFieldExpression><![CDATA[$R{LotCode}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement key="textField-33" x="290" y="0" width="80" height="20" uuid="4d84a530-45ab-4b4f-ab82-ea60e90efd5a"/>
Expand Down Expand Up @@ -282,7 +282,7 @@
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[($P{printQtyReal}.intValue() == 1 ? "" : new DecimalFormat("0").format($F{MINVTR_REAL_QTY}) + "")]]></textFieldExpression>
<textFieldExpression><![CDATA[($P{printRealQty}.intValue() == 1 ? "" : new DecimalFormat("0").format($F{MINVTR_REAL_QTY}) + "")]]></textFieldExpression>
</textField>
<textField>
<reportElement key="textField-25" x="290" y="0" width="80" height="23" uuid="30872397-c9dc-49eb-a3e3-746e5f63d17b"/>
Expand Down
4 changes: 2 additions & 2 deletions rpt_base/Inventory.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Reference = Reference

InventoryDate = Inventory Date

PrincipalWardInventory = PRINCIPAL WARD INVENTORY
MainStoreInventoryID = MAIN STORE INVENTORY ID

Designation = Designation

WardCode = Ward Code
LotCode= Lot Code

DueDate = Due Date

Expand Down
4 changes: 2 additions & 2 deletions rpt_base/Inventory_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Reference = Reference

InventoryDate = Inventory Date

PrincipalWardInventory = PRINCIPAL WARD INVENTORY
MainStoreInventoryID = MAIN STORE INVENTORY ID

Designation = Designation

WardCode = Ward Code
LotCode= Lot Code

DueDate = Due Date

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/isf/medicalinventory/gui/InventoryEdit.java
Original file line number Diff line number Diff line change
Expand Up @@ -934,12 +934,12 @@ private JButton getPrintButton() {
printButton.setEnabled(true);

printButton.addActionListener(e -> {
int printQtyReal = 0;
int printRealQty = 0;
int response = MessageDialog.yesNo(this, "angal.inventory.askforrealquantityempty.msg");
if (response == JOptionPane.YES_OPTION) {
printQtyReal = 1;
printRealQty = 1;
}
new GenericReportPharmaceuticalInventory(inventory, "Inventory", printQtyReal);
new GenericReportPharmaceuticalInventory(inventory, "Inventory", printRealQty);
});

return printButton;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public class GenericReportPharmaceuticalInventory extends DisplayReport {
private static final Logger LOGGER = LoggerFactory.getLogger(GenericReportPharmaceuticalInventory.class);
private JasperReportsManager jasperReportsManager = Context.getApplicationContext().getBean(JasperReportsManager.class);

public GenericReportPharmaceuticalInventory(MedicalInventory medicalInventory, String jasperFileName, int printQtyReal) {
public GenericReportPharmaceuticalInventory(MedicalInventory medicalInventory, String jasperFileName, int printRealQty) {
try {
JasperReportResultDto jasperReportResultDto = jasperReportsManager.getInventoryReportPdf(medicalInventory, jasperFileName, printQtyReal);
JasperReportResultDto jasperReportResultDto = jasperReportsManager.getInventoryReportPdf(medicalInventory, jasperFileName, printRealQty);
showReport(jasperReportResultDto);
} catch (Exception e) {
LOGGER.error("", e);
Expand Down

0 comments on commit 6155fc0

Please sign in to comment.