Files
OMS/app/erpapi/lib/wms/ftp/response/reship.php
2025-12-28 23:13:25 +08:00

40 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
/**
* 退货单
*
* @category
* @package
* @author chenping<chenping@shopex.cn>
* @version $Id: Z
*/
class erpapi_wms_ftp_response_reship extends erpapi_wms_response_reship
{
/**
* status_update
* @param mixed $params 参数
* @return mixed 返回值
*/
public function status_update($params){
$params = parent::status_update($params);
if ($params['items']){
foreach ((array) $params['items'] as $key=>$item){
$barcode = $item['bn'] ? $item['bn'] : $item['product_bn'];
// 条码转货号
if ($barcode) {
$bn = kernel::single('material_codebase')->getBnBybarcode($barcode);
$params['items'][$key]['bn'] = $params['items'][$key]['product_bn'] = $bn ? $bn : $barcode;
}
}
}
return $params;
}
}