Skip to content

Commit

Permalink
deperndant select perf. fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alkadoHs committed Feb 15, 2024
1 parent 121b90c commit 2efa163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Filament/Resources/OrderResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function () {
return $set('price', $state == 'R' ? VendorProduct::with('product.mainProduct')->where('id',$get('product_id'))->first()->product->mainProduct?->retail_price?? 0 :
VendorProduct::with('product.mainProduct')->where('id', $get('product_id'))->first()->product->mainProduct?->whole_price?? 0);

return $set('price', $state == 'R' ? Product::find($get('product_id'))->mainProduct?->retail_price?? 0 :
return $set('price', $state == 'R' ? Product::with('mainProduct')->where('id',$get('product_id'))->first()->mainProduct?->retail_price?? 0 :
Product::find($get('product_id'))->mainProduct?->whole_price?? 0);
})
->required(),
Expand Down

0 comments on commit 2efa163

Please sign in to comment.