$totalPrice = #סה”כ מחיר בש”ח”#; $discountPercentage = #אחוז הנחה גלובלי#;
$finalPrice = $totalPrice – ($totalPrice * $discountPercentage / 100);
return $finalPrice;