-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpayment_report.php
107 lines (85 loc) · 2.35 KB
/
payment_report.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
include_once "inc/header.php";
require_once('assets/fpdf/fpdf.php');
require_once ('assets/fpdf/rotation.php');
class PDF extends PDF_Rotate
{
function Header()
{
//Put the watermark
//$this->SetFont('Arial','B',50);
//$this->SetTextColor(255,192,203);
//$this->RotatedText(65,190,'A p p r o v e d',45);
}
function RotatedText($x, $y, $txt, $angle)
{
//Text rotated around its origin
$this->Rotate($angle,$x,$y);
$this->Text($x,$y,$txt);
$this->Rotate(0);
}
}
if (isset($_GET['loan_id']) && isset($_GET['pay_id']) && isset($_GET['b_id'])) {
$loan_id = $_GET['loan_id'];
$pay_id = $_GET['pay_id'];
$b_id = $_GET['b_id'];
}
//$pdf = new FPDF();
$pdf=new PDF();
$pdf->AddPage();
$iubat='Brac Bank' ;
$pdf->Image('assets/brac.jpg',10,15,17);
$pdf->Ln();
$pdf-> Cell(20);
$pdf->SetFont('Times','',12);
$pdf->Write(4,'BRAC Bank is a private commercial bank');
$pdf->Ln();
$pdf-> Cell(20);
$pdf->SetFont('Times','',12);
$pdf->Write(4, 'Uttara Model Town, Dhaka 1230, Bangladesh');
$pdf->Ln();
$pdf-> Cell(20);
$pdf->SetFont('Times','',12);
$pdf->Write(4,'Phone: 0175465465, Email:info@bracbank.com');
$pdf->Ln();
$pdf-> Cell(20);
$pdf->SetFont('Times','',12);
$pdf->Write(4,'Web: www.bracbank.com');
$pdf-> Cell(20);
$pdf->SetFont('Times','',8);
$pdf->Write(5, '__________________________________________________________________________________________________________________________________');
$pdf->Ln();
$pdf->Ln();
$pdf-> Cell(85);
$pdf->SetFont('Times','U',12);
$pdf->Write(5, 'Payment report');
$pdf->Ln();
$pdf->Ln(2);
$qry = $ml->paymentReport($loan_id, $pay_id, $b_id);
$rec = $qry->fetch_assoc();
//var_dump($rec);
$pdf-> Cell(5);
$pdf->SetFont('Times','',14);
$pdf->Cell(60,10,'Name ', 1);
$pdf->Cell(80,10,$rec['name'], 1);
$pdf->Ln();
$pdf-> Cell(5);
$pdf->Cell(60,10,'Pay Date', 1);
$pdf->Cell(80,10,$rec['pay_date'], 1);
$pdf->Ln();
$pdf-> Cell(5);
$pdf->Cell(60,10,'Payment amount', 1);
$pdf->Cell(80,10,$rec['pay_amount']." tk", 1);
$pdf->Ln();
$pdf-> Cell(5);
$pdf->Cell(60,10,'Installments', 1);
$pdf->Cell(80,10,$rec['current_inst'], 1);
$pdf->Ln();
$pdf-> Cell(5);
$pdf->Cell(60,10,'Fine', 1);
$pdf->Cell(80,10,$rec['fine']." tk", 1);
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
ob_end_clean();
$pdf->Output();