From: <tim...@us...> - 2010-03-18 19:15:59
|
Revision: 3392 http://web-erp.svn.sourceforge.net/web-erp/?rev=3392&view=rev Author: tim_schofield Date: 2010-03-18 19:15:51 +0000 (Thu, 18 Mar 2010) Log Message: ----------- Tim: Add report of supplier ransactions entered on a given date Modified Paths: -------------- trunk/Payments.php trunk/SupplierCredit.php trunk/SupplierInvoice.php trunk/doc/Change.log.html trunk/includes/PDFPaymentRun_PymtFooter.php trunk/index.php trunk/sql/mysql/upgrade3.11.1-3.12.sql Added Paths: ----------- trunk/PDFSuppTransListing.php trunk/includes/PDFSuppTransListingPageHeader.inc Added: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php (rev 0) +++ trunk/PDFSuppTransListing.php 2010-03-18 19:15:51 UTC (rev 3392) @@ -0,0 +1,162 @@ +<?php + +/* $Id$*/ + +/* $Revision: 1.13 $ */ + +$PageSecurity = 3; +include('includes/SQL_CommonFunctions.inc'); +include ('includes/session.inc'); + +$InputError=0; +if (isset($_POST['Date']) AND !Is_Date($_POST['Date'])){ + $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; + $InputError=1; + unset($_POST['Date']); +} + +if (!isset($_POST['Date'])){ + + $title = _('Suppier Transaction Listing'); + include ('includes/header.inc'); + + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' ' + . _('Supplier Transaction Listing'); + + if ($InputError==1){ + prnMsg($msg,'error'); + } + + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '>'; + echo '<table> + <tr> + <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> + <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> + </tr>"; + + echo '<tr><td>' . _('Transaction type') . '</td><td>'; + + echo "<select name='TransType'>"; + + echo '<option value=20>' . _('Invoices').'</option>'; + echo '<option value=21>' . _('Credit Notes').'</option>'; + echo '<option value=22>' . _('Payments').'</option>'; + + echo '</select></td></tr>'; + + echo "</select></td></tr></table><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; + + + include('includes/footer.inc'); + exit; +} else { + + include('includes/ConnectDB.inc'); +} + +$sql= "SELECT type, + supplierno, + suppreference, + trandate, + ovamount, + ovgst, + transtext + FROM supptrans + WHERE type=" . $_POST['TransType'] . " + AND date_format(inputdate, '%Y/%m/%d')='".FormatDateForSQL($_POST['Date'])."'"; + +$result=DB_query($sql,$db,'','',false,false); + +if (DB_error_no($db)!=0){ + $title = _('Payment Listing'); + include('includes/header.inc'); + prnMsg(_('An error occurred getting the payments'),'error'); + if ($Debug==1){ + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br>' . $SQL,'error'); + } + include('includes/footer.inc'); + exit; +} elseif (DB_num_rows($result) == 0){ + $title = _('Payment Listing'); + include('includes/header.inc'); + prnMsg (_('There were no bank transactions found in the database within the period from') . ' ' . $_POST['Date'] ._('Please try again selecting a different date range or account'), 'error'); + include('includes/footer.inc'); + exit; +} + +include('includes/PDFStarter.php'); + +/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ + +$pdf->addInfo('Title',_('Supplier Transaction Listing')); +$pdf->addInfo('Subject',_('Supplier transaction listing from') . ' ' . $_POST['Date'] ); +$line_height=12; +$PageNumber = 1; +$TotalCheques = 0; + +include ('includes/PDFSuppTransListingPageHeader.inc'); + +while ($myrow=DB_fetch_array($result)){ + + $sql='SELECT suppname FROM suppliers WHERE supplierid="'.$myrow['supplierno'].'"'; + $supplierresult=DB_query($sql, $db); + $supplierrow=DB_fetch_array($supplierresult); + + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$supplierrow['suppname'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['suppreference'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],2), 'right'); + + $YPos -= ($line_height); + $TotalCheques = $TotalCheques - $myrow['ovamount']; + + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFChequeListingPageHeader.inc'); + } /*end of new page header */ +} /* end of while there are customer receipts in the batch to print */ + + +$YPos-=$line_height; +$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format(-$TotalCheques,2), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions'), 'left'); + +/* UldisN +$pdfcode = $pdf->output(); +$len = strlen($pdfcode); +header('Content-type: application/pdf'); +header('Content-Length: ' . $len); +header('Content-Disposition: inline; filename=ChequeListing.pdf'); +header('Expires: 0'); +header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); +header('Pragma: public'); + +$pdf->stream(); +*/ +$ReportFileName = $_SESSION['DatabaseName'] . '_ChequeListing_' . date('Y-m-d').'.pdf'; +$pdf->OutputD($ReportFileName);//UldisN +$pdf->__destruct(); //UldisN +if ($_POST['Email']=='Yes'){ + if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ + unlink($_SESSION['reports_dir'] . '/'.$ReportFileName); + } + $fp = fopen( $_SESSION['reports_dir'] . '/'.$ReportFileName,'wb'); + fwrite ($fp, $pdfcode); + fclose ($fp); + + include('includes/htmlMimeMail.php'); + + $mail = new htmlMimeMail(); + $attachment = $mail->getFile($_SESSION['reports_dir'] . '/'.$ReportFileName); + $mail->setText(_('Please find herewith payments listing from') . ' ' . $_POST['Date'] . ' ' . _('to') . ' ' . $_POST['ToDate']); + $mail->addAttachment($attachment, 'PaymentListing.pdf', 'application/pdf'); + $mail->setFrom(array('"' . $_SESSION['CompanyRecord']['coyname'] . '" <' . $_SESSION['CompanyRecord']['email'] . '>')); + + /* $ChkListingRecipients defined in config.php */ + $result = $mail->send($ChkListingRecipients); +} + +?> \ No newline at end of file Property changes on: trunk/PDFSuppTransListing.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2010-03-17 09:33:57 UTC (rev 3391) +++ trunk/Payments.php 2010-03-18 19:15:51 UTC (rev 3392) @@ -389,6 +389,7 @@ type, supplierno, trandate, + inputdate, suppreference, rate, ovamount, @@ -397,6 +398,7 @@ 22, '" . $_SESSION['PaymentDetail']->SupplierID . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', + '" . date('Y-m-d H-i-s') . "', '" . $_SESSION['PaymentDetail']->Paymenttype . "', " . ($_SESSION['PaymentDetail']->ExRate/$_SESSION['PaymentDetail']->FunctionalExRate) . ", " . (-$_SESSION['PaymentDetail']->Amount-$_SESSION['PaymentDetail']->Discount) . ", Modified: trunk/SupplierCredit.php =================================================================== --- trunk/SupplierCredit.php 2010-03-17 09:33:57 UTC (rev 3391) +++ trunk/SupplierCredit.php 2010-03-18 19:15:51 UTC (rev 3392) @@ -5,7 +5,7 @@ /*This page is very largely the same as the SupplierInvoice.php script the same result could have been acheived by using if statements in that script and just having the one SupplierTransaction.php script. However, to aid readability - variable names have been changed - -and reduce clutter (in the form of a heap of if statements) two separate scripts have been used, +and reduce clutter (in the form of a heap of if statements) two separate scripts have been used, both with very similar code. This does mean that if the logic is to be changed for supplier transactions then it needs to be changed @@ -108,9 +108,9 @@ $_SESSION['SuppTrans']->Terms = '0' . $myrow['daysbeforedue']; } $_SESSION['SuppTrans']->SupplierID = $_GET['SupplierID']; - - $LocalTaxProvinceResult = DB_query("SELECT taxprovinceid - FROM locations + + $LocalTaxProvinceResult = DB_query("SELECT taxprovinceid + FROM locations WHERE loccode = '" . $_SESSION['UserStockLocation'] . "'", $db); if(DB_num_rows($LocalTaxProvinceResult)==0){ @@ -118,24 +118,24 @@ include('includes/footer.inc'); exit; } - + $LocalTaxProvinceRow = DB_fetch_row($LocalTaxProvinceResult); $_SESSION['SuppTrans']->LocalTaxProvince = $LocalTaxProvinceRow[0]; - + $_SESSION['SuppTrans']->GetTaxes(); - - + + $_SESSION['SuppTrans']->GLLink_Creditors = $_SESSION['CompanyRecord']['gllink_creditors']; $_SESSION['SuppTrans']->GRNAct = $_SESSION['CompanyRecord']['grnact']; $_SESSION['SuppTrans']->CreditorsAct = $_SESSION['CompanyRecord']['creditorsact']; - + $_SESSION['SuppTrans']->InvoiceOrCredit = 'Credit Note'; } elseif (!isset($_SESSION['SuppTrans'])){ prnMsg(_('To enter a supplier credit note the supplier must first be selected from the supplier selection screen'),'warn'); echo "<br><a href='$rootpath/SelectSupplier.php?" . SID ."'>" . _('Select A Supplier to Enter an Credit Note For') . '</a>'; - include('includes/footer.inc'); + include('includes/footer.inc'); exit; /*It all stops here if there aint no supplier selected */ @@ -155,7 +155,7 @@ } $_SESSION['SuppTrans']->SuppReference = $_POST['SuppReference']; - + /*if (!isset($_POST['OvAmount'])) { $_POST['OvAmount'] = 0; }*/ @@ -307,9 +307,9 @@ echo $TableHeader; $TotalShiptValue=0; - + $i=0; - + foreach ($_SESSION['SuppTrans']->Shipts as $EnteredShiptRef){ echo '<tr><td>' . $EnteredShiptRef->ShiptRef . '</td><td class=number>' . @@ -359,7 +359,7 @@ <td class=number><font size=4 color=red><U>' . number_format($TotalGLValue,2) . '</U></font></td> </tr></table>'; } - + if (!isset($TotalGRNValue)) { $TotalGRNValue=0; } @@ -392,50 +392,50 @@ $TaxTotal =0; //initialise tax total foreach ($_SESSION['SuppTrans']->Taxes as $Tax) { - + echo '<tr><td>' . $Tax->TaxAuthDescription . '</td><td>'; - + /*Set the tax rate to what was entered */ if (isset($_POST['TaxRate' . $Tax->TaxCalculationOrder])){ $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate = $_POST['TaxRate' . $Tax->TaxCalculationOrder]/100; } - + /*If a tax rate is entered that is not the same as it was previously then recalculate automatically the tax amounts */ - + if (!isset($_POST['OverRideTax']) or $_POST['OverRideTax']=='Auto'){ - + echo ' <input type=TEXT class="number" name=TaxRate' . $Tax->TaxCalculationOrder . ' maxlength=4 size=4 VALUE=' . $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate * 100 . '>%'; - + /*Now recaluclate the tax depending on the method */ if ($Tax->TaxOnTax ==1){ - + $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate * ($_SESSION['SuppTrans']->OvAmount + $TaxTotal); - + } else { /*Calculate tax without the tax on tax */ - + $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate * $_SESSION['SuppTrans']->OvAmount; - + } - - + + echo '<input type=hidden name="TaxAmount' . $Tax->TaxCalculationOrder . '" VALUE=' . round($_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount,2) . '>'; - + echo '</td><td class=number>' . number_format($_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount,2); - + } else { /*Tax being entered manually accept the taxamount entered as is*/ $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = $_POST['TaxAmount' . $Tax->TaxCalculationOrder]; - + echo ' <input type=hidden name=TaxRate' . $Tax->TaxCalculationOrder . ' VALUE=' . $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate * 100 . '>'; - - + + echo '</td><td><input type=TEXT class="number" size=12 maxlength=12 name="TaxAmount' . $Tax->TaxCalculationOrder . '" VALUE=' . round($_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount,2) . '>'; - + } - + $TaxTotal += $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount; - - - echo '</td></tr>'; + + + echo '</td></tr>'; } $DisplayTotal = number_format($_SESSION['SuppTrans']->OvAmount + $TaxTotal,2); @@ -484,13 +484,13 @@ } } - + /*Need to recalc the taxtotal */ $TaxTotal=0; foreach ($_SESSION['SuppTrans']->Taxes as $Tax){ $TaxTotal += $Tax->TaxOvAmount; - } + } $InputError = False; if ( $TaxTotal + $_SESSION['SuppTrans']->OvAmount <= 0){ @@ -625,7 +625,7 @@ if (strlen($EnteredGRN->ShiptRef)==0 OR $EnteredGRN->ShiptRef=="" OR $EnteredGRN->ShiptRef==0){ /*so its not a shipment item */ /*so its not a shipment item enter the GL entry to reverse the GRN suspense entry created on delivery at standard cost used on delivery */ - + if ($EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv != 0) { $SQL = 'INSERT INTO gltrans (type, typeno, @@ -649,8 +649,8 @@ $Result = DB_query($SQL, $db, $ErrMsg, $Dbg, True); } - + $PurchPriceVar = round($EnteredGRN->This_QuantityInv * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit),2); /*Yes but where to post this difference to - if its a stock item the variance account must be retrieved from the stock category record if its a nominal purchase order item with no stock item then post it to the account specified in the purchase order detail record */ @@ -853,22 +853,22 @@ foreach ($_SESSION['SuppTrans']->Taxes as $Tax){ /* Now the TAX account */ - $SQL = 'INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + $SQL = 'INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES (21, ' . - $CreditNoteNo . ", - '" . $SQLCreditNoteDate . "', - " . $PeriodNo . ', - ' . $Tax->TaxGLCode . ", + $CreditNoteNo . ", + '" . $SQLCreditNoteDate . "', + " . $PeriodNo . ', + ' . $Tax->TaxGLCode . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Credit note') . ' ' . $_SESSION['SuppTrans']->SuppReference . ' ' . $_SESSION['SuppTrans']->CurrCode . $Tax->TaxOvAmount . ' @ ' . _('a rate of') . ' ' . $_SESSION['SuppTrans']->ExRate . - "', + "', " . round(-$Tax->TaxOvAmount/ $_SESSION['SuppTrans']->ExRate,2) . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the tax could not be added because'); @@ -909,6 +909,7 @@ suppreference, trandate, duedate, + inputdate, ovamount, ovgst, rate, @@ -919,6 +920,7 @@ '" . $_SESSION['SuppTrans']->SuppReference . "', '" . $SQLCreditNoteDate . "', '" . FormatDateForSQL($_SESSION['SuppTrans']->DueDate) . "', + '" . Date('Y-m-d H-i-s') . "', " . round(-$_SESSION['SuppTrans']->OvAmount,2) . ', ' .round(-$TaxTotal,2) . ', ' . $_SESSION['SuppTrans']->ExRate . ", @@ -929,22 +931,22 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); $SuppTransID = DB_Last_Insert_ID($db,'supptrans','id'); - + /* Insert the tax totals for each tax authority where tax was charged on the invoice */ foreach ($_SESSION['SuppTrans']->Taxes AS $TaxTotals) { - + $SQL = 'INSERT INTO supptranstaxes (supptransid, taxauthid, taxamount) VALUES (' . $SuppTransID . ', ' . $TaxTotals->TaxAuthID . ', ' . -$TaxTotals->TaxOvAmount . ')'; - + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The supplier transaction taxes records could not be inserted because'); $DbgMsg = _('The following SQL to insert the supplier transaction taxes record was used:'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } - + /* Now update the GRN and PurchOrderDetails records for amounts invoiced */ foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ @@ -1014,9 +1016,9 @@ $SQL='COMMIT'; $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg); - + prnMsg(_('Supplier credit note number') . ' ' . $CreditNoteNo . ' ' . _('has been processed'),'success'); - echo '<br><div class="centre"><a href="' . $rootpath . '/SupplierCredit.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID . '">' . _('Enter another Credit Note for this Supplier') . '</a></div>'; + echo '<br><div class="centre"><a href="' . $rootpath . '/SupplierCredit.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID . '">' . _('Enter another Credit Note for this Supplier') . '</a></div>'; unset($_SESSION['SuppTrans']->GRNs); unset($_SESSION['SuppTrans']->Shipts); unset($_SESSION['SuppTrans']->GLCodes); Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2010-03-17 09:33:57 UTC (rev 3391) +++ trunk/SupplierInvoice.php 2010-03-18 19:15:51 UTC (rev 3392) @@ -918,6 +918,7 @@ suppreference, trandate, duedate, + inputdate, ovamount, ovgst, rate, @@ -929,6 +930,7 @@ '" . $_SESSION['SuppTrans']->SuppReference . "', '" . $SQLInvoiceDate . "', '" . FormatDateForSQL($_SESSION['SuppTrans']->DueDate) . "', + '" . date('Y-m-d H-i-s') . "', " . round($_SESSION['SuppTrans']->OvAmount,2) . ', ' . round($TaxTotal,2) . ', ' . $_SESSION['SuppTrans']->ExRate . ", Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-17 09:33:57 UTC (rev 3391) +++ trunk/doc/Change.log.html 2010-03-18 19:15:51 UTC (rev 3392) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>18/03/10 Tim: Add report of supplier ransactions entered on a given date</p> <p>17/03/10 Tim: Various layout improvements to top items report</p> <p>16/03/10 Tim: PO_SelecOSPurchOrder.php - Various layout changes for consistency and to stick to coding guidelines</p> <p>16/03/10 Anand: DateFunctions.inc - When getting the period number compare the same date formats</p> Modified: trunk/includes/PDFPaymentRun_PymtFooter.php =================================================================== --- trunk/includes/PDFPaymentRun_PymtFooter.php 2010-03-17 09:33:57 UTC (rev 3391) +++ trunk/includes/PDFPaymentRun_PymtFooter.php 2010-03-18 19:15:51 UTC (rev 3392) @@ -31,6 +31,7 @@ supplierno, trandate, duedate, + inputdate, settled, rate, ovamount, @@ -42,6 +43,7 @@ '" . $SupplierID . "', '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', + '" . date('Y-m-d H-i-s') . "', 1, " . $_POST['ExRate'] . ", " . -$AccumBalance . ", Added: trunk/includes/PDFSuppTransListingPageHeader.inc =================================================================== --- trunk/includes/PDFSuppTransListingPageHeader.inc (rev 0) +++ trunk/includes/PDFSuppTransListingPageHeader.inc 2010-03-18 19:15:51 UTC (rev 3392) @@ -0,0 +1,60 @@ +<?php +/* $Id$*/ +if ($PageNumber>1){ + $pdf->newPage(); +} + +$YPos = $Page_Height - $Top_Margin - 50; + +$pdf->addJpegFromFile($_SESSION['LogoFile'],$Left_Margin,$YPos,0,50); + +$FontSize=15; + +Switch ($_POST['TransType']) { + case 20: + $TransType=_('Suppier Invoices'); + break; + case 21: + $TransType=_('Suppier Credit Notes'); + break; + case 22: + $TransType=_('Suppier Payments'); +} + +$XPos = $Left_Margin; +$YPos -= 40; +$pdf->addText($XPos, $YPos,$FontSize, $_SESSION['CompanyRecord']['coyname']); +$FontSize=12; +$pdf->addText($XPos, $YPos-20,$FontSize, $TransType . ' ' ._('input on') . ' ' . $_POST['Date']); + +$XPos = $Page_Width-$Right_Margin-50; +$YPos -=30; +$pdf->addText($XPos, $YPos,$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); + +$YPos -= $line_height; +/*Set up headings */ +$FontSize=8; + +$LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,_('Supplier'), 'centre'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,_('Reference'), 'centre'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,_('Trans Date'), 'centre'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,_('Net Amount'), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,_('Tax Amount'), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,_('Total Amount'), 'right'); +$YPos-=$line_height; + +/*draw a line */ +$pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); + +$YPos -= ($line_height); +?> \ No newline at end of file Property changes on: trunk/includes/PDFSuppTransListingPageHeader.inc ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-03-17 09:33:57 UTC (rev 3391) +++ trunk/index.php 2010-03-18 19:15:51 UTC (rev 3392) @@ -390,6 +390,11 @@ </tr> <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/PDFSuppTransListing.php?' . SID . '">' . _('List Daily Transactions') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo GetRptLinks('ap'); ?> </td> </tr> Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-03-17 09:33:57 UTC (rev 3391) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-03-18 19:15:51 UTC (rev 3392) @@ -51,7 +51,7 @@ ALTER TABLE `purchorderauth` ADD COLUMN `offhold` tinyint(1) NOT NULL DEFAULT 0; -UPDATE `www_users` SET `modulesallowed` = '1,1,1,1,1,1,1,1,1,1' +UPDATE `www_users` SET `modulesallowed` = '1,1,1,1,1,1,1,1,1,1' UPDATE securitytokens SET tokenname = 'Petty Cash' WHERE tokenid = 6; @@ -120,4 +120,7 @@ ADD CONSTRAINT `pctabs_ibfk_2` FOREIGN KEY (`typetabcode`) REFERENCES `pctypetabs` (`typetabcode`), ADD CONSTRAINT `pctabs_ibfk_3` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currabrev`), ADD CONSTRAINT `pctabs_ibfk_4` FOREIGN KEY (`authorizer`) REFERENCES `www_users` (`userid`), - ADD CONSTRAINT `pctabs_ibfk_5` FOREIGN KEY (`glaccountassignment`) REFERENCES `chartmaster` (`accountcode`); \ No newline at end of file + ADD CONSTRAINT `pctabs_ibfk_5` FOREIGN KEY (`glaccountassignment`) REFERENCES `chartmaster` (`accountcode`); + +ALTER TABLE `supptrans` + ADD COLUMN `inputdate` datetime NOT NULL AFTER `duedate` ; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |