add duit pelanggan
This commit is contained in:
@@ -507,7 +507,9 @@ class GadaiController extends Controller
|
|||||||
'duit_masuk' => $request->bayaran,
|
'duit_masuk' => $request->bayaran,
|
||||||
'created_at' => $current,
|
'created_at' => $current,
|
||||||
'bakiharga' => $baki_hargajualan,
|
'bakiharga' => $baki_hargajualan,
|
||||||
'nowakil' => (int)$request->nowakil
|
'nowakil' => (int)$request->nowakil,
|
||||||
|
'duitpelanggan' => $request->duitpelanggan,
|
||||||
|
'bakipelanggan' => $request->bakipelanggan
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if($gadai['tempoh'] >= 12.0){
|
if($gadai['tempoh'] >= 12.0){
|
||||||
|
|||||||
@@ -581,7 +581,9 @@ class TebusController extends Controller
|
|||||||
'duit_masuk' => $harga_tebus,
|
'duit_masuk' => $harga_tebus,
|
||||||
'created_at' => $current,
|
'created_at' => $current,
|
||||||
'bakiharga' => $baki_hargajualan,
|
'bakiharga' => $baki_hargajualan,
|
||||||
'nowakil' => (int)$request->nowakil
|
'nowakil' => (int)$request->nowakil,
|
||||||
|
'duitpelanggan' => $request->duitpelanggan,
|
||||||
|
'bakipelanggan' => $request->bakipelanggan
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -696,6 +698,8 @@ class TebusController extends Controller
|
|||||||
'duit_masuk' => $request->totalbayaran,
|
'duit_masuk' => $request->totalbayaran,
|
||||||
'created_at' => $current,
|
'created_at' => $current,
|
||||||
'bakiharga' => 0,
|
'bakiharga' => 0,
|
||||||
|
'duitpelanggan' => $request->bayaranpelanggan,
|
||||||
|
'bakipelanggan' => $request->bakipelanggan
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$audit = new Audit();
|
$audit = new Audit();
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ class Transaction extends Model
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'trans_type','norujukan','nokp','teller','kodcaw','duit_masuk','duit_keluar','created_at','bakiharga','nowakil'
|
'trans_type','norujukan','nokp','teller','kodcaw','duit_masuk','duit_keluar','created_at','bakiharga','nowakil','duitpelanggan','bakipelanggan'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class AddColumnsToKomuditiTransaksi extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::connection($this->getOnlineArrahConnection())->table('komuditi_transaksi', function (Blueprint $table){
|
Schema::connection($this->getOnlineArrahnConnection())->table('komuditi_transaksi', function (Blueprint $table){
|
||||||
$table->dropColumn('no_sijil_pelanggan');
|
$table->dropColumn('no_sijil_pelanggan');
|
||||||
$table->dropColumn('tan');
|
$table->dropColumn('tan');
|
||||||
$table->dropColumn('harga');
|
$table->dropColumn('harga');
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddDuitpelangganToTransactionTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql7')->table('transaction', function (Blueprint $table) {
|
||||||
|
$table->decimal('duitpelanggan', 9, 2);
|
||||||
|
$table->decimal('bakipelanggan', 9, 2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql7')->table('transaction', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['duitpelanggan','bakipelanggan']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user