From 2d317aa94061f1885bf87f1ded0fbfbab62c7e7a Mon Sep 17 00:00:00 2001 From: Shohrat Date: Thu, 28 Dec 2023 11:37:35 +0500 Subject: [PATCH] order item price float --- plugins/romanah/gokbakja/components/OrderItem.php | 6 +++--- themes/gokbakja/pages/orders/order-detail.htm | 6 +++--- themes/gokbakja/pages/production/daily-seperate.htm | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/romanah/gokbakja/components/OrderItem.php b/plugins/romanah/gokbakja/components/OrderItem.php index 2fe21b0..9c272e6 100644 --- a/plugins/romanah/gokbakja/components/OrderItem.php +++ b/plugins/romanah/gokbakja/components/OrderItem.php @@ -149,7 +149,7 @@ class OrderItem extends ComponentBase if($orderItems[$x]->user_id != $user->id){ $editBtnPrice = ''.number_format($orderItems[$x]->price, 2).' $'; + style="font-size: 14px;">'.number_format($orderItems[$x]->price, 4).' $'; $editAmount = ''; @@ -159,11 +159,11 @@ class OrderItem extends ComponentBase data-request-data="orderItemId: '.$orderItems[$x]->id.'" data-bs-toggle="modal" data-bs-target=".bs-example-modal-sm-1" class="badge badge-soft-success" - style="font-size: 14px;">'.number_format($orderItems[$x]->price, 2).' $' + style="font-size: 14px;">'.number_format($orderItems[$x]->price, 4).' $' : ''.number_format($orderItems[$x]->price, 2).' $'; + style="font-size: 14px;">'.number_format($orderItems[$x]->price, 4).' $'; $editAmount = $crudOrderq ? 'amount * $orderItems[$x]->price)); + $sumOfPrice = (float)((float)$sumOfPrice + (float)($orderItems[$x]->amount * (float)$orderItems[$x]->price)); } - $this["sumOfPrice"] = $sumOfPrice; + $this["sumOfPrice"] = (float)$sumOfPrice; $this["sizes"] = Romanah\Gokbakja\Models\BagSize::get(); $this["types"] = Romanah\Gokbakja\Models\BagType::get(); @@ -156,7 +156,7 @@ function onStart(){
-
diff --git a/themes/gokbakja/pages/production/daily-seperate.htm b/themes/gokbakja/pages/production/daily-seperate.htm index 521e8bf..137fc54 100644 --- a/themes/gokbakja/pages/production/daily-seperate.htm +++ b/themes/gokbakja/pages/production/daily-seperate.htm @@ -8,6 +8,7 @@ function onStart() { $currentDate = Carbon\Carbon::now(); $this["month"] = $this->param("month"); $year = $this->param("year"); + $this["year"] = $currentDate->year; @@ -107,7 +108,7 @@ function onStart() {
-

Aýlar Boýunça {{year}}

+

Aýlar Boýunça Ulanylan Çig Mallar ({{year}})