ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Lts\Customer\Helper;
|
||||
|
||||
class NetsuiteStage extends \Magento\Framework\App\Helper\AbstractHelper
|
||||
{
|
||||
/**
|
||||
* from Netsuite, given by client
|
||||
*/
|
||||
const NETSUITE_STAGES = [
|
||||
'lead' => [6, 7, 17, 18],
|
||||
'prospect' => [8, 10],
|
||||
'customer' => [13, 15, 20, 21, 22, 23],
|
||||
];
|
||||
|
||||
/**
|
||||
* @param int $netsuiteStageId
|
||||
* @return string|null
|
||||
*/
|
||||
public static function getNetsuiteStageCode(int $netsuiteStageId): ?string
|
||||
{
|
||||
foreach (self::NETSUITE_STAGES as $code => $stagesId) {
|
||||
if (in_array($netsuiteStageId, $stagesId)) {
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user