invoice fx

This commit is contained in:
merdan 2022-11-17 15:03:57 +05:00
parent 79c1183612
commit 2e5ab35b1c
2 changed files with 4 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class CartResource extends JsonResource
$ruleResources = array();
if($this->applied_cart_rule_ids){
$rule_ids =implode(',',$this->applied_cart_rule_ids);
$rule_ids =explode(',',$this->applied_cart_rule_ids);
$cols = ['id','name','description','action_type','amount'];
$cartRules = $this->cartRuleRepository->findWhereIn('applied_cart_rule_ids',$rule_ids,$cols);

View File

@ -18,7 +18,9 @@ class CartRuleResource extends JsonResource
'name' => $this->name,
'description' => $this->description,
'action_type' => $this->action_type,
'amount' => str_contains($this->action_type,'fixed')? core()->formatPrice($this->discount_amount, $this->currency):$this->discount_amount.'%'
'amount' => str_contains($this->action_type,'fixed')?
core()->formatPrice($this->discount_amount, $this->currency):
$this->discount_amount.'%'
];
}