unpostedGlSeries::unpostedGlSeries(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(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, true, "glseries_distdate" ); _glseries->addColumn(tr("Source"), _orderColumn, Qt::AlignCenter, true, "glseries_source" ); _glseries->addColumn(tr("Doc. Type"), _docTypeColumn, Qt::AlignCenter, true, "glseries_doctype" ); _glseries->addColumn(tr("Doc. #"), _orderColumn, Qt::AlignCenter, true, "glseries_docnumber" ); _glseries->addColumn(tr("Reference"), -1, Qt::AlignLeft, true, "glseries_notes" ); _glseries->addColumn(tr("Account"), -1, Qt::AlignLeft, true, "account" ); _glseries->addColumn(tr("Debit"), _moneyColumn, Qt::AlignRight, true, "debit" ); _glseries->addColumn(tr("Credit"), _moneyColumn, Qt::AlignRight, true, "credit" ); sFillList(); }
reconcileBankaccount::reconcileBankaccount(QWidget* parent, const char* name, Qt::WFlags fl) : XWidget(parent, name, fl) { setupUi(this); connect(_addAdjustment, SIGNAL(clicked()), this, SLOT(sAddAdjustment())); connect(_bankaccnt, SIGNAL(newID(int)), this, SLOT(sBankaccntChanged())); connect(_cancel, SIGNAL(clicked()), this, SLOT(sCancel())); connect(_checks, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(sChecksToggleCleared())); connect(_endBal, SIGNAL(lostFocus()), this, SLOT(populate())); connect(_openBal, SIGNAL(lostFocus()), this, SLOT(populate())); connect(_receipts, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(sReceiptsToggleCleared())); connect(_reconcile, SIGNAL(clicked()), this, SLOT(sReconcile())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); connect(_update, SIGNAL(clicked()), this, SLOT(populate())); connect(_startDate, SIGNAL(newDate(QDate)), this, SLOT(sDateChanged())); connect(_endDate, SIGNAL(newDate(QDate)), this, SLOT(sDateChanged())); _receipts->addColumn(tr("Cleared"), _ynColumn * 2, Qt::AlignCenter ); _receipts->addColumn(tr("Date"), _dateColumn, Qt::AlignCenter ); _receipts->addColumn(tr("Doc. Number"), _itemColumn, Qt::AlignLeft ); _receipts->addColumn(tr("Notes"), -1, Qt::AlignLeft ); _receipts->addColumn(tr("Amount"), _bigMoneyColumn, Qt::AlignRight ); _checks->addColumn(tr("Cleared"), _ynColumn * 2, Qt::AlignCenter , true, "cleared"); _checks->addColumn(tr("Date"), _dateColumn, Qt::AlignCenter , true, "transdate"); _checks->addColumn(tr("Doc. Number"), _itemColumn, Qt::AlignLeft , true, "docnumber"); _checks->addColumn(tr("Notes"), -1, Qt::AlignLeft , true, "notes"); _checks->addColumn(tr("Amount"), _bigMoneyColumn, Qt::AlignRight , true, "amount"); _clearedReceipts->setPrecision(omfgThis->moneyVal()); _clearedChecks->setPrecision(omfgThis->moneyVal()); _endBal2->setPrecision(omfgThis->moneyVal()); _clearBal->setPrecision(omfgThis->moneyVal()); _diffBal->setPrecision(omfgThis->moneyVal()); _bankrecid = -1; // do this before _bankaccnt->populate() _bankaccntid = -1; // do this before _bankaccnt->populate() _datesAreOK = false; _bankaccnt->populate("SELECT bankaccnt_id," " (bankaccnt_name || '-' || bankaccnt_descrip) " "FROM bankaccnt " "ORDER BY bankaccnt_name;"); _currency->setLabel(_currencyLit); if (!_privileges->check("MaintainBankAdjustments")) _addAdjustment->setEnabled(FALSE); connect(omfgThis, SIGNAL(bankAdjustmentsUpdated(int, bool)), this, SLOT(populate())); connect(omfgThis, SIGNAL(checksUpdated(int, int, bool)), this, SLOT(populate())); connect(omfgThis, SIGNAL(cashReceiptsUpdated(int, bool)), this, SLOT(populate())); connect(omfgThis, SIGNAL(glSeriesUpdated()), this, SLOT(populate())); }