

<?php $__env->startSection('title'); ?>

Report 
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
<ol class="breadcrumb pull-right">
        <li><a href="<?php echo e(route('home')); ?>"><i class="fa fa-dashboard"></i> Home</a></li>

        <li class="active">Received Amount Statement</li>
      </ol>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('css'); ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
<?php $__env->stopSection(); ?>


<?php $__env->startSection('content'); ?>
    <!-- Main content -->
    <section class="container-fluid">
       <!--.row-->
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel panel-info">
                            <div class="panel-heading">Generate Received Amount Statement</div>
                            <div class="panel-wrapper collapse in" aria-expanded="true">
                                <div class="panel-body">
                                      <form class="form-horizontal" method='post' action="<?php echo e(route('report.received-amount-generate')); ?>">
                                        <?php echo e(csrf_field()); ?>

                                        <div class="form-body">
                                          <div class="row">

                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('isSuperAdmin')): ?>
                                            <?php echo $__env->make('partial.multiproject_forsomereport', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                            <?php endif; ?>
                                            <!--/span-->
                                        </div>
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <div class="form-group has-success" style="margin-bottom: 15px">
                                                      <label class="control-label">By Date</label>
                                                        <div class="input-group">
                                                          <div class="input-group-addon">
                                                            <i class="fa fa-calendar"></i>
                                                          </div>
                                                        <input type="text" class="form-control "id="daterange-btn" value='<?php echo e(old('date_range')); ?>' name='date_range'>
                                                        <?php if($errors->has('date_range')): ?>
                                                            <span class="help-block" >
                                                                <strong><?php echo e($errors->first('date_range')); ?></strong>
                                                            </span>
                                                        <?php endif; ?>

                                                      </div>
                                                         </div>
                                                </div>
                                                <!--/span-->
                                            </div>
                                            
                                        </div>
                                        <div class="form-actions">
                                            <button type="submit" class="btn btn-success search-customer"> <i class="fa fa-check" ></i> Generate</button>
                                            </form>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--./row-->
                <?php $__env->stopSection(); ?>

    <?php $__env->startSection('js'); ?>


<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<script>
const year = new Date().getFullYear();

  const this_fiscal_year_start_date = new Date(year + '-' + <?php echo e(\App\ChartOfAccount::FISCAL_YEAR_START); ?> + '-01');

  const this_fiscal_year_end_date = new Date((year + 1) + '-' + <?php echo e(\App\ChartOfAccount::FISCAL_YEAR_END); ?> + '-30');

  const last_fiscal_year_start_date = new Date((year - 1) + '-' + <?php echo e(\App\ChartOfAccount::FISCAL_YEAR_START); ?> + '-01');

  const last_fiscal_year_end_date = new Date(year + '-' + <?php echo e(\App\ChartOfAccount::FISCAL_YEAR_END); ?> + '-30');

  


$('#daterange-btn').daterangepicker(
        {
        //     locale: {
        //     format: 'DD/MM/YYYY'
        // },
          ranges: {
            'Today': [moment(), moment()],
            'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
            'Last 7 Days': [moment().subtract(6, 'days'), moment()],
            'Last 30 Days': [moment().subtract(29, 'days'), moment()],
            'This Month': [moment().startOf('month'), moment().endOf('month')],
            'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
            'This Fiscal Year' : [this_fiscal_year_start_date,this_fiscal_year_end_date],
            'Last Fiscal Year' : [last_fiscal_year_start_date,last_fiscal_year_end_date]
          },
          startDate: moment().subtract(29, 'days'),
          endDate: moment()
        },
        function (start, end) {
          $('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
        }
    );
</script>
    <!--Accordian-->


   <?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/proje372/akram-city.projecterp.net/resources/views/report/received-amount-range.blade.php ENDPATH**/ ?>