<div class="modal fade" tabindex="-1" id="client_payment_add_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #36a3f7;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Receive Payment From Client
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="client_payment" id="form_client_payment_add" data-modal-id="client_payment_add_modal" method="post" action="<?php echo base_url().'accounts/create_transaction'?>" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_client_payment_add_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <?php if($this->config->item('Client_Payment_client_payment_invoice')==1) { ?>
            <div class="row">
              <div class="col-lg-6">
                <div class="m-form__group form-group" >
                  <label class="col-form-label">Payment Type</label>
                  <div class="m-radio-inline">
                    <label class="m-radio m-radio--solid m-radio--state-brand">
                      <input checked required type="radio" name="payment_type_add" value="invoice"> Invoice
                      <span></span>
                    </label>
                    <label class="m-radio m-radio--solid m-radio--state-success">
                      <input type="radio" name="payment_type_add" value="advance"> Advance
                      <span></span>
                    </label>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-6" style="display: none;" id="client_payment_invoice_div_add">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Invoice
                  </label>
                  <div class="m-select2 m-select2--air m-select2--pill">
                    <select required style="width: 100%" class="form-control m-select2 form_client_payment_add_select" id="client_payment_invoice_add"  name="invoice_id" data-placeholder="Select Invoices">
                      <option selected disabled>Select Invoices</option>
                      <?php
                      foreach($invoices as $row):
                        $invoice_no = '';
                        if($row->invoice_type=='proforma'){
                          $invoice_no .= $this->config->item('client_invoice_proforma_prefix');
                        }else{
                        if($row->tax_invoice==1){
                          if($row->business_type=='B2B'){
                            $invoice_no .= $this->config->item('client_invoice_tax_b2b_prefix');
                          }else{
                            $invoice_no .= $this->config->item('client_invoice_tax_b2c_prefix');
                          }
                        }else{
                          $invoice_no .= $this->config->item('client_invoice_prefix');
                        }
                      }
                        $invoice_no .= sprintf('%03u', $row->invoice_no);
                        $invoice_no .= $row->invoice_suffix;
                        ?>
                      <option value="<?php echo $row->invoice_id?>"><?php echo $invoice_no.' [#'.$row->invoice_id.']'?></option>
                      <?php
                    endforeach;
                    ?>
                  </select>
                </div>

                <span class="m-form__help"></span>
              </div>
            </div>
          </div>
        <?php } ?>
        <div class="row">
          <div class="col-lg-6" id="work_id_add">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Work Name
              </label>
              <?php if($page_name=='client_payments' || $page_name=='data_entry_approval'){?>
                <div class="m-select2 m-select2--air m-select2--pill" id="work_id_div_add">
                  <select required style="width: 100%" class="form-control m-select2 form_client_payment_add_select" id="client_payment_work_add"  name="work_id" data-placeholder="Select Work">
                    <option selected disabled>Select Work</option>
                    <?php
                    foreach($work_contracts as $row): ?>
                    <option data-work-status="<?php echo $row->work_status?>" value="<?php echo $row->work_id?>"><?php echo $row->work_name?></option>
                    <?php
                  endforeach;
                  ?>
                </select>
              </div>
            <?php }elseif($page_name=='work_profile' || $page_name=='projects_profile'){ ?>
              <div class="m-input-icon m-input-icon--right">
                <input value="<?php echo $work_data->work_name?>" type="text"  readonly class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1">
                <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
              </div>
            <?php } ?>
            <div class="m-input-icon m-input-icon--right" style="display: none" id="invoice_work_div_add">
              <input id="invoice_work_name_add" type="text"  readonly class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1">
              <input type="hidden" name="invoice_work_id" id="invoice_work_id_add">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-6">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Client Name
            </label>
            <div class="m-input-icon m-input-icon--right">
              <?php if($page_name=='client_payments' || $page_name=='invoices_view'){?>
                <input type="text" name="client_name" readonly class="form-control form_client_payment_add_fields m-input m-input--pill m-input--air" id="client_payment_client_name_add" aria-describedby="basic-addon1">
              <?php }elseif($page_name=='work_profile' || $page_name=='projects_profile'){ ?>
                <input value="<?php echo $work_data->client_name?>" type="text" name="client_name" readonly class="form-control m-input m-input--pill m-input--air" id="client_payment_client_name_add" aria-describedby="basic-addon1">
              <?php } ?>
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-user"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
      </div>
      <div class="row" id="tax_details_add_row">
        <div class="col-lg-3">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Tax Type
            </label>
            <div class="m-radio-inline" style="padding-top: 10px;">
              <label class="m-radio m-radio--solid m-radio--state-info">
                <input required type="radio" class="form_fields_radio form_client_tax_amount_add_fields"  name="tax_inclusive_add" value="1"> Included
                <span></span>
              </label>
              <label class="m-radio m-radio--solid m-radio--state-focus">
                <input required type="radio" class="form_fields_radio form_client_tax_amount_add_fields"  name="tax_inclusive_add" checked value="0"> Excluded
                <span></span>
              </label>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Taxable Amount
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input  required type="text" name="client_payment_taxable_amount" class="form-control form_client_tax_amount_add_fields m-input m-input--pill m-input--air form_client_payment_add_fields" id="client_payment_taxable_amount_add" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-2" >
          <div class="form-group m-form__group" >
            <label for="user_name">
              <?php echo $this->config->item('Tax_tax_name')?> %
            </label>
            <div class="m-select2 m-select2--air m-select2--pill ">
              <select required id="client_payment_tax_percent_add" name="client_payment_tax_percent" style="width: 100%" class="form-control m-input form_client_payment_add_select form_client_tax_amount_add_fields" aria-describedby="basic-addon1" data-placeholder="Select Tax Percentage">
                <?php
                $tax_percent = $this->config->item('Tax_tax_percent_old');
                foreach($tax_percent as $row):
                  $selected_tax='';
                  if($row==0){
                    $selected_tax='selected';
                  }
                  ?>
                  <option <?php echo $selected_tax?> value="<?php echo $row?>"><?php echo $row?>%</option>
                  <?php
                endforeach;
                ?>
              </select>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Tax Amount
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input  required type="text" name="client_payment_tax_amount" readonly class="form-control m-input m-input--pill m-input--air form_client_tax_amount_add_fields form_client_payment_add_fields" id="client_payment_tax_amount_add" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Received Amount
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input readonly required type="text" name="received_amount" id="client_payment_received_amount_add" class="form-control form_client_payment_add_fields form_client_tax_amount_add_fields m-input m-input--pill m-input--air" placeholder="Received Amount" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Received Date
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input  data-date-format="dd-mm-yyyy" id="client_payment_received_date_add" required type="text" name="received_date" class="form-control form_client_payment_add_fields m-input m-input--pill m-input--air" placeholder="Received Date" >
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Received To Acc
            </label>
            <div class="m-select2 m-select2--air m-select2--pill">
              <select required id="client_payment_acc_add" name="credit_acc" style="width: 100%" class="form-control m-input"  aria-describedby="basic-addon1">
                <?php
                foreach($this->config->item('account_heads') as $row):
                  $selected="";
                  if($row->acc_head_id==1){
                    $selected="selected";
                  }
                  ?>
                  <option <?php echo $selected?> value="<?php echo $row->acc_head_id?>"><?php echo $row->acc_head_name?></option>
                  <?php
                endforeach;
                ?>
              </select>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-lg-5">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Remarks
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input type="text" name="tr_remarks"  class="form-control form_client_payment_add_fields m-input m-input--pill m-input--air" placeholder="Remarks" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Receipt No
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input type="text" name="reference_no"  class="form-control form_client_payment_add_fields m-input m-input--pill m-input--air" placeholder="Receipt No" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Received From
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input type="text" name="received_from"  class="form-control form_client_payment_add_fields m-input m-input--pill m-input--air" placeholder="Received From" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Upload Receipt
            </label>
            <div class="custom-file">
              <input type="file" class="custom-file-input" name="uploaded_file" id="customFile">
              <label class="custom-file-label" for="customFile">Choose file</label>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <input type="hidden" name="client_id" id="client_payment_client_id_add" value="<?php if($page_name=='work_profile' || $page_name=='projects_profile'){ echo $work_data->client_id; }?>"/>
        <input type="hidden" name="tr_type" value="client_payment_transaction" id="tr_type_add_client_payment">
        <input type="hidden" name="reference_id" id="reference_id_add_client_payment" value="<?php if($page_name=='work_profile' || $page_name=='projects_profile'){ echo $work_data->work_id; }?>">
        <input type="hidden" name="reference_type" value="project" id="reference_type_add_client_payment">
        <input type="hidden" name="redirect_url" value="<?php echo base_url(uri_string())?>" >
      </div>
    </div>
    <div class="modal-footer">
      <button type="button" class="btn btn-secondary" data-dismiss="modal">
        Close
      </button>
      <button type="submit" class="btn form_submit_btn btn-primary">
        Submit
      </button>
    </div>
  </form>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" id="client_payment_edit_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Edit Client Payment Received
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="client_payment" id="form_client_payment_edit" data-modal-id="client_payment_edit_modal" method="post" action="<?php echo base_url().'accounts/update_transaction'?>" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_client_payment_edit_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <?php if($this->config->item('Client_Payment_client_payment_invoice')==1) { ?>
            <div class="row">
              <div class="col-lg-6">
                <div class="m-form__group form-group" >
                  <label class="col-form-label">Payment Type</label>
                  <div class="m-radio-inline">
                    <label class="m-radio m-radio--solid m-radio--state-brand">
                      <input required type="radio" name="payment_type_edit" value="invoice"> Invoice
                      <span></span>
                    </label>
                    <label class="m-radio m-radio--solid m-radio--state-success">
                      <input type="radio" name="payment_type_edit" value="advance"> Advance
                      <span></span>
                    </label>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-6" style="display: none;" id="client_payment_invoice_div_edit">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Invoice
                  </label>
                  <div class="m-select2 m-select2--air m-select2--pill">
                    <select required style="width: 100%" class="form-control m-select2 form_client_payment_add_select" id="client_payment_invoice_edit"  name="invoice_id" data-placeholder="Select Invoices">
                      <option selected disabled>Select Invoices</option>
                      <?php
                      foreach($invoices as $row): ?>
                      <option value="<?php echo $row->invoice_id?>"><?php echo '#'.$row->invoice_id?></option>
                      <?php
                    endforeach;
                    ?>
                  </select>
                </div>

                <span class="m-form__help"></span>
              </div>
            </div>
          </div>
        <?php } ?>
        <div class="row">
          <div class="col-lg-6"  >
            <div class="form-group m-form__group" >
              <label for="user_name">
                Work Name
              </label>
              <?php if($page_name=='client_payments' || $page_name=='data_entry_approval'){?>
                <div class="m-select2 m-select2--air m-select2--pill" id="work_id_div_edit">
                  <select required style="width: 100%" class="form-control m-select2 form_client_payment_edit_select" id="client_payment_work_edit"  name="work_id" data-placeholder="Select Work">
                    <option selected disabled>Select Work</option>
                    <?php
                    foreach($work_contracts as $row): ?>
                    <option data-work-status="<?php echo $row->work_status?>" value="<?php echo $row->work_id?>"><?php echo $row->work_name?></option>
                    <?php
                  endforeach;
                  ?>
                </select>
              </div>
            <?php }elseif($page_name=='work_profile' || $page_name=='projects_profile'){ ?>
              <div class="m-input-icon m-input-icon--right">
                <input value="<?php echo $work_data->work_name?>" type="text"  readonly class="form-control  m-input m-input--pill m-input--air"  aria-describedby="basic-addon1">
                <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
              </div>
            <?php } ?>
            <div class="m-input-icon m-input-icon--right" style="display: none" id="invoice_work_div_edit">
              <input id="invoice_work_name_edit" type="text"  readonly class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1">
              <input type="hidden" name="invoice_work_id" id="invoice_work_id_edit">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-6" >
          <div class="form-group m-form__group" >
            <label for="user_name">
              Client Name
            </label>
            <div class="m-input-icon m-input-icon--right">
              <?php if($page_name=='client_payments' || $page_name=='invoices_view'){?>
                <input type="text" name="client_name" readonly class="form-control form_client_payment_edit_fields m-input m-input--pill m-input--air" id="client_payment_client_name_edit" aria-describedby="basic-addon1">
              <?php }elseif($page_name=='work_profile' || $page_name=='projects_profile'){ ?>
                <input value="<?php echo $work_data->client_name?>" type="text" name="client_name" readonly class="form-control m-input m-input--pill m-input--air" id="client_payment_client_name_edit" aria-describedby="basic-addon1">
              <?php } ?>
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-user"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
      </div>
      <div class="row" id="tax_details_edit_row">
        <div class="col-lg-3">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Tax Type
            </label>
            <div class="m-radio-inline" style="padding-top: 10px;">
              <label class="m-radio m-radio--solid m-radio--state-info">
                <input required type="radio" class="form_fields_radio form_client_tax_amount_edit_fields"  name="tax_inclusive_edit" value="1"> Included
                <span></span>
              </label>
              <label class="m-radio m-radio--solid m-radio--state-focus">
                <input required type="radio" class="form_fields_radio form_client_tax_amount_edit_fields"  name="tax_inclusive_edit"  value="0"> Excluded
                <span></span>
              </label>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Taxable Amount
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input  required type="text" name="client_payment_taxable_amount" class="form-control form_client_tax_amount_edit_fields m-input m-input--pill m-input--air" id="client_payment_taxable_amount_edit" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-2" >
          <div class="form-group m-form__group" >
            <label for="user_name">
              <?php echo $this->config->item('Tax_tax_name')?> %
            </label>
            <div class="m-select2 m-select2--air m-select2--pill ">
              <select required id="client_payment_tax_percent_edit" name="client_payment_tax_percent" style="width: 100%" class="form-control m-input form_expense_bill_add_select form_client_tax_amount_edit_fields" aria-describedby="basic-addon1" data-placeholder="Select Tax Percentage">
                <?php
                $tax_percent = $this->config->item('Tax_tax_percent_old');
                foreach($tax_percent as $row):
                  $selected_tax='';
                  if($row==0){
                    $selected_tax='selected';
                  }
                  ?>
                  <option <?php echo $selected_tax?> value="<?php echo $row?>"><?php echo $row?>%</option>
                  <?php
                endforeach;
                ?>
              </select>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Tax Amount
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input  required type="text" name="client_payment_tax_amount" readonly class="form-control m-input m-input--pill m-input--air form_client_tax_amount_edit_fields" id="client_payment_tax_amount_edit" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="client_payment_amount">
              Received Amount
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input readonly required type="text" name="received_amount" id="client_payment_received_amount_edit"  class="form-control  form_client_payment_edit_fields form_client_tax_amount_edit_fields m-input m-input--pill m-input--air" placeholder="Payment Amount" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4" >
          <div class="form-group m-form__group" >
            <label for="user_name">
              Received Date
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input  data-date-format="dd-mm-yyyy" id="client_payment_received_date_edit" required type="text" name="received_date" class="form-control form_client_payment_edit_fields m-input m-input--pill m-input--air" placeholder="Received Date" >
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Received To Acc
            </label>
            <div class="m-select2 m-select2--air m-select2--pill">
              <select required id="client_payment_acc_edit" name="credit_acc" style="width: 100%" class="form-control m-input"  aria-describedby="basic-addon1">
                <?php
                foreach($this->config->item('account_heads') as $row):
                  $selected="";
                  if($row->acc_head_id==1){
                    $selected="selected";
                  }
                  ?>
                  <option <?php echo $selected?> value="<?php echo $row->acc_head_id?>"><?php echo $row->acc_head_name?></option>
                  <?php
                endforeach;
                ?>

              </select>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-lg-5">
          <div class="form-group m-form__group" style=" !important">
            <label for="client_payment_remarks">
              Remarks
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input type="text" name="tr_remarks" id="client_payment_remarks_edit"  class="form-control form_client_payment_edit_fields m-input m-input--pill m-input--air" placeholder="Remarks" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Receipt No
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input type="text" name="reference_no" id="client_payment_receipt_no_edit"  class="form-control form_client_payment_edit_fields m-input m-input--pill m-input--air" placeholder="Receipt No" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Received From
            </label>
            <div class="m-input-icon m-input-icon--right">
              <input type="text" name="received_from" id="client_payment_received_from_edit"  class="form-control form_client_payment_edit_fields m-input m-input--pill m-input--air" placeholder="Received From" aria-describedby="basic-addon1">
              <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-4">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Change/Upload Receipt
            </label>
            <div id="view_attachment_client_payment_edit">

            </div>
            <div class="custom-file">
              <input type="file" class="custom-file-input" name="uploaded_file" id="customFile">
              <label class="custom-file-label" for="customFile">Choose file</label>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <input type="hidden" name="client_id" id="client_payment_client_id_edit" value="<?php if($page_name=='work_profile' || $page_name=='projects_profile'){ echo $work_data->client_id; }?>"/>
        <input type="hidden" name="transaction_id" id="client_payment_tr_id_edit">
        <input type="hidden" name="tr_type" value="client_payment_transaction" id="tr_type_edit_client_payment">
        <input type="hidden" name="reference_id" id="reference_id_edit_client_payment" value="<?php if($page_name=='work_profile' || $page_name=='projects_profile'){ echo $work_data->work_id; }?>">
        <input type="hidden" name="reference_type" value="project" id="reference_type_edit_client_payment">
        <input type="hidden" name="redirect_url" value="<?php echo base_url(uri_string())?>" >
        <input type="hidden" name="redirect_url" value="<?php echo base_url(uri_string())?>" >
      </div>
    </div>
    <div class="modal-footer">
      <button type="button" class="btn btn-secondary" data-dismiss="modal">
        Close
      </button>
      <button type="submit" class="btn form_submit_btn btn-primary">
        Submit
      </button>
    </div>
  </form>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" id="send_email_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" >
    <form autocomplete="off" data-modal-id="resend_email_modal" method="post" action="<?php echo base_url().'client_payments/send_receipt'?>" class="form-horizontal">
      <div class="modal-content">
        <div class="alert alert-info" role="alert" style="margin-bottom: 0px">
          <button type="button" class="close" data-dismiss="modal"></button>
          <br/>
          <h4 class="alert-heading">Warning! Please Confirm Your Action</h4>
          <br/>
          <p> Are You Sure to Send Receipt To Below Email of Client. </p>
          <div class="row">
            <div class="col-lg-12">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Client Name
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <div class="input-group-prepend">
                    <span class="input-group-text" id="basic-addon1">
                      <i class="la la-user"></i>
                    </span>
                  </div>
                  <input disabled type="text"  id="client_name_send_receipt"  class="form-control m-input" aria-describedby="basic-addon1">
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-12">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Email
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <div class="input-group-prepend">
                    <span class="input-group-text" id="basic-addon1">
                      <i class="la la-envelope"></i>
                    </span>
                  </div>
                  <input required name="email" type="email"  id="email_send_receipt"  class="form-control m-input"  aria-describedby="basic-addon1">
                </div>
              </div>
            </div>
          </div>
          <br/>
          <input type="hidden" name="redirect_url" value="<?php echo base_url(uri_string())?>">
          <input type="hidden" name="client_id" id="client_id_send_receipt">
          <input type="hidden" name="transaction_id" id="transaction_id_send_receipt">
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">
              Close
            </button>
            <button class="btn btn-focus form_submit_btn" type="submit" name="submit">Confirm & Send</button>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
<div class="modal fade" tabindex="-1" id="send_whatsapp_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" >
    <form autocomplete="off" data-modal-id="send_whatsapp_modal" id="form_send_whatsapp" method="post" action="<?php echo base_url().'client_payments/send_receipt/whatsapp'?>" class="form-horizontal">
      <div class="modal-content">
        <div class="alert alert-info" role="alert" style="margin-bottom: 0px">
          <button type="button" class="close" data-dismiss="modal"></button>
          <br/>
          <h4 class="alert-heading">Warning! Please Confirm Your Action</h4>
          <br/>
          <p> Are You Sure to Send Receipt To Below Whatsapp of Client. </p>
          <div class="row">
            <div class="col-lg-12">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Client Name
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <div class="input-group-prepend">
                    <span class="input-group-text" id="basic-addon1">
                      <i class="la la-user"></i>
                    </span>
                  </div>
                  <input disabled type="text"  id="client_name_send_receipt_whatsapp"  class="form-control m-input" aria-describedby="basic-addon1">
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-12">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Whatsapp No
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <div class="input-group-prepend">
                    <span class="input-group-text" id="basic-addon1">
                      <i class="la la-whatsapp"></i>
                    </span>
                  </div>
                  <input required name="whatsapp" type="text"  id="whatsapp_no_send_receipt"  class="form-control m-input"  aria-describedby="basic-addon1">
                </div>
                <span class="m-form__help">(Please Use Country Code Before Mobile Number <br/>[Eg: +919846123456])</span>
              </div>
            </div>
          </div>
          <br/>
          <input type="hidden" name="redirect_url" value="<?php echo base_url(uri_string())?>">
          <input type="hidden" name="client_id" id="client_id_send_receipt_whatsapp">
          <input type="hidden" name="transaction_id" id="transaction_id_send_receipt_whatsapp">
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">
              Close
            </button>
            <button class="btn btn-focus form_submit_btn" type="submit" name="submit">Confirm & Send</button>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
