void unpostedPurchaseOrders::sPopulateMenu(QMenu *pMenu, QTreeWidgetItem *pItem) { int menuItem; bool canMaintain = (pItem->text(3) == "U" && _privleges->check("MaintainPurchaseOrders")) || (pItem->text(3) == "O" && _privleges->check("MaintainPostedPurchaseOrders")); menuItem = pMenu->insertItem(tr("Edit..."), this, SLOT(sEdit()), 0); pMenu->setItemEnabled(menuItem, canMaintain); menuItem = pMenu->insertItem(tr("View..."), this, SLOT(sView()), 0); pMenu->setItemEnabled(menuItem, canMaintain || _privleges->check("ViewPurchaseOrders")); menuItem = pMenu->insertItem(tr("Delete..."), this, SLOT(sDelete()), 0); pMenu->setItemEnabled(menuItem, (pItem->text(3) == "U" && _privleges->check("MaintainPurchaseOrders"))); pMenu->insertSeparator(); menuItem = pMenu->insertItem(tr("Print..."), this, SLOT(sPrint()), 0); pMenu->setItemEnabled(menuItem, canMaintain); if (_metrics->boolean("EnableBatchManager")) { menuItem = pMenu->insertItem(tr("Deliver..."), this, SLOT(sDeliver()), 0); pMenu->setItemEnabled(menuItem, canMaintain); } menuItem = pMenu->insertItem(tr("Post..."), this, SLOT(sPost()), 0); pMenu->setItemEnabled(menuItem, _privleges->check("PostPurchaseOrders") && pItem->text(3) == "U"); }
enterPoReturn::enterPoReturn(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_enter, SIGNAL(clicked()), this, SLOT(sEnter())); connect(_po, SIGNAL(newId(int, const QString&)), this, SLOT(sFillList())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); _poitem->addColumn(tr("#"), _whsColumn, Qt::AlignCenter , true, "poitem_linenumber"); _poitem->addColumn(tr("Site"), _whsColumn, Qt::AlignLeft , true, "warehous_code"); _poitem->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft , true, "item_number"); _poitem->addColumn(tr("Description"), -1, Qt::AlignLeft , true, "itemdescription"); _poitem->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter , true, "inv_uom"); _poitem->addColumn(tr("Vend. Item #"), -1, Qt::AlignLeft , true, "poitem_vend_item_number"); _poitem->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter , true, "poitem_vend_uom"); _poitem->addColumn(tr("Ordered"), _qtyColumn, Qt::AlignRight , true, "poitem_qty_ordered"); _poitem->addColumn(tr("Received"), _qtyColumn, Qt::AlignRight , true, "poitem_qty_received"); _poitem->addColumn(tr("Returned"), _qtyColumn, Qt::AlignRight , true, "poitem_qty_returned"); _poitem->addColumn(tr("To Return"), _qtyColumn, Qt::AlignRight , true, "poitem_qty_toreturn"); _captive = false; _dropshipWarn = new XErrorMessage(this); _returnAddr->setEnabled(_printReport->isChecked()); _po->setAllowedStatuses(OrderLineEdit::Open | OrderLineEdit::Closed); _po->setAllowedTypes(OrderLineEdit::Purchase); _po->setLockSelected(true); if (_metrics->boolean("EnableDropShipments")) _dropShip->setEnabled(FALSE); else _dropShip->hide(); }
standardJournalGroups::standardJournalGroups(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); // 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(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_stdjrnlgrp, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*))); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_stdjrnlgrp, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool))); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); if (_privileges->check("MaintainStandardJournalGroups")) { connect(_stdjrnlgrp, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_stdjrnlgrp, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_stdjrnlgrp, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); } else _new->setEnabled(FALSE); if (_privileges->check("PostStandardJournalGroups")) connect(_stdjrnlgrp, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool))); _stdjrnlgrp->addColumn(tr("Name"), _itemColumn, Qt::AlignLeft, true, "stdjrnlgrp_name" ); _stdjrnlgrp->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "stdjrnlgrp_descrip" ); sFillList(); }
applyAPCreditMemo::applyAPCreditMemo(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_apply, SIGNAL(clicked()), this, SLOT(sApply())); connect(_applyToBalance, SIGNAL(clicked()), this, SLOT(sApplyBalance())); connect(_available, SIGNAL(idChanged(int)), this, SLOT(sPriceGroup())); connect(_clear, SIGNAL(clicked()), this, SLOT(sClear())); connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); _captive = FALSE; _apopen->addColumn(tr("Doc. Type"), _docTypeColumn, Qt::AlignCenter,true, "doctype"); _apopen->addColumn(tr("Doc. Number"), -1, Qt::AlignCenter,true, "apopen_docnumber"); _apopen->addColumn(tr("Doc. Date"), _dateColumn, Qt::AlignCenter,true, "apopen_docdate"); _apopen->addColumn(tr("Due Date"), _dateColumn, Qt::AlignCenter,true, "apopen_duedate"); _apopen->addColumn(tr("Open"), _moneyColumn, Qt::AlignRight, true, "openamount"); _apopen->addColumn(tr("Currency"), _currencyColumn, Qt::AlignLeft, true, "opencurrabbr"); _apopen->addColumn(tr("Applied"), _moneyColumn, Qt::AlignRight, true, "apcreditapply_amount"); _apopen->addColumn(tr("Currency"), _currencyColumn, Qt::AlignLeft, true, "appliedcurrabbr"); if (omfgThis->singleCurrency()) { _apopen->hideColumn("opencurrabbr"); _apopen->hideColumn("appliedcurrabbr"); } _vend->setReadOnly(TRUE); sPriceGroup(); }
unpostedInvoices::unpostedInvoices(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(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_invchead, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*))); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_query, SIGNAL(clicked()), this, SLOT(sFillList())); _invchead->addColumn(tr("Invoice #"), _orderColumn, Qt::AlignLeft, true, "invchead_invcnumber" ); _invchead->addColumn(tr("Prnt'd"), _orderColumn, Qt::AlignCenter, true, "invchead_printed" ); _invchead->addColumn(tr("S/O #"), _orderColumn, Qt::AlignLeft, true, "invchead_ordernumber" ); _invchead->addColumn(tr("Customer"), -1, Qt::AlignLeft, true, "cust_name" ); _invchead->addColumn(tr("Ship-to"), 100, Qt::AlignLeft, false, "invchead_shipto_name" ); _invchead->addColumn(tr("Invc. Date"), _dateColumn, Qt::AlignCenter, true, "invchead_invcdate" ); _invchead->addColumn(tr("Ship Date"), _dateColumn, Qt::AlignCenter, true, "invchead_shipdate" ); _invchead->addColumn(tr("G/L Dist Date"),_dateColumn,Qt::AlignCenter, true, "gldistdate" ); _invchead->addColumn(tr("Recurring"), _ynColumn, Qt::AlignCenter, false, "isRecurring" ); _invchead->addColumn(tr("Ship Date"), _dateColumn, Qt::AlignCenter, false, "invchead_shipdate" ); _invchead->addColumn(tr("P/O #"), _orderColumn, Qt::AlignCenter, false, "invchead_ponumber" ); _invchead->addColumn(tr("Total Amount"), _bigMoneyColumn, Qt::AlignRight, true, "extprice" ); _invchead->setSelectionMode(QAbstractItemView::ExtendedSelection); if (! _privileges->check("ChangeARInvcDistDate")) _invchead->hideColumn(7); if (_privileges->check("MaintainMiscInvoices")) { _new->setEnabled(TRUE); connect(_invchead, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_invchead, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_invchead, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); } else connect(_invchead, SIGNAL(itemSelected(int)), _view, SLOT(animateClick())); if (_privileges->check("MaintainMiscInvoices") || _privileges->check("ViewMiscInvoices")) connect(_invchead, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool))); if (_privileges->check("PrintInvoices")) connect(_invchead, SIGNAL(valid(bool)), _print, SLOT(setEnabled(bool))); if (_privileges->check("PostMiscInvoices")) { connect(_invchead, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool))); connect(_invchead, SIGNAL(valid(bool)), _printJournal, SLOT(setEnabled(bool))); } connect(omfgThis, SIGNAL(invoicesUpdated(int, bool)), this, SLOT(sFillList())); if (_preferences->boolean("XCheckBox/forgetful")) _printJournal->setChecked(true); sFillList(); }
void unpostedInvoices::sPopulateMenu(QMenu *pMenu) { QAction *menuItem; menuItem = pMenu->addAction(tr("Edit..."), this, SLOT(sEdit())); if (!_privileges->check("MaintainMiscInvoices")) menuItem->setEnabled(false); menuItem = pMenu->addAction(tr("View..."), this, SLOT(sView())); if ((!_privileges->check("MaintainMiscInvoices")) && (!_privileges->check("ViewMiscInvoices"))) menuItem->setEnabled(false); menuItem = pMenu->addAction(tr("Delete..."), this, SLOT(sDelete())); if (!_privileges->check("MaintainMiscInvoices")) menuItem->setEnabled(false); pMenu->addSeparator(); menuItem = pMenu->addAction(tr("Print..."), this, SLOT(sPrint())); if (!_privileges->check("PrintInvoices")) menuItem->setEnabled(false); menuItem = pMenu->addAction(tr("Post..."), this, SLOT(sPost())); if (!_privileges->check("PostMiscInvoices")) menuItem->setEnabled(false); }
unpostedGlSeries::unpostedGlSeries(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_glseries, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*))); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(omfgThis, SIGNAL(glSeriesUpdated()), this, SLOT(sFillList())); _glseries->addColumn(tr("Date"), _dateColumn, Qt::AlignCenter ); _glseries->addColumn(tr("Source"), _orderColumn, Qt::AlignCenter ); _glseries->addColumn(tr("Doc. Type"), _docTypeColumn,Qt::AlignCenter ); _glseries->addColumn(tr("Doc. #"), _orderColumn, Qt::AlignCenter ); _glseries->addColumn(tr("Reference"), -1, Qt::AlignLeft ); _glseries->addColumn(tr("Account"), -1, Qt::AlignLeft ); _glseries->addColumn(tr("Debit"), _moneyColumn, Qt::AlignRight ); _glseries->addColumn(tr("Credit"), _moneyColumn, Qt::AlignRight ); sFillList(); }
postCostsByClassCode::postCostsByClassCode(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_selectAll, SIGNAL(clicked()), this, SLOT(sSelectAll())); connect(_close, SIGNAL(clicked()), this, SLOT(reject())); connect(_submit, SIGNAL(clicked()), this, SLOT(sSubmit())); if (!_metrics->boolean("EnableBatchManager")) _submit->hide(); _classCode->setType(ParameterGroup::ClassCode); if (!_metrics->boolean("Routings")) { _directLabor->hide(); _lowerDirectLabor->hide(); _overhead->hide(); _lowerOverhead->hide(); _machOverhead->hide(); _lowerMachOverhead->hide(); } else if (_metrics->value("TrackMachineOverhead") != "M") { _machOverhead->setEnabled(FALSE); _machOverhead->setChecked(TRUE); _lowerMachOverhead->setEnabled(FALSE); _lowerMachOverhead->setChecked(TRUE); } }
enterPoReturn::enterPoReturn(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); connect(_enter, SIGNAL(clicked()), this, SLOT(sEnter())); connect(_po, SIGNAL(newId(int)), this, SLOT(sFillList())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_showClosed,SIGNAL(toggled(bool)), this, SLOT(sShowClosed())); sShowClosed(); _poitem->addColumn(tr("#"), _whsColumn, Qt::AlignCenter ); _poitem->addColumn(tr("Site"), _whsColumn, Qt::AlignLeft ); _poitem->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft ); _poitem->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter ); _poitem->addColumn(tr("Vend. Item #"), -1, Qt::AlignLeft ); _poitem->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter ); _poitem->addColumn(tr("Ordered"), _qtyColumn, Qt::AlignRight ); _poitem->addColumn(tr("Received"), _qtyColumn, Qt::AlignRight ); _poitem->addColumn(tr("Returned"), _qtyColumn, Qt::AlignRight ); _poitem->addColumn(tr("To Return"), _qtyColumn, Qt::AlignRight ); _returnAddr->setEnabled(_printReport->isChecked()); }
void unpostedInvoices::sPopulateMenu(QMenu *pMenu) { int menuItem; menuItem = pMenu->insertItem(tr("Edit..."), this, SLOT(sEdit()), 0); if (!_privileges->check("MaintainMiscInvoices")) pMenu->setItemEnabled(menuItem, FALSE); menuItem = pMenu->insertItem(tr("View..."), this, SLOT(sView()), 0); if ((!_privileges->check("MaintainMiscInvoices")) && (!_privileges->check("ViewMiscInvoices"))) pMenu->setItemEnabled(menuItem, FALSE); menuItem = pMenu->insertItem(tr("Delete..."), this, SLOT(sDelete()), 0); if (!_privileges->check("MaintainMiscInvoices")) pMenu->setItemEnabled(menuItem, FALSE); pMenu->insertSeparator(); menuItem = pMenu->insertItem(tr("Print..."), this, SLOT(sPrint()), 0); if (!_privileges->check("PrintInvoices")) pMenu->setItemEnabled(menuItem, FALSE); menuItem = pMenu->insertItem(tr("Post..."), this, SLOT(sPost()), 0); if (!_privileges->check("PostMiscInvoices")) pMenu->setItemEnabled(menuItem, FALSE); }
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(); }
dspCountTagEditList::dspCountTagEditList(QWidget* parent, const char* name, Qt::WFlags fl) : XMainWindow(parent, name, fl) { setupUi(this); _highlightGroupInt = new QButtonGroup(this); _highlightGroupInt->addButton(_noHighlight); _highlightGroupInt->addButton(_highlightValue); _highlightGroupInt->addButton(_highlightPercent); _codeGroup = new QButtonGroup(this); _codeGroup->addButton(_plancode); _codeGroup->addButton(_classcode); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_showSlips, SIGNAL(clicked()), this, SLOT(sToggleList())); connect(_enterSlip, SIGNAL(clicked()), this, SLOT(sEnterCountSlip())); connect(_cnttag, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*))); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_searchFor, SIGNAL(textChanged(const QString&)), this, SLOT(sSearch(const QString&))); connect(_autoUpdate, SIGNAL(toggled(bool)), this, SLOT(sHandleAutoUpdate(bool))); connect(_query, SIGNAL(clicked()), this, SLOT(sFillList())); connect(_codeGroup, SIGNAL(buttonClicked(int)), this, SLOT(sParameterTypeChanged())); _parameter->setType(ClassCode); _cnttag->setRootIsDecorated(TRUE); _cnttag->addColumn(tr("Pri."), (_whsColumn + 10), Qt::AlignCenter ); _cnttag->addColumn(tr("Tag/Slip #"), _orderColumn, Qt::AlignRight ); _cnttag->addColumn(tr("Tag Date"), _dateColumn, Qt::AlignCenter ); _cnttag->addColumn(tr("Item Number"), -1, Qt::AlignLeft ); _cnttag->addColumn(tr("Whs."), _whsColumn, Qt::AlignCenter ); _cnttag->addColumn(tr("Location"), _ynColumn, Qt::AlignCenter ); _cnttag->addColumn(tr("QOH"), _qtyColumn, Qt::AlignRight ); _cnttag->addColumn(tr("Count Qty."), _qtyColumn, Qt::AlignRight ); _cnttag->addColumn(tr("Variance"), _qtyColumn, Qt::AlignRight ); _cnttag->addColumn(tr("%"), _prcntColumn, Qt::AlignRight ); _cnttag->addColumn(tr("Amount"), _costColumn, Qt::AlignRight ); _cnttag->setIndentation(10); if (_privileges->check("EnterCountTags")) { connect(_cnttag, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); connect(_cnttag, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); } if (_privileges->check("DeleteCountTags")) connect(_cnttag, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); if (_privileges->check("PostCountTags")) connect(_cnttag, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool))); if (_privileges->check("EnterCountSlips")) connect(_cnttag, SIGNAL(valid(bool)), _enterSlip, SLOT(setEnabled(bool))); _searchFor->setFocus(); }
postCashReceipts::postCashReceipts(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_close, SIGNAL(clicked()), this, SLOT(close())); }
enterPoReceipt::enterPoReceipt(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_all, SIGNAL(clicked()), this, SLOT(sReceiveAll())); connect(_enter, SIGNAL(clicked()), this, SLOT(sEnter())); connect(_order, SIGNAL(valid(bool)), this, SLOT(sFillList())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_orderitem, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*, QTreeWidgetItem*))); connect(_printLabel, SIGNAL(clicked()), this, SLOT(sPrintItemLabel())); // connect(_orderitem, SIGNAL(valid(bool)), this, SLOT(sHandleButtons())); _order->setAllowedStatuses(OrderLineEdit::Open); _order->setAllowedTypes(OrderLineEdit::Purchase | OrderLineEdit::Return | OrderLineEdit::Transfer); _order->setToSitePrivsEnforced(TRUE); if (_metrics->boolean("EnableReturnAuth")) { _order->setExtraClause("RA", "(SELECT SUM(raitem_qtyauthorized) > 0 " " FROM raitem" " WHERE ((raitem_rahead_id=orderhead_id)" " AND (orderhead_type = 'RA'))) " " AND " "(SELECT TRUE " " FROM raitem" " WHERE ((raitem_rahead_id=orderhead_id)" " AND (raitem_disposition IN ('R','P','V')) " " AND (orderhead_type = 'RA')) " " LIMIT 1)"); } _order->setFocus(); _orderitem->addColumn(tr("#"), _whsColumn, Qt::AlignCenter , true, "linenumber"); _orderitem->addColumn(tr("Due Date"), _dateColumn, Qt::AlignLeft , true, "duedate"); _orderitem->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft , true, "item_number"); _orderitem->addColumn(tr("Description"), -1, Qt::AlignLeft , true, "itemdescription"); _orderitem->addColumn(tr("Inv. UOM"), _uomColumn, Qt::AlignCenter , true, "inv_uom"); _orderitem->addColumn(tr("Site"), _whsColumn, Qt::AlignCenter , true, "warehous_code"); _orderitem->addColumn(tr("Vend. Item #"), -1, Qt::AlignLeft , true, "vend_item_number"); _orderitem->addColumn(tr("Vend. UOM"), _uomColumn, Qt::AlignCenter , true, "vend_uom"); _orderitem->addColumn(tr("Manufacturer"), _orderColumn, Qt::AlignLeft , false, "manuf_name"); _orderitem->addColumn(tr("Manuf. Item#"), _orderColumn, Qt::AlignCenter, false, "manuf_item_number"); _orderitem->addColumn(tr("Ordered"), _qtyColumn, Qt::AlignRight , true, "qty_ordered"); _orderitem->addColumn(tr("Received"), _qtyColumn, Qt::AlignRight , true, "qty_received"); _orderitem->addColumn(tr("Returned"), _qtyColumn, Qt::AlignRight , true, "qty_returned"); _orderitem->addColumn(tr("To Receive"), _qtyColumn, Qt::AlignRight , true, "qty_toreceive"); _captive = FALSE; //Remove lot/serial if no lot/serial tracking if (!_metrics->boolean("LotSerialControl")) _singleLot->hide(); }
/* * Constructs a poLiabilityDistrib 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. */ poLiabilityDistrib::poLiabilityDistrib(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); }
glTransaction::glTransaction(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); _captive = FALSE; }
distributeInventory::distributeInventory(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_bcDistribute, SIGNAL(clicked()), this, SLOT(sBcDistribute())); connect(_default, SIGNAL(clicked()), this, SLOT(sDefault())); connect(_defaultAndPost, SIGNAL(clicked()), this, SLOT(sDefaultAndPost())); connect(_distribute, SIGNAL(clicked()), this, SLOT(sSelectLocation())); connect(_itemloc, SIGNAL(itemSelected(int)), this, SLOT(sSelectLocation())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_taggedOnly, SIGNAL(toggled(bool)), this, SLOT(sFillList())); connect(_bc, SIGNAL(textChanged(QString)), this, SLOT(sBcChanged(QString))); connect(_qtyOnly, SIGNAL(toggled(bool)), this, SLOT(sFillList())); omfgThis->inputManager()->notify(cBCLotSerialNumber, this, this, SLOT(sCatchLotSerialNumber(QString))); _trapClose = TRUE; _item->setReadOnly(TRUE); _qtyToDistribute->setPrecision(omfgThis->qtyVal()); _qtyTagged->setPrecision(omfgThis->qtyVal()); _qtyRemaining->setPrecision(omfgThis->qtyVal()); _itemloc->addColumn(tr("Location"), _itemColumn, Qt::AlignLeft, true, "locationname"); _itemloc->addColumn(tr("Default"), _ynColumn, Qt::AlignLeft, true, "defaultlocation"); _itemloc->addColumn(tr("Netable"), _ynColumn, Qt::AlignCenter,true, "location_netable"); _itemloc->addColumn(tr("Lot/Serial #"), -1, Qt::AlignLeft, true, "lotserial"); _itemloc->addColumn(tr("Expiration"), _dateColumn, Qt::AlignCenter,true, "f_expiration"); _itemloc->addColumn(tr("Qty. Before"), _qtyColumn, Qt::AlignRight, true, "qty"); _itemloc->addColumn(tr("Tagged Qty."), _qtyColumn, Qt::AlignRight, true, "qtytagged"); _itemloc->addColumn(tr("Qty. After"), _qtyColumn, Qt::AlignRight, true, "balance"); //If not multi-warehouse hide whs control if (!_metrics->boolean("MultiWhs")) { _warehouseLit->hide(); _warehouse->hide(); } //If not lot serial control, hide info if (!_metrics->boolean("LotSerialControl")) { _lotSerial->hide(); _lotSerialLit->hide(); _bcLit->hide(); _bc->hide(); _bcQtyLit->hide(); _bcQty->hide(); _bcDistribute->hide(); } _itemlocdistid = -1; _locationDefaultLit->hide(); _locations->hide(); }
postPurchaseOrdersByAgent::postPurchaseOrdersByAgent(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); _agent->setText(omfgThis->username()); }
void viewCheckRun::sHandleItemSelection() { XTreeWidgetItem *selected = _check->currentItem(); bool select = false; if (! selected) { _void->setEnabled(FALSE); _delete->setEnabled(FALSE); _replace->setEnabled(FALSE); select = true; _edit->setEnabled(FALSE); return; } if (selected->rawValue("checkhead_void").toBool()) { _void->setEnabled(FALSE); _delete->setEnabled(TRUE); _replace->setEnabled(TRUE); _edit->setEnabled(FALSE); } else if (! selected->rawValue("checkhead_void").isNull() && ! selected->rawValue("checkhead_void").toBool()) { // This was not allowing voiding of ACH checks. No strong case could be // made to disallow this since ACH is manuall at this time. Should that // requirement change this is the original line //_void->setEnabled(selected->rawValue("checkhead_ach_batch").isNull()); _void->setEnabled(true); _delete->setEnabled(FALSE); _replace->setEnabled(FALSE); select = selected->rawValue("checkhead_ach_batch").isNull(); _edit->setEnabled(selected->rawValue("checkhead_misc").toBool() && ! selected->rawValue("checkhead_printed").toBool()); } QMenu * printMenu = new QMenu; if (select) printMenu->addAction(tr("Selected Check..."), this, SLOT(sPrint())); if (_vendorgroup->isAll()) printMenu->addAction(tr("Check Run..."), this, SLOT(sPrintCheckRun())); printMenu->addAction(tr("Edit List"), this, SLOT(sPrintEditList())); _print->setMenu(printMenu); QMenu * postMenu = new QMenu; if (selected->rawValue("checkhead_printed").toBool() && _privileges->check("PostPayments")) postMenu->addAction(tr("Selected Check..."), this, SLOT(sPost())); if (_vendorgroup->isAll()) postMenu->addAction(tr("All Checks..."), this, SLOT(sPostChecks())); _postCheck->setMenu(postMenu); }
/* * Constructs a dspCountSlipEditList as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ dspCountSlipEditList::dspCountSlipEditList(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(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_cntslip, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*,QTreeWidgetItem*))); connect(_close, SIGNAL(clicked()), this, SLOT(close())); connect(_countTagList, SIGNAL(clicked()), this, SLOT(sCountTagList())); connect(_item, SIGNAL(warehouseIdChanged(int)), _warehouse, SLOT(setId(int))); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_postAll, SIGNAL(clicked()), this, SLOT(sPostAll())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); #ifndef Q_WS_MAC _countTagList->setMaximumWidth(25); #endif _item->setReadOnly(TRUE); _cntslip->addColumn(tr("User"), _dateColumn, Qt::AlignCenter ); _cntslip->addColumn(tr("#"), _itemColumn, Qt::AlignLeft ); _cntslip->addColumn(tr("Location"), _itemColumn, Qt::AlignLeft ); _cntslip->addColumn(tr("Lot/Serial #"), -1, Qt::AlignLeft ); _cntslip->addColumn(tr("Posted"), _ynColumn, Qt::AlignCenter ); _cntslip->addColumn(tr("Entered"), _itemColumn, Qt::AlignCenter ); _cntslip->addColumn(tr("Slip Qty."), _qtyColumn, Qt::AlignRight ); if (_privleges->check("EnterCountSlips")) { connect(_cntslip, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_item, SIGNAL(valid(bool)), _new, SLOT(setEnabled(bool))); connect(_cntslip, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); } if (_privleges->check("DeleteCountSlips")) connect(_cntslip, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); if (_privleges->check("PostCountSlips")) { connect(_cntslip, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool))); _postAll->setEnabled(TRUE); } //If not multi-warehouse hide whs control if (!_metrics->boolean("MultiWhs")) { _warehouseLit->hide(); _warehouse->hide(); } }
void dspBillingSelections::sPopulateMenu(QMenu *pMenu, QTreeWidgetItem *) { QAction *menuItem; pMenu->addAction("Edit...", this, SLOT(sEdit())); pMenu->addAction("Cancel...", this, SLOT(sCancel())); menuItem = pMenu->addAction("Create Invoice", this, SLOT(sPost())); menuItem->setEnabled(_privileges->check("PostARDocuments")); }
postVouchers::postVouchers(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); if (_preferences->boolean("XCheckBox/forgetful")) _printJournal->setChecked(true); }
unpostedInvoices::unpostedInvoices(QWidget* parent, const char* name, Qt::WFlags fl) : QMainWindow(parent, name, fl) { setupUi(this); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_invchead, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*)), this, SLOT(sPopulateMenu(QMenu*))); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); _invchead->addColumn(tr("Invoice #"), _orderColumn, Qt::AlignLeft ); _invchead->addColumn(tr("Prnt'd"), _orderColumn, Qt::AlignCenter ); _invchead->addColumn(tr("S/O #"), _orderColumn, Qt::AlignLeft ); _invchead->addColumn(tr("Customer"), -1, Qt::AlignLeft ); _invchead->addColumn(tr("Invc. Date"), _dateColumn, Qt::AlignCenter ); _invchead->addColumn(tr("Ship Date"), _dateColumn, Qt::AlignCenter ); _invchead->addColumn(tr("G/L Dist Date"), _dateColumn, Qt::AlignCenter ); _invchead->setSelectionMode(QAbstractItemView::ExtendedSelection); if (! _privleges->check("ChangeARInvcDistDate")) _invchead->hideColumn(6); if (_privleges->check("MaintainMiscInvoices")) { _new->setEnabled(TRUE); connect(_invchead, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_invchead, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_invchead, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); } else connect(_invchead, SIGNAL(itemSelected(int)), _view, SLOT(animateClick())); if (_privleges->check("MaintainMiscInvoices") || _privleges->check("ViewMiscInvoices")) connect(_invchead, SIGNAL(valid(bool)), _view, SLOT(setEnabled(bool))); if (_privleges->check("PrintInvoices")) connect(_invchead, SIGNAL(valid(bool)), _print, SLOT(setEnabled(bool))); if (_privleges->check("PostMiscInvoices")) { connect(_invchead, SIGNAL(valid(bool)), _post, SLOT(setEnabled(bool))); connect(_invchead, SIGNAL(valid(bool)), _printJournal, SLOT(setEnabled(bool))); } connect(omfgThis, SIGNAL(invoicesUpdated(int, bool)), this, SLOT(sFillList())); Preferences _pref = Preferences(omfgThis->username()); if (_pref.boolean("XCheckBox/forgetful")) _printJournal->setChecked(true); sFillList(); }
postPoReturnCreditMemo::postPoReturnCreditMemo(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); _qty->setPrecision(omfgThis->qtyVal()); _porejectid = -1; }
createInvoices::createInvoices(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_close, SIGNAL(clicked()), this, SLOT(close())); _customerType->setType(ParameterGroup::CustomerType); _post->setFocus(); }
void dspBillingSelections::sPopulateMenu(QMenu *pMenu, QTreeWidgetItem *) { int menuItem; pMenu->insertItem("Edit...", this, SLOT(sEdit()), 0); pMenu->insertItem("Cancel...", this, SLOT(sCancel()), 0); menuItem = pMenu->insertItem("Create Invoice", this, SLOT(sPost()), 0); if (!_privileges->check("PostARDocuments")) pMenu->setItemEnabled(menuItem, FALSE); }
/* * Constructs a postGLTransactionsToExternal 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. */ postGLTransactionsToExternal::postGLTransactionsToExternal(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); connect(_cancel, SIGNAL(clicked()), this, SLOT(reject())); init(); }
/* * Constructs a reverseGLSeries 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. */ reverseGLSeries::reverseGLSeries(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_cancel, SIGNAL(clicked()), this, SLOT(reject())); connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); init(); }
/* * Constructs a postPoReturnCreditMemo 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. */ postPoReturnCreditMemo::postPoReturnCreditMemo(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_post, SIGNAL(clicked()), this, SLOT(sPost())); _porejectid = -1; _post->setFocus(); }
void postSubLedger::sPopulateMenu(QMenu *pMenu, QTreeWidgetItem *) { QAction *menuItem; if (_sources->id() == 0) { menuItem = pMenu->addAction(tr("Post"), this, SLOT(sPost())); pMenu->addSeparator(); } menuItem = pMenu->addAction(tr("View Transactions..."), this, SLOT(sViewTransactions())); menuItem->setEnabled(_privileges->check("ViewSubLedger")); }