dspBriefSalesHistoryBySalesRep::dspBriefSalesHistoryBySalesRep(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); // signals and slots connections connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_query, SIGNAL(clicked()), this, SLOT(sFillList())); connect(_sohist, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*))); connect(_showPrices, SIGNAL(toggled(bool)), this, SLOT(sHandleParams())); connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleParams())); _salesrep->setType(XComboBox::SalesRepsActive); _productCategory->setType(ProductCategory); _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), TRUE); _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), TRUE); _sohist->addColumn(tr("Customer"), -1, Qt::AlignLeft ); _sohist->addColumn(tr("S/O #"), _orderColumn, Qt::AlignRight ); _sohist->addColumn(tr("Invoice #"), _orderColumn, Qt::AlignRight ); _sohist->addColumn(tr("Ord. Date"), _dateColumn, Qt::AlignCenter ); _sohist->addColumn(tr("Invc. Date"), _dateColumn, Qt::AlignCenter ); _sohist->addColumn( tr("Ext. Price"), _moneyColumn, Qt::AlignRight ); _sohist->addColumn( tr("Ext. Cost"), _costColumn, Qt::AlignRight ); _showCosts->setEnabled(_privileges->check("ViewCosts")); _showPrices->setEnabled(_privileges->check("ViewCustomerPrices")); sHandleParams(); _salesrep->setFocus(); }
/* * Constructs a dspSalesHistoryBySalesrep as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ dspSalesHistoryBySalesrep::dspSalesHistoryBySalesrep(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); // (void)statusBar(); // signals and slots connections connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_query, SIGNAL(clicked()), this, SLOT(sFillList())); connect(_sohist, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*))); connect(_showPrices, SIGNAL(toggled(bool)), this, SLOT(sHandleParams())); connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleParams())); _salesrep->setType(XComboBox::SalesRepsActive); _productCategory->setType(ParameterGroup::ProductCategory); _sohist->addColumn(tr("Customer"), -1, Qt::AlignLeft, true, "cust_name" ); _sohist->addColumn(tr("S/O #"), _orderColumn, Qt::AlignLeft, true, "cohist_ordernumber" ); _sohist->addColumn(tr("Invoice #"), _orderColumn, Qt::AlignLeft, true, "invoicenumber" ); _sohist->addColumn(tr("Ord. Date"), _dateColumn, Qt::AlignCenter, true, "cohist_orderdate"); _sohist->addColumn(tr("Invc. Date"), _dateColumn, Qt::AlignCenter, true, "cohist_invcdate"); _sohist->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft, true, "item_number" ); _sohist->addColumn(tr("Shipped"), _qtyColumn, Qt::AlignRight, true, "cohist_qtyshipped" ); if (_privileges->check("ViewCustomerPrices")) { _sohist->addColumn(tr("Unit Price"), _priceColumn, Qt::AlignRight, true, "cohist_unitprice" ); _sohist->addColumn(tr("Ext. Price"), _bigMoneyColumn, Qt::AlignRight, true, "extprice" ); _sohist->addColumn(tr("Currency"), _currencyColumn, Qt::AlignRight, true, "currAbbr" ); _sohist->addColumn(tr("Base Unit Price"), _bigMoneyColumn, Qt::AlignRight, true, "baseunitprice" ); _sohist->addColumn(tr("Base Ext. Price"), _bigMoneyColumn, Qt::AlignRight, true, "baseextprice" ); } if (_privileges->check("ViewCosts")) { _sohist->addColumn(tr("Unit Cost"), _costColumn, Qt::AlignRight, true, "cohist_unitcost" ); _sohist->addColumn(tr("Ext. Cost"), _bigMoneyColumn, Qt::AlignRight, true, "extcost" ); } _showCosts->setEnabled(_privileges->check("ViewCosts")); _showPrices->setEnabled(_privileges->check("ViewCustomerPrices")); sHandleParams(); _salesrep->setFocus(); }
dspSalesHistoryBySalesrep::dspSalesHistoryBySalesrep(QWidget* parent, const char*, Qt::WFlags fl) : display(parent, "dspSalesHistoryBySalesrep", fl) { setupUi(optionsWidget()); setWindowTitle(tr("Sales History by Sales Rep.")); setListLabel(tr("Sales History")); setReportName("SalesHistoryBySalesRep"); setMetaSQLOptions("salesHistory", "detail"); connect(_showPrices, SIGNAL(toggled(bool)), this, SLOT(sHandleParams())); connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleParams())); _salesrep->setType(XComboBox::SalesRepsActive); _productCategory->setType(ParameterGroup::ProductCategory); list()->addColumn(tr("Customer"), -1, Qt::AlignLeft, true, "cust_name" ); list()->addColumn(tr("Doc. #"), _orderColumn, Qt::AlignLeft, true, "cohist_ordernumber" ); list()->addColumn(tr("Invoice #"), _orderColumn, Qt::AlignLeft, true, "invoicenumber" ); list()->addColumn(tr("Ord. Date"), _dateColumn, Qt::AlignCenter, true, "cohist_orderdate"); list()->addColumn(tr("Invc. Date"), _dateColumn, Qt::AlignCenter, true, "cohist_invcdate"); list()->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft, true, "item_number" ); list()->addColumn(tr("Shipped"), _qtyColumn, Qt::AlignRight, true, "cohist_qtyshipped" ); if (_privileges->check("ViewCustomerPrices")) { list()->addColumn(tr("Unit Price"), _priceColumn, Qt::AlignRight, true, "cohist_unitprice" ); list()->addColumn(tr("Ext. Price"), _bigMoneyColumn, Qt::AlignRight, true, "extprice" ); list()->addColumn(tr("Currency"), _currencyColumn, Qt::AlignRight, true, "currAbbr" ); list()->addColumn(tr("Base Unit Price"), _bigMoneyColumn, Qt::AlignRight, true, "baseunitprice" ); list()->addColumn(tr("Base Ext. Price"), _bigMoneyColumn, Qt::AlignRight, true, "baseextprice" ); } if (_privileges->check("ViewCosts")) { list()->addColumn(tr("Unit Cost"), _costColumn, Qt::AlignRight, true, "cohist_unitcost" ); list()->addColumn(tr("Ext. Cost"), _bigMoneyColumn, Qt::AlignRight, true, "extcost" ); } _showCosts->setEnabled(_privileges->check("ViewCosts")); _showPrices->setEnabled(_privileges->check("ViewCustomerPrices")); sHandleParams(); _salesrep->setFocus(); }
/* * Constructs a dspSalesHistoryByShipTo as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ dspSalesHistoryByShipTo::dspSalesHistoryByShipTo(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); // signals and slots connections connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_cust, SIGNAL(newId(int)), _shipTo, SLOT(setCustid(int))); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_query, SIGNAL(clicked()), this, SLOT(sFillList())); connect(_sohist, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*))); connect(_showPrices, SIGNAL(toggled(bool)), this, SLOT(sHandleParams())); connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleParams())); _productCategory->setType(ProductCategory); _sohist->addColumn(tr("S/O #"), _orderColumn, Qt::AlignLeft ); _sohist->addColumn(tr("Invoice #"), _orderColumn, Qt::AlignLeft ); _sohist->addColumn(tr("Ord. Date"), _dateColumn, Qt::AlignCenter ); _sohist->addColumn(tr("Invc. Date"), _dateColumn, Qt::AlignCenter ); _sohist->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft ); _sohist->addColumn(tr("Description"), -1, Qt::AlignLeft ); _sohist->addColumn(tr("Shipped"), _qtyColumn, Qt::AlignRight ); if (_privileges->check("ViewCustomerPrices")) { _sohist->addColumn(tr("Unit Price"), _priceColumn, Qt::AlignRight ); _sohist->addColumn(tr("Ext. Price"), _bigMoneyColumn, Qt::AlignRight ); } if (_privileges->check("ViewCosts")) { _sohist->addColumn(tr("Unit Cost"), _costColumn, Qt::AlignRight ); _sohist->addColumn(tr("Ext. Cost"), _bigMoneyColumn, Qt::AlignRight ); } _showCosts->setEnabled(_privileges->check("ViewCosts")); _showPrices->setEnabled(_privileges->check("ViewCustomerPrices")); sHandleParams(); _cust->setFocus(); }