dspSummarizedSales::dspSummarizedSales(QWidget* parent, const char*, Qt::WFlags fl) : display(parent, "dspSummarizedSales", fl) { setupUi(optionsWidget()); setWindowTitle(tr("Summarized Sales")); setReportName("SummarizedSalesHistory"); setMetaSQLOptions("summarizedSalesHistory", "detail"); setParameterWidgetVisible(true); parameterWidget()->append(tr("Invoice Start Date"), "startDate", ParameterWidget::Date, QDate::currentDate()); parameterWidget()->append(tr("Invoice End Date"), "endDate", ParameterWidget::Date, QDate::currentDate()); parameterWidget()->append(tr("Ship Start Date"), "shipStartDate", ParameterWidget::Date); parameterWidget()->append(tr("Ship End Date"), "shipEndDate", ParameterWidget::Date); parameterWidget()->appendComboBox(tr("Currency"), "curr_id", XComboBox::Currencies); parameterWidget()->append(tr("Currency Pattern"), "currConcat_pattern", ParameterWidget::Text); parameterWidget()->append(tr("Customer"), "cust_id", ParameterWidget::Customer); parameterWidget()->append(tr("Customer Ship-to"), "shipto_id", ParameterWidget::Shipto); parameterWidget()->appendComboBox(tr("Customer Group"), "custgrp_id", XComboBox::CustomerGroups); parameterWidget()->append(tr("Customer Group Pattern"), "custgrp_pattern", ParameterWidget::Text); parameterWidget()->appendComboBox(tr("Customer Type"), "custtype_id", XComboBox::CustomerTypes); parameterWidget()->append(tr("Customer Type Pattern"), "custtype_pattern", ParameterWidget::Text); parameterWidget()->append(tr("Item"), "item_id", ParameterWidget::Item); parameterWidget()->appendComboBox(tr("Product Category"), "prodcat_id", XComboBox::ProductCategories); parameterWidget()->append(tr("Product Category Pattern"), "prodcat_pattern", ParameterWidget::Text); parameterWidget()->appendComboBox(tr("Sales Rep."), "salesrep_id", XComboBox::SalesReps); if (_metrics->boolean("MultiWhs")) parameterWidget()->append(tr("Site"), "warehous_id", ParameterWidget::Site); parameterWidget()->applyDefaultFilterSet(); _units->append(0,tr("Base")); _units->append(1,tr("Local")); if (!_metrics->boolean("MultiWhs")) { _site->setForgetful(true); _site->setChecked(false); _site->setVisible(false); } if (omfgThis->singleCurrency()) { _unitsLit->hide(); _units->hide(); } _units->setId(xtsettingsValue("dspSummarizedSales/units").toInt()); connect(_cust, SIGNAL(toggled(bool)), this, SLOT(sGroupByChanged())); connect(_custtype, SIGNAL(toggled(bool)), this, SLOT(sGroupByChanged())); connect(_item, SIGNAL(toggled(bool)), this, SLOT(sGroupByChanged())); connect(_site, SIGNAL(toggled(bool)), this, SLOT(sGroupByChanged())); connect(_shipzone, SIGNAL(toggled(bool)), this, SLOT(sGroupByChanged())); connect(_salesrep, SIGNAL(toggled(bool)), this, SLOT(sGroupByChanged())); connect(_units, SIGNAL(currentIndexChanged(int)), this, SLOT(sGroupByChanged())); sGroupByChanged(); }
dspTimePhasedSales::dspTimePhasedSales(QWidget* parent, const char*, Qt::WFlags fl) : displayTimePhased(parent, "dspTimePhasedSales", fl) { setupUi(optionsWidget()); setWindowTitle(tr("Time-Phased Sales History")); setReportName("TimePhasedSalesHistory"); setMetaSQLOptions("timePhasedSales", "detail"); setUseAltId(true); setParameterWidgetVisible(true); parameterWidget()->append(tr("Customer"), "cust_id", ParameterWidget::Customer); parameterWidget()->appendComboBox(tr("Customer Group"), "custgrp_id", XComboBox::CustomerGroups); parameterWidget()->append(tr("Customer Group Pattern"), "custgrp_pattern", ParameterWidget::Text); parameterWidget()->appendComboBox(tr("Customer Type"), "custtype_id", XComboBox::CustomerTypes); parameterWidget()->append(tr("Customer Type Pattern"), "custtype_pattern", ParameterWidget::Text); parameterWidget()->append(tr("Item"), "item_id", ParameterWidget::Item); parameterWidget()->appendComboBox(tr("Product Category"), "prodcat_id", XComboBox::ProductCategories); parameterWidget()->append(tr("Product Category Pattern"), "prodcat_pattern", ParameterWidget::Text); if (_metrics->boolean("MultiWhs")) parameterWidget()->append(tr("Site"), "warehous_id", ParameterWidget::Site); parameterWidget()->applyDefaultFilterSet(); _groupBy->append(0,tr("Customer")); _groupBy->append(1,tr("Product Category")); _groupBy->append(2,tr("Item")); _units->append(0, tr("Sales Dollars")); _units->append(1, tr("Inventory")); _units->append(2,tr("Capacity")); _units->append(3, tr("Alt. Capacity")); connect(_groupBy, SIGNAL(newID(int)), this, SLOT(sGroupByChanged())); sGroupByChanged(); }