This commit is contained in:
Shohrat 2024-01-18 11:21:08 +05:00
commit 0dcbcba626
3 changed files with 8 additions and 7 deletions

View File

@ -149,7 +149,7 @@ class OrderItem extends ComponentBase
if($orderItems[$x]->user_id != $user->id){ if($orderItems[$x]->user_id != $user->id){
$editBtnPrice = '<a href="#" $editBtnPrice = '<a href="#"
class="badge badge-soft-success" class="badge badge-soft-success"
style="font-size: 14px;">'.number_format($orderItems[$x]->price, 2).' $</a>'; style="font-size: 14px;">'.number_format($orderItems[$x]->price, 4).' $</a>';
$editAmount = '<a href="#" >'; $editAmount = '<a href="#" >';
@ -159,11 +159,11 @@ class OrderItem extends ComponentBase
data-request-data="orderItemId: '.$orderItems[$x]->id.'" data-request-data="orderItemId: '.$orderItems[$x]->id.'"
data-bs-toggle="modal" data-bs-target=".bs-example-modal-sm-1" data-bs-toggle="modal" data-bs-target=".bs-example-modal-sm-1"
class="badge badge-soft-success" class="badge badge-soft-success"
style="font-size: 14px;">'.number_format($orderItems[$x]->price, 2).' $</a>' style="font-size: 14px;">'.number_format($orderItems[$x]->price, 4).' $</a>'
: :
'<a href="#" class="badge badge-soft-success" '<a href="#" class="badge badge-soft-success"
style="font-size: 14px;">'.number_format($orderItems[$x]->price, 2).' $</a>'; style="font-size: 14px;">'.number_format($orderItems[$x]->price, 4).' $</a>';
$editAmount = $crudOrderq ? '<a href="#" data-request="onModalSetAmount" $editAmount = $crudOrderq ? '<a href="#" data-request="onModalSetAmount"
data-request-data="orderItemId: '.$orderItems[$x]->id.'" data-request-data="orderItemId: '.$orderItems[$x]->id.'"

View File

@ -32,10 +32,10 @@ function onStart(){
$sumOfPrice = 0; $sumOfPrice = 0;
for ($x = 0; $x < count($orderItems); $x++) { for ($x = 0; $x < count($orderItems); $x++) {
$sumOfPrice = ($sumOfPrice + ($orderItems[$x]->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["sizes"] = Romanah\Gokbakja\Models\BagSize::get();
$this["types"] = Romanah\Gokbakja\Models\BagType::get(); $this["types"] = Romanah\Gokbakja\Models\BagType::get();
@ -156,7 +156,7 @@ function onStart(){
<div class="col"> <div class="col">
<div> <div>
<label class="form-label">Bahasy</label> <label class="form-label">Bahasy</label>
<input type="number" name="price" step="0.01" class="form-control" <input type="number" name="price" step="0.0001" class="form-control"
placeholder="Bahasy"> placeholder="Bahasy">
</div> </div>
</div> </div>

View File

@ -8,6 +8,7 @@ function onStart() {
$currentDate = Carbon\Carbon::now(); $currentDate = Carbon\Carbon::now();
$this["month"] = $this->param("month"); $this["month"] = $this->param("month");
$year = $this->param("year"); $year = $this->param("year");
$this["year"] = $currentDate->year;
@ -107,7 +108,7 @@ function onStart() {
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="page-title-box d-flex align-items-center justify-content-between"> <div class="page-title-box d-flex align-items-center justify-content-between">
<h4 class="mb-0">Aýlar Boýunça {{year}}</h4> <h4 class="mb-0">Aýlar Boýunça Ulanylan Çig Mallar ({{year}})</h4>
</div> </div>
</div> </div>