void UeOrdersModel::ueAddOrder(const QString& userName,
const QString& placeName,
const QImage& productImage,
const QString& productId,
const QString& productName,
const QString& productPriceSell,
const quint64& productQuantity,
const QString& productVAT)
{
QPair<QString, QString> key=QPair<QString, QString>(userName, placeName);
if(this->ueOrders()->contains(key))
{
double priceSell=productPriceSell.toDouble();
double priceVAT=productVAT.toDouble();
double amountWithoutVAT=productQuantity*priceSell;
double amountWithVAT=productQuantity*(priceSell+(priceSell*priceVAT));
this->ueOrders()->value(key)->append(new UeOrderRecord(this,
userName,
placeName,
productImage,
productId,
productName,
productPriceSell,
productQuantity,
productVAT,
} // if
} // ueAddOrder
void UeOrdersModel::ueAddOrder(const QString& userName,
const QString& placeName,
const QImage& productImage,
const QString& productId,
const QString& productName,
const QString& productPriceSell,
const quint64& productQuantity,
const QString& productVAT)
{
QPair<QString, QString> key=QPair<QString, QString>(userName, placeName);
if(this->ueOrders()->contains(key))
{
double priceSell=productPriceSell.toDouble();
double priceVAT=productVAT.toDouble();
double amountWithoutVAT=productQuantity*priceSell;
double amountWithVAT=productQuantity*(priceSell+(priceSell*priceVAT));
this->ueOrders()->value(key)->append(new UeOrderRecord(this,
userName,
placeName,
productImage,
productId,
productName,
productPriceSell,
productQuantity,
QString::number(amountWithoutVAT),
productVAT,
QString::number(amountWithVAT)));
} // if
} // ueAddOrder
To copy to clipboard, switch view to plain text mode
How do I now send
Bookmarks