Plentymarkets interface documentation
Accounting
Contracts
AccountingLocationRepositoryContract
The repository to get, create, update and delete accounting locations.
Namespace
Plenty\Modules\Accounting\Contracts
Methods
public get($id):Plenty\Modules\Accounting\Models\AccountingLocation
Return type: AccountingLocation
Get an accounting location. The ID of the location must be specified.
Name |
Type |
Description |
|
public getAll():Plenty\Modules\Accounting\Models\AccountingLocation
Return type: AccountingLocation
List all accounting locations *
public listByPlentyId($plentyId):void
List accounting locations for a client. The plenty ID of the client must be specified.
Name |
Type |
Description |
|
public create($data):Plenty\Modules\Accounting\Models\AccountingLocation
Return type: AccountingLocation
Create an accounting location.
Name |
Type |
Description |
|
public update($id, $data):Plenty\Modules\Accounting\Models\AccountingLocation
Return type: AccountingLocation
Update an accounting location. The ID of the location must be specified.
Name |
Type |
Description |
|
||
|
public delete($id):bool
Delete an accounting location. The ID of the location must be specified.
Name |
Type |
Description |
|
public getSettings($id):Plenty\Modules\Accounting\Models\AccountingLocationSettings
Return type: AccountingLocationSettings
Get accounting location settings. The ID of the location must be specified.
Name |
Type |
Description |
|
The accounting location Id |
public updateSettings($id, $data):Plenty\Modules\Accounting\Models\AccountingLocationSettings
Return type: AccountingLocationSettings
Update accounting location settings. The ID of the location must be specified.
Name |
Type |
Description |
|
The accounting location Id |
|
|
The request data |
AccountingServiceContract
Provides methods to detect a location ID.
Namespace
Plenty\Modules\Accounting\Contracts
Methods
public detectLocationId($plentyId, $countryId = null):int
Get a location ID for a country of delivery. The plenty ID must be specified and the ID of the country of delivery can be specified. If the ID of a country is not specified, the ID of the standard location of the specified client will be returned.
Name |
Type |
Description |
|
The plenty ID of the client (store). The default client will be used if the plenty ID is not specified. |
|
|
The ID of the country of delivery. The standard location of the specified client will be returned, if no ID of a country of delivery is specified. |
public detectLocationIdByClientId($clientId = null, $countryId = null):int
Get the location ID for a country of delivery. The ID of the client and the ID of the country of delivery can be specified. If neither the client ID nor the ID of a country are specified, the ID of the standard location of the default client will be returned.
Name |
Type |
Description |
|
The ID of the client. The default client (ID 0) will be used if the ID of client is not specified. |
|
|
The ID of the country of delivery. The standard location of the specified client will be returned, if no ID of a country of delivery is specified. |
public getAccountingLocations($plentyId, $countryId = null):array
List accounting locations. The plenty ID must be specified and the ID of a country of delivery can be specified. If the ID of the country is specified, only one accounting location will be returned. If the ID of the country is not specified, all accounting locations of the client will be returned.
Name |
Type |
Description |
|
The plenty ID of the client (store). |
|
|
The ID of the country of delivery. |
public getAccountingLocationsByClient($clientId = null, $countryId = null):array
List accounting locations. The ID of the client and the ID of the country of delivery can be specified. If neither the client ID nor the ID of a country are specified, all accounting locations of the default client will be returned.
Name |
Type |
Description |
|
The ID of the client. The default client (ID 0) will be used if the ID of client is not specified. |
|
|
The ID of the country of delivery. |
DebtorAccountRepositoryContract
The DebtorAccountRepositoryContract is the interface for the DebtorAccountRepository. This interface allows you to either list debtor accounts by locationId or by locationId and mode. The mode describes the criteria that is used to assign pending amounts to debtor accounts.
Namespace
Plenty\Modules\Accounting\Contracts
Methods
public findByLocationId($locationId):Plenty\Modules\Accounting\Models\DebtorAccountConfiguration
Return type: DebtorAccountConfiguration
Get debtor account configuration of an accounting location. The ID of the accounting location must be specified.
Name |
Type |
Description |
|
The ID of the accounting location. |
public listByLocationIdAndMode($locationId, $mode):void
Lists debtor accounts by mode for an accounting location . The mode and the accounting location must be specified.
Name |
Type |
Description |
|
The ID of the accounting location. |
|
|
Specifies the mode of the debtor accounts. There are 4 different modes available. These modes are: <ul> <li>character</li> <li>country</li> <li>payment</li> <li>country_payment</li> </ul> The modes are described in detail in the DebtorAccountConfiguration model as well as DebtorAccount model. |
public update($locationId, $data):Plenty\Modules\Accounting\Models\DebtorAccountConfiguration
Return type: DebtorAccountConfiguration
Updates the debtor account configuration of an accounting location. The ID of the accounting location has to be specified.
Name |
Type |
Description |
|
||
|
DetermineShopCountryContract
This interface provides methods to initialise the country of a location or the country of an order as well as methods to get the ID of a client, the plenty ID of a client, the country or the ID of country.
Namespace
Plenty\Modules\Accounting\Contracts
Methods
public initByClientId($clientId):void
Initialise the country of the standard location of a client. The ID of the client must be specified.
Name |
Type |
Description |
|
The ID of the client [optional, default=0] |
public initByPlentyId($plentyId):void
Initialise the country of the standard location of a client. The plenty ID of the client can be specified. If no plenty ID is specified, the standard client will be used.
Name |
Type |
Description |
|
The plenty ID of the client [optional] |
public initByLocationId($locationId):void
Initialise the country of a location. The ID of the location must be specified.
Name |
Type |
Description |
|
The ID of the location |
public initByOrderId($orderId):void
Initialise the country for an order. The ID of the order must be specified.
Name |
Type |
Description |
|
The ID of the order |
public getCountryId():int
Get the ID of the country of the current standard location. One of the initialise methods must be called first. The client that was initialised with the initialise method is your current client.
public getClientId():int
Get the ID of the current client. One of the initialise methods must be called first. The client that was initialised with the initialise method is your current client.
public getPlentyId():int
Get the plenty ID of the current client. One of the initialise methods must be called first. The client that was initialised with the initialise method is your current client.
public getCountryIdByClientId($clientId):int
Get the ID of the country of a client's standard location. The ID of the client must be specified.
Name |
Type |
Description |
|
The ID of the client. The ID of the default client will be used if no ID is specified [optional, default=0]. |
public getCountryIdByPlentyId($plentyId):int
Get the ID of the country of a client's standard location. The plenty ID of the client must be specified.
Name |
Type |
Description |
|
The plenty ID of a client |
public getCountryIdByClientIdAndCountryId($clientId, $countryId):int
Get the country of a client's standard location. The ID of the client and the ID of the country must be specified.
Name |
Type |
Description |
|
The ID of the client. |
|
|
The ID of the country. |
public getCountryIdByLocationId($locationId):int
Get the country of a location. The ID of the location must be specified.
Name |
Type |
Description |
|
The ID of the location. |
PostingKeyRepositoryContract
The PostingKeyRepositoryContract is the interface for the PostingKeyRepository. This interface provides the functionality to find the posting keys for an accounting location.
Namespace
Plenty\Modules\Accounting\Contracts
Methods
public findByLocationId($locationId):Plenty\Modules\Accounting\Models\PostingKeyConfiguration
Return type: PostingKeyConfiguration
Get the posting key configuration of an accounting location. The ID of the accounting location must be specified.
Name |
Type |
Description |
|
The ID of the accounting location |
public update($locationId, $data):Plenty\Modules\Accounting\Models\PostingKeyConfiguration
Return type: PostingKeyConfiguration
Updates a posting key configuration of an accounting location. The ID of the accounting location has to be specified.
Name |
Type |
Description |
|
||
|
RevenueAccountRepositoryContract
The RevenueAccountRepositoryContract is the interface for the RevenueAccountRepository. This interface allows you to either list revenue accounts by locationId, find by locationId and countryId or to least all for an accounting location.
Namespace
Plenty\Modules\Accounting\Contracts
Methods
public listRevenueAccounts($page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List revenue account configurations for all accounting locations. Each accounting location has one revenue account configuration.
Name |
Type |
Description |
|
The page to get. The default page that will be returned is page 1. |
|
|
The number of revenue accounts to be displayed per page. The default number of revenue accounts is 50. |
public findByLocationId($locationId):Plenty\Modules\Accounting\Models\RevenueAccountLocationConfiguration
Return type: RevenueAccountLocationConfiguration
Get the revenue account configuration of an accounting location. The ID of the accounting location must be specified.
Name |
Type |
Description |
|
The ID of the accounting location |
public findByLocationIdAndCountryId($locationId, $countryId):Plenty\Modules\Accounting\Models\RevenueAccountCountryConfiguration
Return type: RevenueAccountCountryConfiguration
Get the revenue account configuration of a country. The country account configuration is associated with an accounting location. The ID of the accounting location that the country is associated with as well as the ID of the country must be specified.
Name |
Type |
Description |
|
The ID of the accounting location |
|
|
The ID of the country |
public update($locationId, $data):Plenty\Modules\Accounting\Models\RevenueAccountLocationConfiguration
Return type: RevenueAccountLocationConfiguration
Updates the revenue account configuration of an accounting location. The ID of the accounting location has to be specified.
Name |
Type |
Description |
|
||
|
Models
AccountingLocation
The accounting location model. An accounting location always has a country and belongs to a client. An accounting location contains the VAT configurations. The VAT model contains the VAT configuration.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
id |
The ID of the accounting location |
|
countryId |
The ID of the country of the accounting location |
|
name |
The name of the accounting location |
|
clientId |
The ID of the client that the accounting location belongs to |
|
plentyId |
The plenty ID of the client that the accounting location belongs to |
|
vats |
A collection of VAT configurations that are related to the accounting location |
|
country |
The country that the accounting location belongs to |
|
client |
The client (store) this accounting location belongs to |
Methods
public toArray()
Returns this model as an array.
AccountingLocationSettings
The accounting location settings model.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
locationId |
The ID of the accounting location |
|
isInvoiceEUNet |
Is the invoice net for EU? |
|
isInvoiceExportNet |
Is the invoice net for export? |
|
showShippingVat |
Show the vat for shipping costs on the invoice? |
|
isSmallBusiness |
Is it a small business? |
|
numberOfDecimalPlaces |
The number of decimal places for prices |
|
roundTotalsOnly |
Do only round totals? |
|
isReverseCharge |
Is the reverse charge method activated? |
Methods
public toArray()
Returns this model as an array.
DebtorAccount
The DebtorAccountValue Model which contains the actual configured debtor accounts by character, payment and country.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
accountId |
The ID of the debtor account configuration that the debtor account belongs to |
|
mode |
The mode describes the criteria based on which pending amounts are assigned to a debtor account. The following modes are available: <ul> <li>character = The debtor accounts are selected based on the first character of customer information. The information and the order of the information that will be used are defined with the sequence. There are 3 different sequences available.</li> <li>payment = The debtor accounts are selected based on the payment method.</li> <li>country = The debtor accounts are selected based on the country of delivery.</li> <li>country_payment = The debtor accounts are selected based on two criteria. The first criteria is the country and if the country is same as the country of the accounting location then the payment method is used to select the deptor account.</li> </ul> |
|
key |
The key depends on the debtor account mode. <ul> <li>For the character mode the keys are letters. The letters indicate the first letter of the customer information that was used to assign the pending amounts.</li> <li>For the payment mode the key is the ID of payment method.</li> <li>For the country mode the key is the ID of the country.</li> <li>For the country_payment mode the key is either the ID of the country or the ID of payment method. If the country is the same as the country of the accounting location then the payment methods are used to select the deptor account.</li> </ul> |
|
value |
The actual debtor account. |
|
account |
The debtor account configuration this account is associated with. |
Methods
public toArray()
Returns this model as an array.
DebtorAccountConfiguration
The debtor account configuration model. The configuration is a set of debtor accounts. The actual number of debtor accounts within the configuration depends on the mode used to assign pending amounts to debtor accounts.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
id |
The ID of the debtor account configuration |
|
locationId |
The ID of the accounting location that the debtor account is associated with. |
|
mode |
The mode describes the criteria based on which pending amounts are assigned to a debtor account. The following modes are available: <ul> <li>character = The debtor accounts are selected based on the first character of customer information. The information and the order of the information that will be used are defined with the sequence. There are 3 different sequences available.</li> <li>payment = The debtor accounts are selected based on the payment method.</li> <li>country = The debtor accounts are selected based on the country of delivery.</li> <li>country_payment = The debtor accounts are selected based on two criteria. The first criteria is the country and if the country is same as the country of the accounting location then the payment method is used to select the deptor account.</li> </ul> |
|
sequence |
The sequence defines the order in which customer information will be used for the debtor account assignment if the character made has been chosen. The following sequences are available: <ul> <li>FNV = stands for the sequence: company, lastname, firstname</li> <li>NVF = stands for the sequence: lastname, firstname, company</li> <li>NFV = stands for the sequence: lastname, company, firstname</li> </ul> |
|
standard |
The standard debtor account that will be used if no matching debtor account can be found. |
|
save |
Flag that indicates if the debtor account shall be saved within the contact data. |
|
accounts |
The actual debtor accounts |
Methods
public toArray()
Returns this model as an array.
PostingKey
The Posting Key Model. A posting key is always associated with an accounting location and holds an posting key for each configured vat rate.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
id |
The Id posting key in relation to the vatrate. |
|
value |
The actual posting key for the vat rate. |
Methods
public toArray()
Returns this model as an array.
PostingKeyConfiguration
The posting key configuration model. A posting key configuration is a set of 4 posting keys. A posting key configuration is always associated with an accounting location and can have a posting key per VAT rate. A posting key defines how line items are booked to accounts.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
locationId |
The ID of the accounting location that the configuration belongs to |
|
postingKeys |
The posting keys for this configuration |
|
location |
The name of the accounting location that the configuration belongs to |
Methods
public toArray()
Returns this model as an array.
RevenueAccount
The revenue account model provides information on a single revenue account. The ID of an account matches the ID of a VAT rate.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
id |
The ID of the account. The account IDs are always 0,1,2 or 3. This way the IDs indicate the VAT rate that the account is used for. The revenues that were made with items that have the VAT rate with the ID 0 are assigned to the account with the ID 0. |
|
account |
The actual account number that was entered in the entry field. |
Methods
public toArray()
Returns this model as an array.
RevenueAccountCountryConfiguration
The revenue account country configuration model. The revenue account country configuration is a set of up to 4 revenue accounts for one country. Each country that you need to pay VAT in needs a configuration. The 4 revenue account included in the configuration are associated with VAT rates. The VAT rate that one revenue account is associated with can be identified by the ID of the VAT rate. The ID of the VAT rate is included in the account name. Furthermore, each revenue account country configuration is part of a revenue account location configuration. A revenue account country configuration is only available if a VAT configuration for the country exists.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
countryId |
The ID of the country that the account configuration belongs to |
|
revenueAccountLocationId |
The ID configuration of the revenue account that these accounts are for. |
|
revenueAccounts |
A list of the actual revenue accounts. The accounts are associated with VAT rate. The association can be identified by |
|
country |
The country these accounts are associated with. |
|
locationConfiguration |
The revenue account configuration these accounts are associated with |
Methods
public toArray()
Returns this model as an array.
RevenueAccountLocationConfiguration
The revenue account location configuration model. A revenue account location configuration is the set of all revenue accounts that belong to one accounting location.
Namespace
Plenty\Modules\Accounting\Models
Name | Type | Description |
---|---|---|
id |
The ID of the revenue account configuration |
|
locationId |
The ID of the accounting location that the configuration belongs to |
|
accountEu |
The account used for revenues that are exempt from VAT and that were sold within the European Union |
|
accountExport |
The account used for revenues that are exempt from VAT and that were sold to outside the European Union |
|
revenueAccountCountryConfigurations |
The set of revenue accounts of one country |
Methods
public toArray()
Returns this model as an array.
Vat
Contracts
VatInitContract
This interface provides methods to initialise the detection of a VAT configuration and to actually detect VAT rates or VAT fields.
Namespace
Plenty\Modules\Accounting\Vat\Contracts
Methods
public init($billingCountryId, $taxIdNumber, $locationId, $shippingCountryId, $startedAt = null):void
Initialise the VAT system data
Name |
Type |
Description |
|
The ID of the country of the invoice address |
|
|
The tax identification number |
|
|
The ID of the location |
|
|
The ID of the country of the shipping address. [optional, default=0] |
|
|
The date when the VAT configuration went into effect. If no date is set, the current date will be used. |
public isInitialized():bool
Get whether the VAT system is already initialised or not
public getVatField($vatRate, $restrictedToDigitalItems = false):int
Get the VAT field for a VAT rate
Name |
Type |
Description |
|
The VAT rate to be used to find the VAT field |
|
|
Flag that indicates if the VAT is restricted to digital items or not. <br />True = the VAT is restricted to digital items <br />False = the VAT is used for all items |
public getVatRate($vatField, $restrictedToDigitalItems = false):float
Get the VAT rate of a VAT field
Name |
Type |
Description |
|
The VAT field (0-5). |
|
|
Flag that indicates if the VAT is restricted to digital items or not. <br />True = the VAT is restricted to digital items <br />False = the VAT is used for all items |
public getRevenueAccount($vatField, $restrictedToDigitalItems = false):string
Get the revenue account of a VAT field
Name |
Type |
Description |
|
The VAT field (0-5). |
|
|
Flag that indicates if the VAT is restricted to digital items or not. <br />True = the VAT is restricted to digital items <br />False = the VAT is used for all items |
public getUsingVat($restrictedToDigitalItems = false):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Get the VAT configuration to be used for VAT calculation
Name |
Type |
Description |
|
Flag that indicates if the VAT is restricted to digital items or not. <br />True = the VAT is restricted to digital items <br />False = the VAT is used for all items |
public getUsingVatRates($restrictedToDigitalItems = false):array
Get the VAT rates to be used for VAT calculation
Name |
Type |
Description |
|
Flag that indicates if the VAT is restricted to digital items or not. <br />True = the VAT is restricted to digital items <br />False = the VAT is used for all items |
public getStandardVatByLocationId($locationId, $startedAt = null):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Get a standard VAT configuration of an accounting location
Name |
Type |
Description |
|
The ID of the accounting location |
|
|
The date when the VAT configuration went into effect. The date is in W3C format. |
public getTaxIdNumber():string
Get the tax ID number used for tax determination.
VatRepositoryContract
The VatRepositoryContract is the interface for the VAT functionality. This interface allows you to get the VAT configuration for an accounting location and a country of delivery.
Namespace
Plenty\Modules\Accounting\Vat\Contracts
Methods
public findById($id):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Get a VAT configuration
Name |
Type |
Description |
|
The ID of the VAT configuration |
public getStandardVat($plentyId = null, $startedAt = null):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Get the standard VAT configuration for a plenty ID
Name |
Type |
Description |
|
The ID of the client (store) |
|
|
The date when the VAT configuration went into effect. The date is given in W3C format. |
public getStandardVatByLocation($locationId, $startedAt = null):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Get the standard VAT configuration for a location ID
Name |
Type |
Description |
|
The ID of the location. |
|
|
The date when the VAT configuration went into effect. The date is given in W3C format. |
public getVat($locationId, $countryId, $startedAt = null):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Gets the VAT configuration
Name |
Type |
Description |
|
The ID of the location. |
|
|
The ID of the country. |
|
|
The date when the VAT configuration went into effect. The date is given in W3C format. |
public findVat($page = 1, $itemsPerPage = \Plenty\Modules\Accounting\Vat\Models\Vat::ITEMS_PER_PAGE, $relations = [], $columns = []):array
List VAT configurations
Name |
Type |
Description |
|
The page to be returned. If no page is specified, the first page will be returned. |
|
|
The number of items per page. If not given, the model’s default number will be used. |
|
|
The relations to load with the VAT object. The relations available are "location" and "country". |
|
|
The columns to load in the response |
public findVatByLocationId($locationId, $relations = [], $columns = []):array
List VAT configurations for an accounting location
Name |
Type |
Description |
|
The ID of the accounting location |
|
|
The relations to load with the VAT object. The relations available are "location" and "country". |
|
|
The columns to load in the response |
public findVatByLocationIdAndCountry($locationId, $countryId, $relations = [], $columns = []):array
List VAT configuration for a country of delivery
Name |
Type |
Description |
|
The ID of the accounting location |
|
|
The ID of the country of delivery |
|
|
The relations to load with the VAT object. The relations available are "location" and "country". |
|
|
The columns to load in the response. |
public findVatByLocationIdAndDate($locationId, $date, $relations = [], $columns = []):array
List VAT configuration for a date
Name |
Type |
Description |
|
The ID of the accounting location |
|
|
The started at date |
|
|
The relations to load with the VAT object. The relations available are "location" and "country". |
|
|
The columns to load in the response. |
public getVatById($id):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Get a VAT configuration by id
Name |
Type |
Description |
|
public createVat($data):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Create a VAT configuration
Name |
Type |
Description |
|
public updateVat($id, $data):Plenty\Modules\Accounting\Vat\Models\Vat
Return type: Vat
Update a VAT configuration
Name |
Type |
Description |
|
||
|
public deleteVat($id):void
Delete a VAT configuration
Name |
Type |
Description |
|
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
VatServiceContract
Provides methods for a quick search of VAT fields, VAT rates and VAT names of a specific VAT configuration.
Namespace
Plenty\Modules\Accounting\Vat\Contracts
Methods
public getVatField($vat, $vatRate):int
Get the VAT field for a VAT rate.
Name |
Type |
Description |
|
The VAT configuration of a country |
|
|
The VAT rate |
public getVatRate($vat, $vatField):float
Get the VAT rate for a VAT field.
Name |
Type |
Description |
|
The VAT configuration of a country |
|
|
The VAT field |
public getVatName($vat, $vatField):string
Get the name of a VAT field.
Name |
Type |
Description |
|
The VAT configuration of a country |
|
|
The VAT field |
public getRevenueAccount($vat, $vatField):string
Get the revenue account for the given vat field.
Name |
Type |
Description |
|
The country VAT instance. |
|
|
The vat field. |
Models
Vat
The VAT model contains the complete VAT configuration in plentymarkets. The VAT configuration is based on 4 VAT rates. A VAT configuration always belongs to an accounting location. The accounting location is in a specified country and is assigned to a client. One accounting location can have several VAT configurations, but only one is active at a time. Which one is active depends on the startedAt date. This also means that only one VAT number is active per accounting location.
Namespace
Plenty\Modules\Accounting\Vat\Models
Name | Type | Description |
---|---|---|
id |
The ID of the VAT configuration. A VAT configuration includes 4 VAT rates |
|
countryId |
The ID of the country that the VAT configuration belongs to |
|
taxIdNumber |
The tax id number of VAT configuration. |
|
startedAt |
The date when the VAT configuration went into effect |
|
invalidFrom |
The date when the VAT configuration should not be used any more |
|
locationId |
The ID of the location |
|
marginScheme |
Specifies the tax rate that is used, when the margin scheme is applied. Available values: 'none', 'vat1', 'vat2', 'vat3', 'vat4'. |
|
isRestrictedToDigitalItems |
Flag that indicates if the VAT configuration is used only applied to digital goods or not. True= The VAT set is only applied to digital goods. False = The VAT set is applied to all types of goods. |
|
isStandard |
Flag that indicates if the VAT configuration is the standard VAT configuration for the location |
|
createdAt |
The date at which the VAT configuration was created. |
|
updatedAt |
The date that the VAT configuration was last updated. |
|
isActive |
Is this the active VAT configuration for this location and country? (read-only) |
|
location |
The accounting location that the VAT configuration belongs to. Each accounting location is assigned to a country and only one accounting location is allowed per country. |
|
country |
The country that the VAT configuration belongs to |
|
vatRates |
The VAT rates of a VAT configuration |
Methods
public toArray()
Returns this model as an array.
VatRate
The VAT rate model is always associated with a VAT configuration and contains the ID, name and percentage of a VAT rate. Each VAT configuration can have 4 rates.
Namespace
Plenty\Modules\Accounting\Vat\Models
Name | Type | Description |
---|---|---|
id |
The ID of the VAT rate |
|
vatRate |
The percentage of the VAT rate, e.g. 19.00 for 19 % |
|
name |
The name of a VAT rate |
|
revenueAccount |
The revenue account for the VAT rate |
Methods
public toArray()
Returns this model as an array.