FactDev  0.1
Models::Billing Class Reference

The Billing class : Billing or Quote of a Customer. More...

#include <billing.h>

Inheritance diagram for Models::Billing:
Models::IModel Models::Calculable

Public Member Functions

 Billing ()
 Billing::Billing. Construct a Billing.
 
 Billing (int id)
 Billing::Billing. Construct a Billing or quote. More...
 
 ~Billing ()
 destruct a billing object
 
void commit ()
 Billing::commit. Insert a modification in Billing table on the database.
 
void hydrat (int getId)
 Billing::hydrat. Update of the Billing which is specified by getId More...
 
void remove ()
 Billing::remove. Remove a Billing.
 
QVariantHash getDataMap ()
 Billing::getDataMap Get all data of model with a HashMap key/value. More...
 
double getPrice (bool paied=false)
 getPrice Return the price of a calculable object More...
 
double getSumQuantity ()
 ContributoriesList::getSumQuantity Return the sum of quantity (number of days) of the Contributories. More...
 
void generateTex ()
 Billing::generateTex Generate a .tex file for the billing.
 
void generatePdf ()
 Billing::generatePdf Generate a .pdf file for the billing.
 
QString getPath ()
 Billing::getPath Return the path of billing filename (without extension) More...
 
QString getFolder ()
 Billing::getFolder Return the directory of billing. More...
 
QString getFilename ()
 Billing::getFilename Return the filename of billing (without extension) More...
 
ContributoriesListgetContributories ()
 Billing::getContributories. Return a map of Contributory for each Project of the Billing More...
 
void addContributory (Contributory &c)
 Billing::addContributories Add a new contributory for project p. More...
 
QString getTitle () const
 Billing::getTitle. return title of Billing More...
 
void setTitle (const QString &getTitle)
 Billing::setTitle. Modify the title of Billing More...
 
QString getDescription () const
 Billing::getDescription. return description of Billing More...
 
void setDescription (const QString &getDescription)
 Billing::setDescription. Modify the description of Billing More...
 
int getNumber () const
 Billing::getNumber. Return number of the Billing. More...
 
void setNumber (int getNumber)
 Billing::setNumber. Modify _number of Billing. More...
 
bool isBilling () const
 Billing::isBilling. Return if it's a billing or a quote. More...
 
void setIsBilling (bool isBilling)
 Billing::setIsBilling. Modify isBilling of Billing. More...
 
QDate getDate () const
 Billing::getDate. return date of the Billing More...
 
void setDate (const QDate &getDate)
 Billing::setDate. Modify date of the Billing More...
 
bool isPaid () const
 Billing::isPaid Return TRUE if thee current billing is paid else return FALSE. More...
 
void setIsPaid (bool isPaid)
 Billing::setIsPaid Define the current billing according the argument isPaid More...
 
bool operator== (const Billing &b)
 Billing::operator == define the operator "==" to compare two billings and to see if they are the same. More...
 
bool operator!= (const Billing &b)
 Billing::operator != defines the operator "!=" to compare two Billing and to see if they are different. More...
 
void setContributories (const ContributoriesList &contributories)
 
bool operator< (const Billing &b) const
 Billing::operator < defines the operator "< to compare two Billing and to see if the fisrt is anterior to the second. More...
 
QStandardItem * getItem ()
 Billing::getItem Return the bill/quote item. More...
 
- Public Member Functions inherited from Models::IModel
virtual ~IModel ()
 ~IModel Remove an instance of IModel
 
int getId () const
 IModel::getId Return the identify of the element of the database. More...
 
void setId (int id)
 IModel::setId Replace the current identify by id More...
 
bool isToRemoved () const
 toRemoved return if object must be removed. More...
 
void setToRemoved (bool toRemoved)
 setToRemoved Change the flag for removed object More...
 

Additional Inherited Members

- Protected Attributes inherited from Models::IModel
int _id
 Element identify.
 
bool _toRemoved
 Flag to know if the object must be removed.
 

Detailed Description

The Billing class : Billing or Quote of a Customer.

Author
Antoine de Roquemaurel
Florent Berbie

Constructor & Destructor Documentation

Models::Billing::Billing ( int  id)

Billing::Billing. Construct a Billing or quote.

Parameters
intid

Member Function Documentation

void Models::Billing::addContributory ( Contributory c)

Billing::addContributories Add a new contributory for project p.

Parameters
pThe Project who contain Contributory
cThe new Contributory
ContributoriesList & Models::Billing::getContributories ( )

Billing::getContributories. Return a map of Contributory for each Project of the Billing

Returns
QMap<Project, QList<Contributory>>
QVariantHash Models::Billing::getDataMap ( )
virtual

Billing::getDataMap Get all data of model with a HashMap key/value.

Returns
Model's data

Implements Models::IModel.

QDate Models::Billing::getDate ( ) const

Billing::getDate. return date of the Billing

Returns
date of Billing
QString Models::Billing::getDescription ( ) const

Billing::getDescription. return description of Billing

Returns
description of Billing
QString Models::Billing::getFilename ( )

Billing::getFilename Return the filename of billing (without extension)

Returns
Filename of Bulling
QString Models::Billing::getFolder ( )

Billing::getFolder Return the directory of billing.

Returns
Billing directory
QStandardItem * Models::Billing::getItem ( )

Billing::getItem Return the bill/quote item.

Returns
QStandardItem an item for QTree (level/depth 3)
int Models::Billing::getNumber ( ) const

Billing::getNumber. Return number of the Billing.

Returns
_number of Billing
QString Models::Billing::getPath ( )

Billing::getPath Return the path of billing filename (without extension)

Returns
billing path
double Models::Billing::getPrice ( bool  paied = false)
virtual

getPrice Return the price of a calculable object

Returns
The price

Implements Models::Calculable.

double Models::Billing::getSumQuantity ( )
virtual

ContributoriesList::getSumQuantity Return the sum of quantity (number of days) of the Contributories.

Returns
sum of quantity in days

Implements Models::Calculable.

QString Models::Billing::getTitle ( ) const

Billing::getTitle. return title of Billing

Returns
title of Billing
void Models::Billing::hydrat ( int  getId)
virtual

Billing::hydrat. Update of the Billing which is specified by getId

Parameters
getId

Implements Models::IModel.

bool Models::Billing::isBilling ( ) const

Billing::isBilling. Return if it's a billing or a quote.

Returns
if it's billing or a quote
bool Models::Billing::isPaid ( ) const

Billing::isPaid Return TRUE if thee current billing is paid else return FALSE.

Returns
Boolean
bool Models::Billing::operator!= ( const Billing b)

Billing::operator != defines the operator "!=" to compare two Billing and to see if they are different.

Parameters
bthe Billing to compare with the current Billing
Returns
true if the Billing are different else false
bool Models::Billing::operator< ( const Billing b) const

Billing::operator < defines the operator "< to compare two Billing and to see if the fisrt is anterior to the second.

Parameters
bthe Billing to compare with the current Billing
Returns
true if the Billing are different else false
bool Models::Billing::operator== ( const Billing b)

Billing::operator == define the operator "==" to compare two billings and to see if they are the same.

Parameters
bthe Billing to compare with the current Billing
Returns
true if they are the same billings else false
void Models::Billing::setDate ( const QDate &  getDate)

Billing::setDate. Modify date of the Billing

Parameters
getDatethe new date of the Billing
void Models::Billing::setDescription ( const QString &  getDescription)

Billing::setDescription. Modify the description of Billing

Parameters
getDescriptionModify the description with getDescription
void Models::Billing::setIsBilling ( bool  isBilling)

Billing::setIsBilling. Modify isBilling of Billing.

Parameters
isBilling
void Models::Billing::setIsPaid ( bool  isPaid)

Billing::setIsPaid Define the current billing according the argument isPaid

Parameters
isPaidBoolean
void Models::Billing::setNumber ( int  getNumber)

Billing::setNumber. Modify _number of Billing.

Parameters
getNumberthe new number of the Billing
void Models::Billing::setTitle ( const QString &  getTitle)

Billing::setTitle. Modify the title of Billing

Parameters
getTitleModify the title with getTitle

The documentation for this class was generated from the following files: