add gadai
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Gadai extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'gadai';
|
||||
|
||||
protected $fillable = [
|
||||
'kodcaw',
|
||||
'norujukan',
|
||||
'jbg',
|
||||
'kadarupah',
|
||||
'upahsimpan',
|
||||
'ansuran',
|
||||
'nilaimarhun',
|
||||
'pinjaman',
|
||||
'bakiupah',
|
||||
'cajlain',
|
||||
'baki',
|
||||
'berat',
|
||||
'marhun',
|
||||
'gst_hj',
|
||||
'gst_cl',
|
||||
'percent',
|
||||
'mora_upah',
|
||||
't_gadai',
|
||||
't_matang',
|
||||
'sttebus',
|
||||
'tagpalsu',
|
||||
'tagpalsu2',
|
||||
'taglel',
|
||||
'lelong_tawarruq'
|
||||
];
|
||||
}
|
||||
@@ -32,6 +32,50 @@ class CreateCawangansTable extends Migration
|
||||
$table->string('pkb_jmc')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('gadai', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('kodcaw');
|
||||
$table->string('norujukan');
|
||||
$table->decimal('jbg', $precision = 7, $scale = 2);
|
||||
$table->decimal('kadarupah', $precision = 5, $scale = 2);
|
||||
$table->decimal('upahsimpan', $precision = 11, $scale = 2);
|
||||
$table->decimal('ansuran', $precision = 11, $scale = 2);
|
||||
$table->decimal('nilaimarhun', $precision = 9, $scale = 2);
|
||||
$table->decimal('pinjaman', $precision = 9, $scale = 2);
|
||||
$table->decimal('bakiupah', $precision = 7, $scale = 2);
|
||||
$table->decimal('cajlain', $precision = 7, $scale = 2);
|
||||
$table->decimal('baki', $precision = 9, $scale = 2);
|
||||
$table->decimal('berat', $precision = 7, $scale = 2);
|
||||
$table->string('marhun');
|
||||
$table->decimal('gst_hj', $precision = 7, $scale = 2);
|
||||
$table->decimal('gst_cl', $precision = 7, $scale = 2);
|
||||
$table->decimal('percent', $precision = 7, $scale = 2);
|
||||
$table->integer('mora_upah');
|
||||
$table->date('t_gadai');
|
||||
$table->date('t_matang');
|
||||
$table->integer('sttebus');
|
||||
$table->integer('tagpalsu');
|
||||
$table->integer('tagpalsu2');
|
||||
$table->integer('taglel');
|
||||
$table->integer('lelong_tawarruq');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('gadaimarhun', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('gadai_id')->unsigned();
|
||||
$table->decimal('bil', $precision = 3, $scale = 0);
|
||||
$table->string('marhun');
|
||||
$table->string('nota');
|
||||
$table->string('karat');
|
||||
$table->decimal('berat', $precision = 7, $scale = 2);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('gadai_id')
|
||||
->references('id')->on('gadai')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,14 +62,14 @@
|
||||
}
|
||||
});
|
||||
|
||||
var tablemarhun = $('#senaraimarhun').DataTable( {
|
||||
var tablesenaraimarhun = $('#senaraimarhun').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 5,
|
||||
"targets": 3,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
@@ -101,15 +101,15 @@
|
||||
]
|
||||
});
|
||||
|
||||
$('.addsim').tooltip();
|
||||
// $('.addsim').tooltip();
|
||||
$('.export').tooltip();
|
||||
// $( '.dt-buttons').addClass('btn-group');
|
||||
$( '.addsim').removeClass('dt-button');
|
||||
// $( '.addsim').removeClass('dt-button');
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
|
||||
function selectall(cb) {
|
||||
tablemarhun.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
tablesenaraimarhun.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user