dspSlowMovingInventoryByClassCode::dspSlowMovingInventoryByClassCode(QWidget* parent, const char*, Qt::WindowFlags fl)
    : display(parent, "dspSlowMovingInventoryByClassCode", fl)
{
    setupUi(optionsWidget());
    setWindowTitle(tr("Slow Moving Inventory"));
    setListLabel(tr("Quantities on Hand"));
    setReportName("SlowMovingInventoryByClassCode");
    setMetaSQLOptions("slowMovingInventoryByClassCode", "detail");

    _costsGroupInt = new QButtonGroup(this);
    _costsGroupInt->addButton(_useStandardCosts);
    _costsGroupInt->addButton(_useActualCosts);
    _costsGroupInt->addButton(_usePostedCosts);

    connect(_showValue, SIGNAL(toggled(bool)), this, SLOT(sHandleValue(bool)));

    _classCode->setType(ParameterGroup::ClassCode);

    list()->addColumn(tr("Site"),          _whsColumn,  Qt::AlignCenter, true,  "warehous_code" );
    list()->addColumn(tr("Item Number"),   _itemColumn, Qt::AlignLeft,   true,  "item_number"   );
    list()->addColumn(tr("Description"),   -1,          Qt::AlignLeft,   true,  "itemdescrip"   );
    list()->addColumn(tr("UOM"),           _uomColumn,  Qt::AlignCenter, true,  "uom_name" );
    list()->addColumn(tr("Last Movement"), _itemColumn, Qt::AlignCenter, true,  "itemsite_datelastused" );
    list()->addColumn(tr("QOH"),           _qtyColumn,  Qt::AlignRight,  true,  "itemsite_qtyonhand"  );
    list()->addColumn(tr("Unit Cost"),     _costColumn, Qt::AlignRight,  true,  "cost"  );
    list()->addColumn(tr("Value"),         _costColumn, Qt::AlignRight,  true,  "value"  );

    sHandleValue(_showValue->isChecked());

    _showValue->setEnabled(_privileges->check("ViewInventoryValue"));
}
dspPurchaseReqsByItem::dspPurchaseReqsByItem(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPurchaseReqsByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Purchase Requests by Item"));
  setListLabel(tr("Purchase Requests"));
  setReportName("PurchaseRequestsByItem");
  setMetaSQLOptions("purchase", "purchaserequests");
  setUseAltId(true);

  list()->addColumn(tr("P/R #"),        _orderColumn,  Qt::AlignLeft,   true,  "pr_number");
  list()->addColumn(tr("Sub #"),        _orderColumn,  Qt::AlignLeft,   true,  "pr_subnumber");
  list()->addColumn(tr("Status"),       _statusColumn, Qt::AlignCenter, true,  "pr_status" );
  list()->addColumn(tr("Parent Order"), _orderColumn,  Qt::AlignLeft,   true,  "parent"   );
  list()->addColumn(tr("Create Date"),  _dateColumn,   Qt::AlignCenter, true,  "pr_createdate"  );
  list()->addColumn(tr("Due Date"),     _dateColumn,   Qt::AlignCenter, true,  "pr_duedate" );
  list()->addColumn(tr("Qty."),         _qtyColumn,    Qt::AlignRight,  true,  "pr_qtyreq"  );
  list()->addColumn(tr("Netable QOH"),  _qtyColumn,    Qt::AlignRight,  true,  "netableqoh"  );
  list()->addColumn(tr("Reorder Lvl."), _qtyColumn,    Qt::AlignRight,  true,  "itemsite_reorderlevel"  );
  list()->addColumn(tr("Notes"),        -1,            Qt::AlignLeft,   true,  "pr_releasenote"  );

  list()->setSelectionMode(QAbstractItemView::ExtendedSelection);

  connect(omfgThis, SIGNAL(purchaseRequestsUpdated()), this, SLOT(sFillList()));
}
dspVoucherRegister::dspVoucherRegister(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspVoucherRegister", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Voucher Register"));
  setListLabel(tr("Vouchers"));
  setReportName("VoucherRegister");
  setMetaSQLOptions("voucherRegister", "detail");

  connect(_selectedAccount, SIGNAL(toggled(bool)), _account, SLOT(setEnabled(bool)));
  connect(_showUsername, SIGNAL(toggled(bool)), this, SLOT(sShowUsername(bool)));

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  list()->addColumn(tr("Date"),        _dateColumn,    Qt::AlignCenter, true, "gltrans_date" );
  list()->addColumn(tr("Vend. #"),     _orderColumn,   Qt::AlignRight,  true, "vend_number"  );
  list()->addColumn(tr("Vend. Name"),  _itemColumn,    Qt::AlignLeft,   true, "vend_name"   );
  list()->addColumn(tr("Doc. Type"),   _docTypeColumn, Qt::AlignCenter, true, "gltrans_doctype" );
  list()->addColumn(tr("Doc. #"),      _orderColumn,   Qt::AlignCenter, true, "gltrans_docnumber" );
  list()->addColumn(tr("Reference"),   -1,             Qt::AlignLeft,   true, "reference"   );
  list()->addColumn(tr("Account"),     _itemColumn,    Qt::AlignLeft,   true, "account"   );
  list()->addColumn(tr("Debit"),       _moneyColumn,   Qt::AlignRight,  true, "debit"  );
  list()->addColumn(tr("Credit"),      _moneyColumn,   Qt::AlignRight,  true, "credit"  );
  list()->addColumn(tr("Username"),    _userColumn,    Qt::AlignLeft,   true, "gltrans_username" );

  sShowUsername(_showUsername->isChecked());
}
dspInventoryLocator::dspInventoryLocator(QWidget* parent, const char*, Qt::WindowFlags fl)
    : display(parent, "dspInventoryLocator", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Location/Lot/Serial # Detail"));
  setListLabel(tr("Locations"));
  setReportName("LocationLotSerialNumberDetail");
  setMetaSQLOptions("inventoryLocator", "detail");
  setUseAltId(true);

  list()->addColumn(tr("Site"),       _whsColumn, Qt::AlignCenter,true, "warehous_code");
  list()->addColumn(tr("Location"),          200, Qt::AlignLeft,  true, "locationname");
  list()->addColumn(tr("Netable"),  _orderColumn, Qt::AlignCenter,true, "netable");
  list()->addColumn(tr("Usable"),   _orderColumn, Qt::AlignCenter,true, "usable");
  list()->addColumn(tr("Lot/Serial #"),       -1, Qt::AlignLeft,  true, "lotserial");
  list()->addColumn(tr("Expiration"),_dateColumn, Qt::AlignCenter,true, "expiration");
  list()->addColumn(tr("Warranty"),  _dateColumn, Qt::AlignCenter,true, "warranty");
  list()->addColumn(tr("Qty."),       _qtyColumn, Qt::AlignRight, true, "qoh");

  ParameterWidget *pw = parameterWidget();
  pw->append(tr("Site"), "site", ParameterWidget::Site);
  pw->append(tr("Location"), "_location_name", ParameterWidget::Text);
  pw->append(tr("Lot/Serial"), "lot_serial", ParameterWidget::Text);
  setupCharacteristics("LS");

  setParameterWidgetVisible(true);

}
Пример #5
0
dspIndentedWhereUsed::dspIndentedWhereUsed(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspIndentedWhereUsed", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Indented Where Used"));
  setListLabel(tr("Bill of Materials Items"));
  setReportName("IndentedWhereUsed");
  setMetaSQLOptions("whereUsed", "detail");
  setUseAltId(true);

  _worksetid = 0;

  if (_metrics->boolean("AllowInactiveBomItems"))
    _item->setType(ItemLineEdit::cGeneralComponents);
  else
    _item->setType(ItemLineEdit::cGeneralComponents | ItemLineEdit::cActive);

  list()->setRootIsDecorated(true);
  list()->addColumn(tr("Seq. #"),               80, Qt::AlignRight, true, "bomwork_seqnumber");
  list()->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft,  true, "item_number");
  list()->addColumn(tr("Description"),          -1, Qt::AlignLeft,  true, "descrip");
  list()->addColumn(tr("UOM"),          _uomColumn, Qt::AlignCenter,true, "uom_name");
  list()->addColumn(tr("Fxd. Qty."),    _qtyColumn, Qt::AlignRight, true, "bomwork_qtyfxd");
  list()->addColumn(tr("Qty. Per"),     _qtyColumn, Qt::AlignRight, true, "bomwork_qtyper");
  list()->addColumn(tr("Scrap %"),    _prcntColumn, Qt::AlignRight, true, "bomwork_scrap");
  list()->addColumn(tr("Effective"),   _dateColumn, Qt::AlignCenter,true, "bomwork_effective");
  list()->addColumn(tr("Expires"),     _dateColumn, Qt::AlignCenter,true, "bomwork_expires");

  _item->setFocus();
}
dspPoDeliveryDateVariancesByItem::dspPoDeliveryDateVariancesByItem(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPoDeliveryDateVariancesByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Purchase Order Delivery Date Variances by Item"));
  setListLabel(tr("Purchase Item Receipts"));
  setReportName("DeliveryDateVariancesByItem");
  setMetaSQLOptions("poDeliveryDateVariances", "detail");

  _item->setType(ItemLineEdit::cGeneralPurchased | ItemLineEdit::cGeneralManufactured);
  _item->setDefaultType(ItemLineEdit::cGeneralPurchased);
  _agent->setType(XComboBox::Agent);
  _agent->setText(omfgThis->username());
  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"),     omfgThis->endOfTime(),   true);
  
  list()->addColumn(tr("P/O #"),         _orderColumn, Qt::AlignRight, true, "recv_order_number");
  list()->addColumn(tr("Vendor"),        _orderColumn, Qt::AlignLeft,  true, "vend_name");
  list()->addColumn(tr("Vend. Item #"),   _itemColumn, Qt::AlignLeft,  true, "itemnumber");
  list()->addColumn(tr("Vendor Description"),      -1, Qt::AlignLeft,  true, "itemdescrip");
  list()->addColumn(tr("Qty."),            _qtyColumn, Qt::AlignRight, true, "recv_qty");
  list()->addColumn(tr("Req. Due"),      _dateColumn,  Qt::AlignCenter,true, "release_duedate"  );
  list()->addColumn(tr("Req. Leadtime"), _dateColumn,  Qt::AlignRight, true, "req_leadtime"  );
  list()->addColumn(tr("Agrd. Due"),     _dateColumn,  Qt::AlignCenter,true, "argd_duedate"  );
  list()->addColumn(tr("Agrd. Leadtime"),_dateColumn,  Qt::AlignRight, true, "agrd_leadtime"  );
  list()->addColumn(tr("Recv. Date"),    _dateColumn,  Qt::AlignCenter,true, "receivedate"  );
  list()->addColumn(tr("Real Leadtime"), _dateColumn,  Qt::AlignRight, true, "real_leadtime"  );
  list()->addColumn(tr("Req. Diff"),     _dateColumn,  Qt::AlignRight, true, "req_diff"  );
  list()->addColumn(tr("Agrd. Diff"),    _dateColumn,  Qt::AlignRight, true, "argd_diff"  );
}
Пример #7
0
dspOrders::dspOrders(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspOrders", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Item Orders"));
  setListLabel(tr("Item Orders"));
  setMetaSQLOptions("orders", "detail");
  setUseAltId(true);

  _item->setReadOnly(true);
  _warehouse->setEnabled(false);

  list()->addColumn(tr("Type"),         _docTypeColumn, Qt::AlignCenter, true,  "order_type" );
  list()->addColumn(tr("Status"),       _statusColumn,  Qt::AlignCenter, true,  "order_status" );
  list()->addColumn(tr("Order #"),      -1,             Qt::AlignLeft,   true,  "order_number"   );
  list()->addColumn(tr("Total"),        _qtyColumn,     Qt::AlignRight,  true,  "totalqty"  );
  list()->addColumn(tr("Received"),     _qtyColumn,     Qt::AlignRight,  true,  "relievedqty"  );
  list()->addColumn(tr("Balance"),      _qtyColumn,     Qt::AlignRight,  true,  "balanceqty"  );
  list()->addColumn(tr("Running Bal."), _qtyColumn,     Qt::AlignRight,  true,  "runningbalanceqty"  );
  list()->addColumn(tr("Required"),     _dateColumn,    Qt::AlignCenter, true,  "duedate" );

  if (!_metrics->boolean("MultiWhs"))
  {
    _warehouseLit->hide();
    _warehouse->hide();
  }
}
Пример #8
0
dspBacklogByItem::dspBacklogByItem(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspBacklogByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Backlog by Item"));
  setListLabel(tr("Backlog"));
  setReportName("BacklogByItemNumber");
  setMetaSQLOptions("salesOrderItems", "detail");
  setUseAltId(true);

  connect(_showPrices, SIGNAL(toggled(bool)), this, SLOT(sHandlePrices(bool)));

  _item->setType(ItemLineEdit::cSold);
  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  list()->addColumn(tr("S/O #"),   _orderColumn, Qt::AlignLeft,  true, "cohead_number");
  list()->addColumn(tr("#"),         _seqColumn, Qt::AlignCenter,true, "coitem_linenumber");
  list()->addColumn(tr("Customer"),          -1, Qt::AlignLeft,  true, "item_number");
  list()->addColumn(tr("Ordered"),  _dateColumn, Qt::AlignCenter,true, "cohead_orderdate");
  list()->addColumn(tr("Scheduled"),_dateColumn, Qt::AlignCenter,true, "coitem_scheddate");
  list()->addColumn(tr("Qty. UOM"),  _qtyColumn, Qt::AlignRight, true, "uom_name");
  list()->addColumn(tr("Ordered"),   _qtyColumn, Qt::AlignRight, true, "coitem_qtyord");
  list()->addColumn(tr("Shipped"),   _qtyColumn, Qt::AlignRight, true, "coitem_qtyshipped");
  list()->addColumn(tr("Balance"),   _qtyColumn, Qt::AlignRight, true, "qtybalance");
  if (_privileges->check("ViewCustomerPrices") || _privileges->check("MaintainCustomerPrices"))
    list()->addColumn(tr("Ext. Price"), _bigMoneyColumn, Qt::AlignRight, true, "baseextpricebalance");

  _showPrices->setEnabled(_privileges->check("ViewCustomerPrices") || _privileges->check("MaintainCustomerPrices"));

  if (! _showPrices->isChecked())
    list()->hideColumn("baseextpricebalance");

  _item->setFocus();
}
Пример #9
0
dspPoItemsByVendor::dspPoItemsByVendor(QWidget* parent, const char*, Qt::WFlags fl)
    : display(parent, "dspPoItemsByVendor", fl)
{
    setupUi(optionsWidget());
    setWindowTitle(tr("Purchase Order Items by Vendor"));
    setListLabel(tr("Purchase Order Items"));
    setReportName("POLineItemsByVendor");
    setMetaSQLOptions("poItems", "detail");
    setUseAltId(true);

    connect(_vendor, SIGNAL(updated()), this, SLOT(sPopulatePo()));
    connect(_searchFor, SIGNAL(textChanged(const QString&)), this, SLOT(sSearch(const QString&)));
    connect(_next, SIGNAL(clicked()), this, SLOT(sSearchNext()));

    _agent->setText(omfgThis->username());

    list()->addColumn(tr("P/O #"),       _orderColumn, Qt::AlignRight,  true,  "pohead_number"  );
    list()->addColumn(tr("Site"),        _whsColumn,   Qt::AlignCenter, true,  "warehous_code"  );
    list()->addColumn(tr("Status"),      0,            Qt::AlignCenter, true,  "poitem_status" );
    list()->addColumn(tr("Status"),      _dateColumn,  Qt::AlignCenter, true,  "f_poitem_status" );
    list()->addColumn(tr("Vendor"),      _itemColumn,  Qt::AlignLeft,   true,  "vend_name"   );
    list()->addColumn(tr("Due Date"),    _dateColumn,  Qt::AlignCenter, true,  "poitem_duedate" );
    list()->addColumn(tr("Item Number"), _itemColumn,  Qt::AlignLeft,   true,  "itemnumber"   );
    list()->addColumn(tr("Description"), -1,           Qt::AlignLeft,   true,  "itemdescrip"   );
    list()->addColumn(tr("Vend. Item #"), _itemColumn, Qt::AlignLeft,   true,  "poitem_vend_item_number");
    list()->addColumn(tr("UOM"),         _uomColumn,   Qt::AlignCenter, true,  "itemuom" );
    list()->addColumn(tr("Vend. UOM"),   _uomColumn,   Qt::AlignCenter, true,  "poitem_vend_uom" );
    list()->addColumn(tr("Ordered"),     _qtyColumn,   Qt::AlignRight,  true,  "poitem_qty_ordered"  );
    list()->addColumn(tr("Received"),    _qtyColumn,   Qt::AlignRight,  true,  "poitem_qty_received"  );
    list()->addColumn(tr("Returned"),    _qtyColumn,   Qt::AlignRight,  true,  "poitem_qty_returned"  );

}
dspUsageStatistics::dspUsageStatistics(QWidget* parent, const char* name, Qt::WFlags fl)
  : display(parent, name, fl)
{
  setWindowTitle(tr("Item Usage Statistics"));
  setReportName("UsageStatistics");
  setMetaSQLOptions("usageStatistics", "detail");
  setUseAltId(true);
  setParameterWidgetVisible(true);
  _printing = false;

  parameterWidget()->append(tr("Start Date"), "startDate", ParameterWidget::Date, QDate(QDate::currentDate().year(),1,1), true);
  parameterWidget()->append(tr("End Date"),   "endDate",   ParameterWidget::Date, QDate::currentDate(), true);
  parameterWidget()->appendComboBox(tr("Class Code"), "classcode_id", XComboBox::ClassCodes);
  parameterWidget()->append(tr("Class Code Pattern"), "classcode_pattern", ParameterWidget::Text);
  parameterWidget()->append(tr("Item"), "item_id", ParameterWidget::Item);
  parameterWidget()->appendComboBox(tr("Item Group"), "itemgrp_id", XComboBox::ItemGroups);
  parameterWidget()->append(tr("Item Group Pattern"), "itemgrp_pattern", ParameterWidget::Text);
  if (_metrics->boolean("MultiWhs"))
    parameterWidget()->append(tr("Site"), "warehous_id", ParameterWidget::Site);

  parameterWidget()->applyDefaultFilterSet();

  list()->addColumn(tr("Site"),        _whsColumn,  Qt::AlignCenter, true,  "warehous_code" );
  list()->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft,   true,  "item_number"   );
  list()->addColumn(tr("Description"), -1,          Qt::AlignLeft,   true,  "itemdescrip"   );
  list()->addColumn(tr("Received"),    _qtyColumn,  Qt::AlignRight,  true,  "received"  );
  list()->addColumn(tr("Issued"),      _qtyColumn,  Qt::AlignRight,  true,  "issued"  );
  list()->addColumn(tr("Sold"),        _qtyColumn,  Qt::AlignRight,  true,  "sold"  );
  list()->addColumn(tr("Scrap"),       _qtyColumn,  Qt::AlignRight,  true,  "scrap"  );
  list()->addColumn(tr("Adjustments"), _qtyColumn,  Qt::AlignRight,  true,  "adjust"  );
  if (_metrics->boolean("MultiWhs"))
    list()->addColumn(tr("Transfers"), _qtyColumn,  Qt::AlignRight,  true,  "transfer"  );
}
dspSalesOrdersByCustomerPO::dspSalesOrdersByCustomerPO(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspSalesOrdersByCustomerPO", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Sales Order Lookup by Customer PO"));
  setListLabel(tr("Sales Orders"));
  setMetaSQLOptions("salesOrders", "detail");

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setStartCaption(tr("Starting Order Date:"));
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);
  _dates->setEndCaption(tr("Ending Order Date:"));

  list()->addColumn(tr("Cust #"),      _itemColumn,  Qt::AlignLeft,   true,  "cust_number"   );
  list()->addColumn(tr("Customer"),    _itemColumn,  Qt::AlignLeft,   true,  "cust_name"   );
  list()->addColumn(tr("Order #"),     _orderColumn, Qt::AlignLeft,   true,  "cohead_number"   );
  list()->addColumn(tr("Ordered"),     _dateColumn,  Qt::AlignRight,  true,  "cohead_orderdate"  );
  list()->addColumn(tr("Scheduled"),   _dateColumn,  Qt::AlignRight,  true,  "min_scheddate"  );
  list()->addColumn(tr("Status"),      _itemColumn,  Qt::AlignCenter, true,  "order_status" );
  list()->addColumn(tr("Ship-to"),     -1,           Qt::AlignLeft,   true,  "cohead_shiptoname"   );
  list()->addColumn(tr("Cust. P/O #"), 200,          Qt::AlignLeft,   true,  "cohead_custponumber"   );

  _poNumber->setFocus();
  connect(omfgThis, SIGNAL(salesOrdersUpdated(int, bool)), this, SLOT(sFillList())  );
}
Пример #12
0
dspIncidentsByCRMAccount::dspIncidentsByCRMAccount(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspIncidentsByCRMAccount", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Incidents by CRM Account"));
  setListLabel(tr("Incidents"));
  setReportName("IncidentsByCRMAccount");
  setMetaSQLOptions("incidentsbyCRMAccount", "detail");
  setUseAltId(true);

  QButtonGroup* _crmacctGroupInt = new QButtonGroup(this);
  _crmacctGroupInt->addButton(_allAccts);
  _crmacctGroupInt->addButton(_selectedAcct);

  _createdDate->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _createdDate->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  list()->addColumn(tr("Account Number"),	    80, Qt::AlignLeft,  true, "crmacct_number");
  list()->addColumn(tr("Account Name"),		   100, Qt::AlignLeft,  true, "crmacct_name");
  list()->addColumn(tr("Incident"),	  _orderColumn, Qt::AlignRight, true, "incdt_number");
  list()->addColumn(tr("Summary"),	            -1, Qt::AlignLeft,  true, "summary");
  list()->addColumn(tr("Entered/Assigned"), _dateColumn, Qt::AlignLeft,  true, "startdate");
  list()->addColumn(tr("Status"),         _statusColumn, Qt::AlignCenter,true, "status");
  list()->addColumn(tr("Assigned To"),	   _userColumn, Qt::AlignLeft,  true, "assigned");
  list()->addColumn(tr("To-Do Due"),	   _dateColumn, Qt::AlignLeft,  true, "duedate");

  list()->setIndentation(10);
}
dspPartiallyShippedOrders::dspPartiallyShippedOrders(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPartiallyShippedOrders", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Partially Shipped Orders"));
  setListLabel(tr("Sales Orders"));
  setReportName("PartiallyShippedOrders");
  setMetaSQLOptions("partiallyShippedOrders", "detail");
  setUseAltId(true);

  connect(_showPrices, SIGNAL(toggled(bool)), this, SLOT(sHandlePrices(bool)));

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  list()->addColumn(tr("Hold"),        0,           Qt::AlignCenter,true, "cohead_holdtype");
  list()->addColumn(tr("S/O #"),      _orderColumn, Qt::AlignRight, true, "cohead_number");
  list()->addColumn(tr("Customer"),    -1,          Qt::AlignLeft,  true, "cust_name");
  list()->addColumn(tr("Hold Type"),   _dateColumn, Qt::AlignCenter,true, "f_holdtype");
  list()->addColumn(tr("Ordered"),     _dateColumn, Qt::AlignRight, true, "cohead_orderdate");
  list()->addColumn(tr("Scheduled"),   _dateColumn, Qt::AlignRight, true, "minscheddate");
  list()->addColumn(tr("Pack Date"),   _dateColumn, Qt::AlignRight, true, "cohead_packdate");
  list()->addColumn(tr("Amount"),     _moneyColumn, Qt::AlignRight, true, "extprice");
  list()->addColumn(tr("Currency"),_currencyColumn, Qt::AlignLeft,  true, "currAbbr");
  list()->addColumn(tr("Amount\n(%1)").arg(CurrDisplay::baseCurrAbbr()),
                                   _moneyColumn, Qt::AlignRight, true, "extprice_base");
  list()->setDragString("soheadid=");

  sHandlePrices(_showPrices->isChecked());

  if ( (!_privileges->check("ViewCustomerPrices")) && (!_privileges->check("MaintainCustomerPrices")) )
    _showPrices->setEnabled(false);
}
Пример #14
0
dspItemCostHistory::dspItemCostHistory(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspItemCostHistory", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Item Costs History"));
  setListLabel(tr("Costing History"));
  setReportName("ItemCostHistory");
  setMetaSQLOptions("itemCost", "detail");
  setUseAltId(true);

  list()->addColumn(tr("Element"),              -1, Qt::AlignLeft,  true, "costelem_type");
  list()->addColumn(tr("Lower"),       _costColumn, Qt::AlignCenter,true, "lowlevel");
  list()->addColumn(tr("Type"),        _costColumn, Qt::AlignLeft,  true, "type");
  list()->addColumn(tr("Time"),    _timeDateColumn, Qt::AlignCenter,true, "costhist_date");
  list()->addColumn(tr("User"),         _qtyColumn, Qt::AlignCenter,true, "username");
  list()->addColumn(tr("Old"),         _costColumn, Qt::AlignRight, true, "costhist_oldcost");
  list()->addColumn(tr("Currency"),_currencyColumn, Qt::AlignLeft,  true, "oldcurr");
  list()->addColumn(tr("New"),         _costColumn, Qt::AlignRight, true, "costhist_newcost");
  list()->addColumn(tr("Currency"),_currencyColumn, Qt::AlignLeft,  true, "newcurr");

  if (omfgThis->singleCurrency())
  {
    list()->hideColumn("oldcurr");
    list()->hideColumn("newcurr");
  }
}
dspMaterialUsageVarianceByBOMItem::dspMaterialUsageVarianceByBOMItem(QWidget* parent, const char* name, Qt::WindowFlags fl)
    : display(parent, "dspMaterialUsageVarianceByBOMItem", fl)
{
  if (name)
    setObjectName(name);

  setupUi(optionsWidget());
  setWindowTitle(tr("Material Usage Variance by Bill of Materials Item"));
  setListLabel(tr("Material Usage Variance"));
  setReportName("MaterialUsageVarianceByBOMItem");
  setMetaSQLOptions("workOrderVariance", "material");

  connect(_item, SIGNAL(newId(int)), this, SLOT(sPopulateComponentItems(int)));

  _item->setType(ItemLineEdit::cGeneralManufactured);
  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  list()->addColumn(tr("Post Date"),      _dateColumn,  Qt::AlignCenter, true,  "posted" );
  list()->addColumn(tr("Ordered"),        _qtyColumn,   Qt::AlignRight,  true,  "ordered"  );
  list()->addColumn(tr("Produced"),       _qtyColumn,   Qt::AlignRight,  true,  "received"  );
  list()->addColumn(tr("Proj. Req."),     _qtyColumn,   Qt::AlignRight,  true,  "projreq"  );
  list()->addColumn(tr("Proj. Qty. per"), _qtyColumn,   Qt::AlignRight,  true,  "projqtyper"  );
  list()->addColumn(tr("Act. Iss."),      _qtyColumn,   Qt::AlignRight,  true,  "actiss"  );
  list()->addColumn(tr("Act. Qty. per"),  _qtyColumn,   Qt::AlignRight,  true,  "actqtyper"  );
  list()->addColumn(tr("Qty. per Var."),  _qtyColumn,   Qt::AlignRight,  true,  "qtypervar"  );
  list()->addColumn(tr("%"),              _prcntColumn, Qt::AlignRight,  true,  "qtypervarpercent"  );
  list()->addColumn(tr("Notes"),              -1,       Qt::AlignLeft,   false, "womatlvar_notes");
  list()->addColumn(tr("Reference"), -1,       Qt::AlignLeft,   false, "womatlvar_ref");
}
Пример #16
0
dspCustomerARHistory::dspCustomerARHistory(QWidget* parent, const char* name, Qt::WindowFlags fl)
  : display(parent, "dspCustomerARHistory", fl)
{
  Q_UNUSED(name);

  setupUi(optionsWidget());
  setWindowTitle(tr("Customer History"));
  setListLabel(tr("Customer History"));
  setReportName("CustomerARHistory");
  setMetaSQLOptions("arHistory", "detail");
  setUseAltId(true);

  list()->setRootIsDecorated(true);
  list()->addColumn(tr("Open"),          _dateColumn,     Qt::AlignCenter, true,  "open" );
  list()->addColumn(tr("Doc. Type"),     _itemColumn,     Qt::AlignCenter, true,  "documenttype" );
  list()->addColumn(tr("Doc. #"),        _orderColumn,    Qt::AlignRight,  true,  "docnumber"  );
  list()->addColumn(tr("Doc. Date"),     _dateColumn,     Qt::AlignCenter, true,  "docdate" );
  list()->addColumn(tr("Due/Dist Date"), _dateColumn,     Qt::AlignCenter, true,  "duedate" );
  list()->addColumn(tr("Amount"),        _moneyColumn,    Qt::AlignRight,  true,  "amount"  );
  list()->addColumn(tr("Balance"),       _moneyColumn,    Qt::AlignRight,  true,  "balance"  );
  list()->addColumn(tr("Currency"),      _currencyColumn, Qt::AlignCenter, true,  "currAbbr"  );
  list()->addColumn(tr("Base Balance"),  _bigMoneyColumn, Qt::AlignRight,  true,  "base_balance"  );

  _cust->setType(CLineEdit::ActiveCustomers);
}
Пример #17
0
dspWoHistoryByNumber::dspWoHistoryByNumber(QWidget* parent, const char*, Qt::WindowFlags fl)
    : display(parent, "dspWoHistoryByNumber", fl)
{
    setupUi(optionsWidget());
    setWindowTitle(tr("Work Order History by W/O Number"));
    setListLabel(tr("Work Orders"));
    setReportName("WOHistoryByNumber");
    setMetaSQLOptions("workOrderHistory", "detail");

    connect(_showCost, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

    list()->addColumn(tr("W/O #"),       _orderColumn,  Qt::AlignLeft,   true,  "wo_number"   );
    list()->addColumn(tr("Sub. #"),      _uomColumn,    Qt::AlignLeft,   true,  "wo_subnumber"   );
    list()->addColumn(tr("Item #"),      _itemColumn,   Qt::AlignLeft,   true,  "item_number"   );
    list()->addColumn(tr("Description"), -1,            Qt::AlignLeft,   true,  "itemdescrip"   );
    list()->addColumn(tr("Status"),      _statusColumn, Qt::AlignCenter, true,  "wo_status" );
    list()->addColumn(tr("Site"),        _whsColumn,    Qt::AlignCenter, true,  "warehous_code" );
    list()->addColumn(tr("Ordered"),     _qtyColumn,    Qt::AlignRight,  true,  "wo_qtyord"  );
    list()->addColumn(tr("Received"),    _qtyColumn,    Qt::AlignRight,  true,  "wo_qtyrcv"  );
    list()->addColumn(tr("Start Date"),  _dateColumn,   Qt::AlignCenter, true,  "wo_startdate"  );
    list()->addColumn(tr("Due Date"),    _dateColumn,   Qt::AlignCenter, true,  "wo_duedate"  );
    list()->addColumn(tr("Cost"),        _costColumn,   Qt::AlignRight,  true,  "wo_postedvalue" );
    list()->addColumn(tr("WIP"),         _costColumn,   Qt::AlignRight,  false, "wo_wipvalue" );
    list()->addColumn(tr("Project"),     _orderColumn,  Qt::AlignLeft,   false, "project" );
    list()->addColumn(tr("Priority"),    _statusColumn, Qt::AlignCenter, false, "wo_priority" );
    list()->addColumn(tr("BOM Rev"),     _orderColumn,  Qt::AlignLeft,   false, "bom_rev_number" );
    list()->addColumn(tr("BOO Rev"),     _orderColumn,  Qt::AlignLeft,   false, "boo_rev_number" );

    sHandleCosts(_showCost->isChecked());

    connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), SLOT(sFillList()));
}
Пример #18
0
dspPoDeliveryDateVariancesByVendor::dspPoDeliveryDateVariancesByVendor(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPoDeliveryDateVariancesByVendor", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Purchase Order Delivery Date Variances by Vendor"));
  setListLabel(tr("Purchase Item Receipts"));
  setReportName("DeliveryDateVariancesByVendor");
  setMetaSQLOptions("poDeliveryDateVariances", "detail");

  connect(_selectedPurchasingAgent, SIGNAL(toggled(bool)), _agent, SLOT(setEnabled(bool)));

  _agent->setType(XComboBox::Agent);
  _agent->setText(omfgThis->username());

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"),     omfgThis->endOfTime(),   true);
  
  list()->addColumn(tr("P/O #"),              _orderColumn, Qt::AlignRight,  true,  "porecv_ponumber"  );
  list()->addColumn(tr("Vendor"),             _orderColumn, Qt::AlignLeft,   true,  "vend_name"   );
  list()->addColumn(tr("Date"),               _dateColumn,  Qt::AlignCenter, true,  "receivedate" );
  list()->addColumn(tr("Vend. Item #"),       _itemColumn,  Qt::AlignLeft,   true,  "venditemnumber"   );
  list()->addColumn(tr("Vendor Description"), -1,           Qt::AlignLeft,   true,  "venditemdescrip"   );
  list()->addColumn(tr("Qty."),               _qtyColumn,   Qt::AlignRight,  true,  "porecv_qty"  );
  list()->addColumn(tr("Req. Due"),           _dateColumn,  Qt::AlignCenter, true,  "release_duedate"  );
  list()->addColumn(tr("Req. Leadtime"),      _dateColumn,  Qt::AlignRight,  true,  "req_leadtime"  );
  list()->addColumn(tr("Agrd. Due"),          _dateColumn,  Qt::AlignCenter, true,  "argd_duedate"  );
  list()->addColumn(tr("Agrd. Leadtime"),     _dateColumn,  Qt::AlignRight,  true,  "agrd_leadtime"  );
  list()->addColumn(tr("Recv. Date"),         _dateColumn,  Qt::AlignCenter, true,  "receivedate"  );
  list()->addColumn(tr("Real Leadtime"),      _dateColumn,  Qt::AlignRight,  true,  "real_leadtime"  );
  list()->addColumn(tr("Req. Diff"),          _dateColumn,  Qt::AlignRight,  true,  "req_diff"  );
  list()->addColumn(tr("Agrd. Diff"),         _dateColumn,  Qt::AlignRight,  true,  "argd_diff"  );
}
Пример #19
0
dspWoScheduleByWorkOrder::dspWoScheduleByWorkOrder(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspWoScheduleByWorkOrder", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Work Order Schedule by Work Order"));
  setListLabel(tr("Work Orders"));
  setReportName("WOScheduleByParameterList");
  setMetaSQLOptions("workOrderSchedule", "detail");
  setUseAltId(true);
  setAutoUpdateEnabled(true);

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);
  
  list()->addColumn(tr("W/O #"),      -1,            Qt::AlignLeft,   true,  "wonumber"   );
  list()->addColumn(tr("Status"),     _statusColumn, Qt::AlignCenter, true,  "wo_status" );
  list()->addColumn(tr("Pri."),       _statusColumn, Qt::AlignCenter, false,  "wo_priority" );
  list()->addColumn(tr("Site"),       _whsColumn,    Qt::AlignCenter, true,  "warehous_code" );
  list()->addColumn(tr("Ordered"),    _qtyColumn,    Qt::AlignRight,  true,  "wo_qtyord"  );
  list()->addColumn(tr("Received"),   _qtyColumn,    Qt::AlignRight,  true,  "wo_qtyrcv"  );
  list()->addColumn(tr("Start Date"), _dateColumn,   Qt::AlignCenter, true,  "wo_startdate" );
  list()->addColumn(tr("Due Date"),   _dateColumn,   Qt::AlignCenter, true,  "wo_duedate" );
  list()->addColumn(tr("User"),        -1,            Qt::AlignLeft,   true,  "wo_username"   );
  
  connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), this, SLOT(sFillList()));

  _workorder->setType(~cWoClosed);
  _workorder->setFocus();
}
Пример #20
0
dspARApplications::dspARApplications(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspARApplications", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("A/R Applications"));
  setListLabel(tr("A/R Applications"));
  setReportName("ARApplications");
  setMetaSQLOptions("arApplications", "detail");

  _cust->setType(CLineEdit::ActiveCustomers);
  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);
    
  list()->addColumn(tr("Cust. #"),        _orderColumn, Qt::AlignCenter, true,  "cust_number" );
  list()->addColumn(tr("Customer"),                 -1, Qt::AlignLeft,   true,  "cust_name"   );
  list()->addColumn(tr("Post Date"),       _dateColumn, Qt::AlignCenter, true,  "arapply_postdate" );
  list()->addColumn(tr("Dist. Date"),      _dateColumn, Qt::AlignCenter, true,  "arapply_distdate" );
  list()->addColumn(tr("Source Doc Type"),          10, Qt::AlignCenter, true,  "arapply_source_doctype" );
  list()->addColumn(tr("Source"),	         _itemColumn, Qt::AlignCenter, true,  "doctype" );
  list()->addColumn(tr("Doc #"),          _orderColumn, Qt::AlignCenter, true,  "source" );
  list()->addColumn(tr("Apply-To Doc Type"),        10, Qt::AlignCenter, true,  "arapply_target_doctype" );
  list()->addColumn(tr("Apply-To"),        _itemColumn, Qt::AlignCenter, true,  "targetdoctype" );
  list()->addColumn(tr("Doc #"),          _orderColumn, Qt::AlignCenter, true,  "target" );
  list()->addColumn(tr("Amount"),         _moneyColumn, Qt::AlignRight,  true,  "arapply_applied"  );
  list()->addColumn(tr("Currency"),    _currencyColumn, Qt::AlignLeft,   true,  "currAbbr"   );
  list()->addColumn(tr("Base Amount"), _bigMoneyColumn, Qt::AlignRight,  true,  "base_applied"  );

  list()->hideColumn(4);
  list()->hideColumn(7);

}
dspPricesByItem::dspPricesByItem(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspPricesByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Prices by Item"));
  setListLabel(tr("Prices"));
  setReportName("PricesByItem");
  setMetaSQLOptions("prices", "detail");
  setUseAltId(true);

  connect(_showCosts, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  _item->setType(ItemLineEdit::cSold);

  list()->addColumn(tr("Schedule"),      _itemColumn, Qt::AlignLeft,   true,  "schedulename"  );
  list()->addColumn(tr("Source"),        _itemColumn, Qt::AlignLeft,   true,  "type"  );
  list()->addColumn(tr("Customer/Customer Type"), -1, Qt::AlignLeft,   true,  "typename"  );
  list()->addColumn(tr("Qty. Break"),     _qtyColumn, Qt::AlignRight,  true,  "f_qtybreak" );
  list()->addColumn(tr("Price"),        _priceColumn, Qt::AlignRight,  true,  "price" );
  list()->addColumn(tr("Currency"),  _currencyColumn, Qt::AlignLeft,   true,  "currConcat"  );
  list()->addColumn(tr("Cost"),          _costColumn, Qt::AlignRight,  true,  "f_cost" );
  list()->addColumn(tr("Margin"),       _prcntColumn, Qt::AlignRight,  true,  "f_margin" );

  if (omfgThis->singleCurrency())
    list()->hideColumn(CURR_COL);
  sHandleCosts(_showCosts->isChecked());

}
Пример #22
0
dspPoItemsByItem::dspPoItemsByItem(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspPoItemsByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Purchase Order Items by Item"));
  setListLabel(tr("Purchase Order Items"));
  setReportName("POLineItemsByItem");
  setMetaSQLOptions("poItems", "detail");
  setUseAltId(true);

  _item->setType(ItemLineEdit::cGeneralPurchased | ItemLineEdit::cGeneralManufactured);
  _item->setDefaultType(ItemLineEdit::cGeneralPurchased);

  _agent->setText(omfgThis->username());

  list()->addColumn(tr("P/O #"),       _orderColumn, Qt::AlignRight,  true,  "pohead_number"  );
  list()->addColumn(tr("Site"),        _whsColumn,   Qt::AlignCenter, true,  "warehous_code" );
  list()->addColumn(tr("Status"),      0,            Qt::AlignCenter, true,  "poitem_status" );
  list()->addColumn(tr("Status"),      _dateColumn,  Qt::AlignCenter, true,  "f_poitem_status" );
  list()->addColumn(tr("Vendor"),      -1,           Qt::AlignLeft,   true,  "vend_name"   );
  list()->addColumn(tr("Due Date"),    _dateColumn,  Qt::AlignCenter, true,  "poitem_duedate" );
  list()->addColumn(tr("Ordered"),     _qtyColumn,   Qt::AlignRight,  true,  "poitem_qty_ordered"  );
  list()->addColumn(tr("UOM"),         _uomColumn,   Qt::AlignCenter, true,  "itemuom" );
  list()->addColumn(tr("Vend. UOM"),   _uomColumn,   Qt::AlignCenter, true,  "poitem_vend_uom" );
  list()->addColumn(tr("Received"),    _qtyColumn,   Qt::AlignRight,  true,  "poitem_qty_received"  );
  list()->addColumn(tr("Returned"),    _qtyColumn,   Qt::AlignRight,  true,  "poitem_qty_returned"  );
}
Пример #23
0
dspBriefSalesHistory::dspBriefSalesHistory(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspBriefSalesHistory", fl)
{
  setWindowTitle(tr("Brief Sales History"));
  setReportName("BriefSalesHistory");
  setMetaSQLOptions("briefSalesHistory", "detail");
  setParameterWidgetVisible(true);

  parameterWidget()->append(tr("Start Date"), "startDate", ParameterWidget::Date, QDate::currentDate(), true  );
  parameterWidget()->append(tr("End Date"),   "endDate",   ParameterWidget::Date, QDate::currentDate(), true);
  parameterWidget()->append(tr("Customer"),   "cust_id",   ParameterWidget::Customer);
  parameterWidget()->append(tr("Customer Ship-to"),   "shipto_id",   ParameterWidget::Shipto);
  parameterWidget()->appendComboBox(tr("Customer Group"), "custgrp_id", XComboBox::CustomerGroups);
  parameterWidget()->append(tr("Customer Group Pattern"), "custgrp_pattern", ParameterWidget::Text);
  parameterWidget()->appendComboBox(tr("Customer Type"), "custtype_id", XComboBox::CustomerTypes);
  parameterWidget()->append(tr("Customer Type Pattern"), "custtype_pattern", ParameterWidget::Text);
  parameterWidget()->append(tr("Item"), "item_id", ParameterWidget::Item);
  parameterWidget()->appendComboBox(tr("Product Category"), "prodcat_id", XComboBox::ProductCategories);
  parameterWidget()->append(tr("Product Category Pattern"), "prodcat_pattern", ParameterWidget::Text);
  parameterWidget()->appendComboBox(tr("Sales Rep."), "salesrep_id", XComboBox::SalesReps);
  if (_metrics->boolean("MultiWhs"))
    parameterWidget()->append(tr("Site"), "warehous_id", ParameterWidget::Site);

  parameterWidget()->applyDefaultFilterSet();

  list()->addColumn(tr("Cust. #"),     _itemColumn,     Qt::AlignLeft,   true,  "cust_number"   );
  list()->addColumn(tr("Name"),        -1,              Qt::AlignLeft,   true,  "cust_name"   );
  list()->addColumn(tr("Cust. Type"),  _orderColumn,    Qt::AlignLeft,   true,  "custtype_code"   );
  list()->addColumn(tr("Doc. #"),      _orderColumn,    Qt::AlignLeft,   true,  "cohist_ordernumber"   );
  list()->addColumn(tr("Invoice #"),   _orderColumn,    Qt::AlignLeft,   true,  "invoicenumber"   );
  list()->addColumn(tr("Ord. Date"),   _dateColumn,     Qt::AlignCenter, true,  "cohist_orderdate" );
  list()->addColumn(tr("Invc. Date"),  _dateColumn,     Qt::AlignCenter, true,  "cohist_invcdate" );
  list()->addColumn(tr("Total"),       _bigMoneyColumn, Qt::AlignRight,  true,  "extended"  );
}
Пример #24
0
dspSubstituteAvailabilityByItem::dspSubstituteAvailabilityByItem(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspSubstituteAvailabilityByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Substitute Availability by Root Item"));
  setListLabel(tr("Substitute Availability"));
  setReportName("SubstituteAvailabilityByRootItem");
  setMetaSQLOptions("substituteAvailability", "detail");
  setUseAltId(true);

  _showByGroupInt = new QButtonGroup(this);
  _showByGroupInt->addButton(_leadTime);
  _showByGroupInt->addButton(_byDays);
  _showByGroupInt->addButton(_byDate);

  list()->addColumn(tr("Site"),          _whsColumn,  Qt::AlignCenter, true,  "warehous_code" );
  list()->addColumn(tr("Item Number"),   _itemColumn, Qt::AlignLeft,   true,  "item_number"   );
  list()->addColumn(tr("Description"),   -1,          Qt::AlignLeft,   true,  "itemdescrip"   );
  list()->addColumn(tr("LT"),            _whsColumn,  Qt::AlignCenter, true,  "leadtime" );
  list()->addColumn(tr("QOH"),           _qtyColumn,  Qt::AlignRight,  true,  "qtyonhand"  );
  list()->addColumn(tr("Allocated"),     _qtyColumn,  Qt::AlignRight,  true,  "allocated"  );
  list()->addColumn(tr("On Order"),      _qtyColumn,  Qt::AlignRight,  true,  "ordered"  );
  list()->addColumn(tr("Reorder Lvl."),  _qtyColumn,  Qt::AlignRight,  true,  "reorderlevel"  );
  list()->addColumn(tr("Available"),     _qtyColumn,  Qt::AlignRight,  true,  "available"  );
}
Пример #25
0
dspCashReceipts::dspCashReceipts(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspCashReceipts", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Cash Receipts"));
  setListLabel(tr("Cash Receipts"));
  setReportName("CashReceipts");
  setMetaSQLOptions("cashReceipts", "detail");
  setNewVisible(true);
  setUseAltId(true);

  connect(_applications, SIGNAL(toggled(bool)), list(), SLOT(clear()));

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), TRUE);
  _dates->setStartDate(QDate().currentDate().addDays(-90));
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), TRUE);
  
  list()->addColumn(tr("Number"),      _orderColumn,    Qt::AlignLeft, true,  "cashrcpt_number" );
  list()->addColumn(tr("Source"),      _itemColumn,     Qt::AlignLeft,   true,  "source" );
  list()->addColumn(tr("Cust. #"),     _orderColumn,    Qt::AlignLeft, true,  "cust_number" );
  list()->addColumn(tr("Customer"),    -1,              Qt::AlignLeft,   true,  "cust_name"   );
  list()->addColumn(tr("Posted"),      _ynColumn,       Qt::AlignCenter, true,  "posted" );
  list()->addColumn(tr("Voided"),      _ynColumn,       Qt::AlignCenter, true,  "voided" );
  list()->addColumn(tr("Date"),        _dateColumn,     Qt::AlignCenter, true,  "postdate" );
  list()->addColumn(tr("Apply-To"),    -1,     Qt::AlignLeft, true,  "target" );
  list()->addColumn(tr("Amount"),      _moneyColumn, Qt::AlignRight,  true,  "applied"  );
  list()->addColumn(tr("Currency"),    _currencyColumn, Qt::AlignLeft,   true,  "currAbbr"   );
  list()->addColumn(tr("Base Amount"), _moneyColumn, Qt::AlignRight,  true,  "base_applied"  );
  
  newAction()->setEnabled(_privileges->check("MaintainCashReceipts"));
}
dspReturnAuthorizationsByItem::dspReturnAuthorizationsByItem(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspReturnAuthorizationsByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Return Authorization Lookup by Item"));
  setListLabel(tr("Return Authorizations"));
  setMetaSQLOptions("returnAuthorizationItems", "detail");

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setStartCaption(tr("Starting Order Date:"));
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);
  _dates->setEndCaption(tr("Ending Order Date:"));

  _item->setType(ItemLineEdit::cSold);

  list()->addColumn(tr("Return #"),        _orderColumn, Qt::AlignLeft,   true,  "rahead_number"   );
  list()->addColumn(tr("Created"),         _dateColumn,  Qt::AlignCenter, true,  "rahead_authdate" );
  list()->addColumn(tr("Customer"),        -1,           Qt::AlignLeft,   true,  "rahead_billtoname"   );
  list()->addColumn(tr("Status"),          _orderColumn, Qt::AlignLeft,   true,  "raitem_status"   );
  list()->addColumn(tr("Order UOM"),       _uomColumn,   Qt::AlignCenter, true,  "uom_name" );
  list()->addColumn(tr("Authorized"),      _qtyColumn,   Qt::AlignRight,  true,  "raitem_qtyauthorized"  );
  list()->addColumn(tr("Received"),        _qtyColumn,   Qt::AlignRight,  true,  "raitem_qtyreceived"  );

  connect(omfgThis, SIGNAL(returnAuthorizationsUpdated(int, bool)), this, SLOT(sFillList()));
}
Пример #27
0
dspWoHistoryByItem::dspWoHistoryByItem(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "dspWoHistoryByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Work Order History by Item"));
  setListLabel(tr("Work Orders"));
  setReportName("WOHistoryByItem");
  setMetaSQLOptions("workOrderHistory", "detail");

  connect(_showCost, SIGNAL(toggled(bool)), this, SLOT(sHandleCosts(bool)));

  _item->setType(ItemLineEdit::cGeneralManufactured | ItemLineEdit::cGeneralPurchased);
  _item->setDefaultType(ItemLineEdit::cGeneralManufactured);
  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);

  list()->addColumn(tr("W/O #"),      -1,            Qt::AlignLeft,   true,  "wonumber"   );
  list()->addColumn(tr("Status"),     _statusColumn, Qt::AlignCenter, true,  "wo_status" );
  list()->addColumn(tr("Site"),       _whsColumn,    Qt::AlignCenter, true,  "warehous_code" );
  list()->addColumn(tr("Ordered"),    _qtyColumn,    Qt::AlignRight,  true,  "wo_qtyord"  );
  list()->addColumn(tr("Received"),   _qtyColumn,    Qt::AlignRight,  true,  "wo_qtyrcv"  );
  list()->addColumn(tr("Start Date"), _dateColumn,   Qt::AlignCenter, true,  "wo_startdate" );
  list()->addColumn(tr("Due Date"),   _dateColumn,   Qt::AlignCenter, true,  "wo_duedate" );
  list()->addColumn(tr("Cost"),       _costColumn,   Qt::AlignRight,  true,  "wo_postedvalue" );

  sHandleCosts(_showCost->isChecked());
  
  connect(omfgThis, SIGNAL(workOrdersUpdated(int, bool)), this, SLOT(sFillList()));

  _item->setFocus();
}
Пример #28
0
employees::employees(QWidget* parent, const char*, Qt::WFlags fl)
  : display(parent, "employees", fl)
{
  setWindowTitle(tr("Employees"));
  setReportName("EmployeeList");
  setMetaSQLOptions("employees", "detail");
  setParameterWidgetVisible(true);
  setNewVisible(true);
  setSearchVisible(true);
  setQueryOnStartEnabled(true);

  parameterWidget()->append(tr("Show Inactive"), "showInactive", ParameterWidget::Exists);
  if (_metrics->boolean("MultiWhs"))
    parameterWidget()->append(tr("Site"), "warehous_id", ParameterWidget::Site);
  parameterWidget()->applyDefaultFilterSet();

  connect(omfgThis, SIGNAL(employeesUpdated(int)),     this, SLOT(sFillList()));

  list()->addColumn(tr("Site"),   _whsColumn,  Qt::AlignLeft, true, "warehous_code");
  list()->addColumn(tr("Active"), _ynColumn,   Qt::AlignLeft, true, "emp_active");
  list()->addColumn(tr("Code"),   _itemColumn, Qt::AlignLeft, true, "emp_code");
  list()->addColumn(tr("Number"), -1,          Qt::AlignLeft, true, "emp_number");
  list()->addColumn(tr("First"),  _itemColumn, Qt::AlignLeft, true, "cntct_first_name");
  list()->addColumn(tr("Last"),   _itemColumn, Qt::AlignLeft, true, "cntct_last_name");

  setupCharacteristics(characteristic::Employees);
  parameterWidget()->applyDefaultFilterSet();

  connect(list(), SIGNAL(itemSelected(int)), this, SLOT(sOpen()));

  if (!_privileges->check("MaintainEmployees"))
    newAction()->setEnabled(FALSE);
}
Пример #29
0
dspSalesOrdersByItem::dspSalesOrdersByItem(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspSalesOrdersByItem", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Sales Order Lookup by Item"));
  setListLabel(tr("Sales Orders"));
  setMetaSQLOptions("salesOrderItems", "detail");

  _dates->setStartNull(tr("Earliest"), omfgThis->startOfTime(), true);
  _dates->setStartCaption(tr("Starting Order Date:"));
  _dates->setEndNull(tr("Latest"), omfgThis->endOfTime(), true);
  _dates->setEndCaption(tr("Ending Order Date:"));

  _item->setType(ItemLineEdit::cSold);

  list()->addColumn(tr("Order #"),         _orderColumn, Qt::AlignLeft,   true,  "cohead_number"   );
  list()->addColumn(tr("Order Date"),      _dateColumn,  Qt::AlignCenter, true,  "cohead_orderdate" );
  list()->addColumn(tr("Customer"),        -1,           Qt::AlignLeft,   true,  "cust_name"   );
  list()->addColumn(tr("Order UOM"),       _uomColumn,   Qt::AlignCenter, true,  "uom_name" );
  list()->addColumn(tr("Ordered"),         _qtyColumn,   Qt::AlignRight,  true,  "coitem_qtyord"  );
  list()->addColumn(tr("Shipped"),         _qtyColumn,   Qt::AlignRight,  true,  "coitem_qtyshipped"  );
  list()->addColumn(tr("Returned"),        _qtyColumn,   Qt::AlignRight,  true,  "coitem_qtyreturned"  );
  list()->addColumn(tr("Balance"),         _qtyColumn,   Qt::AlignRight,  true,  "qtybalance"  );
  list()->addColumn(tr("Inv. UOM"),        _uomColumn,   Qt::AlignCenter, false, "inv_uom_name" );
  list()->addColumn(tr("Inv. Ordered"),    _qtyColumn,   Qt::AlignRight,  false, "invqtyord"  );
  list()->addColumn(tr("Inv. Shipped"),    _qtyColumn,   Qt::AlignRight,  false, "invqtyshipped"  );
  list()->addColumn(tr("Inv. Returned"),   _qtyColumn,   Qt::AlignRight,  false, "invqtyreturned"  );
  list()->addColumn(tr("Inv. Balance"),    _qtyColumn,   Qt::AlignRight,  false, "invqtybalance"  );

  connect(omfgThis, SIGNAL(salesOrdersUpdated(int, bool)), this, SLOT(sFillList()));
}
dspPendingBOMChanges::dspPendingBOMChanges(QWidget* parent, const char*, Qt::WindowFlags fl)
  : display(parent, "dspPendingBOMChanges", fl)
{
  setupUi(optionsWidget());
  setWindowTitle(tr("Pending Bill of Materials Changes"));
  setListLabel(tr("Pending Bill of Materials Changes"));
  setReportName("PendingBOMChanges");
  setMetaSQLOptions("pendingBOMChanges", "detail");

  _item->setType(ItemLineEdit::cGeneralManufactured | ItemLineEdit::cGeneralPurchased |
                 ItemLineEdit::cPhantom | ItemLineEdit::cKit |
                 ItemLineEdit::cPlanning | ItemLineEdit::cTooling);

  _cutoff->setNullString(tr("Latest"));
  _cutoff->setNullDate(omfgThis->endOfTime().addDays(-1));
  _cutoff->setAllowNullDate(true);
  _cutoff->setNull();

  list()->addColumn(tr("Date"),        _dateColumn,  Qt::AlignCenter, true,  "actiondate" );
  list()->addColumn(tr("Action"),      _itemColumn,  Qt::AlignCenter, true,  "action" );
  list()->addColumn(tr("Seq #"),       40,           Qt::AlignCenter, true,  "bomitem_seqnumber"  );
  list()->addColumn(tr("Item Number"), _itemColumn,  Qt::AlignLeft,   true,  "item_number"   );
  list()->addColumn(tr("Description"), -1,           Qt::AlignCenter, true,  "description" );
  list()->addColumn(tr("UOM"),         _uomColumn,   Qt::AlignCenter, true,  "uom_name" );
  list()->addColumn(tr("Fxd. Qty."),   _qtyColumn,   Qt::AlignRight,  true,  "qtyfxd"  );
  list()->addColumn(tr("Qty. Per"),    _qtyColumn,   Qt::AlignRight,  true,  "qtyper"  );
  list()->addColumn(tr("Scrap %"),     _prcntColumn, Qt::AlignRight,  true,  "bomitem_scrap"  );
  
  connect(omfgThis, SIGNAL(bomsUpdated(int, bool)), SLOT(sFillList()));
  _revision->setMode(RevisionLineEdit::View);
  _revision->setType("BOM");

  //If not Revision Control, hide control
  _revision->setVisible(_metrics->boolean("RevControl"));
}