menuCRM::menuCRM(GUIClient *Pparent) : QObject(Pparent) { setObjectName("crmModule"); parent = Pparent; toolBar = new QToolBar(tr("CRM Tools")); toolBar->setObjectName("CRM Tools"); toolBar->setIconSize(QSize(32, 32)); parent->addToolBar(toolBar); // Menus crmMenu = new QMenu(parent); projectsMenu = new QMenu(parent); incidentMenu = new QMenu(parent); todoMenu = new QMenu(parent); reportsMenu = new QMenu(parent); accountsMenu = new QMenu(parent); contactsMenu = new QMenu(parent); addressMenu = new QMenu(parent); utilitiesMenu = new QMenu(parent); masterMenu = new QMenu(parent); masterIncdMenu = new QMenu(parent); opportunityMenu = new QMenu(parent); masterOppMenu = new QMenu(parent); crmMenu->setObjectName("menu.crm"); projectsMenu->setObjectName("menu.crm.projects"); incidentMenu->setObjectName("menu.crm.incident"); todoMenu->setObjectName("menu.crm.todo"); reportsMenu->setObjectName("menu.crm.reports"); accountsMenu->setObjectName("menu.crm.accounts"); contactsMenu->setObjectName("menu.crm.contacts"); addressMenu->setObjectName("menu.crm.address"); utilitiesMenu->setObjectName("menu.crm.utilities"); masterMenu->setObjectName("menu.crm.master"); masterIncdMenu->setObjectName("menu.crm.masterincd"); opportunityMenu->setObjectName("menu.crm.opportunity"); masterOppMenu->setObjectName("menu.crm.masteropp"); actionProperties acts[] = { // CRM | Incident { "menu", tr("&Incident"), (char*)incidentMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.incident", tr("&New..."), SLOT(sIncident()), incidentMenu, "AddIncidents MaintainIncidents", NULL, NULL, true , NULL }, { "separator", NULL, NULL, incidentMenu, "true", NULL, NULL, true , NULL }, { "crm.incidentWorkbench", tr("&Workbench..."), SLOT(sIncidentWorkbench()), incidentMenu, "ViewIncidents MaintainIncidents", QPixmap(":/images/incidents.png"), toolBar, true , tr("Incident Workbench") }, // CRM / To Do { "menu", tr("&To-Do"), (char*)todoMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.todoItem", tr("&New..."), SLOT(sTodoItem()), todoMenu, "MaintainPersonalTodoList", NULL, NULL, true , NULL }, { "crm.todoList", tr("&List..."), SLOT(sTodoList()), todoMenu, "MaintainPersonalTodoList ViewPersonalTodoList", QPixmap(":/images/toDoList.png"), toolBar, true , tr("To-Do List") }, { "crm.todoListCalendar", tr("&Calendar List..."), SLOT(sTodoListCalendar()), todoMenu, "MaintainPersonalTodoList ViewPersonalTodoList", NULL, NULL, true, NULL}, // Project { "menu", tr("Pro&ject"), (char*)projectsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "pm.newProject", tr("&New..."), SLOT(sNewProject()), projectsMenu, "MaintainProjects", NULL, NULL, true , NULL }, { "pm.projects", tr("&List..."), SLOT(sProjects()), projectsMenu, "ViewProjects", QPixmap(":/images/projects.png"), toolBar, true , tr("List Projects") }, // Opportunity { "menu", tr("&Opportunity"), (char*)opportunityMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.newOpportunity", tr("&New..."), SLOT(sNewOpportunity()), opportunityMenu, "MaintainOpportunities", NULL, NULL, true , NULL }, { "crm.listOpportunity", tr("&List..."), SLOT(sOpportunities()), opportunityMenu, "MaintainOpportunities ViewOpportunities", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, // Reports { "menu", tr("&Reports"), (char*)reportsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "pm.dspOrderActivityByProject", tr("Order &Activity by Project..."), SLOT(sDspOrderActivityByProject()), reportsMenu, "ViewProjects", NULL, NULL, true , NULL }, { "separator", NULL, NULL, reportsMenu, "true", NULL, NULL, true , NULL }, { "crm.dspIncidentsByCRMAccount", tr("&Incidents by CRM Account..."), SLOT(sDspIncidentsByCRMAccount()), reportsMenu, "ViewCRMAccounts+ViewIncidents+ViewOtherTodoLists", NULL, NULL, true , NULL }, { "crm.dspTodoByUserAndIncident", tr("&To-Do List Items by User and Incident..."), SLOT(sDspTodoByUserAndIncident()), reportsMenu, "MaintainOtherTodoLists ViewOtherTodoLists", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, // CRM | Account { "menu", tr("&Account"), (char*)accountsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.crmaccount", tr("&New..."), SLOT(sCRMAccount()), accountsMenu, "MaintainCRMAccounts", NULL, NULL, true , NULL }, { "crm.crmaccounts", tr("&List..."), SLOT(sCRMAccounts()), accountsMenu, "MaintainCRMAccounts ViewCRMAccounts", QPixmap(":/images/accounts.png"), toolBar, true , tr("List Accounts") }, { "crm.crmaccountsearch", tr("&Search..."),SLOT(sSearchForCRMAccount()),accountsMenu, "MaintainCRMAccounts ViewCRMAccounts", NULL, NULL, true , NULL }, // CRM | Contact { "menu", tr("&Contact"), (char*)contactsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.contact", tr("&New..."), SLOT(sContact()), contactsMenu, "MaintainContacts", NULL, NULL, true , NULL }, { "crm.contacts", tr("&List..."), SLOT(sContacts()), contactsMenu, "MaintainContacts ViewContacts", QPixmap(":/images/contacts.png"), toolBar, true , tr("List Contacts") }, { "crm.contactsearch", tr("&Search..."), SLOT(sSearchForContact()), contactsMenu, "MaintainContacts ViewContacts", NULL, NULL, true , NULL }, // CRM | Address { "menu", tr("A&ddress"), (char*)addressMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.address", tr("&New..."), SLOT(sAddress()), addressMenu, "MaintainAddresses", NULL, NULL, true , NULL }, { "crm.addresses", tr("&List..."), SLOT(sAddresses()), addressMenu, "MaintainAddresses ViewAddresses", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, // Master Information { "menu", tr("&Master Information"), (char*)masterMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.honorifics", tr("&Titles..."), SLOT(sHonorifics()), masterMenu, "MaintainTitles ViewTitles", NULL, NULL, true , NULL }, { "menu", tr("&Incident"), (char*)masterIncdMenu, masterMenu, "true", NULL, NULL, true , NULL }, { "crm.incidentCategories", tr("&Categories..."), SLOT(sIncidentCategories()), masterIncdMenu, "MaintainIncidentCategories", NULL, NULL, true , NULL }, { "crm.incidentSeverities", tr("&Severities..."), SLOT(sIncidentSeverities()), masterIncdMenu, "MaintainIncidentSeverities", NULL, NULL, true , NULL }, { "crm.incidentResolutions", tr("&Resolutions..."), SLOT(sIncidentResolutions()), masterIncdMenu, "MaintainIncidentResolutions", NULL, NULL, true , NULL }, { "menu", tr("&Opportunity"), (char*)masterOppMenu, masterMenu, "true", NULL, NULL, true , NULL }, { "crm.opportunitySources", tr("&Sources..."), SLOT(sOpportunitySources()), masterOppMenu, "MaintainOpportunitySources", NULL, NULL, true , NULL }, { "crm.opportunityStages", tr("St&ages..."), SLOT(sOpportunityStages()), masterOppMenu, "MaintainOpportunityStages", NULL, NULL, true , NULL }, { "crm.opportunityTypes", tr("&Types..."), SLOT(sOpportunityTypes()), masterOppMenu, "MaintainOpportunityTypes", NULL, NULL, true , NULL }, { "crm.incidentPriorities", tr("&Priorities..."), SLOT(sIncidentPriorities()), masterMenu, "MaintainIncidentPriorities", NULL, NULL, true , NULL }, { "crm.characteristics", tr("C&haracteristics..."), SLOT(sCharacteristics()), masterMenu, "MaintainCharacteristics ViewCharacteristics", NULL, NULL, true , NULL }, //Utilities { "menu", tr("&Utilities"), (char*)utilitiesMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.replaceOwner", tr("Edit O&wners"), SLOT(sEditOwners()), utilitiesMenu, "EditOwner", NULL, NULL, true, NULL }, { "crm.createRecurringItems",tr("Create &Recurring Items..."), SLOT(sCreateRecurringItems()),utilitiesMenu, "MaintainIncidents MaintainProjects MaintainPersonalTodoList MaintainOthertodoLists", NULL, NULL, true, NULL } }; addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0])); parent->populateCustomMenu(crmMenu, "CRM"); QAction * m = parent->menuBar()->addMenu(crmMenu); if(m) m->setText(tr("C&RM")); }
menuProducts::menuProducts(GUIClient *Pparent) : QObject(Pparent) { setObjectName("productMenu"); parent = Pparent; toolBar = new QToolBar(tr("Products Tools")); toolBar->setObjectName("Products Tools"); toolBar->setIconSize(QSize(32, 32)); if (_preferences->boolean("ShowPDToolbar")) parent->addToolBar(toolBar); mainMenu = new QMenu(parent); itemsMenu = new QMenu(parent); bomMenu = new QMenu(parent); costingMenu = new QMenu(parent); costingUpdActMenu = new QMenu(parent); costingPostActMenu = new QMenu(parent); costingUpdStdMenu = new QMenu(parent); costingReportsMenu = new QMenu(parent); costingReportsCostedMenu = new QMenu(parent); costingReportsItemCostsMenu = new QMenu(parent); reportsMenu = new QMenu(parent); reportsItemsMenu = new QMenu(parent); reportsBomsMenu = new QMenu(parent); reportsWhereUsdMenu = new QMenu(parent); reportsCapUomMenu = new QMenu(parent); masterInfoMenu = new QMenu(parent); utilitiesMenu = new QMenu(parent); mainMenu->setObjectName("menu.prod"); itemsMenu->setObjectName("menu.prod.items"); bomMenu->setObjectName("menu.prod.bom"); costingMenu->setObjectName("menu.prod.costing"); costingUpdActMenu->setObjectName("menu.prod.costingupdact"); costingPostActMenu->setObjectName("menu.prod.costingpostact"); costingUpdStdMenu->setObjectName("menu.prod.costingupdstd"); costingReportsMenu->setObjectName("menu.prod.costingreports"); costingReportsCostedMenu->setObjectName("menu.prod.costingreportscosted"); costingReportsItemCostsMenu->setObjectName("menu.prod.costingreportsitemcosts"); reportsMenu->setObjectName("menu.prod.reports"); reportsItemsMenu->setObjectName("menu.prod.reportsitems"); reportsBomsMenu->setObjectName("menu.prod.reportsboms"); reportsWhereUsdMenu->setObjectName("menu.prod.reportswhereusd"); reportsCapUomMenu->setObjectName("menu.prod.reportscapuom"); masterInfoMenu->setObjectName("menu.prod.masterinfo"); utilitiesMenu->setObjectName("menu.prod.utilities"); actionProperties acts[] = { // Product | Reports { "menu", tr("&Reports"), (char*)reportsMenu, mainMenu, "true", NULL, NULL, true , NULL }, // Product | Reports | Items { "menu", tr("&Items"), (char*)reportsItemsMenu, reportsMenu, "true", NULL, NULL, true , NULL }, { "pd.dspItemsByProductCategory", tr("by &Product Category..."), SLOT(sDspItemsByProductCategory()), reportsItemsMenu, "MaintainItemMasters ViewItemMasters", NULL, NULL, true , NULL }, { "pd.dspItemsByClassCode", tr("by &Class Code..."), SLOT(sDspItemsByClassCode()), reportsItemsMenu, "MaintainItemMasters ViewItemMasters", NULL, NULL, true , NULL }, { "pd.dspItemsByCharacteristic", tr("by C&haracteristic..."), SLOT(sDspItemsByCharacteristic()), reportsItemsMenu, "MaintainItemMasters ViewItemMasters", NULL, NULL, true , NULL }, { "separator", NULL, NULL, reportsMenu, "true", NULL, NULL, true , NULL }, // Product | Reports | BOMs { "menu", tr("&Bills of Materials"), (char*)reportsBomsMenu, reportsMenu, "true", NULL, NULL, true , NULL }, { "pd.dspSingleLevelBOM", tr("&Single Level..."), SLOT(sDspSingleLevelBOM()), reportsBomsMenu, "ViewBOMs", NULL, NULL, true , NULL }, { "pd.dspIndentedBOM", tr("&Indented..."), SLOT(sDspIndentedBOM()), reportsBomsMenu, "ViewBOMs", NULL, NULL, true , NULL }, { "pd.dspSummarizedBOM", tr("Summari&zed..."), SLOT(sDspSummarizedBOM()), reportsBomsMenu, "ViewBOMs", NULL, NULL, true , NULL }, // Product | Reports | Where Used { "menu", tr("&Where Used"), (char*)reportsWhereUsdMenu, reportsMenu, "true", NULL, NULL, true , NULL }, { "pd.dspSingleLevelWhereUsed", tr("&Single Level..."), SLOT(sDspSingleLevelWhereUsed()), reportsWhereUsdMenu, "ViewBOMs", NULL, NULL, true , NULL }, { "pd.dspIndentedWhereUsed", tr("&Indented..."), SLOT(sDspIndentedWhereUsed()), reportsWhereUsdMenu, "ViewBOMs", NULL, NULL, true , NULL }, { "pd.dspPendingBOMChanges", tr("&Pending BOM Changes..."), SLOT(sDspPendingBOMChanges()), reportsMenu, "ViewBOMs", NULL, NULL, true , NULL }, { "separator", NULL, NULL, reportsMenu, "true", NULL, NULL, true , NULL }, // Product | Reports | Capacity UOMs { "menu", tr("Capacity &UOMs"), (char*)reportsCapUomMenu, reportsMenu, "true", NULL, NULL, true , NULL }, { "pd.dspCapacityUOMsByProductCategory", tr("by &Product Category..."), SLOT(sDspCapacityUOMsByProductCategory()), reportsCapUomMenu, "MaintainItemMasters ViewItemMasters", NULL, NULL, true , NULL }, { "pd.dspCapacityUOMsByClassCode", tr("by &Class Code..."), SLOT(sDspCapacityUOMsByClassCode()), reportsCapUomMenu, "MaintainItemMasters ViewItemMasters", NULL, NULL, true , NULL }, { "separator", NULL, NULL, mainMenu, "true", NULL, NULL, true , NULL }, // Product | Items { "menu", tr("&Item"), (char*)itemsMenu, mainMenu, "true", NULL, NULL, true , NULL }, { "pd.enterNewItem", tr("&New..."), SLOT(sNewItem()), itemsMenu, "MaintainItemMasters", NULL, NULL, true , NULL }, { "pd.listItems", tr("&List..."), SLOT(sItems()), itemsMenu, "MaintainItemMasters ViewItemMasters", QPixmap(":/images/items.png"), toolBar, true , tr("List Items") }, { "pd.searchForItems", tr("&Search..."),SLOT(sSearchForItems()), itemsMenu, "MaintainItemMasters ViewItemMasters", NULL, NULL, true , NULL }, { "pd.copyItem", tr("&Copy..."), SLOT(sCopyItem()), itemsMenu, "MaintainItemMasters" , NULL, NULL, true, NULL }, { "separator", NULL, NULL, itemsMenu, "true", NULL, NULL, true , NULL }, { "pd.itemAvailabilityWorkbench", tr("&Workbench..."), SLOT(sDspItemAvailabilityWorkbench()), itemsMenu, "ViewItemAvailabilityWorkbench", NULL, NULL, true , NULL }, { "separator", NULL, NULL, itemsMenu, "true", NULL, NULL, true , NULL }, { "pd.itemGroups", tr("&Groups..."), SLOT(sItemGroups()), itemsMenu, "MaintainItemGroups ViewItemGroups", NULL, NULL, true , NULL }, { "pd.itemImages", tr("&Images..."), SLOT(sItemImages()), itemsMenu, "MaintainItemMasters ViewItemMasters", NULL, NULL, true , NULL }, // Product | Bill of Materials { "menu", tr("Bill Of Ma&terials"), (char*)bomMenu, mainMenu, "true", NULL, NULL, true , NULL }, { "pd.enterNewBOM", tr("&New..."), SLOT(sNewBOM()), bomMenu, "MaintainBOMs", NULL, NULL, true , NULL }, { "pd.listBOMs", tr("&List..."), SLOT(sBOMs()), bomMenu, "MaintainBOMs ViewBOMs", QPixmap(":/images/boms.png"), toolBar, true , tr("List Bill of Materials") }, { "pd.copyBOM", tr("&Copy..."), SLOT(sCopyBOM()), bomMenu, "MaintainBOMs", NULL, NULL, true , NULL }, { "separator", NULL, NULL, bomMenu, "true", NULL, NULL, true , NULL }, { "pd.massReplaceComponentItem", tr("Mass &Replace..."), SLOT(sMassReplaceComponent()), bomMenu, "MaintainBOMs", NULL, NULL, true , NULL }, { "pd.massExpireComponentItem", tr("Mass E&xpire..."), SLOT(sMassExpireComponent()), bomMenu, "MaintainBOMs", NULL, NULL, true , NULL }, // Product | Costing { "menu", tr("&Costing"), (char*)costingMenu, mainMenu, "true", NULL, NULL, true , NULL }, { "pd.maintainItemCosts", tr("&Maintain Item Costs..."), SLOT(sMaintainItemCosts()), costingMenu, "ViewCosts", NULL, NULL, true , NULL }, // Product | Lot Serial { "pd.lotSerial", tr("&Lot/Serial..."), SLOT(sLotSerial()), mainMenu, "true", NULL, NULL, _metrics->boolean("LotSerialControl"), NULL }, { "separator", NULL, NULL, costingMenu, "true", NULL, NULL, true , NULL }, // Product | Costing | Update Actual Costs { "menu", tr("Update &Actual Costs"), (char*)costingUpdActMenu, costingMenu, "true", NULL, NULL, true , NULL }, { "pd.updateActualCostsByItem", tr("by &Item..."), SLOT(sUpdateActualCostsByItem()), costingUpdActMenu, "UpdateActualCosts", NULL, NULL, true , NULL }, { "pd.updateActualCostsByClassCode", tr("by &Class Code..."), SLOT(sUpdateActualCostsByClassCode()), costingUpdActMenu, "UpdateActualCosts", NULL, NULL, true , NULL }, // Product | Costing | Post Actual Costs { "menu", tr("&Post Actual Costs"), (char*)costingPostActMenu, costingMenu, "true", NULL, NULL, true , NULL }, { "pd.postActualCostsByItem", tr("by &Item..."), SLOT(sPostActualCostsByItem()), costingPostActMenu, "PostActualCosts", NULL, NULL, true , NULL }, { "pd.postActualCostsByClassCode", tr("by &Class Code..."), SLOT(sPostActualCostsByClassCode()), costingPostActMenu, "PostActualCosts", NULL, NULL, true , NULL }, // Product | Costing | Post Standard Costs { "menu", tr("Post &Standard Costs"), (char*)costingUpdStdMenu, costingMenu, "true", NULL, NULL, true , NULL }, { "pd.postStandardCostsByItem", tr("by &Item..."), SLOT(sUpdateStandardCostsByItem()), costingUpdStdMenu, "PostStandardCosts", NULL, NULL, true , NULL }, { "pd.postStandardCostsByClassCode", tr("by &Class Code..."), SLOT(sUpdateStandardCostsByClassCode()), costingUpdStdMenu, "PostStandardCosts", NULL, NULL, true , NULL }, { "separator", NULL, NULL, costingMenu, "true", NULL, NULL, true , NULL }, // Product | Costing | Reports { "menu", tr("&Reports"), (char*)costingReportsMenu, costingMenu, "true", NULL, NULL, true , NULL }, // Product | Costing | Reports | Costed BOM { "menu", tr("&Costed BOM"), (char*)costingReportsCostedMenu, costingReportsMenu, "true", NULL, NULL, true , NULL }, { "pd.dspCostedSingleLevelBOM", tr("&Single Level..."), SLOT(sDspCostedSingleLevelBOM()),costingReportsCostedMenu, "ViewCosts", NULL, NULL, true , NULL }, { "pd.dspCostedIndentedBOM", tr("&Indented..."), SLOT(sDspCostedIndentedBOM()), costingReportsCostedMenu, "ViewCosts", NULL, NULL, true , NULL }, { "pd.dspCostedSummarizedBOM", tr("Summari&zed..."), SLOT(sDspCostedSummarizedBOM()), costingReportsCostedMenu, "ViewCosts", NULL, NULL, true , NULL }, // Product | Costing | Reports | Item Costs { "menu", tr("&Item Costs"), (char*)costingReportsItemCostsMenu, costingReportsMenu, "true", NULL, NULL, true , NULL }, { "pd.dspItemCostsByClassCode", tr("by &Class Code..."), SLOT(sDspItemCostsByClassCode()), costingReportsItemCostsMenu, "ViewCosts", NULL, NULL, true , NULL }, { "pd.dspItemCostsSummary", tr("&Summary..."), SLOT(sDspItemCostSummary()), costingReportsItemCostsMenu, "ViewCosts", NULL, NULL, true , NULL }, { "pd.dspItemCostsHistory", tr("&History..."), SLOT(sDspItemCostHistory()), costingReportsItemCostsMenu, "ViewCosts", NULL, NULL, true , NULL }, { "separator", NULL, NULL, costingMenu, "true", NULL, NULL, true , NULL }, { "pd.userDefinedCostingElements", tr("&User-Defined Costing Elements..."), SLOT(sUserCostingElements()), costingMenu, "MaintainUserCostingElements", NULL, NULL, true , NULL }, { "separator", NULL, NULL, mainMenu, "true", NULL, NULL, true , NULL }, // Produt | Master Information { "menu", tr("&Master Information"), (char*)masterInfoMenu, mainMenu, "true", NULL, NULL, true , NULL }, { "pd.unitsOfMeasure", tr("&Units of Measure..."), SLOT(sUnitsOfMeasure()), masterInfoMenu, "MaintainUOMs ViewUOMs", NULL, NULL, true , NULL }, { "pd.classCodes", tr("&Class Codes..."), SLOT(sClassCodes()), masterInfoMenu, "MaintainClassCodes ViewClassCodes", NULL, NULL, true , NULL }, { "pd.productCategories", tr("&Product Categories..."), SLOT(sProductCategories()), masterInfoMenu, "MaintainProductCategories ViewProductCategories", NULL, NULL, true , NULL }, { "pd.freightClasses", tr("&Freight Classes..."), SLOT(sFreightClasses()), masterInfoMenu, "MaintainFreightClasses ViewFreightClasses", NULL, NULL, true , NULL }, { "pd.characteristics", tr("C&haracteristics..."), SLOT(sCharacteristics()), masterInfoMenu, "MaintainCharacteristics ViewCharacteristics", NULL, NULL, true , NULL }, // Produt | Utilies { "menu", tr("&Utilities"), (char*)utilitiesMenu, mainMenu, "true", NULL, NULL, true , NULL }, { "pd.dspUnusedPurchasedItems", tr("Unused &Purchased Items..."), SLOT(sDspUnusedPurchasedItems()), utilitiesMenu, "ViewBOMs", NULL, NULL, true , NULL }, { "pd.dspUndefinedManufacturedItems", tr("Undefined &Manufactured Items..."), SLOT(sDspUndefinedManufacturedItems()), utilitiesMenu, "ViewBOMs ViewBOOs", NULL, NULL, true , NULL }, { "pd.dspBillsOfMaterialsWithoutComponentItemSites", tr("Bills of Ma&terials without Component Item Sites..."), SLOT(sDspInvalidBillsOfMaterials()), utilitiesMenu, "ViewBOMs", NULL, NULL, true , NULL }, { "separator", NULL, NULL, utilitiesMenu, "true", NULL, NULL, true , NULL }, { "pd.reassignClassCodeByClassCode", tr("Reassign &Class Codes..."), SLOT(sReassignClassCodeByClassCode()), utilitiesMenu, "MaintainItemMasters", NULL, NULL, true , NULL }, { "pd.reassignProductCategoryByProductCategory", tr("&Reassign Product Categories..."), SLOT(sReassignProductCategoryByProductCategory()), utilitiesMenu, "MaintainItemMasters", NULL, NULL, true , NULL }, }; addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0])); parent->populateCustomMenu(mainMenu, "Products"); QAction * m = parent->menuBar()->addMenu(mainMenu); if(m) m->setText(tr("Produc&ts")); }
menuCRM::menuCRM(OpenMFGGUIClient *Pparent) : QObject(Pparent, "crmModule") { parent = Pparent; toolBar = new QToolBar(tr("CRM Tools")); toolBar->setObjectName("CRM Tools"); toolBar->setIconSize(QSize(32, 32)); if (_preferences->boolean("ShowCRMToolbar")) parent->addToolBar(toolBar); // Menus crmMenu = new QMenu(); projectsMenu = new QMenu(); incidentMenu = new QMenu(); todoMenu = new QMenu(); reportsMenu = new QMenu(); accountsMenu = new QMenu(); contactsMenu = new QMenu(); addressMenu = new QMenu(); utilitiesMenu = new QMenu(); masterMenu = new QMenu(); masterIncdMenu = new QMenu(); opportunityMenu = new QMenu(); masterOppMenu = new QMenu(); actionProperties acts[] = { // CRM | Incident { "menu", tr("&Incident"), (char*)incidentMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.incident", tr("&New..."), SLOT(sIncident()), incidentMenu, _privleges->check("AddIncidents") || _privleges->check("MaintainIncidents"), NULL, NULL, true , NULL }, { "separator", NULL, NULL, incidentMenu, true, NULL, NULL, true , NULL }, { "crm.incidentWorkbench", tr("&Workbench..."), SLOT(sIncidentWorkbench()), incidentMenu, _privleges->check("ViewIncidents") || _privleges->check("MaintainIncidents"), new QPixmap(":/images/incidents.png"), toolBar, true , "Incident Workbench" }, // CRM / To Do { "menu", tr("&To-Do"), (char*)todoMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.todoItem", tr("&New..."), SLOT(sTodoItem()), todoMenu, _privleges->check("MaintainPersonalTodoList"), NULL, NULL, true , NULL }, { "crm.todoList", tr("&List..."), SLOT(sTodoList()), todoMenu, _privleges->check("MaintainPersonalTodoList") || _privleges->check("ViewPersonalTodoList"),new QPixmap(":/images/toDoList.png"), toolBar, true , "To-Do List"}, // Project { "menu", tr("Pro&ject"), (char*)projectsMenu, crmMenu,true, NULL, NULL, true , NULL }, { "pm.newProject", tr("&New..."), SLOT(sNewProject()), projectsMenu, _privleges->check("MaintainProjects"), NULL, NULL, true , NULL }, { "pm.projects", tr("&List..."), SLOT(sProjects()), projectsMenu, _privleges->check("ViewProjects"), new QPixmap(":/images/projects.png"), toolBar, true , "List Projects" }, // Opportunity { "menu", tr("&Opportunity"), (char*)opportunityMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.newOpportunity", tr("&New..."), SLOT(sNewOpportunity()), opportunityMenu, _privleges->check("MaintainOpportunities"), NULL, NULL, true , NULL }, { "crm.listOpportunity", tr("&List..."), SLOT(sOpportunities()), opportunityMenu, (_privleges->check("MaintainOpportunities") || _privleges->check("ViewOpportunities")), NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, true, NULL, NULL, true , NULL }, // Reports { "menu", tr("&Reports"), (char*)reportsMenu, crmMenu, true, NULL, NULL, true , NULL }, { "pm.dspOrderActivityByProject", tr("Order &Activity by Project..."), SLOT(sDspOrderActivityByProject()), reportsMenu, _privleges->check("ViewProjects"), NULL, NULL, true , NULL }, { "separator", NULL, NULL, reportsMenu, true, NULL, NULL, true , NULL }, { "crm.dspIncidentsByCRMAccount", tr("&Incidents by CRM Account..."), SLOT(sDspIncidentsByCRMAccount()), reportsMenu, _privleges->check("ViewCRMAccounts") && _privleges->check("ViewIncidents") && _privleges->check("ViewOtherTodoLists"), NULL, NULL, true , NULL }, { "crm.dspTodoByUserAndIncident", tr("&To-Do List Items by User and Incident..."), SLOT(sDspTodoByUserAndIncident()), reportsMenu, _privleges->check("MaintainOtherTodoLists") || _privleges->check("ViewOtherTodoLists"), NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, true, NULL, NULL, true , NULL }, // CRM | Account { "menu", tr("&Account"), (char*)accountsMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.crmaccount", tr("&New..."), SLOT(sCRMAccount()), accountsMenu, _privleges->check("MaintainCRMAccounts"), NULL, NULL, true , NULL }, { "crm.crmaccounts", tr("&List..."), SLOT(sCRMAccounts()), accountsMenu, _privleges->check("MaintainCRMAccounts") || _privleges->check("ViewCRMAccounts"),new QPixmap(":/images/accounts.png"), toolBar, true , "List Accounts" }, { "crm.crmaccountsearch", tr("&Search..."),SLOT(sSearchForCRMAccount()),accountsMenu, _privleges->check("MaintainCRMAccounts") || _privleges->check("ViewCRMAccounts"), NULL, NULL, true , NULL }, // CRM | Contact { "menu", tr("&Contact"), (char*)contactsMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.contact", tr("&New..."), SLOT(sContact()), contactsMenu, _privleges->check("MaintainContacts"), NULL, NULL, true , NULL }, { "crm.contacts", tr("&List..."), SLOT(sContacts()), contactsMenu, _privleges->check("MaintainContacts") || _privleges->check("ViewContacts"),new QPixmap(":/images/contacts.png"), toolBar, true , "List Contacts" }, { "crm.contactsearch", tr("&Search..."), SLOT(sSearchForContact()), contactsMenu, _privleges->check("MaintainContacts") || _privleges->check("ViewContacts"), NULL, NULL, true , NULL }, // CRM | Address { "menu", tr("A&ddress"), (char*)addressMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.address", tr("&New..."), SLOT(sAddress()), addressMenu, _privleges->check("MaintainAddresses"), NULL, NULL, true , NULL }, { "crm.addresses", tr("&List..."), SLOT(sAddresses()), addressMenu, _privleges->check("MaintainAddresses") || _privleges->check("ViewAddresses"), NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, true, NULL, NULL, true , NULL }, // Master Information { "menu", tr("&Master Information"), (char*)masterMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.honorifics", tr("&Titles..."), SLOT(sHonorifics()), masterMenu, _privleges->check("MaintainTitles") || _privleges->check("ViewTitles"), NULL, NULL, true , NULL }, { "menu", tr("&Incident"), (char*)masterIncdMenu, masterMenu, true, NULL, NULL, true , NULL }, { "crm.incidentCategories", tr("&Categories..."), SLOT(sIncidentCategories()), masterIncdMenu, _privleges->check("MaintainIncidentCategories"), NULL, NULL, true , NULL }, { "crm.incidentPriorities", tr("&Priorities..."), SLOT(sIncidentPriorities()), masterIncdMenu, _privleges->check("MaintainIncidentPriorities"), NULL, NULL, true , NULL }, { "crm.incidentSeverities", tr("&Severities..."), SLOT(sIncidentSeverities()), masterIncdMenu, _privleges->check("MaintainIncidentSeverities"), NULL, NULL, true , NULL }, { "crm.incidentResolutions", tr("&Resolutions..."), SLOT(sIncidentResolutions()), masterIncdMenu, _privleges->check("MaintainIncidentResolutions"), NULL, NULL, true , NULL }, { "menu", tr("&Opportunity"), (char*)masterOppMenu, masterMenu, true, NULL, NULL, true , NULL }, { "crm.opportunitySources", tr("&Sources..."), SLOT(sOpportunitySources()), masterOppMenu, _privleges->check("MaintainOpportunitySources"), NULL, NULL, true , NULL }, { "crm.opportunityStages", tr("St&ages..."), SLOT(sOpportunityStages()), masterOppMenu, _privleges->check("MaintainOpportunityStages"), NULL, NULL, true , NULL }, { "crm.opportunityTypes", tr("&Types..."), SLOT(sOpportunityTypes()), masterOppMenu, _privleges->check("MaintainOpportunityTypes"), NULL, NULL, true , NULL }, { "crm.characteristics", tr("C&haracteristics..."), SLOT(sCharacteristics()), masterMenu, _privleges->check("MaintainCharacteristics") || _privleges->check("ViewCharacteristics"), NULL, NULL, true , NULL }, }; addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0])); parent->populateCustomMenu(crmMenu, "CRM"); parent->menuBar()->insertItem(tr("&CRM"), crmMenu); }
modulePD::modulePD(OpenMFGGUIClient *Pparent) : QObject(Pparent, "pdModule") { parent = Pparent; toolBar = new QToolBar(tr("P/D Tools")); toolBar->setObjectName("P/D Tools"); toolBar->setIconSize(QSize(32, 32)); if (_preferences->boolean("ShowPDToolbar")) parent->addToolBar(toolBar); // I/M | Items itemsMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.enterNewItem", tr("Enter New Item..."), this, SLOT(sNewItem()), itemsMenu, _privleges->check("MaintainItemMasters") ) ); // QPixmap(":/images/newItem.xpm"), toolBar ) ); parent->actions.append( new Action( parent, "pd.listItems", tr("List Items..."), this, SLOT(sItems()), itemsMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")), QPixmap(":/images/items.png"), toolBar ) ); parent->actions.append( new Action( parent, "pd.searchForItems", tr("Search for Items..."), this, SLOT(sSearchForItems()), itemsMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); parent->actions.append( new Action( parent, "pd.copyItem", tr("Copy Item..."), this, SLOT(sCopyItem()), itemsMenu, _privleges->check("MaintainItemMasters") ) ); itemsMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.itemAvailabilityWorkbench", tr("Item Availability Workbench..."), this, SLOT(sDspItemAvailabilityWorkbench()), itemsMenu, _privleges->check("ViewItemAvailabilityWorkbench") ) ); itemsMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.itemGroups", tr("Item Groups..."), this, SLOT(sItemGroups()), itemsMenu, (_privleges->check("MaintainItemGroups") || _privleges->check("ViewItemGroups")) ) ); parent->actions.append( new Action( parent, "pd.itemImages", tr("Item Images..."), this, SLOT(sItemImages()), itemsMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); // P/D | Bills of Materials bomMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.enterNewBOM", tr("Enter New Bill of Materials..."), this, SLOT(sNewBOM()), bomMenu, _privleges->check("MaintainBOMs") ) ); // QPixmap(":/images/newBOM.xpm"), toolBar ) ); parent->actions.append( new Action( parent, "pd.listBOMs", tr("List Bills of Materials..."), this, SLOT(sBOMs()), bomMenu, (_privleges->check("MaintainBOMs") || _privleges->check("ViewBOMs")), QPixmap(":/images/boms.png"), toolBar ) ); parent->actions.append( new Action( parent, "pd.copyBOM", tr("Copy Bill of Materials..."), this, SLOT(sCopyBOM()), bomMenu, _privleges->check("MaintainBOMs") ) ); bomMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.massReplaceComponentItem", tr("Mass Replace Component Item..."), this, SLOT(sMassReplaceComponent()), bomMenu, _privleges->check("MaintainBOMs") ) ); parent->actions.append( new Action( parent, "pd.massExpireComponentItem", tr("Mass Expire Component Item..."), this, SLOT(sMassExpireComponent()), bomMenu, _privleges->check("MaintainBOMs") ) ); // P/D | Bills of Operations... booMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.enterNewBOO", tr("Enter New Bill of Operations..."), this, SLOT(sNewBOO()), booMenu, (_privleges->check("MaintainBOOs") && _metrics->boolean("Routings")) ) ); parent->actions.append( new Action( parent, "pd.listBOOs", tr("List Bills of Operations..."), this, SLOT(sBOOs()), booMenu, ((_privleges->check("MaintainBOOs") || _privleges->check("ViewBOOs")) && _metrics->boolean("Routings")), QPixmap(":/images/boos.png"), toolBar ) ); parent->actions.append( new Action( parent, "pd.copyBOO", tr("Copy Bill of Operations..."), this, SLOT(sCopyBOO()), booMenu, (_privleges->check("MaintainBOOs") && _metrics->boolean("Routings")) ) ); // P/D | Breeder Bills of Materials breederBOMMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.enterNewBreederBOM", tr("Enter New Breeder Bill of Materials..."), this, SLOT(sNewBreederBOM()), breederBOMMenu, (_privleges->check("MaintainBBOMs") && _metrics->boolean("BBOM")) ) ); parent->actions.append( new Action( parent, "pd.listBreederBOMs", tr("List Breeder Bills of Materials..."), this, SLOT(sBreederBOMs()), breederBOMMenu, ((_privleges->check("MaintainBBOMs") || _privleges->check("ViewBBOMs")) && _metrics->boolean("BBOM")) ) ); // P/D | Costing costingDisplaysMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.dspCostedSingleLevelBOM", tr("Costed Single Level BOM..."), this, SLOT(sDspCostedSingleLevelBOM()), costingDisplaysMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.dspCostedIndentedBOM", tr("Costed Indented BOM..."), this, SLOT(sDspCostedIndentedBOM()), costingDisplaysMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.dspCostedSummarizedBOM", tr("Costed Summarized BOM..."), this, SLOT(sDspCostedSummarizedBOM()), costingDisplaysMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.dspItemCostsByClassCode", tr("Item Costs by Class Code..."), this, SLOT(sDspItemCostsByClassCode()), costingDisplaysMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.dspItemCostsSummary", tr("Item Costs Summary..."), this, SLOT(sDspItemCostSummary()), costingDisplaysMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.dspItemCostsHistory", tr("Item Costs History..."), this, SLOT(sDspItemCostHistory()), costingDisplaysMenu, _privleges->check("ViewCosts") ) ); costingReportsMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.rptCostedSingleLevelBOM", tr("Costed Single Level BOM..."), this, SLOT(sRptCostedSingleLevelBOM()), costingReportsMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.rptCostedIndentedBOM", tr("Costed Indented BOM..."), this, SLOT(sRptCostedIndentedBOM()), costingReportsMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.rptCostedSummarizedBOM", tr("Costed Summarized BOM..."), this, SLOT(sRptCostedSummarizedBOM()), costingReportsMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.rptItemCostsByClassCode", tr("Item Costs by Class Code..."), this, SLOT(sRptItemCostsByClassCode()), costingReportsMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.rptItemCostsSummary", tr("Item Costs Summary..."), this, SLOT(sRptItemCostSummary()), costingReportsMenu, _privleges->check("ViewCosts") ) ); parent->actions.append( new Action( parent, "pd.rptItemCostsHistory", tr("Item Costs History..."), this, SLOT(sRptItemCostHistory()), costingReportsMenu, _privleges->check("ViewCosts") ) ); costingMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.maintainItemCosts", tr("Maintain Item Costs..."), this, SLOT(sMaintainItemCosts()), costingMenu, _privleges->check("ViewCosts") ) ); costingMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.updateActualCostsByItem", tr("Update Actual Costs by Item..."), this, SLOT(sUpdateActualCostsByItem()), costingMenu, _privleges->check("UpdateActualCosts") ) ); parent->actions.append( new Action( parent, "pd.updateActualCostsByClassCode", tr("Update Actual Costs by Class Code..."), this, SLOT(sUpdateActualCostsByClassCode()), costingMenu, _privleges->check("UpdateActualCosts") ) ); costingMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.postActualCostsByItem", tr("Post Actual Costs by Item..."), this, SLOT(sPostActualCostsByItem()), costingMenu, _privleges->check("PostActualCosts") ) ); parent->actions.append( new Action( parent, "pd.postActualCostsByClassCode", tr("Post Actual Costs by Class Code..."), this, SLOT(sPostActualCostsByClassCode()), costingMenu, _privleges->check("PostActualCosts") ) ); costingMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.updateStandardCostsByItem", tr("Post Standard Costs by Item..."), this, SLOT(sUpdateStandardCostsByItem()), costingMenu, _privleges->check("PostStandardCosts") ) ); parent->actions.append( new Action( parent, "pd.updateStandardCostsByClassCode", tr("Post Standard Costs by Class Code..."), this, SLOT(sUpdateStandardCostsByClassCode()), costingMenu, _privleges->check("PostStandardCosts") ) ); costingMenu->insertSeparator(); costingMenu->insertItem(tr("&Displays"), costingDisplaysMenu ); costingMenu->insertItem(tr("&Reports"), costingReportsMenu ); costingMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.userDefinedCostingElements", tr("User-Defined Costing Elements..."), this, SLOT(sUserCostingElements()), costingMenu, _privleges->check("MaintainUserCostingElements") ) ); // P/D | Displays displaysMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.dspItemsByClassCode", tr("Items by Class Code..."), this, SLOT(sDspItemsByClassCode()), displaysMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); parent->actions.append( new Action( parent, "pd.dspItemsByProductCategory", tr("Items by Product Category..."), this, SLOT(sDspItemsByProductCategory()), displaysMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); parent->actions.append( new Action( parent, "pd.dspItemsByCharacteristic", tr("Items by Characteristic..."), this, SLOT(sDspItemsByCharacteristic()), displaysMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); displaysMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.dspSingleLevelBOM", tr("Single Level Bill of Materials..."), this, SLOT(sDspSingleLevelBOM()), displaysMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.dspIndentedBOM", tr("Indented Bill of Materials..."), this, SLOT(sDspIndentedBOM()), displaysMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.dspSummarizedBOM", tr("Summarized Bill of Materials..."), this, SLOT(sDspSummarizedBOM()), displaysMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.dspSequencedBOM", tr("Sequenced Bill of Materials..."), this, SLOT(sDspSequencedBOM()), displaysMenu, _privleges->check("ViewBOMs") ) ); displaysMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.dspSingleLevelWhereUsed", tr("Single Level Where Used..."), this, SLOT(sDspSingleLevelWhereUsed()), displaysMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.dspIndentedWhereUsed", tr("Indented Where Used..."), this, SLOT(sDspIndentedWhereUsed()), displaysMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.dspPendingBOMChanges", tr("Pending BOM Changes..."), this, SLOT(sDspPendingBOMChanges()), displaysMenu, _privleges->check("ViewBOMs") ) ); if (_metrics->boolean("Routings") ) { displaysMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.dspOperationsByWorkCenter", tr("Operations by Work Center..."), this, SLOT(sDspOperationsByWorkCenter()), displaysMenu,((_privleges->check("ViewBOOs")) && (_metrics->boolean("Routings"))) ) ); parent->actions.append( new Action( parent, "pd.dspStandardOperationsByWorkCenter", tr("Standard Operations by Work Center..."), this, SLOT(sDspStandardOperByWorkCenter()), displaysMenu, ((_privleges->check("ViewStandardOperations")) && (_metrics->boolean("Routings"))) ) ); displaysMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.dspCapacityUOMsByClassCode", tr("Capacity UOMs by Class Code..."), this, SLOT(sDspCapacityUOMsByClassCode()), displaysMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); parent->actions.append( new Action( parent, "pd.dspCapacityUOMsByProductCategory", tr("Capacity UOMs by Product Category..."), this, SLOT(sDspCapacityUOMsByProductCategory()), displaysMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); } // P/D | Reports reportsMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.rptItemsByClassCode", tr("Items by Class Code..."), this, SLOT(sRptItemsByClassCode()), reportsMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); parent->actions.append( new Action( parent, "pd.rptItemsByProductCategory", tr("Items by Product Category..."), this, SLOT(sRptItemsByProductCategory()), reportsMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); parent->actions.append( new Action( parent, "pd.rptItemsByCharacteristic", tr("Items by Characteristic..."), this, SLOT(sRptItemsByCharacteristic()), reportsMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); reportsMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.rptSingleLevelBOM", tr("Single Level Bill of Materials..."), this, SLOT(sRptSingleLevelBOM()), reportsMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.rptIndentedBOM", tr("Indented Bill of Materials..."), this, SLOT(sRptIndentedBOM()), reportsMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.rptSummarizedBOM", tr("Summarized Bill of Materials..."), this, SLOT(sRptSummarizedBOM()), reportsMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.rptSequencedBOM", tr("Sequenced Bill of Materials..."), this, SLOT(sRptSequencedBOM()), reportsMenu, _privleges->check("ViewBOMs") ) ); reportsMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.rptSingleLevelWhereUsed", tr("Single Level Where Used..."), this, SLOT(sRptSingleLevelWhereUsed()), reportsMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.rptIndentedWhereUsed", tr("Indented Where Used..."), this, SLOT(sRptIndentedWhereUsed()), reportsMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.rptPendingBOMChanges", tr("Pending BOM Changes..."), this, SLOT(sRptPendingBOMChanges()), reportsMenu, _privleges->check("ViewBOMs") ) ); if (_metrics->boolean("Routings") ) { reportsMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.rptOperationsByWorkCenter", tr("Operations by Work Center..."), this, SLOT(sRptOperationsByWorkCenter()), reportsMenu, ((_privleges->check("ViewBOOs")) && (_metrics->boolean("Routings"))) ) ); parent->actions.append( new Action( parent, "pd.rptStandardOperationsByWorkCenter", tr("Standard Operations by Work Center..."), this, SLOT(sRptStandardOperByWorkCenter()), reportsMenu, ((_privleges->check("ViewStandardOperations")) && (_metrics->boolean("Routings"))) ) ); } reportsMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.rptCapacityUOMsByClassCode", tr("Capacity UOMs by Class Code..."), this, SLOT(sRptCapacityUOMsByClassCode()), reportsMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); parent->actions.append( new Action( parent, "pd.rptCapacityUOMsByProductCategory", tr("Capacity UOMs by Product Category..."), this, SLOT(sRptCapacityUOMsByProductCategory()), reportsMenu, (_privleges->check("MaintainItemMasters") || _privleges->check("ViewItemMasters")) ) ); // P/D | Master Information masterInfoMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.unitsOfMeasure", tr("Units of Measure..."), this, SLOT(sUnitsOfMeasure()), masterInfoMenu, (_privleges->check("MaintainUOMs") || _privleges->check("ViewUOMs")) ) ); parent->actions.append( new Action( parent, "pd.classCodes", tr("Class Codes..."), this, SLOT(sClassCodes()), masterInfoMenu, (_privleges->check("MaintainClassCodes") || _privleges->check("ViewClassCodes")) ) ); parent->actions.append( new Action( parent, "pd.productCategories", tr("Product Categories..."), this, SLOT(sProductCategories()), masterInfoMenu, (_privleges->check("MaintainProductCategories") || _privleges->check("ViewProductCategories")) ) ); parent->actions.append( new Action( parent, "pd.characteristics", tr("Characteristics..."), this, SLOT(sCharacteristics()), masterInfoMenu, (_privleges->check("MaintainCharacteristics") || _privleges->check("ViewCharacteristics")) ) ); if (_metrics->boolean("Routings") ) { masterInfoMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.standardLaborRates", tr("Standard Labor Rates..."), this, SLOT(sStandardLaborRates()), masterInfoMenu, ((_privleges->check("MaintainLaborRates") || _privleges->check("ViewLaborRates")) && _metrics->boolean("Routings")) ) ); parent->actions.append( new Action( parent, "pd.workCenters", tr("Work Centers..."), this, SLOT(sWorkCenters()), masterInfoMenu, ((_privleges->check("MaintainWorkCenters") || _privleges->check("ViewWorkCenters")) && _metrics->boolean("Routings")) ) ); parent->actions.append( new Action( parent, "pd.standardOperations", tr("Standard Operations..."), this, SLOT(sStandardOperations()), masterInfoMenu, ((_privleges->check("MaintainStandardOperations") || _privleges->check("ViewStandardOperations")) && _metrics->boolean("Routings")) ) ); } // P/D | Utilies utilitiesMenu = new QMenu(); parent->actions.append( new Action( parent, "pd.dspUnusedPurchasedItems", tr("Unused Purchased Items..."), this, SLOT(sDspUnusedPurchasedItems()), utilitiesMenu, _privleges->check("ViewBOMs") ) ); parent->actions.append( new Action( parent, "pd.dspUndefinedManufacturedItems", tr("Undefined Manufactured Items..."), this, SLOT(sDspUndefinedManufacturedItems()), utilitiesMenu, (_privleges->check("ViewBOMs") || _privleges->check("ViewBOOs")) ) ); parent->actions.append( new Action( parent, "pd.dspBillsOfMaterialsWithoutComponentItemSites", tr("Bills of Materials without Component Item Sites..."), this, SLOT(sDspInvalidBillsOfMaterials()), utilitiesMenu, _privleges->check("ViewBOMs") ) ); utilitiesMenu->insertSeparator(); parent->actions.append( new Action( parent, "pd.reassignClassCodeByClassCode", tr("Reassign Class Code by Class Code..."), this, SLOT(sReassignClassCodeByClassCode()), utilitiesMenu, _privleges->check("MaintainItemMasters") ) ); parent->actions.append( new Action( parent, "pd.reassignProductCategoryByProductCategory", tr("Reassign Product Category by Product Category..."), this, SLOT(sReassignProductCategoryByProductCategory()), utilitiesMenu, _privleges->check("MaintainItemMasters") ) ); mainMenu = new QMenu(); mainMenu->insertItem(tr("&Items"), itemsMenu ); mainMenu->insertItem(tr("&Bills of Materials"), bomMenu ); if (_metrics->boolean("Routings")) mainMenu->insertItem(tr("Bills of &Operations"), booMenu ); if (_metrics->boolean("BBOM")) mainMenu->insertItem(tr("Br&eeder Bills of Materials"), breederBOMMenu ); mainMenu->insertItem(tr("&Costing"), costingMenu ); mainMenu->insertItem(tr("&Displays"), displaysMenu ); mainMenu->insertItem(tr("&Reports"), reportsMenu ); mainMenu->insertItem(tr("&Master Information"), masterInfoMenu ); mainMenu->insertItem(tr("&Utilities"), utilitiesMenu ); parent->populateCustomMenu(mainMenu, "P/D"); parent->menuBar()->insertItem(tr("P/&D"), mainMenu); }
moduleSO::moduleSO(OpenMFGGUIClient *pParent) : QObject(pParent, "soModule") { parent = pParent; toolBar = new QToolBar(tr("S/O Tools")); toolBar->setObjectName("S/O Tools"); toolBar->setIconSize(QSize(32, 32)); if (_preferences->boolean("ShowSOToolbar")) parent->addToolBar(toolBar); mainMenu = new QMenu(); ordersMenu = new QMenu(); billingMenu = new QMenu(); billingInvoicesMenu = new QMenu(); billingCreditMemosMenu= new QMenu(); pricingDisplaysMenu = new QMenu(); pricingMenu = new QMenu(); displaysMenu = new QMenu(); reportsMenu = new QMenu(); masterInfoMenu = new QMenu(); utilitiesMenu = new QMenu(); struct actionProperties { const char* actionName; const QString actionTitle; const char* slot; QMenu* menu; bool priv; QPixmap* pixmap; QToolBar* toolBar; bool visible; }; actionProperties acts[] = { { "menu", tr("Orders"), (char*)ordersMenu, mainMenu, true, NULL, NULL, true}, { "so.newSalesOrder", tr("New Sales Order..."), SLOT(sNewSalesOrder()), ordersMenu, _privleges->check("MaintainSalesOrders"), NULL, NULL, true}, { "so.listOpenSalesOrders", tr("List Open Sales Orders..."), SLOT(sOpenSalesOrders()), ordersMenu, (_privleges->check("MaintainSalesOrders") || _privleges->check("ViewSalesOrders")), new QPixmap(":/images/listOpenSalesOrders.png"), toolBar, true}, { "so.rescheduleAllSoLineItems", tr("Reschedule all S/O Line Items..."), SLOT(sRescheduleSoLineItems()), ordersMenu, _privleges->check("MaintainSalesOrders"), NULL, NULL, true}, { "so.dspCustomerInformation", tr("Customer Information Workbench..."), SLOT(sDspCustomerInformation()), ordersMenu, (_privleges->check("MaintainCustomerMasters") || _privleges->check("ViewCustomerMasters")), new QPixmap(":/images/customerInformationWorkbench.png"), toolBar, true}, { "separator", NULL, NULL, ordersMenu, true, NULL, NULL, true}, { "so.packingListBatch", tr("Packing List Batch..."), SLOT(sPackingListBatch()), ordersMenu, (_privleges->check("MaintainPackingListBatch") || _privleges->check("ViewPackingListBatch")), NULL, NULL, true}, { "so.printPackingList", tr("Print Packing List..."), SLOT(sPrintPackingList()), ordersMenu, _privleges->check("PrintPackingLists"), NULL, NULL, true}, { "so.deliverSalesOrder", tr("Schedule S/O for Email Delivery..."), SLOT(sDeliverSalesOrder()), ordersMenu, _privleges->check("ViewSalesOrders") , NULL, NULL, _metrics->boolean("EnableBatchManager")}, { "separator", NULL, NULL, ordersMenu, true, NULL, NULL, true}, { "so.newQuote", tr("New Quote..."), SLOT(sNewQuote()), ordersMenu, _privleges->check("MaintainQuotes"), NULL, NULL, true}, { "so.listQuotes", tr("List Quotes..."), SLOT(sQuotes()), ordersMenu, (_privleges->check("MaintainQuotes") || _privleges->check("ViewQuotes")), NULL, NULL, true}, { "menu", tr("Billing"), (char*)billingMenu, mainMenu, true, NULL, NULL, true}, { "menu", tr("&Invoices"), (char*)billingInvoicesMenu, billingMenu, true, NULL, NULL, true}, { "so.uninvoicedShipments", tr("Uninvoiced Shipments..."), SLOT(sUninvoicedShipments()), billingInvoicesMenu, _privleges->check("SelectBilling"), new QPixmap(":/images/uninvoicedShipments"), toolBar, true}, { "separator", NULL, NULL, billingInvoicesMenu, true, NULL, NULL, true}, { "so.selectAllShippedOrdersForBilling", tr("Select All Shipped Orders for Billing..."), SLOT(sSelectShippedOrdersForBilling()), billingInvoicesMenu, _privleges->check("SelectBilling"), NULL, NULL, true}, { "so.selectOrderForBilling", tr("Select Order for Billing..."), SLOT(sSelectOrderForBilling()), billingInvoicesMenu, _privleges->check("SelectBilling"), NULL, NULL, true}, { "separator", NULL, NULL, billingInvoicesMenu, true, NULL, NULL, true}, { "so.billingEditList", tr("Billing Edit List..."), SLOT(sBillingEditList()), billingInvoicesMenu, _privleges->check("SelectBilling"), NULL, NULL, true}, { "so.dspBillingSelections", tr("Billing Selections..."), SLOT(sDspBillingSelections()), billingInvoicesMenu, _privleges->check("SelectBilling"), new QPixmap(":/images/billingSelections"), toolBar, true}, { "so.postBillingSelections", tr("Post Billing Selections..."), SLOT(sPostBillingSelections()), billingInvoicesMenu, _privleges->check("SelectBilling"), NULL, NULL, true}, { "separator", NULL, NULL, billingInvoicesMenu, true, NULL, NULL, true}, { "so.listUnpostedInvoices", tr("List Unposted Invoices..."), SLOT(sUnpostedInvoices()), billingInvoicesMenu, _privleges->check("SelectBilling"), NULL, NULL, true}, { "separator", NULL, NULL, billingInvoicesMenu, true, NULL, NULL, true}, { "so.printInvoices", tr("Print Invoices..."), SLOT(sPrintInvoices()), billingInvoicesMenu, _privleges->check("PrintInvoices"), NULL, NULL, true}, { "so.printInvoicesByShipvia", tr("Print Invoices by Ship Via..."), SLOT(sPrintInvoicesByShipvia()), billingInvoicesMenu, _privleges->check("PrintInvoices"), NULL, NULL, true}, { "so.reprintInvoices", tr("Re-Print Invoices..."), SLOT(sReprintInvoices()), billingInvoicesMenu, _privleges->check("PrintInvoices"), NULL, NULL, true}, { "so.scheduleInvoiceForEmailDelivery", tr("Schedule Invoice for Email Delivery..."), SLOT(sDeliverInvoice()), billingInvoicesMenu, _privleges->check("PrintInvoices"), NULL, NULL, true}, { "separator", NULL, NULL, billingInvoicesMenu, true, NULL, NULL, true}, { "so.postInvoices", tr("Post Invoices..."), SLOT(sPostInvoices()), billingInvoicesMenu, _privleges->check("PostMiscInvoices"), NULL, NULL, true}, { "separator", NULL, NULL, billingInvoicesMenu, true, NULL, NULL, true}, { "so.purgeInvoices", tr("Purge Invoices..."), SLOT(sPurgeInvoices()), billingInvoicesMenu, _privleges->check("PurgeInvoices"), NULL, NULL, true}, { "menu", tr("&Credit Memos"), (char*)billingCreditMemosMenu, billingMenu, true, NULL, NULL, true}, { "so.newCreditMemo", tr("New Credit Memo..."), SLOT(sNewCreditMemo()), billingCreditMemosMenu, _privleges->check("MaintainCreditMemos"), NULL, NULL, true}, { "so.listUnpostedCreditMemos", tr("List Unposted Credit Memos..."), SLOT(sUnpostedCreditMemos()), billingCreditMemosMenu, (_privleges->check("MaintainCreditMemos") || _privleges->check("ViewCreditMemos")), NULL, NULL, true}, { "so.creditMemoEditList", tr("Credit Memo Edit List..."), SLOT(sCreditMemoEditList()), billingCreditMemosMenu, (_privleges->check("MaintainCreditMemos") || _privleges->check("ViewCreditMemos")), NULL, NULL, true}, { "separator", NULL, NULL, billingCreditMemosMenu, true, NULL, NULL, true}, { "so.printCreditMemos", tr("Print Credit Memos..."), SLOT(sPrintCreditMemos()), billingCreditMemosMenu, _privleges->check("PrintCreditMemos"), NULL, NULL, true}, { "so.reprintCreditMemos", tr("Re-Print Credit Memos..."), SLOT(sReprintCreditMemos()), billingCreditMemosMenu, _privleges->check("PrintCreditMemos"), NULL, NULL, true}, { "separator", NULL, NULL, billingCreditMemosMenu, true, NULL, NULL, true}, { "so.postCreditMemos", tr("Post Credit Memos..."), SLOT(sPostCreditMemos()), billingCreditMemosMenu, _privleges->check("PostARDocuments"), NULL, NULL, true}, { "separator", NULL, NULL, billingCreditMemosMenu, true, NULL, NULL, true}, { "so.purgeCreditMemos", tr("Purge Credit Memos..."), SLOT(sPurgeCreditMemos()), billingCreditMemosMenu, _privleges->check("PurgeCreditMemos"), NULL, NULL, true}, // START_RW { "separator", NULL, NULL, billingMenu, true, NULL, NULL, _metrics->boolean("EnableExternalAccountingInterface")}, { "so.exportAROpenItemsAndDistributions", tr("Export Unposted A/R Open Items and Distributions..."), SLOT(sPostAROpenAndDist()), billingMenu, _privleges->check("PostARDocuments"), NULL, NULL, _metrics->boolean("EnableExternalAccountingInterface")}, // END_RW { "menu", tr("Item Pricing"), (char*)pricingMenu, mainMenu, true, NULL, NULL, true}, { "so.itemListPrice", tr("Item List Price..."), SLOT(sItemListPrice()), pricingMenu, (_privleges->check("MaintainListPrices") || _privleges->check("ViewListPrices")), NULL, NULL, true}, { "so.updateListPricesByProductCategory", tr("Update List Prices by Product Category..."), SLOT(sUpdateListPricesByProductCategory()), pricingMenu, _privleges->check("MaintainListPrices"), NULL, NULL, true}, { "separator", NULL, NULL, pricingMenu, true, NULL, NULL, true}, { "so.pricingSchedules", tr("Pricing Schedules..."), SLOT(sPricingSchedules()), pricingMenu, (_privleges->check("MaintainListPrices") || _privleges->check("ViewListPrices")), NULL, NULL, true}, { "so.pricingScheduleAssignments", tr("Pricing Schedule Assignments..."), SLOT(sPricingScheduleAssignments()), pricingMenu, _privleges->check("AssignPricingSchedules"), NULL, NULL, true}, { "so.sales", tr("Sales..."), SLOT(sSales()), pricingMenu, _privleges->check("CreateSales"), NULL, NULL, true}, { "separator", NULL, NULL, pricingMenu, true, NULL, NULL, true}, { "so.updatePricesByProductCategory", tr("Update Prices by Product Category..."), SLOT(sUpdatePricesByProductCategory()), pricingMenu, _privleges->check("UpdatePricingSchedules"), NULL, NULL, true}, { "so.updatePricesByPricingSchedule", tr("Update Prices by Pricing Schedule..."), SLOT(sUpdatePricesByPricingSchedule()), pricingMenu, _privleges->check("UpdatePricingSchedules"), NULL, NULL, true}, { "separator", NULL, NULL, pricingMenu, true, NULL, NULL, true}, { "menu", tr("&Displays"), (char*)pricingDisplaysMenu, pricingMenu, true, NULL, NULL, true}, { "so.dspPricesByItem", tr("Prices by Item..."), SLOT(sDspPricesByItem()), pricingDisplaysMenu, _privleges->check("ViewCustomerPrices"), NULL, NULL, true}, { "so.dspPricesByCustomer", tr("Prices by Customer..."), SLOT(sDspPricesByCustomer()), pricingDisplaysMenu, _privleges->check("ViewCustomerPrices"), NULL, NULL, true}, { "so.dspPricesByCustomerType", tr("Prices by Customer Type..."), SLOT(sDspPricesByCustomerType()), pricingDisplaysMenu, _privleges->check("ViewCustomerPrices"), NULL, NULL, true}, { "menu", tr("Displays"), (char*)displaysMenu, mainMenu, true, NULL, NULL, true}, { "so.dspSalesOrderLookupByCustomer", tr("Sales Order Lookup by Customer..."), SLOT(sDspOrderLookupByCustomer()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "so.dspSalesOrderLookupByCustomerType", tr("Sales Order Lookup by Customer Type..."), SLOT(sDspOrderLookupByCustomerType()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "so.dspSalesOrderLookupByItem", tr("Sales Order Lookup by Item..."), SLOT(sDspOrderLookupByItem()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "so.dspSalesOrderLookupByCustomerPO", tr("Sales Order Lookup by Customer PO..."), SLOT(sDspOrderLookupByCustomerPO()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "separator", NULL, NULL, displaysMenu, true, NULL, NULL, true}, { "so.dspQuoteLookupByCustomer", tr("Quote Lookup by Customer..."), SLOT(sDspQuoteLookupByCustomer()), displaysMenu, _privleges->check("ViewQuotes"), NULL, NULL, true}, { "so.dspQuoteOrderLookupByItem", tr("Quote Lookup by Item..."), SLOT(sDspQuoteLookupByItem()), displaysMenu, _privleges->check("ViewQuotes"), NULL, NULL, true}, { "separator", NULL, NULL, displaysMenu, true, NULL, NULL, true}, { "so.dspCustomersByCustomerType", tr("Customers by Customer Type..."), SLOT(sDspCustomersByCusttype()), displaysMenu, (_privleges->check("MaintainCustomerMasters") || _privleges->check("ViewCustomerMasters")), NULL, NULL, true}, { "so.dspCustomersByCharacteristic", tr("Customers by Characteristic..."), SLOT(sDspCustomersByCharacteristic()), displaysMenu, (_privleges->check("MaintainCustomerMasters") || _privleges->check("ViewCustomerMasters")), NULL, NULL, true}, { "separator", NULL, NULL, displaysMenu, true, NULL, NULL, true}, { "so.dspInventoryAvailabilityByItem", tr("Inventory Availability by Item..."), SLOT(sDspInventoryAvailabilityByItem()), displaysMenu, _privleges->check("ViewInventoryAvailability"), NULL, NULL, true}, { "so.dspInventoryAvailabilityBySalesOrder", tr("Inventory Availability by Sales Order..."), SLOT(sDspInventoryAvailabilityBySalesOrder()), displaysMenu, _privleges->check("ViewInventoryAvailability"), NULL, NULL, true}, { "separator", NULL, NULL, displaysMenu, true, NULL, NULL, true}, { "so.dspSalesOrderStatus", tr("Sales Order Status..."), SLOT(sDspSalesOrderStatus()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "separator", NULL, NULL, displaysMenu, true, NULL, NULL, true}, { "so.dspBacklogByItem", tr("Backlog by Item..."), SLOT(sDspBacklogByItem()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "so.dspBacklogBySalesOrder", tr("Backlog by Sales Order..."), SLOT(sDspBacklogBySalesOrder()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "so.dspBacklogByCustomer", tr("Backlog by Customer..."), SLOT(sDspBacklogByCustomer()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "so.dspBacklogByCustomerType", tr("Backlog by Customer Type..."), SLOT(sDspBacklogByCustomerType()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "so.dspBacklogByCustomerGroup", tr("Backlog by Customer Group..."), SLOT(sDspBacklogByCustomerGroup()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "so.dspBacklogByProductCategory", tr("Backlog by Product Category..."), SLOT(sDspBacklogByProductCategory()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "separator", NULL, NULL, displaysMenu, true, NULL, NULL, true}, { "so.dspSummarizedBacklogByWarehouse", tr("Summarized Backlog by Warehouse..."), SLOT(sDspSummarizedBacklogByWarehouse()), displaysMenu, _privleges->check("ViewSalesOrders"), new QPixmap(":/images/dspSummarizedBacklogByWhse.png"), toolBar, true}, { "so.dspPartiallyShippedOrders", tr("Partially Shipped Orders..."), SLOT(sDspPartiallyShippedOrders()), displaysMenu, _privleges->check("ViewSalesOrders"), NULL, NULL, true}, { "separator", NULL, NULL, displaysMenu, true, NULL, NULL, true}, { "so.dspEarnedCommissions", tr("Earned Commissions..."), SLOT(sDspEarnedCommissions()), displaysMenu, _privleges->check("ViewCommissions"), NULL, NULL, true}, { "so.dspBriefEarnedCommissions", tr("Brief Earned Commissions..."), SLOT(sDspBriefEarnedCommissions()), displaysMenu, _privleges->check("ViewCommissions"), NULL, NULL, true}, { "so.dspSummarizedTaxableSales", tr("Summarized Taxable Sales..."), SLOT(sDspSummarizedTaxableSales()), displaysMenu, _privleges->check("ViewCommissions"), NULL, NULL, true}, { "menu", tr("Reports"), (char*)reportsMenu, mainMenu, true, NULL, NULL, true}, { "so.printSalesOrderForm", tr("Print Sales Order Form..."), SLOT(sPrintSalesOrderForm()), reportsMenu, (_privleges->check("MaintainSalesOrders") || _privleges->check("ViewSalesOrders")), NULL, NULL, true}, { "menu", tr("Master Information"), (char*)masterInfoMenu, mainMenu, true, NULL, NULL, true}, { "so.enterNewCustomer", tr("Enter New Customer..."), SLOT(sNewCustomer()), masterInfoMenu, _privleges->check("MaintainCustomerMasters"), NULL, NULL, true}, { "so.searchForCustomer", tr("Search for Customer..."), SLOT(sSearchForCustomer()), masterInfoMenu, (_privleges->check("MaintainCustomerMasters") || _privleges->check("ViewCustomerMasters")), NULL, NULL, true}, { "so.customers", tr("Customers..."), SLOT(sCustomers()), masterInfoMenu, (_privleges->check("MaintainCustomerMasters") || _privleges->check("ViewCustomerMasters")), NULL, NULL, true}, { "separator", NULL, NULL, masterInfoMenu, true, NULL, NULL, true}, { "so.customerGroups", tr("Customer Groups..."), SLOT(sCustomerGroups()), masterInfoMenu, (_privleges->check("MaintainCustomerGroups") || _privleges->check("ViewCustomerGroups")), NULL, NULL, true}, { "so.customerTypes", tr("Customer Types..."), SLOT(sCustomerTypes()), masterInfoMenu, (_privleges->check("MaintainCustomerTypes") || _privleges->check("ViewCustomerTypes")), NULL, NULL, true}, { "so.characteristics", tr("Characteristics..."), SLOT(sCharacteristics()), masterInfoMenu, (_privleges->check("MaintainCharacteristics") || _privleges->check("ViewCharacteristics")), NULL, NULL, true}, { "separator", NULL, NULL, masterInfoMenu, true, NULL, NULL, true}, { "so.enterNewProspect", tr("Enter New Prospect..."), SLOT(sNewProspect()), masterInfoMenu, _privleges->check("MaintainProspectMasters"), NULL, NULL, true}, { "so.searchForProspect", tr("Search for Prospect..."), SLOT(sSearchForProspect()), masterInfoMenu, (_privleges->check("MaintainProspects") || _privleges->check("ViewProspects")), NULL, NULL, true}, { "so.prospects", tr("Prospects..."), SLOT(sProspects()), masterInfoMenu, (_privleges->check("MaintainProspectMasters") || _privleges->check("ViewProspectMasters")), NULL, NULL, true}, { "separator", NULL, NULL, masterInfoMenu, true, NULL, NULL, true}, { "so.salesReps", tr("Sales Reps..."), SLOT(sSalesReps()), masterInfoMenu, (_privleges->check("MaintainSalesReps") || _privleges->check("ViewSalesReps")), NULL, NULL, true}, { "so.shippingZones", tr("Shipping Zones..."), SLOT(sShippingZones()), masterInfoMenu, (_privleges->check("MaintainShippingZones") || _privleges->check("ViewShippingZones")), NULL, NULL, true}, { "so.shipVias", tr("Ship Vias..."), SLOT(sShipVias()), masterInfoMenu, (_privleges->check("MaintainShipVias") || _privleges->check("ViewShipVias")), NULL, NULL, true}, { "so.shippingChargeTypes", tr("Shipping Charge Types..."), SLOT(sShippingChargeTypes()), masterInfoMenu, (_privleges->check("MaintainShippingChargeTypes") || _privleges->check("ViewShippingChargeTypes")), NULL, NULL, true}, { "so.taxCodes", tr("Tax Codes..."), SLOT(sTaxCodes()), masterInfoMenu, (_privleges->check("MaintainTaxCodes") || _privleges->check("ViewTaxCodes")), NULL, NULL, true}, { "so.terms", tr("Terms..."), SLOT(sTerms()), masterInfoMenu, (_privleges->check("MaintainTerms") || _privleges->check("ViewTerms")), NULL, NULL, true}, { "so.shippingForms", tr("Shipping Forms..."), SLOT(sShippingForms()), masterInfoMenu, (_privleges->check("MaintainShippingForms") || _privleges->check("ViewShippingForms")), NULL, NULL, true}, { "so.salesCategories", tr("Sales Categories..."), SLOT(sSalesCategories()), masterInfoMenu, (_privleges->check("MaintainSalesCategories")) || (_privleges->check("ViewSalesCategories")), NULL, NULL, true}, { "separator", NULL, NULL, masterInfoMenu, true, NULL, NULL, true}, { "so.salesAccountAssignments", tr("Sales Account Assignments..."), SLOT(sSalesAccountAssignments()), masterInfoMenu, (_privleges->check("MaintainSalesAccount") || _privleges->check("ViewSalesAccount")), NULL, NULL, true}, { "so.arAccountAssignments", tr("A/R Account Assignments..."), SLOT(sARAccountAssignments()), masterInfoMenu, (_privleges->check("MaintainSalesAccount") || _privleges->check("ViewSalesAccount")), NULL, NULL, true}, { "so.customerFormAssignments", tr("Customer Form Assignments..."), SLOT(sCustomerFormAssignments()), masterInfoMenu, _privleges->check("MaintainCustomerMasters"), NULL, NULL, true}, { "menu", tr("&Utilities"), (char*)utilitiesMenu, mainMenu, true, NULL, NULL, true}, { "so.customerInformationExport", tr("Customer Information Export..."), SLOT(sDspCustomerInformationExport()), utilitiesMenu, _privleges->check("MaintainCustomerMasters"), NULL, NULL, true}, { "so.reassignCustomerTypeByCustomerType", tr("Reassign Customer Type by Customer Type..."), SLOT(sReassignCustomerTypeByCustomerType()), utilitiesMenu, _privleges->check("MaintainCustomerMasters"), NULL, NULL, true}, { "so.updateCreditStatusByCustomer", tr("Update Credit Status by Customer..."), SLOT(sUpdateCreditStatusByCustomer()), utilitiesMenu, (_privleges->check("MaintainCustomerMasters") || _privleges->check("UpdateCustomerCreditStatus")), NULL, NULL, true}, // START_RW { "so.exportCustomers", tr("Export Customers..."), SLOT(sExportCustomers()), utilitiesMenu, _privleges->check("ViewCustomerMasters"), NULL, NULL, _metrics->boolean("EnableExternalAccountingInterface")} // END_RW }; for (unsigned int i = 0; i < sizeof(acts) / sizeof(acts[0]); i++) { if (! acts[i].visible) { continue; } else if (acts[i].actionName == QString("menu")) { acts[i].menu->insertItem(acts[i].actionTitle, (QMenu*)(acts[i].slot)); } else if (acts[i].actionName == QString("separator")) { acts[i].menu->addSeparator(); } else if (acts[i].toolBar != NULL) { parent->actions.append( new Action( parent, acts[i].actionName, acts[i].actionTitle, this, acts[i].slot, acts[i].menu, acts[i].priv, *(acts[i].pixmap), acts[i].toolBar) ); } else { parent->actions.append( new Action( parent, acts[i].actionName, acts[i].actionTitle, this, acts[i].slot, acts[i].menu, acts[i].priv ) ); } } parent->populateCustomMenu(mainMenu, "S/O"); parent->menuBar()->insertItem(tr("S/&O"), mainMenu); }