Fix forecast gadaian for searching jbg>12, filter active sag, formatting js
This commit is contained in:
@@ -1301,7 +1301,11 @@ class ReportController extends Controller
|
||||
$lel_karat_all = $request->lel_karat;
|
||||
|
||||
if ($request->search_type == "custom-search") {
|
||||
$raw_queries = "(jbg = " . $request->jbg . " or jbg = " . ($request->jbg + 0.5) . ") ";
|
||||
if($request->jbg == 12) {
|
||||
$raw_queries = "(jbg >= " . $request->jbg . " ) ";
|
||||
} else {
|
||||
$raw_queries = "(jbg = " . $request->jbg . " or jbg = " . ($request->jbg + 0.5) . ") ";
|
||||
}
|
||||
// if ($request->pinjaman == 1000.00) {
|
||||
// $raw_queries = $raw_queries . "and pinjaman <= " . $request->pinjaman;
|
||||
// } else if ($request->pinjaman == 10000.01) {
|
||||
@@ -1319,7 +1323,8 @@ class ReportController extends Controller
|
||||
->with('gadaiMarhun:norujukan,karat,berat,marhun')
|
||||
->whereRaw($raw_queries)
|
||||
->where('sttebus', "")
|
||||
->where('taglel', 0)
|
||||
->where('tagpalsu', 0)
|
||||
->where('tagpalsu2', 0)
|
||||
->orderBy('t_gadai', 'DESC')
|
||||
->select('nokp', 'norujukan', 'percentpinj', 'tempoh', 'pinjaman', 'kadarupah', 'bakipjm', 'tempohbayar', 'berat')
|
||||
->get();
|
||||
|
||||
@@ -494,7 +494,7 @@
|
||||
data.percentpinj,
|
||||
data.tempoh,
|
||||
formatter.format(data.bakipjm),
|
||||
data.keuntungan_semasa,
|
||||
formatter.format(data.keuntungan_semasa),
|
||||
formatter.format(data.caj_lelong),
|
||||
formatter.format(data.harga_asas),
|
||||
(data.baki_lelong > 0) ? "<strong style='color:green;'>" + formatter.format(data.baki_lelong) + "</strong>" : "<strong style='color:red;'>" + formatter.format(data.baki_lelong) + "</strong>",
|
||||
|
||||
Reference in New Issue
Block a user