Accounting Software
Small Business Software Estimating Software
Time Tracking SoftwareTime Management SoftwareTime Billing SoftwareProject Management SoftwareBookkeeping SoftwareContact Management SoftwareBusiness Management Software

Vendor Sales Tax (Header)

Link to: source code | lists directory

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

This class manages vendor sales tax for the Goldenseal accounting software,
construction estimating software, project management software and business management software.

class CVendorSalesTax : public DB_DescribedPersistent
{
public:

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

CVendorSalesTax();
virtual ~CVendorSalesTax() {}

static CMoney CalculateSalesTaxAmount(const DBid taxRateID,
const CMoney &price,
const CMoney &deliveryCharge = 0,
const Boolean deliverIsTaxable = false);

virtual DBid GetDBClassID(void) const { return id_VendorSalesTax; }

virtual void CopyFrom(DB_PersistentObject *source, const UInt8 copyFlags = 0);

virtual NeoSize GetFileLength(const CNeoFormat *aFormat) const
{
return DB_DescribedPersistent::GetFileLength(aFormat) +
cFileLength;
}

virtual Boolean GetMemberValue(const NeoTag aTag, const NeoTag aType,
void *aValue) const;
virtual Boolean SetMemberValue(const NeoTag aTag, const NeoTag aType,
const void *aValue);
virtual void ReadObject(CNeoStream *aStream, const TagType aTag);
virtual void WriteObject(CNeoStream *aStream, const TagType aTag);

CMoney CalculateSalesTaxAmount(const CMoney &price,
const CMoney &deliveryCharge = 0,
const Boolean deliverIsTaxable = false) const;

virtual CMoney GetTaxPercent() const { return mRate; } // TCS 2/11/01

virtual void FillDataReport(CTCS_Table *table, CNeoStream *stream) const;

virtual void SetEndSafetyTag() { mEndSafetyTag = tag_endsafetytag; }


protected:
CMoney mRate,
mAddAmount;

UInt8 mRoundingType, // TCS 7/5/00
mPadding; // TCS 3/27/02

CMoney mExpansionMoney; // TCS 3/27/02
DBid mExpansionLong;

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

enum
{
cCopyFileLength = 2*sizeof(CMoney) +
2*sizeof(UInt8) +
sizeof(CMoney) +
sizeof(DBid),

cFileLength = cCopyFileLength +
sizeof(TagType)
};
};