function get_pajak($id) { return Pajak::where('id_pengadaan', $id)->get(); }
function cek_pajak($id) { if (Request::ajax()) { $pengadaan = $this->get_pengadaan($id); $pajak = Pajak::where('id_pengadaan', $id)->get(); if (null == $pengadaan->id_rekanan) { echo "Rekanan Belum dipilih"; } elseif (count($pajak) == 0) { echo "Rekanan Belum memasukkan file Pajak"; } else { echo "ok"; } } }
function getCount($id) { $data = Pajak::where("id_pengadaan", $id)->get(); return count($data); }