Пример #1
0
menuAccounting::menuAccounting(GUIClient *Pparent) :
 QObject(Pparent, "wmModule")
{
  parent = Pparent;

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


  mainMenu		= new QMenu(parent);
  apMenu = new QMenu(parent);
  apPurchaseMenu = new QMenu(parent);
  apVoucherMenu = new QMenu(parent);
  apMemosMenu = new QMenu(parent);
  apPaymentsMenu = new QMenu(parent);
  apFormsMenu = new QMenu(parent);
  apReportsMenu = new QMenu(parent);
  arMenu = new QMenu(parent);
  arInvoicesMenu = new QMenu(parent);
  arMemosMenu = new QMenu(parent);
  arCashReceiptsMenu = new QMenu(parent);
  arFormsMenu = new QMenu(parent);
  arReportsMenu = new QMenu(parent);
  glMenu = new QMenu(parent);
  glEnterTransactionMenu = new QMenu(parent);
  glStandardJournalsMenu = new QMenu(parent);
  bankrecMenu		= new QMenu(parent);
  financialReportsMenu	= new QMenu(parent);
  reportsMenu		= new QMenu(parent);
  calendarMenu      = new QMenu(parent);
  coaMenu           = new QMenu(parent);
  budgetMenu		= new QMenu(parent);
  taxMenu           = new QMenu(parent);
  masterInfoMenu	= new QMenu(parent);
  utilitiesMenu		= new QMenu(parent);

  mainMenu->setObjectName("menu.accnt");
  apMenu->setObjectName("menu.accnt.ap");
  apPurchaseMenu->setObjectName("menu.accnt.appurchase");
  apVoucherMenu->setObjectName("menu.accnt.apvoucher");
  apMemosMenu->setObjectName("menu.accnt.apmemos");
  apPaymentsMenu->setObjectName("menu.accnt.appayments");
  apFormsMenu->setObjectName("menu.accnt.apforms");
  apReportsMenu->setObjectName("menu.accnt.apreports");
  arMenu->setObjectName("menu.accnt.ar");
  arInvoicesMenu->setObjectName("menu.accnt.arinvoices");
  arMemosMenu->setObjectName("menu.accnt.armemos");
  arCashReceiptsMenu->setObjectName("menu.accnt.arcashreceipts");
  arFormsMenu->setObjectName("menu.accnt.arforms");
  arReportsMenu->setObjectName("menu.accnt.arreports");
  glMenu->setObjectName("menu.accnt.gl");
  glEnterTransactionMenu->setObjectName("menu.accnt.glentertransaction");
  glStandardJournalsMenu->setObjectName("menu.accnt.glstandardjournals");
  bankrecMenu->setObjectName("menu.accnt.bankrec");
  financialReportsMenu->setObjectName("menu.accnt.financialreports");
  reportsMenu->setObjectName("menu.accnt.reports");
  calendarMenu->setObjectName("menu.accnt.calendar");
  coaMenu->setObjectName("menu.accnt.coa");
  budgetMenu->setObjectName("menu.accnt.budget");
  taxMenu->setObjectName("menu.accnt.tax");
  masterInfoMenu->setObjectName("menu.accnt.masterinfo");
  utilitiesMenu->setObjectName("menu.accnt.utilities");

  actionProperties acts[] = { 
    // Accounting | Accounts Payable
    { "menu", tr("Accounts &Payable"), (char*)apMenu,	mainMenu, true,	NULL, NULL, true, NULL },
    
    // Accounting | Accaunts Payable | Purchase Orders
    { "menu", tr("Purchase &Order"), (char*)apPurchaseMenu, apMenu, true, NULL, NULL, true, NULL },
    { "ap.enterPurchaseOrder", tr("&New..."), SLOT(sEnterPurchaseOrder()), apPurchaseMenu, _privileges->check("MaintainPurchaseOrders"), NULL, NULL, true , NULL },
    { "ap.listUnpostedPurchaseOrders", tr("&List Unposted..."), SLOT(sUnpostedPurchaseOrders()), apPurchaseMenu, (_privileges->check("MaintainPurchaseOrders") || _privileges->check("ViewPurchaseOrders")), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apPurchaseMenu, true, NULL, NULL, true, NULL },
    { "ap.postPurchaseOrder", tr("&Post..."), SLOT(sPostPurchaseOrder()), apPurchaseMenu, _privileges->check("PostPurchaseOrders"), NULL, NULL, true , NULL },

    // Accounting | Accaunts Payable | Vouchers
    { "menu", tr("&Voucher"), (char*)apVoucherMenu, apMenu, true, NULL, NULL, true, NULL },
    { "ar.enterNewVoucher", tr("&New..."), SLOT(sEnterVoucher()), apVoucherMenu, _privileges->check("MaintainVouchers"), NULL, NULL, true , NULL },
    { "ar.enterNewMiscVoucher", tr("New &Miscellaneous..."), SLOT(sEnterMiscVoucher()), apVoucherMenu, _privileges->check("MaintainVouchers"), NULL, NULL, true , NULL },
    { "ar.listUnpostedVouchers", tr("&List Unposted..."), SLOT(sUnpostedVouchers()), apVoucherMenu, (_privileges->check("MaintainVouchers") || _privileges->check("ViewVouchers")), new QPixmap(":/images/listUnpostedVouchers.png"), toolBar, true , "List Unposted Vouchers" },
    { "separator", NULL, NULL, apVoucherMenu, true, NULL, NULL, true, NULL },
    { "ar.postVouchers", tr("&Post..."), SLOT(sPostVouchers()), apVoucherMenu, _privileges->check("PostVouchers"), NULL, NULL, true , NULL },

    // Accounting | Accaunts Payable | Memos
    { "menu", tr("&Memos"), (char*)apMemosMenu, apMenu, true, NULL, NULL, true, NULL },
    { "ap.enterMiscCreditMemo", tr("&New Misc. Credit Memo..."), SLOT(sEnterMiscApCreditMemo()), apMemosMenu, _privileges->check("MaintainAPMemos"), NULL, NULL, true , NULL },
    { "ap.unapplidCreditMemo", tr("&List Unapplied Credit Memos..."), SLOT(sUnappliedApCreditMemos()), apMemosMenu, (_privileges->check("MaintainAPMemos") || _privileges->check("ViewAPMemos")), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apMemosMenu, true, NULL, NULL, true, NULL },
    { "ap.enterMiscDebitMemo", tr("New &Misc. Debit Memo..."), SLOT(sEnterMiscApDebitMemo()), apMemosMenu, _privileges->check("MaintainAPMemos"), NULL, NULL, true , NULL },

    // Accounting | Accaunts Payable |  Payments
    { "menu", tr("&Payments"), (char*)apPaymentsMenu, apMenu, true, NULL, NULL, true, NULL },
    { "ap.selectPayments", tr("&Select..."), SLOT(sSelectPayments()), apPaymentsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , "Select Payments" },
    { "ap.listSelectPayments", tr("&List Selected..."), SLOT(sSelectedPayments()), apPaymentsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apPaymentsMenu, true, NULL, NULL, true, NULL },
    { "ap.prepareCheckRun", tr("&Prepare Check Run..."), SLOT(sPrepareCheckRun()), apPaymentsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , NULL },
    { "ap.createMiscCheck", tr("Create &Miscellaneous Check..."), SLOT(sCreateMiscCheck()), apPaymentsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , NULL },
    { "ap.viewCheckRun", tr("Vie&w Check Run..."), SLOT(sViewCheckRun()), apPaymentsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apPaymentsMenu, true, NULL, NULL, true, NULL },
    { "ap.voidCheckRun", tr("&Void Check Run..."), SLOT(sVoidCheckRun()), apPaymentsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apPaymentsMenu, true, NULL, NULL, true, NULL },
    { "ap.postCheck", tr("Post &Check..."), SLOT(sPostCheck()), apPaymentsMenu, _privileges->check("PostPayments"), NULL, NULL, true , NULL },
    { "ap.postChecks", tr("P&ost Checks..."), SLOT(sPostChecks()), apPaymentsMenu, _privileges->check("PostPayments"), NULL, NULL, true , NULL },
                       
    { "separator", NULL, NULL, apMenu, true, NULL, NULL, true, NULL },
    { "ap.workbench", tr("&Workbench..."), SLOT(sApWorkBench()), apMenu, _privileges->check("MaintainPayments") || _privileges->check("MaintainAPMemos"), new QPixmap(":/images/viewCheckRun.png"), toolBar, true, "Payables Workbench" },
    { "separator", NULL, NULL, apMenu, true, NULL, NULL, true, NULL },
    
    // Accounting | Accaunts Payable | Forms
    { "menu", tr("&Forms"), (char*)apFormsMenu, apMenu, true, NULL, NULL, true, NULL },
    { "ap.printPurchaseOrder", tr("Print Purchase &Order..."), SLOT(sPrintPurchaseOrder()), apFormsMenu, _privileges->check("PrintPurchaseOrders"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apFormsMenu, true, NULL, NULL, true, NULL },
    { "ap.printCheck", tr("Print &Check..."), SLOT(sPrintCheck()), apFormsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , NULL },
    { "ap.printCheckRun", tr("Print Check &Run..."), SLOT(sPrintCheckRun()), apFormsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , NULL },
    
    // Accounting | Accaunts Payable |  Reports
    { "menu", tr("&Reports"), (char*)apReportsMenu, apMenu, true, NULL, NULL, true, NULL },
    { "ap.uninvoicedReceipts", tr("&Uninvoiced Receipts and Returns..."), SLOT(sDspUninvoicedReceipts()), apReportsMenu, (_privileges->check("ViewUninvoicedReceipts") || _privileges->check("MaintainUninvoicedReceipts")), NULL, NULL, true , NULL },
    { "ap.voucheringEditList", tr("Vouchering &Edit List..."), SLOT(sVoucheringEditList()), apReportsMenu, (_privileges->check("MaintainVouchers") || _privileges->check("ViewVouchers")), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apReportsMenu, true, NULL, NULL, true, NULL },
    { "ap.dspOpenAPItemsByVendor", tr("Open &Items by Vendor..."), SLOT(sDspAPOpenItemsByVendor()), apReportsMenu, _privileges->check("ViewAPOpenItems"), NULL, NULL, true , NULL },
    { "ap.dspAPAging", tr("&Aging..."), SLOT(sDspTimePhasedOpenAPItems()), apReportsMenu, _privileges->check("ViewAPOpenItems"), new QPixmap(":/images/apAging.png"), toolBar, true , "Payables Aging" },
    { "separator", NULL, NULL, apReportsMenu, true, NULL, NULL, true, NULL },
    { "ap.dspCheckRegister", tr("&Check Register..."), SLOT(sDspCheckRegister()), apReportsMenu, _privileges->check("MaintainPayments"), NULL, NULL, true , NULL },
    { "ap.dspVoucherRegister", tr("&Voucher Register..."), SLOT(sDspVoucherRegister()), apReportsMenu, (_privileges->check("MaintainVouchers") || _privileges->check("ViewVouchers")), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apReportsMenu, true, NULL, NULL, true, NULL },
    { "ap.dspAPApplications", tr("&Applications..."), SLOT(sDspAPApplications()), apReportsMenu, _privileges->check("ViewAPOpenItems"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apReportsMenu, true, NULL, NULL, true, NULL },
    { "ap.dspVendorHistory", tr("Vendor &History..."), SLOT(sDspVendorHistory()), apReportsMenu, _privileges->check("ViewAPOpenItems"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, apReportsMenu, true, NULL, NULL, true, NULL },
    { "ap.rptPayablesJournal", tr("Pa&yables Journal..."), SLOT(sRptPayablesJournal()), apReportsMenu, _privileges->check("PrintAPJournals"), NULL, NULL, true , NULL },
    { "ap.rptCheckJournal", tr("Check &Journal..."), SLOT(sRptCheckJournal()), apReportsMenu, _privileges->check("PrintAPJournals"), NULL, NULL, true , NULL },
    
    { "separator", NULL, NULL, apMenu, true, NULL, NULL, true, NULL },
    { "ap.vendors", tr("Ve&ndors..."), SLOT(sVendors()), apMenu, (_privileges->check("MaintainVendors") || _privileges->check("ViewVendors")), NULL, NULL, true , NULL },
    
    // Accounting | Accounts Receivable
    { "menu", tr("Accounts Recei&vable"),	(char*)arMenu,	mainMenu, true, NULL, NULL, true, NULL },
  
    // Accounting | Accounts Receivable | Invoices
    { "menu", tr("&Invoice"), (char*)arInvoicesMenu,	arMenu, true,	 NULL, NULL, true, NULL },
    { "ar.createInvoice", tr("&New..."), SLOT(sCreateInvoice()), arInvoicesMenu, _privileges->check("MaintainMiscInvoices"), NULL, NULL, true , NULL },
    { "ar.listUnpostedInvoices", tr("&List Unposted..."), SLOT(sUnpostedInvoices()), arInvoicesMenu, _privileges->check("SelectBilling"), new QPixmap(":/images/unpostedInvoices.png"), toolBar, true , "List Unposted Invoices" },
    { "separator", NULL, NULL, arInvoicesMenu, true, NULL, NULL, true, NULL },
    { "ar.postInvoices", tr("&Post..."), SLOT(sPostInvoices()), arInvoicesMenu, _privileges->check("PostMiscInvoices"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, arInvoicesMenu, true, NULL, NULL, _metrics->boolean("EnableBatchManager"), NULL },
    { "ar.scheduleInvoiceForEmailDelivery", tr("&Email Invoice..."), SLOT(sDeliverInvoice()), arInvoicesMenu, _privileges->check("PrintInvoices"), NULL, NULL, _metrics->boolean("EnableBatchManager") , NULL },

    // Accounting | Accounts Receivable | Memos
    { "menu", tr("&Memos"), (char*)arMemosMenu,	arMenu, true,	 NULL, NULL, true, NULL },
    { "ar.enterMiscCreditMemo", tr("&New Misc. Credit Memo..."), SLOT(sEnterMiscArCreditMemo()), arMemosMenu, _privileges->check("MaintainARMemos"), NULL, NULL, true , NULL },
    { "ar.unapplidCreditMemo", tr("&List Unapplied Credit Memos..."), SLOT(sUnappliedArCreditMemos()), arMemosMenu, (_privileges->check("MaintainARMemos") || _privileges->check("ViewARMemos")), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, arMemosMenu, true, NULL, NULL, true, NULL },
    { "ar.enterMiscDebitMemo", tr("New &Misc. Debit Memo..."), SLOT(sEnterMiscArDebitMemo()), arMemosMenu, _privileges->check("MaintainARMemos"), NULL, NULL, true , NULL },

    // Accounting | Accounts Receivable | Cash Receipts
    { "menu", tr("C&ash Receipt"), (char*)arCashReceiptsMenu,	arMenu, true,	 NULL, NULL, true, NULL },
    { "ar.enterCashReceipt", tr("&New..."), SLOT(sEnterCashReceipt()), arCashReceiptsMenu, _privileges->check("MaintainCashReceipts"), NULL, NULL, true , NULL },
    { "ar.cashReceiptEditList", tr("&Edit List..."), SLOT(sCashReceiptEditList()), arCashReceiptsMenu, (_privileges->check("MaintainCashReceipts") || _privileges->check("ViewCashReceipt")), new QPixmap(":/images/editCashReceipts.png"), toolBar, true , "Cash Receipt Edit List" },
    { "ar.postCashReceipts", tr("&Post..."), SLOT(sPostCashReceipts()), arCashReceiptsMenu, _privileges->check("PostCashReceipts"), NULL, NULL, true , NULL },

    { "separator", NULL, NULL, arMenu, true, NULL, NULL, true, NULL },
    { "ar.arWorkBench", tr("&Workbench..."), SLOT(sArWorkBench()), arMenu, _privileges->check("ViewAROpenItems") , new QPixmap(":/images/arWorkbench.png"), toolBar, true , "Receivables Workbench" },

    { "separator", NULL, NULL, arMenu, true, NULL, NULL, true, NULL },
    // Accounting | Accounts Receivable | Forms
    { "menu", tr("&Forms"), (char*)arFormsMenu,	arMenu, true,	 NULL, NULL, true, NULL },
    { "ar.printInvoices", tr("Print &Invoices..."), SLOT(sPrintInvoices()), arFormsMenu, _privileges->check("PrintInvoices"), NULL, NULL, true , NULL },
    { "ar.reprintInvoices", tr("&Re-Print Invoices..."), SLOT(sReprintInvoices()), arFormsMenu, _privileges->check("PrintInvoices"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, arFormsMenu, true, NULL, NULL, true, NULL },
    { "ar.printStatementByCustomer", tr("Print S&tatement by Customer..."), SLOT(sPrintStatementByCustomer()), arFormsMenu, _privileges->check("ViewAROpenItems"), NULL, NULL, true , NULL },
    { "ar.printStatementsByCustomerType", tr("Print State&ments by Customer Type..."), SLOT(sPrintStatementsByCustomerType()), arFormsMenu, _privileges->check("ViewAROpenItems"), NULL, NULL, true , NULL },

    // Accounting | Accounts Receivable | Reports
    { "menu", tr("&Reports"), (char*)arReportsMenu,	arMenu, true,	 NULL, NULL, true, NULL },
    { "ar.dspInvoiceInformation", tr("&Invoice Information..."), SLOT(sDspInvoiceInformation()), arReportsMenu, _privileges->check("ViewAROpenItems"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, arReportsMenu, true, NULL, NULL, true, NULL },
    { "ar.dspOpenItems", tr("&Open Items..."), SLOT(sDspAROpenItems()), arReportsMenu, _privileges->check("ViewAROpenItems"), NULL, NULL, true , NULL },
    { "ar.dspOpenItemsByCustomer", tr("Open Items by &Customer..."), SLOT(sDspAROpenItemsByCustomer()), arReportsMenu, _privileges->check("ViewAROpenItems"), NULL, NULL, true , NULL },
    { "ar.dspARAging", tr("A&ging..."), SLOT(sDspTimePhasedOpenItems()), arReportsMenu, _privileges->check("ViewAROpenItems"), new QPixmap(":/images/arAging.png"), toolBar, true , "Receivables Aging" },
    { "separator", NULL, NULL, arReportsMenu, true, NULL, NULL, true, NULL }, 
    { "ar.dspInvoiceRegister", tr("In&voice Register..."), SLOT(sDspInvoiceRegister()), arReportsMenu, _privileges->check("ViewInvoiceRegister"), NULL, NULL, true , NULL },
    { "ar.dspCashReceipts", tr("Cash &Receipts..."), SLOT(sDspCashReceipts()), arReportsMenu, _privileges->check("ViewAROpenItems"), NULL, NULL, true , NULL },
    { "ar.dspARApplications", tr("&Applications..."), SLOT(sDspARApplications()), arReportsMenu, _privileges->check("ViewAROpenItems"), NULL, NULL, true , NULL },
    { "ar.dspDepositsRegister", tr("&Deposits Register..."), SLOT(sDspDepositsRegister()), arReportsMenu, _privileges->check("ViewDepositsRegister"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, arReportsMenu, true, NULL, NULL, true, NULL },
    { "ar.dspCustomerHistory", tr("Customer &History..."), SLOT(sDspCustomerHistory()), arReportsMenu, _privileges->check("ViewAROpenItems"), NULL, NULL, true , NULL },
    { "separator", NULL, NULL, arReportsMenu, true, NULL, NULL, true, NULL },
    { "ar.rptSalesJournal", tr("Sales &Journal..."), SLOT(sRptSalesJournal()), arReportsMenu, _privileges->check("PrintARJournals"), NULL, NULL, true , NULL },
    { "ar.rptCreditMemoJournal", tr("Credit &Memo Journal..."), SLOT(sRptCreditMemoJournal()), arReportsMenu, _privileges->check("PrintARJournals"), NULL, NULL, true , NULL },

    { "separator", NULL, NULL, arMenu, true, NULL, NULL, true, NULL },
    { "ar.customers", tr("&Customers..."), SLOT(sCustomers()), arMenu, (_privileges->check("MaintainCustomerMasters") || _privileges->check("ViewCustomerMasters")), NULL, NULL, true , NULL },
  
    // Accounting | G/L
    { "menu",		    tr("General &Ledger"),		(char*)glMenu,	mainMenu,		true,					NULL, NULL, true, NULL },
    
    // Accounting | G/L | Journals
    { "menu",		    tr("&Journal Entry"),		(char*)glEnterTransactionMenu,	glMenu,		true,					NULL, NULL, true, NULL },
    { "gl.simpleEntry",	    tr("S&imple..."),	SLOT(sSimpleEntry()),		glEnterTransactionMenu,	_privileges->check("PostJournalEntries"),NULL, NULL, true, NULL },
    { "gl.seriesEntry",     tr("&Series..."),	SLOT(sSeriesEntry()),		glEnterTransactionMenu,	_privileges->check("PostJournalEntries"),NULL, NULL, true, NULL },
    { "separator",	    NULL,				NULL,			        glEnterTransactionMenu,   true,					NULL, NULL, true, NULL },
    { "gl.unpostedEntries", tr("&List Unposted..."), SLOT(sUnpostedEntries()),	glEnterTransactionMenu,	_privileges->check("PostJournalEntries"), new QPixmap(":/images/journalEntries.png"), toolBar,  true, "List Unposted Journal Entries" },

    // Accounting | G/L | Standard Journals
    { "menu",			     tr("&Standard Journals"),		   (char*)glStandardJournalsMenu,	     glMenu,		   true,					      NULL, NULL, true, NULL },
    { "gl.enterNewStandardJournal",  tr("&New..."),  SLOT(sEnterStandardJournal()),    glStandardJournalsMenu, _privileges->check("MaintainStandardJournals"),     NULL, NULL, true, NULL },
    { "gl.listStandardJournals",     tr("&List..."),	   SLOT(sStandardJournals()),	     glStandardJournalsMenu, _privileges->check("MaintainStandardJournals"),     NULL, NULL, true, NULL },
    { "gl.listStandardJournalGroups",tr("List &Groups..."),SLOT(sStandardJournalGroups()),   glStandardJournalsMenu, _privileges->check("MaintainStandardJournalGroups"),NULL, NULL, true, NULL },
    { "separator",		     NULL,				   NULL,			     glStandardJournalsMenu, true,					      NULL, NULL, true, NULL },
    { "gl.postStandardJournal",	     tr("&Post..."),	   SLOT(sPostStandardJournal()),     glStandardJournalsMenu, _privileges->check("PostStandardJournals"),	      NULL, NULL, true, NULL },
    { "gl.postStandardJournalGroup", tr("Post G&roup..."), SLOT(sPostStandardJournalGroup()),glStandardJournalsMenu, _privileges->check("PostStandardJournalGroups"),    NULL, NULL, true, NULL },

    { "menu",			tr("&Bank Reconciliation"), 	(char*)bankrecMenu,		mainMenu,    true,						NULL, NULL, true, NULL },
    { "gl.reconcileBankaccnt",	tr("&Reconcile..."),SLOT(sReconcileBankaccount()),	bankrecMenu, _privileges->check("MaintainBankRec"), new QPixmap(":/images/bankReconciliation.png"), toolBar,  true, "Reconcile Bank Account" },
    { "separator",		NULL,				NULL,				bankrecMenu, true,						NULL, NULL, true, NULL },
    { "gl.enterAdjustment",	tr("&New Adjustment..."),	SLOT(sEnterAdjustment()),	bankrecMenu, _privileges->check("MaintainBankAdjustments"),	NULL, NULL, true, NULL },
    { "gl.adjustmentEditList",	tr("Adjustment Edit &List..."),	SLOT(sAdjustmentEditList()),	bankrecMenu, (_privileges->check("MaintainBankAdjustments") || _privileges->check("ViewBankAdjustments")),NULL, NULL, true, NULL },

    { "separator",		  NULL,					NULL,					mainMenu,		true,					       NULL, NULL, true, NULL },
    
    // Accounting | Reports
    { "menu",				tr("&Reports"),				(char*)reportsMenu,			mainMenu,      true,					NULL, NULL, true, NULL },
    { "gl.dspGLTransactions",		tr("G/L &Transactions..."),		SLOT(sDspGLTransactions()),		reportsMenu, _privileges->check("ViewGLTransactions"),	NULL, NULL, true, NULL },
    { "gl.dspSummarizedGLTransactions",	tr("Su&mmarized G/L Transactions..."),	SLOT(sDspSummarizedGLTransactions()),	reportsMenu, _privileges->check("ViewGLTransactions"),	NULL, NULL, true, NULL },
    { "gl.dspGLSeries",			tr("G/L &Series..."),			SLOT(sDspGLSeries()),			reportsMenu, _privileges->check("ViewGLTransactions"),	NULL, NULL, true, NULL },
    { "gl.dspStandardJournalHistory",	tr("Standard &Journal History..."),	SLOT(sDspStandardJournalHistory()),	reportsMenu, _privileges->check("ViewGLTransactions"),	NULL, NULL, true, NULL },
    { "separator",		  NULL,					NULL,					reportsMenu,		true,					       NULL, NULL, true, NULL },
    { "gl.dspBankrecHistory",		tr("&Bank Rec. History"),		SLOT(sDspBankrecHistory()),		reportsMenu, _privileges->check("ViewBankRec"),		NULL, NULL, true, NULL },
    { "gl.dspSummarizedBankrecHistory",	tr("Summari&zed Bank Rec. History"),	SLOT(sDspSummarizedBankrecHistory()),	reportsMenu, _privileges->check("ViewBankRec"),		NULL, NULL, true, NULL },

    // Accounting | Statements
    { "menu",			  tr("Financial &Statements"),		(char*)financialReportsMenu,		mainMenu,			true,					       NULL, NULL, true, NULL },
    { "gl.createFinancialReports",tr("&New Financial Report..."),	SLOT(sNewFinancialReport()),		financialReportsMenu,		_privileges->check("MaintainFinancialLayouts"), NULL, NULL, true, NULL },
    { "gl.editFinancialReports",  tr("&List Financial Reports..."),	SLOT(sFinancialReports()),		financialReportsMenu,		_privileges->check("MaintainFinancialLayouts"), NULL, NULL, true, NULL },
    { "separator",		  NULL,					NULL,					financialReportsMenu,		true,					       NULL, NULL, true, NULL },
    { "gl.dspTrialBalances",	  tr("View &Trial Balances..."),		SLOT(sDspTrialBalances()),		financialReportsMenu,		_privileges->check("ViewTrialBalances"),	   new QPixmap(":/images/viewTrialBalance.png"), toolBar,  true, NULL },
    { "gl.viewFinancialReport",	  tr("View &Financial Report..."),	SLOT(sViewFinancialReport()),		financialReportsMenu,		_privileges->check("ViewFinancialReports"),   new QPixmap(":/images/viewFinancialReport.png"), toolBar, true, NULL },

    { "separator",		  NULL,					NULL,					mainMenu,		true,					       NULL, NULL, true, NULL },
    
    // Accounting | Fiscal Calendar
    { "menu", tr("&Fiscal Calendar"), (char*)calendarMenu, mainMenu,	true,	NULL, NULL, true, NULL },
    { "gl.accountingYearPeriods",	tr("Fiscal &Years..."),	SLOT(sAccountingYearPeriods()),	calendarMenu,	_privileges->check("MaintainAccountingPeriods"),	NULL, NULL, true, NULL },
    { "gl.accountingPeriods",	tr("Accounting &Periods..."),	SLOT(sAccountingPeriods()),	calendarMenu,	_privileges->check("MaintainAccountingPeriods"),	NULL, NULL, true, NULL },
    
    // Accounting | Account
    { "menu", tr("&Account"), (char*)coaMenu, mainMenu,	true,	NULL, NULL, true, NULL },
    { "gl.accountNumbers",	tr("&Chart of Accounts..."),	SLOT(sAccountNumbers()), coaMenu,	_privileges->check("MaintainChartOfAccounts"),	NULL, NULL, true, NULL },
    { "gl.companies",		tr("C&ompanies..."),		SLOT(sCompanies()),		coaMenu,	(_privileges->check("MaintainChartOfAccounts") && (_metrics->value("GLCompanySize").toInt() > 0)), NULL, NULL, true, NULL },
    { "gl.profitCenterNumber",	tr("&Profit Center Numbers..."),	SLOT(sProfitCenters()),	coaMenu,	(_privileges->check("MaintainChartOfAccounts") && (_metrics->value("GLProfitSize").toInt() > 0)), NULL, NULL, true, NULL },
    { "gl.subaccountNumbers",	tr("&Subaccount Numbers..."),	SLOT(sSubaccounts()), coaMenu,	(_privileges->check("MaintainChartOfAccounts") && (_metrics->value("GLSubaccountSize").toInt() > 0)), NULL, NULL, true, NULL },
    { "gl.subAccntTypes",	tr("Su&baccount Types..."),	SLOT(sSubAccntTypes()),	coaMenu,	_privileges->check("MaintainChartOfAccounts"),	NULL, NULL, true, NULL },

    // Accounting | Budget
    { "menu", tr("Bu&dget"), (char*)budgetMenu, mainMenu,	true,	NULL, NULL, true, NULL },
    { "gl.maintainBudget",	tr("&New Budget..."),	SLOT(sMaintainBudget()), budgetMenu,	_privileges->check("MaintainBudgets"),	NULL, NULL, true, NULL },
    { "gl.maintainBudget",	tr("&List Budgets..."),	SLOT(sBudgets()),	 budgetMenu,	(_privileges->check("MaintainBudgets") || _privileges->check("ViewBudgets")),	NULL, NULL, true, NULL },

    // Accounting | Tax
    { "menu", tr("&Tax"), (char*)taxMenu, mainMenu,	true,	NULL, NULL, true, NULL },
    { "gl.searchForTaxAuth",	tr("&Search for Tax Authority..."), SLOT(sTaxAuthoritySearch()),	taxMenu,	(_privileges->check("MaintainTaxAuthorities") || _privileges->check("ViewTaxAuthorities")), NULL, NULL, true, NULL },
    { "gl.taxAuthorities",	tr("Tax &Authorities..."),	SLOT(sTaxAuthorities()),	taxMenu,	(_privileges->check("MaintainTaxAuthorities") || _privileges->check("ViewTaxAuthorities")), NULL, NULL, true, NULL },
    { "gl.taxCodes",		tr("Tax &Codes..."),		SLOT(sTaxCodes()),		taxMenu,	(_privileges->check("MaintainTaxCodes") || _privileges->check("ViewTaxCodes")), NULL, NULL, true, NULL },
    { "gl.taxTypes",		tr("Tax &Types..."),		SLOT(sTaxTypes()),		taxMenu,	(_privileges->check("MaintainTaxTypes") || _privileges->check("ViewTaxTypes")), NULL, NULL, true, NULL },
    { "gl.taxSelections",	tr("Tax Se&lections..."),	SLOT(sTaxSelections()),		taxMenu,	(_privileges->check("MaintainTaxSel") || _privileges->check("ViewTaxSel")), NULL, NULL, true, NULL },
    { "gl.taxRegistatrions",	tr("Tax &Registrations..."),	SLOT(sTaxRegistrations()),	taxMenu,	_privileges->check("MaintainChartOfAccounts"),   NULL, NULL, true, NULL },
    
    { "separator",		  NULL,					NULL,					mainMenu,		true,					       NULL, NULL, true, NULL },
   
    // Accounting | Master Information
    { "menu",			tr("&Master Information"),	(char*)masterInfoMenu,		mainMenu,	true,						NULL, NULL, true, NULL },
    { "gl.postTransactionsToExternalAccountingSystem", tr("Post Transactions to External Accounting System..."), SLOT(sPostTransactionsToExternal()), utilitiesMenu, _privileges->check("ViewGLTransactions"), NULL, NULL, _metrics->boolean("EnableExternalAccountingInterface") , NULL },                             
    { "ap.terms", tr("Ter&ms..."), SLOT(sTerms()), masterInfoMenu, (_privileges->check("MaintainTerms") || _privileges->check("ViewTerms")), NULL, NULL, true , NULL },
    { "separator",			NULL,					NULL,				masterInfoMenu,	true,	NULL, NULL, true , NULL },
    { "ap.bankAccounts", tr("&Bank Accounts..."), SLOT(sBankAccounts()), masterInfoMenu, (_privileges->check("MaintainBankAccounts") || _privileges->check("ViewBankAccounts")), NULL, NULL, true , NULL },
    { "ap.checkFormats", tr("&Check Formats..."), SLOT(sCheckFormats()), masterInfoMenu, (_privileges->check("MaintainCheckFormats") || _privileges->check("ViewCheckFormats")), NULL, NULL, true , NULL },
    { "ap.costCategories", tr("C&ost Categories..."), SLOT(sCostCategories()), masterInfoMenu, (_privileges->check("MaintainCostCategories")) || (_privileges->check("ViewCostCategories")), NULL, NULL, true , NULL },
    { "ap.expenseCategories", tr("&Expense Categories..."), SLOT(sExpenseCategories()), masterInfoMenu, (_privileges->check("MaintainExpenseCategories")) || (_privileges->check("ViewExpenseCategories")), NULL, NULL, true , NULL },
    { "ap.apAccountAssignments", tr("A/&P Account Assignments..."), SLOT(sAPAssignments()), masterInfoMenu, (_privileges->check("MaintainVendorAccounts") || _privileges->check("ViewVendorAccounts")), NULL, NULL, true , NULL },
    { "separator",		  NULL,					NULL,					masterInfoMenu,		true,					       NULL, NULL, true, NULL },
    { "ar.customerTypes", tr("Customer &Types..."), SLOT(sCustomerTypes()), masterInfoMenu, (_privileges->check("MaintainCustomerTypes") || _privileges->check("ViewCustomerTypes")), NULL, NULL, true , NULL },
    { "ar.vendorTypes", tr("&Vendor Types..."), SLOT(sVendorTypes()), masterInfoMenu, (_privileges->check("MaintainVendorTypes")) || (_privileges->check("ViewVendorTypes")), NULL, NULL, true , NULL },
    { "ar.salesCategories", tr("&Sales Categories..."), SLOT(sSalesCategories()), masterInfoMenu, (_privileges->check("MaintainSalesCategories")) || (_privileges->check("ViewSalesCategories")), NULL, NULL, true , NULL },
    { "ar.arAccountAssignments", tr("A/R Account Assi&gnments..."), SLOT(sARAccountAssignments()), masterInfoMenu, (_privileges->check("MaintainSalesAccount") || _privileges->check("ViewSalesAccount")), NULL, NULL, true , NULL },
    { "ar.reasonCodes", tr("&Reason Codes..."), SLOT(sReasonCodes()), masterInfoMenu, _privileges->check("MaintainReasonCodes"), NULL, NULL, true , NULL },
    { "separator",		  NULL,					NULL,					masterInfoMenu,		true,					       NULL, NULL, true, NULL },
    { "gl.adjustmentTypes",	tr("&Adjustment Types..."),	SLOT(sAdjustmentTypes()),	masterInfoMenu,	(_privileges->check("MaintainAdjustmentTypes") || _privileges->check("ViewAdjustmentTypes")),	NULL, NULL, true, NULL },

    // Accounting | Utilities
    { "menu",				tr("&Utilities"),			(char*)utilitiesMenu,		mainMenu,	true,	NULL, NULL, true, NULL },
    { "gl.forwardUpdateAccounts",	tr("&Forward Update Accounts..."),	SLOT(sForwardUpdateAccounts()),	utilitiesMenu,	_privileges->check("ViewTrialBalances"),	NULL, NULL, true, NULL },
    { "gl.duplicateAccountNumbers",      tr("&Duplicate Account Numbers..."),  SLOT(sDuplicateAccountNumbers()), utilitiesMenu,  _privileges->check("MaintainChartOfAccounts"), NULL, NULL, true, NULL },
    { "separator",		  NULL,					NULL,					utilitiesMenu,		true,					       NULL, NULL, true, NULL },
    { "so.purgeInvoices", tr("Purge &Invoices..."), SLOT(sPurgeInvoices()), utilitiesMenu, _privileges->check("PurgeInvoices"), NULL, NULL, true , NULL },
    { "ar.updateLateCustCreditStatus", tr("&Update Late Customer Credit Status..."), SLOT(sUpdateLateCustCreditStatus()), utilitiesMenu, _privileges->check("UpdateCustomerCreditStatus"), NULL, NULL, _metrics->boolean("AutoCreditWarnLateCustomers"), NULL },
    { "ar.createRecurringInvoices", tr("&Create Recurring Invoices..."), SLOT(sCreateRecurringInvoices()), utilitiesMenu, _privileges->check("MaintainMiscInvoices"), NULL, NULL, true, NULL },
    { "separator",		  NULL,					NULL,					utilitiesMenu,		true,					       NULL, NULL, _metrics->boolean("MultiCompanyFinancialConsolidation"), NULL },
    { "gl.syncCompanies",           tr("&Synchronize Companies"),        SLOT(sSyncCompanies()),           utilitiesMenu, syncCompanies::userHasPriv(), NULL, NULL, _metrics->boolean("MultiCompanyFinancialConsolidation"), NULL },
  };

  addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0]));
  
  parent->populateCustomMenu(mainMenu, "Accounting");
  parent->menuBar()->insertItem(tr("&Accounting"), mainMenu);
}
Пример #2
0
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);
}