public function edit($KdTarif) { $tarif = Tarif::find($KdTarif); $jnskategori = Jnskategori::all(); $lab = Lab::all(); return View::make('tarif.edit_tarif')->with('jnskategori', $jnskategori)->with('lab', $lab)->with('tarif', $tarif); }
/** * Retourne le tarif appliqué actuellement à $disque * @param Disque $disque * @return Tarif tarif actuel de $disque */ public static function getDisqueTarif($disque) { //TODO 4.1 $idDisque = $disque->getId(); $idTarif = DisqueTarif::findFirst($idDisque)->getIdTarif(); $tarifDisque = Tarif::findFirst($idTarif)->getPrix(); return $tarifDisque; }
public function store2() { $kdtarif = Input::get('kdtarif'); $noreglab = Input::get('noreglab'); $harga2 = Tarif::select('Harga')->where('KdTarif', '=', $kdtarif)->get(); foreach ($harga2 as $key) { $harga = $key->Harga; } $reglab = RegLab::where('NoReglab', '=', $noreglab)->first(); $pivotData = array($kdtarif => array('Harga' => $harga)); $reglab->tarif()->attach($pivotData); $idpemeriksaan = Pemeriksaan2::orderBy('id', 'desc')->pluck('id'); $riwdiag = RiwayatDiagnosa::where('NoRegLab', '=', Input::get('noreglab'))->paginate(); $pemeriksaan = Pemeriksaan2::where('NoRegLab', '=', Input::get('noreglab'))->paginate(); $lab = Lab::all(); return View::make('registrasi.index2_registrasi')->with('reglab', $reglab)->with('pemeriksaan', $pemeriksaan)->with('riwdiag', $riwdiag)->with('lab', $lab); }
<?php include_once $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/utils.php"; require $_SERVER["DOCUMENT_ROOT"] . "/inc/inc.config.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Divers.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Tarif_categorie.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Tarif.php"; $debug = false; $divers = new Divers(); $categorie = new Tarif_categorie(); $tarif = new Tarif(); // ---- Chargement des infos diverses ------- // $info_divers = $divers->load(1, $debug); // ---- Liste des catégories disponibles ---- // if (1 == 1) { unset($recherche); $liste_categorie = $categorie->getListe($recherche, $debug); } // ------------------------------------------ // ?> <!doctype html> <html class="no-js" lang="fr"> <head> <title>Espace Beauté | Saint-Loubès | Nos tarifs</title> <?php include 'inc/header.php'; ?> </head>
/** * Get an array of totals for the services selected by the user. */ private function getInvoiceTotals($customer, $commande) { // Determine the rental city $city = Goodcity::model()->findByPk($commande->comgoodcitykey); // Determine mailing city category $rental_period = $commande->comperiod; $cat = strtolower(trim($city->goodcategory)); $cat_lookup = 'cat_' . $cat . '_' . $rental_period; // Get rental rate $tarif = Tarif::model()->findByPk(1); $onetime = false; if (isset(Yii::app()->user->onetime)) { $onetime = true; $commande->comfrequency = Commande::TYPE_FREQUENCY_TYPE_8; } else { $onetime = false; } if ($onetime == true) { $rental_rate = 50; } else { $rental_rate = $tarif->{$cat_lookup}; } // Add in the setup charge - SETUP FEE WAIVED AS PER CLIENT'S REQUEST // $sub_total = $rental_rate + $tarif->reg_setup_us; $sub_total = $rental_rate; $total = $rental_rate; $administrative_cost = $total * 0.05; // Determine Canadian taxes // TODO: Why isn't the TVH tax used? if ($customer->bilcountry == "Canada") { switch ($customer->bilstate) { // NOTE: For reference, I've included the old tax calculation perl code // Filename: orderthree.cgi // // if ($a_state =~ /QC/) { // $tps_tax = ($sub_total * $taxtps); // $sub_tax = ($sub_total + $tps_tax); // $tvq_tax = ($sub_tax * $taxtvq); // $total = ($tps_tax + $tvq_tax + $sub_total); // } // // elsif ($a_state =~ /(AB''BC''MB''NB''NF''NT''NS''ON''PE''SK''YT)/) { // $tps_tax = ($sub_total * $taxtps); // $total = ($tps_tax + $sub_total); // $include_tps = 1; // } // // elsif ($a_state !~ /(AB''BC''MB''NB''NF''NT''NS''ON''PE''SK''YT''QC )/) { // $total = $sub_total; // } case 'QC': // GST: General tax for all of Canada $tps_tax = $sub_total * $tarif->taxtps; // PST: Is the provincial tax for Quebec... $sub_tax = $sub_total + $tps_tax; // ...it is added on top of the GST $tvq_tax = $sub_tax * $tarif->taxtvq; $total = $tps_tax + $tvq_tax + $sub_total; break; case 'AB': case 'BC': case 'MB': case 'NB': case 'NF': case 'NT': case 'NS': case 'ON': case 'PE': case 'SK': case 'YT': // GST: General tax for all of Canada $tps_tax = $sub_total * $tarif->taxtps; $tvq_tax = 0; $total = $tps_tax + $sub_total; break; default: // TODO: Don't take matters so lightly die; } } else { $tps_tax = 0; $tvq_tax = 0; } $deposit = null; // Determine mail forwarding deposit switch ($commande->comfrequency) { case Commande::TYPE_FREQUENCY_TYPE_1: $deposit = $tarif->reg_depositexp_now; break; case Commande::TYPE_FREQUENCY_TYPE_2: $deposit = $tarif->reg_depositexp_week; break; case Commande::TYPE_FREQUENCY_TYPE_3: $deposit = $tarif->reg_depositexp_bimonth; break; case Commande::TYPE_FREQUENCY_TYPE_4: $deposit = $tarif->reg_depositexp_month; break; case Commande::TYPE_FREQUENCY_TYPE_5: $deposit = $tarif->reg_depositair_week; break; case Commande::TYPE_FREQUENCY_TYPE_6: $deposit = $tarif->reg_depositair_month; break; case Commande::TYPE_FREQUENCY_TYPE_7: $deposit = $tarif->reg_depositair_bimonth; break; case Commande::TYPE_FREQUENCY_TYPE_8: $deposit = 0; break; default: // TODO: Replace this with an email to the system administrator die; } $total = $total + $deposit; $total = $total + $administrative_cost; // Format numbers before sending them back setlocale(LC_MONETARY, 'en_US'); $rental_rate = number_format($rental_rate, 2, '.', ','); $deposit = number_format($deposit, 2, '.', ','); $tps_tax = number_format($tps_tax, 2, '.', ','); $tvq_tax = number_format($tvq_tax, 2, '.', ','); $administrative_cost = number_format($administrative_cost, 2, '.', ','); $total = number_format($total, 2, '.', ','); return array('rental_rate' => $rental_rate, 'deposit' => $deposit, 'tax_gst' => $tps_tax, 'tax_pst' => $tvq_tax, 'administrative_cost' => $administrative_cost, 'total' => $total); }
</tr> @foreach($pemeriksaan as $sub) <?php $subjns = Subkategori::where('KdSubKategori', '=', $sub->tarif->jnskategori->Subkategori->KdSubKategori)->get(); ?> @foreach($subjns as $nilai) <tr> <th>{{ $nilai->NmSubKategori }}</th> </tr> <?php $jns = Jnskategori::where('KdSubKategori', '=', $nilai->KdSubKategori)->get(); ?> @foreach($jns as $jenis) <?php $trf = Tarif::where('KdJnsKategori', '=', $jenis->KdJnsKategori)->get(); ?> @foreach($trf as $tar) <?php $pemm = Pemeriksaan::where('NoRegLab', '=', $reglab->NoRegLab)->where('KdTarif', '=', $tar->KdTarif)->get(); ?> @foreach($pemm as $value) </thead> <tbody> <tr> <td> {{ $value->tarif->jnskategori->NamaJnsKategori }}</td> <td>{{ $value->HasilPeriksa }}</td> <td>{{ $value->tarif->jnskategori->NilaiRujukan }}</td> <td>{{ $value->tarif->jnskategori->satuan->NmSatuan }}</td> </tr>
<?php include_once $_SERVER["DOCUMENT_ROOT"] . "/admin/inc-auth-granted.php"; include_once $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/utils.php"; require $_SERVER["DOCUMENT_ROOT"] . "/inc/inc.config.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Tarif_categorie.php"; require $_SERVER["DOCUMENT_ROOT"] . "/admin/classes/Tarif.php"; $debug = false; $categorie = new Tarif_categorie(); $tarif = new Tarif(); // ---- Liste des catégories disponibles -------- // if (1 == 1) { unset($recherche); $liste_categorie = $categorie->getListe($recherche, $debug); //print_pre( $liste_categorie ); } // ---------------------------------------------- // // ---- Modification ---------------------------- // if (!empty($_GET)) { $result = $tarif->load($_GET["id"]); //print_pre( $result ); if (empty($result)) { $message = 'Aucun enregistrement'; } else { $labelTitle = "Tarif N°: " . $_GET["id"]; $id = $_GET["id"]; $id_categorie = $result[0]["id_categorie"]; $titre = $result[0]["titre"]; $texte = $result[0]["texte"]; $prix = $result[0]["prix"]; $image = $result[0]["image"];
public function parseTarifs($inventory) { Tarif::create(array('name'=>$inventory[0],'sum_per_hour'=>$inventory[1], 'sum_day'=>$inventory[2], 'sum_ts_hour'=>$inventory[3] )); }
public function updateEkspedisi($id) { $id = Kabupaten::find($id)->nama; if (\Cache::has('rajaongkir')) { $rs = \Cache::get('rajaongkir'); } else { $rs = \RajaOngkir::getCity(); \Cache::put('rajaongkir', $rs, 60); } $cart = Shpcart::cart()->contents(); $berat = 0; foreach ($cart as $value) { $beratnew = \Produk::find($value['produkId'])->berat; $berat = $berat + $value['qty'] * $beratnew; } //$berat = ceil($berat/1000); $html = ''; if ($berat != 0) { $statusApi = $this->setting->statusApi; $alresult = null; $asal = $this->setting->kotaAsal; $results = $rs['rajaongkir']['results']; //cari tujuan pengirim $destination = array_filter($results, function ($obj) use($id) { if (strtolower($obj['city_name']) == strtolower($id)) { return true; } return false; }); $destination = array_values($destination)[0]; //cari kota asal pengirim $origin = array_filter($results, function ($obj) use($asal) { if (strtolower($obj['city_name']) == strtolower($asal)) { return true; } return false; }); $origin = array_values($origin)[0]; if ($statusApi == 1) { $alresult = \RajaOngkir::getCost($origin['city_id'], $destination['city_id'], $berat, 'jne'); } if ($statusApi == 2) { $alresult = \RajaOngkir::getCost($origin['city_id'], $destination['city_id'], $berat, 'tiki'); } if ($statusApi == 3) { $alresult = \RajaOngkir::getCost($origin['city_id'], $destination['city_id'], $berat, 'pos'); } if ($alresult != null) { foreach ($alresult['rajaongkir']['results'] as $key => $item) { if (count($item['costs']) > 0) { foreach ($item['costs'] as $service) { $html = $html . '<label class="radio span12" style="margin-left:0;margin-right:10px"> <input style="margin-left:0;margin-right:10px" type="radio" name="ekspedisilist" id="optionsRadios1" value="' . $item['code'] . ' : ' . $service['service'] . ' ' . $service['description'] . ';' . $service['cost'][0]['value'] . '"><small>' . $item['name'] . '|' . $service['service'] . ': ' . $service['description'] . ' harga : ' . price($service['cost'][0]['value']) . '</small> </label>'; } } } } $tarif = \Tarif::join('paket', 'tarif.paketId', '=', 'paket.id')->whereRaw('(tarif.tujuan ="' . $id . '" or tarif.tujuan LIKE "%' . strtolower($id) . '%" or tarif.tujuan LIKE "%' . strtoupper($id) . '%" or tarif.tujuan LIKE "%' . ucfirst($id) . '%") and paket.akunId=' . $this->akunId)->get(); $beratLokal = ceil($berat / 1000); foreach ($tarif as $key => $value) { $html = $html . '<label class="radio"> <input type="radio" style="margin-left:0;margin-right:10px" name="ekspedisilist" value="' . $value->paket->ekspedisi->nama . ' ' . $value->nama . ';' . $value->harga * $beratLokal . '"> ' . $value->paket->ekspedisi->nama . ' ' . $value->paket->nama . ' - ' . price($value->harga * $beratLokal) . ' </label><br>'; } if ($html == '') { $html = $html . '<p>Tidak ditemukan ekpedisi dari <strong>' . $this->setting->kotaAsal . '</strong> ke tujuan : <strong>' . $id . '</strong> <br> <small><i>untuk informasi pengiriman silakan hubungi kami <a href="' . URL::to('kontak') . '" target="_blank">disini</a></i></small> <a type="button" class="btn btn-link close" data-dismiss="modal" aria-hidden="true">[tutup]</a> </p> '; $html = '<div id="result_ekspedisi">' . $html . '<hr></div>'; return \Response::json(['not_found' => true, 'html' => $html]); } else { $html = '<p>Ekspedisi list dari <strong>' . $this->setting->kotaAsal . '</strong> ke tujuan: <strong>' . $id . '</strong> (' . ceil($berat / 1000) . ' Kg)</p>' . $html; $html = '<div id="result_ekspedisi">' . $html . '<hr></div>'; return \Response::json(['not_found' => false, 'html' => $html]); } } }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id) { $model = Tarif::model()->findByPk((int) $id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<?php include_once '../../inc/inc.config.php'; include_once '../classes/utils.php'; require '../classes/ImageManager.php'; require '../classes/Tarif.php'; session_start(); $debug = false; if ($debug) { print_pre($_POST); } $tarif = new Tarif(); $imageManager = new ImageManager(); // ---- Security ---------------------------------------------------------- // if (!isset($_SESSION["accessGranted"]) || !$_SESSION["accessGranted"]) { $result = $storageManager->grantAccess($_POST["login"], $_POST["mdp"]); if (!$result) { if (!$debug) { header('Location: /admin/?action=error'); } else { echo "Erreur de sécurité : Redirection vers /admin/?action=error"; } } else { $_SESSION["accessGranted"] = true; } } // ------------------------------------------------------------------------ // // ---- Forms processing -------------------------------------------------- // if ($_POST["mon_action"] != '') { // ---- Gestion des produits ------------------------------------------ // if ($_POST["mon_action"] == "gerer") {