Exemplo n.º 1
0
VendorGroup::VendorGroup(QWidget *pParent, const char *pName) : QWidget(pParent)
{
  setObjectName(pName);

  setupUi(this);

  setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));

  _select->setCurrentIndex(All);
  _vend->setId(-1);
  _vendorTypes->setId(-1);
  _vendorType->setText("");

  connect(_select,SIGNAL(currentIndexChanged(int)), this, SIGNAL(updated()));
  connect(_select,SIGNAL(currentIndexChanged(int)), this, SIGNAL(newState(int)));
  connect(_vend,                SIGNAL(newId(int)), this, SIGNAL(updated()));
  connect(_vend,                SIGNAL(newId(int)), this, SIGNAL(newVendId(int)));
  connect(_vendorTypes,         SIGNAL(newID(int)), this, SIGNAL(updated()));
  connect(_vendorTypes,         SIGNAL(newID(int)), this, SIGNAL(newVendTypeId(int)));
  connect(_vendorType,   SIGNAL(editingFinished()), this, SIGNAL(updated()));
  connect(_vendorType,   SIGNAL(editingFinished()), this, SLOT(sTypePatternFinished()));
  connect(_vendorType,SIGNAL(textChanged(QString)), this, SIGNAL(newTypePattern(QString)));

  setFocusProxy(_select);
}
Exemplo n.º 2
0
dspCreditCardTransactions::dspCreditCardTransactions(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));
  connect(_preauth, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(sgetCCAmount()));
  connect(_postPreauth, SIGNAL(clicked()), this, SLOT(sPostPreauth()));
  connect(_voidPreauth, SIGNAL(clicked()), this, SLOT(sVoidPreauth()));
  connect(_customerSelector, SIGNAL(newState(int)), this, SLOT(sClear()));
  connect(_customerSelector, SIGNAL(newCustId(int)), this, SLOT(sClear()));
  connect(_customerSelector, SIGNAL(newCustTypeId(int)), this, SLOT(sClear()));
  connect(_customerSelector, SIGNAL(newTypePattern(QString)), this, SLOT(sClear()));
  
  _preauth->addColumn(tr("Timestamp"),   _dateColumn, Qt::AlignLeft, true,  "ccpay_transaction_datetime"  ); 
  _preauth->addColumn(tr("Cust. #"),    _orderColumn, Qt::AlignLeft,  true, "cust_number");  
  _preauth->addColumn(tr("Name"),                 -1, Qt::AlignLeft,  true, "cust_name");
  _preauth->addColumn(tr("Type"),       _orderColumn, Qt::AlignLeft,  true, "type"  );
  _preauth->addColumn(tr("Status"),  _bigMoneyColumn, Qt::AlignLeft,  true,  "status"  );
  _preauth->addColumn(tr("Document #"),           -1, Qt::AlignLeft,  true,  "docnumber"  );
  _preauth->addColumn(tr("Amount"),     _moneyColumn, Qt::AlignRight, true, "ccpay_amount");
  _preauth->addColumn(tr("Currency"),_currencyColumn, Qt::AlignLeft,  true, "currabbr");;
  _preauth->addColumn(tr("Entered By"),   _userColumn,     Qt::AlignLeft,   false,  "ccpay_by_username"  );
  _preauth->addColumn(tr("Reference"),    _orderColumn,    Qt::AlignLeft,   false,  "ccpay_r_ref"  );
  _preauth->addColumn(tr("Allocated"),    _moneyColumn,    Qt::AlignRight,  false,  "allocated" );
  _preauth->addColumn(tr("Allocated Currency"), _currencyColumn, Qt::AlignLeft,   false,  "payco_currAbbr"  );
  
  if (omfgThis->singleCurrency())
    _preauth->hideColumn(2);

  if (_metrics->value("CCValidDays").toInt())
    _validDays->setValue(_metrics->value("CCValidDays").toInt());
  else
    _validDays->setValue(7);
}
assessFinanceCharges::assessFinanceCharges(QWidget* parent, const char* name, Qt::WindowFlags fl)
: XWidget(parent, name, fl)
{
  setupUi(this);
  _assessmentDate->setDate(omfgThis->dbDate());
  
  //setup table
  _invoiceList->addColumn(tr("Cust. #"),               _orderColumn,    Qt::AlignLeft,   true, "cust_number");
  _invoiceList->addColumn(tr("Cust. Name"),            -1,              Qt::AlignLeft,   true, "cust_name");
  _invoiceList->addColumn(tr("Invoice #"),             _orderColumn,    Qt::AlignLeft,   true, "aropen_docnumber");
  _invoiceList->addColumn(tr("Invoice Date"),          _dateColumn,     Qt::AlignCenter, true, "aropen_docdate");
  _invoiceList->addColumn(tr("Due Date"),              _dateColumn,     Qt::AlignCenter, true, "aropen_duedate");
  _invoiceList->addColumn(tr("Invoice Amt."),          _bigMoneyColumn, Qt::AlignRight,  true, "aropen_amount");
  _invoiceList->addColumn(tr("Paid Amt."),             _bigMoneyColumn, Qt::AlignRight,  true, "aropen_paid");
  _invoiceList->addColumn(tr("Overdue Balance"),       _bigMoneyColumn, Qt::AlignRight,  true, "balance");
  _invoiceList->addColumn(tr("Previous F.C. Date"),    _dateColumn,     Qt::AlignCenter, true, "aropen_fincharg_date");
  _invoiceList->addColumn(tr("Previous F.C. Amt."),    _bigMoneyColumn, Qt::AlignRight,  true, "aropen_fincharg_amount");
  _invoiceList->addColumn(tr("Finance Charge"),        _bigMoneyColumn, Qt::AlignRight,  true, "fincharge");
  
  //setup slots
  connect(_customerSelector, SIGNAL(newState(int)), this, SLOT(sFillList()));
  connect(_customerSelector, SIGNAL(newCustId(int)), this, SLOT(sFillList()));
  connect(_customerSelector, SIGNAL(newCustTypeId(int)), this, SLOT(sFillList()));
  connect(_customerSelector, SIGNAL(newTypePattern(QString)), this, SLOT(sFillList()));
  connect(_customerSelector, SIGNAL(newCustGroupId(int)), this, SLOT(sFillList()));
  connect(_assessmentDate,   SIGNAL(newDate(const QDate&)), this, SLOT(sFillList()));
  
  connect(_assessCharges,SIGNAL(clicked()), this, SLOT(sAssessCharges()));
  
  sFillList();
}
Exemplo n.º 4
0
/*
   keep the contents of another vendor group (p) synchronized with this in a
   manner which allows any changes on this to propagate to p and any objects
   listening for signals from p will respond to changes to this.
   hide p because it's superfluous.
*/
void VendorGroup::synchronize(VendorGroup *p)
{
  connect(this, SIGNAL(newTypePattern(QString)), p, SLOT(setTypePattern(QString)));
  connect(this, SIGNAL(newState(int)),           p, SLOT(setState(int)));
  connect(this, SIGNAL(newVendId(int)),          p, SLOT(setVendId(int)));
  connect(this, SIGNAL(newVendTypeId(int)),      p, SLOT(setVendTypeId(int)));
  p->hide();
}
Exemplo n.º 5
0
/*
   keep the contents of another customer group (p) synchronized with this in a
   manner which allows any changes on this to propagate to p and any objects
   listening for signals from p will respond to changes to this.
   hide p because it's superfluous.
*/
void CustomerSelector::synchronize(CustomerSelector *p)
{
  connect(this, SIGNAL(newTypePattern(QString)), p, SLOT(setTypePattern(QString)));
  connect(this, SIGNAL(newState(int)),           p, SLOT(setState(int)));
  connect(this, SIGNAL(newCustId(int)),          p, SLOT(setCustId(int)));
  connect(this, SIGNAL(newCustTypeId(int)),      p, SLOT(setCustTypeId(int)));
  p->hide();
}
Exemplo n.º 6
0
CustomerSelector::CustomerSelector(QWidget *pParent, const char *pName) : QWidget(pParent, pName)
{
  setupUi(this);

  setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));

  _select->setCurrentIndex(All);
  _cust->setId(-1);
  _customerTypes->setId(-1);
  _customerType->setText("");

  connect(_select,SIGNAL(currentIndexChanged(int)), this, SIGNAL(updated()));
  connect(_select,SIGNAL(currentIndexChanged(int)), this, SIGNAL(newState(int)));
  connect(_cust,                SIGNAL(newId(int)), this, SIGNAL(updated()));
  connect(_cust,                SIGNAL(newId(int)), this, SIGNAL(newCustId(int)));
  connect(_customerTypes,         SIGNAL(newID(int)), this, SIGNAL(updated()));
  connect(_customerTypes,         SIGNAL(newID(int)), this, SIGNAL(newCustTypeId(int)));
  connect(_customerType,   SIGNAL(editingFinished()), this, SIGNAL(updated()));
  connect(_customerType,   SIGNAL(editingFinished()), this, SLOT(sTypePatternFinished()));
  connect(_customerType,SIGNAL(textChanged(QString)), this, SIGNAL(newTypePattern(QString)));

  setFocusProxy(_select);
}
Exemplo n.º 7
0
void VendorGroup::sTypePatternFinished()
{
  emit newTypePattern(_vendorType->text());
  emit updated();
}
Exemplo n.º 8
0
arWorkBench::arWorkBench(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  _aritems = new dspAROpenItems(this, "_aritems", Qt::Widget);
  _aropenFrame->layout()->addWidget(_aritems);
  _aritems->setCloseVisible(false);
  _aritems->findChild<QWidget*>("_customerSelector")->hide();
  _aritems->queryAction()->setVisible(false);
  _aritems->findChild<QWidget*>("_asofGroup")->hide();
  _aritems->findChild<DLineEdit*>("_asOf")->setDate(omfgThis->endOfTime());
  _aritems->findChild<QWidget*>("_dateGroup")->hide();
  _aritems->findChild<QWidget*>("_showGroup")->hide();
  _aritems->findChild<QWidget*>("_printGroup")->hide();
  _aritems->findChild<QRadioButton*>("_dueDate")->click();
  
  _cctrans = new dspCreditCardTransactions(this, "_cctrans", Qt::Widget);
  _creditCardTab->layout()->addWidget(_cctrans);
  _cctrans->findChild<QWidget*>("_close")->hide();
  _cctrans->findChild<QWidget*>("_customerSelector")->hide();
  _cctrans->findChild<QWidget*>("_query")->hide();
  _cctrans->findChild<QWidget*>("_alltrans")->hide();
  _cctrans->findChild<QWidget*>("_pending")->hide();
  _cctrans->findChild<QWidget*>("_processed")->hide();
  _cctrans->findChild<XTreeWidget*>("_preauth")->hideColumn("type");
  _cctrans->findChild<XTreeWidget*>("_preauth")->hideColumn("status");
  
  connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));
  connect(_newCashrcpt, SIGNAL(clicked()), this, SLOT(sNewCashrcpt()));
  connect(_editCashrcpt, SIGNAL(clicked()), this, SLOT(sEditCashrcpt()));
  connect(_viewCashrcpt, SIGNAL(clicked()), this, SLOT(sViewCashrcpt()));
  connect(_deleteCashrcpt, SIGNAL(clicked()), this, SLOT(sDeleteCashrcpt()));
  connect(_postCashrcpt, SIGNAL(clicked()), this, SLOT(sPostCashrcpt()));
  connect(_cashrcpt, SIGNAL(populateMenu(QMenu*, QTreeWidgetItem*)),
          this, SLOT(sPopulateCashRcptMenu(QMenu*)));
  connect(_customerSelector, SIGNAL(newState(int)), this, SLOT(sClear()));
  connect(_customerSelector, SIGNAL(newCustId(int)), this, SLOT(sClear()));
  connect(_customerSelector, SIGNAL(newCustTypeId(int)), this, SLOT(sClear()));
  connect(_customerSelector, SIGNAL(newTypePattern(QString)), this, SLOT(sClear()));
  connect(_customerSelector, SIGNAL(newCustGroupId(int)), this, SLOT(sClear()));

  connect(_customerSelector, SIGNAL(newState(int)), 
          _aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setState(int)));
  connect(_customerSelector, SIGNAL(newCustId(int)), 
          _aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustId(int)));
  connect(_customerSelector, SIGNAL(newCustTypeId(int)), 
          _aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustTypeId(int)));
  connect(_customerSelector, SIGNAL(newCustGroupId(int)), 
          _aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustGroupId(int)));
  connect(_customerSelector, SIGNAL(newTypePattern(QString)), 
          _aritems->findChild<CustomerSelector*>("_customerSelector"), SLOT(setTypePattern(QString)));
  connect(_customerSelector, SIGNAL(newState(int)), 
          _cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setState(int)));
  connect(_customerSelector, SIGNAL(newCustId(int)), 
          _cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustId(int)));
  connect(_customerSelector, SIGNAL(newCustTypeId(int)), 
          _cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustTypeId(int)));
  connect(_customerSelector, SIGNAL(newCustGroupId(int)), 
          _cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setCustGroupId(int)));
  connect(_customerSelector, SIGNAL(newTypePattern(QString)), 
          _cctrans->findChild<CustomerSelector*>("_customerSelector"), SLOT(setTypePattern(QString)));
  connect(_debits, SIGNAL(clicked()), 
          _aritems->findChild<QRadioButton*>("_debits"), SLOT(click()));
  connect(_credits, SIGNAL(clicked()), 
          _aritems->findChild<QRadioButton*>("_credits"), SLOT(click()));
  connect(_both, SIGNAL(clicked()), 
          _aritems->findChild<QRadioButton*>("_both"), SLOT(click()));
  connect(_searchDocNum, SIGNAL(textChanged(const QString&)), this, SLOT(sSearchDocNumChanged()));

  _cashrcpt->addColumn(tr("Cust. #"),       _bigMoneyColumn, Qt::AlignLeft,  true, "cust_number");                                                                
  _cashrcpt->addColumn(tr("Name"),                       -1, Qt::AlignLeft,  true, "cust_name"); 
  _cashrcpt->addColumn(tr("Check/Doc. #"),     _orderColumn, Qt::AlignLeft,  true, "cashrcpt_docnumber");
  _cashrcpt->addColumn(tr("Bank Account"),     _orderColumn, Qt::AlignLeft,  true, "bankaccnt_name");
  _cashrcpt->addColumn(tr("Dist. Date"),        _dateColumn, Qt::AlignCenter,true, "cashrcpt_distdate");
  _cashrcpt->addColumn(tr("Funds Type"),    _bigMoneyColumn, Qt::AlignCenter,true, "cashrcpt_fundstype");
  _cashrcpt->addColumn(tr("Amount"),        _bigMoneyColumn, Qt::AlignRight, true, "cashrcpt_amount");
  _cashrcpt->addColumn(tr("Currency"),      _currencyColumn, Qt::AlignLeft,  true, "currabbr");
  
  if (_privileges->check("MaintainCashReceipts"))
  {
    connect(_cashrcpt, SIGNAL(valid(bool)), _editCashrcpt, SLOT(setEnabled(bool)));
    connect(_cashrcpt, SIGNAL(valid(bool)), _deleteCashrcpt, SLOT(setEnabled(bool)));
    if (_privileges->check("PostCashReceipts"))
      connect(_cashrcpt, SIGNAL(valid(bool)), _postCashrcpt, SLOT(setEnabled(bool)));
  }
  else
  {
    _newCashrcpt->setEnabled(FALSE);
    connect(_cashrcpt, SIGNAL(itemSelected(int)), _viewCashrcpt, SLOT(animateClick()));
  }
  
  if(_privileges->check("PostCashReceipts"))
    connect(_cashrcpt, SIGNAL(itemSelected(int)), _editCashrcpt, SLOT(animateClick()));
  connect(omfgThis, SIGNAL(cashReceiptsUpdated(int, bool)), this, SLOT(sFillList()));

  if (omfgThis->singleCurrency())
    _cashrcpt->hideColumn(2);

  if (!_metrics->boolean("CCAccept") || !_privileges->check("ProcessCreditCards"))
    _tab->removeTab(_tab->indexOf(_creditCardTab));
}
Exemplo n.º 9
0
void CustomerSelector::sTypePatternFinished()
{
  emit newTypePattern(_customerType->text());
  emit updated();
}