Accounting Software
Small Business Software Estimating Software
Contact SoftwareInventory SoftwareInventory Tracking SoftwareInventory Management SoftwareInventory Control SoftwareCustomer Management SoftwareBusiness Management Software

Expense Preferences (Header)

Link to: source code | prefs directory

Copyright Turtle Creek Software 1996-2006. All Rights Reserved.

This class manages expense preferences for the Goldenseal accounting software,
small business management software, construction project management software and
construction accounting software.


class CExpensePreferences : public DB_DescribedPersistent
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CExpensePreferences; }

CExpensePreferences();
virtual ~CExpensePreferences() {}

static CMoney GetVacationAmount(const CMoney inValue);

virtual NeoID GetDBClassID(void) const { return id_ExpensePrefs; }
virtual NeoSize GetFileLength(const CNeoFormat *aFormat) const;

virtual void CopyFrom(DB_PersistentObject */*source*/, const UInt8 /*copyFlags*/ = 0) {}
// only one object, so we never need to copy

virtual Boolean GetMemberValue(const TagType aTag, const TagType aType,
void *aValue) const;
virtual Boolean SetMemberValue(const TagType aTag, const TagType aType,
const void *aValue);

virtual void ReadObject(CNeoStream *aStream, const TagType aTag);
virtual void WriteObject(CNeoStream *aStream, const TagType aTag);

//static UInt8 GetPORequiredStatus(const DBClass inClassID);
static UInt8 GetPOWarning(const DBClass inClassID);
static UInt8 GetBidWarning(const DBClass inClassID);

virtual Boolean NeedsName() const { return false; } // TCS 2/3/01
virtual Boolean ForbidDuplicateNames() const { return false; } // TCS 7/25/01
virtual void FillDataReport(CTCS_Table *table, CNeoStream *stream) const;

virtual void SetEndSafetyTag() { mEndSafetyTag = tag_endsafetytag; }

protected:
UInt8 mEquipmentWOType,
mLaborWOType,
mSubsWOType,
mMaterialsPOType,
mOtherPOType,
mSubsBidType,
mMaterialsBidType,
mOtherBidType;

CMoney mBackupWithhold,
mHoursPerDay,
mFutureMoney2;

DBid mBackupPayee,
mDefaultCatSystem,
mPayrollTaxOHAccount, // TCS 4/13/01
mCommissionCatTax, // TCS 6/12/02
mCommissionCatSystem,
mFutureLong,
mFutureLong2; // TCS 10/8/02

// *** NEVER insert members before this bitfield!!!
UInt8 mAllowBankExpenses:1,
mAllowPayrollChanges:1,
mUseAssemblyAdjusters:1, // TCS 6/4/01
mSkipAllowances:1, // TCS 7/30/01
mSkipChangeOrders:1,
mWarnDupeInvoices:1, // TCS 6/5/02
mReconcileRunningTotals:1, // TCS 7/15/02
mIncludeAdjustments:1;

UInt8 mVacationUnits, // TCS 7/31/02
mSpelloutLangauge; // TCS 8/1/02
// *** NEVER insert members before this bitfield!!!
UInt8 mIncludePlanned:1, // TCS 12/13/02
mAllowExpenseChanges:1,
mFutureEnum3:6;
UInt8 mFutureEnum4, // TCS 10/8/02
mFutureEnum5;

// calculated members
TagType mEndSafetyTag; // TCS 9/8/02

enum
{
cCopyFileLength = 0,

cFileLength = cCopyFileLength +
8*sizeof(UInt8) +
3*sizeof(CMoney) +
7*sizeof(DBid) +
sizeof(UInt8) +
5*sizeof(UInt8) +
sizeof(TagType)
};
};