You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made a class named SalesItemPrice which I use to retrieve the sales price for an item, but the price returned is an old price. The price returned is 65 and the price in Exact is 95.
The code for the class i've made:
<?phpnamespacePicqer\Financials\Exact;
/** * Class SalesItemPrice * * @package Picqer\Financials\Exact * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=LogisticsSalesItemPrices * * @property Guid $ID Primary key * @property Guid $Account ID of the customer * @property String $AccountName Name of the customer account * @property DateTime $Created Creation date * @property Guid $Creator User ID of creator * @property String $CreatorFullName Name of creator * @property String $Currency The currency of the price * @property String $DefaultItemUnit The default unit of the item * @property String $DefaultItemUnitDescription The description of the default item unit * @property Int32 $Division Division code * @property DateTime $EndDate Together with StartDate this determines if the item is active * @property Guid $Item Item ID * @property String $ItemCode Code of Item * @property String $ItemDescription Description of Item * @property DateTime $Modified Last modified date * @property Guid $Modifier User ID of modifier * @property String $ModifierFullName Name of modifier * @property Double $NumberOfItemsPerUnit This is the multiplication factor when going from default item unit to the unit of this price.For example if the default item unit is 'gram' and the price unit is 'kilogram' then the value of this property is 1000. * @property Double $Price The actual price of this sales item * @property Double $Quantity Minimum quantity to which the price is applicable * @property DateTime $StartDate Together with StartDate this determines if the item is active * @property String $Unit The unit code of the price * @property String $UnitDescription Description of the price unit */class SalesItemPrice extends Model
{
useQuery\Findable;
usePersistance\Storable;
protected$fillable = [
'ID',
'Account',
'AccountName',
'Created',
'Creator',
'CreatorFullName',
'Currency',
'DefaultItemUnit',
'DefaultItemUnitDescription',
'Division',
'EndDate',
'Item',
'ItemCode',
'ItemDescription',
'Modified',
'Modifier',
'ModifierFullName',
'NumberOfItemsPerUnit',
'Price',
'Quantity',
'StartDate',
'Unit',
'UnitDescription'
];
protected$url = 'logistics/SalesItemPrices';
}
and here is the code that I use to retrieve the items:
$salesItemPrice = new \Picqer\Financials\Exact\SalesItemPrice($connection); $salesItemPrices = $salesItemPrice->filter('', '', 'Price, ItemCode');
Does anybody have any idea why it would return the old price and not the new one?
The text was updated successfully, but these errors were encountered:
The endpoint you are using returns the price history of the item. The first price record is always set to 0. To get the current price you are beter off using this endpoint: /api/v1/{division}/read/logistics/SalesItemPrice?itemId={Edm.Guid}
Thanks, but I had sent an email to the Exact Support and they told me that it retrieved all the SalesItemPrices (even the old ones) and that I needed to check if the EndDate attribute value was null or not
Hi,
I've made a class named SalesItemPrice which I use to retrieve the sales price for an item, but the price returned is an old price. The price returned is 65 and the price in Exact is 95.
The code for the class i've made:
and here is the code that I use to retrieve the items:
$salesItemPrice = new \Picqer\Financials\Exact\SalesItemPrice($connection); $salesItemPrices = $salesItemPrice->filter('', '', 'Price, ItemCode');
Does anybody have any idea why it would return the old price and not the new one?
The text was updated successfully, but these errors were encountered: