fix thousand separator
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Jemas;
|
||||
use App\Cawangan;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Audit;
|
||||
use App\HargaEmas;
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
@@ -49,6 +50,10 @@ class MarhunController extends Controller
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$harga = HargaEmas::on('mysql7')->where('karat',$request->karat)->first();
|
||||
|
||||
$nilai_marhun = $request->berat_emas * $harga['harga'];
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$marhun = Marhun::on($cawangan['mysql'])->create([
|
||||
'kodcaw'=> $kodcaw,
|
||||
@@ -59,8 +64,8 @@ class MarhunController extends Controller
|
||||
'nota' => $request->nota,
|
||||
'karat' => $request->karat,
|
||||
'berat' => $request->berat_emas,
|
||||
'harga' => $request->harga,
|
||||
'n_marhun' => $request->nilai_marhun
|
||||
'harga' => $harga['harga'],
|
||||
'n_marhun' => $nilai_marhun
|
||||
]);
|
||||
|
||||
$audit = new Audit();
|
||||
@@ -118,9 +123,12 @@ class MarhunController extends Controller
|
||||
public function editmarhun($kodcaw,$norujukan,Request $request)
|
||||
{
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$harga = HargaEmas::on('mysql7')->where('karat',$request->karat)->first();
|
||||
$nilai_marhun = $request->berat_emas * $harga['harga'];
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$old_data = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->first();
|
||||
@@ -131,8 +139,8 @@ class MarhunController extends Controller
|
||||
'marhun' => $request->marhun,
|
||||
'nota' => $request->nota,
|
||||
'berat' => $request->berat,
|
||||
'harga' => $request->harga,
|
||||
'n_marhun' => $request->n_marhun
|
||||
'harga' => $harga['harga'],
|
||||
'n_marhun' => $nilai_marhun
|
||||
]);
|
||||
|
||||
$new_data = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->first();
|
||||
|
||||
Reference in New Issue
Block a user