me thiyenne bila
me thiyenne epson tm-t81iii printer eka
me thieynne settings maru nokara print krhm ena wdha
me Thiyenne Bill ekata thiayana code eka
bila hariyatama koleta fit krgnne khmd cudah ?
me thiyenne epson tm-t81iii printer eka
me thieynne settings maru nokara print krhm ena wdha
me Thiyenne Bill ekata thiayana code eka
bila hariyatama koleta fit krgnne khmd cudah ?
PHP:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Invoice Print</title>
<?php
$style = '
<style>
* {
font-family: "consolas", sans-serif;
}
p {
display: block;
margin: 3px;
font-size: 10pt;
}
table td {
font-size: 9pt;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
@media print {
@page {
margin: 0;
size: 80mm
';
?>
<?php
$style .=
! empty($_COOKIE['innerHeight'])
? $_COOKIE['innerHeight'] .'mm; }'
: '}';
?>
<?php
$style .= '
html, body {
width: 80mm;
}
.btn-print {
display: none;
}
}
</style>
';
?>
{!! $style !!}
</head>
<body onload="window.print()">
<button class="btn-print" style="position: absolute; right: 1rem; top: rem;" onclick="window.print()">Print</button>
<div class="text-center">
<h3 style="margin-bottom: 5px;">The Spa</h3>
<p>www.thaispa.com</p>
<p>027 2250 900</p>
<p>Minneriya Srilanka</p>
</div>
<br>
<div>
<p style="float: left;">{{ date('d-m-Y') }}</p>
<p style="float: right">{{ strtoupper(auth()->user()->name) }}</p>
</div>
<div class="clear-both" style="clear: both;"></div>
<p>No: {{ $transaction->transaction_code }}</p>
<p class="text-center">===================================</p>
<br>
<table width="100%" style="border: 0;">
@foreach ($transaction->transaction_details as $transaction_detail)
<tr>
<td colspan="3">{{ $transaction_detail->name }}</td>
</tr>
<tr>
<td>{{ $transaction_detail->qty }} x {{ $transaction_detail->base_price }}</td>
<td></td>
<td class="text-right">{{ $transaction_detail->qty * $transaction_detail->base_price }}</td>
</tr>
@endforeach
</table>
<p class="text-center">-----------------------------------</p>
<table width="100%" style="border: 0;">
<tr>
<td>Total :</td>
<td class="text-right">{{ $transaction->total_price }}</td>
</tr>
<tr>
<td>Accept:</td>
<td class="text-right">{{ $transaction->accept }}</td>
</tr>
<tr>
<td>Return:</td>
<td class="text-right">{{ $transaction->return }}</td>
</tr>
</table>
<p class="text-center">===================================</p>
<p class="text-center">-- Dalada Samindu Pihitai --</p>
<p class="text-center" >Developed by: sorrowcode.com</p>
<p class="text-center" >Contact: 0771233211</p>
<script>
let body = document.body;
let html = document.documentElement;
let height = Math.max(
body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight
);
document.cookie = "innerHeight=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
document.cookie = "innerHeight="+ ((height + 50) * 0.264583);
</script>
</body>
</html>