fix po pdf layout
parent
59a430de50
commit
2fa65059c4
|
@ -9,17 +9,24 @@ public class POsDetails {
|
||||||
private long poRequiredQuantity;
|
private long poRequiredQuantity;
|
||||||
|
|
||||||
// items detail
|
// items detail
|
||||||
private long totalCutting;
|
private long actualCutting;
|
||||||
private long remainingCutting;
|
private long balanceToCutting;
|
||||||
private long totalStitching;
|
private long cuttingReceived;
|
||||||
private long remainingStitching;
|
private long cuttingOki;
|
||||||
private long totalEndLineQC;
|
private long cuttingReject;
|
||||||
private long remainingEndLineQC;
|
private long stitchingIn;
|
||||||
private long totalFinishing;
|
private long stitchingWips;
|
||||||
private long remainingFinishing;
|
private long stitchingOut;
|
||||||
private long totalAGradeItem;
|
private long finishIn;
|
||||||
private long totalBGradeItem;
|
private long finishRej;
|
||||||
private long totalCGradeItem;
|
private long finishQaApproved;
|
||||||
|
private long storeReceived;
|
||||||
|
private long storeWaiting;
|
||||||
|
private long packagingIn;
|
||||||
|
private long packagingOut;
|
||||||
|
private long packagingStock;
|
||||||
|
private long shippedScan;
|
||||||
|
private long shippedNet;
|
||||||
private boolean poStatus;
|
private boolean poStatus;
|
||||||
|
|
||||||
public long getPoQuantity() {
|
public long getPoQuantity() {
|
||||||
|
@ -46,94 +53,6 @@ public class POsDetails {
|
||||||
this.articleTitle = articleTitle;
|
this.articleTitle = articleTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTotalCutting() {
|
|
||||||
return totalCutting;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalCutting(long totalCutting) {
|
|
||||||
this.totalCutting = totalCutting;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getRemainingCutting() {
|
|
||||||
return remainingCutting;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemainingCutting(long remainingCutting) {
|
|
||||||
this.remainingCutting = remainingCutting;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTotalStitching() {
|
|
||||||
return totalStitching;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalStitching(long totalStitching) {
|
|
||||||
this.totalStitching = totalStitching;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getRemainingStitching() {
|
|
||||||
return remainingStitching;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemainingStitching(long remainingStitching) {
|
|
||||||
this.remainingStitching = remainingStitching;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTotalEndLineQC() {
|
|
||||||
return totalEndLineQC;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalEndLineQC(long totalEndLineQC) {
|
|
||||||
this.totalEndLineQC = totalEndLineQC;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getRemainingEndLineQC() {
|
|
||||||
return remainingEndLineQC;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemainingEndLineQC(long remainingEndLineQC) {
|
|
||||||
this.remainingEndLineQC = remainingEndLineQC;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTotalFinishing() {
|
|
||||||
return totalFinishing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalFinishing(long totalFinishing) {
|
|
||||||
this.totalFinishing = totalFinishing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getRemainingFinishing() {
|
|
||||||
return remainingFinishing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemainingFinishing(long remainingFinishing) {
|
|
||||||
this.remainingFinishing = remainingFinishing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTotalAGradeItem() {
|
|
||||||
return totalAGradeItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalAGradeItem(long totalAGradeItem) {
|
|
||||||
this.totalAGradeItem = totalAGradeItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTotalBGradeItem() {
|
|
||||||
return totalBGradeItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalBGradeItem(long totalBGradeItem) {
|
|
||||||
this.totalBGradeItem = totalBGradeItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTotalCGradeItem() {
|
|
||||||
return totalCGradeItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalCGradeItem(long totalCGradeItem) {
|
|
||||||
this.totalCGradeItem = totalCGradeItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getPoId() {
|
public long getPoId() {
|
||||||
return poId;
|
return poId;
|
||||||
}
|
}
|
||||||
|
@ -150,6 +69,150 @@ public class POsDetails {
|
||||||
this.poRequiredQuantity = poRequiredQuantity;
|
this.poRequiredQuantity = poRequiredQuantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getActualCutting() {
|
||||||
|
return actualCutting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActualCutting(long actualCutting) {
|
||||||
|
this.actualCutting = actualCutting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getBalanceToCutting() {
|
||||||
|
return balanceToCutting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBalanceToCutting(long balanceToCutting) {
|
||||||
|
this.balanceToCutting = balanceToCutting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getCuttingReceived() {
|
||||||
|
return cuttingReceived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCuttingReceived(long cuttingReceived) {
|
||||||
|
this.cuttingReceived = cuttingReceived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getCuttingOki() {
|
||||||
|
return cuttingOki;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCuttingOki(long cuttingOki) {
|
||||||
|
this.cuttingOki = cuttingOki;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getCuttingReject() {
|
||||||
|
return cuttingReject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCuttingReject(long cuttingReject) {
|
||||||
|
this.cuttingReject = cuttingReject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getStitchingIn() {
|
||||||
|
return stitchingIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStitchingIn(long stitchingIn) {
|
||||||
|
this.stitchingIn = stitchingIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getStitchingWips() {
|
||||||
|
return stitchingWips;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStitchingWips(long stitchingWips) {
|
||||||
|
this.stitchingWips = stitchingWips;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getStitchingOut() {
|
||||||
|
return stitchingOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStitchingOut(long stitchingOut) {
|
||||||
|
this.stitchingOut = stitchingOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFinishIn() {
|
||||||
|
return finishIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishIn(long finishIn) {
|
||||||
|
this.finishIn = finishIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFinishRej() {
|
||||||
|
return finishRej;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishRej(long finishRej) {
|
||||||
|
this.finishRej = finishRej;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFinishQaApproved() {
|
||||||
|
return finishQaApproved;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishQaApproved(long finishQaApproved) {
|
||||||
|
this.finishQaApproved = finishQaApproved;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getStoreReceived() {
|
||||||
|
return storeReceived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoreReceived(long storeReceived) {
|
||||||
|
this.storeReceived = storeReceived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getStoreWaiting() {
|
||||||
|
return storeWaiting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoreWaiting(long storeWaiting) {
|
||||||
|
this.storeWaiting = storeWaiting;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getPackagingIn() {
|
||||||
|
return packagingIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackagingIn(long packagingIn) {
|
||||||
|
this.packagingIn = packagingIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getPackagingOut() {
|
||||||
|
return packagingOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackagingOut(long packagingOut) {
|
||||||
|
this.packagingOut = packagingOut;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getPackagingStock() {
|
||||||
|
return packagingStock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackagingStock(long packagingStock) {
|
||||||
|
this.packagingStock = packagingStock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getShippedScan() {
|
||||||
|
return shippedScan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShippedScan(long shippedScan) {
|
||||||
|
this.shippedScan = shippedScan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getShippedNet() {
|
||||||
|
return shippedNet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShippedNet(long shippedNet) {
|
||||||
|
this.shippedNet = shippedNet;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isPoStatus() {
|
public boolean isPoStatus() {
|
||||||
return poStatus;
|
return poStatus;
|
||||||
}
|
}
|
||||||
|
@ -161,17 +224,29 @@ public class POsDetails {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "POsDetails{" +
|
return "POsDetails{" +
|
||||||
"totalCutting=" + totalCutting +
|
"poId=" + poId +
|
||||||
", remainingCutting=" + remainingCutting +
|
", poNumber='" + poNumber + '\'' +
|
||||||
", totalStitching=" + totalStitching +
|
", articleTitle='" + articleTitle + '\'' +
|
||||||
", remainingStitching=" + remainingStitching +
|
", poQuantity=" + poQuantity +
|
||||||
", totalEndLineQC=" + totalEndLineQC +
|
", poRequiredQuantity=" + poRequiredQuantity +
|
||||||
", remainingEndLineQC=" + remainingEndLineQC +
|
", actualCutting=" + actualCutting +
|
||||||
", totalFinishing=" + totalFinishing +
|
", balanceToCutting=" + balanceToCutting +
|
||||||
", remainingFinishing=" + remainingFinishing +
|
", cuttingReceived=" + cuttingReceived +
|
||||||
", totalAGradeItem=" + totalAGradeItem +
|
", cuttingOki=" + cuttingOki +
|
||||||
", totalBGradeItem=" + totalBGradeItem +
|
", cuttingReject=" + cuttingReject +
|
||||||
", totalCGradeItem=" + totalCGradeItem +
|
", stitchingIn=" + stitchingIn +
|
||||||
|
", stitchingWips=" + stitchingWips +
|
||||||
|
", stitchingOut=" + stitchingOut +
|
||||||
|
", finishIn=" + finishIn +
|
||||||
|
", finishRej=" + finishRej +
|
||||||
|
", finishQaApproved=" + finishQaApproved +
|
||||||
|
", storeReceived=" + storeReceived +
|
||||||
|
", storeWaiting=" + storeWaiting +
|
||||||
|
", packagingIn=" + packagingIn +
|
||||||
|
", packagingOut=" + packagingOut +
|
||||||
|
", packagingStock=" + packagingStock +
|
||||||
|
", shippedScan=" + shippedScan +
|
||||||
|
", shippedNet=" + shippedNet +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,6 @@ public class PackagingService {
|
||||||
|
|
||||||
public void createPackagingItem(FinishedItemWrapper wrapper){
|
public void createPackagingItem(FinishedItemWrapper wrapper){
|
||||||
inventoryService.createPackagingItemAndTransaction(wrapper, wrapper.getAccountId());
|
inventoryService.createPackagingItemAndTransaction(wrapper, wrapper.getAccountId());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class PurchaseOrderService {
|
||||||
Map<String,Integer> storeItems = purchaseOrderCTPService.getStoreItemsByPoId(pOsDetails.getPoId());
|
Map<String,Integer> storeItems = purchaseOrderCTPService.getStoreItemsByPoId(pOsDetails.getPoId());
|
||||||
model.addAttribute("poDetail", pOsDetails);
|
model.addAttribute("poDetail", pOsDetails);
|
||||||
model.addAttribute( "baseUrl", URLUtils.getCurrentBaseUrl() );
|
model.addAttribute( "baseUrl", URLUtils.getCurrentBaseUrl() );
|
||||||
|
|
||||||
if (storeDetail && !storeItems.isEmpty()){
|
if (storeDetail && !storeItems.isEmpty()){
|
||||||
model.addAttribute("showStore", true);
|
model.addAttribute("showStore", true);
|
||||||
model.addAttribute("store", storeItems);
|
model.addAttribute("store", storeItems);
|
||||||
|
|
|
@ -30,8 +30,9 @@ public class ReportingService {
|
||||||
private final InventoryAccountDAO inventoryAccountDAO;
|
private final InventoryAccountDAO inventoryAccountDAO;
|
||||||
private final PurchaseOrderCTPDao purchaseOrderCTPDao;
|
private final PurchaseOrderCTPDao purchaseOrderCTPDao;
|
||||||
private final StoreItemDao storeItemDao;
|
private final StoreItemDao storeItemDao;
|
||||||
|
private final PackagingItemsDAO packagingItemsDAO;
|
||||||
|
|
||||||
public ReportingService(JobCardItemDAO jobCardItemDAO, BundleDAO bundleDAO, InventoryTransactionLegDAO inventoryTransactionLegDAO, JobCardDAO jobCardDAO, FinishedItemDAO finishedItemDAO, StitchingOfflineItemDAO stitchingOfflineItemDAO, InventoryAccountDAO inventoryAccountDAO, PurchaseOrderCTPDao purchaseOrderCTPDao, StoreItemDao storeItemDao) {
|
public ReportingService(JobCardItemDAO jobCardItemDAO, BundleDAO bundleDAO, InventoryTransactionLegDAO inventoryTransactionLegDAO, JobCardDAO jobCardDAO, FinishedItemDAO finishedItemDAO, StitchingOfflineItemDAO stitchingOfflineItemDAO, InventoryAccountDAO inventoryAccountDAO, PurchaseOrderCTPDao purchaseOrderCTPDao, StoreItemDao storeItemDao, PackagingItemsDAO packagingItemsDAO) {
|
||||||
this.jobCardItemDAO = jobCardItemDAO;
|
this.jobCardItemDAO = jobCardItemDAO;
|
||||||
this.bundleDAO = bundleDAO;
|
this.bundleDAO = bundleDAO;
|
||||||
this.inventoryTransactionLegDAO = inventoryTransactionLegDAO;
|
this.inventoryTransactionLegDAO = inventoryTransactionLegDAO;
|
||||||
|
@ -41,6 +42,7 @@ public class ReportingService {
|
||||||
this.inventoryAccountDAO = inventoryAccountDAO;
|
this.inventoryAccountDAO = inventoryAccountDAO;
|
||||||
this.purchaseOrderCTPDao = purchaseOrderCTPDao;
|
this.purchaseOrderCTPDao = purchaseOrderCTPDao;
|
||||||
this.storeItemDao = storeItemDao;
|
this.storeItemDao = storeItemDao;
|
||||||
|
this.packagingItemsDAO = packagingItemsDAO;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Integer> getJobCardProgress(String jobCardID) {
|
public Map<String, Integer> getJobCardProgress(String jobCardID) {
|
||||||
|
@ -446,18 +448,25 @@ public class ReportingService {
|
||||||
purchaseOrderCTPList = purchaseOrderCTPDao.findAll();
|
purchaseOrderCTPList = purchaseOrderCTPDao.findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String,Integer> jobCardCompleteItems = new HashMap<>();
|
|
||||||
|
|
||||||
for (PurchaseOrderCTP pos : purchaseOrderCTPList) {
|
for (PurchaseOrderCTP pos : purchaseOrderCTPList) {
|
||||||
List<JobCard> jobCards = jobCardDAO.findByPoId(pos.getId());
|
List<JobCard> jobCards = jobCardDAO.findByPoId(pos.getId());
|
||||||
BigDecimal totalProduction = BigDecimal.ZERO;
|
BigDecimal totalProduction = BigDecimal.ZERO;
|
||||||
|
BigDecimal expectedProduction = BigDecimal.ZERO;
|
||||||
BigDecimal actualProduction = BigDecimal.ZERO;
|
BigDecimal actualProduction = BigDecimal.ZERO;
|
||||||
Long qaProgressItems = 0L;
|
long stitchingIn = 0L;
|
||||||
Long totalFinishItem = 0L;
|
long stitchingOut = 0L;
|
||||||
Long totalRejectPieces = 0L;
|
long finishApprovedItem = 0L;
|
||||||
|
long finishRejectItem = 0L;
|
||||||
|
long storeItems = 0L;
|
||||||
|
long packagingItems = 0L;
|
||||||
POsDetails pOsDetails = new POsDetails();
|
POsDetails pOsDetails = new POsDetails();
|
||||||
for (JobCard jobCard : jobCards) {
|
for (JobCard jobCard : jobCards) {
|
||||||
List<JobCardItem> jobCardItems = jobCardItemDAO.findByCardId(jobCard.getId());
|
List<JobCardItem> jobCardItems = jobCardItemDAO.findByCardId(jobCard.getId());
|
||||||
|
expectedProduction = expectedProduction.add(jobCardItems.stream()
|
||||||
|
.map(item -> Optional.ofNullable(item.getExpectedProduction()).orElse(BigDecimal.ZERO))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||||
|
|
||||||
totalProduction = totalProduction.add(jobCardItems.stream()
|
totalProduction = totalProduction.add(jobCardItems.stream()
|
||||||
.map(item -> Optional.ofNullable(item.getTotalProduction()).orElse(BigDecimal.ZERO))
|
.map(item -> Optional.ofNullable(item.getTotalProduction()).orElse(BigDecimal.ZERO))
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add));
|
.reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||||
|
@ -465,34 +474,49 @@ public class ReportingService {
|
||||||
actualProduction = actualProduction.add(jobCardItems.stream()
|
actualProduction = actualProduction.add(jobCardItems.stream()
|
||||||
.map(item -> Optional.ofNullable(item.getActualProduction()).orElse(BigDecimal.ZERO))
|
.map(item -> Optional.ofNullable(item.getActualProduction()).orElse(BigDecimal.ZERO))
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add));
|
.reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||||
qaProgressItems += Optional.ofNullable(stitchingOfflineItemDAO.CalculateTotalQA(jobCard.getId())).orElse(0L);
|
|
||||||
totalFinishItem += Optional.ofNullable(finishedItemDAO.calculateTotalFinishItem(jobCard.getId())).orElse(0L);
|
|
||||||
totalRejectPieces += Optional.ofNullable(storeItemDao.calculateTotalRejectItemByJobCardId(jobCard.getId())).orElse(0L);
|
|
||||||
|
|
||||||
jobCardCompleteItems = getSegregateItems(String.valueOf(jobCard.getId()));
|
//stitching detail
|
||||||
if (jobCardCompleteItems == null) {
|
stitchingIn += Optional.of(stitchingOfflineItemDAO.findByJobCardId(jobCard.getId()).size()).orElse(0);
|
||||||
jobCardCompleteItems = new HashMap<>();
|
stitchingOut += Optional.ofNullable(stitchingOfflineItemDAO.CalculateTotalQA(jobCard.getId())).orElse(0L);
|
||||||
}
|
|
||||||
|
//finishItems detail
|
||||||
|
List<FinishedItem> finishedItems = finishedItemDAO.findByJobCardId(jobCard.getId());
|
||||||
|
finishApprovedItem += finishedItems.stream().filter(e -> e.getQaStatus().equals("APPROVED")).count();
|
||||||
|
finishRejectItem += finishedItems.stream().filter(e -> e.getQaStatus().equals("REJECT")).count();
|
||||||
|
|
||||||
|
//reject store details
|
||||||
|
storeItems += Optional.ofNullable(storeItemDao.calculateTotalRejectItemByJobCardId(jobCard.getId())).orElse(0L);
|
||||||
|
|
||||||
|
//reject packaging details
|
||||||
|
packagingItems += Optional.of(packagingItemsDAO.findByJobCardId(jobCard.getId()).size()).orElse(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
pOsDetails.setPoId(pos.getId());
|
pOsDetails.setPoId(pos.getId());
|
||||||
pOsDetails.setPoNumber(pos.getPurchaseOrderCode());
|
pOsDetails.setPoNumber(pos.getPurchaseOrderCode());
|
||||||
pOsDetails.setArticleTitle(pos.getArticleName());
|
pOsDetails.setArticleTitle(pos.getArticleName());
|
||||||
pOsDetails.setPoQuantity(pos.getPurchaseOrderQuantity());
|
pOsDetails.setPoQuantity(pos.getPurchaseOrderQuantity());
|
||||||
pOsDetails.setPoRequiredQuantity(pos.getPurchaseOrderQuantityRequired());
|
pOsDetails.setPoRequiredQuantity(pos.getPurchaseOrderQuantityRequired());
|
||||||
pOsDetails.setTotalCutting(actualProduction.intValue());
|
pOsDetails.setActualCutting(expectedProduction.longValue());
|
||||||
pOsDetails.setTotalStitching(qaProgressItems);
|
pOsDetails.setBalanceToCutting(pos.getPurchaseOrderQuantityRequired() - actualProduction.longValue());
|
||||||
pOsDetails.setTotalEndLineQC(qaProgressItems.intValue());
|
pOsDetails.setCuttingReceived(expectedProduction.longValue());
|
||||||
pOsDetails.setTotalFinishing(totalFinishItem);
|
pOsDetails.setCuttingOki(actualProduction.intValue());
|
||||||
|
pOsDetails.setCuttingReject(expectedProduction.subtract(actualProduction).intValue());
|
||||||
|
pOsDetails.setStitchingIn(stitchingIn);
|
||||||
|
pOsDetails.setStitchingOut(stitchingOut);
|
||||||
|
pOsDetails.setStitchingWips(stitchingIn - stitchingOut);
|
||||||
|
pOsDetails.setFinishIn(stitchingOut);
|
||||||
|
pOsDetails.setFinishRej(finishRejectItem);
|
||||||
|
pOsDetails.setFinishQaApproved(finishApprovedItem);
|
||||||
|
pOsDetails.setStoreReceived(storeItems);
|
||||||
|
pOsDetails.setStoreWaiting(finishRejectItem - storeItems);
|
||||||
|
pOsDetails.setFinishQaApproved(finishApprovedItem);
|
||||||
|
pOsDetails.setPackagingIn(packagingItems);
|
||||||
|
pOsDetails.setPackagingOut(packagingItems);
|
||||||
|
pOsDetails.setPackagingStock(0);
|
||||||
|
pOsDetails.setShippedScan(packagingItems);
|
||||||
|
pOsDetails.setShippedNet(packagingItems);
|
||||||
|
pOsDetails.setPackagingStock(0);
|
||||||
pOsDetails.setPoStatus(false);
|
pOsDetails.setPoStatus(false);
|
||||||
|
|
||||||
pOsDetails.setRemainingCutting(pos.getPurchaseOrderQuantityRequired() - actualProduction.intValue());
|
|
||||||
pOsDetails.setRemainingStitching(pos.getPurchaseOrderQuantityRequired() - qaProgressItems);
|
|
||||||
pOsDetails.setRemainingEndLineQC(pos.getPurchaseOrderQuantityRequired() - qaProgressItems);
|
|
||||||
pOsDetails.setRemainingFinishing(pos.getPurchaseOrderQuantityRequired() - totalFinishItem);
|
|
||||||
|
|
||||||
pOsDetails.setTotalAGradeItem(jobCardCompleteItems.getOrDefault("A GRADE", 0));
|
|
||||||
pOsDetails.setTotalBGradeItem(totalRejectPieces.intValue());
|
|
||||||
|
|
||||||
pOsDetailsList.add(pOsDetails);
|
pOsDetailsList.add(pOsDetails);
|
||||||
}
|
}
|
||||||
return pOsDetailsList;
|
return pOsDetailsList;
|
||||||
|
|
|
@ -10,43 +10,60 @@
|
||||||
<title>Job Card</title>
|
<title>Job Card</title>
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700|Open+Sans:400,400i&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:700|Open+Sans:400,400i&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" type="text/css" th:href="@{|${baseUrl}/css/print.css|}">
|
<link rel="stylesheet" type="text/css" th:href="@{|${baseUrl}/css/print.css|}">
|
||||||
|
<style type="text/css">
|
||||||
|
@page {
|
||||||
|
size: landscape;
|
||||||
|
margin: 10mm;
|
||||||
|
}
|
||||||
|
@media print {
|
||||||
|
body {
|
||||||
|
transform: rotate(0deg); /* Not needed for @page landscape */
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.td-value{
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="400">
|
<td width="50%">
|
||||||
<img width="200" th:src="@{|${baseUrl}/img/utopia-industries.png|}" alt="Utopia Industries">
|
<img width="200" th:src="@{|${baseUrl}/img/utopia-industries.png|}" alt="Utopia Industries">
|
||||||
</td>
|
</td>
|
||||||
<td width="400">
|
<td width="50%">
|
||||||
<table class="bordered">
|
<table class="bordered">
|
||||||
<tr class="tr-header">
|
<tr class="tr-header">
|
||||||
<td colspan="2" th:text="'PO Online Status'"></td>
|
<td colspan="2" style="text-align: center" th:text="'PO Online Status'"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 40%; border: 1px solid black;"><i>PO Code</i></td>
|
<td style="width: 40%;"><i>PO Code</i></td>
|
||||||
<td style="width: 60%; border: 1px solid black;">
|
<td style="width: 60%;">
|
||||||
<a class="text-reset" target="_blank" th:text="${poDetail.getPoNumber()}"></a>
|
<a class="text-reset" target="_blank" th:text="${poDetail.getPoNumber()}"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 40%; border: 1px solid black;"><i>Article Name</i></td>
|
<td style="width: 40%;"><i>Article Name</i></td>
|
||||||
<td style="width: 60%; border: 1px solid black;">
|
<td style="width: 60%;">
|
||||||
<a class="text-reset" target="_blank" th:text="${poDetail.getArticleTitle()}"></a>
|
<a class="text-reset" target="_blank" th:text="${poDetail.getArticleTitle()}"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle" style="border: 1px solid black;"><i>PO Quantity</i></td>
|
<td class="align-middle"><i>PO Quantity</i></td>
|
||||||
<td style="border: 1px solid black;"><span th:text="${poDetail.getPoQuantity()}"></span></td>
|
<td><span th:text="${poDetail.getPoQuantity()}"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle" style="border: 1px solid black;"><i>PO Required Excess+</i></td>
|
<td class="align-middle"><i>PO Required Excess+</i></td>
|
||||||
<td style="border: 1px solid black;"><span th:text="${poDetail.getPoRequiredQuantity()}"></span></td>
|
<td><span th:text="${poDetail.getPoRequiredQuantity()}"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle" style="border: 1px solid black;"><i>PO Status</i></td>
|
<td class="align-middle"><i>PO Status</i></td>
|
||||||
<td style="border: 1px solid black;">
|
<td>
|
||||||
<span th:if="*{poDetail.isPoStatus}" th:text="'CLOSE'"></span>
|
<span th:if="*{poDetail.isPoStatus}" th:text="'CLOSE'"></span>
|
||||||
<span th:if="*{!poDetail.isPoStatus}" th:text="'OPEN'"></span>
|
<span th:if="*{!poDetail.isPoStatus}" th:text="'OPEN'"></span>
|
||||||
</td>
|
</td>
|
||||||
|
@ -57,47 +74,77 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table class="bordered" style="width: 100%; margin-top: 10px; border-collapse: collapse; ">
|
<table style="margin-top: 10px;">
|
||||||
<h5 class="no-margin-top no-margin-bottom" style="margin-top: 10px;">PO Details</h5>
|
<h5 class="no-margin-top no-margin-bottom" style="margin-top: 10px;">PO Details</h5>
|
||||||
<thead >
|
<thead>
|
||||||
<tr class="tr-header">
|
<tr class="tr-header">
|
||||||
<td>Cutting</td>
|
<td style="width: 70px; text-align: center"></td>
|
||||||
<td>Cutting Balance</td>
|
<td style="width: 60px; text-align: center">Cutting Insp.</td>
|
||||||
<td>Stitching</td>
|
<td style="width: 150px; text-align: center">Stitching</td>
|
||||||
<td>Stitching Balance</td>
|
<td style="width: 60px; text-align: center">Finished</td>
|
||||||
<td>End Line QC</td>
|
<td style="width: 90px; text-align: center; padding-left: 40px">Rej. Store</td>
|
||||||
<td>End Line QC Balance</td>
|
<td style="width: 100px; text-align: center">Packaging</td>
|
||||||
<td>Finishing Items</td>
|
<td style="width: 80px; text-align: center">Shipped</td>
|
||||||
<td>Finishing Items Balance</td>
|
</tr>
|
||||||
<td>A Grade Items</td>
|
</thead>
|
||||||
<td>Reject Items In Store</td>
|
</table>
|
||||||
|
|
||||||
|
<table >
|
||||||
|
<thead>
|
||||||
|
<tr class="tr-header">
|
||||||
|
<td style="width: 50px; text-align: center" >Actual Cut</td>
|
||||||
|
<td style="width: 50px; text-align: center; border-right: 1px solid white;">Bal.To Cut</td>
|
||||||
|
<td style="width: 50px; text-align: center;">Rcvd.</td>
|
||||||
|
<td style="width: 50px; text-align: center">Ok</td>
|
||||||
|
<td style="width: 50px; text-align: center; border-right: 1px solid white;">Rej.</td>
|
||||||
|
<td style="width: 50px; text-align: center">In</td>
|
||||||
|
<td style="width: 50px; text-align: center">WIP</td>
|
||||||
|
<td style="width: 50px; text-align: center; border-right: 1px solid white;">Out</td>
|
||||||
|
<td style="width: 50px; text-align: center">In</td>
|
||||||
|
<td style="width: 50px; text-align: center">Rej</td>
|
||||||
|
<td style="width: 50px; text-align: center; border-right: 1px solid white;">QA Approv.</td>
|
||||||
|
<td style="width: 50px; text-align: center">Rcvd.</td>
|
||||||
|
<td style="width: 50px; text-align: center; border-right: 1px solid white;">waiting</td>
|
||||||
|
<td style="width: 50px; text-align: center">In</td>
|
||||||
|
<td style="width: 50px; text-align: center">Out</td>
|
||||||
|
<td style="width: 50px; text-align: center; border-right: 1px solid white;">Stock</td>
|
||||||
|
<td style="width: 50px; text-align: center">Scan</td>
|
||||||
|
<td style="width: 50px; text-align: center; border-right: 1px solid white;">Net</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr >
|
<tr >
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getTotalCutting()}"></td>
|
<td th:text="${poDetail.getActualCutting()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getRemainingCutting()}"></td>
|
<td th:text="${poDetail.getBalanceToCutting()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getTotalStitching()}"></td>
|
<td th:text="${poDetail.getCuttingReceived()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getRemainingStitching()}"></td>
|
<td th:text="${poDetail.getCuttingOki()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getTotalEndLineQC()}"></td>
|
<td th:text="${poDetail.getCuttingReject()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getRemainingEndLineQC()}"></td>
|
<td th:text="${poDetail.getStitchingIn()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getTotalFinishing()}"></td>
|
<td th:text="${poDetail.getStitchingWips()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getRemainingFinishing()}"></td>
|
<td th:text="${poDetail.getStitchingOut()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getTotalAGradeItem()}"></td>
|
<td th:text="${poDetail.getFinishIn()}" class="td-value"></td>
|
||||||
<td style="border: 1px solid black;" th:text="${poDetail.getTotalBGradeItem()}"></td>
|
<td th:text="${poDetail.getFinishRej()}" class="td-value"></td>
|
||||||
|
<td th:text="${poDetail.getFinishQaApproved()}" class="td-value"></td>
|
||||||
|
<td th:text="${poDetail.getStoreReceived()}" class="td-value"></td>
|
||||||
|
<td th:text="${poDetail.getStoreWaiting()}" class="td-value"></td>
|
||||||
|
<td th:text="${poDetail.getPackagingIn()}" class="td-value"></td>
|
||||||
|
<td th:text="${poDetail.getPackagingOut()}" class="td-value"></td>
|
||||||
|
<td th:text="${poDetail.getPackagingStock()}" class="td-value"></td>
|
||||||
|
<td th:text="${poDetail.getShippedScan()}" class="td-value"></td>
|
||||||
|
<td th:text="${poDetail.getShippedNet()}" class="td-value"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table class="bordered" style="width: 50%; margin-top: 20px;" th:if="${showStore}">
|
<table class="bordered" style="width: 50%; margin-top: 20px;" th:if="${showStore}">
|
||||||
<tr class="tr-header">
|
<tr class="tr-header">
|
||||||
<td colspan="2" th:text="'Reject Items In Store'"></td>
|
<td colspan="2" style="text-align: center" th:text="'Reject Items In Store'"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr th:each="heading : ${store.keySet()}"
|
<tr th:each="heading : ${store.keySet()}"
|
||||||
th:if="${store != null and not store.isEmpty()}">
|
th:if="${store != null and not store.isEmpty()}">
|
||||||
<td style="width: 40%; border: 1px solid black;"><i th:text="${heading}"></i></td>
|
<td style="width: 40%;"><i th:text="${heading}"></i></td>
|
||||||
<td style="width: 60%; border: 1px solid black;">
|
<td style="width: 60%;">
|
||||||
<a class="text-reset" target="_blank" th:text="${store.get(heading)}"></a>
|
<a class="text-reset" target="_blank" th:text="${store.get(heading)}"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -7,25 +7,35 @@
|
||||||
<header class="row page-header" th:replace="_fragments :: page-header"></header>
|
<header class="row page-header" th:replace="_fragments :: page-header"></header>
|
||||||
<main class="row page-main">
|
<main class="row page-main">
|
||||||
<aside class="col-sm-2" th:replace="/reporting/po-report-sidebar :: sidebar"></aside>
|
<aside class="col-sm-2" th:replace="/reporting/po-report-sidebar :: sidebar"></aside>
|
||||||
<div class="col-lg-10 col-sm-10">
|
<div class="col-lg-10 col-sm-10" style="overflow-x: auto;">
|
||||||
<h3>All PO's </h3>
|
<h3>All PO's</h3>
|
||||||
<table th:if="${ #lists != null && #lists.size(allPOs) != 0 }" class="table table-striped font-sm" data-account-tables data-order="[[ 0, "asc" ]]">
|
<div class="table-responsive"> <!-- Bootstrap responsive table wrapper -->
|
||||||
|
<table th:if="${ #lists != null && #lists.size(allPOs) != 0 }"
|
||||||
|
class="table table-striped font-sm" style="min-width: 1500px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>PO Number</th>
|
<th>PO Number</th>
|
||||||
<th>PO Article</th>
|
<th>PO Article</th>
|
||||||
<th>PO Quantity</th>
|
<th>PO Quantity</th>
|
||||||
<th>Req+ Excess</th>
|
<th>Req+ Excess</th>
|
||||||
<th>Cutting</th>
|
<th>Cut.</th>
|
||||||
<th>Cutting Balance</th>
|
<th>Cut Bal.</th>
|
||||||
<th>Stitching</th>
|
<th>Cut Recv.</th>
|
||||||
<th>Stitching Balance</th>
|
<th>Cut oki</th>
|
||||||
<th>End Line QC</th>
|
<th>Cut Rej.</th>
|
||||||
<th>End Line QC Balance</th>
|
<th>Stit. In</th>
|
||||||
<th>Finishing Items</th>
|
<th>Stit. Out</th>
|
||||||
<th>Finishing Items Balance</th>
|
<th>Stit. Wips</th>
|
||||||
<th>A Grade Items</th>
|
<th>finish In</th>
|
||||||
<th>Reject Items In Store</th>
|
<th>finish Rej.</th>
|
||||||
|
<th>finish QA APP.</th>
|
||||||
|
<th>Rej. Store Rcvd</th>
|
||||||
|
<th>Rej. Store Waiting</th>
|
||||||
|
<th>Packed In</th>
|
||||||
|
<th>Packed Out</th>
|
||||||
|
<th>Packed Stock</th>
|
||||||
|
<th>Shipped Scan</th>
|
||||||
|
<th>Shipped Net</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>PO Status</th>
|
<th>PO Status</th>
|
||||||
<th>Generate PDF</th>
|
<th>Generate PDF</th>
|
||||||
|
@ -39,16 +49,25 @@
|
||||||
<td th:text="${poDetail.articleTitle}"></td>
|
<td th:text="${poDetail.articleTitle}"></td>
|
||||||
<td th:text="${poDetail.poQuantity}"></td>
|
<td th:text="${poDetail.poQuantity}"></td>
|
||||||
<td th:text="${poDetail.poRequiredQuantity}"></td>
|
<td th:text="${poDetail.poRequiredQuantity}"></td>
|
||||||
<td th:text="${poDetail.totalCutting}"></td>
|
<td th:text="${poDetail.actualCutting}"></td>
|
||||||
<td th:text="${poDetail.remainingCutting}"></td>
|
<td th:text="${poDetail.balanceToCutting}"></td>
|
||||||
<td th:text="${poDetail.totalStitching}"></td>
|
<td th:text="${poDetail.cuttingReceived}"></td>
|
||||||
<td th:text="${poDetail.remainingStitching}"></td>
|
<td th:text="${poDetail.cuttingOki}"></td>
|
||||||
<td th:text="${poDetail.totalEndLineQC}"></td>
|
<td th:text="${poDetail.cuttingReject}"></td>
|
||||||
<td th:text="${poDetail.remainingEndLineQC}"></td>
|
<td th:text="${poDetail.stitchingIn}"></td>
|
||||||
<td th:text="${poDetail.totalFinishing}"></td>
|
<td th:text="${poDetail.stitchingOut}"></td>
|
||||||
<td th:text="${poDetail.remainingFinishing}"></td>
|
<td th:text="${poDetail.stitchingWips}"></td>
|
||||||
<td th:text="${poDetail.totalAGradeItem}"></td>
|
<td th:text="${poDetail.finishIn}"></td>
|
||||||
<td th:text="${poDetail.totalBGradeItem}"></td>
|
<td th:text="${poDetail.finishRej}"></td>
|
||||||
|
<td th:text="${poDetail.finishQaApproved}"></td>
|
||||||
|
<td th:text="${poDetail.storeReceived}"></td>
|
||||||
|
<td th:text="${poDetail.storeWaiting}"></td>
|
||||||
|
<td th:text="${poDetail.packagingIn}"></td>
|
||||||
|
<td th:text="${poDetail.packagingOut}"></td>
|
||||||
|
<td th:text="${poDetail.packagingStock}"></td>
|
||||||
|
<td th:text="${poDetail.shippedScan}"></td>
|
||||||
|
<td th:text="${poDetail.shippedNet}"></td>
|
||||||
|
|
||||||
<td data-show-dropdown-transactions
|
<td data-show-dropdown-transactions
|
||||||
th:data-po-id="${poDetail.poId}"
|
th:data-po-id="${poDetail.poId}"
|
||||||
title="Store-Items">
|
title="Store-Items">
|
||||||
|
@ -67,18 +86,25 @@
|
||||||
<input type="hidden" name="articleTitle" th:value="${poDetail.articleTitle}"/>
|
<input type="hidden" name="articleTitle" th:value="${poDetail.articleTitle}"/>
|
||||||
<input type="hidden" name="poQuantity" th:value="${poDetail.poQuantity}"/>
|
<input type="hidden" name="poQuantity" th:value="${poDetail.poQuantity}"/>
|
||||||
<input type="hidden" name="poRequiredQuantity" th:value="${poDetail.poRequiredQuantity}"/>
|
<input type="hidden" name="poRequiredQuantity" th:value="${poDetail.poRequiredQuantity}"/>
|
||||||
<input type="hidden" name="totalCutting" th:value="${poDetail.totalCutting}"/>
|
<input type="hidden" name="actualCutting" th:value="${poDetail.actualCutting}"/>
|
||||||
<input type="hidden" name="remainingCutting" th:value="${poDetail.remainingCutting}"/>
|
<input type="hidden" name="balanceToCutting" th:value="${poDetail.balanceToCutting}"/>
|
||||||
<input type="hidden" name="totalStitching" th:value="${poDetail.totalStitching}"/>
|
<input type="hidden" name="cuttingReceived" th:value="${poDetail.cuttingReceived}"/>
|
||||||
<input type="hidden" name="remainingStitching" th:value="${poDetail.remainingStitching}"/>
|
<input type="hidden" name="cuttingOki" th:value="${poDetail.cuttingOki}"/>
|
||||||
<input type="hidden" name="totalEndLineQC" th:value="${poDetail.totalEndLineQC}"/>
|
<input type="hidden" name="cuttingReject" th:value="${poDetail.cuttingReject}"/>
|
||||||
<input type="hidden" name="remainingEndLineQC" th:value="${poDetail.remainingEndLineQC}"/>
|
<input type="hidden" name="stitchingIn" th:value="${poDetail.stitchingIn}"/>
|
||||||
<input type="hidden" name="totalFinishing" th:value="${poDetail.totalFinishing}"/>
|
<input type="hidden" name="stitchingOut" th:value="${poDetail.stitchingOut}"/>
|
||||||
<input type="hidden" name="remainingFinishing" th:value="${poDetail.remainingFinishing}"/>
|
<input type="hidden" name="stitchingWips" th:value="${poDetail.stitchingWips}"/>
|
||||||
<input type="hidden" name="totalAGradeItem" th:value="${poDetail.totalAGradeItem}"/>
|
<input type="hidden" name="finishIn" th:value="${poDetail.finishIn}"/>
|
||||||
<input type="hidden" name="totalBGradeItem" th:value="${poDetail.totalBGradeItem}"/>
|
<input type="hidden" name="finishRej" th:value="${poDetail.finishRej}"/>
|
||||||
|
<input type="hidden" name="finishQaApproved" th:value="${poDetail.finishQaApproved}"/>
|
||||||
|
<input type="hidden" name="storeReceived" th:value="${poDetail.storeReceived}"/>
|
||||||
|
<input type="hidden" name="storeWaiting" th:value="${poDetail.storeWaiting}"/>
|
||||||
|
<input type="hidden" name="packagingIn" th:value="${poDetail.packagingIn}"/>
|
||||||
|
<input type="hidden" name="packagingOut" th:value="${poDetail.packagingOut}"/>
|
||||||
|
<input type="hidden" name="packagingStock" th:value="${poDetail.packagingStock}"/>
|
||||||
|
<input type="hidden" name="shippedScan" th:value="${poDetail.shippedScan}"/>
|
||||||
|
<input type="hidden" name="shippedNet" th:value="${poDetail.shippedNet}"/>
|
||||||
<input type="hidden" name="poStatus" th:value="${poDetail.poStatus}"/>
|
<input type="hidden" name="poStatus" th:value="${poDetail.poStatus}"/>
|
||||||
|
|
||||||
<a href="javascript:void(0);"
|
<a href="javascript:void(0);"
|
||||||
th:onclick="'showPdfOptions(' + ${poDetail.poId} + ')'"
|
th:onclick="'showPdfOptions(' + ${poDetail.poId} + ')'"
|
||||||
class="btn btn-sm btn-secondary"
|
class="btn btn-sm btn-secondary"
|
||||||
|
@ -92,6 +118,7 @@
|
||||||
</table>
|
</table>
|
||||||
<h4 th:if="${#lists.size(allPOs) == 0 }">No PO found.</h4>
|
<h4 th:if="${#lists.size(allPOs) == 0 }">No PO found.</h4>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="modal fade" id="pdfOptionsModal" tabindex="-1" aria-hidden="true">
|
<div class="modal fade" id="pdfOptionsModal" tabindex="-1" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -196,8 +223,22 @@
|
||||||
$row.child(`<span class="spinner-border text-center spinner-border-md" role="status"></span>`).show();
|
$row.child(`<span class="spinner-border text-center spinner-border-md" role="status"></span>`).show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: `/ctp/purchase-order/store-items/${poId}`,
|
url: `/ctp/purchase-order/store-items/${poId}`,
|
||||||
success: function (data) {
|
success: function(data) {
|
||||||
$row.child(data).show();
|
if (data.includes('page-login') ||
|
||||||
|
data.includes('login__form') ||
|
||||||
|
data.includes('Sign in')) {
|
||||||
|
// Redirect to login page
|
||||||
|
window.location.href = '/ctp/login?logout';
|
||||||
|
} else {
|
||||||
|
$row.child(data).show();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr) {
|
||||||
|
if (xhr.status === 401) {
|
||||||
|
window.location.href = '/ctp/login?logout';
|
||||||
|
} else {
|
||||||
|
$row.child('<span class="text-danger">Error loading data</span>').show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h5 th:if="${#lists.size(storeItems.keySet()) == 0}" class="mt-2">No Inventory Transactions found.</h5>
|
<h5 th:if="${#lists.size(storeItems.keySet()) == 0}" class="mt-2">No Items found.</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue