Esempio n. 1
0
updateReorderLevels::updateReorderLevels(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
    setupUi(this);

    _daysGroupInt = new QButtonGroup(this);
    _daysGroupInt->addButton(_leadTime);
    _daysGroupInt->addButton(_fixedDays);

    connect(_post,    SIGNAL(clicked()),     this, SLOT(sPost()));
    connect(_preview, SIGNAL(toggled(bool)), this, SLOT(sHandleButtons()));
    connect(_results, SIGNAL(currentItemChanged(XTreeWidgetItem*, XTreeWidgetItem*)), this, SLOT(sCloseEdit(XTreeWidgetItem*,XTreeWidgetItem*)));
    connect(_results, SIGNAL(itemClicked(XTreeWidgetItem*, int)), this, SLOT(sOpenEdit(XTreeWidgetItem*, int)));
    connect(_submit,   SIGNAL(clicked()), this, SLOT(sSubmit()));
    connect(_update,   SIGNAL(clicked()), this, SLOT(sUpdate()));

    _results->addColumn(tr("Site"),        _whsColumn, Qt::AlignLeft, true, "reordlvl_warehous_code");
    _results->addColumn(tr("Item Number"),_itemColumn, Qt::AlignLeft, true, "reordlvl_item_number");
    _results->addColumn(tr("Description"),         -1, Qt::AlignLeft, true, "reordlvl_item_descrip");
    _results->addColumn(tr("Leadtime"),    _qtyColumn, Qt::AlignRight,true, "reordlvl_leadtime");
    _results->addColumn(tr("Curr. Level"), _qtyColumn, Qt::AlignRight,true, "reordlvl_curr_level");
    _results->addColumn(tr("Days Stock"),  _qtyColumn, Qt::AlignRight,true, "reordlvl_daysofstock");
    _results->addColumn(tr("Total Usage"), _qtyColumn, Qt::AlignRight,true, "reordlvl_total_usage");
    _results->addColumn(tr("New Level"),   _qtyColumn, Qt::AlignRight,true, "reordlvl_calc_level");

    if (!_metrics->boolean("EnableBatchManager"))
      _submit->hide();
}
Esempio n. 2
0
updateCreditStatusByCustomer::updateCreditStatusByCustomer(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));
  connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
  connect(_cust, SIGNAL(newId(int)), this, SLOT(sPopulate(int)));
}
Esempio n. 3
0
forwardUpdateAccounts::forwardUpdateAccounts(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(accept()));
  connect(_typeSelected, SIGNAL(toggled(bool)), _type, SLOT(setEnabled(bool)));
  connect(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));
}
Esempio n. 4
0
/*
 *  Constructs a updateCycleCountFrequency 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.
 */
updateCycleCountFrequency::updateCycleCountFrequency(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(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));
    init();
}
Esempio n. 5
0
/*
 *  Constructs a updateListPricesByProductCategory 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.
 */
updateListPricesByProductCategory::updateListPricesByProductCategory(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(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));
    init();
}
updateItemSiteLeadTimes::updateItemSiteLeadTimes(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
  : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  // signals and slots connections
  connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
  connect(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));

  _classCode->setType(ParameterGroup::ClassCode);
}
createRecurringInvoices::createRecurringInvoices(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));
  connect(_submit, SIGNAL(clicked()), this, SLOT(sSubmit()));

  if (!_metrics->boolean("EnableBatchManager"))
    _submit->hide();
}
updateABCClass::updateABCClass(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(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));

  _classCode->setType(ParameterGroup::ClassCode);
  _dates->setStartCaption(tr("Start Evaluation Date"));
  _dates->setEndCaption(tr("End Evaluation Date"));
}
Esempio n. 9
0
/*
 *  Constructs a updatePricesByProductCategory 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.
 */
updatePricesByProductCategory::updatePricesByProductCategory(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(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));

    _productCategory->setType(ParameterGroup::ProductCategory);

    _updateBy->setValidator(new QDoubleValidator(-100, 9999, 2, _updateBy));
}
Esempio n. 10
0
/*
 *  Constructs a updatePricesByPricingSchedule 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.
 */
updatePricesByPricingSchedule::updatePricesByPricingSchedule(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(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));

  _ipshead->populate( "SELECT ipshead_id, (ipshead_name || '-' || ipshead_descrip) "
                      "FROM ipshead "
                      "ORDER BY ipshead_name;" );

  _updateBy->setValidator(new QDoubleValidator(-100, 9999, 2, _updateBy));
}
updatePrices::updatePrices(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
    : XDialog(parent, name, modal, fl)
{
  XSqlQuery updateupdatePrices;
  setupUi(this);


  // signals and slots connections
  connect(_byItem,             SIGNAL(toggled(bool)), this, SLOT(sHandleBy(bool)));
  connect(_byItemGroup,        SIGNAL(toggled(bool)), this, SLOT(sHandleBy(bool)));
  connect(_byProductCategory,  SIGNAL(toggled(bool)), this, SLOT(sHandleBy(bool)));
  connect(_close,              SIGNAL(clicked()),     this, SLOT(close()));
  connect(_add,                SIGNAL(clicked()),     this, SLOT(sAdd()));
  connect(_addAll,             SIGNAL(clicked()),     this, SLOT(sAddAll()));
  connect(_remove,             SIGNAL(clicked()),     this, SLOT(sRemove()));
  connect(_removeAll,          SIGNAL(clicked()),     this, SLOT(sRemoveAll()));
  connect(_update,             SIGNAL(clicked()),     this, SLOT(sUpdate()));
  connect(_showEffective,      SIGNAL(clicked()),     this, SLOT(populate()));
  connect(_showExpired,        SIGNAL(clicked()),     this, SLOT(populate()));
  connect(_showCurrent,        SIGNAL(clicked()),     this, SLOT(populate()));
  connect(_value,              SIGNAL(clicked()),     this, SLOT(sHandleCharPrice()));
  connect(_percent,            SIGNAL(clicked()),     this, SLOT(sHandleCharPrice()));
  connect(_avail,              SIGNAL(itemSelected(int)), _add,    SLOT(animateClick()));
  connect(_sel,                SIGNAL(itemSelected(int)), _remove, SLOT(animateClick()));

  _updateBy->setValidator(new XDoubleValidator(-100, 9999, decimalPlaces("curr"), _updateBy));

  MetaSQLQuery mql = mqlLoad("updateprices", "createselsched");
  ParameterList params;
  updateupdatePrices = mql.toQuery(params);
  if (updateupdatePrices.lastError().type() != QSqlError::NoError)
    systemError(this, updateupdatePrices.lastError().databaseText(), __FILE__, __LINE__);

  _avail->addColumn(tr("Schedule"),      -1,          Qt::AlignLeft,  true,  "ipshead_name");
  _avail->addColumn(tr("Description"),   -1,          Qt::AlignLeft,  true,  "ipshead_descrip");
  _avail->addColumn(tr("Effective"),     -1,          Qt::AlignLeft,  true,  "ipshead_effective");
  _avail->addColumn(tr("Expires"),       -1,          Qt::AlignLeft,  true,  "ipshead_expires");
  _avail->setSelectionMode(QAbstractItemView::ExtendedSelection);

  _sel->addColumn(tr("Schedule"),        -1,          Qt::AlignLeft,  true,  "ipshead_name");
  _sel->addColumn(tr("Description"),     -1,          Qt::AlignLeft,  true,  "ipshead_descrip");

  _group->hide();
  //	_value->setChecked(true);

  populate();
}
Esempio n. 12
0
updateOUTLevelByItem::updateOUTLevelByItem(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
  : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _daysGroupInt = new QButtonGroup(this);
  _daysGroupInt->addButton(_leadTime);
  _daysGroupInt->addButton(_fixedDays);

  // signals and slots connections
  connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
  connect(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));
  connect(_calendar, SIGNAL(newCalendarId(int)), _periods, SLOT(populate(int)));
  connect(_fixedDays, SIGNAL(toggled(bool)), _days, SLOT(setEnabled(bool)));
  connect(_leadTime, SIGNAL(toggled(bool)), _leadTimePad, SLOT(setEnabled(bool)));
  connect(_item, SIGNAL(valid(bool)), _update, SLOT(setEnabled(bool)));
}
enum SetResponse updateCycleCountFrequency::set(const ParameterList &pParams)
{
  XDialog::set(pParams);
  QVariant param;
  bool     valid;

  param = pParams.value("aFrequency", &valid);
  if (valid)
    _classAFrequency->setValue(param.toInt());
  else
    _classAFrequency->setValue(0);

  param = pParams.value("bFrequency", &valid);
  if (valid)
    _classBFrequency->setValue(param.toInt());
  else
    _classBFrequency->setValue(0);

  param = pParams.value("cFrequency", &valid);
  if (valid)
    _classCFrequency->setValue(param.toInt());
  else
    _classCFrequency->setValue(0);

  param = pParams.value("warehous_id", &valid);
  if (valid)
    _warehouse->setId(param.toInt());

  param = pParams.value("classcode_id", &valid);
  if (valid)
    _classCode->setId(param.toInt());

  param = pParams.value("classcode_code", &valid);
  if (valid)
    _classCode->setPattern(param.toString());

  if (pParams.inList("run"))
  {
    sUpdate();
    return NoError_Run;
  }

  return NoError;
}
Esempio n. 14
0
updateOUTLevels::updateOUTLevels(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
  : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  _daysGroupInt = new QButtonGroup(this);
  _daysGroupInt->addButton(_leadTime);
  _daysGroupInt->addButton(_fixedDays);

  // signals and slots connections
  connect(_close, SIGNAL(clicked()), this, SLOT(reject()));
  connect(_update, SIGNAL(clicked()), this, SLOT(sUpdate()));
  connect(_calendar, SIGNAL(newCalendarId(int)), _periods, SLOT(populate(int)));
  connect(_fixedDays, SIGNAL(toggled(bool)), _days, SLOT(setEnabled(bool)));
  connect(_leadTime, SIGNAL(toggled(bool)), _leadTimePad, SLOT(setEnabled(bool)));
  connect(_submit, SIGNAL(clicked()), this, SLOT(sSubmit()));
  
  if (!_metrics->boolean("EnableBatchManager"))
    _submit->hide();
  
  _plannerCode->setType(ParameterGroup::PlannerCode);
}