diff --git a/app/Http/Controllers/LelongController.php b/app/Http/Controllers/LelongController.php index 656d3b13..98cc475e 100644 --- a/app/Http/Controllers/LelongController.php +++ b/app/Http/Controllers/LelongController.php @@ -65,7 +65,7 @@ class LelongController extends Controller $lelong = CawanganLelong::join('lelong', 'cawangan_lelong.lelong_id', '=', 'lelong.id') - ->select('lelong_id','tarikh_lelong','fasa','lelong.masatamat_lelong','harga_emas_asas','jbg','cajlelong','sts_lelong') + ->select('lelong_id','tarikh_lelong','lelong.fasa','lelong.masatamat_lelong','harga_emas_asas','jbg','cajlelong','sts_lelong') ->groupBy('lelong_id') // ->where('lelong.sts_lelong', 3) ->get()->toArray(); @@ -1014,7 +1014,7 @@ class LelongController extends Controller $lelong_id = Lelong::join('cawangan_lelong','lelong.id','=','cawangan_lelong.lelong_id') ->where('cawangan_lelong.lelong_id','=',$lelongid) - ->select('lelong_id','tarikh_lelong','fasa') + ->select('lelong_id','tarikh_lelong','lelong.fasa') ->groupBy('lelong_id') ->get()->toArray(); @@ -1810,10 +1810,11 @@ class LelongController extends Controller //insert lelong_tebus $lelongtebus = new LelongTebus; $lelongtebus->tarikh = $currentdate; + $lelongtebus->kodcaw = $data['kodcaw']; $lelongtebus->teller = $user->name; $lelongtebus->norujukan = $data['norujukan']; $lelongtebus->batch_no = $lelong_id; - $lelongtebus->nilai_marhun = $data['nilaimarhun']; + $lelongtebus->nilaimarhun = $data['nilaimarhun']; $lelongtebus->pinjaman = $data['pinjaman']; $lelongtebus->upah = $data['bakiupah']; $lelongtebus->jbg = $data['jbg']; diff --git a/app/Http/Controllers/SimulasiController.php b/app/Http/Controllers/SimulasiController.php index d0dec0a2..81da3445 100644 --- a/app/Http/Controllers/SimulasiController.php +++ b/app/Http/Controllers/SimulasiController.php @@ -1121,6 +1121,7 @@ class SimulasiController extends Controller //insert lelong_tebus $lelongtebus = new LelongTebus; $lelongtebus->tarikh = $currentdate; + $lelongtebus->kodcaw = $data['kodcaw']; $lelongtebus->teller = $user->name; $lelongtebus->norujukan = $data['norujukan']; $lelongtebus->batch_no = $simulasi_id; diff --git a/app/Models/LelongTebus.php b/app/Models/LelongTebus.php index 3811c468..5621cc23 100644 --- a/app/Models/LelongTebus.php +++ b/app/Models/LelongTebus.php @@ -14,6 +14,7 @@ class LelongTebus extends Model protected $fillable = [ 'recno', 'tarikh', + 'kodcaw', 'teller', 'norujukan', 'batch_no', diff --git a/database/migrations/2021_12_14_041557_create_lelongs_table.php b/database/migrations/2021_12_14_041557_create_lelongs_table.php index c59188ea..9cb8acdf 100644 --- a/database/migrations/2021_12_14_041557_create_lelongs_table.php +++ b/database/migrations/2021_12_14_041557_create_lelongs_table.php @@ -150,12 +150,14 @@ class CreateLelongsTable extends Migration Schema::create('lelong_tebus', function (Blueprint $table) { $table->bigIncrements('recno'); - $table->datetime('tarikh')->nullable(); + $table->datetime('tarikh')->nullable(); + $table->string('kodcaw')->nullable(); $table->string('teller')->nullable(); $table->string('norujukan')->nullable(); $table->string('batch_no')->nullable(); $table->decimal('nilaimarhun', $precision = 5, $scale = 2); $table->decimal('pinjaman', $precision = 5, $scale = 2); + $table->decimal('upah', $precision = 5, $scale = 2); $table->decimal('jbg', $precision = 5, $scale = 2); $table->string('jenis_tebus')->nullable(); $table->timestamps();