pembetulan laporan

This commit is contained in:
MUHD HAFIFIE
2021-07-06 16:49:35 +08:00
parent b5b68d9517
commit c822c3abd3
2 changed files with 15 additions and 11 deletions
+2 -1
View File
@@ -494,13 +494,14 @@ class TebusController extends Controller
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$tebus = Tebus::on($cawangan['mysql'])
->select('tebus.t_tebus', 'gad.t_gadai','tebus.tagterima', 'tebus.teller','tebus.jenistebus','tebus.pinjaman','tebus.bakiupah','tebus.bakipjm','gad.norujukan','cust.nama','gad.nokp','tebus.jbg')
->select('tebus.t_tebus', 'gad.t_gadai','trans.tarikh_bayaran','tebus.nilaimarhun','tebus.tagterima', 'tebus.teller','tebus.jenistebus','tebus.pinjaman','tebus.bakiupah','tebus.bakipjm','gad.norujukan','cust.nama','gad.nokp','tebus.jbg')
->join('gadai as gad','gad.norujukan','=','tebus.norujukan')
->join('online_arrahn.customer as cust', function($join)
{
$join->on('gad.nokp', '=', 'cust.kpbaru');
$join->orOn('gad.nokp', '=', 'cust.kplama');
})
->join('online_arrahn.transaksi_keuntungan as trans','tebus.norujukan','=','trans.norujukan')
->where('tebus.t_tebus','=',$tarikh)
->orderBy('tebus.teller')
->orderBy('tebus.sirit')