shipOrder::shipOrder(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_create, SIGNAL(toggled(bool)), this, SLOT(sCreateToggled(bool))); connect(_select, SIGNAL(toggled(bool)), this, SLOT(sSelectToggled(bool))); connect(_ship, SIGNAL(clicked()), this, SLOT(sShip())); connect(_shipment, SIGNAL(newId(int)), this, SLOT(sFillList())); connect(_shipment, SIGNAL(newId(int)), this, SLOT(sFillTracknum())); connect(_soList, SIGNAL(clicked()), this, SLOT(sSoList())); connect(_soNumber, SIGNAL(newId(int)), this, SLOT(sHandleSo())); connect(_soNumber, SIGNAL(requestList()), this, SLOT(sSoList())); connect(_toNumber, SIGNAL(newId(int)), this, SLOT(sHandleTo())); connect(_tracknum, SIGNAL(activated(const QString&)), this, SLOT(sFillFreight())); connect(_tracknum, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(sFillFreight())); connect(_tracknum, SIGNAL(highlighted(const QString&)), this, SLOT(sFillFreight())); _captive = FALSE; #ifndef Q_WS_MAC _soList->setMaximumWidth(25); #endif _coitem->addColumn( tr("#"), _whsColumn, Qt::AlignCenter ); _coitem->addColumn( tr("Item Number"), _itemColumn, Qt::AlignLeft ); _coitem->addColumn( tr("Description"), -1, Qt::AlignLeft ); _coitem->addColumn( tr("UOM"), _uomColumn, Qt::AlignCenter ); _coitem->addColumn( tr("Qty."), _qtyColumn, Qt::AlignRight ); _select->setChecked(_privileges->check("SelectBilling") && _metrics->boolean("AutoSelectForBilling")); _select->setEnabled(_privileges->check("SelectBilling")); _create->setEnabled(_privileges->check("SelectBilling")); _toNumber->setVisible(_metrics->boolean("MultiWhs")); sCreateToggled(_create->isChecked()); sHandleButtons(); _reject = false; }
selectOrderForBilling::selectOrderForBilling(QWidget* parent, const char* name, Qt::WFlags fl) : QMainWindow(parent, name, fl) { setupUi(this); (void)statusBar(); connect(_cancel, SIGNAL(clicked()), this, SLOT(sCancelSelection())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEditOrder())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sFreightChanged())); connect(_miscCharge, SIGNAL(valueChanged()), this, SLOT(sUpdateTotal())); connect(_salesTaxLit, SIGNAL(leftClickedURL(const QString&)), this, SLOT(sTaxDetail())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_select, SIGNAL(clicked()), this, SLOT(sEditSelection())); connect(_selectBalance, SIGNAL(clicked()), this, SLOT(sSelectBalance())); connect(_showClosed, SIGNAL(toggled(bool)), this, SLOT(sFillList())); connect(_so, SIGNAL(newId(int)), this, SLOT(sPopulate(int))); connect(_so, SIGNAL(requestList()), this, SLOT(sSoList())); connect(_soList, SIGNAL(clicked()), this, SLOT(sSoList())); connect(_salesTax, SIGNAL(valueChanged()), this, SLOT(sUpdateTotal())); connect(_subtotal, SIGNAL(valueChanged()), this, SLOT(sUpdateTotal())); connect(_taxauth, SIGNAL(newID(int)), this, SLOT(sTaxAuthChanged())); statusBar()->hide(); #ifndef Q_WS_MAC _soList->setMaximumWidth(25); #endif _cobmiscid = -1; _captive = FALSE; _updated = FALSE; _taxauthidCache = -1; _taxCache.clear(); _custCurrency->setLabel(_custCurrencyLit); _freight->clear(); _payment->clear(); _soitem->addColumn(tr("#"), _seqColumn, Qt::AlignCenter ); _soitem->addColumn(tr("Item"), -1, Qt::AlignLeft ); _soitem->addColumn(tr("Whs."), _whsColumn, Qt::AlignCenter ); _soitem->addColumn(tr("UOM"), _uomColumn, Qt::AlignLeft ); _soitem->addColumn(tr("Ordered"), _qtyColumn, Qt::AlignRight ); _soitem->addColumn(tr("Shipped"), _qtyColumn, Qt::AlignRight ); _soitem->addColumn(tr("Returned"), _qtyColumn, Qt::AlignRight ); _soitem->addColumn(tr("Uninvoiced"), _qtyColumn, Qt::AlignRight ); _soitem->addColumn(tr("Selected"), _qtyColumn, Qt::AlignRight ); _soitem->addColumn(tr("Extended"), _moneyColumn, Qt::AlignRight ); _soitem->addColumn(tr("Close"), _ynColumn, Qt::AlignCenter ); if (_privleges->check("MaintainSalesOrders")) connect(_so, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); if(!_privleges->check("AllowSelectOrderEditing")) { _miscCharge->setEnabled(false); _miscChargeDescription->setEnabled(false); _miscChargeAccount->setEnabled(false); } else { connect(_soitem, SIGNAL(valid(bool)), _select, SLOT(setEnabled(bool))); connect(_soitem, SIGNAL(valid(bool)), _cancel, SLOT(setEnabled(bool))); } }
selectOrderForBilling::selectOrderForBilling(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); // (void)statusBar(); connect(_cancel, SIGNAL(clicked()), this, SLOT(sCancelSelection())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEditOrder())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sFreightChanged())); connect(_miscCharge, SIGNAL(valueChanged()), this, SLOT(sUpdateTotal())); connect(_salesTaxLit, SIGNAL(leftClickedURL(const QString&)), this, SLOT(sTaxDetail())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_select, SIGNAL(clicked()), this, SLOT(sEditSelection())); connect(_selectBalance, SIGNAL(clicked()), this, SLOT(sSelectBalance())); connect(_showClosed, SIGNAL(toggled(bool)), this, SLOT(sFillList())); connect(_so, SIGNAL(newId(int)), this, SLOT(sPopulate(int))); connect(_so, SIGNAL(requestList()), this, SLOT(sSoList())); connect(_soList, SIGNAL(clicked()), this, SLOT(sSoList())); connect(_salesTax, SIGNAL(valueChanged()), this, SLOT(sUpdateTotal())); connect(_subtotal, SIGNAL(valueChanged()), this, SLOT(sUpdateTotal())); connect(_taxZone, SIGNAL(newID(int)), this, SLOT(sTaxZoneChanged())); // statusBar()->hide(); #ifndef Q_WS_MAC _soList->setMaximumWidth(25); #endif _cobmiscid = -1; _taxzoneidCache = -1; _captive = FALSE; _updated = FALSE; _freightCache = 0; _custCurrency->setLabel(_custCurrencyLit); _freight->clear(); _payment->clear(); _soitem->addColumn(tr("#"), _seqColumn, Qt::AlignCenter, true, "linenumber" ); _soitem->addColumn(tr("Item"), -1, Qt::AlignLeft , true, "item_number" ); _soitem->addColumn(tr("Site"), _whsColumn, Qt::AlignCenter, true, "warehous_code" ); _soitem->addColumn(tr("UOM"), _uomColumn, Qt::AlignLeft , true, "uom_name" ); _soitem->addColumn(tr("Ordered"), _qtyColumn, Qt::AlignRight , true, "coitem_qtyord" ); _soitem->addColumn(tr("Shipped"), _qtyColumn, Qt::AlignRight , true, "coitem_qtyshipped" ); _soitem->addColumn(tr("Returned"), _qtyColumn, Qt::AlignRight , true, "coitem_qtyreturned" ); _soitem->addColumn(tr("Uninvoiced"), _qtyColumn, Qt::AlignRight , true, "qtyatship" ); _soitem->addColumn(tr("Selected"), _qtyColumn, Qt::AlignRight , true, "qtytobill" ); _soitem->addColumn(tr("Extended"), _moneyColumn, Qt::AlignRight , true, "extended" ); _soitem->addColumn(tr("Close"), _ynColumn, Qt::AlignCenter, true, "toclose"); if (_privileges->check("MaintainSalesOrders")) connect(_so, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); if(!_privileges->check("AllowSelectOrderEditing")) { _miscCharge->setEnabled(false); _miscChargeDescription->setEnabled(false); _miscChargeAccount->setEnabled(false); } else { connect(_soitem, SIGNAL(valid(bool)), _select, SLOT(setEnabled(bool))); connect(_soitem, SIGNAL(valid(bool)), _cancel, SLOT(setEnabled(bool))); } _so->setSitePrivsEnforced(false); _paymentLit->hide(); _payment->hide(); // Issue 10254: if no objections over time, we should ultimately remove this. }