forked from picqer/exact-php-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneralJournalEntry.php
50 lines (43 loc) · 1.47 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
<?php
namespace Picqer\Financials\Exact;
/**
* Class GeneralJournalEntry.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=GeneralJournalEntryGeneralJournalEntries
*
* @property string $EntryID Primary key
* @property string $Currency Currency code
* @property int $EntryNumber Entry number
* @property float $ExchangeRate Exchange rate
* @property int $FinancialPeriod Financial period
* @property int $FinancialYear Financial year
* @property GeneralJournalEntryLines $GeneralJournalEntryLines Collection of lines
* @property string $JournalCode Code of Journal
* @property bool $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';
}