Exemplo n.º 1
0
void dspGLTransactions::sPopulateMenu(QMenu * menuThis, QTreeWidgetItem* pItem, int)
{
  XTreeWidgetItem * item = (XTreeWidgetItem*)pItem;
  if(0 == item)
    return;

  menuThis->addAction(tr("View..."), this, SLOT(sViewTrans()));
  if (item->rawValue("journalnumber").toInt() > 0)
  {
    QAction* viewSeriesAct = menuThis->addAction(tr("View Journal Series..."), this, SLOT(sViewSeries()));
    viewSeriesAct->setDisabled(item->data(0, Xt::DeletedRole).toBool());
  }

  if(item->rawValue("gltrans_doctype").toString() == "VO")
    menuThis->addAction(tr("View Voucher..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "IN")
    menuThis->addAction(tr("View Invoice..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "PO")
    menuThis->addAction(tr("View Purchase Order..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "SH")
    menuThis->addAction(tr("View Shipment..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "CM")
    menuThis->addAction(tr("View Credit Memo..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "DM")
    menuThis->addAction(tr("View Debit Memo..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "SO")
    menuThis->addAction(tr("View Sales Order..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "WO")
    menuThis->addAction(tr("View WO History..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "JP")
    menuThis->addAction(tr("View Journal..."), this, SLOT(sViewJournal()));
  else if(item->rawValue("gltrans_source").toString() == "I/M")
    menuThis->addAction(tr("View Inventory History..."), this, SLOT(sViewDocument()));
}
Exemplo n.º 2
0
void dspGLTransactions::sPopulateMenu(QMenu * menuThis, QTreeWidgetItem* pItem)
{
  menuThis->insertItem(tr("View..."), this, SLOT(sViewTrans()), 0);
  menuThis->insertItem(tr("View GL Series..."), this, SLOT(sViewSeries()), 0);

  XTreeWidgetItem * item = (XTreeWidgetItem*)pItem;
  if(0 == item)
    return;

  if(item->rawValue("gltrans_doctype").toString() == "VO")
    menuThis->insertItem(tr("View Voucher..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "IN")
    menuThis->insertItem(tr("View Invoice..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "PO")
    menuThis->insertItem(tr("View Purchase Order..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "SH")
    menuThis->insertItem(tr("View Shipment..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "CM")
    menuThis->insertItem(tr("View Credit Memo..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "DM")
    menuThis->insertItem(tr("View Debit Memo..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "SO")
    menuThis->insertItem(tr("View Sales Order..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_doctype").toString() == "WO")
    menuThis->insertItem(tr("View WO History..."), this, SLOT(sViewDocument()));
  else if(item->rawValue("gltrans_source").toString() == "I/M")
    menuThis->insertItem(tr("View Inventory History..."), this, SLOT(sViewDocument()));
}
Exemplo n.º 3
0
void dspVoucherRegister::sPopulateMenu(QMenu * menuThis)
{
    menuThis->insertItem(tr("View..."), this, SLOT(sViewTrans()), 0);

    QTreeWidgetItem * item = _gltrans->currentItem();
    if(0 == item)
        return;

    if(item->text(2) == "VO")
        menuThis->insertItem(tr("View Voucher..."), this, SLOT(sViewDocument()));
    else if(item->text(2) == "IN")
        menuThis->insertItem(tr("View Invoice..."), this, SLOT(sViewDocument()));
    else if(item->text(2) == "PO")
        menuThis->insertItem(tr("View Purchase Order..."), this, SLOT(sViewDocument()));
}
Exemplo n.º 4
0
void unpostedGLTransactions::sPopulateMenu(QMenu * menuThis, QTreeWidgetItem* pItem)
{
  menuThis->insertItem(tr("View..."), this, SLOT(sViewTrans()), 0);

  XTreeWidgetItem * item = (XTreeWidgetItem*)pItem;
  if(0 == item)
    return;

  if(item->text(2) == "VO")
    menuThis->insertItem(tr("View Voucher..."), this, SLOT(sViewDocument()));
  else if(item->text(2) == "IN")
    menuThis->insertItem(tr("View Invoice..."), this, SLOT(sViewDocument()));
  else if(item->text(2) == "PO")
    menuThis->insertItem(tr("View Purchase Order..."), this, SLOT(sViewDocument()));
}
void dspVoucherRegister::sPopulateMenu(QMenu * menuThis, QTreeWidgetItem*, int)
{
  menuThis->addAction(tr("View..."), this, SLOT(sViewTrans()));

  XTreeWidgetItem *item = dynamic_cast<XTreeWidgetItem*>(list()->currentItem());
  if(0 == item)
    return;
  QString doctype = item->rawValue("gltrans_doctype").toString();

  if (doctype == "VO")
    menuThis->addAction(tr("View Voucher..."), this, SLOT(sViewDocument()));
  else if (doctype == "IN")
    menuThis->addAction(tr("View Invoice..."), this, SLOT(sViewDocument()));
  else if (doctype == "PO")
    menuThis->addAction(tr("View Purchase Order..."), this, SLOT(sViewDocument()));
}
Exemplo n.º 6
0
void dspSummarizedGLTransactions::sPopulateMenu(Q3PopupMenu * menuThis)
{
  if(_gltrans->altId() == -1)
    return;

  menuThis->insertItem(tr("View..."), this, SLOT(sViewTrans()), 0);

  Q3ListViewItem * item = _gltrans->currentItem();
  if(0 == item)
    return;

  if(item->text(3) == "VO")
    menuThis->insertItem(tr("View Voucher..."), this, SLOT(sViewDocument()));
  else if(item->text(3) == "IN")
    menuThis->insertItem(tr("View Invoice..."), this, SLOT(sViewDocument()));
  else if(item->text(3) == "PO")
    menuThis->insertItem(tr("View Purchase Order..."), this, SLOT(sViewDocument()));
}