This commit is contained in:
Shohrat 2024-01-26 15:06:32 +05:00
parent d6e8b4ddc3
commit 24e9ca8ccd
2 changed files with 15 additions and 14 deletions

View File

@ -57,7 +57,7 @@ return [
'engine' => 'InnoDB', 'engine' => 'InnoDB',
'host' => 'localhost', 'host' => 'localhost',
'port' => 3306, 'port' => 3306,
'database' => 'gok_bakja_from_server', 'database' => 'gok_bakja_01_24',
'username' => 'root', 'username' => 'root',
'password' => 'bt110226', 'password' => 'bt110226',
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',

View File

@ -290,47 +290,48 @@ class Order extends ComponentBase
$mustPay = ''; $mustPay = '';
$mustPayCalc = number_format(($orderDatas[$x]->order_all_price - $orderDatas[$x]->all_payments), 2); $mustPayCalc = number_format(($orderDatas[$x]->order_all_price - $orderDatas[$x]->all_payments), 2);
$mustPayCalcQQ = ($orderDatas[$x]->order_all_price - $orderDatas[$x]->all_payments);
if($mustPayCalc < 0){ if($mustPayCalcQQ < 0){
$mustPay = 'artykmaç '.abs($mustPayCalc).' $'; $mustPay = 'artykmaç '.abs($mustPayCalc).' $';
}else if($mustPayCalc == 0){ }else if($mustPayCalcQQ == 0){
$mustPay = ''; $mustPay = '';
} else{ } else{
$mustPay = $mustPayCalc.' $'; $mustPay = $mustPayCalc.' $';
} }
if($orderDatas[$x]->shippingTransport == null){ if($orderDatas[$x]->shippingTransport == null){
$shippingDate = ''; $shippingDate = '';
$status = ''; $status = '';
}else{ }else{
$shippingDate = Carbon::parse($orderDatas[$x]->shippingTransport->date)->format('d.m.Y') ?? ''; $shippingDate = Carbon::parse($orderDatas[$x]->shippingTransport->date)->format('d.m.Y') ?? '';
if ($orderDatas[$x]->shippingTransport->status == "loaded") { if ($orderDatas[$x]->shippingTransport->status == "loaded") {
$status = '<span class="badge badge-soft-info" $status = '<span class="badge badge-soft-info"
style="font-size: 14px;">ÝÜKLENDI</span>'; style="font-size: 14px;">ÝÜKLENDI</span>';
} }
if ($orderDatas[$x]->shippingTransport->status == "loading") { if ($orderDatas[$x]->shippingTransport->status == "loading") {
$status = '<span class="badge badge-soft-primary" $status = '<span class="badge badge-soft-primary"
style="font-size: 14px;">ÝÜKLENÝÄR</span>'; style="font-size: 14px;">ÝÜKLENÝÄR</span>';
} }
if ($orderDatas[$x]->shippingTransport->status == "proccess") { if ($orderDatas[$x]->shippingTransport->status == "proccess") {
$status = '<span class="badge badge-soft-warning" $status = '<span class="badge badge-soft-warning"
style="font-size: 14px;">ÝOLDA</span>'; style="font-size: 14px;">ÝOLDA</span>';
} }
if ($orderDatas[$x]->shippingTransport->status == "complated") { if ($orderDatas[$x]->shippingTransport->status == "complated") {
$status = '<span class="badge badge-soft-success" $status = '<span class="badge badge-soft-success"
style="font-size: 14px;">TAMAMLANDY</span>'; style="font-size: 14px;">TAMAMLANDY</span>';
} }
} }
$html_data .= '<tr> $html_data .= '<tr>
<td style="font-weight: bold;">' . ($x + 1) . '</td> <td style="font-weight: bold;">' . ($x + 1) . '</td>
<td><a href="/order-detail/' . $orderDatas[$x]->id . '" style="font-weight: bold;">Sargyt #' . $orderDatas[$x]->id . '</a></td> <td><a href="/order-detail/' . $orderDatas[$x]->id . '" style="font-weight: bold;">Sargyt #' . $orderDatas[$x]->id . '</a></td>