This billcycle is specialized to allow `half-monthly billing'. It generates two billing periods per month. One from the end date of the last billing period (normally this means from the first day of the month) up to but excluding the day configured as `mid-month' (1-31). The second billing period is from `mid-month' up to and including the last day of the month.
Definition at line 330 of file billcycle.h.
typedef std::auto_ptr<MidMonthBillcycle> OSB_LIB::MidMonthBillcycle::AutoPtr |
Short-cut for an auto pointer.
For details see quality manual, implementation patterns: Virtual copy construction.
Reimplemented from OSB_LIB::Billcycle.
Definition at line 334 of file billcycle.h.
OSB_LIB::MidMonthBillcycle::MidMonthBillcycle | ( | ) | [inline] |
Add a billing period to the given start date.
The billing periods of mid-month billcycle are from the 1st of a month to the day of the month (exclusive) configured in the mid-month parameter and from this day to the last day of the month.
from | Start date of the billing period. |
Implements OSB_LIB::Billcycle.
AutoPtr OSB_LIB::MidMonthBillcycle::clone | ( | ) | const |
Virtual copy construction.
For details see quality manual, implementation patterns.
Reimplemented from OSB_LIB::Billcycle.
virtual Billcycle* OSB_LIB::MidMonthBillcycle::clone_ | ( | ) | const [private, virtual] |
Internal virtual copy constructor.
For details see quality manual, implementation patterns.
Implements OSB_LIB::Billcycle.
int OSB_LIB::MidMonthBillcycle::midMonth | ( | ) | const [inline] |
int OSB_LIB::MidMonthBillcycle::minPeriod | ( | ) | const [inline] |
int OSB_LIB::MidMonthBillcycle::readSpecific | ( | const OSB_DB::Session & | session | ) | [virtual] |
Read billcycle specific parameters from the database.
Reads the billcycle specific parameters for a concrete billcycle, if any.
session | Database session to use. |
Implements OSB_LIB::Billcycle.
friend class OSB_DB::BillcycleGw [friend] |
int OSB_LIB::MidMonthBillcycle::midMonth_ [private] |
Day of month used to split it.
Definition at line 368 of file billcycle.h.
Referenced by midMonth().
int OSB_LIB::MidMonthBillcycle::minPeriod_ [private] |
Minimum length of a billing period.
Definition at line 370 of file billcycle.h.
Referenced by minPeriod().