creditMemo::creditMemo(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_memoNumber, SIGNAL(lostFocus()), this, SLOT(sCheckCreditMemoNumber())); connect(_copyToShipto, SIGNAL(clicked()), this, SLOT(sCopyToShipto())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_invoiceList, SIGNAL(clicked()), this, SLOT(sInvoiceList())); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_shipToNumber, SIGNAL(lostFocus()), this, SLOT(sParseShipToNumber())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_shipToList, SIGNAL(clicked()), this, SLOT(sShipToList())); connect(_taxLit, SIGNAL(leftClickedURL(const QString&)), this, SLOT(sTaxDetail())); connect(_subtotal, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_tax, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_miscCharge, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sFreightChanged())); connect(_taxauth, SIGNAL(newID(int)), this, SLOT(sTaxAuthChanged())); #ifndef Q_WS_MAC _invoiceList->setMaximumWidth(25); _shipToList->setMaximumWidth(25); #endif _taxcurrid = -1; _custtaxauthid = -1; _taxauthidCache = -1; _taxCache.clear(); _shiptoid = -1; _memoNumber->setValidator(omfgThis->orderVal()); _commission->setValidator(omfgThis->scrapVal()); _currency->setLabel(_currencyLit); _cmitem->addColumn(tr("#"), _seqColumn, Qt::AlignCenter, true, "cmitem_linenumber" ); _cmitem->addColumn(tr("Item"), _itemColumn, Qt::AlignLeft, true, "item_number" ); _cmitem->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "description" ); _cmitem->addColumn(tr("Site"), _whsColumn, Qt::AlignCenter, true, "warehous_code" ); _cmitem->addColumn(tr("Qty UOM"), _uomColumn, Qt::AlignLeft, true, "qtyuom" ); _cmitem->addColumn(tr("Returned"), _qtyColumn, Qt::AlignRight, true, "cmitem_qtyreturned" ); _cmitem->addColumn(tr("Credited"), _qtyColumn, Qt::AlignRight, true, "cmitem_qtycredit" ); _cmitem->addColumn(tr("Price UOM"), _uomColumn, Qt::AlignLeft, true, "priceuom" ); _cmitem->addColumn(tr("Price"), _priceColumn, Qt::AlignRight, true, "cmitem_unitprice" ); _cmitem->addColumn(tr("Extended"), _moneyColumn, Qt::AlignRight, true, "extprice" ); }
invoice::invoice(QWidget* parent, const char* name, Qt::WFlags fl) : QMainWindow(parent, fl) { if(name) setObjectName(name); setupUi(this); (void)statusBar(); connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_cust, SIGNAL(newId(int)), this, SLOT(sPopulateCustomerInfo(int))); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_shipToList, SIGNAL(clicked()), this, SLOT(sShipToList())); connect(_copyToShipto, SIGNAL(clicked()), this, SLOT(sCopyToShipto())); connect(_taxLit, SIGNAL(leftClickedURL(const QString&)), this, SLOT(sTaxDetail())); connect(_shipToNumber, SIGNAL(lostFocus()), this, SLOT(sParseShipToNumber())); connect(_shipToNumber, SIGNAL(returnPressed()), this, SLOT(sParseShipToNumber())); connect(_shipToName, SIGNAL(textChanged(const QString&)), this, SLOT(sShipToModified())); connect(_subtotal, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_tax, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_miscAmount, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sFreightChanged())); connect(_allocatedCM, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_outstandingCM, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_authCC, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_shipToAddr, SIGNAL(changed()), this, SLOT(sShipToModified())); connect(_shipToPhone, SIGNAL(textChanged(const QString&)), this, SLOT(sShipToModified())); connect(_authCC, SIGNAL(idChanged(int)), this, SLOT(populateCCInfo())); connect(_allocatedCM, SIGNAL(idChanged(int)), this, SLOT(populateCMInfo())); connect(_outstandingCM, SIGNAL(idChanged(int)), this, SLOT(populateCMInfo())); connect(_authCC, SIGNAL(effectiveChanged(const QDate&)), this, SLOT(populateCCInfo())); connect(_allocatedCM, SIGNAL(effectiveChanged(const QDate&)), this, SLOT(populateCMInfo())); connect(_outstandingCM, SIGNAL(effectiveChanged(const QDate&)), this, SLOT(populateCMInfo())); connect(_invcitem, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_invcitem, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_invcitem, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); connect(_taxauth, SIGNAL(newID(int)), this, SLOT(sTaxAuthChanged())); statusBar()->hide(); setFreeFormShipto(false); #ifndef Q_WS_MAC _shipToList->setMaximumWidth(25); #endif _taxCache.clear(); _custtaxauthid = -1; _invcheadid = -1; _shiptoid = -1; _taxauthidCache = -1; _loading = false; _invcitem->addColumn(tr("#"), _seqColumn, Qt::AlignCenter ); _invcitem->addColumn(tr("Item"), _itemColumn, Qt::AlignLeft ); _invcitem->addColumn(tr("Description"), -1, Qt::AlignLeft ); _invcitem->addColumn(tr("Qty. UOM"), _uomColumn, Qt::AlignLeft ); _invcitem->addColumn(tr("Ordered"), _qtyColumn, Qt::AlignRight ); _invcitem->addColumn(tr("Billed"), _qtyColumn, Qt::AlignRight ); _invcitem->addColumn(tr("Price UOM"), _uomColumn, Qt::AlignLeft ); _invcitem->addColumn(tr("Price"), _moneyColumn, Qt::AlignRight ); _invcitem->addColumn(tr("Extended"), _bigMoneyColumn, Qt::AlignRight ); _custCurrency->setLabel(_custCurrencyLit); _project->setType(ProjectLineEdit::SalesOrder); if(!_metrics->boolean("UseProjects")) _project->hide(); }
invoice::invoice(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, fl) { if(name) setObjectName(name); setupUi(this); connect(_close, SIGNAL(clicked()), this, SLOT(sClose())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_cust, SIGNAL(newId(int)), this, SLOT(sPopulateCustomerInfo(int))); connect(_new, SIGNAL(clicked()), this, SLOT(sNew())); connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit())); connect(_view, SIGNAL(clicked()), this, SLOT(sView())); connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete())); connect(_shipToList, SIGNAL(clicked()), this, SLOT(sShipToList())); connect(_copyToShipto, SIGNAL(clicked()), this, SLOT(sCopyToShipto())); connect(_taxLit, SIGNAL(leftClickedURL(const QString&)), this, SLOT(sTaxDetail())); connect(_shipToNumber, SIGNAL(lostFocus()), this, SLOT(sParseShipToNumber())); connect(_shipToNumber, SIGNAL(returnPressed()), this, SLOT(sParseShipToNumber())); connect(_shipToName, SIGNAL(textChanged(const QString&)), this, SLOT(sShipToModified())); connect(_subtotal, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_tax, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_miscAmount, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_freight, SIGNAL(valueChanged()), this, SLOT(sFreightChanged())); connect(_allocatedCM, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_outstandingCM, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_authCC, SIGNAL(valueChanged()), this, SLOT(sCalculateTotal())); connect(_shipToAddr, SIGNAL(changed()), this, SLOT(sShipToModified())); connect(_shipToPhone, SIGNAL(textChanged(const QString&)), this, SLOT(sShipToModified())); connect(_authCC, SIGNAL(idChanged(int)), this, SLOT(populateCCInfo())); connect(_allocatedCM, SIGNAL(idChanged(int)), this, SLOT(populateCMInfo())); connect(_outstandingCM, SIGNAL(idChanged(int)), this, SLOT(populateCMInfo())); connect(_authCC, SIGNAL(effectiveChanged(const QDate&)), this, SLOT(populateCCInfo())); connect(_allocatedCM, SIGNAL(effectiveChanged(const QDate&)), this, SLOT(populateCMInfo())); connect(_outstandingCM, SIGNAL(effectiveChanged(const QDate&)), this, SLOT(populateCMInfo())); connect(_invcitem, SIGNAL(valid(bool)), _edit, SLOT(setEnabled(bool))); connect(_invcitem, SIGNAL(valid(bool)), _delete, SLOT(setEnabled(bool))); connect(_invcitem, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick())); connect(_taxzone, SIGNAL(newID(int)), this, SLOT(sTaxZoneChanged())); connect(_shipChrgs, SIGNAL(newID(int)), this, SLOT(sHandleShipchrg(int))); connect(_cust, SIGNAL(newCrmacctId(int)), _billToAddr, SLOT(setSearchAcct(int))); connect(_cust, SIGNAL(newCrmacctId(int)), _shipToAddr, SLOT(setSearchAcct(int))); setFreeFormShipto(false); #ifndef Q_WS_MAC _shipToList->setMaximumWidth(25); #endif _custtaxzoneid = -1; _invcheadid = -1; _shiptoid = -1; _taxzoneidCache = -1; _loading = false; _freightCache = 0; _invcitem->addColumn(tr("#"), _seqColumn, Qt::AlignCenter, true, "invcitem_linenumber" ); _invcitem->addColumn(tr("Order #"), _itemColumn, Qt::AlignLeft, true, "soitemnumber" ); _invcitem->addColumn(tr("Item"), _itemColumn, Qt::AlignLeft, true, "itemnumber" ); _invcitem->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "itemdescription" ); _invcitem->addColumn(tr("Qty. UOM"), _uomColumn, Qt::AlignLeft, true, "qtyuom" ); _invcitem->addColumn(tr("Ordered"), _qtyColumn, Qt::AlignRight, true, "invcitem_ordered" ); _invcitem->addColumn(tr("Billed"), _qtyColumn, Qt::AlignRight, true, "invcitem_billed" ); _invcitem->addColumn(tr("Price UOM"), _uomColumn, Qt::AlignLeft, true, "priceuom" ); _invcitem->addColumn(tr("Price"), _moneyColumn, Qt::AlignRight, true, "invcitem_price" ); _invcitem->addColumn(tr("Extended"), _bigMoneyColumn, Qt::AlignRight, true, "extprice" ); _custCurrency->setLabel(_custCurrencyLit); _project->setType(ProjectLineEdit::SalesOrder); if(!_metrics->boolean("UseProjects")) _project->hide(); _miscAmount->setAllowNegative(true); _commission->setValidator(omfgThis->percentVal()); _weight->setValidator(omfgThis->weightVal()); _paymentLit->hide(); _payment->hide(); // Issue 9895: if no objections over time, we should ultimately remove this. _recurring->setParent(-1, "I"); _recurring->setMax(_metrics->value("RecurringInvoiceBuffer").toInt()); }