|
From: <rc...@us...> - 2014-05-24 19:25:51
|
Revision: 6729
http://sourceforge.net/p/web-erp/reponame/6729
Author: rchacon
Date: 2014-05-24 19:25:49 +0000 (Sat, 24 May 2014)
Log Message:
-----------
Includes quotation date in header (instead of quotation creation date) and quotation number in file name.
Modified Paths:
--------------
trunk/DeliveryDetails.php
trunk/PDFQuotation.php
trunk/PDFQuotationPortrait.php
trunk/includes/PDFQuotationPageHeader.inc
trunk/includes/PDFQuotationPortraitPageHeader.inc
Modified: trunk/DeliveryDetails.php
===================================================================
--- trunk/DeliveryDetails.php 2014-05-24 19:18:16 UTC (rev 6728)
+++ trunk/DeliveryDetails.php 2014-05-24 19:25:49 UTC (rev 6729)
@@ -618,13 +618,13 @@
echo '<br /><table class="selection">
<tr>
<td><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Order') . '" alt=""></td>
- <td>' . ' ' . '<a href="' . $RootPath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">' . _('Print Quotation (Landscape)') . '</a></td>
+ <td>' . ' ' . '<a href="' . $RootPath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '" target="_blank">' . _('Print Quotation (Landscape)') . '</a></td>
</tr>
</table>';
echo '<br /><table class="selection">
<tr>
<td><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Order') . '" alt="" /></td>
- <td>' . ' ' . '<a href="' . $RootPath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">' . _('Print Quotation (Portrait)') . '</a></td>
+ <td>' . ' ' . '<a href="' . $RootPath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '" target="_blank">' . _('Print Quotation (Portrait)') . '</a></td>
</tr>
</table>';
}
@@ -804,13 +804,13 @@
echo '<br /><table class="selection">
<tr>
<td><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Order') . '" alt=""></td>
- <td>' . ' ' . '<a href="' . $RootPath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '">' . _('Print Quotation (Landscape)') . '</a></td>
+ <td>' . ' ' . '<a href="' . $RootPath . '/PDFQuotation.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '" target="_blank">' . _('Print Quotation (Landscape)') . '</a></td>
</tr>
</table>';
echo '<br /><table class="selection">
<tr>
<td><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Order') . '" alt="" /></td>
- <td>' . ' ' . '<a href="' . $RootPath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '">' . _('Print Quotation (Portrait)') . '</a></td>
+ <td>' . ' ' . '<a href="' . $RootPath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $_SESSION['ExistingOrder'.$identifier] . '" target="_blank">' . _('Print Quotation (Portrait)') . '</a></td>
</tr>
</table>';
}else{
Modified: trunk/PDFQuotation.php
===================================================================
--- trunk/PDFQuotation.php 2014-05-24 19:18:16 UTC (rev 6728)
+++ trunk/PDFQuotation.php 2014-05-24 19:25:49 UTC (rev 6729)
@@ -55,6 +55,7 @@
shippers.shippername,
salesorders.printedpackingslip,
salesorders.datepackingslipprinted,
+ salesorders.quotedate,
salesorders.branchcode,
locations.taxprovinceid,
locations.locationname,
@@ -270,7 +271,7 @@
include('includes/footer.inc');
exit;
} else {
- $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');
+ $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . $_GET['QuotationNo'] . '_' . date('Y-m-d') . '.pdf');
$pdf->__destruct();
}
-?>
\ No newline at end of file
+?>
Modified: trunk/PDFQuotationPortrait.php
===================================================================
--- trunk/PDFQuotationPortrait.php 2014-05-24 19:18:16 UTC (rev 6728)
+++ trunk/PDFQuotationPortrait.php 2014-05-24 19:25:49 UTC (rev 6729)
@@ -57,6 +57,7 @@
shippers.shippername,
salesorders.printedpackingslip,
salesorders.datepackingslipprinted,
+ salesorders.quotedate,
salesorders.branchcode,
locations.taxprovinceid,
locations.locationname,
@@ -274,7 +275,7 @@
include('includes/footer.inc');
exit;
} else {
- $pdf->OutputD($_SESSION['DatabaseName'] . '_Quotation_' . date('Y-m-d') . '.pdf');
+ $pdf->OutputI($_SESSION['DatabaseName'] . '_Quotation_' . $_GET['QuotationNo'] . '_' . date('Y-m-d') . '.pdf');
$pdf->__destruct();
}
?>
Modified: trunk/includes/PDFQuotationPageHeader.inc
===================================================================
--- trunk/includes/PDFQuotationPageHeader.inc 2014-05-24 19:18:16 UTC (rev 6728)
+++ trunk/includes/PDFQuotationPageHeader.inc 2014-05-24 19:25:49 UTC (rev 6729)
@@ -16,7 +16,7 @@
// Print 'Quotation' info
$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*1, 200, $FontSize, _('Number'). ': '.$_GET['QuotationNo'], 'right');
$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*2, 200, $FontSize, _('Your Ref'). ': '.$myrow['customerref'], 'right');
-$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*3, 200, $FontSize, _('Date'). ': '.ConvertSQLDate($myrow['orddate']), 'right');
+$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*3, 200, $FontSize, _('Date'). ': '.ConvertSQLDate($myrow['quotedate']), 'right');
$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*4, 200, $FontSize, _('Page').': '.$PageNumber, 'right');
// Print company logo
@@ -112,4 +112,4 @@
$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $Bottom_Margin+350);
$YPos -= (2*$line_height);
-?>
\ No newline at end of file
+?>
Modified: trunk/includes/PDFQuotationPortraitPageHeader.inc
===================================================================
--- trunk/includes/PDFQuotationPortraitPageHeader.inc 2014-05-24 19:18:16 UTC (rev 6728)
+++ trunk/includes/PDFQuotationPortraitPageHeader.inc 2014-05-24 19:25:49 UTC (rev 6729)
@@ -85,7 +85,7 @@
$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*1, 200, $FontSize, _('Number'). ': '.$_GET['QuotationNo'], 'right');
$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*2, 200, $FontSize, _('Your Ref'). ': '.$myrow['customerref'], 'right');
-$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*3, 200, $FontSize, _('Date'). ': '.ConvertSQLDate($myrow['orddate']), 'right');
+$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*3, 200, $FontSize, _('Date'). ': '.ConvertSQLDate($myrow['quotedate']), 'right');
$pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*4, 200, $FontSize, _('Page').': '.$PageNumber, 'right');
$pdf->addText($Page_Width/2-10, $YPos+15, $FontSize, _('All amounts stated in') . ' - ' . $myrow['currcode']);
|