00001 #ifndef COSTUNITPRODUCT_H 00002 #define COSTUNITPRODUCT_H 00003 00004 #include <QObject> 00005 00006 class CostUnitProduct : public QObject 00007 { 00008 public: 00009 CostUnitProduct(); 00010 00011 QString productName() { return p_productname; } 00012 void setProductName(QString name) { p_productname = name; } 00013 00014 void setProductData(QString textDirectCosts, QString textMarkup, QString textCommission, QString textTradeDiscount, QString textDiscount, QString textSalesTax); 00015 00016 QList<double> dataList(); 00017 QList<double> userList(); 00018 00019 void setDirectCosts(double d) { p_directcosts = d; } 00020 void setMarkup(double m) { p_markup = m; } 00021 void setCommission(double c) { p_commission = c; } 00022 void setTradeDiscount(double t) { p_tradediscount = t; } 00023 void setDiscount(double d) { p_discount = d; } 00024 void setSalesTax(double s) { p_salestax = s; } 00025 00026 double directCosts() { return p_directcosts; } 00027 double markup() { return p_markup; } 00028 double commission() { return p_commission; } 00029 double tradeDiscount() { return p_tradediscount; } 00030 double discount() { return p_discount; } 00031 double salesTax() { return p_salestax; } 00032 00033 double productionCosts(); 00034 double profitCalculation(); 00035 double netSalesPrice(); 00036 double commissionCalculation(); 00037 double cashPrice(); 00038 double discountCalculation(); 00039 double targetPrice(); 00040 double salesDiscountCalculation(); 00041 double grossSalesPriceWithoutSalesTax(); 00042 double salesTaxCalculation(); 00043 double grossSalesPriceWithSalesTax(); 00044 00045 void setFileIDforCostCentreSurcharge(int fileid) { p_fileIdCostCentre = fileid; } 00046 int fileIDforCostCentreSurcharge() { return p_fileIdCostCentre; } 00047 00048 void setCostCentreIDsForSurcharge(QList<int> costcentres) { p_costcentreIDs = costcentres; } 00049 QList<int> costCentreIDs() { return p_costcentreIDs; } 00050 00051 private: 00052 QString p_productname; 00053 00054 int p_fileIdCostCentre; // file to search for the costcentre ids 00055 QList<int> p_costcentreIDs; // the list contains the costcentre ids which get added to the price 00056 00057 double p_directcosts; 00058 double p_markup; 00059 double p_commission; 00060 double p_tradediscount; 00061 double p_discount; 00062 double p_salestax; 00063 }; 00064 00065 #endif // COSTUNITPRODUCT_H