Logo Search packages:      
Sourcecode: lemonpos version File versions  Download package

Azahar Class Reference

#include <azahar.h>

List of all members.

Detailed Description

Database access class.

This class makes all database access.

Miguel Chavez Gamboa <miguel.chavez.gamboa@gmail.com>

Definition at line 42 of file azahar.h.

Public Member Functions

bool cancelTransaction (qulonglong id, bool inProgress)
bool createOffer (OfferInfo info)
bool decrementClientPoints (qulonglong id, qulonglong points)
bool decrementProductStock (qulonglong code, double qty, QDate date)
bool deleteAllTransactionItem (qulonglong id)
bool deleteEmptyTransactions ()
bool deleteOffer (qlonglong id)
bool deleteTransaction (qulonglong id)
QList< pieProdInfo > getAlmostSoldOutProducts (int min, int max)
QHash< QString, int > getCategoriesHash ()
QStringList getCategoriesList ()
qulonglong getCategoryId (QString texto)
QString getCategoryStr (qulonglong id)
unsigned int getClientId (QString uname)
ClientInfo getClientInfo (qulonglong clientId)
QHash< QString, ClientInfo > getClientsHash ()
QList< TransactionInfo > getLastTransactions (int pageNumber=1, int numItems=20, QDate beforeDate=QDate::currentDate())
QString getMainClient ()
qulonglong getMeasureId (QString texto)
QStringList getMeasuresList ()
QString getMeasureStr (qulonglong id)
ProfitRange getMonthProfitRange ()
ProfitRange getMonthSalesRange ()
QList< TransactionInfo > getMonthTransactions ()
QString getOffersFilterWithText (QString text)
qulonglong getProductCode (QString text)
double getProductDiscount (qulonglong code)
ProductInfo getProductInfo (qulonglong code)
qulonglong getProductOfferCode (qulonglong code)
QList< qulonglong > getProductsCode (QString regExpName)
QStringList getProductsList ()
QList< pieProdInfo > getTop5SoldProducts ()
TransactionInfo getTransactionInfo (qulonglong id)
QList< TransactionItemInfo > getTransactionItems (qulonglong id)
QList< TransactionInfo > getTransactionsPerDay (int pageNumber=1, int numItems=20, QDate beforeDate=QDate::currentDate())
unsigned int getUserId (QString uname)
QString getUserName (QString username)
QHash< QString, UserInfo > getUsersHash ()
bool incrementClientPoints (qulonglong id, qulonglong points)
bool incrementProductStock (qulonglong code, double qty)
void initDatabase (QString user, QString server, QString password, QString dbname)
qulonglong insertBalance (BalanceInfo info)
qulonglong insertCashOut (CashOutInfo info)
bool insertCategory (QString text)
bool insertClient (ClientInfo info)
bool insertMeasure (QString text)
bool insertProduct (ProductInfo info)
qulonglong insertTransaction (TransactionInfo info)
bool insertTransactionItem (TransactionItemInfo info)
bool insertUser (UserInfo info)
bool isConnected ()
QString lastError ()
bool moveOffer (qulonglong oldp, qulonglong newp)
void setDatabase (const QSqlDatabase &database)
bool updateClient (ClientInfo info)
bool updateProduct (ProductInfo info, qulonglong oldcode)
bool updateTransaction (TransactionInfo info)
bool updateUser (UserInfo info)

Private Member Functions

void setError (QString err)

Private Attributes

QSqlDatabase db
QString errorStr
QString m_mainClient

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

Generated by  Doxygen 1.6.0   Back to index