Bug Tracker Incident #8441

 


Summary
Project
INCDT - xTuple ERP
Incident Category
Bugs
Incident Number
8441
Visibility
public


Product Version
None
Fixed In Version
3.3.0Alpha


Summary
ABC Classcode and Cycle Count Frequency added to dspItemSitesByParameterList.cpp


Description

Within the dspItemSitesByParameterList::sFillList() function, I added the itemsite_abcclasscode and itemsite_cyclecountfreq fields.

These fields are on the report and this addition was requested by Blair.

I added this line -->
" itemsite_abcclass,itemsite_cyclecountfreq,"

Source:

void dspItemSitesByParameterList::sFillList()
{
QString sql( "SELECT itemsite_id, warehous_code, item_number,"
" (item_descrip1 || ' ' || item_descrip2) AS description, uom_name,"
" itemsite_qtyonhand, formatBoolYN(itemsite_loccntrl) AS loccntrl,"
" CASE WHEN itemsite_controlmethod='R' THEN :regular"
" WHEN itemsite_controlmethod='N' THEN :none"
" WHEN itemsite_controlmethod='L' THEN :lot"
" WHEN itemsite_controlmethod='S' THEN :serial"
" END AS controlmethod,"
" CASE WHEN (itemsite_sold) THEN TEXT(itemsite_soldranking)"
" ELSE :na"
" END AS soldranking,"
" CASE WHEN (itemsite_datelastcount=startOfTime()) THEN NULL"
" ELSE itemsite_datelastcount"
" END AS datelastcount,"
" CASE WHEN (itemsite_datelastused=startOfTime()) THEN NULL"
" ELSE itemsite_datelastused"
" END AS datelastused,"
" 'qty' AS itemsite_qtyonhand_xtnumericrole,"
" itemsite_abcclass,itemsite_cyclecountfreq,"
" 'Never' AS datelastcount_xtnullrole,"
" 'Never' AS datelastused_xtnullrole "
"FROM itemsite, warehous, item, uom "
"WHERE ( (itemsite_item_id=item_id)"
" AND (item_inv_uom_id=uom_id)"
" AND (itemsite_warehous_id=warehous_id)" );

if (_parameter->isSelected())
{
if (_parameter->type() == ParameterGroup::ClassCode)
sql += " AND (item_classcode_id=:classcode_id)";
else if (_parameter->type() == ParameterGroup::ItemGroup)
sql += " AND (item_id IN (SELECT itemgrpitem_item_id FROM itemgrpitem WHERE (itemgrpitem_itemgrp_id=:itemgrp_id)))";
else if (_parameter->type() == ParameterGroup::PlannerCode)
sql += " AND (itemsite_plancode_id=:plancode_id)";
else if (_parameter->type() == ParameterGroup::CostCategory)
sql += " AND (itemsite_costcat_id=:costcat_id)";
}
else if (_parameter->isPattern())
{
if (_parameter->type() == ParameterGroup::ClassCode)
sql += " AND (item_classcode_id IN (SELECT classcode_id FROM classcode WHERE (classcode_code ~ :classcode_pattern)))";
else if (_parameter->type() == ParameterGroup::ItemGroup)
sql += " AND (item_id IN (SELECT itemgrpitem_item_id FROM itemgrpitem, itemgrp WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) AND (itemgrp_name ~ :itemgrp_pattern) ) ))";
else if (_parameter->type() == ParameterGroup::PlannerCode)
sql += " AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ :plancode_pattern)))";
else if (_parameter->type() == ParameterGroup::CostCategory)
sql += " AND (itemsite_costcat_id IN (SELECT costcat_id FROM costcat WHERE (costcat_code ~ :costcat_pattern)))";
}

if (_warehouse->isSelected())
sql += " AND (warehous_id=:warehous_id)";

if (!_showInactive->isChecked())
sql += " AND (itemsite_active)";

sql += ") "
"ORDER BY item_number;";

q.prepare(sql);
_warehouse->bindValue(q);
_parameter->bindValue(q);
q.bindValue(":regular", tr("Regular"));
q.bindValue(":none", tr("None"));
q.bindValue(":lot", tr("Lot #"));
q.bindValue(":serial", tr("Serial #"));
q.bindValue(":na", tr("N/A"));
q.exec();
_itemsite->populate(q);
}


Details
Reporter
szuke
CRM Account
Core Services Group, LLC
Status
Closed
Assigned
cryan


Priority
Normal
Severity
Patch
Updated
09-06-12 15:39
Resolution
Fixed



Comments

DateUsernameComment
03/04/11 08:25mfgadmin

Within the dspItemSitesByParameterList::sFillList() function, I added the itemsite_abcclasscode and itemsite_cyclecountfreq fields.

These fields are on the report and this addition was requested by Blair.

I added this line -->
" itemsite_abcclass,itemsite_cyclecountfreq,"

Source:

void dspItemSitesByParameterList::sFillList()
{
QString sql( "SELECT itemsite_id, warehous_code, item_number,"
" (item_descrip1 || ' ' || item_descrip2) AS description, uom_name,"
" itemsite_qtyonhand, formatBoolYN(itemsite_loccntrl) AS loccntrl,"
" CASE WHEN itemsite_controlmethod='R' THEN :regular"
" WHEN itemsite_controlmethod='N' THEN :none"
" WHEN itemsite_controlmethod='L' THEN :lot"
" WHEN itemsite_controlmethod='S' THEN :serial"
" END AS controlmethod,"
" CASE WHEN (itemsite_sold) THEN TEXT(itemsite_soldranking)"
" ELSE :na"
" END AS soldranking,"
" CASE WHEN (itemsite_datelastcount=startOfTime()) THEN NULL"
" ELSE itemsite_datelastcount"
" END AS datelastcount,"
" CASE WHEN (itemsite_datelastused=startOfTime()) THEN NULL"
" ELSE itemsite_datelastused"
" END AS datelastused,"
" 'qty' AS itemsite_qtyonhand_xtnumericrole,"
" itemsite_abcclass,itemsite_cyclecountfreq,"
" 'Never' AS datelastcount_xtnullrole,"
" 'Never' AS datelastused_xtnullrole "
"FROM itemsite, warehous, item, uom "
"WHERE ( (itemsite_item_id=item_id)"
" AND (item_inv_uom_id=uom_id)"
" AND (itemsite_warehous_id=warehous_id)" );

if (_parameter->isSelected())
{
if (_parameter->type() == ParameterGroup::ClassCode)
sql += " AND (item_classcode_id=:classcode_id)";
else if (_parameter->type() == ParameterGroup::ItemGroup)
sql += " AND (item_id IN (SELECT itemgrpitem_item_id FROM itemgrpitem WHERE (itemgrpitem_itemgrp_id=:itemgrp_id)))";
else if (_parameter->type() == ParameterGroup::PlannerCode)
sql += " AND (itemsite_plancode_id=:plancode_id)";
else if (_parameter->type() == ParameterGroup::CostCategory)
sql += " AND (itemsite_costcat_id=:costcat_id)";
}
else if (_parameter->isPattern())
{
if (_parameter->type() == ParameterGroup::ClassCode)
sql += " AND (item_classcode_id IN (SELECT classcode_id FROM classcode WHERE (classcode_code ~ :classcode_pattern)))";
else if (_parameter->type() == ParameterGroup::ItemGroup)
sql += " AND (item_id IN (SELECT itemgrpitem_item_id FROM itemgrpitem, itemgrp WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) AND (itemgrp_name ~ :itemgrp_pattern) ) ))";
else if (_parameter->type() == ParameterGroup::PlannerCode)
sql += " AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ :plancode_pattern)))";
else if (_parameter->type() == ParameterGroup::CostCategory)
sql += " AND (itemsite_costcat_id IN (SELECT costcat_id FROM costcat WHERE (costcat_code ~ :costcat_pattern)))";
}

if (_warehouse->isSelected())
sql += " AND (warehous_id=:warehous_id)";

if (!_showInactive->isChecked())
sql += " AND (itemsite_active)";

sql += ") "
"ORDER BY item_number;";

q.prepare(sql);
_warehouse->bindValue(q);
_parameter->bindValue(q);
q.bindValue(":regular", tr("Regular"));
q.bindValue(":none", tr("None"));
q.bindValue(":lot", tr("Lot #"));
q.bindValue(":serial", tr("Serial #"));
q.bindValue(":na", tr("N/A"));
q.exec();
_itemsite->populate(q);
}

08/19/09 16:55svn

Revision: 6850
http://postbooks.svn.sourceforge.net/postbooks/?rev=6850&view=rev
Author: techdoc
Date: 2009-08-19 20:55:28 +0000 (Wed, 19 Aug 2009)

Log Message:
-----------
new screenshots for issue #8441

Modified Paths:
--------------
xtupledocs/trunk/referenceguide/guiclient/images/dspItemSitesByClassCode.png
xtupledocs/trunk/referenceguide/guiclient/images/dspItemSitesByCostCategory.png
xtupledocs/trunk/referenceguide/guiclient/images/dspItemSitesByPlannerCode.png

08/07/09 06:28sowmya

Issue tested in 3.3.0Beta3: Found fixed.

05/15/09 10:24svn

Revision: 5820
http://postbooks.svn.sourceforge.net/postbooks/?rev=5820&view=rev
Author: cryan
Date: 2009-05-15 14:24:31 +0000 (Fri, 15 May 2009)

Log Message:
-----------
Incorporated patch changes for issue #8441.

Modified Paths:
--------------
xtuple/trunk/guiclient/dspItemSitesByParameterList.cpp

02/09/09 11:15jrogelstad

FYI: This is something that could be done with scripting if the customer needs a solution sooner rather than later without using a custom binary.

02/09/09 10:33szuke

I had forgotten to add the columns. I attached an update .cpp, although I had to name it with NEW at the beginning because I couldn''t delete the previous file.

Source:

dspItemSitesByParameterList::dspItemSitesByParameterList(QWidget* parent, const char* name, Qt::WFlags fl)
: XWidget(parent, name, fl)
{
setupUi(this);

// (void)statusBar();

// signals and slots connections
connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
connect(_close, SIGNAL(clicked()), this, SLOT(close()));
connect(_itemsite, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));

_parameter->setType(ParameterGroup::ClassCode);

_itemsite->addColumn(tr("Site"), _whsColumn, Qt::AlignCenter, true, "warehous_code" );
_itemsite->addColumn(tr("Item Number"), _itemColumn, Qt::AlignLeft, true, "item_number" );
_itemsite->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "description" );
_itemsite->addColumn(tr("UOM"), _uomColumn, Qt::AlignCenter, true, "uom_name" );
_itemsite->addColumn(tr("QOH"), _qtyColumn, Qt::AlignRight, true, "itemsite_qtyonhand" );
_itemsite->addColumn(tr("Loc. Cntrl."), _dateColumn, Qt::AlignCenter, true, "loccntrl" );
_itemsite->addColumn(tr("Cntrl. Meth."), _dateColumn, Qt::AlignCenter, true, "controlmethod" );
_itemsite->addColumn(tr("Sold Ranking"), _dateColumn, Qt::AlignCenter, true, "soldranking" );
_itemsite->addColumn(tr("ABC Class"), _dateColumn, Qt::AlignCenter, true, "itemsite_abcclasscode" );
_itemsite->addColumn(tr("Cycle Cnt."), _dateColumn, Qt::AlignCenter, true, "itemsite_cyclecountfreq" );
_itemsite->addColumn(tr("Last Cnt''d"), _dateColumn, Qt::AlignCenter, true, "datelastcount" );
_itemsite->addColumn(tr("Last Used"), _dateColumn, Qt::AlignCenter, true, "datelastused" );
}



Characteristics

Backport
No
Operating System
 
Doc Flag
False
Copyright Assigned
Yes
HaxTuple
No

Files

Filename
NEWdspItemSitesByParameterList.cpp
UPDATEDdspItemSitesByParameterList.cpp
dspItemSitesByParameterList.cpp


Related Documents

TypeNumberDescriptionRelationshipRemove
Incident4090EDIT Button on Customer Information Opens Behind/InaccessibleRelated tox
Incident4091Tax Calculation/Display Wrong on S/O Credit MemoRelated tox
Incident4092user cannot reset passwordRelated tox
ProjectXTUPLEAPPSPorted From Mantisx


Subscribers

You do not have permission to view subscribers.


Incident History

DateUsernameFieldChange
12/16/10 09:13acdrupalNewIncident Added