forked from picqer/exact-php-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneralJournalEntry.php
51 lines (44 loc) · 1.51 KB
/
GeneralJournalEntry.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
<?php
namespace Picqer\Financials\Exact;
/**
* Class GeneralJournalEntry
*
* @package Picqer\Financials\Exact
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=GeneralJournalEntryGeneralJournalEntries
*
* @property Guid $EntryID Primary key
* @property String $Currency Currency code
* @property Int32 $EntryNumber Entry number
* @property Double $ExchangeRate Exchange rate
* @property Int16 $FinancialPeriod Financial period
* @property Int16 $FinancialYear Financial year
* @property GeneralJournalEntryLines $GeneralJournalEntryLines Collection of lines
* @property String $JournalCode Code of Journal
* @property Boolean $Reversal Indicates that amounts are reversed
*/
class GeneralJournalEntry extends Model
{
use Query\Findable;
use Persistance\Storable;
protected $primaryKey = 'EntryID';
protected $generalJournalEntryLines = [];
protected $fillable = [
'EntryID',
'Currency',
'EntryNumber',
'ExchangeRate',
'FinancialPeriod',
'FinancialYear',
'GeneralJournalEntryLines',
'JournalCode',
'Reversal',
];
public function addItem(array $array)
{
if ( ! isset( $this->attributes['GeneralJournalEntryLines'] ) || $this->attributes['GeneralJournalEntryLines'] == null) {
$this->attributes['GeneralJournalEntryLines'] = [ ];
}
$this->attributes['GeneralJournalEntryLines'][] = $array;
}
protected $url = 'generaljournalentry/GeneralJournalEntries';
}