AlkantarClanX12
| Current Path : /home/xdlcxzbz/comfortchauffer.com/ |
| Current File : /home/xdlcxzbz/comfortchauffer.com/invoice.php |
<?php
$invoiceNumber = "";
if(isset($_GET["invoiceNumber"])){
$invoiceNumber = $_GET["invoiceNumber"];
}
else{
$invoiceNumber = "";
}
$date = "";
if(isset($_GET["date"])){
$date = $_GET["date"];
}
else{
$date = "";
}
$customerName = "";
if(isset($_GET["customerName"])){
$customerName = $_GET["customerName"];
}
else{
$customerName = "";
}
$customerAddress1 = "";
if(isset($_GET["customerAddress1"])){
$customerAddress1 = $_GET["customerAddress1"];
}
else{
$customerAddress1 = "";
}
$serviceType1 = "";
if(isset($_GET["serviceType1"])){
$serviceType1 = $_GET["serviceType1"];
}
else{
$serviceType1 = "";
}
$customerAddress2 = "";
if(isset($_GET["customerAddress2"])){
$customerAddress2 = $_GET["customerAddress2"];
}
else{
$customerAddress2 = "";
}
$serviceType2 = "";
if(isset($_GET["serviceType2"])){
$serviceType2 = $_GET["serviceType2"];
}
else{
$serviceType2 = "";
}
$customerAddress3 = "";
if(isset($_GET["customerAddress3"])){
$customerAddress3 = $_GET["customerAddress3"];
}
else{
$customerAddress3 = "";
}
$serviceType3 = "";
if(isset($_GET["serviceType3"])){
$serviceType3 = $_GET["serviceType3"];
}
else{
$serviceType3 = "";
}
// Getters for item 1
$number1 = "";
$desc1 = "";
$days1 = "";
$rate1 = "";
$total1 = "";
if(isset($_GET["number1"])){
$number1 = $_GET["number1"];
}
else{
$number1 = "";
}
if(isset($_GET["desc1"])){
$desc1 = $_GET["desc1"];
}
else{
$number1 = "";
}
if(isset($_GET["days1"])){
$days1 = $_GET["days1"];
}
else{
$days1 = "";
}
if(isset($_GET["rate1"])){
$rate1 = $_GET["rate1"];
}
else{
$rate1 = "";
}
if(isset($_GET["total1"])){
$total1 = $_GET["total1"];
}
else{
$total1 = "";
}
// Getters for item 2
$number2 = "";
$desc2 = "";
$days2 = "";
$rate2 = "";
$total2 = "";
if(isset($_GET["number2"])){
$number2 = $_GET["number2"];
}
else{
$number2 = "";
}
if(isset($_GET["desc2"])){
$desc2 = $_GET["desc2"];
}
else{
$number2 = "";
}
if(isset($_GET["days2"])){
$days2 = $_GET["days2"];
}
else{
$days2 = "";
}
if(isset($_GET["rate2"])){
$rate2 = $_GET["rate2"];
}
else{
$rate2 = "";
}
if(isset($_GET["total2"])){
$total2 = $_GET["total2"];
}
else{
$total2 = "";
}
// Getters for item 3
$number3 = "";
$desc3 = "";
$days3 = "";
$rate3 = "";
$total3 = "";
if(isset($_GET["number3"])){
$number3 = $_GET["number3"];
}
else{
$number3 = "";
}
if(isset($_GET["desc3"])){
$desc3 = $_GET["desc3"];
}
else{
$number3 = "";
}
if(isset($_GET["days3"])){
$days3 = $_GET["days3"];
}
else{
$days3 = "";
}
if(isset($_GET["rate3"])){
$rate3 = $_GET["rate3"];
}
else{
$rate3 = "";
}
if(isset($_GET["total3"])){
$total3 = $_GET["total3"];
}
else{
$total3 = "";
}
// Getters for item 4
$number4 = "";
$desc4 = "";
$days4 = "";
$rate4 = "";
$total4 = "";
if(isset($_GET["number4"])){
$number4 = $_GET["number4"];
}
else{
$number4 = "";
}
if(isset($_GET["desc4"])){
$desc4 = $_GET["desc4"];
}
else{
$number4 = "";
}
if(isset($_GET["days4"])){
$days4 = $_GET["days4"];
}
else{
$days4 = "";
}
if(isset($_GET["rate4"])){
$rate4 = $_GET["rate4"];
}
else{
$rate4 = "";
}
if(isset($_GET["total4"])){
$total4 = $_GET["total4"];
}
else{
$total4 = "";
}
// Getters for item 5
$number5 = "";
$desc5 = "";
$days5 = "";
$rate5 = "";
$total5 = "";
if(isset($_GET["number5"])){
$number5 = $_GET["number5"];
}
else{
$number5 = "";
}
if(isset($_GET["desc5"])){
$desc5 = $_GET["desc5"];
}
else{
$number5 = "";
}
if(isset($_GET["days5"])){
$days5 = $_GET["days5"];
}
else{
$days5 = "";
}
if(isset($_GET["rate5"])){
$rate5 = $_GET["rate5"];
}
else{
$rate5 = "";
}
if(isset($_GET["total5"])){
$total5 = $_GET["total5"];
}
else{
$total5 = "";
}
// Getters for item 6
$number6 = "";
$desc6 = "";
$days6 = "";
$rate6 = "";
$total6 = "";
if(isset($_GET["number6"])){
$number6 = $_GET["number6"];
}
else{
$number6 = "";
}
if(isset($_GET["desc6"])){
$desc6 = $_GET["desc6"];
}
else{
$number6 = "";
}
if(isset($_GET["days6"])){
$days6 = $_GET["days6"];
}
else{
$days6 = "";
}
if(isset($_GET["rate6"])){
$rate6 = $_GET["rate6"];
}
else{
$rate6 = "";
}
if(isset($_GET["total6"])){
$total6 = $_GET["total6"];
}
else{
$total6 = "";
}
// Getters for item 7
$number7 = "";
$desc7 = "";
$days7 = "";
$rate7 = "";
$total7 = "";
if(isset($_GET["number7"])){
$number7 = $_GET["number7"];
}
else{
$number7 = "";
}
if(isset($_GET["desc7"])){
$desc7 = $_GET["desc7"];
}
else{
$number7 = "";
}
if(isset($_GET["days7"])){
$days7 = $_GET["days7"];
}
else{
$days7 = "";
}
if(isset($_GET["rate7"])){
$rate7 = $_GET["rate7"];
}
else{
$rate7 = "";
}
if(isset($_GET["total7"])){
$total7 = $_GET["total7"];
}
else{
$total7 = "";
}
// Getters for item 8
$number8 = "";
$desc8 = "";
$days8 = "";
$rate8 = "";
$total8 = "";
if(isset($_GET["number8"])){
$number8 = $_GET["number8"];
}
else{
$number8 = "";
}
if(isset($_GET["desc8"])){
$desc8 = $_GET["desc8"];
}
else{
$number8 = "";
}
if(isset($_GET["days8"])){
$days8 = $_GET["days8"];
}
else{
$days8 = "";
}
if(isset($_GET["rate8"])){
$rate8 = $_GET["rate8"];
}
else{
$rate8 = "";
}
if(isset($_GET["total8"])){
$total8 = $_GET["total8"];
}
else{
$total8 = "";
}
// Getters for payment details
$hst="";
if(isset($_GET["hst"])){
$hst = $_GET["hst"];
}
else{
$hst = "";
}
$subtotal="";
if(isset($_GET["subtotal"])){
$subtotal = $_GET["subtotal"];
}
else{
$subtotal = "";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invoice</title>
<style>
#print-content {
display: none;
}
@media print {
#print-content {
display: block;
}
/* Set A4 size */
@page {
size: A4;
margin: 0;
}
.print-logo {
position: relative;
width: 100%;
height: 100%;
}
/* Hide the print button when printing */
.print-btn {
display: none;
}
.invoiceNumber {
position: absolute;
top: 125px;
right: 20px;
font-size: 17px;
font-weight: bold;
font-family:arial;
}
.invoiceDate {
position: absolute;
top: 147px;
right: 17px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.customerName {
position: absolute;
top: 275px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.customerAddress1 {
position: absolute;
top: 295px;
left: 40px;
font-size: 15px;
font-family:arial;
}
.customerAddress2 {
position: absolute;
top: 310px;
left: 40px;
font-size: 15px;
font-family:arial;
}
.customerAddress3 {
position: absolute;
top: 325px;
left: 40px;
font-size: 15px;
font-family:arial;
}
.serviceType1 {
position: absolute;
top: 325px;
right: 310px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.serviceType2 {
position: absolute;
top: 340px;
right: 310px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.serviceType3 {
position: absolute;
top: 355px;
right: 310px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 1 start ------------- */
.itemNumber1 {
position: absolute;
top: 410px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.descNumber1 {
position: absolute;
top: 410px;
left: 100px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.daysNumber1 {
position: absolute;
top: 410px;
right: 200px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.rateNumber1 {
position: absolute;
top: 410px;
right: 120px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.totalNumber1 {
position: absolute;
top: 410px;
right: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 1 end ------------- */
/* ------------- item 2 start ------------- */
.itemNumber2 {
position: absolute;
top: 430px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.descNumber2 {
position: absolute;
top: 430px;
left: 100px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.daysNumber2 {
position: absolute;
top: 430px;
right: 200px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.rateNumber2 {
position: absolute;
top: 430px;
right: 120px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.totalNumber2 {
position: absolute;
top: 430px;
right: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 2 end ------------- */
/* ------------- item 3 start ------------- */
.itemNumber3 {
position: absolute;
top: 450px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.descNumber3 {
position: absolute;
top: 450px;
left: 100px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.daysNumber3 {
position: absolute;
top: 450px;
right: 200px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.rateNumber3 {
position: absolute;
top: 450px;
right: 120px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.totalNumber3 {
position: absolute;
top: 450px;
right: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 3 end ------------- */
/* ------------- item 4 start ------------- */
.itemNumber4 {
position: absolute;
top: 470px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.descNumber4 {
position: absolute;
top: 470px;
left: 100px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.daysNumber4 {
position: absolute;
top: 470px;
right: 200px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.rateNumber4 {
position: absolute;
top: 470px;
right: 120px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.totalNumber4 {
position: absolute;
top: 470px;
right: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 4 end ------------- */
/* ------------- item 5 start ------------- */
.itemNumber5 {
position: absolute;
top: 490px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.descNumber5 {
position: absolute;
top: 490px;
left: 100px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.daysNumber5 {
position: absolute;
top: 490px;
right: 200px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.rateNumber5 {
position: absolute;
top: 490px;
right: 120px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.totalNumber5 {
position: absolute;
top: 490px;
right: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 5 end ------------- */
/* ------------- item 6 start ------------- */
.itemNumber6 {
position: absolute;
top: 510px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.descNumber6 {
position: absolute;
top: 510px;
left: 100px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.daysNumber6 {
position: absolute;
top: 510px;
right: 200px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.rateNumber6 {
position: absolute;
top: 510px;
right: 120px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.totalNumber6 {
position: absolute;
top: 510px;
right: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 6 end ------------- */
/* ------------- item 7 start ------------- */
.itemNumber7 {
position: absolute;
top: 530px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.descNumber7 {
position: absolute;
top: 530px;
left: 100px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.daysNumber7 {
position: absolute;
top: 530px;
right: 200px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.rateNumber7 {
position: absolute;
top: 530px;
right: 120px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.totalNumber7 {
position: absolute;
top: 530px;
right: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 7 end ------------- */
/* ------------- item 8 start ------------- */
.itemNumber8 {
position: absolute;
top: 550px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.descNumber8 {
position: absolute;
top: 550px;
left: 100px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.daysNumber8 {
position: absolute;
top: 550px;
right: 200px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.rateNumber8 {
position: absolute;
top: 550px;
right: 120px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.totalNumber8 {
position: absolute;
top: 550px;
right: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* ------------- item 8 end ------------- */
.date {
position: absolute;
top: 707px;
left: 180px;
font-size: 17px;
font-weight: bold;
font-family:arial;
}
.payment {
position: absolute;
top: 730px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.paymentRecord {
position: absolute;
top: 750px;
left: 40px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
/* total */
.hst {
position: absolute;
top: 735px;
right: 70px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.grandtotal {
position: absolute;
top: 752px;
right: 70px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.invoiceTotal {
position: absolute;
top: 813px;
right: 70px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
.balance {
position: absolute;
top: 852px;
right: 70px;
font-size: 15px;
font-weight: bold;
font-family:arial;
}
}
.print-btn {
display: none;
}
</style>
</head>
<body>
<button class="print-btn" onclick="printPage()">Print</button>
<div class="print-logo">
<div id="print-content">
<h3 class="invoiceNumber"><?php echo $invoiceNumber ?></h3>
<h3 class="invoiceDate"><?php echo $date ?></h3>
<h3 class="customerName"><?php echo $customerName ?></h3>
<h3 class="customerAddress1"><?php echo $customerAddress1?></h3>
<h3 class="customerAddress2"><?php echo $customerAddress2?></h3>
<h3 class="customerAddress3"><?php echo $customerAddress3?></h3>
<h3 class="serviceType1"><?php echo $serviceType1 ?></h3>
<h3 class="serviceType2"><?php echo $serviceType2 ?></h3>
<h3 class="serviceType3"><?php echo $serviceType3 ?></h3>
<!-- item 1 -->
<h3 class="itemNumber1"><?php echo $number1 ?></h3>
<h3 class="descNumber1"><?php echo $desc1 ?></h3>
<h3 class="rateNumber1"><?php echo $rate1 ?></h3>
<h3 class="totalNumber1"><?php echo $total1 ?></h3>
<h3 class='itemNumber2'><?php echo $number2 ?></h3>
<h3 class='descNumber2'><?php echo $desc2 ?></h3>
<h3 class='rateNumber2'><?php echo $rate2 ?></h3>
<h3 class='totalNumber2'><?php echo $total2 ?></h3>
<h3 class='itemNumber3'><?php echo $number3 ?></h3>
<h3 class='descNumber3'><?php echo $desc3 ?></h3>
<h3 class='rateNumber3'><?php echo $rate3 ?></h3>
<h3 class='totalNumber3'><?php echo $total3 ?></h3>
<h3 class='itemNumber4'><?php echo $number4 ?></h3>
<h3 class='descNumber4'><?php echo $desc4 ?></h3>
<h3 class='rateNumber4'><?php echo $rate4 ?></h3>
<h3 class='totalNumber4'><?php echo $total4 ?></h3>
<h3 class='itemNumber5'><?php echo $number5 ?></h3>
<h3 class='descNumber5'><?php echo $desc5 ?></h3>
<h3 class='rateNumber5'><?php echo $rate5 ?></h3>
<h3 class='totalNumber5'><?php echo $total5 ?></h3>
<h3 class='itemNumber6'><?php echo $number6 ?></h3>
<h3 class='descNumber6'><?php echo $desc6 ?></h3>
<h3 class='rateNumber6'><?php echo $rate6 ?></h3>
<h3 class='totalNumber6'><?php echo $total6 ?></h3>
<h3 class='itemNumber7'><?php echo $number7 ?></h3>
<h3 class='descNumber7'><?php echo $desc7 ?></h3>
<h3 class='rateNumber7'><?php echo $rate7 ?></h3>
<h3 class='totalNumber7'><?php echo $total7 ?></h3>
<h3 class='itemNumber8'><?php echo $number8 ?></h3>
<h3 class='descNumber8'><?php echo $desc8 ?></h3>
<h3 class='rateNumber8'><?php echo $rate8 ?></h3>
<h3 class='totalNumber8'><?php echo $total8 ?></h3>
<h3 class="date"><?php echo $date ?></h3>
<!-- total -->
<h3 class="hst"><?php echo $hst ?></h3>
<h3 class="grandtotal"><?php echo $subtotal ?></h3>
<h3 class="invoiceTotal"><?php echo $subtotal ?></h3>
<h3 class="balance"><?php echo $subtotal ?></h3>
</div>
<img src="images/invoiceNewDesign.png" alt="Your Logo" style="width: 100%; height: 100%;" />
</div>
<script>
function printPage() {
window.print();
}
window.addEventListener('load', function() {
printPage();
});
</script>
<script>
// Disable double click
document.addEventListener('DOMContentLoaded', function () {
document.addEventListener('dblclick', function (event) {
event.preventDefault();
});
});
// Disable right click
document.addEventListener('contextmenu', function (event) {
event.preventDefault();
});
// Disable right click on mouse down event
document.addEventListener('mousedown', function (event) {
if (event.button === 2) { // 2 represents the right mouse button
event.preventDefault();
}
});
// Disable Ctrl+S key combination
document.addEventListener('keydown', function (event) {
if (event.ctrlKey && event.key === 's') { // Check if Ctrl+S is pressed
event.preventDefault();
// Add your custom code or display a message indicating the restriction
}
});
</script>
</body>
</html>