mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
pull
This commit is contained in:
@@ -59,6 +59,7 @@ class CreateBankLogic extends AbstractControllerLogic
|
||||
|
||||
$bank_object = new BankObject($request->input('company_id'), $request->input('account_type'),
|
||||
$request->input('bank_name'), $request->input('holder_name'), $request->input('account_no'),
|
||||
$request->input('bank_branch'), $request->input('swift'), $request->input('snap'),
|
||||
$request->input('country_id'), $request->input('reference'));
|
||||
|
||||
$this->canCreateBank->passes($bank_object);
|
||||
|
||||
@@ -38,13 +38,16 @@ class BankObject implements DataTransferObject
|
||||
* @param int $country_id
|
||||
* @param null|string $reference
|
||||
*/
|
||||
public function __construct(int $company_id, int $type, string $bank_name, string $holder_name, string $account_no, int $country_id, ?string $reference = null)
|
||||
public function __construct(int $company_id, int $type, string $bank_name, string $holder_name, string $account_no, ?string $bank_branch = null, ?string $swift = null, ?string $snap = null, int $country_id, ?string $reference = null)
|
||||
{
|
||||
$this->company_id = $company_id;
|
||||
$this->type = $type;
|
||||
$this->bank_name = $bank_name;
|
||||
$this->holder_name = $holder_name;
|
||||
$this->account_no = $account_no;
|
||||
$this->bank_branch = $bank_branch;
|
||||
$this->swift = $swift;
|
||||
$this->snap = $snap;
|
||||
$this->country_id = $country_id;
|
||||
$this->reference = $reference;
|
||||
}
|
||||
@@ -89,6 +92,30 @@ class BankObject implements DataTransferObject
|
||||
return $this->account_no;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|string
|
||||
*/
|
||||
public function getBankBranch(): ?string
|
||||
{
|
||||
return $this->bank_branch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|string
|
||||
*/
|
||||
public function getSwitf(): ?string
|
||||
{
|
||||
return $this->swift;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|string
|
||||
*/
|
||||
public function getSnap(): ?string
|
||||
{
|
||||
return $this->snap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
|
||||
@@ -21,6 +21,9 @@ class CreatesBank extends AbstractUpdateRecord
|
||||
$model->bank_name = $object->getBankName();
|
||||
$model->holder_name = $object->getHolderName();
|
||||
$model->account_no = $object->getAccountNo();
|
||||
$model->bank_branch = $object->getBankBranch();
|
||||
$model->switf = $object->getSwitf();
|
||||
$model->snap = $object->getSnap();
|
||||
$model->type = $object->getType();
|
||||
$model->country_id = $object->getCountryId();
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ class UpdatesBank extends AbstractUpdateRecord
|
||||
$model->bank_name = $object->getBankName();
|
||||
$model->holder_name = $object->getHolderName();
|
||||
$model->account_no = $object->getAccountNo();
|
||||
$model->bank_branch = $object->getBankBranch();
|
||||
$model->switf = $object->getSwitf();
|
||||
$model->snap = $object->getSnap();
|
||||
$model->default = $object->getDefault();
|
||||
|
||||
return $this->handler($model);
|
||||
|
||||
@@ -22,6 +22,9 @@ class CreateBanksTable extends Migration
|
||||
$table->string('bank_name');
|
||||
$table->string('holder_name');
|
||||
$table->string('account_no');
|
||||
$table->string('bank_branch')->nullable();
|
||||
$table->string('swift')->nullable();
|
||||
$table->string('snap')->nullable();
|
||||
$table->integer('type')->default(BankAccountType::EXTERNAL);
|
||||
$table->integer('default')->default(false);
|
||||
$table->integer('status')->default(ApprovalStatus::APPROVED);
|
||||
|
||||
Generated
+5362
-5620
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user