BalanceShopDeductionSetting.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2021/4/21
  6. * Time: 10:28
  7. */
  8. namespace app\frontend\modules\finance\deduction\deductionSettings;
  9. use app\frontend\modules\deduction\DeductionSettingInterface;
  10. class BalanceShopDeductionSetting implements DeductionSettingInterface
  11. {
  12. public function getWeight()
  13. {
  14. return 50;
  15. }
  16. // todo 将运费抵扣分离出去
  17. public function isEnableDeductDispatchPrice()
  18. {
  19. return \Setting::get('finance.balance.balance_deduct_freight')?true:false;
  20. }
  21. public function isMaxDisable()
  22. {
  23. return !\Setting::get('finance.balance.balance_deduct');
  24. }
  25. public function isMinDisable()
  26. {
  27. return true;
  28. }
  29. /**
  30. * 不抵扣运费
  31. * @return bool
  32. */
  33. public function isDispatchDisable()
  34. {
  35. return true;
  36. }
  37. public function getMaxFixedAmount()
  38. {
  39. return false;
  40. }
  41. public function getMaxPriceProportion()
  42. {
  43. return \Setting::get('finance.balance.money_max')?:false;
  44. }
  45. public function getMaxDeductionType()
  46. {
  47. return 'GoodsPriceProportion';
  48. }
  49. public function getDeductionAmountType()
  50. {
  51. return 0;
  52. }
  53. public function getMinDeductionType()
  54. {
  55. return false;
  56. }
  57. public function getMinFixedAmount()
  58. {
  59. return false;
  60. }
  61. public function getMinPriceProportion()
  62. {
  63. return \Setting::get('finance.balance.money_min')?:false;
  64. }
  65. public function getAffectDeductionAmount()
  66. {
  67. return false;
  68. }
  69. }