fix
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Advansur;
|
|||||||
use App\Transaction;
|
use App\Transaction;
|
||||||
use App\TransaksiKeuntungan;
|
use App\TransaksiKeuntungan;
|
||||||
use App\Gadai;
|
use App\Gadai;
|
||||||
|
use App\Cawangan;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ class TransactionOnlineController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json($transaction);
|
return response()->json('success');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function kiraupahTawarruq($kodcaw,$norujukan){
|
public function kiraupahTawarruq($kodcaw,$norujukan){
|
||||||
@@ -149,7 +150,7 @@ class TransactionOnlineController extends Controller
|
|||||||
'teller' => 'Online',
|
'teller' => 'Online',
|
||||||
'kodcaw' => $kodcaw,
|
'kodcaw' => $kodcaw,
|
||||||
'duit_masuk' => $bayaran,
|
'duit_masuk' => $bayaran,
|
||||||
'created_at' => $paid_at,
|
'created_at' => Carbon::parse($paid_at),
|
||||||
'bakiharga' => $baki_hargajualan,
|
'bakiharga' => $baki_hargajualan,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -158,14 +159,14 @@ class TransactionOnlineController extends Controller
|
|||||||
'bayaran_keuntungan' => $upahsemasa,
|
'bayaran_keuntungan' => $upahsemasa,
|
||||||
'bayaran_pembiayaan' => $baki_bayaran,
|
'bayaran_pembiayaan' => $baki_bayaran,
|
||||||
'keuntungan_rebet'=> $upahrebet,
|
'keuntungan_rebet'=> $upahrebet,
|
||||||
'tarikh_bayaran'=> $paid_at,
|
'tarikh_bayaran'=> Carbon::parse($paid_at),
|
||||||
'kodcaw'=> $kodcaw
|
'kodcaw'=> $kodcaw
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$update_gadai = Gadai::on($cawangan['mysql'])->where('norujukan','=',$norujukan)->update(array(
|
$update_gadai = Gadai::on($cawangan['mysql'])->where('norujukan','=',$norujukan)->update(array(
|
||||||
'bakipjm' => $baki_pinjaman,
|
'bakipjm' => $baki_pinjaman,
|
||||||
'jbg' => 0,
|
'jbg' => 0,
|
||||||
't_update' => $paid_at->toDateString(),
|
't_update' => Carbon::parse($paid_at)->toDateString(),
|
||||||
'bakihargajualan' => $baki_hargajualan,
|
'bakihargajualan' => $baki_hargajualan,
|
||||||
'tempohbayar' => $gadai['tempoh'],
|
'tempohbayar' => $gadai['tempoh'],
|
||||||
'lelong_tawarruq' => $lelong_tawarruq
|
'lelong_tawarruq' => $lelong_tawarruq
|
||||||
@@ -182,7 +183,7 @@ class TransactionOnlineController extends Controller
|
|||||||
$gadai = Gadai::on($cawangan['mysql'])->where('norujukan',$norujukan)->first();
|
$gadai = Gadai::on($cawangan['mysql'])->where('norujukan',$norujukan)->first();
|
||||||
|
|
||||||
$create_advansur = Advansur::on($cawangan['mysql'])->create([
|
$create_advansur = Advansur::on($cawangan['mysql'])->create([
|
||||||
'tarikh'=> $paid_at->toDateString(),
|
'tarikh'=> Carbon::parse($paid_at)->toDateString(),
|
||||||
'noresit'=> 0,
|
'noresit'=> 0,
|
||||||
'norujukan' => $norujukan,
|
'norujukan' => $norujukan,
|
||||||
'nopelanggan' => $gadai['nopelanggan'],
|
'nopelanggan' => $gadai['nopelanggan'],
|
||||||
|
|||||||
Reference in New Issue
Block a user