Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.2-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #21589: [Backport] Issue fixed #20128 : Date range returns the same start and end date (by @mage2pratik)
 - #21080: [Backport] A non-numeric value encountered on mass product update when.. (by @Nazar65)


Fixed GitHub Issues:
 - #20128: Magento\Reports\Model\ResourceModel\Order\Collection->getDateRange() - Error in code? (reported by @realJustmike) has been fixed in #21589 by @mage2pratik in 2.2-develop branch
   Related commits:
     1. 8874332
     2. a75958f

 - #21073: A non-numeric value encountered on mass product update when Minimum Qty Allowed in Shopping Cart is used (reported by @kamilszewczyk) has been fixed in #21080 by @Nazar65 in 2.2-develop branch
   Related commits:
     1. 9d858b3
     2. ca72609
     3. f31e7f0
  • Loading branch information
magento-engcom-team authored Mar 15, 2019
2 parents ae9cd83 + 1df10d8 commit 71e61a7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public function getFieldSuffix()
* Retrieve current store id
*
* @return int
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getStoreId()
{
$storeId = $this->getRequest()->getParam('store');
return (int)$storeId;
return (int)$this->getRequest()->getParam('store');
}

/**
Expand All @@ -99,6 +99,8 @@ public function getTabLabel()
}

/**
* Return Tab title.
*
* @return \Magento\Framework\Phrase
*/
public function getTabTitle()
Expand All @@ -107,22 +109,24 @@ public function getTabTitle()
}

/**
* @return bool
* @inheritdoc
*/
public function canShowTab()
{
return true;
}

/**
* @return bool
* @inheritdoc
*/
public function isHidden()
{
return false;
}

/**
* Get availability status.
*
* @param string $fieldName
* @return bool
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
});
</script>

<?php
$defaultMinSaleQty = $block->getDefaultConfigValue('min_sale_qty');
if (!is_numeric($defaultMinSaleQty)) {
$defaultMinSaleQty = json_decode($defaultMinSaleQty, true);
$defaultMinSaleQty = (float) $defaultMinSaleQty[\Magento\Customer\Api\Data\GroupInterface::CUST_GROUP_ALL] ?? 1;
}
?>
<div class="fieldset-wrapper form-inline advanced-inventory-edit">
<div class="fieldset-wrapper-title">
<strong class="title">
Expand Down Expand Up @@ -132,7 +139,7 @@
<div class="field">
<input type="text" class="input-text validate-number" id="inventory_min_sale_qty"
name="<?= /* @escapeNotVerified */ $block->getFieldSuffix() ?>[min_sale_qty]"
value="<?= /* @escapeNotVerified */ $block->getDefaultConfigValue('min_sale_qty') * 1 ?>"
value="<?= /* @escapeNotVerified */ $defaultMinSaleQty ?>"
disabled="disabled"/>
</div>
<div class="field choice">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public function getDateRange($range, $customStart, $customEnd, $returnObjects =
break;

case 'custom':
$dateStart = $customStart ? $customStart : $dateEnd;
$dateStart = $customStart ? $customStart : $dateStart;
$dateEnd = $customEnd ? $customEnd : $dateEnd;
break;

Expand Down

0 comments on commit 71e61a7

Please sign in to comment.