dspInvoiceRegister::dspInvoiceRegister(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspInvoiceRegister", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Invoice Register"));
  setListLabel(tr("Transactions"));
  setReportName("InvoiceRegister");
  setMetaSQLOptions("invoiceRegister", "detail");
  setUseAltId(true);

  list()->addColumn(tr("Date"),     _dateColumn, Qt::AlignCenter,true, "transdate");
  list()->addColumn(tr("Source"),  _orderColumn, Qt::AlignCenter,true, "gltrans_source");
  list()->addColumn(tr("Doc Type"),_orderColumn, Qt::AlignLeft,  true, "doctype");
  list()->addColumn(tr("Doc. #"),  _orderColumn, Qt::AlignCenter,true, "gltrans_docnumber");
  list()->addColumn(tr("Reference"),         -1, Qt::AlignLeft,  true, "notes");
  list()->addColumn(tr("Account"),  _itemColumn, Qt::AlignLeft,  true, "account");
  list()->addColumn(tr("Debit"),   _moneyColumn, Qt::AlignRight, true, "debit");
  list()->addColumn(tr("Credit"),  _moneyColumn, Qt::AlignRight, true, "credit");
  list()->setPopulateLinear();
}
dspExpediteExceptionsByPlannerCode::dspExpediteExceptionsByPlannerCode(QWidget* parent, const char*, Qt::WFlags fl)
    : display(parent, "dspExpediteExceptionsByPlannerCode", fl)
{
    setupUi(optionsWidget());
    setWindowTitle(tr("Expedite Exceptions by Planner Code"));
    setListLabel(tr("Expedite Exceptions"));
    setReportName("ExpediteExceptionsByPlannerCode");
    setMetaSQLOptions("schedule", "expedite");
    setUseAltId(true);

    _plannerCode->setType(ParameterGroup::PlannerCode);

    list()->addColumn(tr("Order Type/#"),   _itemColumn, Qt::AlignCenter,true, "order_number");
    list()->addColumn(tr("To Site"),        _whsColumn,  Qt::AlignCenter,true, "to_warehous");
    list()->addColumn(tr("From Site"),      _whsColumn,  Qt::AlignCenter,true, "from_warehous");
    list()->addColumn(tr("Item Number"),    _itemColumn, Qt::AlignLeft,  true, "item_number");
    list()->addColumn(tr("Descriptions"),   -1,          Qt::AlignLeft,  true, "item_descrip");
    list()->addColumn(tr("Start/Due Date"), _itemColumn, Qt::AlignLeft,  true, "keydate");
    list()->addColumn(tr("Exception"),      120,         Qt::AlignLeft,  true, "exception");
}
Esempio n. 3
0
dspPOsByVendor::dspPOsByVendor(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPOsByVendor", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Purchase Orders by Vendor"));
  setListLabel(tr("Purchase Orders"));
  setReportName("POsByVendor");
  setMetaSQLOptions("purchaseOrders", "detail");

  list()->addColumn(tr("P/O #"),       _orderColumn, Qt::AlignRight,  true,  "pohead_number"  );
  list()->addColumn(tr("Site"),        _whsColumn,   Qt::AlignCenter, true,  "warehousecode" );
  list()->addColumn(tr("Status"),      _dateColumn,  Qt::AlignCenter, true,  "poitem_status" );
  list()->addColumn(tr("Vendor"),      -1,           Qt::AlignLeft,   true,  "vend_number"   );
  list()->addColumn(tr("Date"),        _dateColumn,  Qt::AlignCenter, true,  "sortDate" );

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"),     omfgThis->endOfTime(),   true);

  _descrip->setEnabled(_searchDescrip->isChecked());
}
Esempio n. 4
0
dspPlannedOrders::dspPlannedOrders(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPlannedOrders", fl)
{
  setWindowTitle(tr("Planned Orders"));
  setReportName("PlannedOrders");
  setMetaSQLOptions("schedule", "plannedorders");
  setUseAltId(true);
  setParameterWidgetVisible(true);
  setSearchVisible(true);
  setQueryOnStartEnabled(true);

  QString qryType = QString( "SELECT  'P', '%1' UNION "
                             "SELECT  'W', '%2'")
      .arg(tr("Purchase"))
      .arg(tr("Manufacture"));

  if (_metrics->boolean("MultiWhs"))
    qryType.append(QString( " UNION "
                            "SELECT  'T', '%1'")
                   .arg(tr("Transfers")));

  parameterWidget()->append(tr("Item"), "item_id", ParameterWidget::Item);
  parameterWidget()->append(tr("Order Types"), "type_list", ParameterWidget::Multiselect, QVariant(), false, qryType );
  parameterWidget()->appendComboBox(tr("Planner Code"), "plancode_id", XComboBox::PlannerCodes);
  parameterWidget()->append(tr("Planner Code Pattern"), "plancode_pattern", ParameterWidget::Text);
  parameterWidget()->append(tr("Show Inactive"), "showInactive", ParameterWidget::Exists);
  if (_metrics->boolean("MultiWhs"))
    parameterWidget()->append(tr("Site"), "warehous_id", ParameterWidget::Site);

  list()->addColumn(tr("Order #"),     _orderColumn, Qt::AlignLeft,  true, "ordernum");
  list()->addColumn(tr("Type"),        _uomColumn,   Qt::AlignCenter,true, "ordtype");
  list()->addColumn(tr("Site"),        _whsColumn,   Qt::AlignCenter,true, "warehous_code");
  list()->addColumn(tr("From Site"),   _whsColumn,   Qt::AlignCenter,true, "supply_warehous_code");
  list()->addColumn(tr("Item Number"), _itemColumn,  Qt::AlignLeft,  true, "item_number");
  list()->addColumn(tr("Description"), -1,           Qt::AlignLeft,  true, "item_descrip");
  list()->addColumn(tr("UOM"),          _uomColumn,  Qt::AlignCenter,true, "uom_name");
  list()->addColumn(tr("Start Date"),  _dateColumn,  Qt::AlignCenter,true, "planord_startdate");
  list()->addColumn(tr("Due Date"),    _dateColumn,  Qt::AlignCenter,true, "planord_duedate");
  list()->addColumn(tr("Qty"),         _qtyColumn,   Qt::AlignRight, true, "planord_qty");
  list()->addColumn(tr("Firm"),        _ynColumn,    Qt::AlignCenter,true, "planord_firm");
}
dspRunningAvailability::dspRunningAvailability(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspRunningAvailability", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Running Availability"));
  setListLabel(tr("Running Availability"));
  setReportName("RunningAvailability");
  setMetaSQLOptions("runningAvailability", "detail");
  setUseAltId(true);

  _ready = true;

  connect(list(),       SIGNAL(populated()), this, SLOT(sHandleResort()));
  connect(list(),       SIGNAL(resorted()), this, SLOT(sHandleResort()));

  list()->addColumn(tr("Order Type"),             _itemColumn,  Qt::AlignLeft,  true, "ordertype");
  list()->addColumn(tr("Order #"),                _itemColumn,  Qt::AlignLeft,  true, "ordernumber");
  list()->addColumn(tr("Source/Destination"),     -1,           Qt::AlignLeft,  true, "item_number");
  list()->addColumn(tr("Due Date"),               _dateColumn,  Qt::AlignLeft,  true, "duedate");
  list()->addColumn(tr("Amount"),                 _moneyColumn, Qt::AlignRight, true, "amount");
  list()->addColumn(tr("Ordered"),                _qtyColumn,   Qt::AlignRight, true, "qtyordered");
  list()->addColumn(tr("Received"),               _qtyColumn,   Qt::AlignRight, true, "qtyreceived");
  list()->addColumn(tr("Balance"),                _qtyColumn,   Qt::AlignRight, true, "balance");
  list()->addColumn(tr("Running Avail."),         _qtyColumn,   Qt::AlignRight, true, "runningavail");
  list()->addColumn(tr("Running Netable"),        _qtyColumn,   Qt::AlignRight, true, "runningnetable");
  list()->addColumn(tr("Notes"),                  _itemColumn,  Qt::AlignLeft,  true, "notes");

  _qoh->setValidator(omfgThis->qtyVal());
  _netableqoh->setValidator(omfgThis->qtyVal());
  _reorderLevel->setValidator(omfgThis->qtyVal());
  _orderMultiple->setValidator(omfgThis->qtyVal());
  _orderToQty->setValidator(omfgThis->qtyVal());

  connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), this, SLOT(sFillList()));

  if (!_metrics->boolean("MultiWhs"))
  {
    _warehouseLit->hide();
    _warehouse->hide();
  }
}
Esempio n. 6
0
dspCustomersByCustomerType::dspCustomersByCustomerType(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspCustomersByCustomerType", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Customers by Customer Type"));
  setListLabel(tr("Customers"));
  setReportName("CustomersByCustomerType");
  setMetaSQLOptions("customer", "detail");
  setAutoUpdateEnabled(true);

  _customerType->setType(ParameterGroup::CustomerType);

  list()->addColumn(tr("Type"),    _itemColumn, Qt::AlignLeft, true, "custtype_code");
  list()->addColumn(tr("Active"),  _ynColumn,   Qt::AlignLeft,  true, "cust_active");
  list()->addColumn(tr("Number"),  _itemColumn, Qt::AlignLeft, true, "cust_number");
  list()->addColumn(tr("Name"),    200,         Qt::AlignLeft, true, "cust_name");
  list()->addColumn(tr("Address"), -1,          Qt::AlignLeft, true, "cust_address1");
  list()->setDragString("custid=");

  connect(omfgThis, SIGNAL(customersUpdated(int, bool)), SLOT(sFillList()));
}
dspDepositsRegister::dspDepositsRegister(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspDepositsRegister", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Deposits Register"));
  setListLabel(tr("Transactions"));
  setReportName("DepositsRegister");
  setMetaSQLOptions("depositesRegister", "detail");

  list()->addColumn(tr("Date"),             _dateColumn,    Qt::AlignCenter, true,  "trans_date" );
  list()->addColumn(tr("Source"),           _orderColumn,   Qt::AlignCenter, true,  "trans_source" );
  list()->addColumn(tr("Doc Type"),         _orderColumn,   Qt::AlignLeft,   true,  "doctype"   );
  list()->addColumn(tr("Doc. #"),           _orderColumn,   Qt::AlignCenter, true,  "trans_docnumber" );
  list()->addColumn(tr("Reference"),        -1,             Qt::AlignLeft,   true,  "f_notes"   );
  list()->addColumn(tr("Account"),          _itemColumn,    Qt::AlignLeft,   true,  "f_accnt"   );
  list()->addColumn(tr("Amount Rcv'd"),     _moneyColumn,   Qt::AlignRight,  true,  "debit"  );
  list()->addColumn(tr("Credit to A/R"),    _moneyColumn,   Qt::AlignRight,  true,  "credit"  );
  list()->addColumn(tr("Balance"),          _moneyColumn,   Qt::AlignRight,  true,  "balance"  );
  list()->addColumn(tr("Currency"),      _currencyColumn,    Qt::AlignCenter, true,  "currAbbr"  );
  list()->addColumn(tr("Base Balance"),  _bigMoneyColumn,   Qt::AlignRight,  true, "base_balance"  );
}
Esempio n. 8
0
dspPoHistory::dspPoHistory(QWidget* parent, const char*, Qt::WFlags fl)
    : display(parent, "dspPoHistory", fl)
{
    setupUi(optionsWidget());
    setWindowTitle(tr("Purchase Order History"));
    setListLabel(tr("P/O Items"));
    setReportName("POHistory");
    setMetaSQLOptions("poHistory", "detail");
    setUseAltId(true);

    list()->addColumn(tr("#"),            _whsColumn,  Qt::AlignCenter, true, "poitem_linenumber");
    list()->addColumn(tr("Item/Doc. #"),  _itemColumn, Qt::AlignLeft,   true, "itemnumber");
    list()->addColumn(tr("Description"),  -1,          Qt::AlignLeft,   true, "itemdescription");
    list()->addColumn(tr("UOM"),          _uomColumn,  Qt::AlignCenter, true, "uomname");
    list()->addColumn(tr("Due/Recvd."),   _dateColumn, Qt::AlignCenter, true, "poitem_duedate");
    list()->addColumn(tr("Vend. Item #"), -1,          Qt::AlignLeft,   true, "poitem_vend_item_number");
    list()->addColumn(tr("UOM"),          _uomColumn,  Qt::AlignCenter, true, "poitem_vend_uom");
    list()->addColumn(tr("Ordered"),      _qtyColumn,  Qt::AlignRight,  true, "poitem_qty_ordered");
    list()->addColumn(tr("Received"),     _qtyColumn,  Qt::AlignRight,  true, "poitem_qty_received");
    list()->addColumn(tr("Returned"),     _qtyColumn,  Qt::AlignRight,  true, "poitem_qty_returned");
}
dspPurchaseReqsByItem::dspPurchaseReqsByItem(QWidget* parent, const char*, Qt::WFlags fl)
    : display(parent, "dspPurchaseReqsByItem", fl)
{
    setupUi(optionsWidget());
    setWindowTitle(tr("Purchase Requests by Item"));
    setListLabel(tr("Purchase Requests"));
    setReportName("PurchaseRequestsByItem");
    setMetaSQLOptions("purchase", "purchaserequests");
    setUseAltId(true);

    list()->addColumn(tr("P/R #"),        _orderColumn,  Qt::AlignLeft,   true,  "pr_number");
    list()->addColumn(tr("Sub #"),        _orderColumn,  Qt::AlignLeft,   true,  "pr_subnumber");
    list()->addColumn(tr("Status"),       _statusColumn, Qt::AlignCenter, true,  "pr_status" );
    list()->addColumn(tr("Parent Order"), -1,            Qt::AlignLeft,   true,  "parent"   );
    list()->addColumn(tr("Create Date"),        -1,    Qt::AlignLeft,  true,  "pr_createdate"  );
    list()->addColumn(tr("Due Date"),     _dateColumn,   Qt::AlignCenter, true,  "pr_duedate" );
    list()->addColumn(tr("Qty."),         _qtyColumn,    Qt::AlignRight,  true,  "pr_qtyreq"  );
    list()->addColumn(tr("Notes"),        -1,    Qt::AlignLeft,  true,  "pr_releasenote"  );

    connect(omfgThis, SIGNAL(purchaseRequestsUpdated()), this, SLOT(sFillList()));
}
Esempio n. 10
0
dspSummarizedSalesByCustomerType::dspSummarizedSalesByCustomerType(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspSummarizedSalesByCustomerType", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Summarized Sales by Customer Type"));
  setListLabel(tr("Sales History"));
  setReportName("SummarizedSalesByCustomerType");
  setMetaSQLOptions("summarizedSalesHistory", "detail");

  _customerType->setType(ParameterGroup::CustomerType);

  list()->addColumn(tr("Customer Type"),    -1,              Qt::AlignLeft,   true,  "custtype_code"   );
  list()->addColumn(tr("Site"),             _whsColumn,      Qt::AlignCenter, true,  "warehous_code" );
  list()->addColumn(tr("Min. Price"),       _priceColumn,    Qt::AlignRight,  true,  "minprice"  );
  list()->addColumn(tr("Max. Price"),       _priceColumn,    Qt::AlignRight,  true,  "maxprice"  );
  list()->addColumn(tr("Avg. Price"),       _priceColumn,    Qt::AlignRight,  true,  "avgprice"  );
  list()->addColumn(tr("Wt. Avg. Price"),   _priceColumn,    Qt::AlignRight,  true,  "wtavgprice"  );
  list()->addColumn(tr("Total Units"),      _qtyColumn,      Qt::AlignRight,  true,  "totalunits"  );
  list()->addColumn(tr("Total Sales"),      _bigMoneyColumn, Qt::AlignRight,  true,  "totalsales"  );
  list()->setDragString("custtypeid=");
}
Esempio n. 11
0
dspBookings::dspBookings(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspBookings", fl)
{
  setWindowTitle(tr("Bookings"));
  setReportName("Bookings");
  setMetaSQLOptions("bookings", "detail");
  setParameterWidgetVisible(true);
  setUseAltId(true);

  parameterWidget()->append(tr("Start Date"), "startDate", ParameterWidget::Date, QDate::currentDate(), true  );
  parameterWidget()->append(tr("End Date"),   "endDate",   ParameterWidget::Date, QDate::currentDate(), true);
  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();

  list()->addColumn(tr("Order #"),          _orderColumn,    Qt::AlignLeft,   true,  "cohead_number"  );
  list()->addColumn(tr("Line #"),           _seqColumn,      Qt::AlignLeft,   true,  "f_linenumber"  );
  list()->addColumn(tr("Ord. Date"),        _dateColumn,     Qt::AlignCenter, true,  "cohead_orderdate");
  list()->addColumn(tr("Cust. #"),          _itemColumn,     Qt::AlignLeft,   true,  "cust_number"  );
  list()->addColumn(tr("Customer"),         -1,              Qt::AlignLeft,   false,  "cust_name"  );
  list()->addColumn(tr("Item Number"),      _itemColumn,     Qt::AlignLeft,   true,  "item_number"  );
  list()->addColumn(tr("Description"),      -1,              Qt::AlignLeft,   true,  "itemdescription"  );
  list()->addColumn(tr("Ordered"),          _qtyColumn,      Qt::AlignRight,  true,  "coitem_qtyord" );
  list()->addColumn(tr("Unit Price"),       _priceColumn,    Qt::AlignRight,  false,  "coitem_price" );
  list()->addColumn(tr("Ext. Price"),       _bigMoneyColumn, Qt::AlignRight,  false,  "extprice" );
  list()->addColumn(tr("Currency"),         _currencyColumn, Qt::AlignCenter, false,  "currAbbr" );
  list()->addColumn(tr("Base Unit Price"),  _priceColumn,    Qt::AlignRight,  true,  "baseunitprice" );
  list()->addColumn(tr("Base Ext. Price"),  _bigMoneyColumn, Qt::AlignRight,  true,  "baseextprice" );
}
Esempio n. 12
0
dspDetailedInventoryHistoryByLocation::dspDetailedInventoryHistoryByLocation(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspDetailedInventoryHistoryByLocation", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Detailed Inventory History by Location"));
  setListLabel(tr("Inventory History"));
  setReportName("DetailedInventoryHistoryByLocation");
  setMetaSQLOptions("detailedInventoryHistory", "detail");
  setUseAltId(true);

  connect(_location, SIGNAL(newID(int)), this, SLOT(sPopulateLocationInfo(int)));
  connect(_warehouse, SIGNAL(updated()), this, SLOT(sPopulateLocations()));

  _transType->append(cTransAll,       tr("All Transactions")       );
  _transType->append(cTransReceipts,  tr("Receipts")               );
  _transType->append(cTransIssues,    tr("Issues")                 );
  _transType->append(cTransShipments, tr("Shipments")              );
  _transType->append(cTransAdjCounts, tr("Adjustments and Counts") );
  
  if (_metrics->value("Application") != "PostBooks")
    _transType->append(cTransTransfers, tr("Transfers")            );
  
  _transType->append(cTransScraps,    tr("Scraps")                 );
  _transType->setCurrentIndex(0);

  list()->addColumn(tr("Date"), (_dateColumn + 30), Qt::AlignRight, true, "invhist_transdate");
  list()->addColumn(tr("Type"),       _transColumn, Qt::AlignCenter,true, "invhist_transtype");
  list()->addColumn(tr("Order #"),    _orderColumn, Qt::AlignLeft,  true, "ordernumber");
  list()->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft,  true, "item_number");
  list()->addColumn(tr("Lot/Serial #"), -1,         Qt::AlignLeft,  true, "lotserial");
  list()->addColumn(tr("UOM"),          _uomColumn, Qt::AlignCenter,true, "invhist_invuom");
  list()->addColumn(tr("Trans-Qty"),    _qtyColumn, Qt::AlignRight, true, "transqty");
  list()->addColumn(tr("Qty. Before"),  _qtyColumn, Qt::AlignRight, true, "qohbefore");
  list()->addColumn(tr("Qty. After"),   _qtyColumn, Qt::AlignRight, true, "qohafter");

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"),     omfgThis->endOfTime(),   true);
  
  sPopulateLocations();
}
dspTimePhasedOpenARItems::dspTimePhasedOpenARItems(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspTimePhasedOpenARItems", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Receivables Aging"));
  setReportName("ARAging");

  connect(_custom, SIGNAL(toggled(bool)), this, SLOT(sToggleCustom()));
  connect(_detailedReport, SIGNAL(clicked()), this, SLOT(sToggleReport()));
  connect(_summaryReport, SIGNAL(clicked()), this, SLOT(sToggleReport()));
  
  list()->addColumn(tr("Cust. #"),  _orderColumn, Qt::AlignLeft, true, "araging_cust_number" );
  list()->addColumn(tr("Customer"), -1,          Qt::AlignLeft, true, "araging_cust_name" );
  
  _asOf->setDate(omfgThis->dbDate(), true);
  sToggleCustom();

  if(_preferences->value("ARAgingDefaultDate") == "doc")
    _useDocDate->setChecked(true);
  else
    _useDistDate->setChecked(true);
}
dspSummarizedBankrecHistory::dspSummarizedBankrecHistory(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspSummarizedBankrecHistory", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Summarized Bank Reconciliation History"));
  setListLabel(tr("Summarized History"));
  setReportName("SummarizedBankrecHistory");
  setMetaSQLOptions("summarizedBankrecHistory", "detail");

  list()->addColumn(tr("Posted"),             _ynColumn, Qt::AlignLeft,   true,  "bankrec_posted"   );
  list()->addColumn(tr("Post Date"),        _dateColumn, Qt::AlignCenter, true,  "bankrec_postdate" );
  list()->addColumn(tr("User"),                      -1, Qt::AlignLeft,   true,  "bankrec_username"   );
  list()->addColumn(tr("Start Date"),       _dateColumn, Qt::AlignCenter, true,  "bankrec_opendate" );
  list()->addColumn(tr("End Date"),         _dateColumn, Qt::AlignCenter, true,  "bankrec_enddate" );
  list()->addColumn(tr("Opening Bal."), _bigMoneyColumn, Qt::AlignRight,  true,  "bankrec_openbal"  );
  list()->addColumn(tr("Ending Bal."),  _bigMoneyColumn, Qt::AlignRight,  true,  "bankrec_endbal"  );
  
  _bankaccnt->populate("SELECT bankaccnt_id,"
                       "       (bankaccnt_name || '-' || bankaccnt_descrip) "
                       "FROM bankaccnt "
                       "ORDER BY bankaccnt_name;");
}
Esempio n. 15
0
dspPlannedOrdersByItem::dspPlannedOrdersByItem(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPlannedOrdersByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Planned Orders by Item"));
  setListLabel(tr("Planned Orders"));
  setReportName("PlannedOrdersByItem");
  setMetaSQLOptions("schedule", "plannedorders");
  setUseAltId(true);

  list()->addColumn(tr("Order #"),    _orderColumn, Qt::AlignCenter,true, "ordernum");
  list()->addColumn(tr("Type"),       _uomColumn,   Qt::AlignCenter,true, "ordtype");
  list()->addColumn(tr("Site"),       _whsColumn,   Qt::AlignCenter,true, "warehous_code");
  list()->addColumn(tr("From Site"),  _whsColumn,   Qt::AlignCenter,true, "supply_warehous_code");
  list()->addColumn(tr("Start Date"), _dateColumn,  Qt::AlignCenter,true, "planord_startdate");
  list()->addColumn(tr("Due Date"),   _dateColumn,  Qt::AlignCenter,true, "planord_duedate");
  list()->addColumn(tr("Qty"),        _qtyColumn,   Qt::AlignRight, true, "planord_qty");
  list()->addColumn(tr("Firm"),       _uomColumn,   Qt::AlignCenter,true, "planord_firm");
  list()->addColumn(tr("Comments"),   -1,           Qt::AlignLeft,  true, "comments");

  connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), this, SLOT(sFillList()));
}
dspSingleLevelBOM::dspSingleLevelBOM(QWidget* parent, const char*, Qt::WFlags fl)
  : dspBOMBase(parent, "dspSingleLevelBOM", fl)
{
  setWindowTitle(tr("Single Level Bill of Materials"));
  setReportName("SingleLevelBOM");

  list()->addColumn(tr("#"),                   30,      Qt::AlignCenter,true, "bomitem_seqnumber" );
  list()->addColumn(tr("Item Number"),    _itemColumn,  Qt::AlignLeft,  true, "item_number"   );
  list()->addColumn(tr("Description"),         -1,      Qt::AlignLeft,  true, "itemdescription"   );
  list()->addColumn(tr("Issue UOM"),       _uomColumn,   Qt::AlignCenter,true, "issueuomname" );
  list()->addColumn(tr("Issue Fxd. Qty."),  _qtyColumn,  Qt::AlignRight, true, "bomitem_qtyfxd"  );
  list()->addColumn(tr("Issue Qty. Per"),  _qtyColumn,   Qt::AlignRight, true, "bomitem_qtyper"  );
  list()->addColumn(tr("Inv. UOM"),        _uomColumn,   Qt::AlignCenter,true, "invuomname" );
  list()->addColumn(tr("Inv. Fxd. Qty."),   _qtyColumn,  Qt::AlignRight, true, "invqtyfxd"  );
  list()->addColumn(tr("Inv. Qty. Per"),   _qtyColumn,   Qt::AlignRight, true, "invqtyper"  );
  list()->addColumn(tr("Scrap %"),        _prcntColumn, Qt::AlignRight, true, "bomitem_scrap"  );
  list()->addColumn(tr("Effective"),      _dateColumn,  Qt::AlignCenter,true, "bomitem_effective" );
  list()->addColumn(tr("Expires"),        _dateColumn,  Qt::AlignCenter,true, "bomitem_expires" );
  list()->addColumn(tr("ECN #"),          _itemColumn,  Qt::AlignLeft,  true, "bomitem_ecn"   );
  list()->addColumn(tr("Notes"),          _itemColumn,  Qt::AlignLeft,  false, "bomitem_notes"   );
  list()->addColumn(tr("Reference"),      _itemColumn,  Qt::AlignLeft,  false, "bomitem_ref"   );
}
dspFreightPricesByCustomer::dspFreightPricesByCustomer(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspFreightPricesByCustomer", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Freight Prices by Customer"));
  setListLabel(tr("Freight Prices"));
  setReportName("FreightPricesByCustomer");
  setMetaSQLOptions("freightPrices", "detail");
  setUseAltId(true);

  list()->addColumn(tr("Schedule"),      _itemColumn,     Qt::AlignLeft,   true,  "ipshead_name"  );
  list()->addColumn(tr("Source"),        _itemColumn,     Qt::AlignLeft,   true,  "source"  );
  list()->addColumn(tr("Qty. Break"),    _qtyColumn,      Qt::AlignRight,  true,  "ipsfreight_qtybreak" );
  list()->addColumn(tr("Price"),         _priceColumn,    Qt::AlignRight,  true,  "ipsfreight_price" );
  list()->addColumn(tr("Method"),        _itemColumn,     Qt::AlignLeft,   true,  "method"  );
  list()->addColumn(tr("Currency"),      _currencyColumn, Qt::AlignLeft,   true,  "currConcat");
  list()->addColumn(tr("From"),          _itemColumn,     Qt::AlignLeft,   true,  "warehous_code"  );
  list()->addColumn(tr("To"),            _itemColumn,     Qt::AlignLeft,   true,  "shipzone_name"  );
  list()->addColumn(tr("Freight Class"), _itemColumn,     Qt::AlignLeft,   true,  "freightclass_code"  );
  list()->addColumn(tr("Ship Via"),      _itemColumn,     Qt::AlignLeft,   true,  "ipsfreight_shipvia"  );

}
Esempio n. 18
0
dspTrialBalances::dspTrialBalances(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspTrialBalances", fl)
{
  setWindowTitle(tr("Trial Balances"));
  setListLabel(tr("Trial Balances"));
  setReportName("TrialBalances");
  setMetaSQLOptions("trialBalances", "detail");
  setUseAltId(true);
  setParameterWidgetVisible(true);

  list()->addColumn(tr("Start"),            _dateColumn,     Qt::AlignCenter, true,  "period_start" );
  list()->addColumn(tr("End"),              _dateColumn,     Qt::AlignCenter, true,  "period_end" );
  list()->addColumn(tr("Account #"),        _itemColumn,     Qt::AlignLeft,   true,  "account" );
  list()->addColumn(tr("Description"),      -1,              Qt::AlignLeft,   true,  "accnt_descrip"   );
  list()->addColumn(tr("Beg. Bal."),        _bigMoneyColumn, Qt::AlignRight,  true,  "beginning"  );
  list()->addColumn(tr("Beg. Bal. Sense"),  25,              Qt::AlignLeft,   true,  "beginningsense"   );
  list()->addColumn(tr("Debits"),           _bigMoneyColumn, Qt::AlignRight,  true,  "debits"  );
  list()->addColumn(tr("Credits"),          _bigMoneyColumn, Qt::AlignRight,  true,  "credits"  );
  list()->addColumn(tr("Difference"),       _bigMoneyColumn, Qt::AlignRight,  true,  "diff"  );
  list()->addColumn(tr("Difference Sense"), 25,              Qt::AlignLeft,   true,  "diffsense"   );
  list()->addColumn(tr("End Bal."),         _bigMoneyColumn, Qt::AlignRight,  true,  "ending"  );
  list()->addColumn(tr("End Bal. Sense"),   25,              Qt::AlignLeft,   true,  "endingsense"   );

  // Determine current period
  int periodid = -1;
  XSqlQuery qry;
  qry.exec("SELECT period_id "
           "FROM period "
           "WHERE (current_date BETWEEN period_start AND period_end);");
  if (qry.first())
    periodid = qry.value("period_id").toInt();

  parameterWidget()->appendComboBox(tr("Period"), "period_id", XComboBox::AccountingPeriods, QVariant(periodid));
  if (_metrics->value("GLCompanySize").toInt() > 0)
    parameterWidget()->appendComboBox(tr("Company"), "company_id", XComboBox::Companies);
  parameterWidget()->append(tr("GL Account"), "accnt_id",  ParameterWidget::GLAccount);
  parameterWidget()->append(tr("Show Zero Amounts"), "showZero", ParameterWidget::Exists);
  parameterWidget()->applyDefaultFilterSet();
}
Esempio n. 19
0
dspSummarizedSalesByCustomer::dspSummarizedSalesByCustomer(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspSummarizedSalesByCustomer", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Summarized Sales History by Customer"));
  setListLabel(tr("Sales History"));
  setReportName("SummarizedSalesHistoryByCustomer");
  setMetaSQLOptions("summarizedSalesHistory", "detail");

  _productCategory->setType(ParameterGroup::ProductCategory);
  _currency->setType(ParameterGroup::Currency);

  list()->addColumn(tr("Customer"),    -1,               Qt::AlignLeft,   true,  "customer"   );
  list()->addColumn(tr("First Sale"),  _dateColumn,      Qt::AlignCenter, true,  "firstsale" );
  list()->addColumn(tr("Last Sale"),   _dateColumn,      Qt::AlignCenter, true,  "lastsale" );
  list()->addColumn(tr("Total Qty."),  _qtyColumn,       Qt::AlignRight,  true,  "qtyshipped"  );
  list()->addColumn(tr("Total Sales"), _bigMoneyColumn,  Qt::AlignRight,  true,  "extprice"  );
  list()->addColumn(tr("Currency"),    _currencyColumn,  Qt::AlignLeft,   true,  "currAbbr"  );

  if (omfgThis->singleCurrency())
    list()->hideColumn(5);
}
void dspTimePhasedOpenARItems::sToggleCustom()
{
  list()->clear();
  if (_custom->isChecked())
  {
    setReportName("TimePhasedOpenARItems");
    _calendarLit->setHidden(false);
    _calendar->setHidden(false);
    _periods->setHidden(false);
    _asOf->setDate(omfgThis->dbDate(), true);
    _asOf->setEnabled(false);
    _useGroup->setHidden(true);
    _reptGroup->setHidden(true);

    list()->setColumnCount(0);
    list()->addColumn(tr("Cust. #"), _orderColumn, Qt::AlignLeft, true, "cust_number");
    list()->addColumn(tr("Customer"),         180, Qt::AlignLeft, true, "cust_name");
  }
  else
  {
    sToggleReport();
    _calendarLit->setHidden(true);
    _calendar->setHidden(true);
    _periods->setHidden(true);
    _asOf->setEnabled(true);
    _useGroup->setHidden(false);
    _reptGroup->setHidden(false);

    list()->setColumnCount(0);
    list()->addColumn(tr("Cust. #"),       _orderColumn, Qt::AlignLeft,  true, "araging_cust_number");
    list()->addColumn(tr("Customer"),               180, Qt::AlignLeft,  true, "araging_cust_name");
    list()->addColumn(tr("Total Open"), _bigMoneyColumn, Qt::AlignRight, true, "araging_total_val_sum");
    list()->addColumn(tr("0+ Days"),    _bigMoneyColumn, Qt::AlignRight, true, "araging_cur_val_sum");
    list()->addColumn(tr("0-30 Days"),  _bigMoneyColumn, Qt::AlignRight, true, "araging_thirty_val_sum");
    list()->addColumn(tr("31-60 Days"), _bigMoneyColumn, Qt::AlignRight, true, "araging_sixty_val_sum");
    list()->addColumn(tr("61-90 Days"), _bigMoneyColumn, Qt::AlignRight, true, "araging_ninety_val_sum");
    list()->addColumn(tr("90+ Days"),   _bigMoneyColumn, Qt::AlignRight, true, "araging_plus_val_sum");
  }
}
Esempio n. 21
0
dspWoSoStatusMismatch::dspWoSoStatusMismatch(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspWoSoStatusMismatch", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Open Work Orders with Closed Parent Sales Orders"));
  setListLabel(tr("Work Orders"));
  setReportName("OpenWorkOrdersWithClosedParentSalesOrders");
  setMetaSQLOptions("workOrderSoStatus", "detail");

  list()->addColumn(tr("W/O #"),       _orderColumn,  Qt::AlignLeft   , true, "wonumber" );
  list()->addColumn(tr("Status"),      _statusColumn, Qt::AlignCenter , true, "wo_status");
  list()->addColumn(tr("Item Number"), -1,            Qt::AlignLeft   , true, "item_number");
  list()->addColumn(tr("UOM"),         _uomColumn,    Qt::AlignLeft   , true, "uom_name");
  list()->addColumn(tr("Site"),        _whsColumn,    Qt::AlignCenter , true, "warehous_code");
  list()->addColumn(tr("S/O #"),       _orderColumn,  Qt::AlignLeft   , true, "cohead_number");
  list()->addColumn(tr("Ordered"),     _qtyColumn,    Qt::AlignRight  , true, "wo_qtyord");
  list()->addColumn(tr("Received"),    _qtyColumn,    Qt::AlignRight  , true, "wo_qtyrcv");
  list()->addColumn(tr("Start Date"),  _dateColumn,   Qt::AlignCenter , true, "wo_startdate");
  list()->addColumn(tr("Due Date"),    _dateColumn,   Qt::AlignCenter , true, "wo_duedate");

  sFillList();
}
dspCostedSummarizedBOM::dspCostedSummarizedBOM(QWidget* parent, const char*, Qt::WFlags fl)
    : display(parent, "dspCostedSummarizedBOM", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Costed Summarized Bill of Materials"));
  setListLabel(tr("Costed Bill of Material"));
  setReportName("CostedSummarizedBOM");
  setMetaSQLOptions("costedBOM", "detail");

  QButtonGroup* _costsGroupInt = new QButtonGroup(this);
  _costsGroupInt->addButton(_useStandardCosts);
  _costsGroupInt->addButton(_useActualCosts);

  _item->setType(ItemLineEdit::cGeneralManufactured | ItemLineEdit::cGeneralPurchased |
                 ItemLineEdit::cPhantom | ItemLineEdit::cKit |
                 ItemLineEdit::cPlanning | ItemLineEdit::cTooling);

  list()->setRootIsDecorated(true);
  list()->addColumn(tr("Item Number"),  _itemColumn, Qt::AlignLeft,  true, "bomdata_item_number");
  list()->addColumn(tr("Description"),           -1, Qt::AlignLeft,  true, "bomdata_itemdescription");
  list()->addColumn(tr("UOM"),           _uomColumn, Qt::AlignCenter,true, "bomdata_uom_name");
  list()->addColumn(tr("Qty. Req."),     _qtyColumn, Qt::AlignRight, true, "bomdata_qtyreq");
  list()->addColumn(tr("Unit Cost"),    _costColumn, Qt::AlignRight, true, "unitcost");
  list()->addColumn(tr("Ext. Cost"),    _priceColumn, Qt::AlignRight, true, "extendedcost");
  list()->setIndentation(10);

  _expiredDaysLit->setEnabled(_showExpired->isChecked());
  _expiredDays->setEnabled(_showExpired->isChecked());
  _effectiveDaysLit->setEnabled(_showFuture->isChecked());
  _effectiveDays->setEnabled(_showFuture->isChecked());

  connect(omfgThis, SIGNAL(bomsUpdated(int, bool)), this, SLOT(sFillList(int, bool)));

  _revision->setMode(RevisionLineEdit::View);
  _revision->setType("BOM");

  _revision->setVisible(_metrics->boolean("RevControl"));
}
dspPoPriceVariancesByItem::dspPoPriceVariancesByItem(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspPoPriceVariancesByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Purchase Price Variances by Item"));
  setListLabel(tr("Price Variances"));
  setReportName("PurchasePriceVariancesByItem");
  setMetaSQLOptions("poPriceVariances", "detail");

  connect(_selectedPurchasingAgent, SIGNAL(toggled(bool)), _agent, SLOT(setEnabled(bool)));

  _item->setType(ItemLineEdit::cGeneralPurchased | ItemLineEdit::cGeneralManufactured);
  _item->setDefaultType(ItemLineEdit::cGeneralPurchased);

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  _agent->setType(XComboBox::Agent);
  _agent->setText(omfgThis->username());
  
  list()->addColumn(tr("P/O #"),              _orderColumn,    Qt::AlignRight,  true,  "recv_order_number"  );
  list()->addColumn(tr("Dist. Date"),         _dateColumn,     Qt::AlignCenter, true,  "distdate" );
  list()->addColumn(tr("Recv. Date"),         _dateColumn,     Qt::AlignCenter, false, "receivedate" );
  list()->addColumn(tr("Vendor Number"),      _itemColumn,     Qt::AlignLeft,   true,  "vend_number"   );
  list()->addColumn(tr("Vendor Name"),        -1,              Qt::AlignLeft,   true,  "vend_name"   );
  list()->addColumn(tr("Qty."),               _qtyColumn,      Qt::AlignRight,  true,  "recv_qty"  );
  list()->addColumn(tr("Purch. Cost"),        _priceColumn,    Qt::AlignRight,  false, "recv_purchcost"  );
  list()->addColumn(tr("Purch. Curr."),       _priceColumn,    Qt::AlignRight,  false, "poCurrAbbr"  );
  list()->addColumn(tr("Rcpt. Cost"),         _priceColumn,    Qt::AlignRight,  false, "recv_recvcost"  );
  list()->addColumn(tr("Received"),           _moneyColumn,    Qt::AlignRight,  true,  "recv_value"  );
  list()->addColumn(tr("Vouch. Cost"),        _priceColumn,    Qt::AlignRight,  false, "vouchercost"  );
  list()->addColumn(tr("Vouchered"),          _moneyColumn,    Qt::AlignRight,  true,  "voucher_value"  );
  list()->addColumn(tr("Variance"),           _moneyColumn,    Qt::AlignRight,  true,  "variance"  );
  list()->addColumn(tr("Currency"),           _currencyColumn, Qt::AlignRight,  !omfgThis->singleCurrency(),  "currAbbr"  );
  list()->addColumn(tr("%"),                  _prcntColumn,    Qt::AlignRight,  true,  "varprcnt"  );

  _currencyGroup->setHidden(omfgThis->singleCurrency());
}
dspPoPriceVariancesByVendor::dspPoPriceVariancesByVendor(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspPoPriceVariancesByVendor", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Purchase Price Variances by Vendor"));
  setListLabel(tr("Price Variances"));
  setReportName("PurchasePriceVariancesByVendor");
  setMetaSQLOptions("poPriceVariances", "detail");

  connect(_selectedPurchasingAgent, SIGNAL(toggled(bool)), _agent, SLOT(setEnabled(bool)));

  _agent->populate( "SELECT usesysid, usename "
                    "FROM pg_user, usr "
                    "WHERE ( (usename=usr_username)"
                    " AND (usr_active)"
                    " AND (usr_agent) ) "
                    "ORDER BY usename;" );
  
  list()->addColumn(tr("P/O #"),              _orderColumn,    Qt::AlignRight,  true,  "recv_order_number"  );
  list()->addColumn(tr("Dist. Date"),         _dateColumn,     Qt::AlignCenter, true,  "distdate" );
  list()->addColumn(tr("Recv. Date"),         _dateColumn,     Qt::AlignCenter, false, "receivedate" );
  list()->addColumn(tr("Vendor Number"),      _itemColumn,     Qt::AlignLeft,   false,  "vend_number"   );
  list()->addColumn(tr("Vendor Name"),        -1,              Qt::AlignLeft,   false,  "vend_name"   );
  list()->addColumn(tr("Item Number"),        _itemColumn,     Qt::AlignLeft,   true,  "itemnumber"   );
  list()->addColumn(tr("Description"),        -1,              Qt::AlignLeft,   true,  "itemdescrip"   );
  list()->addColumn(tr("Qty."),               _qtyColumn,      Qt::AlignRight,  true,  "recv_qty"  );
  list()->addColumn(tr("Purch. Cost"),        _priceColumn,    Qt::AlignRight,  false, "recv_purchcost"  );
  list()->addColumn(tr("Purch. Curr."),       _priceColumn,    Qt::AlignRight,  false, "poCurrAbbr"  );
  list()->addColumn(tr("Rcpt. Cost"),         _priceColumn,    Qt::AlignRight,  false, "recv_recvcost"  );
  list()->addColumn(tr("Received"),           _moneyColumn,    Qt::AlignRight,  true,  "recv_value"  );
  list()->addColumn(tr("Vouch. Cost"),        _priceColumn,    Qt::AlignRight,  false, "vouchercost"  );
  list()->addColumn(tr("Vouchered"),          _moneyColumn,    Qt::AlignRight,  true,  "voucher_value"  );
  list()->addColumn(tr("Variance"),           _moneyColumn,    Qt::AlignRight,  true,  "variance"  );
  list()->addColumn(tr("Currency"),           _currencyColumn, Qt::AlignRight,  !omfgThis->singleCurrency(),  "currAbbr"  );
  list()->addColumn(tr("%"),                  _prcntColumn,    Qt::AlignRight,  true,  "varprcnt"  );

  _currencyGroup->setHidden(omfgThis->singleCurrency());
}
dspPoReturnsByVendor::dspPoReturnsByVendor(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPoReturnsByVendor", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Rejected Material by Vendor"));
  setListLabel(tr("Rejected Material"));
  setReportName("RejectedMaterialByVendor");
  setMetaSQLOptions("poReturns", "detail");
  setUseAltId(true);

  connect(_selectedPurchasingAgent, SIGNAL(toggled(bool)), _agent, SLOT(setEnabled(bool)));

  _agent->setType(XComboBox::Agent);
  _agent->setText(omfgThis->username());

  list()->addColumn(tr("P/O #"),              _orderColumn, Qt::AlignRight,  true,  "poreject_ponumber"  );
  list()->addColumn(tr("Vendor"),             _orderColumn, Qt::AlignLeft,   true,  "vend_name"   );
  list()->addColumn(tr("Date"),               _dateColumn,  Qt::AlignCenter, true,  "poreject_date" );
  list()->addColumn(tr("Vend. Item #"),       _itemColumn,  Qt::AlignLeft,   true,  "poreject_vend_item_number"   );
  list()->addColumn(tr("Vendor Description"), -1,           Qt::AlignLeft,   true,  "poreject_vend_item_descrip"   );
  list()->addColumn(tr("Qty."),               _qtyColumn,   Qt::AlignRight,  true,  "poreject_qty"  );
  list()->addColumn(tr("Reject Code"),        _itemColumn,  Qt::AlignRight,  true,  "rjctcode_code"  );
}
dspInventoryAvailability::dspInventoryAvailability(QWidget* parent, const char*, Qt::WindowFlags fl)
    : display(parent, "dspInventoryAvailability", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Inventory Availability"));
  setReportName("InventoryAvailability");
  setMetaSQLOptions("inventoryAvailability", "general");
  setUseAltId(true);
  setParameterWidgetVisible(true);

  _forgetful = true;
  if(window())
    _settingsName = window()->objectName() + "/asof";
  _asof->setCurrentIndex(_preferences->value(_settingsName).toInt());
  _forgetful = false;

  parameterWidget()->appendComboBox(tr("Class Code"), "classcode_id", XComboBox::ClassCodes);
  parameterWidget()->append(tr("Class Code Pattern"), "classcode_pattern", ParameterWidget::Text);
  parameterWidget()->append(tr("Item"), "item_id", ParameterWidget::Item);
  parameterWidget()->appendComboBox(tr("Item Group"), "itemgrp_id", XComboBox::ItemGroups);
  parameterWidget()->append(tr("Item Group Pattern"), "itemgrp_pattern", ParameterWidget::Text);
  parameterWidget()->appendComboBox(tr("Planner Code"), "plancode_id", XComboBox::PlannerCodes);
  parameterWidget()->append(tr("Planner Code Pattern"), "plancode_pattern", ParameterWidget::Text);
  parameterWidget()->append(tr("Source Vendor"), "vend_id", ParameterWidget::Vendor);
  parameterWidget()->appendComboBox(tr("Source Vendor Type"), "vendtype_id", XComboBox::VendorTypes);
  parameterWidget()->append(tr("Source Vendor Type Pattern"), "vendtype_pattern", ParameterWidget::Text);
  if (_metrics->boolean("MultiWhs"))
    parameterWidget()->append(tr("Site"), "warehous_id", ParameterWidget::Site);

  sHandleShowReorder(_showReorder->isChecked());
  sByVendorChanged();

  connect(_showReorder, SIGNAL(toggled(bool)), this, SLOT(sHandleShowReorder(bool)));
  connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), this, SLOT(sFillList()));
  connect(_byVendor, SIGNAL(toggled(bool)), this, SLOT(sByVendorChanged()));
  connect(_asof, SIGNAL(currentIndexChanged(int)), this, SLOT(sAsofChanged(int)));
}
Esempio n. 27
0
dspItemSitesByParameterList::dspItemSitesByParameterList(QWidget* parent, const char*, Qt::WFlags fl)
    : display(parent, "dspItemSitesByParameterList", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Item Sites by Class Code"));
  setListLabel(tr("Item Sites"));
  setReportName("ItemSitesByParameterList");
  setMetaSQLOptions("itemSites", "detail");

  _parameter->setType(ParameterGroup::ClassCode);

  list()->addColumn(tr("Site"),          _whsColumn,   Qt::AlignCenter, true,  "warehous_code" );
  list()->addColumn(tr("Item Number"),   _itemColumn,  Qt::AlignLeft,   true,  "item_number"   );
  list()->addColumn(tr("Description"),   -1,           Qt::AlignLeft,   true,  "description"   );
  list()->addColumn(tr("UOM"),           _uomColumn,   Qt::AlignCenter, true,  "uom_name" );
  list()->addColumn(tr("QOH"),           _qtyColumn,   Qt::AlignRight,  true,  "itemsite_qtyonhand"  );
  list()->addColumn(tr("Loc. Cntrl."),   _dateColumn,  Qt::AlignCenter, true,  "loccntrl" );
  list()->addColumn(tr("Cntrl. Meth."),  _dateColumn,  Qt::AlignCenter, true,  "controlmethod" );
  list()->addColumn(tr("Sold Ranking"),  _dateColumn,  Qt::AlignCenter, true,  "soldranking" );
  list()->addColumn(tr("ABC Class"),     _dateColumn,  Qt::AlignCenter, true,  "itemsite_abcclass" );
  list()->addColumn(tr("Cycle Cnt."),    _dateColumn,  Qt::AlignCenter, true,  "itemsite_cyclecountfreq" );
  list()->addColumn(tr("Last Cnt'd"),    _dateColumn,  Qt::AlignCenter, true,  "datelastcount" );
  list()->addColumn(tr("Last Used"),     _dateColumn,  Qt::AlignCenter, true,  "datelastused" );
}
dspPoItemReceivingsByItem::dspPoItemReceivingsByItem(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPoItemReceivingsByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Receipts and Returns by Item"));
  setListLabel(tr("Purchase &Receipts and Returns:"));
  setReportName("ReceiptsReturnsByItem");
  setMetaSQLOptions("receivings", "detail");

  connect(_showVariances, SIGNAL(toggled(bool)), this, SLOT(sHandleVariance(bool)));

  _item->setType(ItemLineEdit::cGeneralPurchased | ItemLineEdit::cGeneralManufactured);
  _item->setDefaultType(ItemLineEdit::cGeneralPurchased);

  _agent->setType(XComboBox::Agent);
  _agent->setText(omfgThis->username());
  
  _showVariances->setEnabled(_privileges->check("ViewCosts"));

  list()->addColumn(tr("P/O #"),        _orderColumn, Qt::AlignRight, true, "ponumber");
  list()->addColumn(tr("Vendor"),       120,          Qt::AlignLeft,  true, "vend_name");
  list()->addColumn(tr("Due Date"),     _dateColumn,  Qt::AlignCenter,true, "duedate");
  list()->addColumn(tr("Recv. Date"),   _dateColumn,  Qt::AlignCenter,true, "recvdate");
  list()->addColumn(tr("Vend. Item #"), _itemColumn,  Qt::AlignLeft,  true, "venditemnumber");
  list()->addColumn(tr("Description"),  -1,           Qt::AlignLeft,  true, "venditemdescrip");
  list()->addColumn(tr("Rcvd/Rtnd"),    _qtyColumn,   Qt::AlignRight, true, "sense");
  list()->addColumn(tr("Qty."),         _qtyColumn,   Qt::AlignRight, true, "qty");
  if (_privileges->check("ViewCosts"))
  {
    list()->addColumn(tr("Purch. Cost"),_priceColumn, Qt::AlignRight,true, "purchcost");
    list()->addColumn(tr("Recv. Cost"), _priceColumn, Qt::AlignRight,true, "recvcost");
    list()->addColumn(tr("Value"),      _priceColumn, Qt::AlignRight,true, "value");
  }

  sHandleVariance(_showVariances->isChecked());
}
Esempio n. 29
0
dspPOsByDate::dspPOsByDate(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPOsByDate", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Purchase Orders by Date"));
  setListLabel(tr("Purchase Orders"));
  setReportName("POsByDate");
  setMetaSQLOptions("purchaseOrders", "detail");

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setStartCaption(tr("Starting Order Date:"));
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);
  _dates->setEndCaption(tr("Ending Order Date:"));

  _agent->setType(XComboBox::Agent);
  _agent->setText(omfgThis->username());

  list()->addColumn(tr("P/O #"),       _orderColumn, Qt::AlignRight, true, "pohead_number");
  list()->addColumn(tr("Site"),        _whsColumn,   Qt::AlignCenter,true, "warehousecode");
  list()->addColumn(tr("Status"),      _dateColumn,  Qt::AlignCenter,true, "poitem_status");
  list()->addColumn(tr("Vendor"),      _itemColumn,  Qt::AlignLeft,  true, "vend_name");
  list()->addColumn(tr("Order Date"),  _dateColumn,  Qt::AlignCenter,true, "pohead_orderdate");
  list()->addColumn(tr("Due Date"),    _dateColumn,  Qt::AlignCenter,true, "minDueDate");
}
Esempio n. 30
0
dspCustomersByCharacteristic::dspCustomersByCharacteristic(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspCustomersByCharacteristic", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Customers by Characteristic"));
  setListLabel(tr("Characteristic"));
  setReportName("CustomersByCharacteristic");
  setMetaSQLOptions("customer", "detail");
  setUseAltId(true);

  _char->populate( "SELECT char_id, char_name "
                   "FROM char "
                   "WHERE (char_customers) "
                   "ORDER BY char_name;" );

  list()->addColumn(tr("Active"),         _ynColumn,   Qt::AlignLeft,  true, "cust_active");
  list()->addColumn(tr("Number"),         _itemColumn, Qt::AlignLeft,  true, "cust_number");
  list()->addColumn(tr("Name"),           -1,          Qt::AlignLeft,  true, "cust_name");
  list()->addColumn(tr("Characteristic"), _itemColumn, Qt::AlignCenter,true, "char_name");
  list()->addColumn(tr("Value"),          _itemColumn, Qt::AlignLeft,  true, "charass_value");
  list()->setDragString("custid=");

  connect(omfgThis, SIGNAL(itemsUpdated(int, bool)), this, SLOT(sFillList(int, bool)));
}