mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-02 19:33:14 +03:00
v2.2.9
This commit is contained in:
parent
b64bb2599c
commit
b92579e515
@ -60,9 +60,18 @@ class RetailcrmInventoriesTest extends RetailcrmTestCase
|
|||||||
|
|
||||||
$product1Id = explode('#', $this->product1['id']);
|
$product1Id = explode('#', $this->product1['id']);
|
||||||
$product2Id = explode('#', $this->product2['id']);
|
$product2Id = explode('#', $this->product2['id']);
|
||||||
|
|
||||||
$prod1Quantity = StockAvailable::getQuantityAvailableByProduct($product1Id[0], $product1Id[1] );
|
if (isset($product1Id[1])){
|
||||||
$prod2Quantity = StockAvailable::getQuantityAvailableByProduct($product2Id[0], $product2Id[1] );
|
$prod1Quantity = StockAvailable::getQuantityAvailableByProduct($product1Id[0], $product1Id[1]);
|
||||||
|
} else {
|
||||||
|
$prod1Quantity = StockAvailable::getQuantityAvailableByProduct($product1Id[0], 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($product2Id[1])){
|
||||||
|
$prod2Quantity = StockAvailable::getQuantityAvailableByProduct($product2Id[0], $product2Id[1]);
|
||||||
|
} else {
|
||||||
|
$prod2Quantity = StockAvailable::getQuantityAvailableByProduct($product2Id[0], 0);
|
||||||
|
}
|
||||||
|
|
||||||
$this->assertEquals(self::PRODUCT1_QUANTITY, $prod1Quantity);
|
$this->assertEquals(self::PRODUCT1_QUANTITY, $prod1Quantity);
|
||||||
$this->assertEquals(self::PRODUCT2_QUANTITY, $prod2Quantity);
|
$this->assertEquals(self::PRODUCT2_QUANTITY, $prod2Quantity);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user