dspWoHistoryByItem::dspWoHistoryByItem(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspWoHistoryByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Work Order History by Item"));
  setListLabel(tr("Work Orders"));
  setReportName("WOHistoryByItem");
  setMetaSQLOptions("workOrderHistory", "detail");

  connect(_showCost, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  _item->setType(ItemLineEdit::cGeneralManufactured | ItemLineEdit::cGeneralPurchased);
  _item->setDefaultType(ItemLineEdit::cGeneralManufactured);
  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  list()->addColumn(tr("W/O #"),      -1,            Qt::AlignLeft,   true,  "wonumber"   );
  list()->addColumn(tr("Status"),     _statusColumn, Qt::AlignCenter, true,  "wo_status" );
  list()->addColumn(tr("Site"),       _whsColumn,    Qt::AlignCenter, true,  "warehous_code" );
  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" );
  list()->addColumn(tr("Cost"),       _costColumn,   Qt::AlignRight,  true,  "wo_postedvalue" );

  sHandleCosts(_showCost->isChecked());
  
  connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), this, SLOT(sFillList()));

}
dspWoHistoryByClassCode::dspWoHistoryByClassCode(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspWoHistoryByClassCode", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Work Order History by Class Code"));
  setListLabel(tr("Work Orders"));
  setReportName("WOHistoryByClassCode");
  setMetaSQLOptions("workOrderHistory", "detail");

  connect(_showCost, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  _classCode->setType(ParameterGroup::ClassCode);
  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  list()->addColumn(tr("W/O #"),       _orderColumn,  Qt::AlignLeft,   true,  "wonumber"   );
  list()->addColumn(tr("Item #"),      _itemColumn,   Qt::AlignLeft,   true,  "item_number"   );
  list()->addColumn(tr("Description"), -1,            Qt::AlignLeft,   true,  "itemdescrip"   );
  list()->addColumn(tr("Status"),      _statusColumn, Qt::AlignCenter, true,  "wo_status" );
  list()->addColumn(tr("Site"),        _whsColumn,    Qt::AlignCenter, true,  "warehous_code" );
  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::AlignRight,  true,  "wo_startdate"  );
  list()->addColumn(tr("Due Date"),    _dateColumn,   Qt::AlignRight,  true,  "wo_duedate"  );
  list()->addColumn(tr("Cost"),        _costColumn,   Qt::AlignRight,  true,  "wo_postedvalue" );

  sHandleCosts(_showCost->isChecked());
}
dspPricesByItem::dspPricesByItem(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspPricesByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Prices by Item"));
  setListLabel(tr("Prices"));
  setReportName("PricesByItem");
  setMetaSQLOptions("prices", "detail");
  setUseAltId(true);

  connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  _item->setType(ItemLineEdit::cSold);

  list()->addColumn(tr("Schedule"),      _itemColumn, Qt::AlignLeft,   true,  "schedulename"  );
  list()->addColumn(tr("Source"),        _itemColumn, Qt::AlignLeft,   true,  "type"  );
  list()->addColumn(tr("Customer/Customer Type"), -1, Qt::AlignLeft,   true,  "typename"  );
  list()->addColumn(tr("Qty. Break"),     _qtyColumn, Qt::AlignRight,  true,  "f_qtybreak" );
  list()->addColumn(tr("Price"),        _priceColumn, Qt::AlignRight,  true,  "price" );
  list()->addColumn(tr("Currency"),  _currencyColumn, Qt::AlignLeft,   true,  "currConcat"  );
  list()->addColumn(tr("Cost"),          _costColumn, Qt::AlignRight,  true,  "f_cost" );
  list()->addColumn(tr("Margin"),       _prcntColumn, Qt::AlignRight,  true,  "f_margin" );

  if (omfgThis->singleCurrency())
    list()->hideColumn(CURR_COL);
  sHandleCosts(_showCosts->isChecked());

}
Exemple #4
0
/*
 *  Constructs a dspWoHistoryByClassCode as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
dspWoHistoryByClassCode::dspWoHistoryByClassCode(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
  setupUi(this);

  (void)statusBar();

  // signals and slots connections
  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_wo, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*)));
  connect(_close, SIGNAL(clicked()), this, SLOT(close()));
  connect(_showCost, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));
  connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));

  _classCode->setType(ClassCode);

  _wo->addColumn(tr("W/O #"),       _orderColumn,  Qt::AlignLeft   );
  _wo->addColumn(tr("Item #"),      _itemColumn,   Qt::AlignLeft   );
  _wo->addColumn(tr("Description"), -1,            Qt::AlignLeft   );
  _wo->addColumn(tr("Status"),      _statusColumn, Qt::AlignCenter );
  _wo->addColumn(tr("Whs."),        _whsColumn,    Qt::AlignCenter );
  _wo->addColumn(tr("Ordered"),     _qtyColumn,    Qt::AlignRight  );
  _wo->addColumn(tr("Received"),    _qtyColumn,    Qt::AlignRight  );
  _wo->addColumn(tr("Start Date"),  _dateColumn,   Qt::AlignRight  );
  _wo->addColumn(tr("Due Date"),    _dateColumn,   Qt::AlignRight  );
  _wo->addColumn(tr("Cost"),	    _costColumn,   Qt::AlignRight );

  sHandleCosts(_showCost->isChecked());
}
Exemple #5
0
dspPricesByItem::dspPricesByItem(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

//  (void)statusBar();

  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));
  connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  _item->setType(ItemLineEdit::cSold);

  _price->addColumn(tr("Schedule"),      _itemColumn, Qt::AlignLeft,   true,  "schedulename"  );
  _price->addColumn(tr("Source"),        _itemColumn, Qt::AlignLeft,   true,  "type"  );
  _price->addColumn(tr("Customer/Customer Type"), -1, Qt::AlignLeft,   true,  "typename"  );
  _price->addColumn(tr("Qty. Break"),     _qtyColumn, Qt::AlignRight,  true,  "f_qtybreak" );
  _price->addColumn(tr("Price"),        _priceColumn, Qt::AlignRight,  true,  "price" );
  _price->addColumn(tr("Currency"),  _currencyColumn, Qt::AlignLeft,   true,  "currConcat"  );
  _price->addColumn(tr("Cost"),          _costColumn, Qt::AlignRight,  true,  "f_cost" );
  _price->addColumn(tr("Margin"),       _prcntColumn, Qt::AlignRight,  true,  "f_margin" );

  if (omfgThis->singleCurrency())
    _price->hideColumn(CURR_COL);
  sHandleCosts(_showCosts->isChecked());

  _item->setFocus();
}
dspWoHistoryByNumber::dspWoHistoryByNumber(QWidget* parent, const char*, Qt::WindowFlags fl)
    : display(parent, "dspWoHistoryByNumber", fl)
{
    setupUi(optionsWidget());
    setWindowTitle(tr("Work Order History by W/O Number"));
    setListLabel(tr("Work Orders"));
    setReportName("WOHistoryByNumber");
    setMetaSQLOptions("workOrderHistory", "detail");

    connect(_showCost, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

    list()->addColumn(tr("W/O #"),       _orderColumn,  Qt::AlignLeft,   true,  "wo_number"   );
    list()->addColumn(tr("Sub. #"),      _uomColumn,    Qt::AlignLeft,   true,  "wo_subnumber"   );
    list()->addColumn(tr("Item #"),      _itemColumn,   Qt::AlignLeft,   true,  "item_number"   );
    list()->addColumn(tr("Description"), -1,            Qt::AlignLeft,   true,  "itemdescrip"   );
    list()->addColumn(tr("Status"),      _statusColumn, Qt::AlignCenter, true,  "wo_status" );
    list()->addColumn(tr("Site"),        _whsColumn,    Qt::AlignCenter, true,  "warehous_code" );
    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"  );
    list()->addColumn(tr("Cost"),        _costColumn,   Qt::AlignRight,  true,  "wo_postedvalue" );
    list()->addColumn(tr("WIP"),         _costColumn,   Qt::AlignRight,  false, "wo_wipvalue" );
    list()->addColumn(tr("Project"),     _orderColumn,  Qt::AlignLeft,   false, "project" );
    list()->addColumn(tr("Priority"),    _statusColumn, Qt::AlignCenter, false, "wo_priority" );
    list()->addColumn(tr("BOM Rev"),     _orderColumn,  Qt::AlignLeft,   false, "bom_rev_number" );
    list()->addColumn(tr("BOO Rev"),     _orderColumn,  Qt::AlignLeft,   false, "boo_rev_number" );

    sHandleCosts(_showCost->isChecked());

    connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), SLOT(sFillList()));
}
Exemple #7
0
/*
 *  Constructs a dspWoHistoryByNumber as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
dspWoHistoryByNumber::dspWoHistoryByNumber(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(_wo, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*)));
  connect(_close, SIGNAL(clicked()), this, SLOT(close()));
  connect(_showCost, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));
  connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));

  _wo->addColumn(tr("W/O #"),       _orderColumn,  Qt::AlignLeft,   true,  "wo_number"   );
  _wo->addColumn(tr("Sub. #"),      _uomColumn,    Qt::AlignLeft,   true,  "wo_subnumber"   );
  _wo->addColumn(tr("Item #"),      _itemColumn,   Qt::AlignLeft,   true,  "item_number"   );
  _wo->addColumn(tr("Description"), -1,            Qt::AlignLeft,   true,  "itemdescrip"   );
  _wo->addColumn(tr("Status"),      _statusColumn, Qt::AlignCenter, true,  "wo_status" );
  _wo->addColumn(tr("Site"),        _whsColumn,    Qt::AlignCenter, true,  "warehous_code" );
  _wo->addColumn(tr("Ordered"),     _qtyColumn,    Qt::AlignRight,  true,  "wo_qtyord"  );
  _wo->addColumn(tr("Received"),    _qtyColumn,    Qt::AlignRight,  true,  "wo_qtyrcv"  );
  _wo->addColumn(tr("Start Date"),  _dateColumn,   Qt::AlignCenter, true,  "wo_startdate"  );
  _wo->addColumn(tr("Due Date"),    _dateColumn,   Qt::AlignCenter, true,  "wo_duedate"  );
  _wo->addColumn(tr("Cost"),        _costColumn,   Qt::AlignRight,  true,  "wo_postedvalue" );
  _wo->addColumn(tr("WIP"),         _costColumn,   Qt::AlignRight,  false, "wo_wipvalue" );
  _wo->addColumn(tr("Project"),     _orderColumn,  Qt::AlignLeft,   false, "project" );
  _wo->addColumn(tr("Priority"),    _statusColumn, Qt::AlignCenter, false, "wo_priority" );
  _wo->addColumn(tr("BOM Rev"),     _orderColumn,  Qt::AlignLeft,   false, "bom_rev_number" );
  _wo->addColumn(tr("BOO Rev"),     _orderColumn,  Qt::AlignLeft,   false, "boo_rev_number" );

  sHandleCosts(_showCost->isChecked());

  connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), SLOT(sFillList()));
}
Exemple #8
0
/*
 *  Constructs a dspWoHistoryByItem as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
dspWoHistoryByItem::dspWoHistoryByItem(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(_wo, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*)));
  connect(_close, SIGNAL(clicked()), this, SLOT(close()));
  connect(_showCost, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));
  connect(_item, SIGNAL(valid(bool)), _print, SLOT(setEnabled(bool)));
  connect(_item, SIGNAL(valid(bool)), _query, SLOT(setEnabled(bool)));
  connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));

  _item->setType(ItemLineEdit::cGeneralManufactured | ItemLineEdit::cJob);
  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), TRUE);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), TRUE);

  _wo->addColumn(tr("W/O #"),      -1,            Qt::AlignLeft   );
  _wo->addColumn(tr("Status"),     _statusColumn, Qt::AlignCenter );
  _wo->addColumn(tr("Whs."),       _whsColumn,    Qt::AlignCenter );
  _wo->addColumn(tr("Ordered"),    _qtyColumn,    Qt::AlignRight  );
  _wo->addColumn(tr("Received"),   _qtyColumn,    Qt::AlignRight  );
  _wo->addColumn(tr("Start Date"), _dateColumn,   Qt::AlignCenter );
  _wo->addColumn(tr("Due Date"),   _dateColumn,   Qt::AlignCenter );
  _wo->addColumn(tr("Cost"),	   _costColumn,   Qt::AlignRight );

  sHandleCosts(_showCost->isChecked());
  
  connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), this, SLOT(sFillList()));

  _item->setFocus();
}
Exemple #9
0
dspPricesByCustomer::dspPricesByCustomer(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

//  (void)statusBar();

  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));
  connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  _price->addColumn(tr("Schedule"),    _itemColumn,     Qt::AlignLeft,   true,  "schedulename"  );
  _price->addColumn(tr("Source"),      _itemColumn,     Qt::AlignLeft,   true,  "type"  );
  _price->addColumn(tr("Item Number"), _itemColumn,     Qt::AlignLeft,   true,  "itemnumber"  );
  _price->addColumn(tr("Description"), -1,              Qt::AlignLeft,   true,  "itemdescrip"  );
  _price->addColumn(tr("Price UOM"),   _uomColumn,      Qt::AlignCenter, true,  "priceuom");
  _price->addColumn(tr("Qty. Break"),  _qtyColumn,      Qt::AlignRight,  true,  "f_qtybreak" );
  _price->addColumn(tr("Price"),       _priceColumn,    Qt::AlignRight,  true,  "price" );
  _price->addColumn(tr("Currency"),    _currencyColumn, Qt::AlignLeft,   true,  "currConcat");
  _price->addColumn(tr("Ext. Cost"),   _costColumn,     Qt::AlignRight,  true,  "f_cost" );
  _price->addColumn(tr("Mar. %"),      _prcntColumn,    Qt::AlignRight,  true,  "f_margin" );

  if (omfgThis->singleCurrency())
    _price->hideColumn(CURR_COL);
  sHandleCosts(_showCosts->isChecked());
}
Exemple #10
0
dspPricesByCustomerType::dspPricesByCustomerType(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
  setupUi(this);

  (void)statusBar();

  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));
  connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  _custtype->setType(XComboBox::CustomerTypes);

  _price->addColumn(tr("Schedule"),    _itemColumn,  Qt::AlignLeft  );
  _price->addColumn(tr("Source"),      _itemColumn,  Qt::AlignLeft  );
  _price->addColumn(tr("Item Number"), _itemColumn,  Qt::AlignLeft  );
  _price->addColumn(tr("Description"), -1,           Qt::AlignLeft  );
  _price->addColumn(tr("Price UOM"),   _uomColumn,   Qt::AlignCenter);
  _price->addColumn(tr("Qty. Break"),  _qtyColumn,   Qt::AlignRight );
  _price->addColumn(tr("Price"),       _priceColumn, Qt::AlignRight );
  _price->addColumn(tr("Currency"),    _currencyColumn, Qt::AlignLeft );
  _price->addColumn(tr("Ext. Cost"),   _costColumn,  Qt::AlignRight );
  _price->addColumn(tr("Mar. %"),      _prcntColumn, Qt::AlignRight );

  if (omfgThis->singleCurrency())
    _price->hideColumn(CURR_COL);
  sHandleCosts(_showCosts->isChecked());
}
dspPricesByCustomer::dspPricesByCustomer(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPricesByCustomer", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Prices by Customer"));
  setListLabel(tr("Prices"));
  setReportName("PricesByCustomer");
  setMetaSQLOptions("prices", "detail");
  setUseAltId(true);

  connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  list()->addColumn(tr("Schedule"),    _itemColumn,     Qt::AlignLeft,   true,  "schedulename"  );
  list()->addColumn(tr("Source"),      _itemColumn,     Qt::AlignLeft,   true,  "type"  );
  list()->addColumn(tr("Item Number"), _itemColumn,     Qt::AlignLeft,   true,  "itemnumber"  );
  list()->addColumn(tr("Description"), -1,              Qt::AlignLeft,   true,  "itemdescrip"  );
  list()->addColumn(tr("Price UOM"),   _uomColumn,      Qt::AlignCenter, true,  "priceuom");
  list()->addColumn(tr("Qty. Break"),  _qtyColumn,      Qt::AlignRight,  true,  "f_qtybreak" );
  list()->addColumn(tr("Price"),       _priceColumn,    Qt::AlignRight,  true,  "price" );
  list()->addColumn(tr("Currency"),    _currencyColumn, Qt::AlignLeft,   true,  "currConcat");
  list()->addColumn(tr("Ext. Cost"),   _costColumn,     Qt::AlignRight,  true,  "f_cost" );
  list()->addColumn(tr("Mar. %"),      _prcntColumn,    Qt::AlignRight,  true,  "f_margin" );

  if (omfgThis->singleCurrency())
    list()->hideColumn(CURR_COL);
  sHandleCosts(_showCosts->isChecked());
}