From c9a3454bbb7c26945cee3f52850137f5e662ed91 Mon Sep 17 00:00:00 2001 From: "usama.jameel" Date: Mon, 23 Jun 2025 15:26:32 +0500 Subject: [PATCH] add date and time in po pdf and remove total stitching --- .../service/PurchaseOrderService.java | 2 ++ .../service/ReportingService.java | 3 --- .../resources/templates/po-status-pdf.html | 20 +++++++++---------- .../reporting/po-jobcard-items-table.html | 4 +--- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/utopiaindustries/service/PurchaseOrderService.java b/src/main/java/com/utopiaindustries/service/PurchaseOrderService.java index e712669..f6ec4d0 100644 --- a/src/main/java/com/utopiaindustries/service/PurchaseOrderService.java +++ b/src/main/java/com/utopiaindustries/service/PurchaseOrderService.java @@ -13,6 +13,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.ui.Model; +import java.time.LocalDateTime; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -46,6 +47,7 @@ public class PurchaseOrderService { model.addAttribute("poDetail", pOsDetails); model.addAttribute( "baseUrl", URLUtils.getCurrentBaseUrl() ); + model.addAttribute("date", LocalDateTime.now()); if (includeItemsDetail){ model.addAttribute("showItems", true); model.addAttribute("poItems", reportingService.getPoItemsSizeOrColor(pOsDetails.getPoId(), size, color)); diff --git a/src/main/java/com/utopiaindustries/service/ReportingService.java b/src/main/java/com/utopiaindustries/service/ReportingService.java index d42ec1e..562bfd8 100644 --- a/src/main/java/com/utopiaindustries/service/ReportingService.java +++ b/src/main/java/com/utopiaindustries/service/ReportingService.java @@ -618,9 +618,6 @@ public class ReportingService { poItemsWrapper.setTotalCutting( poItemsWrapper.getTotalCutting() + (e.getActualProduction() != null ? e.getActualProduction().intValue() : 0) ); - poItemsWrapper.setTotalStitching( - poItemsWrapper.getTotalStitching() + (e.getTotalProduction() != null ? e.getTotalProduction().intValue() : 0) - ); poItemsWrapper.setTotalProduction( poItemsWrapper.getTotalProduction() + (e.getExpectedProduction() != null ? e.getExpectedProduction().intValue() : 0) ); diff --git a/src/main/resources/templates/po-status-pdf.html b/src/main/resources/templates/po-status-pdf.html index 0ad966e..28e5b58 100644 --- a/src/main/resources/templates/po-status-pdf.html +++ b/src/main/resources/templates/po-status-pdf.html @@ -2,7 +2,7 @@ - @@ -58,10 +58,6 @@ PO Quantity - - PO Required Excess+ - - PO Status @@ -76,13 +72,15 @@ +
PO Details
+
- + - - + + @@ -93,6 +91,7 @@
Cutting Insp.StitchingFinishedStitchingFinished Rej. Store Packaging Shipped
+ @@ -115,6 +114,7 @@ + @@ -164,9 +164,8 @@ - + - @@ -176,7 +175,6 @@ -
Req.+ Excess Actual Cut Bal.To Cut Rcvd.
Sku Color SizeTotalExpected Production Total CuttingTotal Stitching
diff --git a/src/main/resources/templates/reporting/po-jobcard-items-table.html b/src/main/resources/templates/reporting/po-jobcard-items-table.html index 04754db..78fa7a8 100644 --- a/src/main/resources/templates/reporting/po-jobcard-items-table.html +++ b/src/main/resources/templates/reporting/po-jobcard-items-table.html @@ -14,9 +14,8 @@ Sku Color Size - Total + Expected Production Total Cutting - Total Stitching @@ -26,7 +25,6 @@ - -- 2.40.1