25 lines
780 B
PHP
25 lines
780 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\LingxingErp\Block\Adminhtml\Warehouse;
|
|
|
|
use Magento\Backend\Block\Widget\Button;
|
|
|
|
class InventorySyncButton extends Button
|
|
{
|
|
protected function _construct(): void
|
|
{
|
|
parent::_construct();
|
|
$this->setData([
|
|
'label' => __('Sync Inventory'),
|
|
'class' => 'secondary',
|
|
'style' => 'margin-left: 12px;',
|
|
'onclick' => sprintf(
|
|
'confirmSetLocation(%s, %s)',
|
|
json_encode((string)__('Synchronize product_valid_num for Sources assigned to Website Stocks now?'), JSON_HEX_APOS | JSON_HEX_QUOT),
|
|
json_encode($this->getUrl('esun_lingxing/warehouse/syncInventory'), JSON_HEX_APOS | JSON_HEX_QUOT)
|
|
),
|
|
]);
|
|
}
|
|
}
|