Skip to content

Commit

Permalink
Merge pull request #242 from AtaneNL/update-purchase-entry
Browse files Browse the repository at this point in the history
Update purchase entry classes
  • Loading branch information
stephangroen authored Feb 3, 2018
2 parents 250ecf4 + 8427e2e commit c10deec
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 5 deletions.
50 changes: 47 additions & 3 deletions src/Picqer/Financials/Exact/PurchaseEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,50 @@
* Class PurchaseEntry
*
* @package Picqer\Financials\Exact
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=purchaseentryPurchaseEntries
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=PurchaseEntryPurchaseEntries
*
* @property Guid $EntryID Primary key
* @property Double $AmountDC Amount in the default currency of the company
* @property Double $AmountFC Amount in the currency of the transaction
* @property Int32 $BatchNumber Batch number
* @property Double $Currency Amount in the default currency of the company
* @property DateTime $Created Creation date
* @property Guid $Creator User ID of creator
* @property String $CreatorFullName Name of creator
* @property String $Currency Currency code
* @property String $Description Description
* @property Int32 $Division Division code
* @property Guid $Document Reference to document
* @property Int32 $DocumentNumber Document number
* @property String $DocumentSubject Document subject
* @property DateTime $DueDate Date when payment should be done
* @property DateTime $EntryDate Entry date
* @property Int32 $EntryNumber Entry number
* @property String $ExternalLinkReference
* @property String $ExternalLinkDescription Description of ExternalLink
* @property String $ExternalLinkReference External link
* @property Double $GAccountAmountFC A positive value of the amount indicates that the amount is to be paid to the suppliers G bank account.In case of a credit invoice the amount should have negative value when retrieved or posted to Exact.
* @property Int32 $InvoiceNumber Invoice number
* @property String $Journal Journal
* @property String $JournalDescription Description of Journal
* @property DateTime $Modified Last modified date
* @property Guid $Modifier User ID of modifier
* @property String $ModifierFullName Name of modifier
* @property Int32 $OrderNumber Order number
* @property String $PaymentCondition Payment condition
* @property String $PaymentConditionDescription Description of PaymentCondition
* @property String $PaymentReference The payment reference used for bank imports, VAT return and Tax reference
* @property Int32 $ProcessNumber
* @property PurchaseEntryLines $PurchaseEntryLines Collection of lines
* @property Double $Rate Currency exchange rate
* @property Int16 $ReportingPeriod Reporting period
* @property Int16 $ReportingYear Reporting year
* @property Boolean $Reversal Indicates that amounts are reversed
* @property Int16 $Status Status: 5 = Rejected, 20 = Open, 50 = Processed
* @property String $StatusDescription Description of Status
* @property Guid $Supplier Reference to supplier (account)
* @property String $SupplierName Name of supplier
* @property Int32 $Type Type: 30 = Purchase entry, 31 = Purchase credit note
* @property String $TypeDescription Description of Type
* @property Double $VATAmountDC Vat Amount in the default currency of the company
* @property Double $VATAmountFC Vat Amount in the currency of the transaction
* @property String $YourRef Your reference
*/
Expand All @@ -42,25 +64,47 @@ class PurchaseEntry extends Model

protected $fillable = [
'EntryID',
'AmountDC',
'AmountFC',
'BatchNumber',
'Created',
'Creator',
'CreatorFullName',
'Currency',
'Description',
'Division',
'Document',
'DocumentNumber',
'DocumentSubject',
'DueDate',
'EntryDate',
'EntryNumber',
'ExternalLinkDescription',
'ExternalLinkReference',
'GAccountAmountFC',
'InvoiceNumber',
'Journal',
'JournalDescription',
'Modified',
'Modifier',
'ModifierFullName',
'OrderNumber',
'PaymentCondition',
'PaymentConditionDescription',
'PaymentReference',
'ProcessNumber',
'PurchaseEntryLines',
'Rate',
'ReportingPeriod',
'ReportingYear',
'Reversal',
'Status',
'StatusDescription',
'Supplier',
'SupplierName',
'Type',
'TypeDescription',
'VATAmountDC',
'VATAmountFC',
'YourRef',
];
Expand Down
64 changes: 62 additions & 2 deletions src/Picqer/Financials/Exact/PurchaseEntryLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,112 @@
* Class PurchaseEntryLine
*
* @package Picqer\Financials\Exact
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=purchaseentryPurchaseEntryLines
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=PurchaseEntryPurchaseEntryLines
*
* @property Guid $ID Primary key
* @property Double $AmountDC Amount in the default currency of the company
* @property Double $AmountFC Amount in the currency of the transaction
* @property Guid $Asset Reference to asset
* @property String $AssetDescription Asset description
* @property String $CostCenter Reference to cost center
* @property String $CostCenterDescription Description of CostCenter
* @property String $CostUnit Reference to cost unit
* @property String $Description Asset description
* @property String $CostUnitDescription Description of CostUnit
* @property String $Description Description
* @property Int32 $Division Division code
* @property Guid $EntryID Reference to header of the purchase entry
* @property DateTime $From From date for deferred revenue
* @property Guid $GLAccount General ledger account
* @property String $GLAccountCode Code of GLAccount
* @property String $GLAccountDescription Description of GLAccount
* @property String $IntraStatArea IntraStat area
* @property String $IntraStatCountry IntraStatCountry
* @property String $IntraStatDeliveryTerm IntraStat delivery term
* @property String $IntraStatTransactionA IntraStat transaction a
* @property String $IntraStatTransportMethod IntraStat transport method
* @property Int32 $LineNumber Line number
* @property String $Notes Extra remarks
* @property Guid $Project Reference to project
* @property String $ProjectDescription Description of Project
* @property Double $Quantity Quantity
* @property String $SerialNumber Serial number
* @property Double $StatisticalNetWeight Statistical NetWeight
* @property String $StatisticalNumber Statistical Number
* @property Double $StatisticalQuantity Statistical Quantity
* @property Double $StatisticalValue Statistical Value
* @property Guid $Subscription Reference to subscription
* @property String $SubscriptionDescription Description of Subscription
* @property DateTime $To To date for deferred revenue
* @property Guid $TrackingNumber Reference to tracking number
* @property String $TrackingNumberDescription Description of TrackingNumber
* @property Int32 $Type Type: 30 = Purchase entry, 31 = Purchase credit note
* @property Double $VATAmountDC VAT amount in the default currency of the company
* @property Double $VATAmountFC VAT amount in the currency of the transaction. Use this property to specify a VAT amount that differs from the VAT amount that is automatically calculated.
* @property Double $VATBaseAmountDC VAT base amount in the default currency of the company
* @property Double $VATBaseAmountFC VAT base amount in the currency of the transaction
* @property String $VATCode VAT code
* @property String $VATCodeDescription Description of VATCode
* @property Double $VATNonDeductiblePercentage If not the full amount of the VAT is deductible, you can indicate a percentage for the non decuctible part. This is used during the entry of purchase invoices.
* @property Double $VATPercentage VAT percentage
* @property Double $WithholdingAmountDC Withholding tax amount for spanish legislation
* @property String $WithholdingTax Withholding tax key for spanish legislation
*/
class PurchaseEntryLine extends Model
{

use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
'AmountDC',
'AmountFC',
'Asset',
'AssetDescription',
'CostCenter',
'CostCenterDescription',
'CostUnit',
'CostUnitDescription',
'Description',
'Division',
'EntryID',
'From',
'GLAccount',
'GLAccountCode',
'GLAccountDescription',
'IntraStatArea',
'IntraStatCountry',
'IntraStatDeliveryTerm',
'IntraStatTransactionA',
'IntraStatTransportMethod',
'LineNumber',
'Notes',
'Project',
'ProjectDescription',
'Quantity',
'SerialNumber',
'StatisticalNetWeight',
'StatisticalNumber',
'StatisticalQuantity',
'StatisticalValue',
'Subscription',
'SubscriptionDescription',
'To',
'TrackingNumber',
'TrackingNumberDescription',
'Type',
'VATAmountDC',
'VATAmountFC',
'VATBaseAmountDC',
'VATBaseAmountFC',
'VATCode',
'VATCodeDescription',
'VATNonDeductiblePercentage',
'VATPercentage',
'WithholdingAmountDC',
'WithholdingTax',
];

protected $url = 'purchaseentry/PurchaseEntryLines';

}

0 comments on commit c10deec

Please sign in to comment.