diff --git a/src/Picqer/Financials/Exact/SalesEntry.php b/src/Picqer/Financials/Exact/SalesEntry.php index d05116e5..af8acd70 100644 --- a/src/Picqer/Financials/Exact/SalesEntry.php +++ b/src/Picqer/Financials/Exact/SalesEntry.php @@ -6,23 +6,50 @@ * @package Picqer\Financials\Exact * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=salesentrySalesEntries * - * @property Int32 $Division Division code - * @property Double $Currency Amount in the default currency of the company. For the header lines (LineNumber = 0) of an entry this is the SUM(AmountDC) of all lines - * @property DateTime $EntryDate The due date for payments. This date is calculated based on the EntryDate and the Paymentcondition * @property Guid $EntryID The unique ID of the entry. Via this ID all transaction lines of a single entry can be retrieved - * @property Int32 $EntryNumber Entry number + * @property Double $AmountDC Amount in the default currency of the company. For the header lines (LineNumber = 0) of an entry this is the SUM(AmountDC) of all lines + * @property Double $AmountFC Amount in the currency of the transaction. For the header this is the sum of all lines, including VAT + * @property Int32 $BatchNumber The number of the batch of entries. Normally a batch consists of multiple entries. Batchnumbers are filled for invoices created by: - Fixed entries - Prolongation (only available with module hosting) + * @property DateTime $Created Creation date + * @property Guid $Creator User ID of creator + * @property String $CreatorFullName Name of creator + * @property String $Currency Currency for the invoice. By default this is the currency of the administration * @property Guid $Customer Reference to customer (account) - * @property String $YourRef The invoice number of the customer - * @property SalesEntryLines $SalesEntryLines Collection of lines + * @property String $CustomerName Name of customer + * @property String $Description Description. Can be different for header and lines + * @property Int32 $Division Division code * @property Guid $Document Document that is manually linked to the invoice - * @property Int32 $Journal Assigned at entry or at printing depending on setting. The number assigned is based on the freenumbers as defined for the Journal. When printing the field InvoiceNumber is copied to the fields EntryNumber and InvoiceNumber of the sales entry + * @property Int32 $DocumentNumber Number of the document + * @property String $DocumentSubject Subject of the document * @property DateTime $DueDate The due date for payments. This date is calculated based on the EntryDate and the Paymentcondition - * @property String $ExternalLinkReference Reference of ExternalLink + * @property DateTime $EntryDate The date when the invoice is entered + * @property Int32 $EntryNumber Entry number * @property String $ExternalLinkDescription Description of ExternalLink - * @property String $Description Description. Can be different for header and lines + * @property String $ExternalLinkReference Reference of ExternalLink + * @property Int32 $InvoiceNumber Assigned at entry or at printing depending on setting. The number assigned is based on the freenumbers as defined for the Journal. When printing the field InvoiceNumber is copied to the fields EntryNumber and InvoiceNumber of the sales entry + * @property Boolean $IsExtraDuty Indicates whether the invoice has extra duty + * @property String $Journal The journal code. Every invoice should be linked to a sales 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 Number to indentify the invoice. Order numbers are not unique. Default the number is based on a setting for the first free number + * @property String $PaymentCondition The payment condition used for due date and discount calculation + * @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 Double $Rate Foreign currency rate + * @property Int16 $ReportingPeriod The period of the transaction lines. The period should exist in the period date table + * @property Int16 $ReportingYear The financial year to which the entry belongs. The financial year should exist in the period date table + * @property Boolean $Reversal Indicates if amounts are reversed + * @property SalesEntryLines $SalesEntryLines Collection of lines * @property Int16 $Status Status: 5 = Rejected, 20 = Open, 50 = Processed - * @property DateTime $PaymentCondition The due date for payments. This date is calculated based on the EntryDate and the Paymentcondition - * @property String $PaymentReference The reference in PSP system + * @property String $StatusDescription Description of Status + * @property Int32 $Type Type: 20 = Sales entry, 21 = Sales 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 The invoice number of the customer */ class SalesEntry extends Model { @@ -35,23 +62,50 @@ class SalesEntry extends Model protected $saleEntryLines = [ ]; protected $fillable = [ - 'Division', - 'Currency', - 'EntryDate', 'EntryID', - 'EntryNumber', + 'AmountDC', + 'AmountFC', + 'BatchNumber', + 'Created', + 'Creator', + 'CreatorFullName', + 'Currency', 'Customer', - 'YourRef', - 'SalesEntryLines', + 'CustomerName', + 'Description', + 'Division', 'Document', - 'Journal', + 'DocumentNumber', + 'DocumentSubject', 'DueDate', - 'ExternalLinkReference', + 'EntryDate', + 'EntryNumber', 'ExternalLinkDescription', - 'Description', - 'Status', + 'ExternalLinkReference', + 'InvoiceNumber', + 'IsExtraDuty', + 'Journal', + 'JournalDescription', + 'Modified', + 'Modifier', + 'ModifierFullName', + 'OrderNumber', 'PaymentCondition', - 'PaymentReference' + 'PaymentConditionDescription', + 'PaymentReference', + 'ProcessNumber', + 'Rate', + 'ReportingPeriod', + 'ReportingYear', + 'Reversal', + 'SalesEntryLines', + 'Status', + 'StatusDescription', + 'Type', + 'TypeDescription', + 'VATAmountDC', + 'VATAmountFC', + 'YourRef', ]; diff --git a/src/Picqer/Financials/Exact/SalesEntryLine.php b/src/Picqer/Financials/Exact/SalesEntryLine.php index f0b47de1..562cd383 100644 --- a/src/Picqer/Financials/Exact/SalesEntryLine.php +++ b/src/Picqer/Financials/Exact/SalesEntryLine.php @@ -6,19 +6,42 @@ * @package Picqer\Financials\Exact * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=salesentrySalesEntryLines * + * @property Guid $ID Primary key * @property Double $AmountDC Amount in the default currency of the company. For almost all lines this can be calculated like: AmountDC = AmountFC * RateFC. * @property Double $AmountFC For normal lines it's the amount excluding VAT - * @property String $Description Description of Asset + * @property Guid $Asset Reference to Asset + * @property String $AssetDescription Description of Asset + * @property String $CostCenter Reference to Cost center + * @property String $CostCenterDescription Description of CostCenter + * @property String $CostUnit Reference to Cost unit + * @property String $CostUnitDescription Description of CostUnit + * @property String $Description Description. Can be different for header and lines * @property Int32 $Division Division code - * @property Guid $ID Primary key * @property Guid $EntryID The unique ID of the entry. Via this ID all transaction lines of a single entry can be retrieved + * @property Double $ExtraDutyAmountFC Extra duty amount in the currency of the transaction. Both extra duty amount and VAT amount need to be specified in order to differ this property from automatically calculated. + * @property Double $ExtraDutyPercentage Extra duty percentage for the item * @property Guid $GLAccount The GL Account of the invoice line. This field is generated based on the revenue account of the item (or the related item group). G/L Account is also used to determine whether the costcenter / costunit is mandatory * @property String $GLAccountCode Code of GLAccount - * @property $ItemDescription + * @property String $GLAccountDescription Description of GLAccount + * @property Int32 $LineNumber Indicates the sequence of the lines within one entry + * @property String $Notes Extra notes + * @property Guid $Project The project to which the sales transaction line is linked. The project can be different per line. Sometimes also the project in the header is filled although this is not really used + * @property String $ProjectDescription Description of Project * @property Double $Quantity The number of items sold in default units. The quantity shown in the entry screen is Quantity * UnitFactor + * @property String $SerialNumber Serial number + * @property Guid $Subscription When generating invoices from subscriptions, this field records the link between invoice lines and subscription lines + * @property String $SubscriptionDescription Description of Subscription + * @property Guid $TaxSchedule Obsolete + * @property Guid $TrackingNumber Reference to TrackingNumber + * @property String $TrackingNumberDescription Description of TrackingNumber + * @property Int32 $Type Type: 20 = Sales entry, 21 = Sales 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. However if the transaction uses extra duty, extra duty amount also needs to be specified. + * @property Double $VATBaseAmountDC The VAT base amount in the default currency of the company. This is calculated based on the VATBaseAmountFC + * @property Double $VATBaseAmountFC The VAT base amount in invoice currency. This is calculated with the use of VAT codes. It's an internal value * @property String $VATCode The VAT code used when the invoice was registered + * @property String $VATCodeDescription Description of VATCode * @property Double $VATPercentage The VAT percentage of the VAT code. This is the percentage at the moment the invoice is created. It's also used by the default calculation of VAT amounts and VAT base amounts - * @property String $Notes Extra notes */ class SalesEntryLine extends Model { @@ -27,19 +50,42 @@ class SalesEntryLine extends Model use Persistance\Storable; protected $fillable = [ + 'ID', 'AmountDC', 'AmountFC', + 'Asset', + 'AssetDescription', + 'CostCenter', + 'CostCenterDescription', + 'CostUnit', + 'CostUnitDescription', 'Description', 'Division', - 'ID', 'EntryID', + 'ExtraDutyAmountFC', + 'ExtraDutyPercentage', 'GLAccount', 'GLAccountCode', - 'ItemDescription', + 'GLAccountDescription', + 'LineNumber', + 'Notes', + 'Project', + 'ProjectDescription', 'Quantity', + 'SerialNumber', + 'Subscription', + 'SubscriptionDescription', + 'TaxSchedule', + 'TrackingNumber', + 'TrackingNumberDescription', + 'Type', + 'VATAmountDC', + 'VATAmountFC', + 'VATBaseAmountDC', + 'VATBaseAmountFC', 'VATCode', + 'VATCodeDescription', 'VATPercentage', - 'Notes', ]; protected $url = 'salesentry/SalesEntryLines';