fix bug with software cost

This commit is contained in:
Bilal Catic
2018-10-29 13:24:49 +01:00
parent f5766cda99
commit bc39a69b7a

View File

@@ -70,8 +70,10 @@ function wiaas_get_package_software_procurement_cost($package) {
$total_cost = 0;
foreach ($bundled_items as $bundled_item) {
if (Wiaas_Product_Category::is_hardware($bundled_item->product)) {
$total_cost += Wiaas_Pricing::get_product_total_cost($bundled_item->product) * $bundled_item->get_quantity();
$product = $bundled_item->product;
if (Wiaas_Product_Category::get_category($product) === 'software') {
$total_cost += Wiaas_Pricing::get_product_total_cost($product) * $bundled_item->get_quantity();
}
}