<?php
	$path="../../";
	include("../../map.php");
	$id = intval($_GET["id"]);
	$rs = mysqli_fetch_assoc(mysqli_query($conn,"SELECT * FROM t4 WHERE id='$id'")); $jsi = json_decode($rs["n17"],true);
	$mus = mysqli_fetch_assoc(mysqli_query($conn,"SELECT * FROM t5 WHERE id='".$rs["s1"]."'"));
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<title>Servis Fişi</title>
<style>
  body { font-family: Arial, sans-serif; font-size: 12px; }
  .ticket { width: 58mm; max-width:58mm; }
  .center { text-align: center; }
  .bold { font-weight: bold; }
  hr { border: 0; border-top: 1px dashed #000; margin:5px 0; }
  .barcode { margin-top: 10px; text-align:center; }
  @media print {
    body { margin:0; }
    .no-print { display:none; }
  }
</style>
</head>
<body onload="window.print()">

<div class="ticket">
  <div class="center bold">TEKNİK SERVİS FİŞİ</div>
  <hr>
  <div><span class="bold">Fiş No:</span> <?php echo i2a($rs["id"],7);?></div>
  <div><span class="bold">Tarih:</span> <?php echo date("d.m.Y H:i", strtotime($rs["ts1"]));?></div>
  <hr>
  <div><span class="bold">Müşteri:</span> <?php echo $jsi["Ad_Soyad"]; ?></div>
  <div><span class="bold">Telefon:</span> <?php echo $jsi["Gsm"]; ?></div>
  <hr>
  <div><span class="bold">Cihaz:<?php echo $jsi["Cihaz_Adi_Modeli"]; ?></div>
  <div><span class="bold">Seri No:</span> <?php echo $jsi["Seri_No"]; ?></div>
  <div><span class="bold">Açıklama:</span> <?php echo $jsi["Aciklama"]; ?></div>
  <hr>
  <div><span class="bold">Ücret:</span> <?php echo $jsi["Ucret"]; ?> ₺</div>
  <div><span class="bold">Personel:</span> <?php echo GetUser($rs["s19"],"t1"); ?></div>
  <div><span class="bold">Not:</span> <?php echo $jsi["Notlar"]; ?></div>

  <div class="center"><?php echo $firma?></div>
</div>

</body>
</html>