本文整理汇总了PHP中Confide::getDepartamenteUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Confide::getDepartamenteUser方法的具体用法?PHP Confide::getDepartamenteUser怎么用?PHP Confide::getDepartamenteUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Confide
的用法示例。
在下文中一共展示了Confide::getDepartamenteUser方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getlivrabileFactura
public function getlivrabileFactura($id_factura)
{
$ids = self::getIDsDepartamente(Confide::getDepartamenteUser());
$sql = self::getlivrabileFacturateNefacturate($id_factura, true);
$factura = self::getFactura($id_factura);
$livrabile = DB::select($sql);
return View::make('livrabile_factura.list')->with('livrabile', $livrabile)->with('factura', $factura);
}
示例2: getEditInvestitie
public function getEditInvestitie($id)
{
$departamente = Confide::getDepartamenteUser();
$tva = self::getCoteTVA();
$imobil_class = new \Codecorner\Imobil\Controllers\ImobileController();
$imobile = $imobil_class->getImobil();
$cheltuieli = self::getCheltuieliSF();
$investitie = DB::select("SELECT\n investitie.id,\n investitie.denumire,\n investitie.cota_indiviza_spatii_locuit,\n investitie.cota_indiviza_spatii_alta_destinatie,\n investitie.finantare_nerambursabila_por,\n investitie.cofinantare_ap_eligibil,\n investitie.cofinantare_uat_eligibil,\n investitie.cofinantare_ap_neeligibil_ad,\n investitie.cofinantare_uat_neeligibil,\n investitie.cofinantare_ap_neeligibil_sl,\n investitie.id_imobil,\n investitie.id_departament,\n investitie.id_tva,\n l.denumire AS localitate,\n j.denumire AS judet,\n i.adresa\n FROM por12_investitie investitie\n INNER JOIN imobil i ON i.id = investitie.id_imobil AND i.logical_delete = 0\n LEFT OUTER JOIN judet j ON j.id_judet = i.id_judet AND j.logical_delete = 0\n LEFT OUTER JOIN localitate l ON l.id_localitate = i.id_localitate AND l.logical_delete = 0\n WHERE investitie.id = :id_investitie", array('id_investitie' => $id));
return View::make('investitie_por_axa12.edit')->with('investitie', $investitie[0])->with('imobile', $imobile)->with('tva', $tva)->with('finantare_nerambursabila_por', 60)->with('cofinantare_ap_neeligibil_ad', 100)->with('departamente', self::object_to_array($departamente))->with('cheltuieli', $cheltuieli);
}
示例3: getSeriiFacturare
public function getSeriiFacturare()
{
$ids = self::getIDsDepartamente(Confide::getDepartamenteUser());
$sql = "SELECT \n sf.id,\n sf.serie,\n sf.numar,\n sf.id_entitate,\n ent.denumire AS entitate\n FROM serie_factura sf\n INNER JOIN entitate ent ON ent.id = sf.id_entitate AND ent.logical_delete = 0\n WHERE ";
if (!Entrust::can("administrare_platforma")) {
/*$sql .=
" INNER JOIN departament d ON d.id_entitate = ent.id AND d.logical_delete = 0" .
" AND d.id IN (" . $ids . ")";*/
$sql .= " EXISTS(SELECT id FROM departament WHERE departament.id_entitate = sf.id_entitate AND departament.logical_delete = 0\n AND departament.id IN (" . $ids . ")) AND ";
}
$sql .= " sf.logical_delete = 0 ORDER BY ent.id, sf.serie";
//dd($sql);
$serii = DB::select($sql);
return View::make('serii_facturare.list')->with('serii', $serii);
}
示例4: getEntitati
public function getEntitati($tip_entitate)
{
$sql = "SELECT \n ent.id, \n ent.denumire, \n ent.cif,\n ent.adresa, \n ent.cod_postal, \n ent.telefon, \n ent.fax, \n ent.id_organizatie, \n ent.id_tip_entitate, \n judet.denumire AS judet, \n loc.denumire AS localitate\n FROM entitate ent\n LEFT OUTER JOIN judet ON ent.id_judet = judet.id_judet AND judet.logical_delete = 0 \n LEFT OUTER JOIN localitate loc ON ent.id_localitate = loc.id_localitate AND loc.logical_delete = 0";
$and = "";
if (\Entrust::hasRole("Administrator de grup")) {
$and = " AND ent.id_organizatie = " . \Entrust::user()->id_org;
} else {
if (!\Entrust::can("administrare_platforma")) {
$ids = self::getIDsDepartamente(\Confide::getDepartamenteUser());
$sql = $sql . " INNER JOIN departament d ON d.id_entitate = ent.id AND d.logical_delete = 0" . " AND d.id IN (" . $ids . ")";
}
}
$sql .= " WHERE ent.logical_delete = 0 ";
$sql .= $and;
if ($tip_entitate == 1) {
$sql .= " AND ent.id_tip_entitate = 1 ";
} else {
$sql .= " AND ent.id_tip_entitate = 2 ";
}
$sql .= " GROUP BY ent.id";
$entitati = DB::select($sql);
//dd($sql);
return View::make('entitate::entitati_organizatie.list')->with('entitati', $entitati)->with('tip_entitate', $tip_entitate);
}
示例5: getEditObiectiv
public function getEditObiectiv($id)
{
$stadii_obiectiv = self::getStadiiObiectiv();
$ids = self::getIDsDepartamente(Confide::getDepartamenteUser());
$contracte = DB::select("SELECT \n id, denumire \n FROM contract\n WHERE logical_delete = 0\n AND id_departament IN (" . $ids . ")");
$templates = DB::select("SELECT\n id, denumire\n FROM template_contract_tipizat_master\n WHERE logical_delete = 0\n AND id_organizatie = " . self::organizatie()[0]->id_organizatie);
$obiectiv = DB::select("SELECT\n obj.id,\n obj.nr_reg_proiect,\n obj.numar,\n date_format(obj.data_semnare, '%d-%m-%Y') AS data_semnare_obiectiv, \n obj.denumire AS denumire_obj,\n obj.id_tara,\n obj.id_regiune,\n obj.id_judet,\n obj.id_localitate,\n obj.adresa,\n obj.cod_postal,\n obj.id_contract,\n obj.id_template,\n obj.valoare,\n obj.tva,\n obj.id_stadiu,\n obj.id_departament,\n tara.denumire AS tara, \n regiune.denumire AS regiune, \n judet.denumire AS judet, \n localitate_obj.denumire AS localitate\n FROM obiectiv obj\n LEFT OUTER JOIN tara tara ON obj.id_tara = tara.id_tara AND tara.logical_delete = 0\n LEFT OUTER JOIN regiune regiune ON obj.id_regiune = regiune.id_regiune AND regiune.logical_delete = 0\n LEFT OUTER JOIN judet judet ON obj.id_judet = judet.id_judet AND judet.logical_delete = 0\n LEFT OUTER JOIN localitate localitate_obj ON obj.id_localitate = localitate_obj.id_localitate \n WHERE obj.logical_delete = 0\n AND obj.id = :id", array('id' => $id));
return View::make('obiective.edit')->with('contracte', self::object_to_array($contracte))->with('templates', self::object_to_array($templates))->with('stadii_obiectiv', $stadii_obiectiv)->with('obiectiv', $obiectiv[0])->with('departamente', self::object_to_array(Confide::getDepartamenteUser()));
}
示例6: postEditContract
public function postEditContract($id)
{
$rules = array('departament' => 'required', 'numar' => 'required', 'data_semnare' => 'required', 'denumire' => 'required', 'parte_in_contract' => 'required', 'partener_organizatie' => 'required', 'durata_contract' => 'required', 'um_timp' => 'required', 'tip_contract' => 'required');
$errors = array('required' => 'Campul este obligatoriu.');
$validator = Validator::make(Input::all(), $rules, $errors);
if ($validator->fails()) {
return Redirect::back()->with('message', 'Eroare validare formular!')->withErrors($validator)->withInput();
} else {
$data_semnarii_eu = DateTime::createFromFormat('d-m-Y', Input::get('data_semnare'));
$data_semnarii_us = $data_semnarii_eu->format('Y-m-d');
$valoare = 0;
if (!empty(Input::get('valoare_contract'))) {
$valoare = Input::get('valoare_contract');
$valoare = str_replace('.', '', $valoare);
$valoare = str_replace(',', '.', $valoare);
}
$tva = 0;
if (!empty(Input::get('procent_tva'))) {
$tva = Input::get('procent_tva');
$tva = str_replace('.', '', $tva);
$tva = str_replace(',', '.', $tva);
}
$durata_contract = 0;
if (!empty(Input::get('durata_contract'))) {
$durata_contract = Input::get('durata_contract');
$durata_contract = str_replace('.', '', $durata_contract);
$durata_contract = str_replace(',', '.', $durata_contract);
}
$id_entitate = 0;
foreach (Confide::getDepartamenteUser() as $departament) {
if ($departament->id == intval(Input::get('departament'))) {
$id_entitate = $departament->id_entitate;
break;
}
}
try {
DB::table('contract')->where('id', $id)->update(array('numar' => Input::get('numar'), 'id_tip_contract' => intval(Input::get('tip_contract')), 'data_semnarii' => $data_semnarii_us, 'id_tip_nivel_contractare' => intval(Input::get('parte_in_contract')), 'id_entitatea_mea' => $id_entitate, 'id_partener' => intval(Input::get('partener_organizatie')), 'denumire' => Input::get('denumire'), 'valoare' => $valoare, 'tva' => $tva, 'durata_contract' => $durata_contract, 'id_um_timp' => intval(Input::get('um_timp')), 'id_tara' => intval(Input::get('tara')), 'id_regiune' => intval(Input::get('regiune')), 'id_judet' => intval(Input::get('judet')), 'id_localitate' => intval(Input::get('localitate')), 'id_departament' => intval(Input::get('departament'))));
} catch (Exception $e) {
return Redirect::back()->with('message', 'Eroare salvare date: ' . $e)->withInput();
}
return Redirect::back()->with('message', 'Salvare realizata cu succes!')->withInput();
}
}
示例7: getSeriiFacturare
public function getSeriiFacturare()
{
$ids = self::getIDsEntitati(Confide::getDepartamenteUser());
$serii_facturare = DB::select("SELECT\n sf.id,\n sf.serie,\n sf.numar,\n ent.denumire AS entitate \n FROM serie_factura sf \n INNER JOIN entitate ent ON ent.id = sf.id_entitate AND ent.logical_delete = 0\n WHERE sf.logical_delete = 0\n AND sf.id_entitate IN (" . $ids . ")");
/*$serii_facturare = DB::select("SELECT
sf.id_serie_factura,
sf.serie,
sf.numar
FROM serie_factura sf
INNER JOIN entitate ON entitate.id = sf.id_entitate AND entitate.logical_delete = 0
WHERE sf.logical_delete = 0
AND entitate.id_organizatie = :id_organizatie", array('id_organizatie' => isset(self::organizatie()[0])?self::organizatie()[0]->id_organizatie:-1));*/
return $serii_facturare;
}