Exemplo n.º 1
0
menuManufacture::menuManufacture(GUIClient *Pparent) :
  QObject(Pparent)
{
  setObjectName("woModule");
  parent = Pparent;

  toolBar = new QToolBar(tr("Manufacture Tools"));
  toolBar->setObjectName("Manufacture Tools");
  toolBar->setIconSize(QSize(32, 32));
  if (_preferences->boolean("ShowWOToolbar"))
    parent->addToolBar(toolBar);

  mainMenu	 = new QMenu(parent);
  ordersMenu	 = new QMenu(parent);
  formsMenu = new QMenu(parent);
  materialsMenu	 = new QMenu(parent);
  materialsIssueMenu = new QMenu(parent);
  materialsReturnMenu = new QMenu(parent);
  transactionsMenu = new QMenu(parent);
  reportsMenu	 = new QMenu(parent);
  reportsScheduleMenu = new QMenu(parent);
  reportsHistoryMenu = new QMenu(parent);
  reportsMatlReqMenu = new QMenu(parent);
  reportsMatlUseVarMenu = new QMenu(parent);
  reportsOpenWoMenu = new QMenu(parent);
  utilitiesMenu = new QMenu(parent);

  mainMenu->setObjectName("menu.manu");
  ordersMenu->setObjectName("menu.manu.orders");
  formsMenu->setObjectName("menu.manu.forms");
  materialsMenu->setObjectName("menu.manu.materials");
  materialsIssueMenu->setObjectName("menu.manu.materialsissue");
  materialsReturnMenu->setObjectName("menu.manu.materialsreturn");
  transactionsMenu->setObjectName("menu.manu.transactions");
  reportsMenu->setObjectName("menu.manu.reports");
  reportsScheduleMenu->setObjectName("menu.manu.reportsschedule");
  reportsHistoryMenu->setObjectName("menu.manu.reportshistory");
  reportsMatlReqMenu->setObjectName("menu.manu.reportsmatlreq");
  reportsMatlUseVarMenu->setObjectName("menu.manu.reportsmatlusevar");
  reportsOpenWoMenu->setObjectName("menu.manu.reportsopenwo");
  utilitiesMenu->setObjectName("menu.manu.utilities");

  actionProperties acts[] = {
    // Production | Control
    { "menu",                              tr("&Work Order"), (char*)ordersMenu,                       mainMenu,   "true",                  0, 0, true, NULL },
    { "wo.newWorkOrder",                       tr("&New..."), SLOT(sNewWorkOrder()),                   ordersMenu, "MaintainWorkOrders",    0, 0, true, NULL },
    { "separator",                                      NULL, NULL,                                    ordersMenu, "true",                  0, 0, true, NULL },
    { "wo.explodeWorkOrder",               tr("E&xplode..."), SLOT(sExplodeWorkOrder()),               ordersMenu, "ExplodeWorkOrders",     0, 0, true, NULL },
    { "wo.implodeWorkOrder",               tr("&Implode..."), SLOT(sImplodeWorkOrder()),               ordersMenu, "ImplodeWorkOrders",     0, 0, true, NULL },
    { "wo.releaseWorkOrdersByPlannerCode", tr("&Release..."), SLOT(sReleaseWorkOrdersByPlannerCode()), ordersMenu, "ReleaseWorkOrders",     0, 0, true, NULL },
    { "wo.closeWorkOrder",                   tr("&Close..."), SLOT(sCloseWorkOrder()),                 ordersMenu, "CloseWorkOrders",       0, 0, true, NULL },
    { "separator",                                      NULL, NULL,                                    ordersMenu, "true",                  0, 0, true, NULL },
    { "wo.reprioritizeWorkOrder",     tr("Re&prioritize..."), SLOT(sReprioritizeWorkOrder()),          ordersMenu, "ReprioritizeWorkOrders",0, 0, true, NULL },
    { "wo.rescheduleWorkOrder",         tr("Re&schedule..."), SLOT(sRescheduleWorkOrder()),            ordersMenu, "RescheduleWorkOrders",  0, 0, true, NULL },
    { "wo.changeWorkOrderQuantity",tr("Change &Quantity..."), SLOT(sChangeWorkOrderQty()),             ordersMenu, "ChangeWorkOrderQty",    0, 0, true, NULL },

    //  Production | W/O Materials
    { "menu",                               tr("&Materials"), (char*)materialsMenu,                 mainMenu,      "true",                0, 0, true, NULL },
    { "wo.createWoMaterialRequirement",        tr("&New..."), SLOT(sCreateWoMaterialRequirement()), materialsMenu, "MaintainWoMaterials", 0, 0, true, NULL },
    { "wo.maintainWoMaterialRequirements",tr("&Maintain..."), SLOT(sMaintainWoMaterials()),         materialsMenu, "MaintainWoMaterials", 0, 0, true, NULL },

    { "separator",                  NULL,                   NULL,                          mainMenu,          "true",  0, 0, true, NULL },
    
    //  Production | Transactions
    { "menu",                       tr("&Transactions"),    (char*)transactionsMenu,       mainMenu,           "true", 0, 0, true, NULL },
    
    //  Production |Transactions | Issue
    { "menu",                       tr("&Issue Material"),  (char*)materialsIssueMenu,     transactionsMenu,   "true",             0, 0, true, NULL },
    { "wo.issueWoMaterialBatch",    tr("&Batch..."),        SLOT(sIssueWoMaterialBatch()), materialsIssueMenu, "IssueWoMaterials", 0, 0, true, NULL },
    { "wo.issueWoMaterialItem",     tr("&Item..."),         SLOT(sIssueWoMaterialItem()),  materialsIssueMenu, "IssueWoMaterials", 0, 0, true, NULL },
    
    //  Production | Transactions | Return
    { "menu",                       tr("Ret&urn Material"),              (char*)materialsReturnMenu,       transactionsMenu,    "true",              0, 0, true, NULL },
    { "wo.returnWoMaterialBatch",   tr("&Batch..."),                     SLOT(sReturnWoMaterialBatch()),   materialsReturnMenu, "ReturnWoMaterials", 0, 0, true, NULL },
    { "wo.returnWoMaterialItem",    tr("&Item..."),                      SLOT(sReturnWoMaterialItem()),    materialsReturnMenu, "ReturnWoMaterials", 0, 0, true, NULL },
    { "wo.scrapWoMaterialFromWo",   tr("&Scrap..."),                     SLOT(sScrapWoMaterialFromWo()),   transactionsMenu,    "ScrapWoMaterials",  0, 0, true, NULL },
    { "separator",                  NULL,                                NULL,                             transactionsMenu,    "true",              0, 0, true, NULL },
    { "wo.postProduction",          tr("Post Productio&n..."),           SLOT(sPostProduction()),          transactionsMenu,    "PostProduction",    0, 0, true, NULL },
    { "wo.correctProductionPosting",tr("C&orrect Production Posting..."),SLOT(sCorrectProductionPosting()),transactionsMenu,    "PostProduction",    0, 0, true, NULL },
    { "wo.closeWorkOrder",          tr("&Close Work Order..."),          SLOT(sCloseWorkOrder()),          transactionsMenu,    "CloseWorkOrders",   0, 0, true, NULL },
    { "separator",                  NULL,                                NULL,                             transactionsMenu,    "true",              0, 0, true, NULL },
    { "wo.postMiscProduction",      tr("Post &Misc. Production..."),     SLOT(sPostMiscProduction()),      transactionsMenu,    "PostMiscProduction",0, 0, true, NULL },

    { "separator",              NULL,                           NULL,                     mainMenu, "true",     0, 0,   true, NULL },
    
    // Production | Forms
    { "menu",                    tr("&Forms"),                   (char*)formsMenu,           mainMenu,  "true",                    0, 0, true, NULL },
    { "wo.printTraveler",        tr("Print &Traveler..."),       SLOT(sPrintTraveler()),     formsMenu, "PrintWorkOrderPaperWork", 0, 0, true, NULL },
    { "wo.printPickList",        tr("Print &Pick List..."),      SLOT(sPrintPickList()),     formsMenu, "PrintWorkOrderPaperWork", 0, 0, true, NULL },
    { "separator",               NULL,                           NULL,                       formsMenu, "true",                    0, 0, true, NULL },
    { "wo.rptPrintWorkOrderForm",tr("Print &Work Order Form..."),SLOT(sPrintWorkOrderForm()),formsMenu, "PrintWorkOrderPaperWork", 0, 0, true, NULL },
    
    //  Production | Reports
    { "menu",                           tr("&Reports"), (char*)reportsMenu,     mainMenu,       "true", 0, 0,   true, NULL },
    
    //  Production | Reports | Schedule
    { "menu",                           tr("Work Order &Schedule"),(char*)reportsScheduleMenu,         reportsMenu,         "true",                              0, 0, true, NULL },
    { "wo.dspWoScheduleByPlannerCode",  tr("by &Planner Code..."), SLOT(sDspWoScheduleByPlannerCode()),reportsScheduleMenu, "MaintainWorkOrders ViewWorkOrders", QPixmap(":/images/dspWoScheduleByPlannerCode.png"), toolBar, true, tr("Work Order Schedule by Planner Code") },
    { "wo.dspWoScheduleByClassCode",    tr("by &Class Code..."),   SLOT(sDspWoScheduleByClassCode()),  reportsScheduleMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },
    { "wo.dspWoScheduleByItemGroup",    tr("by Item &Group..."),   SLOT(sDspWoScheduleByItemGroup()),  reportsScheduleMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },
    { "wo.dspWoScheduleByItem",         tr("by &Item..."),         SLOT(sDspWoScheduleByItem()),       reportsScheduleMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },
    { "wo.dspWoScheduleByWorkOrder",    tr("by &Work Order..."),   SLOT(sDspWoScheduleByWorkOrder()),  reportsScheduleMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },

    //  Production | Reports | Material Requirements
    { "menu",                                       tr("&Material Requirements"),(char*)reportsMatlReqMenu,              reportsMenu,        "true",                              0, 0, true, NULL },
    { "wo.dspWoMaterialRequirementsByWorkOrder",    tr("by &Work Order..."),     SLOT(sDspWoMaterialsByWo()),            reportsMatlReqMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },
    { "wo.dspWoMaterialRequirementsByComponentItem",tr("by &Component Item..."), SLOT(sDspWoMaterialsByComponentItem()), reportsMatlReqMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },

    { "wo.dspInventoryAvailabilityByWorkOrder",     tr("&Inventory Availability..."),       SLOT(sDspInventoryAvailabilityByWorkOrder()), reportsMenu, "ViewInventoryAvailability", 0, 0, true, NULL },
    { "wo.dspPendingWoMaterialAvailability",        tr("&Pending Material Availability..."),SLOT(sDspPendingAvailability()),              reportsMenu, "ViewInventoryAvailability", 0, 0, true, NULL },

    { "separator",                      NULL,   NULL,   reportsMenu,    "true", 0, 0,   true, NULL },
    
    //  Production | Reports | History
    { "menu",                       tr("&History"),          (char*)reportsHistoryMenu,        reportsMenu,        "true",                              0, 0, true, NULL },
    { "wo.dspWoHistoryByClassCode", tr("by &Class Code..."), SLOT(sDspWoHistoryByClassCode()), reportsHistoryMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },
    { "wo.dspWoHistoryByItem",      tr("by &Item..."),       SLOT(sDspWoHistoryByItem()),      reportsHistoryMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },
    { "wo.dspWoHistoryByNumber",    tr("by &W/O Number..."), SLOT(sDspWoHistoryByNumber()),    reportsHistoryMenu, "MaintainWorkOrders ViewWorkOrders", 0, 0, true, NULL },

    { "separator",        NULL,                   NULL,                   reportsMenu, "true",      0, 0, true, NULL },
    { "wo.dspJobCosting", tr("&Job Costing..."),  SLOT(sDspJobCosting()), reportsMenu, "ViewCosts", 0, 0, true, NULL },
    
    //  Production | Reports | Material Usage Variance
    { "menu",                                      tr("Material &Usage Variance"),(char*)reportsMatlUseVarMenu,                    reportsMenu,           "true",                  0, 0, true, NULL },
    { "wo.dspMaterialUsageVarianceByWarehouse",    tr("by &Site..."),             SLOT(sDspMaterialUsageVarianceByWarehouse()),    reportsMatlUseVarMenu, "ViewMaterialVariances", 0, 0, true, NULL },
    { "wo.dspMaterialUsageVarianceByItem",         tr("by &Item..."),             SLOT(sDspMaterialUsageVarianceByItem()),         reportsMatlUseVarMenu, "ViewMaterialVariances", 0, 0, true, NULL },
    { "wo.dspMaterialUsageVarianceByBOMItem",      tr("by &BOM Item..."),         SLOT(sDspMaterialUsageVarianceByBOMItem()),      reportsMatlUseVarMenu, "ViewMaterialVariances", 0, 0, true, NULL },
    { "wo.dspMaterialUsageVarianceByComponentItem",tr("by &Component Item..."),   SLOT(sDspMaterialUsageVarianceByComponentItem()),reportsMatlUseVarMenu, "ViewMaterialVariances", 0, 0, true, NULL },
    { "wo.dspMaterialUsageVarianceByWorkOrder",    tr("by &Work Order..."),       SLOT(sDspMaterialUsageVarianceByWorkOrder()),    reportsMatlUseVarMenu, "ViewMaterialVariances", 0, 0, true, NULL },

    { "separator",                                      NULL,   NULL,   reportsMenu,    "true", 0, 0,   true, NULL },
    
    //  Production | Reports | Open Work Orders
    { "menu",                                           tr("Ope&n Work Orders"),                  (char*)reportsOpenWoMenu,      reportsMenu,      "true",                             0, 0, true, NULL},
    { "wo.dspOpenWorkOrdersWithClosedParentSalesOrders",tr("with &Closed Parent Sales Orders..."),SLOT(sDspWoSoStatusMismatch()),reportsOpenWoMenu,"MaintainWorkOrders ViewWorkOrders",0, 0, true, NULL},
    { "wo.dspOpenWorkOrdersWithParentSalesOrders",      tr("with &Parent Sales Orders..."),       SLOT(sDspWoSoStatus()),        reportsOpenWoMenu,"MaintainWorkOrders ViewWorkOrders",0, 0, true, NULL},

    { "separator",              NULL,                               NULL,                           mainMenu,      "true",            0, 0, true, NULL },
    { "menu",                   tr("&Utilities"),                   (char*)utilitiesMenu,           mainMenu,      "true",            0, 0, true, NULL },
    { "wo.purgeClosedWorkOrder",tr("Pur&ge Closed Work Orders..."), SLOT(sPurgeClosedWorkOrders()), utilitiesMenu, "PurgeWorkOrders", 0, 0, true, NULL },
  };

  addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0]));

  parent->populateCustomMenu(mainMenu, "Manufacture");
  QAction * m = parent->menuBar()->addMenu(mainMenu);
  if(m)
    m->setText(tr("&Manufacture"));
}
Exemplo n.º 2
0
moduleWO::moduleWO(OpenMFGGUIClient *Pparent) :
  QObject(Pparent, "poModule")
{
  parent = Pparent;

  toolBar = new QToolBar(tr("W/O Tools"));
  toolBar->setObjectName("W/O Tools");
  toolBar->setIconSize(QSize(32, 32));
  if (_preferences->boolean("ShowWOToolbar"))
    parent->addToolBar(toolBar);

//  Create the W/O menuitems
  controlMenu = new QMenu();

  if (_metrics->boolean("Routings"))
  {
  parent->actions.append( new Action( parent, "wo.woTimeClock", tr("Shop Floor Workbench..."),
                                      this, SLOT(sWoTimeClock()),
                                      controlMenu, _privleges->check("WoTimeClock"),
									  QPixmap(":/images/shopFloorWorkbench.png"), toolBar ) );

  controlMenu->insertSeparator();
  }

  parent->actions.append( new Action( parent, "wo.newWorkOrder", tr("Create New Work Order..."),
                                      this, SLOT(sNewWorkOrder()),
                                      controlMenu, _privleges->check("MaintainWorkOrders") ) );

  controlMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.explodeWorkOrder", tr("Explode Work Order..."),
                                      this, SLOT(sExplodeWorkOrder()),
                                      controlMenu, _privleges->check("ExplodeWorkOrders") ) );

  parent->actions.append( new Action( parent, "wo.implodeWorkOrder", tr("Implode Work Order..."),
                                      this, SLOT(sImplodeWorkOrder()),
                                      controlMenu, _privleges->check("ImplodeWorkOrders") ) );

  parent->actions.append( new Action( parent, "wo.closeWorkOrder", tr("Close Work Order..."),
                                      this, SLOT(sCloseWorkOrder()),
                                      controlMenu, _privleges->check("CloseWorkOrders") ) );

  controlMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.printTraveler", tr("Print Traveler..."),
                                      this, SLOT(sPrintTraveler()),
                                      controlMenu, _privleges->check("PrintWorkOrderPaperWork") ) );

  parent->actions.append( new Action( parent, "wo.printPickList", tr("Print Pick List..."),
                                      this, SLOT(sPrintPickList()),
                                      controlMenu, _privleges->check("PrintWorkOrderPaperWork") ) );
 
  if ( _metrics->boolean("Routings") )
  parent->actions.append( new Action( parent, "wo.printRouting", tr("Print Routing..."),
                                      this, SLOT(sPrintRouting()),
                                      controlMenu, _privleges->check("PrintWorkOrderPaperWork") ) );

  controlMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.releaseWorkOrdersByPlannerCode", tr("Release Work Orders by Planner Code..."),
                                      this, SLOT(sReleaseWorkOrdersByPlannerCode()),
                                      controlMenu, _privleges->check("ReleaseWorkOrders") ) );

  parent->actions.append( new Action( parent, "wo.reprioritizeWorkOrder", tr("Reprioritize Work Order..."),
                                      this, SLOT(sReprioritizeWorkOrder()),
                                      controlMenu, _privleges->check("ReprioritizeWorkOrders") ) );

  parent->actions.append( new Action( parent, "wo.rescheduleWorkOrder", tr("Reschedule Work Order..."),
                                      this, SLOT(sRescheduleWorkOrder()),
                                      controlMenu, _privleges->check("RescheduleWorkOrders") ) );

  parent->actions.append( new Action( parent, "wo.changeWorkOrderQuantity", tr("Change Work Order Quantity..."),
                                      this, SLOT(sChangeWorkOrderQty()),
                                      controlMenu, _privleges->check("ChangeWorkOrderQty") ) );

  controlMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.purgeClosedWorkOrder", tr("Purge Closed Work Orders..."),
                                      this, SLOT(sPurgeClosedWorkOrders()),
                                      controlMenu, _privleges->check("PurgeWorkOrders") ) );

//  W/O | W/O Materials
  materialsMenu = new QMenu();

  parent->actions.append( new Action( parent, "wo.createWoMaterialRequirement", tr("Create W/O Material Requirement..."),
                                      this, SLOT(sCreateWoMaterialRequirement()),
                                      materialsMenu, _privleges->check("MaintainWoMaterials") ) );

  parent->actions.append( new Action( parent, "wo.deleteWoMaterialRequirement", tr("Delete W/O Material Requirement..."),
                                      this, SLOT(sDeleteWoMaterialRequirement()),
                                      materialsMenu, _privleges->check("MaintainWoMaterials") ) );

  parent->actions.append( new Action( parent, "wo.maintainWoMaterialRequirements", tr("Maintain W/O Material Requirements..."),
                                      this, SLOT(sMaintainWoMaterials()),
                                      materialsMenu, _privleges->check("MaintainWoMaterials") ) );

  materialsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.issueWoMaterialBatch", tr("Issue W/O Material Batch..."),
                                      this, SLOT(sIssueWoMaterialBatch()),
                                      materialsMenu, _privleges->check("IssueWoMaterials") ) );

  parent->actions.append( new Action( parent, "wo.issueWoMaterialItem", tr("Issue W/O Material Item..."),
                                      this, SLOT(sIssueWoMaterialItem()),
                                      materialsMenu, _privleges->check("IssueWoMaterials") ) );

  parent->actions.append( new Action( parent, "wo.returnWoMaterialBatch", tr("Return W/O Material Batch..."),
                                      this, SLOT(sReturnWoMaterialBatch()),
                                      materialsMenu, _privleges->check("ReturnWoMaterials") ) );

  parent->actions.append( new Action( parent, "wo.returnWoMaterialItem", tr("Return W/O Material Item..."),
                                      this, SLOT(sReturnWoMaterialItem()),
                                      materialsMenu, _privleges->check("ReturnWoMaterials") ) );

  parent->actions.append( new Action( parent, "wo.scrapWoMaterialFromWo", tr("Scrap W/O Material from W/O..."),
                                      this, SLOT(sScrapWoMaterialFromWo()),
                                      materialsMenu, _privleges->check("ScrapWoMaterials") ) );

  materialsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.postProduction", tr("Post Production..."),
                                      this, SLOT(sPostProduction()),
                                      materialsMenu, _privleges->check("PostProduction") ) );

  parent->actions.append( new Action( parent, "wo.correctProductionPosting", tr("Correct Production Posting..."),
                                      this, SLOT(sCorrectProductionPosting()),
                                      materialsMenu, _privleges->check("PostProduction") ) );

  parent->actions.append( new Action( parent, "wo.postMiscProduction", tr("Post Miscellaneous Production..."),
                                      this, SLOT(sPostMiscProduction()),
                                      materialsMenu, _privleges->check("PostMiscProduction") ) );

//  W/O | Operations
  operationsMenu = new QMenu();

  parent->actions.append( new Action( parent, "wo.createWoOperation", tr("Create W/O Operation..."),
                                      this, SLOT(sCreateWoOperation()),
                                      operationsMenu, _privleges->check("MaintainWoOperations") && _metrics->boolean("Routings") ) );

  parent->actions.append( new Action( parent, "wo.maintainWoOperation", tr("Maintain W/O Operations..."),
                                      this, SLOT(sMaintainWoOperations()),
                                      operationsMenu, _privleges->check("MaintainWoOperations") && _metrics->boolean("Routings") ) );

  operationsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.postOperations", tr("Post Operations..."),
                                      this, SLOT(sPostOperations()),
                                      operationsMenu, _privleges->check("PostWoOperations") && _metrics->boolean("Routings") ) );

  parent->actions.append( new Action( parent, "wo.correctOperationsPosting", tr("Correct Operations Posting..."),
                                      this, SLOT(sCorrectOperationsPosting()),
                                      operationsMenu, _privleges->check("PostWoOperations") && _metrics->boolean("Routings") ) );

//  W/O | Displays
  displaysMenu = new QMenu();

  parent->actions.append( new Action( parent, "wo.dspWoScheduleByItem", tr("Work Order Schedule by Item..."),
                                      this, SLOT(sDspWoScheduleByItem()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders"))));
//                                    QPixmap(":/images/dspWoScheduleByItem.xpm"), toolBar ) );

  parent->actions.append( new Action( parent, "wo.dspWoScheduleByItemGroup", tr("Work Order Schedule by Item Group..."),
                                      this, SLOT(sDspWoScheduleByItemGroup()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "wo.dspWoScheduleByClassCode", tr("Work Order Schedule by Class Code..."),
                                      this, SLOT(sDspWoScheduleByClassCode()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "wo.dspWoScheduleByPlannerCode", tr("Work Order Schedule by Planner Code..."),
                                      this, SLOT(sDspWoScheduleByPlannerCode()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")),
									  QPixmap(":/images/dspWoScheduleByPlannerCode.png"), toolBar ) );

  if (_metrics->boolean("Routings"))
      parent->actions.append( new Action( parent, "wo.dspWoScheduleByWorkCenter", tr("Work Order Schedule by Work Center..."),
                                          this, SLOT(sDspWoScheduleByWorkCenter()),
                                          displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) 
                                          && _metrics->boolean("Routings") ) );

  displaysMenu->insertSeparator();

 if (_metrics->boolean("BufferMgt") )
 {
    //  parent->actions.append( new Action( parent, "wo.dspWoBufferStatusByItem", tr("Work Order Buffer Status by Item..."),
    //                                      this, SLOT(sDspWoBufferStatusByItem()),
    //                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders"))  
    //                                      &&  (_metrics->value("Applicaion") == "OpenMFG") ) );

      parent->actions.append( new Action( parent, "wo.dspWoBufferStatusByItemGroup", tr("Work Order Buffer Status by Item Group..."),
                                          this, SLOT(sDspWoBufferStatusByItemGroup()),
                                          displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) 
                                          &&  _metrics->boolean("BufferMgt") ) );

      parent->actions.append( new Action( parent, "wo.dspWoBufferStatusByClassCode", tr("Work Order Buffer Status by Class Code..."),
                                          this, SLOT(sDspWoBufferStatusByClassCode()),
                                          displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders"))  
                                          &&  _metrics->boolean("BufferMgt") ) );

      parent->actions.append( new Action( parent, "wo.dspWoBufferStatusByPlannerCode", tr("Work Order Buffer Status by Planner Code..."),
                                          this, SLOT(sDspWoBufferStatusByPlannerCode()),
                                          displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders"))  
                                          &&  _metrics->boolean("BufferMgt") ) );
                                          
      displaysMenu->insertSeparator();
  }

  parent->actions.append( new Action( parent, "wo.dspWoHistoryByItem", tr("Work Order History by Item..."),
                                      this, SLOT(sDspWoHistoryByItem()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "wo.dspWoHistoryByNumber", tr("Work Order History by W/O Number..."),
                                      this, SLOT(sDspWoHistoryByNumber()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "wo.dspWoHistoryByClassCode", tr("Work Order History by Class Code..."),
                                      this, SLOT(sDspWoHistoryByClassCode()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.dspWoMaterialRequirementsByComponentItem", tr("W/O Material Requirements by Component Item..."),
                                      this, SLOT(sDspWoMaterialsByComponentItem()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "wo.dspWoMaterialRequirementsByWorkOrder", tr("W/O Material Requirements by Work Order..."),
                                      this, SLOT(sDspWoMaterialsByWo()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "wo.dspInventoryAvailabilityByWorkOrder", tr("Inventory Availability by Work Order..."),
                                      this, SLOT(sDspInventoryAvailabilityByWorkOrder()),
                                      displaysMenu, _privleges->check("ViewInventoryAvailability") ) );

  parent->actions.append( new Action( parent, "wo.dspPendingWoMaterialAvailability", tr("Pending W/O Material Availability..."),
                                      this, SLOT(sDspPendingAvailability()),
                                      displaysMenu, _privleges->check("ViewInventoryAvailability") ) );

 if (_metrics->boolean("BufferMgt") )
 {
      displaysMenu->insertSeparator();

      parent->actions.append( new Action( parent, "wo.dspWoOperationsByWorkCenter", tr("W/O Operations by Work Center..."),
                                          this, SLOT(sDspWoOperationsByWorkCenter()),
                                          displaysMenu, (_privleges->check("MaintainWoOperations") || _privleges->check("ViewWoOperations")) && _metrics->boolean("Routings") ) );

      parent->actions.append( new Action( parent, "wo.dspWoOperationsByWorkOrder", tr("W/O Operations by Work Order..."),
                                          this, SLOT(sDspWoOperationsByWo()),
                                          displaysMenu, (_privleges->check("MaintainWoOperations") || _privleges->check("ViewWoOperations")) && _metrics->boolean("Routings") ) );

      parent->actions.append( new Action( parent, "wo.dspWoOperationBufrStsByWorkCenter", tr("W/O Operation Buffer Status by Work Center..."),
                                          this, SLOT(sDspWoOperationBufrStsByWorkCenter()),
                                          displaysMenu, (_privleges->check("MaintainWoOperations") || _privleges->check("ViewWoOperations")) 
                                          && _metrics->boolean("Routings") && _metrics->boolean("BufferMgt") ) );
  }

  if (_metrics->boolean("Routings"))
  {
      displaysMenu->insertSeparator();

      parent->actions.append( new Action( parent, "wo.dspWoEffortByWorkOrder", tr("Production Time Clock by Work Order..."),
                                          this, SLOT(sDspWoEffortByWorkOrder()),
                                          displaysMenu, (_privleges->check("MaintainWoTimeClock") || _privleges->check("ViewWoTimeClock")) && _metrics->boolean("Routings") ) );

      parent->actions.append( new Action( parent, "wo.dspWoEffortByUser", tr("Production Time Clock by User..."),
                                          this, SLOT(sDspWoEffortByUser()),
                                          displaysMenu, (_privleges->check("MaintainWoTimeClock") || _privleges->check("ViewWoTimeClock")) && _metrics->boolean("Routings") ) );
  }
  
  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.dspMaterialUsageVarianceByBOMItem", tr("Material Usage Variance by BOM Item..."),
                                      this, SLOT(sDspMaterialUsageVarianceByBOMItem()),
                                      displaysMenu, _privleges->check("ViewMaterialVariances") ) );

  parent->actions.append( new Action( parent, "wo.dspMaterialUsageVarianceByItem", tr("Material Usage Variance by Item..."),
                                      this, SLOT(sDspMaterialUsageVarianceByItem()),
                                      displaysMenu, _privleges->check("ViewMaterialVariances") ) );

  parent->actions.append( new Action( parent, "wo.dspMaterialUsageVarianceByComponentItem", tr("Material Usage Variance by Component Item..."),
                                      this, SLOT(sDspMaterialUsageVarianceByComponentItem()),
                                      displaysMenu, _privleges->check("ViewMaterialVariances") ) );

  parent->actions.append( new Action( parent, "wo.dspMaterialUsageVarianceByWorkOrder", tr("Material Usage Variance by Work Order..."),
                                      this, SLOT(sDspMaterialUsageVarianceByWorkOrder()),
                                      displaysMenu, _privleges->check("ViewMaterialVariances") ) );

  parent->actions.append( new Action( parent, "wo.dspMaterialUsageVarianceByWarehouse", tr("Material Usage Variance by Warehouse..."),
                                      this, SLOT(sDspMaterialUsageVarianceByWarehouse()),
                                      displaysMenu, _privleges->check("ViewMaterialVariances") ) );

  if (_metrics->boolean("Routings"))
  { 
      displaysMenu->insertSeparator();
      
      parent->actions.append( new Action( parent, "wo.dspLaborVarianceByBOOItem", tr("Labor Variance by BOO Item..."),
                                          this, SLOT(sDspLaborVarianceByBOOItem()),
                                          displaysMenu, _privleges->check("ViewLaborVariances") && _metrics->boolean("Routings") ) );

      parent->actions.append( new Action( parent, "wo.dspLaborVarianceByItem", tr("Labor Variance by Item..."),
                                          this, SLOT(sDspLaborVarianceByItem()),
                                          displaysMenu, _privleges->check("ViewLaborVariances") && _metrics->boolean("Routings") ) );

      parent->actions.append( new Action( parent, "wo.dspLaborVarianceByWorkCenter", tr("Labor Variance by Work Center..."),
                                          this, SLOT(sDspLaborVarianceByWorkCenter()),
                                          displaysMenu, _privleges->check("ViewLaborVariances") && _metrics->boolean("Routings") ) );

      parent->actions.append( new Action( parent, "wo.dspLaborVarianceByWorkOrder", tr("Labor Variance by Work Order..."),
                                          this, SLOT(sDspLaborVarianceByWorkOrder()),
                                          displaysMenu, _privleges->check("ViewLaborVariances") && _metrics->boolean("Routings") ) );

      displaysMenu->insertSeparator();
  }

  if (_metrics->boolean("BBOM"))
  { 
      parent->actions.append( new Action( parent, "wo.dspBreederDistributionVarianceByItem", tr("Breeder Distribution Variance by Item..."),
                                          this, SLOT(sDspBreederDistributionVarianceByItem()),
                                          displaysMenu, _privleges->check("ViewBreederVariances") && _metrics->boolean("BBOM") ) );

      parent->actions.append( new Action( parent, "wo.dspBreederDistributionVarianceByWarehouse", tr("Breeder Distribution Variance by Warehouse..."),
                                          this, SLOT(sDspBreederDistributionVarianceByWarehouse()),
                                          displaysMenu, _privleges->check("ViewBreederVariances") && _metrics->boolean("BBOM") ) );
  }
  
  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "wo.dspOpenWorkOrdersWithClosedParentSalesOrders", tr("Open Work Orders with Closed Parent Sales Orders..."),
                                      this, SLOT(sDspWoSoStatusMismatch()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "wo.dspOpenWorkOrdersWithParentSalesOrders", tr("Open Work Orders with Parent Sales Orders..."),
                                      this, SLOT(sDspWoSoStatus()),
                                      displaysMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

//  W/O | Reports
  reportsMenu = new QMenu();

  parent->actions.append( new Action( parent, "wo.rptPrintWorkOrderForm", tr("Print Work Order Form..."),
                                      this, SLOT(sPrintWorkOrderForm()),
                                      reportsMenu, _privleges->check("PrintWorkOrderPaperWork") ) );

  parent->actions.append( new Action( parent, "wo.rptPrintProductionEntrySheet", tr("Print Production Entry Sheet..."),
                                      this, SLOT(sPrintProductionEntrySheet()),
                                      reportsMenu, _privleges->check("PrintWorkOrderPaperWork") ) );

  mainMenu = new QMenu();

  mainMenu->insertItem(tr("W/O &Control"),    controlMenu    );
  mainMenu->insertItem(tr("W/O &Materials"),  materialsMenu  );
  if (_metrics->boolean("Routings"))
    mainMenu->insertItem(tr("W/O &Operations"), operationsMenu );
  mainMenu->insertItem(tr("&Displays"),       displaysMenu   );
  mainMenu->insertItem(tr("&Reports"),        reportsMenu    );
  parent->populateCustomMenu(mainMenu, "W/O");
  parent->menuBar()->insertItem(tr("W/&O"), mainMenu);
}