initial docker setup
This commit is contained in:
27
frontend/src/helpers/coMarket/PriceHelper.js
Normal file
27
frontend/src/helpers/coMarket/PriceHelper.js
Normal file
@@ -0,0 +1,27 @@
|
||||
class PriceHellper {
|
||||
sumPrices(values) {
|
||||
let total = 0;
|
||||
values.forEach((val) => {
|
||||
total += parseFloat(val);
|
||||
});
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
getSelectedPrice(curentPackage, selectedAgreement) {
|
||||
return curentPackage.prices.find(price => {
|
||||
return price.idPaymentType === selectedAgreement.idPaymentType;
|
||||
});
|
||||
}
|
||||
|
||||
hasFixedPrice(selectedPrice) {
|
||||
return selectedPrice;
|
||||
}
|
||||
|
||||
hasRecurrentPrice(selectedPrice){
|
||||
return selectedPrice && (selectedPrice.recurentExtra > 0 || selectedPrice.servicesExtra > 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default PriceHellper;
|
||||
Reference in New Issue
Block a user