-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type, Primary key and inconsistency fixes #77
Changes from 4 commits
8b27ac1
3ef6acb
93de0e9
f2d924e
a5da440
87a2e70
19fb37b
0d7b269
cd407ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,35 @@ | ||
<?php namespace Picqer\Financials\Exact; | ||
|
||
/** | ||
* Class ReceivableList | ||
* | ||
* @package Picqer\Financials\Exact | ||
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=ReadFinancialReceivablesList | ||
* | ||
* @property Int64 $HID Human readable ID, Primary key | ||
* @property String $AccountCode Code of the Account | ||
* @property Guid $AccountId Reference to the account | ||
* @property String $AccountName Name of Account | ||
* @property Double $Amount Amount | ||
* @property Double $AmountInTransit Amount in transit | ||
* @property String $CurrencyCode Code of Currency | ||
* @property String $Description Description | ||
* @property DateTime $DueDate Date the invoice should be paid | ||
* @property Int32 $EntryNumber Entry number | ||
* @property Guid $Id Obsolete | ||
* @property DateTime $InvoiceDate Invoice date | ||
* @property Int32 $InvoiceNumber Invoice number | ||
* @property String $JournalCode Code of Journal | ||
* @property String $JournalDescription Description of Journal | ||
* @property String $YourRef Your reference | ||
*/ | ||
class ReceivableList extends Model | ||
{ | ||
|
||
use Query\Findable; | ||
|
||
protected $primaryKey = 'HID'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you fix this indentation? |
||
|
||
protected $fillable = [ | ||
'AccountCode', | ||
'AccountId', | ||
|
@@ -15,6 +40,7 @@ class ReceivableList extends Model | |
'Description', | ||
'DueDate', | ||
'EntryNumber', | ||
'HID', | ||
'Id', | ||
'InvoiceDate', | ||
'InvoiceNumber', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php namespace Picqer\Financials\Exact; | ||
|
||
/** | ||
* Class Transaction | ||
* | ||
* @package Picqer\Financials\Exact | ||
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=financialtransactionTransactions | ||
* | ||
* @property Guid $EntryID Primary key | ||
* @property Double $ClosingBalanceFC Closing balance in the currency of the transaction | ||
* @property DateTime $Date Creation date | ||
* @property String $Description Description | ||
* @property Int32 $Division Division code | ||
* @property Int32 $EntryNumber Entry number | ||
* @property Int16 $FinancialPeriod Financial period | ||
* @property Int16 $FinancialYear Financial year | ||
* @property String $JournalCode Code of Journal | ||
* @property String $JournalDescription Description of Journal | ||
* @property Double $OpeningBalanceFC Opening balance in the currency of the transaction | ||
* @property String $PaymentConditionCode Code of PaymentCondition | ||
* @property String $PaymentConditionDescription Description of PaymentCondition | ||
* @property Int16 $Status Status: 5 = Rejected, 20 = Open, 50 = Processed | ||
* @property String $StatusDescription Description of Status | ||
* @property TransactionLines $TransactionLines Collection of lines | ||
* @property Int32 $Type The transaction type. 10 = Opening balance, 20 = Sales entry, 21 = Sales credit note, 22 = Return invoice sent, 30 = Purchase entry, 31 = Purchase credit note, 32 = Return invoice received, 40 = Cash flow, 50 = VAT return, 70 = Asset depreciation, 71 = Asset investment, 72 = Asset revaluation, 73 = Asset transfer, 74 = Asset split, 75 = Asset discontinue, 76 = Asset sales, 80 = Revaluation, 82 = Exchange rate difference, 83 = Payment difference, 84 = Deferred revenue, 85 = Tracking number:Revaluation, 86 = Deferred cost, 90 = Other, 120 = Delivery, 121 = Sales return, 130 = Receipt, 131 = Purchase return, 140 = Shop order stock receipt, 141 = Shop order stock reversal, 142 = Issue to parent, 145 = Shop order time entry, 146 = Shop order time entry reversal, 150 = Requirement issue, 151 = Requirement reversal, 152 = Returned from parent, 155 = Subcontract Issue, 156 = Subcontract reversal, 158 = Shop order completed, 162 = Finish assembly, 170 = Payroll, 180 = Stock revaluation, 195 = Stock count, 290 = Correction entry, 310 = Period closing, 320 = Year end reflection, 321 = Year end costing, 322 = Year end profits to gross profit, 323 = Year end costs to gross profit, 324 = Year end tax, 325 = Year end gross profit to net p/l, 326 = Year end net p/l to balance sheet, 327 = Year end closing balance, 328 = Year start opening balance, 3000 = Budget | ||
* @property String $TypeDescription The description of the transaction type | ||
*/ | ||
class Transaction extends Model | ||
{ | ||
use Query\Findable; | ||
use Persistance\Storable; | ||
|
||
protected $primaryKey = 'EntryID'; | ||
|
||
protected $fillable = [ | ||
'ClosingBalanceFC', | ||
'Date', | ||
'Description', | ||
'Division', | ||
'EntryID', | ||
'EntryNumber', | ||
'FinancialPeriod', | ||
'FinancialYear', | ||
'JournalCode', | ||
'JournalDescription', | ||
'OpeningBalanceFC', | ||
'PaymentConditionCode', | ||
'PaymentConditionDescription', | ||
'Status', | ||
'StatusDescription', | ||
'TransactionLines', | ||
'Type', | ||
'TypeDescription' | ||
]; | ||
protected $url = 'financialtransaction/Transactions'; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,6 @@ | ||
<?php namespace Picqer\Financials\Exact; | ||
|
||
/** | ||
* Class Transactions | ||
* | ||
* @package Picqer\Financials\Exact | ||
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=financialtransactionTransactions | ||
* | ||
* @property Double $ClosingBalanceFC Closing balance in the currency of the transaction | ||
* @property DateTime $Date Creation date | ||
* @property String $Description Description | ||
* @property Int32 $Division Division code | ||
* @property Int32 $EntryNumber Entry number | ||
* @property Int16 $FinancialPeriod Financial period | ||
* @property Int16 $FinancialYear Financial year | ||
* @property String $JournalCode Code of Journal | ||
* @property String $JournalDescription Description of Journal | ||
* @property Double $OpeningBalanceFC Opening balance in the currency of the transaction | ||
* @property String $PaymentConditionCode Code of PaymentCondition | ||
* @property String $PaymentConditionDescription Description of PaymentCondition | ||
* @property Int16 $Status Status: 5 = Rejected, 20 = Open, 50 = Processed | ||
* @property String $StatusDescription Description of Status | ||
* @property TransactionLines $TransactionLines Collection of lines | ||
* @property Int32 $Type The transaction type. 10 = Opening balance, 20 = Sales entry, 21 = Sales credit note, 22 = Return invoice sent, 30 = Purchase entry, 31 = Purchase credit note, 32 = Return invoice received, 40 = Cash flow, 50 = VAT return, 70 = Asset depreciation, 71 = Asset investment, 72 = Asset revaluation, 73 = Asset transfer, 74 = Asset split, 75 = Asset discontinue, 76 = Asset sales, 80 = Revaluation, 82 = Exchange rate difference, 83 = Payment difference, 84 = Deferred revenue, 85 = Tracking number:Revaluation, 86 = Deferred cost, 90 = Other, 120 = Delivery, 121 = Sales return, 130 = Receipt, 131 = Purchase return, 140 = Shop order stock receipt, 141 = Shop order stock reversal, 142 = Issue to parent, 145 = Shop order time entry, 146 = Shop order time entry reversal, 150 = Requirement issue, 151 = Requirement reversal, 152 = Returned from parent, 155 = Subcontract Issue, 156 = Subcontract reversal, 158 = Shop order completed, 162 = Finish assembly, 170 = Payroll, 180 = Stock revaluation, 195 = Stock count, 290 = Correction entry, 310 = Period closing, 320 = Year end reflection, 321 = Year end costing, 322 = Year end profits to gross profit, 323 = Year end costs to gross profit, 324 = Year end tax, 325 = Year end gross profit to net p/l, 326 = Year end net p/l to balance sheet, 327 = Year end closing balance, 328 = Year start opening balance, 3000 = Budget | ||
* @property String $TypeDescription The description of the transaction type | ||
* Added deprecated Transactions class for backward compatibility | ||
*/ | ||
class Transactions extends Model | ||
{ | ||
use Query\Findable; | ||
use Persistance\Storable; | ||
|
||
protected $primaryKey = 'EntryID'; | ||
|
||
protected $fillable = [ | ||
'ClosingBalanceFC', | ||
'Date', | ||
'Description', | ||
'Division', | ||
'EntryNumber', | ||
'FinancialPeriod', | ||
'FinancialYear', | ||
'JournalCode', | ||
'JournalDescription', | ||
'OpeningBalanceFC', | ||
'PaymentConditionCode', | ||
'PaymentConditionDescription', | ||
'Status', | ||
'StatusDescription', | ||
'TransactionLines', | ||
'Type', | ||
'TypeDescription' | ||
]; | ||
protected $url = 'financialtransaction/Transactions'; | ||
} | ||
class_alias(__NAMESPACE__ . '\Transaction', __NAMESPACE__ . '\Transactions'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have created an extra class for backward compatibility here but have not done so for the Subscription* classes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As Subscriptions and SubscriptionTypes and SubscriptionLines are added recently added I dit not think this nessesary. Do you want me to add aliases for these classes as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since they are already released, we should. If you can do that, it would be great :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a use case that does not use the Autoloader so I could add a trigger_error statement with a depreciation warning. This way we can in the future clean up the extra files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix this indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry just updated Komodo Edit will check its settings.