order item price float
This commit is contained in:
parent
0e8c9277ef
commit
2d317aa940
|
|
@ -149,7 +149,7 @@ class OrderItem extends ComponentBase
|
|||
if($orderItems[$x]->user_id != $user->id){
|
||||
$editBtnPrice = '<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 = '<a href="#" >';
|
||||
|
||||
|
|
@ -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).' $</a>'
|
||||
style="font-size: 14px;">'.number_format($orderItems[$x]->price, 4).' $</a>'
|
||||
:
|
||||
|
||||
'<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"
|
||||
data-request-data="orderItemId: '.$orderItems[$x]->id.'"
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ function onStart(){
|
|||
$sumOfPrice = 0;
|
||||
|
||||
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["types"] = Romanah\Gokbakja\Models\BagType::get();
|
||||
|
|
@ -156,7 +156,7 @@ function onStart(){
|
|||
<div class="col">
|
||||
<div>
|
||||
<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">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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() {
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue