Beispiel #1
0
moduleMS::moduleMS(OpenMFGGUIClient *Pparent) :
 QObject(Pparent, "msModule")
{
  parent = Pparent;
  
  toolBar = new QToolBar(tr("M/S Tools"));
  toolBar->setObjectName("M/S Tools");
  toolBar->setIconSize(QSize(32, 32));
  if (_preferences->boolean("ShowMSToolbar"))
    parent->addToolBar(toolBar);


//  Scheduling
  planningMenu = new QMenu();

  parent->actions.append( new Action( parent, "ms.listProductionPlans", tr("List Production Plans..."),
                                      this, SLOT(sListProductionPlans()),
                                      planningMenu, (_privleges->check("MaintainPlannedSchedules") || _privleges->check("ViewPlannedSchedules")) ) );

  parent->actions.append( new Action( parent, "ms.newProductionPlan", tr("New Production Plan..."),
                                      this, SLOT(sNewProductionPlan()),
                                      planningMenu, _privleges->check("MaintainPlannedSchedules") ) );

//  Planned Ordered
  plannedOrdersMenu = new QMenu();

  parent->actions.append( new Action( parent, "ms.createPlannedOrder", tr("Create Planned Order..."),
                                      this, SLOT(sCreatePlannedOrder()),
                                      plannedOrdersMenu, _privleges->check("CreatePlannedOrders") ) );

  plannedOrdersMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.runMPSByPlannerCode", tr("Run MPS by Planner Code..."),
                                      this, SLOT(sRunMPSByPlannerCode()),
                                      plannedOrdersMenu, _privleges->check("CreatePlannedOrders")));

  parent->actions.append( new Action( parent, "ms.runMRPByPlannerCode", tr("Run MRP by Planner Code..."),
                                      this, SLOT(sCreatePlannedReplenOrdersByPlannerCode()),
                                      plannedOrdersMenu, _privleges->check("CreatePlannedOrders"),
									  QPixmap(":/images/runMrpByPlannerCode.png"), toolBar ) );

  parent->actions.append( new Action( parent, "ms.runMRPByItem", tr("Run MRP by Item..."),
                                      this, SLOT(sCreatePlannedReplenOrdersByItem()),
                                      plannedOrdersMenu, _privleges->check("CreatePlannedOrders") ) );

  plannedOrdersMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.firmPlannedOrdersByPlannerCode", tr("Firm Planned Orders by Planner Code..."),
                                      this, SLOT(sFirmPlannedOrdersByPlannerCode()),
                                      plannedOrdersMenu, _privleges->check("FirmPlannedOrders") ) );

  parent->actions.append( new Action( parent, "ms.releasePlannedOrdersByPlannerCode", tr("Release Planned Orders by Planner Code..."),
                                      this, SLOT(sReleasePlannedOrdersByPlannerCode()),
                                      plannedOrdersMenu, _privleges->check("ReleasePlannedOrders") ) );

  plannedOrdersMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.deletePlannedOrdersByPlannerCode", tr("Delete Planned Orders by Planner Code..."),
                                      this, SLOT(sDeletePlannedOrdersByPlannerCode()),
                                      plannedOrdersMenu, _privleges->check("DeletePlannedOrders") ) );

  parent->actions.append( new Action( parent, "ms.deletePlannedOrder", tr("Delete Planned Order..."),
                                      this, SLOT(sDeletePlannedOrder()),
                                      plannedOrdersMenu, _privleges->check("DeletePlannedOrders") ) );

//  Buffer Management
  bufferManagementMenu = new QMenu();

  parent->actions.append( new Action( parent, "ms.runBufferStatusByItem", tr("Run Buffer Status by Item..."),
                                      this, SLOT(sCreateBufferStatusByItem()),
                                      bufferManagementMenu, _privleges->check("CreateBufferStatus") ) );

  parent->actions.append( new Action( parent, "ms.runBufferStatusByPlannerCode", tr("Run Buffer Status by Planner Code..."),
                                      this, SLOT(sCreateBufferStatusByPlannerCode()),
                                      bufferManagementMenu, _privleges->check("CreateBufferStatus") ) );

  bufferManagementMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.dspInventoryBufferStatusByItemGroup", tr("Inventory Buffer Status by Item Group..."),
                                      this, SLOT(sDspInventoryBufferStatusByItemGroup()),
                                      bufferManagementMenu, _privleges->check("ViewInventoryBufferStatus") ) );

  parent->actions.append( new Action( parent, "ms.dspInventoryBufferStatusByClassCode", tr("Inventory Buffer Status by Class Code..."),
                                      this, SLOT(sDspInventoryBufferStatusByClassCode()),
                                      bufferManagementMenu, _privleges->check("ViewInventoryBufferStatus") ) );

  parent->actions.append( new Action( parent, "ms.dspInventoryBufferStatusByPlannerCode", tr("Inventory Buffer Status by Planner Code..."),
                                      this, SLOT(sDspInventoryBufferStatusByPlannerCode()),
                                      bufferManagementMenu, _privleges->check("ViewInventoryBufferStatus") ) );

  bufferManagementMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.dspCapacityBufferStatusByWorkCenter", tr("Capacity Buffer Status by Work Center..."),
                                      this, SLOT(sDspCapacityBufferStatusByWorkCenter()),
                                      bufferManagementMenu, _privleges->check("ViewWorkCenterBufferStatus") && _metrics->boolean("Routings") ) );

  bufferManagementMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.dspWoBufferStatusByItemGroup", tr("Work Order Buffer Status by Item Group..."),
                                      this, SLOT(sDspWoBufferStatusByItemGroup()),
                                      bufferManagementMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "ms.dspWoBufferStatusByClassCode", tr("Work Order Buffer Status by Class Code..."),
                                      this, SLOT(sDspWoBufferStatusByClassCode()),
                                      bufferManagementMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "ms.dspWoBufferStatusByPlannerCode", tr("Work Order Buffer Status by Planner Code..."),
                                      this, SLOT(sDspWoBufferStatusByPlannerCode()),
                                      bufferManagementMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

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

  bufferManagementMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.dspPoLineItemsByBufferStatus", tr("P/O Items by Buffer Status..."),
                                      this, SLOT(sDspPoItemsByBufferStatus()),
                                      bufferManagementMenu, _privleges->check("ViewPurchaseOrders") ) );

//  Displays
  displaysMenu = new QMenu();

  parent->actions.append( new Action( parent, "ms.dspPlannedOrdersByItem", tr("Planned Orders by Item..."),
                                      this, SLOT(sDspPlannedOrdersByItem()),
                                      displaysMenu, _privleges->check("ViewPlannedOrders") ) );

  parent->actions.append( new Action( parent, "ms.dspPlannedOrdersByPlannerCode", tr("Planned Orders by Planner Code..."),
                                      this, SLOT(sDspPlannedOrdersByPlannerCode()),
                                      displaysMenu, _privleges->check("ViewPlannedOrders"),
									  QPixmap(":/images/dspPlannedOrdersByPlannerCode.png"), toolBar ) );

  parent->actions.append( new Action( parent, "ms.dspMPSDetail", tr("MPS Detail..."),
                                      this, SLOT(sDspMPSDetail()),
                                      displaysMenu, _privleges->check("ViewMPS") ) );

  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.dspRoughCutByWorkCenter", tr("Rough Cut Capacity Plan by Work Center..."),
                                      this, SLOT(sDspRoughCutByWorkCenter()),
                                      displaysMenu, _privleges->check("ViewRoughCut") && _metrics->boolean("Routings") ) );

  parent->actions.append( new Action( parent, "ms.dspTimePhasedRoughCutByWorkCenter", tr("Time-Phased Rough Cut Capacity Plan by Work Center..."),
                                      this, SLOT(sDspTimePhasedRoughCutByWorkCenter()),
                                      displaysMenu, _privleges->check("ViewRoughCut") && _metrics->boolean("Routings") ) );

  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.dspPlannedRevenue/ExpensesByPlannerCode", tr("Planned Revenue/Expenses by Planner Code..."),
                                      this, SLOT(sDspPlannedRevenueExpensesByPlannerCode()),
                                      displaysMenu, (_privleges->check("ViewPlannedOrders") && _privleges->check("ViewCosts") && _privleges->check("ViewListPrices")) ) );

  parent->actions.append( new Action( parent, "ms.dspTimePhasedPlannedRevenue/ExpensesByPlannerCode", tr("Time-Phased Planned Revenue/Expenses by Planner Code..."),
                                      this, SLOT(sDspTimePhasedPlannedREByPlannerCode()),
                                      displaysMenu, (_privleges->check("ViewPlannedOrders") && _privleges->check("ViewCosts") && _privleges->check("ViewListPrices")) ) );

  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.dspTimePhasedAvailabiltiy", tr("Time-Phased Availability..."),
                                      this, SLOT(sDspTimePhasedAvailability()),
                                      displaysMenu, _privleges->check("ViewInventoryAvailability") ) );

  parent->actions.append( new Action( parent, "ms.dspRunningAvailability", tr("Running Availability..."),
                                      this, SLOT(sDspRunningAvailability()),
                                      displaysMenu, _privleges->check("ViewInventoryAvailability") ) );

  parent->actions.append( new Action( parent, "ms.dspMRPDetail", tr("MRP Detail..."),
                                      this, SLOT(sDspMRPDetail()),
                                      displaysMenu, _privleges->check("ViewInventoryAvailability") ) );

  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.dspExpediteExceptionsByPlannerCode", tr("Expedite Exceptions by Planner Code..."),
                                      this, SLOT(sDspExpediteExceptionsByPlannerCode()),
                                      displaysMenu, _privleges->check("ViewInventoryAvailability") ) );

  parent->actions.append( new Action( parent, "ms.dspReorderExceptionsByPlannerCode", tr("Reorder Exceptions by Planner Code..."),
                                      this, SLOT(sDspReorderExceptionsByPlannerCode()),
                                      displaysMenu, _privleges->check("ViewInventoryAvailability") ) );

//  Reports
  reportsMenu = new QMenu();

  parent->actions.append( new Action( parent, "ms.rptPlannedOrdersByItem", tr("Planned Orders by Item..."),
                                      this, SLOT(sRptPlannedOrdersByItem()),
                                      reportsMenu, _privleges->check("ViewPlannedOrders") ) );

  parent->actions.append( new Action( parent, "ms.rptPlannedOrdersByPlannerCode", tr("Planned Orders by Planner Code..."),
                                      this, SLOT(sRptPlannedOrdersByPlannerCode()),
                                      reportsMenu, _privleges->check("ViewPlannedOrders") ) );

  parent->actions.append( new Action( parent, "ms.rptMPSDetail", tr("MPS Detail..."),
                                      this, SLOT(sRptMPSDetail()),
                                      reportsMenu, _privleges->check("ViewMPS") ) );

  reportsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.rptRoughCutByWorkCenter", tr("Rough Cut Capacity Plan by Work Center..."),
                                      this, SLOT(sRptRoughCutByWorkCenter()),
                                      reportsMenu, _privleges->check("ViewRoughCut") && _metrics->boolean("Routings") ) );

  parent->actions.append( new Action( parent, "ms.rptTimePhasedRoughCutByWorkCenter", tr("Time-Phased Rough Cut Capacity Plan by Work Center..."),
                                      this, SLOT(sRptTimePhasedRoughCutByWorkCenter()),
                                      reportsMenu, _privleges->check("ViewRoughCut") && _metrics->boolean("Routings") ) );

  reportsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.rptPlannedRevenue/ExpensesByPlannerCode", tr("Planned Revenue/Expenses by Planner Code..."),
                                      this, SLOT(sRptPlannedRevenueExpensesByPlannerCode()),
                                      reportsMenu, _privleges->check("ViewPlannedOrders") ) );

  parent->actions.append( new Action( parent, "ms.rptTimePhasedPlannedRevenue/ExpensesByPlannerCode", tr("Time-Phased Planned Revenue/Expenses by Planner Code..."),
                                      this, SLOT(sRptTimePhasedPlannedREByPlannerCode()),
                                      reportsMenu, _privleges->check("ViewPlannedOrders") ) );

  reportsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.rptTimePhasedAvailabiltiy", tr("Time-Phased Availability..."),
                                      this, SLOT(sRptTimePhasedAvailability()),
                                      reportsMenu, _privleges->check("ViewInventoryAvailability") ) );

  parent->actions.append( new Action( parent, "ms.rptRunningAvailability", tr("Running Availability..."),
                                      this, SLOT(sRptRunningAvailability()),
                                      reportsMenu, _privleges->check("ViewInventoryAvailability") ) );

  parent->actions.append( new Action( parent, "ms.rptMRPDetail", tr("MRP Detail..."),
                                      this, SLOT(sRptMRPDetail()),
                                      reportsMenu, _privleges->check("ViewInventoryAvailability") ) );

  reportsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "ms.rptExpediteExceptionsByPlannerCode", tr("Expedite Exceptions by Planner Code..."),
                                      this, SLOT(sRptExpediteExceptionsByPlannerCode()),
                                      reportsMenu, _privleges->check("ViewInventoryAvailability") ) );

  parent->actions.append( new Action( parent, "ms.rptReorderExceptionsByPlannerCode", tr("Reorder Exceptions by Planner Code..."),
                                      this, SLOT(sRptReorderExceptionsByPlannerCode()),
                                      reportsMenu, _privleges->check("ViewInventoryAvailability") ) );


//  Master Information
  masterInfoMenu = new QMenu();

  parent->actions.append( new Action( parent, "ms.plannerCodes", tr("Planner Codes..."),
                                      this, SLOT(sPlannerCodes()),
                                      masterInfoMenu, (_privleges->check("MaintainPlannerCodes") && _privleges->check("ViewPlannerCodes")) ) );

  parent->actions.append( new Action( parent, "ms.warehouseWeek", tr("Warehouse Week..."),
                                      this, SLOT(sWarehouseWeek()),
                                      masterInfoMenu, _privleges->check("MaintainWarehouseWorkWeek") ) );

  parent->actions.append( new Action( parent, "ms.warehouseCalendarExceptions", tr("Warehouse Calendar Exceptions..."),
                                      this, SLOT(sWarehouseCalendarExceptions()),
                                      masterInfoMenu, (_privleges->check("MaintainWarehouseCalendarExceptions") || _privleges->check("ViewWarehouseCalendarExceptions")) ) );

  mainMenu = new QMenu();
  mainMenu->insertItem(tr("Planning"), planningMenu);
  mainMenu->insertItem(tr("Scheduling"), plannedOrdersMenu);
  if (_metrics->boolean("BufferMgt"))
    mainMenu->insertItem(tr("Buffer Management"), bufferManagementMenu);
  mainMenu->insertItem(tr("Displays"), displaysMenu);
  mainMenu->insertItem(tr("Reports"), reportsMenu);
  mainMenu->insertItem(tr("Master Information"), masterInfoMenu);
  parent->populateCustomMenu(mainMenu, "M/S");
  parent->menuBar()->insertItem(tr("&M/S"), mainMenu);
}
Beispiel #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);
}
Beispiel #3
0
moduleCP::moduleCP(OpenMFGGUIClient *Pparent) :
  QObject(Pparent, "cpModule")
{
  parent = Pparent;

//  Buffer Management
  bufferManagementMenu = new QMenu();

  parent->actions.append( new Action( parent, "cp.runBufferStatusByItem", tr("Run Buffer Status by Item..."),
                                      this, SLOT(sCreateBufferStatusByItem()),
                                      bufferManagementMenu, _privleges->check("CreateBufferStatus") ) );

  parent->actions.append( new Action( parent, "cp.runBufferStatusByPlannerCode", tr("Run Buffer Status by Planner Code..."),
                                      this, SLOT(sCreateBufferStatusByPlannerCode()),
                                      bufferManagementMenu, _privleges->check("CreateBufferStatus") ) );

  bufferManagementMenu->insertSeparator();

  parent->actions.append( new Action( parent, "cp.dspInventoryBufferStatusByItemGroup", tr("Inventory Buffer Status by Item Group..."),
                                      this, SLOT(sDspInventoryBufferStatusByItemGroup()),
                                      bufferManagementMenu, _privleges->check("ViewInventoryBufferStatus") ) );

  parent->actions.append( new Action( parent, "cp.dspInventoryBufferStatusByClassCode", tr("Inventory Buffer Status by Class Code..."),
                                      this, SLOT(sDspInventoryBufferStatusByClassCode()),
                                      bufferManagementMenu, _privleges->check("ViewInventoryBufferStatus") ) );

  parent->actions.append( new Action( parent, "cp.dspInventoryBufferStatusByPlannerCode", tr("Inventory Buffer Status by Planner Code..."),
                                      this, SLOT(sDspInventoryBufferStatusByPlannerCode()),
                                      bufferManagementMenu, _privleges->check("ViewInventoryBufferStatus") ) );

  bufferManagementMenu->insertSeparator();

  parent->actions.append( new Action( parent, "cp.dspCapacityBufferStatusByWorkCenter", tr("Capacity Buffer Status by Work Center..."),
                                      this, SLOT(sDspCapacityBufferStatusByWorkCenter()),
                                      bufferManagementMenu, _privleges->check("ViewWorkCenterBufferStatus") && _metrics->boolean("Routings") ) );

  bufferManagementMenu->insertSeparator();

  parent->actions.append( new Action( parent, "cp.dspWoBufferStatusByItemGroup", tr("Work Order Buffer Status by Item Group..."),
                                      this, SLOT(sDspWoBufferStatusByItemGroup()),
                                      bufferManagementMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "cp.dspWoBufferStatusByClassCode", tr("Work Order Buffer Status by Class Code..."),
                                      this, SLOT(sDspWoBufferStatusByClassCode()),
                                      bufferManagementMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

  parent->actions.append( new Action( parent, "cp.dspWoBufferStatusByPlannerCode", tr("Work Order Buffer Status by Planner Code..."),
                                      this, SLOT(sDspWoBufferStatusByPlannerCode()),
                                      bufferManagementMenu, (_privleges->check("MaintainWorkOrders") || _privleges->check("ViewWorkOrders")) ) );

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

  bufferManagementMenu->insertSeparator();

  parent->actions.append( new Action( parent, "cp.dspPoLineItemsByBufferStatus", tr("P/O Items by Buffer Status..."),
                                      this, SLOT(sDspPoItemsByBufferStatus()),
                                      bufferManagementMenu, _privleges->check("ViewPurchaseOrders") ) );


//  Displays Menu
  displaysMenu = new QMenu();

  parent->actions.append( new Action( parent, "cp.dspTimePhasedCapacityByWorkCenter", tr("Time-Phased Capacity by Work Center..."),
                                      this, SLOT(sDspTimePhasedCapacityByWorkCenter()),
                                      displaysMenu, _privleges->check("ViewWorkCenterCapacity") && _metrics->boolean("Routings") ) );

  parent->actions.append( new Action( parent, "cp.dspTimePhasedAvailableCapacityByWorkCenter", tr("Time-Phased Available Capacity by Work Center..."),
                                      this, SLOT(sDspTimePhasedAvailableCapacityByWorkCenter()),
                                      displaysMenu, _privleges->check("ViewWorkCenterCapacity") && _metrics->boolean("Routings") ) );

  parent->actions.append( new Action( parent, "cp.dspTimePhasedLoadByWorkCenter", tr("Time-Phased Load by Work Center..."),
                                      this, SLOT(sDspTimePhasedLoadByWorkCenter()),
                                      displaysMenu, _privleges->check("ViewWorkCenterLoad") && _metrics->boolean("Routings") ) );

  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "cp.dspTimePhasedDemandByPlannerCode", tr("Time-Phased Demand by Planner Code..."),
                                      this, SLOT(sDspTimePhasedDemandByPlannerCode()),
                                      displaysMenu, _privleges->check("ViewProductionDemand") ) );

  parent->actions.append( new Action( parent, "cp.dspTimePhasedProductionByItem", tr("Time-Phased Production by Item..."),
                                      this, SLOT(sDspTimePhasedProductionByItem()),
                                      displaysMenu, _privleges->check("ViewProduction") ) );

  parent->actions.append( new Action( parent, "cp.dspTimePhasedProductionByPlannerCode", tr("Time-Phased Production by Planner Code..."),
                                      this, SLOT(sDspTimePhasedProductionByPlannerCode()),
                                      displaysMenu, _privleges->check("ViewProduction") ) );

  displaysMenu->insertSeparator();

  parent->actions.append( new Action( parent, "cp.dspCapacityBufferStatusByWorkCenter", tr("Capacity Buffer Status by Work Center..."),
                                      this, SLOT(sDspCapacityBufferStatusByWorkCenter()),
                                      displaysMenu, _privleges->check("ViewWorkCenterBufferStatus") && _metrics->boolean("Routings") ) );


//  Reports Menu
  reportsMenu = new QMenu();

  parent->actions.append( new Action( parent, "cp.rptTimePhasedCapacityByWorkCenter", tr("Time-Phased Capacity by Work Center..."),
                                      this, SLOT(sRptTimePhasedCapacityByWorkCenter()),
                                      reportsMenu, _privleges->check("ViewWorkCenterCapacity") && _metrics->boolean("Routings") ) );

  parent->actions.append( new Action( parent, "cp.rptTimePhasedAvailableCapacityByWorkCenter", tr("Time-Phased Available Capacity by Work Center..."),
                                      this, SLOT(sRptTimePhasedAvailableCapacityByWorkCenter()),
                                      reportsMenu, _privleges->check("ViewWorkCenterCapacity") && _metrics->boolean("Routings") ) );

  parent->actions.append( new Action( parent, "cp.rptTimePhasedLoadByWorkCenter", tr("Time-Phased Load by Work Center..."),
                                      this, SLOT(sRptTimePhasedLoadByWorkCenter()),
                                      reportsMenu, _privleges->check("ViewWorkCenterLoad") && _metrics->boolean("Routings") ) );

  reportsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "cp.rptTimePhasedDemandByPlannerCode", tr("Time-Phased Demand by Planner Code..."),
                                      this, SLOT(sRptTimePhasedDemandByPlannerCode()),
                                      reportsMenu, _privleges->check("ViewProductionDemand") ) );

  parent->actions.append( new Action( parent, "cp.rptTimePhasedProductionByItem", tr("Time-Phased Production by Item..."),
                                      this, SLOT(sRptTimePhasedProductionByItem()),
                                      reportsMenu, _privleges->check("ViewProduction") ) );

  parent->actions.append( new Action( parent, "cp.rptTimePhasedProductionByPlannerCode", tr("Time-Phased Production by Planner Code..."),
                                      this, SLOT(sRptTimePhasedProductionByPlannerCode()),
                                      reportsMenu, _privleges->check("ViewProduction") ) );

  reportsMenu->insertSeparator();

  parent->actions.append( new Action( parent, "cp.rptCapacityBufferStatusByWorkCenter", tr("Capacity Buffer Status by Work Center..."),
                                      this, SLOT(sRptCapacityBufferStatusByWorkCenter()),
                                      reportsMenu, _privleges->check("ViewWorkCenterBufferStatus") && _metrics->boolean("Routings") ) );

//  Master Information
  masterInfoMenu = new QMenu();

  parent->actions.append( new Action( parent, "cp.workCenters", tr("Work Centers..."),
                                      this, SLOT(sWorkCenters()),
                                      masterInfoMenu, (_privleges->check("MaintainWorkCenters") && _privleges->check("ViewWorkCenters") && _metrics->boolean("Routings")) ) );

  mainMenu = new QMenu();

  if (_metrics->boolean("BufferMgt"))
    mainMenu->insertItem(tr("Buffer Management"), bufferManagementMenu);
  mainMenu->insertItem(tr("&Displays"), displaysMenu);
  mainMenu->insertItem(tr("&Reports"), reportsMenu);
  mainMenu->insertItem(tr("&Master Information"), masterInfoMenu);
  parent->populateCustomMenu(mainMenu, "C/P");
  parent->menuBar()->insertItem(tr("&C/P"), mainMenu);
}
Beispiel #4
0
menuSchedule::menuSchedule(GUIClient *Pparent) :
 QObject(Pparent, "msModule")
{
  parent = Pparent;
  
  toolBar = new QToolBar(tr("Schedule Tools"));
  toolBar->setObjectName("Schedule Tools");
  toolBar->setIconSize(QSize(32, 32));
  if (_preferences->boolean("ShowMSToolbar"))
    parent->addToolBar(toolBar);

  mainMenu = new QMenu(parent);
  planningMenu = new QMenu(parent);
  plannedOrdersMenu = new QMenu(parent);
  plannedOrdersMrpMenu = new QMenu(parent);
  capacityPlanMenu = new QMenu(parent);
  capacityPlanTpPrdMenu = new QMenu(parent);
  bufferMenu = new QMenu(parent);
  bufferRunMenu = new QMenu(parent);
  bufferInvMenu = new QMenu(parent);
  bufferWoMenu = new QMenu(parent);
  reportsMenu = new QMenu(parent);
  reportsPlannedMenu = new QMenu(parent);
  masterInfoMenu = new QMenu(parent);

  mainMenu->setObjectName("menu.sched");
  planningMenu->setObjectName("menu.sched.planning");
  plannedOrdersMenu->setObjectName("menu.sched.plannedorders");
  plannedOrdersMrpMenu->setObjectName("menu.sched.plannedordersmrp");
  capacityPlanMenu->setObjectName("menu.sched.capacityplan");
  capacityPlanTpPrdMenu->setObjectName("menu.sched.capacityplantpprd");
  bufferMenu->setObjectName("menu.sched.buffer");
  bufferRunMenu->setObjectName("menu.sched.bufferrun");
  bufferInvMenu->setObjectName("menu.sched.bufferinv");
  bufferWoMenu->setObjectName("menu.sched.bufferwo");
  reportsMenu->setObjectName("menu.sched.reports");
  reportsPlannedMenu->setObjectName("menu.sched.reportsplanned");
  masterInfoMenu->setObjectName("menu.sched.masterinfo");

  actionProperties acts[] = {
  
    // Schedule | Planning
    { "menu",	tr("&Production Plan"), (char*)planningMenu,	mainMenu,	true,	NULL, NULL, true	, NULL },
    { "ms.newProductionPlan", tr("&New..."), SLOT(sNewProductionPlan()), planningMenu, _privileges->check("MaintainPlannedSchedules"), NULL, NULL, true , NULL },
    { "ms.listProductionPlans", tr("&List..."), SLOT(sListProductionPlans()), planningMenu, _privileges->check("MaintainPlannedSchedules") || _privileges->check("ViewPlannedSchedules"), NULL, NULL, true , NULL },

    // Schedule | Schedule  
    { "menu",	tr("&Scheduling"), (char*)plannedOrdersMenu,	mainMenu,	true,	NULL, NULL, true	, NULL },
    { "ms.createPlannedOrder", tr("&New Planned Order..."), SLOT(sCreatePlannedOrder()), plannedOrdersMenu, _privileges->check("CreatePlannedOrders"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, plannedOrdersMenu, true, NULL, NULL, true , NULL },
    { "ms.runMPSByPlannerCode", tr("Run M&PS..."), SLOT(sRunMPSByPlannerCode()),plannedOrdersMenu, _privileges->check("CreatePlannedOrders"), NULL, NULL, true , NULL },
 
    // Schedule | Schedule | MRP
    { "menu",	tr("Run &MRP"), (char*)plannedOrdersMrpMenu,	plannedOrdersMenu,	true,	NULL, NULL, true	, NULL },
    { "ms.runMRPByPlannerCode", tr("by &Planner Code..."), SLOT(sCreatePlannedReplenOrdersByPlannerCode()), plannedOrdersMrpMenu, _privileges->check("CreatePlannedOrders"), new QPixmap(":/images/runMrpByPlannerCode.png"), toolBar, true , "Run MRP by Planner Code" },
    { "ms.runMRPByItem", tr("by &Item..."), SLOT(sCreatePlannedReplenOrdersByItem()), plannedOrdersMrpMenu, _privileges->check("CreatePlannedOrders"), NULL, NULL, true , NULL },
    
    { "separator", NULL, NULL, plannedOrdersMenu, true, NULL, NULL, true , NULL },
    { "ms.firmPlannedOrdersByPlannerCode", tr("&Firm Planned Orders..."), SLOT(sFirmPlannedOrdersByPlannerCode()), plannedOrdersMenu, _privileges->check("FirmPlannedOrders"), NULL, NULL, true , NULL },
    { "ms.releasePlannedOrdersByPlannerCode", tr("&Release Planned Orders..."), SLOT(sReleasePlannedOrdersByPlannerCode()),  plannedOrdersMenu, _privileges->check("ReleasePlannedOrders"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, plannedOrdersMenu, true, NULL, NULL, true , NULL },
    { "ms.deletePlannedOrder", tr("&Delete Planned Order..."), SLOT(sDeletePlannedOrder()),plannedOrdersMenu, _privileges->check("DeletePlannedOrders"), NULL, NULL, true , NULL },
    { "ms.deletePlannedOrdersByPlannerCode", tr("Delete Planned Order&s..."), SLOT(sDeletePlannedOrdersByPlannerCode()), plannedOrdersMenu, _privileges->check("DeletePlannedOrders"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, mainMenu, true, NULL, NULL, true , NULL },

    // Schedule | Constraint Management
    { "menu",	tr("Cons&traint Management"), (char*)bufferMenu,	mainMenu,	true,	NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
  
    // Schedule | Buffer Status | Run
    { "menu",	tr("&Update Status"), (char*)bufferRunMenu,	bufferMenu,	true,	NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.runBufferStatusByPlannerCode", tr("by &Planner Code..."), SLOT(sCreateBufferStatusByPlannerCode()), bufferRunMenu, _privileges->check("CreateBufferStatus"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.runBufferStatusByItem", tr("by &Item..."), SLOT(sCreateBufferStatusByItem()), bufferRunMenu, _privileges->check("CreateBufferStatus"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
 
    { "separator", NULL, NULL, bufferMenu, true, NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
  
    // Schedule | Contsraint Management | Inventory Status
    { "menu",	tr("&Inventory"), (char*)bufferInvMenu,	bufferMenu,	true,	NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspInventoryBufferStatusByPlannerCode", tr("by &Planner Code..."), SLOT(sDspInventoryBufferStatusByPlannerCode()), bufferInvMenu, _privileges->check("ViewInventoryBufferStatus"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspInventoryBufferStatusByClassCode", tr("by &Class Code..."), SLOT(sDspInventoryBufferStatusByClassCode()), bufferInvMenu, _privileges->check("ViewInventoryBufferStatus"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspInventoryBufferStatusByItemGroup", tr("by &Item Group..."), SLOT(sDspInventoryBufferStatusByItemGroup()), bufferInvMenu, _privileges->check("ViewInventoryBufferStatus"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspPoLineItemsByBufferStatus", tr("&Purchase Order..."), SLOT(sDspPoItemsByBufferStatus()), bufferMenu, _privileges->check("ViewPurchaseOrders"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },

    // Schedule | Gostraint Management | Work Order Status
    { "menu",	tr("&Work Order"), (char*)bufferWoMenu,	bufferMenu,	true,	NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspWoBufferStatusByPlannerCode", tr("by &Planner Code..."), SLOT(sDspWoBufferStatusByPlannerCode()), bufferWoMenu, _privileges->check("MaintainWorkOrders") || _privileges->check("ViewWorkOrders"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspWoBufferStatusByClassCode", tr("by &Class Code..."), SLOT(sDspWoBufferStatusByClassCode()), bufferWoMenu, _privileges->check("MaintainWorkOrders") || _privileges->check("ViewWorkOrders"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspWoBufferStatusByItemGroup", tr("by &Item Group..."), SLOT(sDspWoBufferStatusByItemGroup()), bufferWoMenu, _privileges->check("MaintainWorkOrders") || _privileges->check("ViewWorkOrders"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
  
    { "separator", NULL, NULL, bufferMenu, true, NULL, NULL,  _metrics->boolean("Routings") &&  _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspCapacityBufferStatusByWorkCenter", tr("&Capacity..."), SLOT(sDspCapacityBufferStatusByWorkCenter()), bufferMenu, _privileges->check("ViewWorkCenterBufferStatus"), NULL, NULL, _metrics->boolean("Routings") && _metrics->boolean("BufferMgt") , NULL },
    { "ms.dspWoOperationBufrStsByWorkCenter", tr("W/O &Operation..."), SLOT(sDspWoOperationBufrStsByWorkCenter()), bufferMenu, _privileges->check("MaintainWoOperations") || _privileges->check("ViewWoOperations"), NULL , NULL, _metrics->boolean("Routings") && _metrics->boolean("BufferMgt")  , NULL },  
  
    // Schedule | Capacity Plannning
    { "menu",	tr("&Capacity Planning"), (char*)capacityPlanMenu,	mainMenu,	true,	NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "cp.dspTimePhasedCapacityByWorkCenter", tr("Time-Phased &Capacity..."), SLOT(sDspTimePhasedCapacityByWorkCenter()), capacityPlanMenu, _privileges->check("ViewWorkCenterCapacity"), NULL, NULL, _metrics->boolean("Routings") , NULL },
    { "cp.dspTimePhasedLoadByWorkCenter", tr("Time-Phased &Load..."), SLOT(sDspTimePhasedLoadByWorkCenter()), capacityPlanMenu, _privileges->check("ViewWorkCenterLoad"), NULL, NULL, _metrics->boolean("Routings") , NULL },
    { "cp.dspTimePhasedAvailableCapacityByWorkCenter", tr("Time-Phased &Available Capacity..."), SLOT(sDspTimePhasedAvailableCapacityByWorkCenter()), capacityPlanMenu, _privileges->check("ViewWorkCenterCapacity"), NULL, NULL, _metrics->boolean("Routings") , NULL },
    { "separator", NULL, NULL, capacityPlanMenu, true, NULL, NULL,  _metrics->boolean("Routings") , NULL },

    // Schedule | Capacity Plannning | Time Phased Production
    { "menu",	tr("Time-Phased &Production"), (char*)capacityPlanTpPrdMenu,	capacityPlanMenu,	true,	NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "cp.dspTimePhasedProductionByPlannerCode", tr("by &Planner Code..."), SLOT(sDspTimePhasedProductionByPlannerCode()), capacityPlanTpPrdMenu, _privileges->check("ViewProduction"), NULL, NULL, true , NULL },
    { "cp.dspTimePhasedProductionByItem", tr("by &Item..."), SLOT(sDspTimePhasedProductionByItem()), capacityPlanTpPrdMenu, _privileges->check("ViewProduction"), NULL, NULL, true , NULL },

    { "cp.dspTimePhasedDemandByPlannerCode", tr("Time-Phased &Demand..."), SLOT(sDspTimePhasedDemandByPlannerCode()), capacityPlanMenu, _privileges->check("ViewProductionDemand"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, capacityPlanMenu, true, NULL, NULL, _metrics->boolean("Routings") && _metrics->boolean("BufferMgt") , NULL },
    { "cp.dspCapacityBufferStatusByWorkCenter", tr("Capacity &Buffer Status..."), SLOT(sDspCapacityBufferStatusByWorkCenter()), capacityPlanMenu, _privileges->check("ViewWorkCenterBufferStatus"), NULL, NULL, _metrics->boolean("Routings") && _metrics->boolean("BufferMgt") , NULL },
  
    // Schedule | Report
    { "menu",	tr("&Reports"), (char*)reportsMenu, mainMenu, true, NULL, NULL, true , NULL },
  
    // Schedule | Report | Planned Orders
    { "menu",	tr("Planned &Orders"), (char*)reportsPlannedMenu, reportsMenu, true, NULL, NULL, true , NULL },
    { "ms.dspPlannedOrdersByPlannerCode", tr("by &Planner Code..."), SLOT(sDspPlannedOrdersByPlannerCode()), reportsPlannedMenu, _privileges->check("ViewPlannedOrders"), new QPixmap(":/images/dspPlannedOrdersByPlannerCode.png"), toolBar, true , "Planned Orders by Planner Code" },
    { "ms.dspPlannedOrdersByItem", tr("by &Item..."), SLOT(sDspPlannedOrdersByItem()), reportsPlannedMenu, _privileges->check("ViewPlannedOrders"), NULL, NULL, true , NULL },
    
    { "separator", NULL, NULL, reportsMenu, true, NULL, NULL, true , NULL },
    { "ms.dspRunningAvailability", tr("&Running Availability..."), SLOT(sDspRunningAvailability()), reportsMenu, _privileges->check("ViewInventoryAvailability"), NULL, NULL, true , NULL },
    { "ms.dspTimePhasedAvailabiltiy", tr("&Time-Phased Availability..."), SLOT(sDspTimePhasedAvailability()), reportsMenu, _privileges->check("ViewInventoryAvailability"), NULL, NULL, true , NULL },
    { "ms.dspMPSDetail", tr("MP&S Detail..."), SLOT(sDspMPSDetail()), reportsMenu, _privileges->check("ViewMPS"), NULL, NULL, true , NULL },
    { "ms.dspMRPDetail", tr("&MRP Detail..."), SLOT(sDspMRPDetail()), reportsMenu, _privileges->check("ViewInventoryAvailability"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, reportsMenu, true, NULL, NULL, true , NULL },
    { "ms.dspExpediteExceptionsByPlannerCode", tr("E&xpedite Exceptions..."), SLOT(sDspExpediteExceptionsByPlannerCode()), reportsMenu, _privileges->check("ViewInventoryAvailability"), NULL, NULL, true , NULL },
    { "ms.dspReorderExceptionsByPlannerCode", tr("Reorder &Exceptions..."), SLOT(sDspReorderExceptionsByPlannerCode()),reportsMenu, _privileges->check("ViewInventoryAvailability"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, reportsMenu, true, NULL, NULL, _metrics->boolean("Routings") , NULL },
    { "ms.dspRoughCutByWorkCenter", tr("Rough &Cut Capacity Plan..."), SLOT(sDspRoughCutByWorkCenter()), reportsMenu, _privileges->check("ViewRoughCut"), NULL, NULL,  _metrics->boolean("Routings") , NULL },
    { "ms.dspTimePhasedRoughCutByWorkCenter", tr("Time-P&hased Rough Cut Capacity Plan..."), SLOT(sDspTimePhasedRoughCutByWorkCenter()), reportsMenu, _privileges->check("ViewRoughCut"), NULL, NULL,  _metrics->boolean("Routings") , NULL },
    { "separator", NULL, NULL, reportsMenu, true, NULL, NULL, _metrics->boolean("Routings") , NULL },
    { "ms.dspPlannedRevenue/ExpensesByPlannerCode", tr("P&lanned Revenue/Expenses..."), SLOT(sDspPlannedRevenueExpensesByPlannerCode()), reportsMenu, _privileges->check("ViewPlannedOrders") && _privileges->check("ViewCosts") && _privileges->check("ViewListPrices"), NULL, NULL, _metrics->boolean("Routings") , NULL },
    { "ms.dspTimePhasedPlannedRevenue/ExpensesByPlannerCode", tr("Time-Ph&ased Planned Revenue/Expenses..."), SLOT(sDspTimePhasedPlannedREByPlannerCode()),  reportsMenu, _privileges->check("ViewPlannedOrders") && _privileges->check("ViewCosts") && _privileges->check("ViewListPrices"), NULL, NULL, _metrics->boolean("Routings") , NULL },
    { "separator", NULL, NULL, mainMenu, true, NULL, NULL, true , NULL },
    
    //  Master Information
    { "menu",	tr("&Master Information"), (char*)masterInfoMenu, mainMenu, true, NULL, NULL, true , NULL },
    { "ms.plannerCodes", tr("&Planner Codes..."), SLOT(sPlannerCodes()), masterInfoMenu, _privileges->check("MaintainPlannerCodes") && _privileges->check("ViewPlannerCodes"), NULL, NULL, true , NULL },
    { "ms.warehouseWeek", tr("Warehouse &Week..."), SLOT(sWarehouseWeek()),masterInfoMenu, _privileges->check("MaintainWarehouseWorkWeek"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "ms.warehouseCalendarExceptions", tr("Warehouse Calendar &Exceptions..."), SLOT(sWarehouseCalendarExceptions()), masterInfoMenu, _privileges->check("MaintainWarehouseCalendarExceptions") || _privileges->check("ViewWarehouseCalendarExceptions"), NULL, NULL, _metrics->boolean("BufferMgt") , NULL },
    { "cp.workCenters", tr("Work &Centers..."), SLOT(sWorkCenters()), masterInfoMenu, _privileges->check("MaintainWorkCenters") && _privileges->check("ViewWorkCenters"), NULL, NULL, _metrics->boolean("Routings") , NULL },
  };
  addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0]));

  parent->populateCustomMenu(mainMenu, "Schedule");
  parent->menuBar()->insertItem(tr("Sche&dule"), mainMenu);
}