54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
use Illuminate\Console\Command;
|
|
|
|
use App\Services\OnePercentServices;
|
|
|
|
class TestOnePercent extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'onepercent:test';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Update JBG for every active gadai';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
|
|
protected $onepercentserv;
|
|
public function __construct(OnePercentServices $onepercentserv)
|
|
{
|
|
$this->onepercentserv = $onepercentserv;
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return int
|
|
*/
|
|
public function handle()
|
|
{
|
|
$pemb = $this->ask('Pembiayaan?');
|
|
$nm = $this->ask('Nilaimarhun?');
|
|
$ku = $this->ask('Kadarujrah?');
|
|
$marg = $this->ask('Margin?');
|
|
|
|
$test = $this->onepercentserv->kiraanKeuntunganSebenar($pemb,$nm,$ku,$marg);
|
|
|
|
dd($test);
|
|
return $test;
|
|
}
|
|
} |