Link to: source code | transactions
directory
Copyright Turtle Creek Software 1996-2006. All Rights Reserved.
This class manages inventory used in the Goldenseal accounting software,
inventory tracking software, inventory
management software and
inventory control software.
class CInventoryUsed : public CExpenseTransaction
{
public:
static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CInventoryUsed; }
CInventoryUsed();
virtual ~CInventoryUsed() {}
virtual void CopyFrom(DB_PersistentObject *source, const UInt8 copyFlags = 0);
virtual NeoSize GetFileLength(const CNeoFormat *aFormat) const;
virtual DBid GetDBClassID(void) const { return id_InventoryUsed; }
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);
virtual void PostNewRecord(const UInt8 creationType);
virtual void PostDeletion(const Boolean postAudit);
virtual void PostRecordActivated(const UInt8 creationType);
virtual void PostRecordCancelled(const UInt8 cancelType);
virtual void PostRecordChanging(const Boolean accountChanging,
const Boolean jobChanging);
virtual void PostRecordChanged(const CMoney &oldAmount,
const Boolean accountChanged,
const Boolean jobChanged);
virtual void PostInventoryChange(const Boolean removeItem = false);
virtual CMoney GetTandMAmount(const Boolean includeTax = false,
const Boolean includeAdjustments = false) const;
virtual DBid GetDefaultExpenseAccount() const { return account_InventoryUsed; }
virtual DBid GetPayablesAccount() const { return 0; }
virtual CMoney GetAmountPaid() const { return GetAmount(); }
virtual CMoney GetSalesTaxPercent() const;
virtual UInt8 GetConditions() const { return mConditions; } // TCS 9/7/00 moved 9/29/02
virtual void FillDataReport(CTCS_Table *table, CNeoStream *stream) const;
protected:
// Basic Data
UInt8 mStatus,
mConditions;
CMoney mGrossAmount,
mTaxAmount;
DBid mTaxRate;
// calculated members.
TagType mIUEndSafetyTag; // TCS 9/8/02
enum
{
cCopyFileLength = 2*sizeof(UInt8) +
2*sizeof(CMoney) +
sizeof(DBid),
cParentFileLength = cCopyFileLength,
cFileLength = cCopyFileLength +
sizeof(TagType)
};
}; |