Sfoglia il codice sorgente

[Fix] Price columns now hidden for some report downloads

production
Harry Groves 11 ore fa
parent
commit
5254069467
3 ha cambiato i file con 13 aggiunte e 1 eliminazioni
  1. +4
    -0
      src/main/java/com/ffii/fpsms/modules/report/web/ReportController.kt
  2. +4
    -1
      src/main/java/com/ffii/fpsms/modules/report/web/StockLotOnhandReportController.kt
  3. +5
    -0
      src/main/resources/jasper/StockBalanceReport.jrxml

+ 4
- 0
src/main/java/com/ffii/fpsms/modules/report/web/ReportController.kt Vedi File

@@ -1063,6 +1063,7 @@ class ReportController(
return out.toByteArray()
}

/** FP-MTMS Version Checklist | Functions Ref. No. 87 | v1.0.0 | 2026-09-28 */
private fun createStockBalanceExcel(
dbData: List<Map<String, Any>>,
reportDate: String,
@@ -1139,6 +1140,9 @@ class ReportController(
}
val widths = intArrayOf(14, 26, 10, 12, 12, 12, 14, 12, 12, 12, 12, 14)
widths.forEachIndexed { i, w -> sheet.setColumnWidth(i, w * 256) }
// Keep 單位均價 and 庫存總價值 in the sheet, but hide them for now.
sheet.setColumnHidden(10, true)
sheet.setColumnHidden(11, true)

val out = ByteArrayOutputStream()
workbook.use { it.write(out) }


+ 4
- 1
src/main/java/com/ffii/fpsms/modules/report/web/StockLotOnhandReportController.kt Vedi File

@@ -191,7 +191,7 @@ class StockLotOnhandReportController(
return v
}

/** FP-MTMS Version Checklist | Functions Ref. No. 68 | v1.0.1 | 2026-09-07 */
/** FP-MTMS Version Checklist | Functions Ref. No. 68 | v1.0.2 | 2026-09-28 */
private fun createExcel(
dbData: List<Map<String, Any>>,
reportDate: String,
@@ -310,6 +310,9 @@ class StockLotOnhandReportController(
sheet.createFreezePane(0, headerRowIndex + 1)
intArrayOf(14, 28, 14, 8, 20, 12, 10, 12, 10, 10, 12, 20, 12, 12, 14)
.forEachIndexed { i, w -> sheet.setColumnWidth(i, w * 256) }
// Keep 單位均價 and 庫存總價值 in the sheet, but hide them for now.
sheet.setColumnHidden(13, true)
sheet.setColumnHidden(14, true)

val out = ByteArrayOutputStream()
workbook.write(out)


+ 5
- 0
src/main/resources/jasper/StockBalanceReport.jrxml Vedi File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.17.0-6d93193241dd8cc42629e188b94f9e0bc5722efd -->
<!-- FP-MTMS Version Checklist | Functions Ref. No. 87 | v1.0.0 | 2026-09-28 -->
<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="StockBalanceReport" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b6cc79a8-6025-4490-938c-b90508da62d0">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<parameter name="stockSubCategory" class="java.lang.String">
@@ -77,6 +78,7 @@
<textField>
<reportElement x="669" y="0" width="51" height="20" uuid="7faf8dc0-de0e-49bb-abbc-8c6e4818e6c6">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<printWhenExpression><![CDATA[false]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
@@ -163,6 +165,7 @@
<textField>
<reportElement x="720" y="0" width="78" height="20" uuid="b58a8878-7093-4af2-b1a8-cf44de1fb4a6">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<printWhenExpression><![CDATA[false]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
@@ -405,6 +408,7 @@
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<printWhenExpression><![CDATA[false]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
@@ -416,6 +420,7 @@
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<printWhenExpression><![CDATA[false]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>


Caricamento…
Annulla
Salva