Пример #1
0
boo::boo(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_moveDown, SIGNAL(clicked()), this, SLOT(sMoveDown()));
  connect(_moveUp, SIGNAL(clicked()), this, SLOT(sMoveUp()));
  connect(_item, SIGNAL(newId(int)), this, SLOT(sFillList()));
  connect(_revision, SIGNAL(newId(int)), this, SLOT(sFillList()));
  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  connect(_showExpired, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_showFuture, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_booitem, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_expire, SIGNAL(clicked()), this, SLOT(sExpire()));

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

  _booitem->addColumn(tr("#"),           _seqColumn,  Qt::AlignCenter,true, "booitem_seqnumber");
  _booitem->addColumn(tr("Std Oper."),   _itemColumn, Qt::AlignLeft,  true, "f_stdopnnumber");
  _booitem->addColumn(tr("Work Cntr."),  _itemColumn, Qt::AlignLeft,  true, "wrkcnt_code");
  _booitem->addColumn(tr("Description"), -1,          Qt::AlignLeft,  true, "description");
  _booitem->addColumn(tr("Effective"),   _dateColumn, Qt::AlignCenter,true, "booitem_effective");
  _booitem->addColumn(tr("Expires"),     _dateColumn, Qt::AlignCenter,true, "booitem_expires");
  _booitem->addColumn(tr("Exec. Day"),   _qtyColumn,  Qt::AlignCenter,true, "booitem_execday");
  
  connect(omfgThis, SIGNAL(boosUpdated(int, bool)), this, SLOT(sFillList()));

  _activate->hide();
  _revision->setMode(RevisionLineEdit::Maintain);
  _revision->setType("BOO");
}
Пример #2
0
taxCode::taxCode(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
  connect(_buttonBox, SIGNAL(rejected()), this, SLOT(sClose()));
  connect(_code, SIGNAL(editingFinished()), this, SLOT(sCheck())); 
  connect(_taxClass, SIGNAL(newID(int)), this, SLOT(populateBasis()));
  connect(_taxitems, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); 
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); 
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_expire, SIGNAL(clicked()), this, SLOT(sExpire())); 
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  
  _taxitems->addColumn(tr("Effective"), _dateColumn,    Qt::AlignLeft,  true, "effective" );
  _taxitems->addColumn(tr("Expires"),   _dateColumn,    Qt::AlignLeft,  true, "expires" );
  _taxitems->addColumn(tr("Percent"),   _prcntColumn,   Qt::AlignRight, true, "taxrate_percent" );
  _taxitems->addColumn(tr("Amount"),    _moneyColumn,   Qt::AlignRight, true, "taxrate_amount" );
  _taxitems->addColumn(tr("Currency"),  -1,             Qt::AlignLeft,  true, "curr_name" );
  sFillList(); 

  _account->setType(GLCluster::cRevenue | GLCluster::cLiability | GLCluster::cExpense);
}
Пример #3
0
void taxCode::sPopulateMenu(QMenu *menuThis)
{
  menuThis->addAction(tr("View"), this, SLOT(sView()));
  
  if ((_mode == cNew) || (_mode == cEdit))
  {
    menuThis->addAction(tr("Edit"), this, SLOT(sEdit()));
    menuThis->addAction(tr("Expire"), this, SLOT(sExpire()));
    menuThis->addAction(tr("Delete"), this, SLOT(sDelete()));
  }
}
Пример #4
0
/*
 *  Constructs a BOM as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
BOM::BOM(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(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_moveUp, SIGNAL(clicked()), this, SLOT(sMoveUp()));
  connect(_moveDown, SIGNAL(clicked()), this, SLOT(sMoveDown()));
  connect(_item, SIGNAL(newId(int)), this, SLOT(sFillList()));
  connect(_showExpired, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_showFuture, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_bomitem, SIGNAL(populateMenu(Q3PopupMenu*,Q3ListViewItem*,int)), this, SLOT(sPopulateMenu(Q3PopupMenu*)));
  connect(_close, SIGNAL(clicked()), this, SLOT(sClose()));
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  connect(_bomitem, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_expire, SIGNAL(clicked()), this, SLOT(sExpire()));
  connect(_doRequireQtyPer, SIGNAL(toggled(bool)), _requiredQtyPer, SLOT(setEnabled(bool)));

  statusBar()->hide();
  _totalQtyPerCache = 0.0;
  
  _item->setType(ItemLineEdit::cGeneralManufactured | ItemLineEdit::cGeneralPurchased | ItemLineEdit::cPlanning);
  _batchSize->setValidator(omfgThis->qtyVal());
  
  _bomitem->addColumn(tr("#"),            _seqColumn,   Qt::AlignCenter );
  _bomitem->addColumn(tr("Item Number"),  _itemColumn,  Qt::AlignLeft   );
  _bomitem->addColumn(tr("Description"),  -1,           Qt::AlignLeft   );
  _bomitem->addColumn(tr("UOM"),          _uomColumn,   Qt::AlignCenter );
  _bomitem->addColumn(tr("Issue Method"), _itemColumn,  Qt::AlignCenter );
  _bomitem->addColumn(tr("Qty. Per"),     _qtyColumn,   Qt::AlignRight  );
  _bomitem->addColumn(tr("Scrap %"),      _prcntColumn, Qt::AlignRight  );
  _bomitem->addColumn(tr("Effective"),    _dateColumn,  Qt::AlignCenter );
  _bomitem->addColumn(tr("Expires"),      _dateColumn,  Qt::AlignCenter );
  _bomitem->setDragString("bomid=");
  _bomitem->setAltDragString("itemid=");
  
  if (!_privleges->check("ViewCosts"))
  {
    _currentStdCostLit->hide();
    _currentActCostLit->hide();
    _maxCostLit->hide();
    _currentStdCost->hide();
    _currentActCost->hide();
    _maxCost->hide();
  }
  
  connect(omfgThis, SIGNAL(bomsUpdated(int, bool)), SLOT(sFillList(int, bool)));
}
Пример #5
0
void boo::sPopulateMenu(QMenu *pMenu)
{
  pMenu->insertItem(tr("View"), this, SLOT(sView()), 0);

  if ( ((_mode == cNew) || (_mode == cEdit)) &&
       (_privleges->check("MaintainBOOs")) )
  {
    pMenu->insertItem(tr("Edit"), this, SLOT(sEdit()), 0);
    pMenu->insertItem(tr("Expire"), this, SLOT(sExpire()), 0);

    pMenu->insertSeparator();

    pMenu->insertItem(tr("Move Up"),   this, SLOT(sMoveUp()), 0);
    pMenu->insertItem(tr("Move Down"), this, SLOT(sMoveDown()), 0);
  }
}
Пример #6
0
void BOM::sPopulateMenu(QMenu *menuThis)
{
  menuThis->insertItem(tr("View"), this, SLOT(sView()), 0);
  
  if ((_mode == cNew) || (_mode == cEdit))
  {
    menuThis->insertItem(tr("Edit"), this, SLOT(sEdit()), 0);
    menuThis->insertItem(tr("Expire"), this, SLOT(sExpire()), 0);
    menuThis->insertItem(tr("Replace"), this, SLOT(sReplace()), 0);
    
    menuThis->insertSeparator();
    
    menuThis->insertItem(tr("Move Up"),   this, SLOT(sMoveUp()), 0);
    menuThis->insertItem(tr("Move Down"), this, SLOT(sMoveDown()), 0);
  }
}
massExpireComponent::massExpireComponent(QWidget* parent, const char* name, Qt::WindowFlags fl)
  : XWidget(parent, name, fl)
{
  setupUi(this);

  _captive = false;

  _original->setType(ItemLineEdit::cGeneralComponents);

  _expireAsOf->setNullString(tr("Immediate"));
  _expireAsOf->setNullDate(omfgThis->dbDate());
  _expireAsOf->setAllowNullDate(true);
  _expireAsOf->setNull();

  connect(_expire, SIGNAL(clicked()), this, SLOT(sExpire()));
  connect(_close, SIGNAL(clicked()), this, SLOT(close()));
}
Пример #8
0
/*
 *  Constructs a boo as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
boo::boo(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
  setupUi(this);

  (void)statusBar();

  // signals and slots connections
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_moveDown, SIGNAL(clicked()), this, SLOT(sMoveDown()));
  connect(_moveUp, SIGNAL(clicked()), this, SLOT(sMoveUp()));
  connect(_item, SIGNAL(newId(int)), this, SLOT(sFillList()));
  connect(_revision, SIGNAL(newId(int)), this, SLOT(sFillList()));
  connect(_close, SIGNAL(clicked()), this, SLOT(close()));
  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  connect(_booitem, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool)));
  connect(_showExpired, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_showFuture, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_booitem, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_expire, SIGNAL(clicked()), this, SLOT(sExpire()));

  statusBar()->hide();

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

  _booitem->addColumn(tr("#"),           _seqColumn,  Qt::AlignCenter );
  _booitem->addColumn(tr("Std Oper."),   _itemColumn, Qt::AlignLeft   );
  _booitem->addColumn(tr("Work Cntr."),  _itemColumn, Qt::AlignLeft   );
  _booitem->addColumn(tr("Description"), -1,          Qt::AlignLeft   );
  _booitem->addColumn(tr("Effective"),   _dateColumn, Qt::AlignCenter );
  _booitem->addColumn(tr("Expires"),     _dateColumn, Qt::AlignCenter );
  _booitem->addColumn(tr("Exec. Day"),   _qtyColumn,  Qt::AlignCenter );
  
  connect(omfgThis, SIGNAL(boosUpdated(int, bool)), this, SLOT(sFillList(int, bool)));

  _activate->hide();
  _revision->setMode(RevisionLineEdit::Maintain);
  _revision->setType("BOO");
}
Пример #9
0
/*
 *  Constructs a taxCode 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.
 */
taxCode::taxCode(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); 
  connect(_code, SIGNAL(lostFocus()), this, SLOT(sCheck())); 
  connect(_taxClass, SIGNAL(newID(int)), this, SLOT(populateBasis()));
  connect(_taxitems, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
  connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); 
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); 
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_expire, SIGNAL(clicked()), this, SLOT(sExpire())); 
  connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
  
  _taxitems->addColumn(tr("Effective"), _dateColumn, Qt::AlignLeft, true, "effective" );
  _taxitems->addColumn(tr("Expires"), _dateColumn, Qt::AlignLeft, true, "expires" );
  _taxitems->addColumn(tr("Percent"), 70, Qt::AlignLeft, true, "taxrate_percent" );
  _taxitems->addColumn(tr("Amount"), 70, Qt::AlignLeft, true, "taxrate_amount" );
  _taxitems->addColumn(tr("Currency"), -1, Qt::AlignLeft, true, "curr_name" );
  sFillList(); 
}
Пример #10
0
void BOM::sPopulateMenu(QMenu *menuThis)
{
    menuThis->addAction(tr("View"), this, SLOT(sView()));

    if ((_mode == cNew) || (_mode == cEdit))
    {
        menuThis->addAction(tr("Edit"), this, SLOT(sEdit()));
        menuThis->addAction(tr("Expire"), this, SLOT(sExpire()));
        menuThis->addAction(tr("Replace"), this, SLOT(sReplace()));

        if (_metrics->boolean("AllowBOMItemDelete"))
        {
            menuThis->addSeparator();

            menuThis->addAction(tr("Delete"), this, SLOT(sDelete()));
        }

        menuThis->addSeparator();

        menuThis->addAction(tr("Move Up"),   this, SLOT(sMoveUp()));
        menuThis->addAction(tr("Move Down"), this, SLOT(sMoveDown()));
    }
}
Пример #11
0
BOM::BOM(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
    setupUi(this);

    connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_moveUp, SIGNAL(clicked()), this, SLOT(sMoveUp()));
    connect(_moveDown, SIGNAL(clicked()), this, SLOT(sMoveDown()));
    connect(_item, SIGNAL(newId(int)), this, SLOT(sFillList()));
    connect(_revision, SIGNAL(newId(int)), this, SLOT(sFillList()));
    connect(_showExpired, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
    connect(_showFuture, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
    connect(_bomitem, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
    connect(_close, SIGNAL(clicked()), this, SLOT(sClose()));
    connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
    connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
    connect(_expire, SIGNAL(clicked()), this, SLOT(sExpire()));

    _totalQtyPerCache = 0.0;

    _item->setType(ItemLineEdit::cGeneralManufactured | ItemLineEdit::cGeneralPurchased |
                   ItemLineEdit::cPhantom | ItemLineEdit::cKit |
                   ItemLineEdit::cPlanning |
                   ItemLineEdit::cTooling);
    _batchSize->setValidator(omfgThis->qtyVal());
    _requiredQtyPer->setValidator(omfgThis->qtyPerVal());
    _nonPickNumber->setPrecision(omfgThis->qtyVal());
    _nonPickQtyPer->setPrecision(omfgThis->qtyPerVal());
    _pickNumber->setPrecision(omfgThis->qtyVal());
    _pickQtyPer->setPrecision(omfgThis->qtyPerVal());
    _totalNumber->setPrecision(omfgThis->qtyVal());
    _totalQtyPer->setPrecision(omfgThis->qtyPerVal());
    _currentStdCost->setPrecision(omfgThis->costVal());
    _currentActCost->setPrecision(omfgThis->costVal());
    _maxCost->setPrecision(omfgThis->costVal());

    _bomitem->addColumn(tr("#"),            _seqColumn,   Qt::AlignCenter, true, "bomitem_seqnumber");
    _bomitem->addColumn(tr("Item Number"),  _itemColumn,  Qt::AlignLeft,   true, "item_number");
    _bomitem->addColumn(tr("Description"),  -1,           Qt::AlignLeft,   true, "item_description");
    _bomitem->addColumn(tr("Type"),         _itemColumn,  Qt::AlignCenter, true, "itemtype");
    _bomitem->addColumn(tr("Issue UOM"),    _uomColumn,   Qt::AlignCenter, true, "issueuom");
    _bomitem->addColumn(tr("Issue Method"), _itemColumn,  Qt::AlignCenter, true, "issuemethod");
    _bomitem->addColumn(tr("Fixd. Qty."),   _qtyColumn,   Qt::AlignRight,  true, "bomitem_qtyfxd" );
    _bomitem->addColumn(tr("Qty. Per"),     _qtyColumn,   Qt::AlignRight,  true, "bomitem_qtyper" );
    _bomitem->addColumn(tr("Scrap %"),      _prcntColumn, Qt::AlignRight,  true, "bomitem_scrap" );
    _bomitem->addColumn(tr("Effective"),    _dateColumn,  Qt::AlignCenter, true, "effective");
    _bomitem->addColumn(tr("Expires"),      _dateColumn,  Qt::AlignCenter, true, "expires");
    _bomitem->addColumn(tr("Notes"),        _itemColumn,  Qt::AlignLeft,  false, "bomitem_notes"   );
    _bomitem->addColumn(tr("Reference"),    _itemColumn,  Qt::AlignLeft,  false, "bomitem_ref"   );
    _bomitem->setDragString("bomid=");
    _bomitem->setAltDragString("itemid=");

    if (!_privileges->check("ViewCosts"))
    {
        _currentStdCostLit->hide();
        _currentActCostLit->hide();
        _maxCostLit->hide();
        _currentStdCost->hide();
        _currentActCost->hide();
        _maxCost->hide();
    }

    connect(omfgThis, SIGNAL(bomsUpdated(int, bool)), SLOT(sFillList(int, bool)));
    _activate->hide();
    _revision->setMode(RevisionLineEdit::Maintain);
    _revision->setType("BOM");
}