<?php $__env->startSection('content'); ?>
<?php $__env->startSection('title',trans('front.dayReport')); ?>
<section class="content-header">
	<h1>
		<?php echo app('translator')->getFromJson('front.report'); ?>
		<small>
			<?php echo app('translator')->getFromJson('front.dailyreport'); ?>
		</small>
		<a class="btn print-window pull-right" href="javascript:void(0)" onclick="window.print()" role="button">
			<i class="fa fa-print" aria-hidden="true"></i>
		</a>
        <a id="printiframe" href="javascript:void(0)" class="btn pull-right"><i class="fa fa-print" aria-hidden="true"></i> Print Receipt</a>
	</h1>
</section>
<section class="content ticket">
	<div class="box box-primary">
		<?php echo $__env->make('layouts.partial.filter', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
		<?php echo $__env->make('layouts.partial.printHeader',['showCompanyData'=>true], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
		<div class="row">
			<div class="col-md-12">
                <iframe style="display: none;" id="dayteportFrame" srcdoc='<?php echo $__env->make('reciept_day_report', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>' width="500px" height="400px"></iframe>
				<table class="table table-bordered">
					<thead>
						<tr>
							<th class="text-center"><?php echo app('translator')->getFromJson('front.title'); ?></th>
							<th class="text-center"><?php echo app('translator')->getFromJson('front.Outcome'); ?></th>
							<th class="text-center"><?php echo app('translator')->getFromJson('front.Income'); ?></th>
						</tr>
					</thead>
					<tbody>
					<tr>
						<td> <?php echo app('translator')->getFromJson('front.later sales'); ?></td>
						<td></td>
						<td>
                            <a href="<?php echo e(route('orders.report')); ?>?type=sales&fromdate=<?php echo e(date('Y-m-d')); ?>">
                                <div class="badge bg-fegault">
                                    <?php echo e(currency(round($orders->totalDue??0,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </a>
						</td>
					</tr>
					<tr>
						<td> <?php echo app('translator')->getFromJson('front.cash sales'); ?></td>
						<td></td>
						<td>
                            <a href="<?php echo e(route('orders.report')); ?>?type=sales&fromdate=<?php echo e(date('Y-m-d')); ?>">
                                <div class="badge bg-green">
                                    <?php echo e(currency(round($clientOrders??0,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </a>
						</td>
					</tr>
                    <tr>
                        <td><?php echo app('translator')->getFromJson('front.clients payments'); ?></td>
                        <td></td>
                        <td>
                            <a href="<?php echo e(route('persons.payments')); ?>?type=client&fromdate=<?php echo e(date('Y-m-d')); ?>">
                                <div class="badge bg-green">
                                    <?php echo e(currency(round($clientPayments,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <td><?php echo app('translator')->getFromJson('front.cashdebosit'); ?></td>
                        <td></td>
                        <td>
                            <a href="<?php echo e(route('banks.show',1)); ?>?type=2&fromdate=<?php echo e(date('Y-m-d')); ?>">
                                <div class="badge bg-green">
                                    <?php echo e(currency(round($desposite,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </a>
                        </td>
                    </tr>
					<tr>
						<td><?php echo app('translator')->getFromJson('front.expenses'); ?></td>
						<td>
                            <a href="<?php echo e(route('expenses.report')); ?>?fromdate=<?php echo e(date('Y-m-d')); ?>">
                                <div class="badge bg-red">
                                    <?php echo e(currency(round($expenses,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </a>
                        </td>
						<td></td>
					</tr>
                    <tr>
                        <td> <?php echo app('translator')->getFromJson('front.cash withdraw'); ?> </td>
                        <td>
                            <a href="<?php echo e(route('banks.show',1)); ?>?type=1&fromdate=<?php echo e(date('Y-m-d')); ?>">
                                <div class="badge bg-red">
                                    <?php echo e(currency(round($withdraw,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </a>
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td> <?php echo app('translator')->getFromJson('front.cash purcahses'); ?> </td>
                        <td>
                            <a href="<?php echo e(route('purchase.report')); ?>?type=purchase&fromdate=<?php echo e(date('Y-m-d')); ?>">
                                <div class="badge bg-red">
                                    <?php echo e(currency(round($supplierOrders,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </a>
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td> <?php echo app('translator')->getFromJson('front.suppliers payments'); ?> </td>
                        <td>
                            <a href="<?php echo e(route('persons.payments')); ?>?type=supplier&fromdate=<?php echo e(date('Y-m-d')); ?>">
                                <div class="badge bg-red">
                                    <?php echo e(currency(round($supplierPayments,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </a>
                        </td>
                        <td></td>
                    </tr>
					</tbody>
                    <tfoot>
                        <tr class="bg-warning">
                            <td><?php echo app('translator')->getFromJson('front.Cash'); ?></td>
                            <td colspan="2">
                                <div class="badge bg-yellow">
                                    <?php echo e(currency(round($balance,2),currency()->config('default'), currency()->getUserCurrency(), $format = true)); ?>

                                </div>
                            </td>
                        </tr>
                    </tfoot>
				</table>
			</div>
		</div>
	</div>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('css'); ?>
<style>
	.progress-bar,.badge{
		width: 100%;
	}
	.badge {
		width: 100%;
		padding: 5px;
	}
	table,.badge {
		font-size: 14px !important;
		font-weight: bold !important;
	}
</style>
<?php if($settings['printerType']!='receipt'): ?>
	<style>
	@media  print {
		table,.badge {
			font-size: 18px !important;
			color: #0c0c0c!important;
		}

	}
	</style>
	<?php else: ?>

	<style>
        @media  print {
			table,.badge {
				color: #0c0c0c!important;
			}
	        .ticket,.table{
	            max-width: 350px !important;
	        }
	        * {
	        font-size: 12px !important;
	        font-family: 'Times New Roman';
		    }
            .printHeader{
                display: block!important;
            }
            a[href]:after {
                content: none !important;display: none !important;
            }
            .main-footer,.dt-buttons,.dataTables_filter{
                display: none ;display: none !important;
            }

            #footer{visibility: visible;display: none !important;}
            a{
                visibility:hidden;display: none !important;
            }
            .table {
                border: 1px solid black !important;
            }
            .table td,.table thead tr th {
                border: 1px solid black !important;
            }
            @media  print {
                .printHeader{
                    display: block!important;
                }
                table  {
                    font-size: <?php echo e($settings['PrintSize']); ?>px !important;
                }
                tr    { page-break-inside:avoid; page-break-after:auto }
                td    { page-break-inside:avoid; page-break-after:auto }
                thead { display:table-header-group;page-break-inside: avoid; }
                tfoot { display:table-footer-group }
                @page  { margin: .1cm; }
                body { margin: .1cm;}
                .panel-default{
                    border: none;
                }
                .hideprint{
                    visibility:hidden;
                    margin:0;
                    padding: 0;
                    display: none !important;
                }
            }

            html, body {
                height:100vh;
                width: 100vh;
                margin: 0px !important;
                padding-left: 100px !important;
                /*overflow: hidden;*/
            }
        }
        </style>
	<?php endif; ?>
<?php $__env->stopPush(); ?>
<?php $__env->startPush('js'); ?>
	<script>
        $('.datepicker').datepicker({
            autoclose: true,
            rtl: true,
            format: 'yyyy-mm-dd',
            language: "<?php echo e(\Session::get('locale')); ?>",
        });
        $(document).on("click","#printiframe",function(){
            $("#dayteportFrame").get(0).contentWindow.print();
        });
	</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>