Skip to content

Commit

Permalink
Merge pull request #83 from matiosfree/inventoryposition
Browse files Browse the repository at this point in the history
Добавление позиций инвентаризации и баг фикс для прайслиста.
  • Loading branch information
tooyz authored Dec 9, 2020
2 parents 97b1d62 + a0ab1d1 commit 1fe8fe8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Components/MutationBuilders/AbstractMutationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
use MoySklad\Entities\Documents\Payments\PaymentIn;
use MoySklad\Entities\Documents\Payments\PaymentOut;
use MoySklad\Entities\Documents\Positions\CustomerOrderPosition;
use MoySklad\Entities\Documents\Positions\InventoryPosition;
use MoySklad\Entities\Documents\Positions\EnterPosition;
use MoySklad\Entities\Documents\Positions\LossPosition;
use MoySklad\Entities\Documents\Positions\MovePosition;
use MoySklad\Entities\Documents\RetailShift;
use MoySklad\Entities\Documents\PriceList;
use MoySklad\Entities\Documents\PriceLists\PriceList;
use MoySklad\Entities\Documents\Processings\Processing;
use MoySklad\Entities\Documents\Processings\ProcessingOrder;
use MoySklad\Entities\Documents\Processings\ProcessingPlan;
Expand Down Expand Up @@ -372,6 +373,16 @@ public function addCustomerOrderPosition(CustomerOrderPosition $customerOrderPos
return $this->simpleLink($customerOrderPosition, $specs);
}

/**
* @param InventoryPosition $inventoryPosition
* @param LinkingSpecs|null $specs
* @return AbstractMutationBuilder
* @throws \Exception
*/
public function addInventoryPosition(InventoryPosition $inventoryPosition, LinkingSpecs $specs = null){
return $this->simpleLink($inventoryPosition, $specs);
}

/**
* @param EnterPosition $enterPosition
* @param LinkingSpecs|null $specs
Expand Down
7 changes: 7 additions & 0 deletions src/Entities/Documents/Positions/InventoryPosition.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace MoySklad\Entities\Documents\Positions;

class InventoryPosition extends AbstractPosition {
public static $entityName = 'inventoryposition';
}
2 changes: 2 additions & 0 deletions src/Registers/EntityRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use MoySklad\Entities\Documents\Orders\PurchaseOrder;
use MoySklad\Entities\Documents\Positions\AbstractPosition;
use MoySklad\Entities\Documents\Positions\CustomerOrderPosition;
use MoySklad\Entities\Documents\Positions\InventoryPosition;
use MoySklad\Entities\Documents\Positions\DemandPosition;
use MoySklad\Entities\Documents\Positions\EnterPosition;
use MoySklad\Entities\Documents\Positions\LossPosition;
Expand Down Expand Up @@ -127,6 +128,7 @@ class EntityRegistry extends AbstractSingleton{
EnterPosition::class,
MovePosition::class,
CustomerOrderPosition::class,
InventoryPosition::class,
DemandPosition::class,
SupplyPosition::class,
SalesReturnPosition::class,
Expand Down

0 comments on commit 1fe8fe8

Please sign in to comment.