 <div class="tab-pane " id="daily" role="tabpanel">
                            <div class="table-responsive">
                                <table class="table table-responsive-md card-table transactions-table text-center">
                                    <thead>
                                        <tr>
                                            <th>رقم الطرمبة</th>
                                            <th>نوع الطرمبة</th>
                                            <th>العامل</th>
                                            <th>قراءةالصباح</th>
                                            <th>قراءة المساء</th>
                                            <th>فارق القراءات</th>
                                            <th>المسحوب الفعلي</th>
                                            <th>الفارق اليومي</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if(isset($deficits)): ?>
                                            <?php $__currentLoopData = $deficits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $deficit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <?php if(isset($deficit)): ?>

                                                <tr class="odd" role="row">
                                                    <td>
                                                        <?php if(isset($deficit->reading->pump_id)): ?>
                                                            <?php echo e($deficit->reading->pump_id); ?>

                                                        <?php endif; ?>
                                                    </td>
                                                    <td>
                                                        <?php if(isset($deficit->reading->pump->tank->type)): ?>
                                                            <?php if($deficit->reading->pump->tank->type == 0): ?>
                                                                بترول
                                                            <?php else: ?>
                                                                ديزل
                                                            <?php endif; ?>
                                                        <?php endif; ?>
                                                    </td>
                                                    <td>
                                                        <?php if(isset($deficit->reading->employee->name)): ?>
                                                            <?php echo e($deficit->reading->employee->name); ?>

                                                        <?php endif; ?>
                                                    </td>

                                                    <td>
                                                        <?php if(isset($deficit->reading->start_of_day_read)): ?>
                                                            <?php echo e($deficit->reading->start_of_day_read); ?>

                                                        <?php endif; ?>
                                                    </td>
                                                    <td>
                                                        <?php if(isset($deficit->reading->end_of_day_read)): ?>
                                                            <?php echo e($deficit->reading->end_of_day_read); ?>

                                                        <?php endif; ?>
                                                    </td>
                                                    <td>

                                                        <?php if(isset($deficit->reading->start_of_day_read)): ?>
                                                            <?php if(isset($deficit->reading->end_of_day_read)): ?>
                                                                <?php if($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read > 0): ?>
                                                                    <span
                                                                        style="color: green"><?php echo e($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read); ?></span>
                                                                <?php else: ?>
                                                                    <span
                                                                        style="color: red"><?php echo e($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read); ?></span>
                                                                <?php endif; ?>
                                                            <?php endif; ?>
                                                        <?php endif; ?>
                                                    </td>
                                                    <td>
                                                    <?php if(isset($deficit->daily_draw)): ?>
                                                        <?php echo e($deficit->daily_draw); ?>

                                                    <?php endif; ?>

                                                    </td>
                                                    <td>
                                                        <?php if(isset($deficit->daily_draw )): ?>
                                                        <?php if(isset( $deficit->reading->end_of_day_read )): ?>
                                                        <?php if(isset($deficit->reading->start_of_day_read)): ?>

                                                        <?php if($deficit->daily_draw - ($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read) > 0): ?>
                                                            <a
                                                                href="<?php echo e(route('new_deficit_surpluses', ['id' => $deficit->reading->id, 'quantity' => $deficit->daily_draw - ($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read),'deficit_statues'=>$deficit->status])); ?>">
                                                                <span
                                                                    style="color: green"><?php echo e($deficit->daily_draw - ($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read)); ?></span></a>
                                                        <?php elseif($deficit->daily_draw - ($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read) < 0): ?>
                                                            <a
                                                                href="<?php echo e(route('new_deficit_surpluses', ['id' => $deficit->reading->id, 'quantity' => $deficit->daily_draw - ($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read),'deficit_statues'=>$deficit->status])); ?>">
                                                                <span
                                                                    style="color: red"><?php echo e($deficit->daily_draw - ($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read)); ?></span></a>
                                                        <?php else: ?>
                                                        <a
                                                        href="<?php echo e(route('new_deficit_surpluses', ['id' => $deficit->reading->id, 'quantity' => $deficit->daily_draw - ($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read),'deficit_statues'=>$deficit->status])); ?>">
                                                        <span
                                                            style="color: rgb(11, 10, 10)"><?php echo e($deficit->daily_draw - ($deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read)); ?></span></a>

                                                        <?php endif; ?>
                                                    </td>
                                                </tr>
                                                    <?php endif; ?>
                                                    <?php endif; ?>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php endif; ?>
                                        <tr>
                                            <td>الاجمالي</td>
                                            <td>-</td>
                                            <td>-</td>
                                            <td>

                                                
                                            </td>
                                            <td>

                                                
                                            </td>
                                            <td>
                                                <?php
                                                    $totalReadQuantity = 0;
                                                    if (isset($deficits)) {
                                                        foreach ($deficits as $deficit) {
                                                            if(isset($deficit->reading)){
                                                                $totalReadQuantity += $deficit->reading->end_of_day_read - $deficit->reading->start_of_day_read;
                                                            }
                                                        }
                                                    }
                                                ?>

                                                <?php if($totalReadQuantity > 0): ?>
                                                    <span style="color: green"><?php echo e($totalReadQuantity); ?></span>
                                                <?php else: ?>
                                                    <span style="color: red"><?php echo e($totalReadQuantity); ?></span>
                                                <?php endif; ?>
                                            </td>
                                            <td>

                                                 <?php
                                                    $drawsTotalQuantity = 0;

                                                   if (isset($deficits)) {
                                                        foreach ($deficits as $deficit) {
                                                            if(isset($deficit->daily_draw)){
                                                            $drawsTotalQuantity += $deficit->daily_draw;
                                                            }
                                                        }
                                                    }
                                                ?>
                                                <?php echo e($drawsTotalQuantity); ?>

                                            </td>
                                            <td>
                                                <?php if($drawsTotalQuantity - $totalReadQuantity > 0): ?>
                                                    <span
                                                        style="color: green"><?php echo e($drawsTotalQuantity - $totalReadQuantity); ?></span>
                                                <?php else: ?>
                                                    <span
                                                        style="color: red"><?php echo e($drawsTotalQuantity - $totalReadQuantity); ?></span>
                                                <?php endif; ?>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
<?php /**PATH C:\Users\Nasser\Desktop\petrol_store\resources\views/dashboard_tables/daily.blade.php ENDPATH**/ ?>