return [
'selfcost' => round($model->getSelfCost($data), 2),
'cost' => round($model->getBouquetCost($data, true)),
- 'markup' => round($model->getBouquetCostMarkup($data), 2),
+ 'markup' => round($model->getBouquetCostMarkup($data, true), 2),
];
}
return $priceModel && !$forceDefault ? $priceModel->price : $this->getSelfCost($data) * 1.3 * 1.15;
}
- public function getBouquetCostMarkup($data = null) {
+ public function getBouquetCostMarkup($data = null, $forceDefault = false) {
$selfCost = $this->getSelfCost($data);
- return $selfCost > 0 ? ($this->getBouquetCost($data) / (1.3 * $selfCost) - 1) * 100 : 0;
+ return $selfCost > 0 ? ($this->getBouquetCost($data, $forceDefault) / (1.3 * $selfCost) - 1) * 100 : 0;
}
// /**