File manager - Edit - /home/webapp69.cm.in.th/u69319090039/Shop39/app/Views/seller/payment/wallet.php
Back
<div class="d-flex justify-content-between align-items-center mb-4 flex-wrap gap-2"> <div> <h4 class="fw-bold m-0"><i class="bi bi-wallet2 text-primary me-2"></i>ยอดเงินร้านค้าและการถอนเงิน (Seller Wallet)</h4> <p class="text-muted small mb-0">ตรวจสอบรายได้จากการขาย ยอดเงินที่สามารถถอนได้ และส่งคำขอถอนเงินเข้าบัญชีธนาคาร</p> </div> <div> <button type="button" class="btn btn-success rounded-pill px-4 py-2 fw-bold shadow-sm" data-bs-toggle="modal" data-bs-target="#payoutRequestModal" <?= $availableBalance <= 0 ? 'disabled' : '' ?>> <i class="bi bi-cash-stack me-1"></i>ขอถอนเงิน (Request Payout) </button> </div> </div> <!-- Financial Summary Cards --> <div class="row g-3 mb-4"> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-4 p-4 text-white" style="background: linear-gradient(135deg, #212529 0%, #343a40 100%);"> <div class="d-flex justify-content-between align-items-center mb-2"> <span class="text-white-50 fw-bold small">ยอดขายทั้งหมด</span> <i class="bi bi-graph-up-arrow text-white-50 fs-4"></i> </div> <h3 class="fw-bold m-0">฿<?= number_format($totalSales, 2) ?></h3> <div class="small text-white-50 mt-2">ยอดจากออเดอร์ที่จัดส่งสำเร็จ</div> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-4 p-4 text-dark" style="background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);"> <div class="d-flex justify-content-between align-items-center mb-2"> <span class="text-dark fw-bold small">รอโอน (กำลังดำเนินการ)</span> <i class="bi bi-hourglass-split text-dark fs-4"></i> </div> <h3 class="fw-bold m-0">฿<?= number_format($pendingPayout, 2) ?></h3> <div class="small text-dark-50 mt-2">อยู่ระหว่างการตรวจสอบ/โอน</div> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-4 p-4 text-white" style="background: linear-gradient(135deg, #198754 0%, #157347 100%);"> <div class="d-flex justify-content-between align-items-center mb-2"> <span class="text-white-50 fw-bold small">ยอดเงินที่โอนได้ (พร้อมถอน)</span> <i class="bi bi-cash text-white-50 fs-4"></i> </div> <h3 class="fw-bold m-0">฿<?= number_format($availableBalance, 2) ?></h3> <div class="small text-white-50 mt-2">สามารถส่งคำขอถอนเงินได้ทันที</div> </div> </div> <div class="col-md-3"> <div class="card border-0 shadow-sm rounded-4 p-4 text-white" style="background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);"> <div class="d-flex justify-content-between align-items-center mb-2"> <span class="text-white-50 fw-bold small">โอนไปแล้ว (สำเร็จ)</span> <i class="bi bi-check-circle-fill text-white-50 fs-4"></i> </div> <h3 class="fw-bold m-0">฿<?= number_format($completedPayout, 2) ?></h3> <div class="small text-white-50 mt-2">ยอดเงินที่แอดมินโอนให้แล้ว</div> </div> </div> </div> <!-- Payout History Table --> <div class="card border-0 shadow-sm rounded-4"> <div class="card-body p-4"> <h5 class="fw-bold mb-3 text-dark"><i class="bi bi-clock-history text-primary me-2"></i>ประวัติการขอถอนเงิน</h5> <?php if (empty($payoutHistory)): ?> <div class="text-center py-5 text-muted"> <i class="bi bi-inbox fs-1 d-block mb-2 text-secondary opacity-50"></i> <p class="mb-0">ยังไม่มีประวัติการขอถอนเงิน</p> </div> <?php else: ?> <div class="table-responsive"> <table class="table table-hover align-middle mb-0"> <thead class="table-light border-bottom"> <tr> <th class="ps-3">วันที่ทำรายการ</th> <th>จำนวนเงิน</th> <th>บัญชีปลายทาง</th> <th>สถานะ</th> <th>เลขอ้างอิงการโอน</th> <th>หมายเหตุจากผู้ดูแลระบบ</th> </tr> </thead> <tbody> <?php foreach ($payoutHistory as $p): ?> <tr> <td class="ps-3 text-muted small"><?= date('d/m/Y H:i', strtotime($p['created_at'])) ?></td> <td class="fw-bold text-dark fs-6">฿<?= number_format($p['amount'], 2) ?></td> <td> <div class="small fw-semibold"><?= Security::e($p['bank_name'] ?? 'Bank') ?>: <?= Security::e($p['bank_account'] ?? '-') ?></div> <?php if (!empty($p['promptpay_number'])): ?> <div class="small text-muted">PromptPay: <?= Security::e($p['promptpay_number']) ?></div> <?php endif; ?> </td> <td> <?php if ($p['status'] === 'completed'): ?> <span class="badge bg-success rounded-pill px-3 py-2"><i class="bi bi-check-circle me-1"></i>โอนสำเร็จ (Completed)</span> <?php elseif ($p['status'] === 'processing'): ?> <span class="badge bg-primary rounded-pill px-3 py-2"><i class="bi bi-arrow-repeat me-1"></i>กำลังโอน (Processing)</span> <?php elseif ($p['status'] === 'rejected'): ?> <span class="badge bg-danger rounded-pill px-3 py-2"><i class="bi bi-x-circle me-1"></i>ปฏิเสธ (Rejected)</span> <?php else: ?> <span class="badge bg-warning text-dark rounded-pill px-3 py-2"><i class="bi bi-clock me-1"></i>รออนุมัติ (Pending)</span> <?php endif; ?> </td> <td> <span class="small font-monospace text-primary"><?= Security::e($p['transaction_reference'] ?? '-') ?></span> </td> <td class="small text-muted"> <?= Security::e($p['admin_note'] ?? '-') ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php endif; ?> </div> </div> <!-- Modal Request Payout --> <div class="modal fade" id="payoutRequestModal" tabindex="-1" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content border-0 shadow-lg rounded-4 overflow-hidden"> <div class="modal-header bg-success text-white py-3"> <h5 class="modal-title fw-bold"><i class="bi bi-cash-stack me-2"></i>ส่งคำขอถอนเงิน</h5> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button> </div> <form action="<?= APP_URL ?>/seller/wallet/request-payout" method="POST"> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"> <div class="modal-body p-4"> <div class="alert alert-light border rounded-3 p-3 mb-3"> <div class="d-flex justify-content-between align-items-center mb-1"> <span class="text-muted small">ยอดเงินที่สามารถถอนได้:</span> <strong class="text-success fs-5">฿<?= number_format($availableBalance, 2) ?></strong> </div> <div class="text-muted small"> โอนเข้า: <strong><?= Security::e($paymentSettings['bank_name'] ?? 'ยังไม่ได้ตั้งค่า') ?> (<?= Security::e($paymentSettings['bank_account'] ?? '-') ?>)</strong> </div> </div> <div class="mb-3"> <label class="form-label fw-bold">จำนวนเงินที่ต้องการถอน (บาท) <span class="text-danger">*</span></label> <div class="input-group"> <span class="input-group-text bg-light">฿</span> <input type="number" step="0.01" min="1" max="<?= $availableBalance ?>" name="amount" class="form-control" placeholder="0.00" value="<?= $availableBalance ?>" required> </div> <div class="form-text text-muted">ระบบจะส่งข้อมูลไปยังทีมงานเพื่อตรวจสอบและทำการโอนเงินเข้าบัญชีของคุณ</div> </div> </div> <div class="modal-footer border-0 p-3 pt-0"> <button type="button" class="btn btn-outline-secondary rounded-pill px-4" data-bs-dismiss="modal">ยกเลิก</button> <button type="submit" class="btn btn-success rounded-pill px-4 fw-bold shadow-sm"> <i class="bi bi-check2-circle me-1"></i>ยืนยันคำขอถอนเงิน </button> </div> </form> </div> </div> </div>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings