fix onepercent filename
This commit is contained in:
@@ -0,0 +1,209 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use App\Cawangan;
|
||||
use App\Services\MasterServices;
|
||||
use App\Services\Request;
|
||||
use App\Support\v2\Calculation;
|
||||
use Illuminate\Http\Request as HttpRequest;
|
||||
use App\Support\v2\GadaiV2 as Version2Gadai;
|
||||
use App\Support\v2\Penebusan;
|
||||
|
||||
class OnePercent extends MasterServices
|
||||
{
|
||||
protected $kodcaw;
|
||||
protected $cawangan_info;
|
||||
|
||||
public function __construct(String $kodcaw){
|
||||
$this->kodcaw = $kodcaw;
|
||||
$this->cawangan_info = parent::getInfoCawangan($kodcaw);
|
||||
}
|
||||
|
||||
/* Start Gadaian */
|
||||
public function createGadai(HttpRequest $httpRequest){
|
||||
$gadai = new Version2Gadai($this->kodcaw,$this->cawangan_info);
|
||||
$response = $gadai->create($httpRequest);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function createMarhunGadai($norujukan,HttpRequest $httpRequest){
|
||||
$gadai = new Version2Gadai($this->kodcaw,$this->cawangan_info);
|
||||
$response = $gadai->createMarhun($norujukan,$httpRequest);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function getUpahSebenar($norujukan){
|
||||
$gadai = new Version2Gadai($this->kodcaw,$this->cawangan_info);
|
||||
$response = $gadai->kiraupahOnePercent($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function getUpahRebet($kodcaw,$norujukan){
|
||||
$gadai = new Version2Gadai($this->kodcaw,$this->cawangan_info);
|
||||
$response = $gadai->kiraupahRebet($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function updateGadaiMarhunKaunter($kodcaw, $norujukan, HttpRequest $request){
|
||||
$gadai = new Version2Gadai($this->kodcaw,$this->cawangan_info);
|
||||
$response = $gadai->updateAnsuranKaunter($this->kodcaw,$norujukan,$request);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function updateJBGSemasa(HttpRequest $request){
|
||||
$gadai = new Version2Gadai($this->kodcaw,$this->cawangan_info);
|
||||
$response = $gadai->updateJBG($request);
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function getKadarUjrah(HttpRequest $request){
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw',$request->kodcaw)->first();
|
||||
$onePercentServices = new Calculation();
|
||||
$kadarujrah = $onePercentServices->getKadarUjrah($request->nilaimarhun,$cawangan['group_id']);
|
||||
|
||||
return $kadarujrah;
|
||||
}
|
||||
|
||||
public function getOnePercent(HttpRequest $request){
|
||||
$onePercentServices = new Calculation();
|
||||
$keuntungan = $onePercentServices->kiraanKeuntunganSebenar($request->pembiayaan,$request->nilaimarhun,$request->kadarujrah,$request->margin);
|
||||
|
||||
return $keuntungan;
|
||||
}
|
||||
|
||||
/* End Gadaian */
|
||||
|
||||
/* Start Penebusan */
|
||||
|
||||
public function tebusTawarruq($kodcaw,$norujukan,$jeniskeuntungan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->tebusTawarruq($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function hargaTebusTawarruq($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->hargaTebusTawarruq($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function kiraUpahRebetSebenar($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->kiraUpahRebetSebenar($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function upahTawarruq($kodcaw,$norujukan,$jeniskeuntungan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->upahTawarruq($this->kodcaw,$norujukan,$jeniskeuntungan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function upahRebetTawarruq($kodcaw,$norujukan,$jeniskeuntungan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->upahRebetTawarruq($this->kodcaw,$norujukan,$jeniskeuntungan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function tebusSeparuhTawarruq($kodcaw,$norujukan,HttpRequest $request){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->tebusSeparuhTawarruq($this->kodcaw,$norujukan,$request);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function tebusNotTawarruq($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->tebusNotTawarruq($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function hargaTebusNotTawarruq($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->hargaTebusNotTawarruq($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function kiraUpahNotTawarruq($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->kiraUpahNotTawarruq($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function upahNotTawarruq($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->upahNotTawarruq($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function tebusSeparuhNotTawarruq($kodcaw,$norujukan,HttpRequest $request){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->tebusSeparuhNotTawarruq($this->kodcaw,$norujukan,$request);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
function rebet($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->rebet($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
function rebetselepastawarruq($kodcaw,$norujukan){
|
||||
dd('tes');
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->rebetselepastawarruq($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function tebusUpdate($kodcaw,$norujukan,HttpRequest $request){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->tebusUpdate($this->kodcaw,$norujukan,$request);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function tebusUpdateAutoTawarruq($kodcaw,$norujukan,HttpRequest $request){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->tebusUpdateAutoTawarruq($this->kodcaw,$norujukan,$request);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function kiraupahUjrahOnePercent($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->kiraupahUjrahOnePercent($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function kiraupahUjrahOnePercentRebate($kodcaw,$norujukan){
|
||||
$tebus = new Penebusan($this->kodcaw,$this->cawangan_info);
|
||||
$response = $tebus->kiraupahUjrahOnePercentRebate($this->kodcaw,$norujukan);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/* End Penebusan */
|
||||
|
||||
public function test(){
|
||||
echo 'onepercent';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user