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

35 lines
973 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
*
2024-04-12 06:15:41 +02:00
* @copyright Copyright (c) 2024. 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
{
2024-01-14 05:05:00 +01:00
public static function create(int $company_id, int $user_id): BankTransaction
2022-08-11 09:05:33 +02:00
{
2024-01-14 05:05:00 +01:00
$bank_transaction = new BankTransaction();
2022-08-11 09:05:33 +02:00
$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;
2024-01-14 05:05:00 +01:00
2022-08-11 09:05:33 +02:00
return $bank_transaction;
}
}