-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathshowpayment.php
91 lines (91 loc) · 3.38 KB
/
showpayment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
session_start();
include('modules/dbhandler.php');
include('modules/functions.php');
if(isset($_SESSION['id'])){
if($_SESSION['privileges'] == 'sec' || $_SESSION['privileges'] == 'aux' || $_SESSION['privileges'] == 'den' || $_SESSION['privileges'] == 'man' || $_SESSION['privileges'] == 'web'){
if(isset($_GET['id'])){
$handler = new DBHandler();
$paymentdata = $handler->getPaymentDataById($_GET['id']);
if($paymentdata != null){
$patientdata = $handler->getPatientDataById($paymentdata['patient']);
$userdata = $handler->getUserDataById($paymentdata['user']);
}
}
else{
header('Location:error.php');
}
}
else{
header('Location:denied.php');
}
}
else{
header('Location:index.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dental: Mostrar Recaudo</title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
<?php include('includes/styles.php');?>
<?php include('includes/jquery.php');?>
<script type="text/javascript" src="js/showpayment.js"></script>
</head>
<body style="overflow:hidden">
<div class="report">
<p class="center intro"><img alt="logo" src="images/logo.png" /></p>
<p class="center intro">Centro Odontológico ABRAHAM</p>
<p class="center intro">Calle 30 No. 1-245 L1-2</p>
<p class="center intro">En la sede de Golden Group E.P.S.</p>
<p class="center intro">Tel.: 3340499 - Cel.:3015671906</p>
<p class="center intro">E-mail:[email protected]</p>
<hr />
<h2>Recibo de Caja</h2>
<?php
if($paymentdata != null){
?>
<p class="report"><span class="report">Id Recaudo: </span><?php echo $paymentdata['id'];?></p>
<p class="report"><span class="report">Paciente: </span><?php echo $patientdata['firstname'] . ' ' . $patientdata['firstlastname'] . ' ' . $patientdata['secondlastname'];?></p>
<p class="report"><span class="report">Recibido por: </span><?php echo $userdata['firstname'] . ' ' . $userdata['firstlastname'] . ' ' . $userdata['secondlastname'];?></p>
<p class="report"><span class="report">Fecha: </span><?php echo toFormDate($paymentdata['date']);?></p>
<p class="report"><span class="report">Valor: </span>$<?php echo number_format($paymentdata['value']);?></p>
<p class="report"><span class="report">Forma de recaudo: </span><?php echo getPaymenttypeName($paymentdata['paymenttype']);?></p>
<?php
if($paymentdata['number'] != null){
?>
<p class="report"><span class="report">Número: </span><?php echo $paymentdata['number'];?></p>
<?php
}
else{
?>
<p class="report"><span class="report">Número: </span>---</p>
<?php
}
?>
<p class="report"><span class="report">Banco: </span><?php echo $handler->getBankName($paymentdata['bank']);?></p>
<?php
if($paymentdata['description'] != null){
?>
<p class="report"><span class="report">Descripción: </span><?php echo $paymentdata['description'];?></p>
<?php
}
?>
<form action="#">
<p class="form center">
<input type="button" value="Imprimir Recibo" />
</p>
</form>
<?php
}
else{
?>
<p class="center warning">Recaudo no encontrado</p>
<?php
}
?>
</div>
</body>
</html>