createCountTagsByItem::createCountTagsByItem(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_create,    SIGNAL(clicked()),  this, SLOT(sCreate()));
  connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sPopulateLocations()));

  _freeze->setEnabled(_privileges->check("FreezeInventory"));
  _item->setType(ItemLineEdit::cPurchased
                 | ItemLineEdit::cManufactured
                 | ItemLineEdit::cBreeder
                 | ItemLineEdit::cCoProduct
                 | ItemLineEdit::cByProduct
                 | ItemLineEdit::cCosting
                 | ItemLineEdit::cTooling
                 | ItemLineEdit::cOutsideProcess
                 | ItemLineEdit::cActive);

  _captive = FALSE;
  
  if (!_metrics->boolean("MultiWhs"))
  {
    _warehouseLit->hide();
    _warehouse->hide();
  }

  sPopulateLocations();
}
Example #2
0
createCycleCountTags::createCycleCountTags(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);

    _codeGroup = new QButtonGroup(this);
    _codeGroup->addButton(_plancode);
    _codeGroup->addButton(_classcode);

    connect(_create, SIGNAL(clicked()), this, SLOT(sCreate()));
    connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sPopulateLocations()));
    connect(_codeGroup, SIGNAL(buttonClicked(int)), this, SLOT(sParameterTypeChanged()));

    _parameter->setType(ParameterGroup::ClassCode);

    _freeze->setEnabled(_privileges->check("CreateReceiptTrans"));
    
    //If not multi-warehouse hide whs control
    if (!_metrics->boolean("MultiWhs"))
    {
      _warehouseLit->hide();
      _warehouse->hide();
    }

    if (_preferences->boolean("XCheckBox/forgetful"))
      _priority->setChecked(true);

    sPopulateLocations();
}
Example #3
0
/*
 *  Constructs a createCountTagsByParameterList as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
createCountTagsByParameterList::createCountTagsByParameterList(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);


  // signals and slots connections
  connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
  connect(_create, SIGNAL(clicked()), this, SLOT(sCreate()));
  connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sPopulateLocations()));
  connect(_byLocation, SIGNAL(toggled(bool)), _location, SLOT(setEnabled(bool)));

  _parameter->setType(ParameterGroup::ClassCode);

  _freeze->setEnabled(_privileges->check("FreezeInventory"));

  //If not multi-warehouse hide whs control
  if (!_metrics->boolean("MultiWhs"))
  {
    _warehouseLit->hide();
    _warehouse->hide();
  }

  if (_preferences->boolean("XCheckBox/forgetful"))
    _priority->setChecked(true);

  sPopulateLocations();
}
Example #4
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();
}
Example #5
0
dspDetailedInventoryHistoryByLocation::dspDetailedInventoryHistoryByLocation(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
    setupUi(this);

    connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
    connect(_invhist, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
    connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));
    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);

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

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

    sPopulateLocations();
}
Example #6
0
/*
 *  Constructs a createCountTagsByItem as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal dialog.
 */
createCountTagsByItem::createCountTagsByItem(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);


    // signals and slots connections
    connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
    connect(_create, SIGNAL(clicked()), this, SLOT(sCreate()));
    connect(_item, SIGNAL(valid(bool)), _create, SLOT(setEnabled(bool)));
    connect(_item, SIGNAL(warehouseIdChanged(int)), _warehouse, SLOT(setId(int)));
    connect(_item, SIGNAL(newId(int)), _warehouse, SLOT(findItemsites(int)));
    connect(_byLocation, SIGNAL(toggled(bool)), _location, SLOT(setEnabled(bool)));
    connect(_warehouse, SIGNAL(newID(int)), this, SLOT(sPopulateLocations()));

    _freeze->setEnabled(_privileges->check("FreezeInventory"));
    _item->setType(ItemLineEdit::cPurchased
                   | ItemLineEdit::cManufactured
                   | ItemLineEdit::cBreeder
                   | ItemLineEdit::cCoProduct
                   | ItemLineEdit::cByProduct
                   | ItemLineEdit::cCosting
                   | ItemLineEdit::cTooling
                   | ItemLineEdit::cOutsideProcess);

    _captive = FALSE;

    //If not multi-warehouse hide whs control
    if (!_metrics->boolean("MultiWhs"))
    {
        _warehouseLit->hide();
        _warehouse->hide();
    }

    sPopulateLocations();
}