1 #ifndef BILLINGDATABASE_H
2 #define BILLINGDATABASE_H
4 #include "models/billing.h"
7 #include "utils/string.h"
8 #include "gui/widgets/widgetsmodels/billingstablemodel.h"
10 using namespace Exceptions;
11 using namespace Utils;
12 using namespace Gui::Widgets;
68 void removeBilling(
const int pId);
77 void addBillingProject(
78 const int idProject,
const int idBilling,
const int idContributory);
87 bool isBillingPaid(
const int pId);
96 void removeBillingProject(
97 const int idProject,
const int idBilling,
const int idContributory);
103 int getMaxBillingNumber();
109 int getMaxQuoteNumber();
117 int getMaxBillingNumberOfCustomer(
const int idCustomer);
125 int getMaxQuoteNumberOfCustomer(
const int idCustomer);
133 QSharedPointer<Models::Billing> getBilling(QSqlQuery &q);
140 QMap<Project *, Billing *> getAllBillingsOfProject();
148 QList<Billing> getBillsBetweenDates(QDate begin, QDate end);
155 QList<Billing> getBills(
const int projectId = 0);
162 QList<Billing> getBillsPaid(
const int projectId = 0);
170 int getNbBills(
const int customerId = 0);
178 int getNbBillsPaid(
const int customerId = 0);
186 int getNbQuotes(
const int customerId = 0);
194 int getNbDocs(
const int customerId = 0);
205 #endif // BILLINGDATABASE_H
The DbException class for database exception : queries, db file, …
Definition: dbexception.h:18
The BillingDatabase class Billing (or Quote) table database.
Definition: billingdatabase.h:21
The Database class Master class for all database access.
Definition: database.h:34
The Billing class : Billing or Quote of a Customer.
Definition: billing.h:28