123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\common\enum;
-
-
- class OrderInvoiceEnum
- {
-
-
- const TYPE_NORMAL = 0;
- const TYPE_SPEC = 1;
-
-
-
- const HEADER_TYPE_PERSONAL = 0;
- const HEADER_TYPE_COMPANY = 1;
-
-
-
- const STATUS_NO = 0;
- const STATUS_YES = 1;
-
-
-
- public static function getStatusDesc($status = true)
- {
- $desc = [
- self::STATUS_NO => '未开票',
- self::STATUS_YES => '已开票',
- ];
-
- if ($status === true) {
- return $status;
- }
-
- return isset($desc[$status]) ? $desc[$status] : $status;
- }
-
-
-
-
- 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;
- }
-
-
-
-
-
- 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;
- }
-
- }
|