Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added GoodsReceipt and GoodsReceiptLine #232

Merged
merged 1 commit into from
Jan 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
73 changes: 73 additions & 0 deletions src/Picqer/Financials/Exact/GoodsReceipt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php

namespace Picqer\Financials\Exact;

/**
* Class GoodsReceipt
*
* @package Picqer\Financials\Exact
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=PurchaseOrderGoodsReceipts
*
* @property Guid $ID Primary key
* @property DateTime $Created Creation date
* @property Guid $Creator User ID of the creator
* @property String $CreatorFullName Name of the creator
* @property String $Description Description of the goods receipt
* @property Int32 $Division Division code
* @property Guid $Document Document that is linked to the goods receipt
* @property String $DocumentSubject Document subject
* @property Int32 $EntryNumber Entry number of the resulting stock entry
* @property GoodsReceiptLines $GoodsReceiptLines Collection of receipt lines
* @property DateTime $Modified Last modified date
* @property Guid $Modifier User ID of the last modifier
* @property String $ModifierFullName Name of the last modifier
* @property DateTime $ReceiptDate Date of the goods receipt
* @property Int32 $ReceiptNumber Receipt number
* @property String $Remarks Receipt note
* @property Guid $Supplier Account ID of the supplier
* @property String $SupplierCode Supplier code
* @property Guid $SupplierContact ID of the contact person at the supplier
* @property String $SupplierContactFullName Name of the contact person at the supplier
* @property String $SupplierName Supplier name
* @property Guid $Warehouse Warehouse ID
* @property String $WarehouseCode Warehouse code
* @property String $WarehouseDescription Description of the warehouse
* @property String $YourRef The purchase invoice number provided by the supplier
*/
class GoodsReceipt extends Model
{

use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
'Created',
'Creator',
'CreatorFullName',
'Description',
'Division',
'Document',
'DocumentSubject',
'EntryNumber',
'GoodsReceiptLines',
'Modified',
'Modifier',
'ModifierFullName',
'ReceiptDate',
'ReceiptNumber',
'Remarks',
'Supplier',
'SupplierCode',
'SupplierContact',
'SupplierContactFullName',
'SupplierName',
'Warehouse',
'WarehouseCode',
'WarehouseDescription',
'YourRef',
];

protected $url = 'purchaseorder/GoodsReceipts';

}
83 changes: 83 additions & 0 deletions src/Picqer/Financials/Exact/GoodsReceiptLine.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?php

namespace Picqer\Financials\Exact;

/**
* Class GoodsReceiptLine
*
* @package Picqer\Financials\Exact
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=PurchaseOrderGoodsReceiptLines
*
* @property Guid $ID Primary key
* @property StockBatchNumbers $BatchNumbers Collection of batch numbers
* @property DateTime $Created Creation date
* @property Guid $Creator User ID of the creator
* @property String $CreatorFullName Name of the creator
* @property String $Description Goods receipt line description
* @property Int32 $Division Division code
* @property Guid $GoodsReceiptID All the lines of a goods receipt have the same GoodsReceiptID
* @property Guid $Item ID of the received item
* @property String $ItemCode Code of the received item
* @property String $ItemDescription Item description
* @property String $ItemUnitCode Unit code of the purchase
* @property Int32 $LineNumber Line number
* @property Guid $Location ID of the storage location in the warehouse where the item is received
* @property String $LocationCode Code of the storage location in the warehouse where the item is received
* @property String $LocationDescription Description of the storage location in the warehouse where the item is received
* @property DateTime $Modified Last modified date
* @property Guid $Modifier User ID of the last modifier
* @property String $ModifierFullName Name of the last modifier
* @property String $Notes Notes
* @property Guid $Project Reference to project
* @property String $ProjectCode Project code
* @property String $ProjectDescription Project description
* @property Guid $PurchaseOrderID Reference to purchase order
* @property Guid $PurchaseOrderLineID ID of the purchase order line that is received
* @property Int32 $PurchaseOrderNumber Order number of the purchase order that is received
* @property Double $QuantityOrdered Quantity ordered
* @property Double $QuantityReceived Quantity received
* @property StockSerialNumbers $SerialNumbers Collection of serial numbers
* @property String $SupplierItemCode Supplier item code
*/
class GoodsReceiptLine extends Model
{

use Query\Findable;
use Persistance\Storable;

protected $fillable = [
'ID',
'BatchNumbers',
'Created',
'Creator',
'CreatorFullName',
'Description',
'Division',
'GoodsReceiptID',
'Item',
'ItemCode',
'ItemDescription',
'ItemUnitCode',
'LineNumber',
'Location',
'LocationCode',
'LocationDescription',
'Modified',
'Modifier',
'ModifierFullName',
'Notes',
'Project',
'ProjectCode',
'ProjectDescription',
'PurchaseOrderID',
'PurchaseOrderLineID',
'PurchaseOrderNumber',
'QuantityOrdered',
'QuantityReceived',
'SerialNumbers',
'SupplierItemCode',
];

protected $url = 'purchaseorder/GoodsReceiptLines';

}
10 changes: 10 additions & 0 deletions tests/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,16 @@ public function testSalesOrderIDEntity()
$this->performEntityTest(\Picqer\Financials\Exact\SalesOrderID::class);
}

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

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

protected function performEntityTest($entityName)
{
$reflectionClass = new ReflectionClass($entityName);
Expand Down