@include('admin::layouts.header')
<main id="main-container">
        <!-- Hero -->
        <div class="bg-body-light">
          <div class="content content-full">
            <div class="d-flex flex-column flex-sm-row justify-content-sm-between align-items-sm-center">
              <h1 class="flex-grow-1 fs-3 fw-semibold my-2 my-sm-3">Shift Out</h1>
              <nav class="flex-shrink-0 my-2 my-sm-0 ms-sm-3" aria-label="breadcrumb">
                <ol class="breadcrumb">
                  <li class="breadcrumb-item">Dashboard</li>
                  <li class="breadcrumb-item">Users</li>
                  <li class="breadcrumb-item active" aria-current="page">Shift Out</li>
                </ol>
              </nav>
            </div>
          </div>
        </div>
        <!-- END Hero -->

        <!-- Page Content -->
        <div class="content">
          <!-- Your Block -->
          <div class="block block-rounded">
            <div class="block-header block-header-default">
              <h3 class="block-title">Shift Out</h3>
            </div>
            <div class="block-content">
            @if(Session::has('success')) <div class="alert alert-success mt-2 mb-2">{{ Session::get('success') }}</div>@endif
            @if(Session::has('fail')) <div class="alert alert-danger mt-2 mb-2">{{ Session::get('fail') }}</div>@endif
            <form class="row" action="" method="POST" data-parsley-validate onsubmit="return confirm('Are you sure you want to shift out with the entered closing balance?');">
            @csrf
           
                    <div class="col-md-12 mb-3">
                    <h3 class="fw-bold">Your balance should be</h3>
                    <h1 class="fw-bold">LKR {{number_format($balance)}}</h1>
                    </div>
                    <div class="col-md-6 mb-3">
                      <label class="form-label">Closing Balance</label>
                      <input type="number" class="form-control" name="closing_balance" required value="0">
                      @if($errors->has("closing_balance")) <div class="alert alert-danger mt-2">{{ $errors->first('closing_balance') }}</div>@endif
                    </div>
                    <div class="col-md-12 mb-3">
                      <label class="form-label">Remarks</label>
                      <textarea  class="form-control" name="remarks" rows="5"></textarea>
                      @if($errors->has("remarks")) <div class="alert alert-danger mt-2">{{ $errors->first('remarks') }}</div>@endif
                    </div>
                    <div>
                      <button type="submit" class="btn btn-primary">Shift Out</button>
                    </div>
                  </form>
            </div>
          </div>
          <!-- END Your Block -->
        </div>
        <!-- END Page Content -->
</main>
<!-- END Main Container -->
@include('admin::layouts.footer')