1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Picqer\Financials\Exact; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class GeneralJournalEntry. |
7
|
|
|
* |
8
|
|
|
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=GeneralJournalEntryGeneralJournalEntries |
9
|
|
|
* |
10
|
|
|
* @property string $EntryID Primary key |
11
|
|
|
* @property string $Created Creation date |
12
|
|
|
* @property string $Currency Currency code |
13
|
|
|
* @property int $Division Division code |
14
|
|
|
* @property int $EntryNumber Entry number |
15
|
|
|
* @property float $ExchangeRate Exchange rate |
16
|
|
|
* @property int $FinancialPeriod Financial period |
17
|
|
|
* @property int $FinancialYear Financial year |
18
|
|
|
* @property GeneralJournalEntryLine[] $GeneralJournalEntryLines Collection of lines |
19
|
|
|
* @property string $JournalCode Code of Journal |
20
|
|
|
* @property string $JournalDescription Description of Journal |
21
|
|
|
* @property string $Modified Last modified date |
22
|
|
|
* @property bool $Reversal Indicates that amounts are reversed |
23
|
|
|
* @property int $Status Status: 5 = Rejected, 20 = Open, 50 = Processed |
24
|
|
|
* @property string $StatusDescription Description of Status |
25
|
|
|
* @property int $Type Type: 10 = Opening balance, 90 = Other |
26
|
|
|
* @property string $TypeDescription Description of Type |
27
|
|
|
*/ |
28
|
|
|
class GeneralJournalEntry extends Model |
29
|
|
|
{ |
30
|
|
|
use Query\Findable; |
31
|
|
|
use Persistance\Storable; |
32
|
|
|
|
33
|
|
|
protected $primaryKey = 'EntryID'; |
34
|
|
|
|
35
|
|
|
protected $generalJournalEntryLines = []; |
36
|
|
|
protected $fillable = [ |
37
|
|
|
'EntryID', |
38
|
|
|
'Created', |
39
|
|
|
'Currency', |
40
|
|
|
'Division', |
41
|
|
|
'EntryNumber', |
42
|
|
|
'ExchangeRate', |
43
|
|
|
'FinancialPeriod', |
44
|
|
|
'FinancialYear', |
45
|
|
|
'GeneralJournalEntryLines', |
46
|
|
|
'JournalCode', |
47
|
|
|
'JournalDescription', |
48
|
|
|
'Modified', |
49
|
|
|
'Reversal', |
50
|
|
|
'Status', |
51
|
|
|
'StatusDescription', |
52
|
|
|
'Type', |
53
|
|
|
'TypeDescription', |
54
|
|
|
]; |
55
|
|
|
|
56
|
|
|
public function addItem(array $array) |
57
|
|
|
{ |
58
|
|
|
if (! isset($this->attributes['GeneralJournalEntryLines']) || $this->attributes['GeneralJournalEntryLines'] == null) { |
59
|
|
|
$this->attributes['GeneralJournalEntryLines'] = []; |
60
|
|
|
} |
61
|
|
|
$this->attributes['GeneralJournalEntryLines'][] = $array; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
protected $url = 'generaljournalentry/GeneralJournalEntries'; |
65
|
|
|
} |
66
|
|
|
|