private void viewDetailsJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewDetailsJButtonActionPerformed
        // TODO add your handling code here:
        int selectedRow = workQueueJTable.getSelectedRow();
        if (selectedRow < 0) {
            JOptionPane.showMessageDialog(null, "Select Work Request");
            return;
        }

        ReceiveShippmentWorkRequest request = (ReceiveShippmentWorkRequest) workQueueJTable.getValueAt(selectedRow, 0);

        if (request.getReceiver() == null) {
            JOptionPane.showMessageDialog(null, "This Work Request Has Not Been Assigned");
            return;
        }

        if (request.getStatus() == WorkRequest.Status.BatchCreated) {
            JOptionPane.showMessageDialog(null, "This Work Request Has Already Been Processed");
            return;
        }

        Network reqNetwork = Business.Business.getInstance().getNetworkDirectory().getMyNetwork(request.getSender());
        Government govt = (Government) reqNetwork.getEnterpriseDirectory().getSelectedEnterprise(Enterprise.Type.GOVERNMENT);
        Enterprise reqEnterprise = reqNetwork.getEnterpriseDirectory().getMyEnterprise(request.getSender());

        boolean flag = false;

        for (Enterprise ee : govt.getApprovedEnterpriseList()) {
            if (ee == reqEnterprise) {
                try {
                    String expDate = ee.getLicenseExpiryDate();
                    Date d = new SimpleDateFormat("MM dd yy HH:mm:ss").parse(expDate);

                    if (d.after(new Date())) {
                        flag = true;
                        break;
                    }
                } catch (ParseException pe) {
                }
            }
        }

        if (flag) {
            JOptionPane.showMessageDialog(null, "Order Is Received From  Licensed Manufacturer");
            int option = JOptionPane.showConfirmDialog(null, "View Order Details and Process Order", "View", JOptionPane.YES_NO_OPTION);

            if (option == JOptionPane.YES_OPTION) {
//                ViewDetailsJPanel viewDetailsJPanel = new ViewDetailsJPanel(userProcessContainer, selectedEnterprise, userAccount, selectedNetwork, request, this);
//                userProcessContainer.add("ViewDetails", viewDetailsJPanel);
                CardLayout cardLayout = (CardLayout) userProcessContainer.getLayout();
                cardLayout.next(userProcessContainer);
            } else {
                JOptionPane.showMessageDialog(null, "Order Processing Pending");
            }
        } else {
            JOptionPane.showMessageDialog(null, "Order Is From Unlicensed Manufacturer");
            JOptionPane.showMessageDialog(null, "Order Added To Rejected Order List And Report Sent To FDA");
            request.setStatus(WorkRequest.Status.OrderRejected);
            SimpleDateFormat sdf = new SimpleDateFormat("MM dd yy HH:mm:ss");
            String d = sdf.format(new Date());
            request.setResolveDate(d);

            ComplaintWorkRequest req = (ComplaintWorkRequest)govt.getComplaintHandlingOrganization().getWorkQueue().newWorkRequest(WorkRequest.Type.ComplaintWorkRequest);
            req.setRequest(request);
            req.setFromEnterprise(selectedEnterprise);
            req.setAgainstEnterprise(reqEnterprise);
            req.setComplaintType(ComplaintWorkRequest.complaintType.UnlicensedEnterprise);
            req.setRequest(request);
            
            selectedEnterprise.getRejectedWorkRequest().add(request);
            
            refreshWorkQueue();
        }
        


    }//GEN-LAST:event_viewDetailsJButtonActionPerformed