forked from timschofield/webERP-svn
/
PDFPeriodStockTransListingPageHeader.inc
58 lines (43 loc) · 2.04 KB
/
PDFPeriodStockTransListingPageHeader.inc
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
<?php
if ($PageNumber>1){
$pdf->newPage();
}
$YPos = $Page_Height - $Top_Margin - 50;
$pdf->addJpegFromFile($_SESSION['LogoFile'],$Left_Margin,$YPos,0,50);
$FontSize=15;
$XPos = $Page_Width/2;
$YPos += 30;
$pdf->addText($XPos, $YPos,$FontSize, $_SESSION['CompanyRecord']['coyname']);
$FontSize=12;
$YPos -=30;
$pdf->addText($XPos, $YPos,$FontSize, $TransType . ' ' ._('dated from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']);
$XPos = $Page_Width-$Right_Margin-50;
$YPos -=30;
$pdf->addText($XPos, $YPos+10,$FontSize, _('Page') . ': ' . $PageNumber);
/*Now print out the company name and address */
$XPos = $Left_Margin;
$YPos -= $line_height;
/*draw a square grid for entering line items */
$pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos);
$pdf->line($Page_Width-$Right_Margin, $YPos,$Page_Width-$Right_Margin, $Bottom_Margin);
$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin,$XPos, $Bottom_Margin);
$pdf->line($XPos, $Bottom_Margin,$XPos, $YPos);
$pdf->line($Left_Margin+160, $YPos,$Left_Margin+160, $Bottom_Margin);
$pdf->line($Left_Margin+240, $YPos,$Left_Margin+240, $Bottom_Margin);
$pdf->line($Left_Margin+310, $YPos,$Left_Margin+310, $Bottom_Margin);
$pdf->line($Left_Margin+384, $YPos,$Left_Margin+384, $Bottom_Margin);
$pdf->line($Left_Margin+454, $YPos,$Left_Margin+454, $Bottom_Margin);
$YPos -= $line_height;
/*Set up headings */
$FontSize=8;
$LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,_('Stock Item'), 'left');
$LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,_('Reference'), 'left');
$LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,_('Trans Date'), 'left');
$LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,_('Quantity'), 'right');
$LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,_('Location'), 'right');
$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,_('Reference'), 'right');
$YPos-=$line_height;
/*draw a line */
$pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos);
$YPos -= ($line_height);
?>