@php
use App\ProductModel;
/**
* @var ProductModel $item
*/
@endphp
@if(isset($item->can_use_discount_coupon))
@if($item->can_use_discount_coupon === 0 || $item->use_discount === 0)
{{__('no-discount')}}
@elseif(
!is_null($item->use_discount)
&& $item->use_discount < 100
&& $item->use_discount > 0
&& $item->use_discount < ($discountPercentage ?? 0)
)
{{__('limited-discount', [
'discount' => __('discount-value', [
'discountValue' => (($lang ?? 'zh') == 'en')
? number_format($item->use_discount, 0)
: str_replace('.0', '', number_format((100 - $item->use_discount) / 10, 1))
])
])}}
@endif
@endif