<!-- Edit Daily Expense Modal -->
<div class="modal fade" id="editExpenseModal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <form action="<?= base_url('admin/expense/edit') ?>" method="post">
      <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" 
             value="<?= $this->security->get_csrf_hash(); ?>" />
             
      <input type="hidden" name="daily_expense_id" id="edit-daily-expense-id">
      <input type="hidden" name="old_amount" id="edit-old-amount">

      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">Edit Expense</h5>
          <button type="button" class="close" data-dismiss="modal">&times;</button>
        </div>

        <div class="modal-body">
          <div class="form-group">
            <label>Date</label>
            <input type="date" name="date" id="edit-date" class="form-control" required>
          </div>

          <div class="form-group">
            <label>Rate</label>
            <input type="number" name="rate" id="edit-rate" class="form-control" required>
          </div>

          <div class="form-group">
            <label>Quantity</label>
            <input type="number" name="quantity" id="edit-quantity" class="form-control" required>
          </div>

          <div class="form-group">
            <label>Amount</label>
            <input type="number" name="amount" id="edit-amount" class="form-control">
          </div>

          <div class="form-group">
            <label>Note</label>
            <textarea name="note" id="edit-note" class="form-control"></textarea>
          </div>
        </div>

        <div class="modal-footer">
          <button type="submit" class="btn btn-success">Update</button>
          <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
        </div>
      </div>
    </form>
  </div>
</div>
