Hvor gemmer e-conomic momspercentage?
Hej alle!Jeg er ved at lave et system hvor jeg kan oprette fakturaer lidt nemmere, uden hele tiden at logge ind i e-conomic (bare rolig, jeg har styr på sikkerheden!)
Jeg kan sagtens trække en liste med varer ud af e-conomic, via deres REST API.
Så får jeg følgende output (altså, jeg har fjernet alle varer undtagen den første, for ikke at fylde debatten unødigt):
Array
(
[0] => stdClass Object
(
[collection] => Array
(
[0] => stdClass Object
(
[productNumber] => 1,
[name] => 'Arbejdstime',
[recommendedPrice] => 700,
[salesPrice] => 700,
[barred] => '',
[lastUpdated] => '2022-05-19T13:22:00Z',
[productGroup] => stdClass Object
(
[productGroupNumber] => 3,
[name] => 'Ydelser m/moms',
[salesAccounts] => 'https://restapi.e-conomic.com/product-groups/3/sales-accounts',
[products] => 'https://restapi.e-conomic.com/product-groups/3/products',
[self] => 'https://restapi.e-conomic.com/product-groups/3'
),
[unit] => stdClass Object
(
[unitNumber] => 2,
[name] => 'timer',
[products] => 'https://restapi.e-conomic.com/units/2/products',
[self] => 'https://restapi.e-conomic.com/units/2'
),
[invoices] => stdClass Object
(
[drafts] => 'https://restapi.e-conomic.com/products/1/invoices/drafts',
[booked] => 'https://restapi.e-conomic.com/products/1/invoices/booked',
[self] => 'https://restapi.e-conomic.com/products/1/invoices'
),
[pricing] => stdClass Object
(
[currencySpecificSalesPrices] => 'https://restapi.e-conomic.com/products/1/pricing/currency-specific-sales-prices'
),
[self] => 'https://restapi.e-conomic.com/products/1'
)
),
[pagination] => stdClass Object
(
[skipPages] => 0,
[pageSize] => 1000,
[maxPageSizeAllowed] => 1000,
[results] => 70,
[resultsWithoutFilter] => 70,
[firstPage] => 'https://restapi.e-conomic.com/products/?skippages=0&pagesize=1000',
[lastPage] => 'https://restapi.e-conomic.com/products/?skippages=0&pagesize=1000'
),
[metaData] => stdClass Object
(
[create] => stdClass Object
(
[description] => 'Create a new product',
[href] => 'https://restapi.e-conomic.com/products/?skippages=0&pagesize=1000',
[httpMethod] => 'post'
)
),
[self] => 'https://restapi.e-conomic.com/products/?skippages=0&pagesize=1000'
)
)
Jeg kan se i productGroup->name at det er en "'Ydelser m/moms"
Men hvordan ved e-conomic at det er 25% Moms? Eller er det hardcoded i e-conomic?
Albert