<div class="v3-col-xl-6 v3-col-md-6 v3-col-sm-12 v3-col-xs-12 mdn">
	<section class="card card-featured-left card-featured-success mb-3 bgt" style="" id="muhasebe">
		<header class="card-header">
			<div class="card-actions"></div>
			<h2 class="card-title"><i class="fa fa-calculator"></i> <?php echo ctranslate("Muhasebe")?></h2>
			<p class="card-subtitle">...</p>
		</header>
		<?php
		//-- Bakiye Hesapla -->
		$sqlu=mysqli_query($conn, "select * from t5 where ne='uye' $luye order by t1 asc"); while($rsu=mysqli_fetch_assoc($sqlu)){$u++; $users[] = $rsu; }
		$cpb1=0;$cpb2=0;$cpb3=0;$cpb4=0;
		foreach($users as $key=>$value){
			$sch=mysqli_query($conn, "select * from t4 where ne='cari' and s1=".$value["id"]." order by id desc"); while($hcari=mysqli_fetch_assoc($sch)){
				include("modules/clients/client_current_calc2.php");
			}
		}
		$alacak=($cpb1)-($cpb3);
		$cpb1=0;$cpb2=0;$cpb3=0;$cpb4=0;
		foreach($users as $key=>$value){
			$sch=mysqli_query($conn, "select * from t4 where ne='cari' and s1=".$value["id"]." order by id desc"); while($hcari=mysqli_fetch_assoc($sch)){
				if(($_GET["ts1"]=="" and $_GET["ts2"]=="" and ($hcari["t4"] >= date('Y-m-d', strtotime(date("Y-m-d"). ' -30 days')) or $hcari["t4"]=="")) or ($_GET["ts1"]<>"" and $_GET["ts2"]<>"") and ($hcari["t4"]>=$_GET["ts1"] and $hcari["t4"]<=$_GET["ts2"])){
					include("modules/clients/client_current_calc2.php");
				}
			}
		}
		$alinan=$cpb3;
		$cpb1=0;$cpb2=0;$cpb3=0;$cpb4=0;
		foreach($users as $key=>$value){
			$sch=mysqli_query($conn, "select * from t4 where ne='cari' and t1='Nakit' and s1=".$value["id"]." order by id desc"); while($hcari=mysqli_fetch_assoc($sch)){
				if(($_GET["ts1"]=="" and $_GET["ts2"]=="" and ($hcari["t4"] >= date('Y-m-d', strtotime(date("Y-m-d"). ' -30 days')) or $hcari["t4"]=="")) or ($_GET["ts1"]<>"" and $_GET["ts2"]<>"") and ($hcari["t4"]>=$_GET["ts1"] and $hcari["t4"]<=$_GET["ts2"])){
					include("modules/clients/client_current_calc2.php");
				}
				$nakit=$cpb3;
			}
		}
		$cpb1=0;$cpb2=0;$cpb3=0;$cpb4=0;
		foreach($users as $key=>$value){
			$sch=mysqli_query($conn, "select * from t4 where ne='cari' and t1='Pos' and s1=".$value["id"]." order by id desc"); while($hcari=mysqli_fetch_assoc($sch)){
				if(($_GET["ts1"]=="" and $_GET["ts2"]=="" and ($hcari["t4"] >= date('Y-m-d', strtotime(date("Y-m-d"). ' -30 days')) or $hcari["t4"]=="")) or ($_GET["ts1"]<>"" and $_GET["ts2"]<>"") and ($hcari["t4"]>=$_GET["ts1"] and $hcari["t4"]<=$_GET["ts2"])){
					include("modules/clients/client_current_calc2.php");
				}
			}
			$pos=$cpb3;
		}
		$cpb1=0;$cpb2=0;$cpb3=0;$cpb4=0;
		foreach($users as $key=>$value){
			$sch=mysqli_query($conn, "select * from t4 where ne='cari' and t1='Banka' and s1=".$value["id"]." order by id desc"); while($hcari=mysqli_fetch_assoc($sch)){
				if(($_GET["ts1"]=="" and $_GET["ts2"]=="" and ($hcari["t4"] >= date('Y-m-d', strtotime(date("Y-m-d"). ' -30 days')) or $hcari["t4"]=="")) or ($_GET["ts1"]<>"" and $_GET["ts2"]<>"") and ($hcari["t4"]>=$_GET["ts1"] and $hcari["t4"]<=$_GET["ts2"])){
					include("modules/clients/client_current_calc2.php");
				}
				$banka=$cpb3;
			}
		}
		$cpb1=0;$cpb2=0;$cpb3=0;$cpb4=0;
		foreach($users as $key=>$value){
			$sch=mysqli_query($conn, "select * from t4 where ne='cari' and t1='Taksit' and s1=".$value["id"]." order by id desc"); while($hcari=mysqli_fetch_assoc($sch)){
				if(($_GET["ts1"]=="" and $_GET["ts2"]=="" and ($hcari["t4"] >= date('Y-m-d', strtotime(date("Y-m-d"). ' -30 days')) or $hcari["t4"]=="")) or ($_GET["ts1"]<>"" and $_GET["ts2"]<>"") and ($hcari["t4"]>=$_GET["ts1"] and $hcari["t4"]<=$_GET["ts2"])){
					include("modules/clients/client_current_calc2.php");
				}
				$cek=$cpb3;
			}
		}
		$vadesidolan=0; $vadesidolancari=0;
		foreach($users as $key=>$value){
			$sqlf = mysqli_query($conn, "select * from t4 where (ne='sfatura' or ne='afatura') and s1=".$value["id"]." order by id desc"); while($rsf=mysqli_fetch_assoc($sqlf)){
				if($rsf["t6"]<>"" and tfark2(date("Y-m-d"),vade($rsf["t9"],$rsf["t6"]))<=0){$vadesidolan=$vadesidolan+$rsf["pb2"];}
			}
			$sqlc=mysqli_query($conn, "select * from t4 where ne='cari' and t12<>'' and s1=".$value["id"]." order by t12 asc"); while($rsc=mysqli_fetch_assoc($sqlc)){
				if($rsc["t12"]<>"" and $rsc["t12"] <= date("Y-m-d") and ($rsc["pb1"]<>'0.00' and $rsc["pb2"]=='0.00')){$vadesidolancari = $vadesidolancari + (($rsc["pb1"]-$rsc["pb2"]) - ($rsc["pb3"]-$rsc["pb4"]));}
			}
		}
		//-- Bakiye Hesapla -->
		?>
		<div class="card-body" style="padding:0px;">
			<div class="v3-col-md-3 v3-col-sm-3 v3-col-xs-4" style="font-size: 12px; padding: 12px; background: <?php echo $module["bcsuccess"]?>35; color: <?php echo $module["clrcsuccess"];?>;">
				<div style="position: absolute; top: -20px; text-align: center; right: 0px; width: 75px; height: 20px; border-radius: 5px 5px 0px 0px; background: <?php echo $module["bcsuccess"]?>50; color: <?php echo $module["clrcsuccess"];?>;"><i class="fa fa-<?php echo StrToLower($module["currency"])?>"></i> <?php echo $sdil[160]; //Nakit?></div>
				<div class="tar"><span class="digi " style="font-size:30px !important;"><?php echo wprice($nakit)?></span></div>
			</div>
			<div class="v3-col-md-3 v3-col-sm-3 v3-col-xs-4" style="font-size: 12px; padding: 12px; background: <?php echo $module["bcsuccess"]?>50; color: <?php echo $module["clrcsuccess"];?>;">
				<div style="position: absolute; top: -20px; text-align: center; right: 0px; width: 75px; height: 20px; border-radius: 5px 5px 0px 0px; background: <?php echo $module["bcsuccess"]?>70; color: <?php echo $module["clrcsuccess"];?>;"><i class="fa fa-<?php echo StrToLower($module["currency"])?>"></i> <?php echo $sdil[161]; //Banka?></div>
				<div class="tar"><span class="digi " style="font-size:30px !important;"><?php echo wprice($banka)?></span></div>
			</div>
			<div class="v3-col-md-3 v3-col-sm-3 v3-col-xs-4" style="font-size: 12px; padding: 12px; background: <?php echo $module["bcsuccess"]?>70; color: <?php echo $module["clrcsuccess"];?>;">
				<div style="position: absolute; top: -20px; text-align: center; right: 0px; width: 75px; height: 20px; border-radius: 5px 5px 0px 0px; background: <?php echo $module["bcsuccess"]?>99; color: <?php echo $module["clrcsuccess"];?>;"><i class="fa fa-<?php echo StrToLower($module["currency"])?>"></i> <?php echo $sdil[162]; //Pos?></div>
				<div class="tar"><span class="digi " style="font-size:30px !important;"><?php echo wprice($pos)?></span></div>
			</div>
			<div class="v3-col-md-3 v3-col-sm-3 v3-col-xs-4 mdn" style="font-size: 12px; padding: 12px; background: <?php echo $module["bcsuccess"]?>99; color: <?php echo $module["clrcsuccess"];?>;">
				<div style="position: absolute; top: -20px; text-align: center; right: 0px; width: 75px; height: 20px; border-radius: 5px 5px 0px 0px; background: <?php echo $module["bcsuccess"]?>; color: <?php echo $module["clrcsuccess"];?>;"><i class="fa fa-<?php echo StrToLower($module["currency"])?>"></i> <?php echo $sdil[227]; //Taksit?></div>
				<div class="tar"><span class="digi " style="font-size:30px !important;"><?php echo wprice($cek)?></span></div>
			</div>
		</div>
		<div class="card-body dbcb" style="height:222px; overflow:auto;">
			<div class="v3-col-md-6 v3-col-sm-6 mt10 mmt10">
				<div class="card-body" style="background:#ffffff08;">
					<div class="widget-summary">
						<div class="widget-summary-col widget-summary-col-icon">
							<div class="summary-icon" style="font-size:30px;">
								<i class="fa fa-<?php echo StrToLower($module["currency"])?> text-success"></i>
							</div>
						</div>
						<div class="widget-summary-col">
							<div class="summary">
								<h4 class="title"><?php echo $sdil[155]; //Alacak?></h4>
								<div class="info">
									<strong class="amount digi fs34" style="<?php if(($_SESSION["kim"]=="Admin") or $_SESSION["kim"]=="yonetici" and $_SESSION["y8"]<>0){}else{?>text-shadow: 0 0 14px rgba(0,0,0,0.5); color:transparent;<?php }?>"><?php echo wprice(para($alacak));?></strong>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="v3-col-md-6 v3-col-sm-6 mt10 mmt10">
				<div class="card-body" style="background:#ffffff08;">
					<div class="widget-summary">
						<div class="widget-summary-col widget-summary-col-icon">
							<div class="summary-icon" style="font-size:30px;">
								<i class="fa fa-<?php echo StrToLower($module["currency"])?> text-success"></i>
							</div>
						</div>
						<div class="widget-summary-col">
							<div class="summary">
								<h4 class="title"><?php echo $sdil[156]; //Alınan?></h4>
								<div class="info">
									<strong class="amount digi fs34"style="<?php if(($_SESSION["kim"]=="Admin") or $_SESSION["kim"]=="yonetici" and $_SESSION["y8"]<>0){}else{?>text-shadow: 0 0 14px rgba(0,0,0,0.5); color:transparent;<?php }?>"><?php echo wprice(para($alinan));?></strong>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="v3-col-md-6 v3-col-sm-6 mt10 mmt10">
				<div class="card-body" style="background:#ffffff08;">
					<div class="widget-summary">
						<div class="widget-summary-col widget-summary-col-icon">
							<div class="summary-icon" style="font-size:30px;">
								<i class="fa fa-<?php echo StrToLower($module["currency"])?> text-success"></i>
							</div>
						</div>
						<div class="widget-summary-col">
							<div class="summary">
								<h4 class="title"><?php echo ctranslate("Vadesi Dolan Fatura Toplam")?></h4>
								<div class="info">
									<strong class="amount digi fs34"style="<?php if(($_SESSION["kim"]=="Admin") or $_SESSION["kim"]=="yonetici" and $_SESSION["y8"]<>0){}else{?>text-shadow: 0 0 14px rgba(0,0,0,0.5); color:transparent;<?php }?>"><?php echo wprice(para($vadesidolan));?></strong>
									<p style="font-size:11px; "><?php echo dtarih(date('Y-m-d'),"gg ua yyyy");?></p>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="v3-col-md-6 v3-col-sm-6 mt10 mmt10">
				<div class="card-body" style="background:#ffffff08;">
					<div class="widget-summary">
						<div class="widget-summary-col widget-summary-col-icon">
							<div class="summary-icon" style="font-size:30px;">
								<i class="fa fa-<?php echo StrToLower($module["currency"])?> text-success"></i>
							</div>
						</div>
						<div class="widget-summary-col">
							<div class="summary">
								<h4 class="title"><?php echo ctranslate("Vadesi Dolan Cari Toplam")?></h4>
								<div class="info">
									<strong class="amount digi fs34"style="<?php if(($_SESSION["kim"]=="Admin") or $_SESSION["kim"]=="yonetici" and $_SESSION["y8"]<>0){}else{?>text-shadow: 0 0 14px rgba(0,0,0,0.5); color:transparent;<?php }?>"><?php echo wprice(para($vadesidolancari));?></strong>
									<p style="font-size:11px; "><?php echo dtarih(date('Y-m-d'),"gg ua yyyy");?></p>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>