CheckInvoice.php 758 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: shenyang
  5. * Date: 2018/8/1
  6. * Time: 下午6:43
  7. */
  8. namespace app\frontend\modules\order\operations\member;
  9. use app\frontend\modules\order\operations\OrderOperation;
  10. class CheckInvoice extends OrderOperation
  11. {
  12. public function getApi()
  13. {
  14. return 'order.operation.check-invoice';
  15. }
  16. public function getName()
  17. {
  18. return '查看发票';
  19. }
  20. public function getValue()
  21. {
  22. return static::CHECK_INVOICE;
  23. }
  24. public function enable()
  25. {
  26. $trade = \Setting::get('shop.trade')['invoice'];
  27. if (is_null($this->order->orderInvoice) || empty($this->order->orderInvoice->collect_name)) {
  28. return false;
  29. }
  30. return true;
  31. }
  32. }