Link to: header | tables
directory | project management software
Copyright Turtle Creek Software 1996-2006. All Rights Reserved.
Comments
CProgressBreakdownTable
This class manages progress payment breakdown tables for the Goldenseal accounting software,
small business management software, construction
project management software and
construction
accounting software.
a table for displaying progress payment breakdowns in project billing.
We use this as part of the project management software-- it covers bills
that are based on percentage completion on project work, tracked by
category, location or item of work.
SUPERCLASS = CProjectBreakdownTable Source Code
/*********************************************************************************
CreateNewCellCVField TCS 2/22/00
create a new cv field for the given cell.
*********************************************************************************/
CTCS_CVField *CProgressBreakdownTable::CreateNewCellCVField(const TableCellT &inCell,
const SPaneInfo &inPaneInfo)
{
// get the member info from the column
SMemberInfo memberInfo;
TCS_ASSERTMsg(GetColMemberInfo(COL(inCell), &memberInfo), TCS_GetErrString(errID_BadColumn));
switch (memberInfo.tag)
{
case tag_phaseid: // bug fix TCS 11/27/98 rev 3/19/99 rev 9/2/99 rev 2/22/00
{
CProgressCV *cv = NEW CProgressCV(inPaneInfo, mTextInfo, GetPhaseClassID(), cHasPopup);
TCS_FailNILMsg(cv, TCS_GetErrString(errID_BadClairvoyant));
cv->SetTable(this);
return cv;
}
break;
default:
return THE_SUPERCLASS::CreateNewCellCVField(inCell, inPaneInfo);
break;
}
}
/*********************************************************************************
GetPhaseClassID TCS 2/22/00
the phase id can be either location or category, depending on the project
*********************************************************************************/
DBid CProgressBreakdownTable::GetPhaseClassID() const
{
TCS_FailNILMsg(gDBFile, TCS_GetErrString(errID_BadFile));
CProjectAccount *project =
TCS_SAFE_CAST(gDBFile->GetOneObject(id_ProjectAccount, GetTableMainAccount()),
CProjectAccount);
if (project)
{
DB_ObjectWatcher watcher(project);
return project->GetPhaseClassID(); // rev TCS 10/9/02
}
else
return id_Category;
}
/*********************************************************************************
GetDetailTransactionID TCS 10/10/02
get the transaction object class for a row. We show the estimate.
*********************************************************************************/
DBid CProgressBreakdownTable::GetDetailTransactionID(const TableIndexT /*row*/) const
{
DB_PersistentObject *owner = gDBFile->GetOneObject(GetOwnerClass(), GetOwnerID());
if (owner)
{
DB_ObjectWatcher watcher(owner);
return owner->GetEstimateID();
}
// if we get this far there's no transaction
return 0;
}
|