Exemplo n.º 1
0
 /**
  * Menampilkan Data Untuk di edit
  *
  * @param  int $id
  *
  * @return Response
  */
 public function edit($id)
 {
     return $this->bankaccounttype->findOrFail($id);
 }
Exemplo n.º 2
0
 /**
  * @param int $count
  *
  * @return array
  */
 public static function createSampleAccountBank($count = 10)
 {
     $sample = static::getSample()->getFake();
     $listBanksId = Bank::getIdsOrCreateBanks(true);
     $listtypeId = Bankaccounttype::getDefaultBankTypeIdsOrCreate(true);
     $buyerIds = Buyers::getRecordIdsOrCreate(30);
     $supplierIds = Suppliers::getRecordIdsOrCreate();
     $ids = array();
     for ($rec = 0; $rec < $count; $rec++) {
         $bankId = $sample->randomElement($listBanksId);
         $TypeId = $sample->randomElement($listtypeId);
         $buyerId = $sample->randomElement($buyerIds);
         $supplierId = $sample->randomElement($supplierIds);
         $parents = static::getSample()->getBank()->getListOwners($supplierId, $buyerId);
         $parentId = $parents['id'];
         $parentType = $parents['type'];
         $records = static::create(static::getSample()->getBank()->createAccountBank($bankId, $parentId, $parentType, $TypeId));
         $ids[] = $records->id;
     }
     return $ids;
     //		$bankId,$parentId, $parentType, $typeId
 }
Exemplo n.º 3
0
Arquivo: test.php Projeto: emayk/ics
 echo \Emayk\Ics\Repo\Fabricgrade\Fabricgrade::generateMassive();
 echo $sep;
 sleep(1);
 //					fabric type
 echo "Generate  Fabric Type ...";
 echo \Emayk\Ics\Repo\Fabrictype\Fabrictype::generateMassive();
 sleep(1);
 echo $sep;
 //Bank
 echo "Generate  Bank ...";
 echo \Emayk\Ics\Repo\Bank\Bank::getIdsOrCreateBanks();
 sleep(1);
 echo $sep;
 //					Generate Account
 echo "Generate  Type Account Bank ...";
 echo \Emayk\Ics\Repo\Bankaccounttype\Bankaccounttype::getDefaultBankTypeIdsOrCreate();
 sleep(1);
 echo $sep;
 //					Generate Rekening Bank
 echo "Generate   Account Bank ...";
 echo \Emayk\Ics\Repo\Bankaccount\Bankaccount::createMassiveSampleRecord(false, 100);
 sleep(1);
 echo $sep;
 //					Generate Buyer Supplier and Contact Person
 echo "Generate  Buyers, Supplier, Contact Person ...";
 echo \Emayk\Ics\Repo\Contactperson\Contactperson::generateMassive(false, 100);
 sleep(1);
 echo $sep;
 //					Generate Phones
 echo "Generate Phone Buyers, Supplier ...";
 echo \Emayk\Ics\Repo\Phones\Phones::generateMassivePhoneSample(false, 300);