OSB_LIB::Invoice Class Reference

Collaboration diagram for OSB_LIB::Invoice:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class Invoice.

The invoice stores all invoice items and amounts. It is the master of all these items.

Definition at line 353 of file invoice.h.

Shorthands and functions to deal with the invoice items.

ToDo: Do we really want to provide these iterators in view of the limited capabilities of the Iterator?

Functions to deal with the subscharge items.

Functions to deal with the onetime items.

Functions to deal with the invoice amounts.

Public Member Functions

Accessors for private members.
Functions to create new invoice items.
For each derived class we provide versions with/without additional sort key.

Private Member Functions

Private Attributes


Member Typedef Documentation

typedef std::vector<BaseAmount*> OSB_LIB::Invoice::AmountList

Definition at line 600 of file invoice.h.

typedef AmountList::const_iterator OSB_LIB::Invoice::AmountListCI

Definition at line 601 of file invoice.h.

typedef AmountList::iterator OSB_LIB::Invoice::AmountListI

Definition at line 602 of file invoice.h.

typedef ItemMap::Iterator OSB_LIB::Invoice::ItemListI

Definition at line 558 of file invoice.h.

typedef std::vector<OnetimeChargeItem*> OSB_LIB::Invoice::OnetimeChargeItemList

Definition at line 584 of file invoice.h.

typedef OnetimeChargeItemList::const_iterator OSB_LIB::Invoice::OnetimeChargeItemListCI

Definition at line 586 of file invoice.h.

typedef OnetimeChargeItemList::iterator OSB_LIB::Invoice::OnetimeChargeItemListI

Definition at line 587 of file invoice.h.

typedef std::vector<SubsItem*> OSB_LIB::Invoice::SubsItemList

Definition at line 569 of file invoice.h.

typedef SubsItemList::const_iterator OSB_LIB::Invoice::SubsItemListCI

Definition at line 570 of file invoice.h.

typedef SubsItemList::iterator OSB_LIB::Invoice::SubsItemListI

Definition at line 571 of file invoice.h.


Constructor & Destructor Documentation

OSB_LIB::Invoice::Invoice ( const Invoice  )  [private]

Not allowed.

OSB_LIB::Invoice::Invoice (  )  [inline]

c'tor.

Definition at line 360 of file invoice.h.

OSB_LIB::Invoice::~Invoice (  )  [inline]

~ItemMap() takes care of the invoice items.

Definition at line 362 of file invoice.h.


Member Function Documentation

void OSB_LIB::Invoice::addAmount ( BaseAmount a,
ContributesTo  flags 
)

Add an amount to the list of invoice amounts and all invoice (sub)totals to which it contributes.

Parameters:
a Amount to add.
flags Flag of where the amount will contribute to.

Referenced by newOnetimeChargeItem(), newSubsItem(), newTotalItem(), and newUsageItem().

AmountListI OSB_LIB::Invoice::amountListBegin (  )  [inline]

Definition at line 606 of file invoice.h.

References invoiceAmounts_.

AmountListCI OSB_LIB::Invoice::amountListBegin (  )  const [inline]

Definition at line 604 of file invoice.h.

References invoiceAmounts_.

AmountListI OSB_LIB::Invoice::amountListEnd (  )  [inline]

Definition at line 610 of file invoice.h.

References invoiceAmounts_.

AmountListCI OSB_LIB::Invoice::amountListEnd (  )  const [inline]

Definition at line 608 of file invoice.h.

References invoiceAmounts_.

ItemMap::Iterator OSB_LIB::Invoice::findItem ( const Section s  )  [inline]

Definition at line 561 of file invoice.h.

References OSB_LIB::ItemMap::find(), and items_.

const Subtotal& OSB_LIB::Invoice::invoiceTotal (  )  const [inline]

Definition at line 378 of file invoice.h.

References invoiceTotal_.

ItemListI OSB_LIB::Invoice::itemListBegin (  )  [inline]

Definition at line 559 of file invoice.h.

References OSB_LIB::ItemMap::begin(), and items_.

ItemListI OSB_LIB::Invoice::itemListEnd (  )  [inline]

Definition at line 560 of file invoice.h.

References OSB_LIB::ItemMap::end(), and items_.

template<typename T>
AssociateInfo * OSB_LIB::Invoice::newAssociateInfo ( const Section section,
const T &  t,
const Associate associate 
)

Create a new info item at the invoice.

The typename T specifies the type of sort key in the section.

Definition at line 1265 of file invoice.h.

References OSB_LIB::ItemMap::insert(), items_, setNumber(), and OSB_LIB::Section::str().

AssociateInfo* OSB_LIB::Invoice::newAssociateInfo ( const Section section,
const Associate associate 
)

Create a new Associate info item at the invoice.

template<typename T>
InvoiceInfoItem * OSB_LIB::Invoice::newInvoiceInfoItem ( const Section section,
const T &  t,
const InvoiceInfo invInfo 
)

Create a new Invoice Info info item at the invoice.

The typename T specifies the type of sort key in the section.

Definition at line 1300 of file invoice.h.

References OSB_LIB::ItemMap::insert(), items_, setNumber(), and OSB_LIB::Section::str().

InvoiceInfoItem* OSB_LIB::Invoice::newInvoiceInfoItem ( const Section section,
const InvoiceInfo invInfo 
)

Create a new Invoice Info info item at the invoice.

template<typename T>
OnetimeChargeItem * OSB_LIB::Invoice::newOnetimeChargeItem ( const Section ,
const T &  ,
const OnetimeCharge  
)

Definition at line 1215 of file invoice.h.

References OSB_LIB::ct_invAmounts, OSB_LIB::ct_invTotal, and OSB_LIB::ct_otcTotal.

template<typename T>
OnetimeChargeItem * OSB_LIB::Invoice::newOnetimeChargeItem ( const Section ,
const T &  ,
const OnetimeCharge ,
ContributesTo   
)

Create a new one time charge item at the invoice The typename T specifies the type of sort key in the section.

Definition at line 1194 of file invoice.h.

References addAmount(), OSB_LIB::OnetimeChargeItem::amount, OSB_LIB::ItemMap::insert(), items_, onetimeChargeItems_, setNumber(), and OSB_LIB::Section::str().

OnetimeChargeItem* OSB_LIB::Invoice::newOnetimeChargeItem ( const Section ,
const OnetimeCharge ,
ContributesTo  = ContributesTo(ct_invAmounts|ct_invTotal|ct_otcTotal) 
)

Create a new one time charge item at the invoice.

template<typename T>
SubsItem * OSB_LIB::Invoice::newSubsItem ( const Section ,
const T &  ,
const SubsCharge  
)

Definition at line 1183 of file invoice.h.

References OSB_LIB::ct_invAmounts, OSB_LIB::ct_invTotal, and OSB_LIB::ct_subsTotal.

template<typename T>
SubsItem * OSB_LIB::Invoice::newSubsItem ( const Section ,
const T &  ,
const SubsCharge ,
ContributesTo   
)

Create a new subscription charge item at the invoice.

The typename T specifies the type of sort key in the section.

Definition at line 1166 of file invoice.h.

References addAmount(), OSB_LIB::SubsItem::amount, OSB_LIB::ItemMap::insert(), items_, setNumber(), OSB_LIB::Section::str(), and subsItems_.

SubsItem* OSB_LIB::Invoice::newSubsItem ( const Section ,
const SubsCharge ,
ContributesTo  = ContributesTo(ct_invAmounts|ct_invTotal|ct_subsTotal) 
)

Create a new subscription charge item at the invoice.

template<typename T>
SummaryChargesInfo * OSB_LIB::Invoice::newSummaryChargesInfo ( const Section section,
const T &  t,
const SummaryCharges sumCharges 
)

Create a new Summary Charges info item at the invoice.

The typename T specifies the type of sort key in the section.

Definition at line 1282 of file invoice.h.

References OSB_LIB::ItemMap::insert(), items_, setNumber(), and OSB_LIB::Section::str().

SummaryChargesInfo* OSB_LIB::Invoice::newSummaryChargesInfo ( const Section section,
const SummaryCharges sumCharges 
)

Create a new Summary Charges info item at the invoice.

template<typename T>
TotalItem * OSB_LIB::Invoice::newTotalItem ( const Section section,
const T &  t,
Decimal volume,
const Unit::Oid uId 
)

Definition at line 1253 of file invoice.h.

References OSB_LIB::ct_nothing.

template<typename T>
TotalItem * OSB_LIB::Invoice::newTotalItem ( const Section section,
const T &  t,
Decimal volume,
const Unit::Oid uId,
ContributesTo  flags 
)

Create a new total item at the invoice The typename T specifies the type of sort key in the section.

Definition at line 1228 of file invoice.h.

References addAmount(), OSB_LIB::TotalItem::amount_, OSB_LIB::ItemMap::insert(), items_, setNumber(), and OSB_LIB::Section::str().

TotalItem* OSB_LIB::Invoice::newTotalItem ( const Section section,
Decimal volume,
const Unit::Oid uId,
ContributesTo  flags = ContributesTo(ct_nothing) 
)

Create a new total item at the invoice.

template<typename U, typename T>
U * OSB_LIB::Invoice::newUsageItem ( const Section section,
const T &  t 
)

Definition at line 1156 of file invoice.h.

References OSB_LIB::ct_invAmounts, OSB_LIB::ct_invTotal, and OSB_LIB::ct_usgTotal.

template<typename U, typename T>
U * OSB_LIB::Invoice::newUsageItem ( const Section section,
const T &  t,
ContributesTo  flag 
)

Create a new usage item at the invoice.

The typename T specifies the type of sort key in the section.

Definition at line 1138 of file invoice.h.

References addAmount(), OSB_LIB::ItemMap::insert(), items_, setNumber(), and OSB_LIB::Section::str().

template<typename U>
U * OSB_LIB::Invoice::newUsageItem ( const Section section  ) 

Definition at line 1129 of file invoice.h.

References OSB_LIB::ct_invAmounts, OSB_LIB::ct_invTotal, and OSB_LIB::ct_usgTotal.

template<typename U>
U * OSB_LIB::Invoice::newUsageItem ( const Section section,
ContributesTo  flag 
)

Create a new usage item at the invoice.

Definition at line 1112 of file invoice.h.

References addAmount(), OSB_LIB::ItemMap::insert(), items_, setNumber(), and OSB_LIB::Section::str().

OnetimeChargeItemListI OSB_LIB::Invoice::onetimeChargeItemListBegin (  )  [inline]

Definition at line 590 of file invoice.h.

References onetimeChargeItems_.

OnetimeChargeItemListCI OSB_LIB::Invoice::onetimeChargeItemListBegin (  )  const [inline]

Definition at line 588 of file invoice.h.

References onetimeChargeItems_.

OnetimeChargeItemListI OSB_LIB::Invoice::onetimeChargeItemListEnd (  )  [inline]

Definition at line 594 of file invoice.h.

References onetimeChargeItems_.

OnetimeChargeItemListCI OSB_LIB::Invoice::onetimeChargeItemListEnd (  )  const [inline]

Definition at line 592 of file invoice.h.

References onetimeChargeItems_.

const Subtotal& OSB_LIB::Invoice::onetimeChargesTotal (  )  const [inline]

Definition at line 381 of file invoice.h.

References onetimeChargesTotal_.

Invoice& OSB_LIB::Invoice::operator= ( const Invoice  )  [private]

Not allowed.

void OSB_LIB::Invoice::setNumber ( InvoiceItem ii  )  [inline]

Set the invoice item number at the item.

Definition at line 374 of file invoice.h.

References count_, and OSB_LIB::InvoiceItem::setNumber().

Referenced by newAssociateInfo(), newInvoiceInfoItem(), newOnetimeChargeItem(), newSubsItem(), newSummaryChargesInfo(), newTotalItem(), and newUsageItem().

SubsItemListI OSB_LIB::Invoice::SubsItemListBegin (  )  [inline]

Definition at line 574 of file invoice.h.

References subsItems_.

SubsItemListCI OSB_LIB::Invoice::SubsItemListBegin (  )  const [inline]

Definition at line 572 of file invoice.h.

References subsItems_.

SubsItemListI OSB_LIB::Invoice::SubsItemListEnd (  )  [inline]

Definition at line 578 of file invoice.h.

References subsItems_.

SubsItemListCI OSB_LIB::Invoice::SubsItemListEnd (  )  const [inline]

Definition at line 576 of file invoice.h.

References subsItems_.

const Subtotal& OSB_LIB::Invoice::subsTotal (  )  const [inline]

Definition at line 380 of file invoice.h.

References subsTotal_.

const Subtotal& OSB_LIB::Invoice::usageTotal (  )  const [inline]

Definition at line 379 of file invoice.h.

References usageTotal_.


Member Data Documentation

int OSB_LIB::Invoice::count_ [private]

Invoice item counter.

Definition at line 615 of file invoice.h.

Referenced by setNumber().

AmountList OSB_LIB::Invoice::invoiceAmounts_ [private]

All invoice amounts - amounts for taxation and book-keeping.

Definition at line 623 of file invoice.h.

Referenced by amountListBegin(), and amountListEnd().

Subtotal OSB_LIB::Invoice::invoiceTotal_ [private]

The total invoice amount.

Definition at line 625 of file invoice.h.

Referenced by invoiceTotal().

ItemMap OSB_LIB::Invoice::items_ [private]

All invoice items - master list.

Definition at line 617 of file invoice.h.

Referenced by findItem(), itemListBegin(), itemListEnd(), newAssociateInfo(), newInvoiceInfoItem(), newOnetimeChargeItem(), newSubsItem(), newSummaryChargesInfo(), newTotalItem(), and newUsageItem().

OnetimeChargeItemList OSB_LIB::Invoice::onetimeChargeItems_ [private]

Only the onetime-charge items.

Definition at line 621 of file invoice.h.

Referenced by newOnetimeChargeItem(), onetimeChargeItemListBegin(), and onetimeChargeItemListEnd().

Subtotal OSB_LIB::Invoice::onetimeChargesTotal_ [private]

The total one time charge amount.

Definition at line 633 of file invoice.h.

Referenced by onetimeChargesTotal().

SubsItemList OSB_LIB::Invoice::subsItems_ [private]

Only the subscription charge items.

Definition at line 619 of file invoice.h.

Referenced by newSubsItem(), SubsItemListBegin(), and SubsItemListEnd().

Subtotal OSB_LIB::Invoice::subsTotal_ [private]

The total Subscription charge amount.

Definition at line 629 of file invoice.h.

Referenced by subsTotal().

Subtotal OSB_LIB::Invoice::totalTotal_ [private]

The total usage amount.

Definition at line 631 of file invoice.h.

Subtotal OSB_LIB::Invoice::usageTotal_ [private]

The total usage amount.

Definition at line 627 of file invoice.h.

Referenced by usageTotal().


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:10:03 2006 for OSB Library by  doxygen 1.4.7