'未开票', self::STATUS_YES => '已开票', ]; if ($status === true) { return $status; } return isset($desc[$status]) ? $desc[$status] : $status; } /** * @notes 获取类型描述 * @param bool $type * @return bool|mixed|string * @author 段誉 * @date 2022/4/12 9:14 */ public static function getTypeDesc($type = true) { $desc = [ self::TYPE_NORMAL => '电子普通发票', self::TYPE_SPEC => '专用发票', ]; if ($type === true) { return $type; } return isset($desc[$type]) ? $desc[$type] : $type; } /** * @notes 获取抬头类型描述 * @param bool $type * @return bool|mixed|string * @author 段誉 * @date 2022/4/12 9:14 */ public static function getHeaderTypeTextDesc($type = true) { $desc = [ self::HEADER_TYPE_PERSONAL => '个人', self::HEADER_TYPE_COMPANY => '企业', ]; if ($type === true) { return $type; } return isset($desc[$type]) ? $desc[$type] : $type; } }