mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 07:04:35 -04:00
Bank Transaction stubs
This commit is contained in:
parent
8c7d002b31
commit
04642b0324
@ -22,6 +22,6 @@ class DestroyBankTransactionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
return auth()->user()->can('edit', $this->bank_integration);
|
return auth()->user()->can('edit', $this->bank_transaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,6 @@ class EditBankTransactionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
return auth()->user()->can('edit', $this->bank_integration);
|
return auth()->user()->can('edit', $this->bank_transaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,6 @@ class ShowBankTransactionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
return auth()->user()->can('view', $this->bank_integration);
|
return auth()->user()->can('view', $this->bank_transaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ class UpdateBankTransactionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
return auth()->user()->can('edit', $this->bank_integration);
|
return auth()->user()->can('edit', $this->bank_transaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rules()
|
public function rules()
|
||||||
|
@ -22,7 +22,7 @@ class UploadBankTransactionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
return auth()->user()->can('edit', $this->bank_integration);
|
return auth()->user()->can('edit', $this->bank_transaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rules()
|
public function rules()
|
||||||
|
@ -63,6 +63,10 @@ class BankTransactionTransformer extends EntityTransformer
|
|||||||
'invoice_id' => (string)$this->encodePrimaryKey($bank_transaction->invoice_id) ?: '',
|
'invoice_id' => (string)$this->encodePrimaryKey($bank_transaction->invoice_id) ?: '',
|
||||||
'expense_id'=> (string)$this->encodePrimaryKey($bank_transaction->expense_id) ?: '',
|
'expense_id'=> (string)$this->encodePrimaryKey($bank_transaction->expense_id) ?: '',
|
||||||
'is_matched'=> (bool)$bank_transaction->is_matched ?: '',
|
'is_matched'=> (bool)$bank_transaction->is_matched ?: '',
|
||||||
|
'is_deleted' => (bool) $bank_transaction->is_deleted,
|
||||||
|
'created_at' => (int) $bank_transaction->created_at,
|
||||||
|
'updated_at' => (int) $bank_transaction->updated_at,
|
||||||
|
'archived_at' => (int) $bank_transaction->deleted_at,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ return new class extends Migration
|
|||||||
$table->unsignedInteger('invoice_id')->nullable();
|
$table->unsignedInteger('invoice_id')->nullable();
|
||||||
$table->unsignedInteger('expense_id')->nullable();
|
$table->unsignedInteger('expense_id')->nullable();
|
||||||
$table->boolean('is_matched')->default(0);
|
$table->boolean('is_matched')->default(0);
|
||||||
|
$table->boolean('is_deleted')->default(0);
|
||||||
|
|
||||||
$table->timestamps(6);
|
$table->timestamps(6);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user