/** * Store the count discounts after editing * @return boolean True on success, false otherwise * @author Reto Kohli <*****@*****.**> */ function store_discount_count() { if (!isset($_POST['discountId'])) { return true; } $discountId = intval($_POST['discountId']); $discountGroupName = contrexx_input2raw($_POST['discountGroupName']); $discountGroupUnit = contrexx_input2raw($_POST['discountGroupUnit']); $arrDiscountCount = contrexx_input2int($_POST['discountCount']); $arrDiscountRate = contrexx_input2float($_POST['discountRate']); return Discount::storeDiscountCount($discountId, $discountGroupName, $discountGroupUnit, $arrDiscountCount, $arrDiscountRate); }