separation of tawarruq and onepercent

This commit is contained in:
Hafifie PKB
2023-12-10 00:05:30 +08:00
parent 88329b3298
commit 2a8e972b34
18 changed files with 2701 additions and 1022 deletions
+2 -2
View File
@@ -17,10 +17,10 @@ class GadaiFactory
return [
'kodcaw' => 'KB2',
'norujukan' => ($number > 9) ? 'KB2231123-00' . $number : 'KB2231123-000' . $number ,
'norujukan' => ($number > 9) ? 'KB2231207-00' . $number : 'KB2231207-000' . $number ,
'nopelanggan' => 'M03-00009968',
'nokp' => '630411035213',
't_gadai' => '2023-11-23',
't_gadai' => '2023-12-07',
'masa' => '13:46:57',
'sirig' => $number++,
'nilaimarhun' => 3000.09,
+1 -1
View File
@@ -19,7 +19,7 @@ class MarhunFactory
'kodcaw' => 'KB2',
'marhun' => 'R/L',
't_gadai' => '2023-11-23',
'norujukan' => ($number > 9) ? 'KB2231123-00' . $number : 'KB2231123-000' . $number ,
'norujukan' => ($number > 9) ? 'KB2231207-00' . $number : 'KB2231207-000' . $number ,
'bil' => 1,
'nota' => $number++,
'karat' => '24.0K',
@@ -62,7 +62,7 @@ class AddOnepercentToGadaiTable extends Migration
$db_connection = $this->getActiveDB();
foreach($db_connection as $dbase){
if (Schema::connection('mysql7')->hasColumn('ujrah', 'onepercent')){
if (Schema::connection('mysql7')->hasColumn('kadarujrah', 'ujrah', 'onepercent','margin_semasa','tagbaru')){
Schema::connection($dbase)->table('gadai', function (Blueprint $table) {
$table->dropColumn(['kadarujrah', 'ujrah', 'onepercent','margin_semasa','tagbaru']);
});
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddVersionToArrahnMasterDbTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$value = 'v1';
Schema::table('arrahn_master_db', function (Blueprint $table) use($value) {
$table->char('version', 4)->default($value);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql7')->table('arrahn_master_db', function (Blueprint $table) {
$table->dropColumn(['version']);
});
}
}