Merge branch 'lapfix' into 'master'

kodcaw

See merge request online-sistem1/api_arrahn!121
This commit is contained in:
hafifie rahman
2021-10-05 04:45:41 +00:00
+6 -1
View File
@@ -952,11 +952,16 @@ class TebusController extends Controller
$keuntungan_data = TransaksiKeuntungan::on('mysql7')
->where('transaksi_keuntungan.tarikh_bayaran' ,'<=', $daterequest)
->whereYear('transaksi_keuntungan.tarikh_bayaran','=',$current->year)
->where('kodcaw',$kodcaw)
->pluck('norujukan');
$gadaiData = Gadai::on($cawangan['mysql'])->whereIn('norujukan', $keuntungan_data)->whereNull('hargajualan')->pluck('norujukan');
$keuntungan = TransaksiKeuntungan::on('mysql7')->whereIn('norujukan',$gadaiData)->sum('bayaran_keuntungan');
$keuntungan = TransaksiKeuntungan::on('mysql7')
->where('tarikh_bayaran' ,'<=', $daterequest)
->whereYear('tarikh_bayaran','=',$current->year)
->whereIn('norujukan',$gadaiData)
->sum('bayaran_keuntungan');
// //Keuntungan Selepas Tawarruq
// $keuntungan_data = TransaksiKeuntungan::on('mysql7')