Backoffice - max cost margin #31

Merged
bilal.catic merged 22 commits from backoffice-max-cost-margin into master 2018-10-15 00:24:34 +02:00
Showing only changes of commit f3d911e5b1 - Show all commits

View File

@@ -39,7 +39,6 @@ class Wiaas_Product_Hooks {
private static function validate_package($package){
$package_total_cost = Wiaas_Pricing::get_package_total_cost($package);
$package_max_cost_margin = Wiaas_Package_Pricing::get_package_max_cost_margin($package);
file_put_contents('/home/bilal/wiaas.log', 'Paket ID : ' . $package->get_id() . ' Total cost = ' . $package_total_cost . ' Max margin = ' . $package_max_cost_margin . ' ||| ', FILE_APPEND);
if (($package_max_cost_margin != 0) && ($package_total_cost > $package_max_cost_margin)){
Wiaas_Package_Status::set_package_status($package->get_id(), Wiaas_Package_Status::INVALID_MARGIN);
}else{