Skip to content

Commit

Permalink
Merge pull request picqer#513 from joephoffland/main
Browse files Browse the repository at this point in the history
Add PlannedSalesReturn
  • Loading branch information
stephangroen authored Nov 22, 2021
2 parents f122c25 + 5ba07e0 commit 89940b5
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
72 changes: 72 additions & 0 deletions src/Picqer/Financials/Exact/PlannedSalesReturn.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php

namespace Picqer\Financials\Exact;

/**
* Class PlannedSalesReturn.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SalesOrderPlannedSalesReturns
*
* @property string $PlannedSalesReturnID Primary key
* @property string $Created Creation date
* @property string $Creator User ID of the creator
* @property string $CreatorFullName Name of the creator
* @property string $DeliveredTo Reference to the customer where item is delivered to/customer returning items
* @property string $DeliveredToContactPerson Reference to the contact person of customer where item is delivered to/customer returning items
* @property string $DeliveredToContactPersonFullName Name of contact person of delivered to customer
* @property string $DeliveredToName Name of delivered to customer
* @property string $DeliveryAddress Delivered to address
* @property string $Description Description of the planned sales return
* @property int $Division Division code
* @property string $Document Document that is manually linked to the planned sales return
* @property string $DocumentSubject Subject of Document
* @property string $Modified Last modified date
* @property string $Modifier User ID of modifier
* @property string $ModifierFullName Name of modifier
* @property PlannedSalesReturnLine[] $PlannedSalesReturnLines Collection of planned sales return lines
* @property string $Remarks Remarks
* @property string $ReturnDate Date of planned sales return
* @property int $ReturnNumber Human readable id of the planned sales return
* @property int $Source Source of planned sales return entry: 1-Manual entry, 2-Web service
* @property int $Status Planned sales return status: 20-Open, 30-Confirmed, 50-Processed
* @property string $Warehouse ID of warehouse to receive the returning items
* @property string $WarehouseCode Code of warehouse to receive the returning items
* @property string $WarehouseDescription Description of warehouse to receive the returning items
*/
class PlannedSalesReturn extends Model
{
use Query\Findable;
use Persistance\Storable;

protected $primaryKey = 'PlannedSalesReturnID';

protected $fillable = [
'PlannedSalesReturnID',
'Created',
'Creator',
'CreatorFullName',
'DeliveredTo',
'DeliveredToContactPerson',
'DeliveredToContactPersonFullName',
'DeliveredToName',
'DeliveryAddress',
'Description',
'Division',
'Document',
'DocumentSubject',
'Modified',
'Modifier',
'ModifierFullName',
'PlannedSalesReturnLines',
'Remarks',
'ReturnDate',
'ReturnNumber',
'Source',
'Status',
'Warehouse',
'WarehouseCode',
'WarehouseDescription',
];

protected $url = 'salesorder/PlannedSalesReturns';
}
5 changes: 5 additions & 0 deletions tests/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,11 @@ public function testPlannedSalesReturnLineEntity()
$this->performEntityTest(\Picqer\Financials\Exact\PlannedSalesReturnLine::class);
}

public function testPlannedSalesReturnEntity()
{
$this->performEntityTest(\Picqer\Financials\Exact\PlannedSalesReturn::class);
}

public function testPreferredMailboxForOperationEntity()
{
$this->performEntityTest(\Picqer\Financials\Exact\PreferredMailboxForOperation::class);
Expand Down

0 comments on commit 89940b5

Please sign in to comment.