Example #1
0
        }
        if (isset($_POST["key"]["month"]) && isset($_POST["key"]["price"])) {
            $id = 0;
            if (!isNull($_POST["key"]["id"])) {
                $id = (int) $_POST["key"]["id"];
            }
            InsertUpdatePrice($_POST["key"]["price"], (int) $_POST["key"]['month'], $id);
        } else {
            $errorMessage = "Error information not valid!";
        }
    } catch (Exception $ex) {
        $errorMessage = $ex->getMessage();
    }
}
try {
    $priceList = getPriceList();
} catch (Exception $e) {
    $errorMessage = $e->getMessage();
    $priceList = array();
}
?>
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta content='IE=Edge,chrome=1' http-equiv='X-UA-Compatible'>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<title>update price</title>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
      <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
$cif = getClinicalFace($pid, $rid, $aid);
foreach ($cif as $c) {
    $datedischarged = date('F d, Y', strtotime($c["datedischarged"]));
    $timedischarged = $c["timedischarged"];
    $persondischarged = $c["persondischarged"];
    $finaldiagnosis = $c["finaldiagnosis"];
    $noofhosdays = $c["noofhosdays"];
}
$room = getRoomType($roomno, $bednumber);
foreach ($room as $r) {
    $roomtype = $r["roomtype"];
    $priceperday = $r["priceperday"];
}
$accomtot = $priceperday * $noofhosdays;
$accom = number_format((double) $accomtot, 2, '.', '');
$pricing = getPriceList($membership);
foreach ($pricing as $p) {
    $phdrugsandmedicines = $p["drugsandmedicines"];
    $phsupplies = $p["supplies"];
    $phlaboratory = $p["laboratory"];
    $phxray = $p["xray"];
    $phultrasound = $p["ultrasound"];
    $phecg = $p["ecg"];
    $phoxygen = $p["oxygen"];
    $phaccom = $p["accomsubs"];
    $phprofessionalfee = $p["professionalfee"];
    $phorfeedrfee = $p["orfeedrfee"];
}
?>
<!DOCTYPE HTML>
<head>
Example #3
0
            resultDistance: '',
            resultPrice: '',
            resultPriceEur: '',
            currency: 'EUR'
        },

        computed: {
            resultDistance: function() {
                var distance = parseFloat(this.distance.replace(',','.'));
                var consumption = parseFloat(this.consumption.replace(',','.'));

                return distance * consumption / 100;
            },
            resultPrice: function() {
                var priceList = <?php 
echo getPriceList(true);
?>
;

                var price = 0;

                if (this.fuel == '95') {
                    price = priceList[this.country]['fuelType']['95'];
                }
                if (this.fuel == '98') {
                    price = priceList[this.country]['fuelType']['98'];
                }
                if (this.fuel == '100') {
                    price = priceList[this.country]['fuelType']['100'];
                }
                if (this.fuel == 'diesel') {
Example #4
0
function updatePrices($fD)
{
    $objResponse = new xajaxResponse();
    $sql = "SELECT p.id, p.stuff_id FROM catalog_prices p JOIN catalog_sizes s ON p.size_id=s.id JOIN catalog_color c ON p.color_id=c.id WHERE p.stuff_id=" . $fD['stuff_id'] . " ORDER BY p.price";
    $items = $GLOBALS['db']->getItems('sizelist', $sql);
    foreach ($items as $item) {
        $price = isset($fD['price_' . $item['id']]) ? $fD['price_' . $item['id']] : 0;
        $ord = isset($fD['ord_' . $item['id']]) ? $fD['ord_' . $item['id']] : 0;
        $publish = isset($fD['publish_' . $item['id']]) ? $fD['publish_' . $item['id']] : 0;
        $sql = "UPDATE catalog_prices SET price='{$price}', ord='{$ord}', publish='{$publish}' WHERE id=" . $item['id'];
        $GLOBALS['db']->execQuery('updateprice', $sql);
    }
    $text = getPriceList($fD['stuff_id']);
    $objResponse->assign("sizelist", 'innerHTML', $text);
    $objResponse->script("hideDiv('waiting');");
    return $objResponse;
}