1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Factory/BankTransactionFactory.php

35 lines
979 B
PHP
Raw Normal View History

2022-08-11 09:05:33 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
2023-01-28 23:21:40 +01:00
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
2022-08-11 09:05:33 +02:00
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Factory;
use App\Models\BankTransaction;
class BankTransactionFactory
{
public static function create(int $company_id, int $user_id) :BankTransaction
2022-08-11 09:05:33 +02:00
{
$bank_transaction = new BankTransaction;
$bank_transaction->user_id = $user_id;
$bank_transaction->company_id = $company_id;
$bank_transaction->amount = 0;
2022-09-22 07:54:58 +02:00
$bank_transaction->currency_id = 1;
2022-08-11 09:05:33 +02:00
$bank_transaction->account_type = '';
$bank_transaction->category_type = '';
$bank_transaction->date = now()->format('Y-m-d');
$bank_transaction->description = '';
2022-09-21 07:43:35 +02:00
$bank_transaction->status_id = 1;
2022-08-11 09:05:33 +02:00
return $bank_transaction;
}
}