make faker for gadai and changes marhun to make the calculation for the gold, update composer remove helpers

This commit is contained in:
Hafifie PKB
2023-11-23 16:15:35 +08:00
parent 72fb590b2f
commit e6ef310333
6 changed files with 170 additions and 10 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
use Faker\Generator as Faker;
class MarhunFactory
{
protected $faker;
public function __construct(Faker $faker)
{
$this->faker = $faker;
}
public function create()
{
static $number = 1;
return [
'kodcaw' => 'KB2',
'marhun' => 'R/L',
't_gadai' => '2023-11-23',
'norujukan' => ($number > 9) ? 'KB2231123-00' . $number : 'KB2231123-000' . $number ,
'bil' => 1,
'nota' => $number++,
'karat' => '24.0K',
'berat' => 10.17,
'harga' => 295.11,
'n_marhun' => 3000.09
];
}
}