forked from picqer/exact-php-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CashEntry.php
61 lines (55 loc) · 2 KB
/
CashEntry.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
<?php
namespace Picqer\Financials\Exact;
/**
* Class CashEntry.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=financialtransactionCashEntries
*
* @property string $EntryID Primary key (read-only)
* @property float $ClosingBalanceFC Closing balance in the currency of the transaction
* @property string $Created Creation date (read-only)
* @property float $Currency Closing balance in the currency of the transaction
* @property int $Division Division code (read-only)
* @property int $EntryNumber Entry number
* @property int $FinancialPeriod Fiancial period
* @property int $FinancialYear Fiancial year
* @property CashEntryLines $CashEntryLines Collection of lines
* @property string $JournalCode Code of Journal
* @property string $JournalDescription Description of Journal (read-only)
* @property string $Modified Last modified date (read-only)
* @property float $OpeningBalanceFC Opening balance in the currency of the transaction
* @property int $Status Status: 5 = Rejected, 20 = Open, 50 = Processed (read-only)
* @property string $StatusDescription Description of Status (read-only)
*/
class CashEntry extends Model
{
use Query\Findable;
use Persistance\Storable;
protected $primaryKey = 'EntryID';
protected $cashEntryLines = [];
protected $fillable = [
'EntryID',
'ClosingBalanceFC',
'Created',
'Currency',
'Division',
'EntryNumber',
'FinancialPeriod',
'FinancialYear',
'CashEntryLines',
'JournalCode',
'JournalDescription',
'Modified',
'OpeningBalanceFC',
'Status',
'StatusDescription',
];
public function addItem(array $array)
{
if (! isset($this->attributes['CashEntryLines']) || $this->attributes['CashEntryLines'] == null) {
$this->attributes['CashEntryLines'] = [];
}
$this->attributes['CashEntryLines'][] = $array;
}
protected $url = 'financialtransaction/CashEntries';
}