-
Notifications
You must be signed in to change notification settings - Fork 200
/
Copy pathBankEntry.php
70 lines (63 loc) · 2.47 KB
/
BankEntry.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
namespace Picqer\Financials\Exact;
/**
* Class BankEntry.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=FinancialTransactionBankEntries
*
* @property string $EntryID Primary key
* @property BankEntryLine[] $BankEntryLines Collection of lines
* @property string $BankStatementDocument Reference to document with bank statement
* @property int $BankStatementDocumentNumber Document number of document with bank statement
* @property string $BankStatementDocumentSubject Subject of document with bank statement
* @property float $ClosingBalanceFC Closing balance in the currency of the transaction
* @property string $Created Creation date
* @property string $Currency Currency code
* @property string $CustomField Custom field endpoint
* @property int $Division Division code
* @property int $EntryNumber Entry number
* @property int $FinancialPeriod The period of the transaction lines. The period should exist in the period date table
* @property int $FinancialYear The financial year to which the entry belongs. The financial year should exist in the period date table
* @property string $JournalCode Code of Journal
* @property string $JournalDescription Description of Journal
* @property string $Modified Last modified date
* @property float $OpeningBalanceFC Opening balance in the currency of the transaction
* @property int $Status Status: 20 = Open, 50 = Processed
* @property string $StatusDescription Description of Status
*/
class BankEntry extends Model
{
use Query\Findable;
use Persistance\Storable;
protected $primaryKey = 'EntryID';
protected $bankEntryLines = [];
protected $fillable = [
'EntryID',
'BankEntryLines',
'BankStatementDocument',
'BankStatementDocumentNumber',
'BankStatementDocumentSubject',
'ClosingBalanceFC',
'Created',
'Currency',
'CustomField',
'Division',
'EntryNumber',
'FinancialPeriod',
'FinancialYear',
'JournalCode',
'JournalDescription',
'Modified',
'OpeningBalanceFC',
'Status',
'StatusDescription',
];
protected $url = 'financialtransaction/BankEntries';
public function addItem(array $array)
{
if (! isset($this->attributes['BankEntryLines']) || $this->attributes['BankEntryLines'] == null) {
$this->attributes['BankEntryLines'] = [];
}
$this->attributes['BankEntryLines'][] = $array;
}
}