From: <tim...@us...> - 2010-03-01 17:38:48
|
Revision: 3364 http://web-erp.svn.sourceforge.net/web-erp/?rev=3364&view=rev Author: tim_schofield Date: 2010-03-01 17:38:42 +0000 (Mon, 01 Mar 2010) Log Message: ----------- Tim: PrintCustTrans.php - Correctly show html and pdf formats Modified Paths: -------------- trunk/PrintCustTrans.php trunk/doc/Change.log.html Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2010-03-01 08:28:30 UTC (rev 3363) +++ trunk/PrintCustTrans.php 2010-03-01 17:38:42 UTC (rev 3364) @@ -362,20 +362,22 @@ } /* end loop to print invoices */ // Start FPDI concatination to append PDF files conditionally to the invoice // This part taken from FPDI example page -not used yet since change to TCPDF Dec 2009 -class concat_pdf extends FPDI { - var $files = array(); - function setFiles($files) { - $this->files = $files; - } - function concat() { - foreach($this->files as $file) { - if ($file != 'pdf_append/none') { - $pagecount = $this->setSourceFile($file); - for ($i = 1;$i <= $pagecount;$i++) { - $tplidx = $this->ImportPage($i); - $s = $this->getTemplatesize($tplidx); - $this->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); - $this->useTemplate($tplidx); +if ($PrintPDF) { + class concat_pdf extends FPDI { + var $files = array(); + function setFiles($files) { + $this->files = $files; + } + function concat() { + foreach($this->files as $file) { + if ($file != 'pdf_append/none') { + $pagecount = $this->setSourceFile($file); + for ($i = 1;$i <= $pagecount;$i++) { + $tplidx = $this->ImportPage($i); + $s = $this->getTemplatesize($tplidx); + $this->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); + $this->useTemplate($tplidx); + } } } } @@ -388,7 +390,7 @@ } elseif (isset($_POST['FromTransNo'])) { $FromTransNo = trim($_POST['FromTransNo']); } -if ($InvOrCredit == 'Invoice') { +if (($InvOrCredit == 'Invoice' or $InvOrCredit == 'Credit') and $PrintPDF=='True') { $sql = 'SELECT stockmoves.stockid, stockmaster.appendfile FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-01 08:28:30 UTC (rev 3363) +++ trunk/doc/Change.log.html 2010-03-01 17:38:42 UTC (rev 3364) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>01/03/10 Tim: PrintCustTrans.php - Correctly show html and pdf formats</p> <p>01/03/10 Pak Ricard: PDFPriceList.php - Updated price list report</p> <p>01/03/10 Harald: PcExpensesTypeTabv.php - Correct message on deletion of tab</p> <p>01/03/10 Harald: PcExpensesTypeTabv.php - Missing space</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-03 13:48:04
|
Revision: 3365 http://web-erp.svn.sourceforge.net/web-erp/?rev=3365&view=rev Author: tim_schofield Date: 2010-03-03 13:47:58 +0000 (Wed, 03 Mar 2010) Log Message: ----------- New PcReportTab with limited tab view (supervised or own) tabs. Modified Paths: -------------- trunk/PcReportTab.php trunk/doc/Change.log.html Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2010-03-01 17:38:42 UTC (rev 3364) +++ trunk/PcReportTab.php 2010-03-03 13:47:58 UTC (rev 3365) @@ -19,29 +19,31 @@ include ('includes/header.inc'); echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; - + if (!isset($_POST['FromDate'])){ $_POST['FromDate']=Date($_SESSION['DefaultDateFormat'], mktime(0,0,0,Date('m'),1,Date('Y'))); } - + if (!isset($_POST['ToDate'])){ $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']); } - + /*Show a form to allow input of criteria for Tabs to show */ echo '<table>'; echo '<tr><td>' . _('Code Of Petty Cash Tab') . ":</td><td><select name='SelectedTabs'>"; DB_free_result($result); - - if ($_SESSION['AccessLevel'] >= 8){ // GL user (to supervise the supervisor) + + if ($_SESSION['AccessLevel'] >= 15){ // superuser can supervise the supervisors $SQL = "SELECT tabcode - FROM pctabs"; + FROM pctabs + ORDER BY tabcode"; }else{ $SQL = "SELECT tabcode FROM pctabs - WHERE authorizer='" . $_SESSION['UserID'] . "'"; - } + WHERE ( authorizer='" . $_SESSION['UserID'] . "' OR usercode ='" . $_SESSION['UserID'] . "' ) + ORDER BY tabcode"; + } $result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($result)) { @@ -51,10 +53,10 @@ echo "<option VALUE='"; } echo $myrow['tabcode'] . "'>" . $myrow['tabcode']; - + } //end while loop get type of tab - + echo '</select></td></tr>'; echo'<tr><td>' . _('From Date :') . '</td><td>'; echo '<input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="TEXT" name="FromDate" maxlength="10" size="11" VALUE="' . $_POST['FromDate'] . '">'; @@ -66,23 +68,23 @@ echo "<input type=submit Name='PrintPDF' Value='"._('PrintPDF')."'></div>"; } else if (isset($_POST['PrintPDF'])) { - - + + include('includes/PDFStarter.php'); $PageNumber = 0; $FontSize = 10; $pdf->addinfo('Title', _('Petty Cash Report Of Tab') ); $pdf->addinfo('Subject', _('Petty Cash Report Of Tab') ); $line_height = 12; - + $SQL_FromDate = FormatDateForSQL($_POST['FromDate']); $SQL_ToDate = FormatDateForSQL($_POST['ToDate']); - + $SQL = "SELECT * FROM pcashdetails WHERE tabcode='$SelectedTabs' - AND date >='" . $SQL_FromDate . "' AND date <= '" . $SQL_ToDate . "' + AND date >='" . $SQL_FromDate . "' AND date <= '" . $SQL_ToDate . "' ORDER BY date, counterindex ASC"; - + $TabDetail = DB_query($SQL,$db); if (DB_error_no($db)!=0){ @@ -102,29 +104,29 @@ include('includes/footer.inc'); exit; } - + include('includes/PDFTabReportHeader.inc'); - + $SqlTabs = "SELECT * FROM pctabs WHERE tabcode='$SelectedTabs'"; - + $TabResult = DB_query($SqlTabs, $db, _('No Petty Cash tabs were returned by the SQL because'), _('The SQL that failed was:')); - + $Tabs=DB_fetch_array($TabResult); - + $SqlBalance = "SELECT SUM(amount) FROM pcashdetails WHERE tabcode='$SelectedTabs' AND date<'".$SQL_FromDate."'"; - + $TabBalance = DB_query($SqlBalance, $db); - + $Balance=DB_fetch_array($TabBalance); - + if( !isset($Balance['0'])){ $Balance['0']=0; } - + $YPos -= (2 * $line_height); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Tab Code :')); $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); @@ -132,7 +134,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+290,$YPos,70,$FontSize,_('From ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,20,$FontSize,_(': ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+340,$YPos,70,$FontSize,$_POST['FromDate']); - + $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('User ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); @@ -140,27 +142,27 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+290,$YPos,70,$FontSize,_('To ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,20,$FontSize,_(': ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+340,$YPos,70,$FontSize,$_POST['ToDate']); - + $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Authorizer ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,70,$FontSize,$Tabs['authorizer']); - + $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Currency ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,70,$FontSize,$Tabs['currency']); - + $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,40,$FontSize,_('Balance before ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,70,$FontSize,$_POST['FromDate']); $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,70,$FontSize,number_format($Balance['0'],2)); $LeftOvers = $pdf->addTextWrap($Left_Margin+140,$YPos,70,$FontSize,$Tabs['currency']); - + $YPos -= (2 * $line_height); $pdf->line($Page_Width-$Right_Margin, $YPos+$line_height,$Left_Margin, $YPos+$line_height); - + $YPos -= (2 * $line_height); $FontSize = 8; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,70,$FontSize,_('Date Of Expense')); @@ -171,16 +173,16 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,100,$FontSize,_('Date Authorizer')); $pdf->selectFont('./fonts/Helvetica.afm'); $YPos -= (2 * $line_height); - + while ($myrow=DB_fetch_array($TabDetail)) { - - $sqldes="SELECT description - FROM pcexpenses + + $sqldes="SELECT description + FROM pcexpenses WHERE codeexpense='". $myrow[3] . "'"; - + $ResultDes = DB_query($sqldes,$db); $Description=DB_fetch_array($ResultDes); - + if (!isset($Description[0])){ $Description[0]='ASSIGNCASH'; } @@ -193,35 +195,35 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,70,$FontSize,$myrow['receipt']); $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,ConvertSQLDate($myrow['authorized'])); $YPos -= $line_height; - + } //end of while loop - - $sqlamount="SELECT sum(amount) + + $sqlamount="SELECT sum(amount) FROM pcashdetails WHERE tabcode='$SelectedTabs' AND date<='".$SQL_ToDate."'"; - + $ResultAmount = DB_query($sqlamount,$db); $Amount=DB_fetch_array($ResultAmount); - + if (!isset($Amount[0])) { $Amount[0]=0; } - - - + + + $YPos -= (2 * $line_height); - $pdf->line($Left_Margin+250, $YPos+$line_height,$Left_Margin+500, $YPos+$line_height); + $pdf->line($Left_Margin+250, $YPos+$line_height,$Left_Margin+500, $YPos+$line_height); $LeftOvers = $pdf->addTextWrap($Left_Margin+70,$YPos,100,$FontSize,_('Balance at')); $LeftOvers = $pdf->addTextWrap($Left_Margin+110,$YPos,70,$FontSize,$_POST['ToDate']); $LeftOvers = $pdf->addTextWrap($Left_Margin+160,$YPos,20,$FontSize,_(': ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+160,$YPos,70,$FontSize,number_format($Amount[0],2),'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,70,$FontSize,$Tabs['currency']); $pdf->line($Page_Width-$Right_Margin, $YPos+$line_height,$Left_Margin, $YPos+$line_height); - + $pdfcode = $pdf->output(); $len = strlen($pdfcode); - + if ($len<=20){ $title = _('Print Report Tab Error'); include('includes/header.inc'); @@ -255,82 +257,82 @@ $SqlTabs = "SELECT * FROM pctabs WHERE tabcode='$SelectedTabs'"; - + $TabResult = DB_query($SqlTabs, $db, _('No Petty Cash Tabs were returned by the SQL because'), _('The SQL that failed was:')); - + $Tabs=DB_fetch_array($TabResult); - + echo "<br><table >"; - + echo '<tr><td>' . _('Tab Code') . '</td> <td>:</td> <td width=200>' . ''.$SelectedTabs.'</td>' . '<td>' . _('From') . '</td><td>:</td><td>' . ''.$_POST['FromDate'].'</td></tr>'; - + echo '<tr><td>' . _('User') . '</td> <td>:</td> <td>' . ''.$Tabs['usercode'].'</td>'. '<td>' . _('To') . '</td><td>:</td><td>' . ''.$_POST['ToDate'].'</td></tr>'; - + echo '<tr><td>' . _('Authorizer') . '</td><td>:</td><td>' . ''.$Tabs['authorizer'].'</td> </tr>'; echo '<tr><td>' . _('Currency') . '</td><td>:</td><td>' . ''.$Tabs['currency'].'</td> </tr>'; - - $SqlBalance = "SELECT SUM(amount) + + $SqlBalance = "SELECT SUM(amount) FROM pcashdetails WHERE tabcode='$SelectedTabs' AND date<'".$SQL_FromDate."'"; - + $TabBalance = DB_query($SqlBalance, $db); $Balance=DB_fetch_array($TabBalance); - + if( !isset($Balance['0'])){ $Balance['0']=0; } - + echo '<tr><td>' . _('Balance before ') . ''.$_POST['FromDate'].'</td><td>:</td><td>' . ''.$Balance['0'].' '.$Tabs['currency'].'</td></tr>'; - $SqlBalanceNotAut = "SELECT SUM(amount) + $SqlBalanceNotAut = "SELECT SUM(amount) FROM pcashdetails WHERE tabcode= '$SelectedTabs' AND authorized = '0000-00-00' AND date<'".$SQL_FromDate."'"; - + $TabBalanceNotAut = DB_query($SqlBalanceNotAut, $db); $BalanceNotAut=DB_fetch_array($TabBalanceNotAut); - + if( !isset($BalanceNotAut['0'])){ $BalanceNotAut['0']=0; } - + echo '<tr><td>' . _('Total not authorized before ') . ''.$_POST['FromDate'].'</td><td>:</td><td>' . ''.$BalanceNotAut['0'].' '.$Tabs['currency'].'</td></tr>'; echo '</table>'; - + /*show a table of the accounts info returned by the SQL Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ - + $SQL = "SELECT * FROM pcashdetails WHERE tabcode='$SelectedTabs' - AND date >='" . $SQL_FromDate . "' + AND date >='" . $SQL_FromDate . "' AND date <= '" . $SQL_ToDate . "' ORDER BY date, counterindex Asc"; - + $TabDetail = DB_query($SQL, $db, _('No Petty Cash movements for this tab were returned by the SQL because'), _('The SQL that failed was:')); - + echo '<br><table BORDER=1>'; echo "<tr> <th>" . _('Date Of Expense') . "</th> @@ -352,15 +354,15 @@ echo '<tr class="OddTableRows">'; $k=1; } - - - $sqldes="SELECT description - FROM pcexpenses + + + $sqldes="SELECT description + FROM pcexpenses WHERE codeexpense='". $myrow['3'] . "'"; - + $ResultDes = DB_query($sqldes,$db); $Description=DB_fetch_array($ResultDes); - + if (!isset($Description['0'])){ $Description['0']='ASSIGNCASH'; } @@ -396,20 +398,20 @@ } - $sqlamount="SELECT sum(amount) + $sqlamount="SELECT sum(amount) FROM pcashdetails WHERE tabcode='$SelectedTabs' AND date<='".$SQL_ToDate."'"; - + $ResultAmount = DB_query($sqlamount,$db); $Amount=DB_fetch_array($ResultAmount); - + if (!isset($Amount[0])) { $Amount[0]=0; } - + echo '<tr><td colspan=2 style=text-align:right >' . _('Balance At') . ' '.$_POST['ToDate'].':</td> - <td>'.number_format($Amount[0],2).' </td><td>'.$Tabs['currency'].'</td></tr>'; + <td>'.number_format($Amount[0],2).' </td><td>'.$Tabs['currency'].'</td></tr>'; echo '</table>'; echo '<br><div class="centre"><input type=submit Name="SelectDifferentDate" Value="' . _('Select A Different Date') . '"></div>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-01 17:38:42 UTC (rev 3364) +++ trunk/doc/Change.log.html 2010-03-03 13:47:58 UTC (rev 3365) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>01/03/10 Pak Ricard: PcReportTab.php - New PcReportTab with limited tab view (supervised or own) tabs.</p> <p>01/03/10 Tim: PrintCustTrans.php - Correctly show html and pdf formats</p> <p>01/03/10 Pak Ricard: PDFPriceList.php - Updated price list report</p> <p>01/03/10 Harald: PcExpensesTypeTabv.php - Correct message on deletion of tab</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-03 16:07:17
|
Revision: 3366 http://web-erp.svn.sourceforge.net/web-erp/?rev=3366&view=rev Author: tim_schofield Date: 2010-03-03 16:07:10 +0000 (Wed, 03 Mar 2010) Log Message: ----------- Tim: WorkCentres.php - Default value for overhead per hour Modified Paths: -------------- trunk/WorkCentres.php trunk/doc/Change.log.html Modified: trunk/WorkCentres.php =================================================================== --- trunk/WorkCentres.php 2010-03-03 13:47:58 UTC (rev 3365) +++ trunk/WorkCentres.php 2010-03-03 16:07:10 UTC (rev 3366) @@ -203,7 +203,6 @@ if (!isset($_POST['Description'])) { $_POST['Description'] = ''; } - echo '<tr><td>' . _('Work Centre Description') . ":</td> <td><input type='Text' name='Description' size=21 maxlength=20 value='" . $_POST['Description'] . "'></td> </tr> @@ -254,9 +253,10 @@ echo '</td></tr>'; echo '<tr><td>' . _('Overhead Per Hour') . ':</td> - <td><input type="Text" class="number" name="OverheadPerHour" size=6 maxlength=6></td></tr> - </table>'; + <td><input type="Text" class="number" name="OverheadPerHour" size=6 maxlength=6 value='.$_POST['OverheadPerHour'].'>'; +echo '</td></tr></table>'; + echo '<br><div class="centre"><input type="Submit" name="submit" value="' . _('Enter Information') . '"></div>'; if (!isset($_GET['SelectedWC']) or $_GET['SelectedWC']=='') { @@ -267,4 +267,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-03 13:47:58 UTC (rev 3365) +++ trunk/doc/Change.log.html 2010-03-03 16:07:10 UTC (rev 3366) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>01/03/10 Tim: WorkCentres.php - Default value for overhead per hour</p> <p>01/03/10 Pak Ricard: PcReportTab.php - New PcReportTab with limited tab view (supervised or own) tabs.</p> <p>01/03/10 Tim: PrintCustTrans.php - Correctly show html and pdf formats</p> <p>01/03/10 Pak Ricard: PDFPriceList.php - Updated price list report</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-04 16:10:05
|
Revision: 3367 http://web-erp.svn.sourceforge.net/web-erp/?rev=3367&view=rev Author: tim_schofield Date: 2010-03-04 16:09:58 +0000 (Thu, 04 Mar 2010) Log Message: ----------- Tim: PDFQuotation.php - Remove call to SelectFont function Modified Paths: -------------- trunk/PDFQuotation.php trunk/doc/Change.log.html Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2010-03-03 16:07:10 UTC (rev 3366) +++ trunk/PDFQuotation.php 2010-03-04 16:09:58 UTC (rev 3367) @@ -53,8 +53,8 @@ locations WHERE salesorders.debtorno=debtorsmaster.debtorno AND salesorders.shipvia=shippers.shipper_id - AND salesorders.fromstkloc=locations.loccode - AND salesorders.quotation=1 + AND salesorders.fromstkloc=locations.loccode + AND salesorders.quotation=1 AND salesorders.orderno=" . $_GET['QuotationNo']; $result=DB_query($sql,$db, $ErrMsg); @@ -87,17 +87,17 @@ $FontSize=12; $PageNumber = 1; $line_height=24; -$pdf->selectFont('./fonts/Helvetica.afm'); +// $pdf->selectFont('./fonts/Helvetica.afm'); /* Now ... Has the order got any line items still outstanding to be invoiced */ $ErrMsg = _('There was a problem retrieving the quotation line details for quotation Number') . ' ' . $_GET['QuotationNo'] . ' ' . _('from the database'); -$sql = "SELECT salesorderdetails.stkcode, - stockmaster.description, - salesorderdetails.quantity, - salesorderdetails.qtyinvoiced, +$sql = "SELECT salesorderdetails.stkcode, + stockmaster.description, + salesorderdetails.quantity, + salesorderdetails.qtyinvoiced, salesorderdetails.unitprice, salesorderdetails.discountpercent, stockmaster.taxcatid, @@ -115,20 +115,22 @@ include('includes/PDFQuotationPageHeader.inc'); $QuotationTotal =0; + $QuotationTotalEx=0; + $TaxTotal=0; while ($myrow2=DB_fetch_array($result)){ $ListCount ++; - if ((strlen($myrow2['narrative']) >200 AND $YPos-$line_height <= 75) - OR (strlen($myrow2['narrative']) >1 AND $YPos-$line_height <= 62) + if ((strlen($myrow2['narrative']) >200 AND $YPos-$line_height <= 75) + OR (strlen($myrow2['narrative']) >1 AND $YPos-$line_height <= 62) OR $YPos-$line_height <= 50){ /* We reached the end of the page so finsih off the page and start a newy */ $PageNumber++; include ('includes/PDFQuotationPageHeader.inc'); } //end if need a new page headed up - + $DisplayQty = number_format($myrow2['quantity'],2); $DisplayPrevDel = number_format($myrow2['qtyinvoiced'],2); $DisplayPrice = number_format($myrow2['unitprice'],2); @@ -140,16 +142,16 @@ $sql3 = " select taxgrouptaxes.taxauthid from taxgrouptaxes INNER JOIN custbranch ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid WHERE custbranch.branchcode='" .$Branch ."'"; $result3=DB_query($sql3,$db, $ErrMsg); while ($myrow3=DB_fetch_array($result3)){ - $TaxAuth = $myrow3['taxauthid']; + $TaxAuth = $myrow3['taxauthid']; } - + $sql4 = "SELECT * FROM taxauthrates WHERE dispatchtaxprovince=" .$TaxProv ." AND taxcatid=" .$TaxCat ." AND taxauthority=" .$TaxAuth; $result4=DB_query($sql4,$db, $ErrMsg); while ($myrow4=DB_fetch_array($result4)){ - $TaxClass = 100 * $myrow4['taxrate']; + $TaxClass = 100 * $myrow4['taxrate']; } - $DisplayTaxClass = $TaxClass . "%"; + $DisplayTaxClass = $TaxClass . "%"; $TaxAmount = (($SubTot/100)*(100+$TaxClass))-$SubTot; $DisplayTaxAmount = number_format($TaxAmount,2); @@ -162,7 +164,7 @@ $LeftOvers = $pdf->addTextWrap(145,$YPos,295,$FontSize,$myrow2['description']); $LeftOvers = $pdf->addTextWrap(420,$YPos,85,$FontSize,$DisplayQty,'right'); $LeftOvers = $pdf->addTextWrap(485,$YPos,85,$FontSize,$DisplayPrice,'right'); - if ($DisplayDiscount > 0){ + if ($DisplayDiscount > 0){ $LeftOvers = $pdf->addTextWrap(535,$YPos,85,$FontSize,$DisplayDiscount,'right'); } $LeftOvers = $pdf->addTextWrap(585,$YPos,85,$FontSize,$DisplayTaxClass,'right'); @@ -179,13 +181,13 @@ $QuotationTotal +=$LineTotal; $QuotationTotalEx +=$SubTot; $TaxTotal +=$TaxAmount; - + /*increment a line down for the next line item */ $YPos -= ($line_height); } //end while there are line items to print out - if ((strlen($myrow['comments']) >200 AND $YPos-$line_height <= 75) - OR (strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) + if ((strlen($myrow['comments']) >200 AND $YPos-$line_height <= 75) + OR (strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) OR $YPos-$line_height <= 50){ /* We reached the end of the page so finsih off the page and start a newy */ $PageNumber++; @@ -221,7 +223,7 @@ $YPos -= 12; $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,number_format($QuotationTotal,2),'right'); - + } /*end if there are line details to show on the quotation*/ Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-03 16:07:10 UTC (rev 3366) +++ trunk/doc/Change.log.html 2010-03-04 16:09:58 UTC (rev 3367) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>04/03/10 Tim: PDFQuotation.php - Remove call to SelectFont function</p> <p>01/03/10 Tim: WorkCentres.php - Default value for overhead per hour</p> <p>01/03/10 Pak Ricard: PcReportTab.php - New PcReportTab with limited tab view (supervised or own) tabs.</p> <p>01/03/10 Tim: PrintCustTrans.php - Correctly show html and pdf formats</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-04 16:24:43
|
Revision: 3368 http://web-erp.svn.sourceforge.net/web-erp/?rev=3368&view=rev Author: tim_schofield Date: 2010-03-04 16:24:37 +0000 (Thu, 04 Mar 2010) Log Message: ----------- Tim: Z_DataExport.php - Remove unused fields Modified Paths: -------------- trunk/Z_DataExport.php trunk/doc/Change.log.html Modified: trunk/Z_DataExport.php =================================================================== --- trunk/Z_DataExport.php 2010-03-04 16:09:58 UTC (rev 3367) +++ trunk/Z_DataExport.php 2010-03-04 16:24:37 UTC (rev 3368) @@ -34,7 +34,7 @@ // EXPORT FOR PRICE LIST if ( isset($_POST['pricelist']) ) { - + $SQL = "SELECT sales_type FROM salestypes WHERE typeabbrev='" . $_POST['SalesType'] . "'"; $SalesTypeResult = DB_query($SQL,$db); $SalesTypeRow = DB_fetch_row($SalesTypeResult); @@ -45,7 +45,7 @@ stockmaster.description, prices.currabrev, prices.price, - stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost + stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost as standardcost, stockmaster.categoryid, stockcategory.categorydescription, @@ -77,23 +77,23 @@ include('includes/footer.inc'); exit; } - - $CSVContent = stripcomma('stockid') . ',' . + + $CSVContent = stripcomma('stockid') . ',' . stripcomma('description') . ',' . stripcomma('barcode') . ',' . stripcomma('units') . ',' . stripcomma('mbflag') . ',' . stripcomma('taxcatid') . ',' . stripcomma('discontinued') . ',' . - stripcomma('price') . ',' . - stripcomma('qty') . ',' . - stripcomma('categoryid') . ',' . + stripcomma('price') . ',' . + stripcomma('qty') . ',' . + stripcomma('categoryid') . ',' . stripcomma('categorydescription') . "\n"; - + While ($PriceList = DB_fetch_array($PricesResult,$db)){ $Qty = 0; $sqlQty = "SELECT newqoh - FROM stockmoves + FROM stockmoves WHERE stockid = '".$PriceList['stockid']."' AND loccode = '".$_POST['Location']."' ORDER BY stkmoveno DESC LIMIT 1"; @@ -105,17 +105,17 @@ } DB_free_result($resultQty); } - + $DisplayUnitPrice = $PriceList['price']; - - $CSVContent .= (stripcomma($PriceList['stockid']) . ',' . - stripcomma($PriceList['description']) . ',' . + + $CSVContent .= (stripcomma($PriceList['stockid']) . ',' . + stripcomma($PriceList['description']) . ',' . stripcomma($PriceList['barcode']) . ',' . stripcomma($PriceList['units']) . ',' . stripcomma($PriceList['mbflag']) . ',' . stripcomma($PriceList['taxcatid']) . ',' . stripcomma($PriceList['discontinued']) . ',' . - stripcomma($DisplayUnitPrice) . ',' . + stripcomma($DisplayUnitPrice) . ',' . stripcomma($Qty) . ',' . stripcomma($PriceList['categoryid']) . ',' . stripcomma($PriceList['categorydescription']) . "\n" @@ -131,7 +131,7 @@ exit; } elseif ( isset($_POST['custlist']) ) { - $SQL = "SELECT debtorsmaster.debtorno, + $SQL = "SELECT debtorsmaster.debtorno, custbranch.branchcode, debtorsmaster.name, custbranch.contactname, @@ -174,7 +174,7 @@ exit; } - $CSVContent = stripcomma('debtorno') . ',' . + $CSVContent = stripcomma('debtorno') . ',' . stripcomma('branchcode') . ',' . stripcomma('name') . ',' . stripcomma('contactname') . ',' . @@ -188,14 +188,14 @@ stripcomma('faxno') . ',' . stripcomma('email') . ',' . stripcomma('currcode') . ',' . - stripcomma('clientsince') . ',' . - stripcomma('creditlimit') . ',' . - stripcomma('taxref') . ',' . + stripcomma('clientsince') . ',' . + stripcomma('creditlimit') . ',' . + stripcomma('taxref') . ',' . stripcomma('disabletrans') . "\n"; - - + + While ($CustList = DB_fetch_array($CustResult,$db)){ - + $CreditLimit = $CustList['creditlimit']; if ( strlen($CustList['braddress1']) <= 3 ) { $Address1 = $CustList['address1']; @@ -213,8 +213,8 @@ $Address6 = $CustList['braddress6']; } - $CSVContent .= (stripcomma($CustList['debtorno']) . ',' . - stripcomma($CustList['branchcode']) . ',' . + $CSVContent .= (stripcomma($CustList['debtorno']) . ',' . + stripcomma($CustList['branchcode']) . ',' . stripcomma($CustList['name']) . ',' . stripcomma($CustList['contactname']) . ',' . stripcomma($Address1) . ',' . @@ -242,7 +242,7 @@ exit; } elseif ( isset($_POST['salesmanlist']) ) { - $SQL = "SELECT salesmancode, + $SQL = "SELECT salesmancode, salesmanname, smantel, smanfax, @@ -264,24 +264,24 @@ include('includes/footer.inc'); exit; } - - $CSVContent = stripcomma('salesmancode') . ',' . + + $CSVContent = stripcomma('salesmancode') . ',' . stripcomma('salesmanname') . ',' . stripcomma('smantel') . ',' . stripcomma('smanfax') . ',' . stripcomma('commissionrate1') . ',' . stripcomma('breakpoint') . ',' . stripcomma('commissionrate2') . "\n"; - - + + While ($SalesManList = DB_fetch_array($SalesManResult,$db)){ - + $CommissionRate1 = $SalesManList['commissionrate1']; $BreakPoint = $SalesManList['breakpoint']; $CommissionRate2 = $SalesManList['commissionrate2']; - $CSVContent .= (stripcomma($SalesManList['salesmancode']) . ',' . - stripcomma($SalesManList['salesmanname']) . ',' . + $CSVContent .= (stripcomma($SalesManList['salesmancode']) . ',' . + stripcomma($SalesManList['salesmanname']) . ',' . stripcomma($SalesManList['smantel']) . ',' . stripcomma($SalesManList['smanfax']) . ',' . stripcomma($CommissionRate1) . ',' . @@ -301,7 +301,7 @@ FROM stockmaster ORDER BY stockid"; $ImageResult = DB_query($SQL,$db,'','',false,false); - + if (DB_error_no($db) !=0) { $title = _('Security Token List Export Problem ....'); include('includes/header.inc'); @@ -314,18 +314,18 @@ exit; } - $CSVContent = stripcomma('stockid') . ','. - stripcomma('filename') . ','. + $CSVContent = stripcomma('stockid') . ','. + stripcomma('filename') . ','. stripcomma('url') . "\n"; $baseurl = 'http://'. $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/' . 'getstockimg.php?automake=1&stockid=%s.png'; While ($ImageList = DB_fetch_array($ImageResult,$db)){ $url = sprintf($baseurl, urlencode($ImageList['stockid'])); $CSVContent .= ( - stripcomma($ImageList['stockid']) . ',' . - stripcomma($ImageList['stockid'] . '.png') . ',' . + stripcomma($ImageList['stockid']) . ',' . + stripcomma($ImageList['stockid'] . '.png') . ',' . stripcomma($url) . "\n"); } - + header('Content-type: application/csv'); header('Content-Length: ' . strlen($CSVContent)); header('Content-Disposition: inline; filename=ImageList.csv'); @@ -333,9 +333,9 @@ header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); echo $CSVContent; - exit; + exit; } elseif ( isset($_POST['sectokenlist']) ) { - $SQL = "SELECT tokenid, + $SQL = "SELECT tokenid, tokenname FROM securitytokens"; @@ -352,14 +352,14 @@ include('includes/footer.inc'); exit; } - - $CSVContent = stripcomma('tokenid') . ',' . + + $CSVContent = stripcomma('tokenid') . ',' . stripcomma('tokenname') . "\n"; - - + + While ($SecTokenList = DB_fetch_array($SecTokenResult,$db)){ - $CSVContent .= (stripcomma($SecTokenList['tokenid']) . ',' . + $CSVContent .= (stripcomma($SecTokenList['tokenid']) . ',' . stripcomma($SecTokenList['tokenname']) . "\n"); } header('Content-type: application/csv'); @@ -371,7 +371,7 @@ echo $CSVContent; exit; } elseif ( isset($_POST['secrolelist']) ) { - $SQL = "SELECT secroleid, + $SQL = "SELECT secroleid, secrolename FROM securityroles"; @@ -388,14 +388,14 @@ include('includes/footer.inc'); exit; } - - $CSVContent = stripcomma('secroleid') . ',' . + + $CSVContent = stripcomma('secroleid') . ',' . stripcomma('secrolename') . "\n"; - - + + While ($SecRoleList = DB_fetch_array($SecRoleResult,$db)){ - $CSVContent .= (stripcomma($SecRoleList['secroleid']) . ',' . + $CSVContent .= (stripcomma($SecRoleList['secroleid']) . ',' . stripcomma($SecRoleList['secrolename']) . "\n"); } header('Content-type: application/csv'); @@ -407,7 +407,7 @@ echo $CSVContent; exit; } elseif ( isset($_POST['secgrouplist']) ) { - $SQL = "SELECT secroleid, + $SQL = "SELECT secroleid, tokenid FROM securitygroups"; @@ -424,14 +424,14 @@ include('includes/footer.inc'); exit; } - - $CSVContent = stripcomma('secroleid') . ',' . + + $CSVContent = stripcomma('secroleid') . ',' . stripcomma('tokenid') . "\n"; - - + + While ($SecGroupList = DB_fetch_array($SecGroupResult,$db)){ - $CSVContent .= (stripcomma($SecGroupList['secroleid']) . ',' . + $CSVContent .= (stripcomma($SecGroupList['secroleid']) . ',' . stripcomma($SecGroupList['tokenid']) . "\n"); } header('Content-type: application/csv'); @@ -443,7 +443,7 @@ echo $CSVContent; exit; } elseif ( isset($_POST['secuserlist']) ) { - $SQL = "SELECT userid, + $SQL = "SELECT userid, password, realname, customerid, @@ -458,11 +458,9 @@ blocked, displayrecordsmax, theme, - language, - pinno, - swipecard - FROM www_users - WHERE (customerid <> '') OR + language + FROM www_users + WHERE (customerid <> '') OR (NOT customerid IS NULL)"; $SecUserResult = DB_query($SQL,$db,'','',false,false); @@ -478,8 +476,8 @@ include('includes/footer.inc'); exit; } - - $CSVContent = stripcomma('userid') . ',' . + + $CSVContent = stripcomma('userid') . ',' . stripcomma('password') . ','. stripcomma('realname') . ','. stripcomma('customerid') . ','. @@ -497,11 +495,11 @@ stripcomma('language') . ','. stripcomma('pinno') . ','. stripcomma('swipecard') . "\n"; - - + + While ($SecUserList = DB_fetch_array($SecUserResult,$db)){ - $CSVContent .= (stripcomma($SecUserList['userid']) . ',' . + $CSVContent .= (stripcomma($SecUserList['userid']) . ',' . stripcomma($SecUserList['password']) . ',' . stripcomma($SecUserList['realname']) . ',' . stripcomma($SecUserList['customerid']) . ',' . @@ -531,9 +529,9 @@ } else { $title = _('Data Exports'); include('includes/header.inc'); - + // SELECT EXPORT FOR PRICE LIST - + echo "<br>"; echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; echo '<table>'; @@ -546,7 +544,7 @@ echo '<option Value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type']; } echo '</select></td></tr>'; - + $sql = 'SELECT loccode, locationname FROM locations'; $SalesTypesResult=DB_query($sql,$db); echo '<tr><td>' . _('For Location') . ':</td>'; @@ -560,14 +558,14 @@ echo "</form><br>"; // SELECT EXPORT FOR CUSTOMER LIST - - + + echo "<br>"; // Export Stock For Location echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; echo '<table>'; echo '<tr><th colspan=2>' . _('Customer List Export') . '</th></tr>'; - + $sql = 'SELECT loccode, locationname FROM locations'; $SalesTypesResult=DB_query($sql,$db); echo '<tr><td>' . _('For Location') . ':</td>'; @@ -581,7 +579,7 @@ echo "</form><br>"; // SELECT EXPORT FOR SALES MAN - + echo "<br>"; // Export Stock For Location echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; @@ -590,7 +588,7 @@ echo "</table>"; echo "<div class='centre'><div class='centre'><input type='Submit' name='salesmanlist' value='" . _('Export') . "'></div>"; echo "</form><br>"; - + // SELECT EXPORT FOR IMAGES echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; echo '<table>'; @@ -606,7 +604,7 @@ echo "</table>"; echo "<div class='centre'><input type='Submit' name='sectokenlist' value='" . _('Export') . "'></div>"; echo "</form><br>"; - + // SELECT EXPORT SECURITY ROLES echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; echo '<table>'; @@ -630,8 +628,8 @@ echo "</table>"; echo "<div class='centre'><input type='Submit' name='secuserlist' value='" . _('Export') . "'></div>"; echo "</form><br>"; - + include('includes/footer.inc'); } ?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-04 16:09:58 UTC (rev 3367) +++ trunk/doc/Change.log.html 2010-03-04 16:24:37 UTC (rev 3368) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>04/03/10 Tim: Z_DataExport.php - Remove unused fields</p> <p>04/03/10 Tim: PDFQuotation.php - Remove call to SelectFont function</p> <p>01/03/10 Tim: WorkCentres.php - Default value for overhead per hour</p> <p>01/03/10 Pak Ricard: PcReportTab.php - New PcReportTab with limited tab view (supervised or own) tabs.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lin...@us...> - 2010-03-05 10:47:28
|
Revision: 3369 http://web-erp.svn.sourceforge.net/web-erp/?rev=3369&view=rev Author: lindsayh Date: 2010-03-05 10:47:19 +0000 (Fri, 05 Mar 2010) Log Message: ----------- The $PrintPDF variable in PrintCustTrans was misused in several places, resulting in never generating a PDF file output. It's now a boolean, being set to TRUE if the user wants PDF output, else unset. Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/PrintCustTrans.php trunk/api/api_branches.php trunk/api/api_customers.php trunk/doc/Change.log.html Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2010-03-04 16:24:37 UTC (rev 3368) +++ trunk/ConfirmDispatch_Invoice.php 2010-03-05 10:47:19 UTC (rev 3369) @@ -678,6 +678,10 @@ DB_free_result($Result); +// ************************************************************************* +// S T A R T O F I N V O I C E S Q L P R O C E S S I N G +// ************************************************************************* + /*Now Get the next invoice number - function in SQL_CommonFunctions*/ $InvoiceNo = GetNextTransNo(10, $db); @@ -1434,6 +1438,9 @@ } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); +// ************************************************************************* +// E N D O F I N V O I C E S Q L P R O C E S S I N G +// ************************************************************************* unset($_SESSION['Items']->LineItems); unset($_SESSION['Items']); Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2010-03-04 16:24:37 UTC (rev 3368) +++ trunk/PrintCustTrans.php 2010-03-05 10:47:19 UTC (rev 3369) @@ -13,9 +13,9 @@ $InvOrCredit = $_POST['InvOrCredit']; } if (isset($_GET['PrintPDF'])) { - $PrintPDF = $_GET['PrintPDF']; + $PrintPDF = TRUE; } elseif (isset($_POST['PrintPDF'])) { - $PrintPDF = $_POST['PrintPDF']; + $PrintPDF = TRUE; } if (!isset($_POST['ToTransNo']) or trim($_POST['ToTransNo']) == '' or $_POST['ToTransNo'] < $FromTransNo) { $_POST['ToTransNo'] = $FromTransNo; @@ -26,7 +26,7 @@ } else { $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/SalesInvoice.xml'); } -if (isset($PrintPDF) or isset($_GET['PrintPDF']) and $PrintPDF != '' and isset($FromTransNo) and isset($InvOrCredit) and $FromTransNo != '') { +if (isset($PrintPDF) or isset($_GET['PrintPDF']) and $PrintPDF and isset($FromTransNo) and isset($InvOrCredit) and $FromTransNo != '') { $PaperSize = $FormDesign->PaperSize; include ('includes/PDFStarter.php'); require ('fpdi/fpdi.php'); @@ -390,7 +390,7 @@ } elseif (isset($_POST['FromTransNo'])) { $FromTransNo = trim($_POST['FromTransNo']); } -if (($InvOrCredit == 'Invoice' or $InvOrCredit == 'Credit') and $PrintPDF=='True') { +if (($InvOrCredit == 'Invoice' or $InvOrCredit == 'Credit') and $PrintPDF) { $sql = 'SELECT stockmoves.stockid, stockmaster.appendfile FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid Modified: trunk/api/api_branches.php =================================================================== --- trunk/api/api_branches.php 2010-03-04 16:24:37 UTC (rev 3368) +++ trunk/api/api_branches.php 2010-03-05 10:47:19 UTC (rev 3369) @@ -528,7 +528,7 @@ } $sql='SELECT * FROM custbranch WHERE debtorno="'.$DebtorNumber.'" and branchcode="'.$BranchCode.'"'; $result = api_DB_Query($sql, $db); - if (DB_error_no($result) != 0 ) + if (DB_error_no($db) != 0 ) $Errors[0] = DatabaseUpdateFailed; else { Modified: trunk/api/api_customers.php =================================================================== --- trunk/api/api_customers.php 2010-03-04 16:24:37 UTC (rev 3368) +++ trunk/api/api_customers.php 2010-03-05 10:47:19 UTC (rev 3369) @@ -514,11 +514,10 @@ } $sql='SELECT * FROM debtorsmaster WHERE debtorno="'.$DebtorNumber.'"'; $result = DB_Query($sql, $db); - if (sizeof($Errors)==0) { - return DB_fetch_array($result); - } else { - return $Errors; - } + $Errors[0] = 0; // None found. + $Errors[1] = DB_fetch_array($result); + + return $Errors; } /* This function takes a field name, and a string, and then returns an Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-04 16:24:37 UTC (rev 3368) +++ trunk/doc/Change.log.html 2010-03-05 10:47:19 UTC (rev 3369) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>05/03/10 Lindsay: PrintCustTrans.php generates HTML for Print, PDF for Print PDF <p>04/03/10 Tim: Z_DataExport.php - Remove unused fields</p> <p>04/03/10 Tim: PDFQuotation.php - Remove call to SelectFont function</p> <p>01/03/10 Tim: WorkCentres.php - Default value for overhead per hour</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-08 07:21:10
|
Revision: 3370 http://web-erp.svn.sourceforge.net/web-erp/?rev=3370&view=rev Author: tim_schofield Date: 2010-03-08 07:21:03 +0000 (Mon, 08 Mar 2010) Log Message: ----------- Tim: Corrections to DIFOT report to correctly show the logo Modified Paths: -------------- trunk/PDFDIFOT.php trunk/doc/Change.log.html trunk/includes/PDFDIFOTPageHeader.inc Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2010-03-05 10:47:19 UTC (rev 3369) +++ trunk/PDFDIFOT.php 2010-03-08 07:21:03 UTC (rev 3370) @@ -254,7 +254,7 @@ AND trandate <= '" . FormatDateForSQL($_POST['ToDate']) . "'"; } -$Errmsg = _('Could not retrieve the count of sales order lines in the period under review'); +$ErrMsg = _('Could not retrieve the count of sales order lines in the period under review'); $result = DB_query($sql,$db,$ErrMsg); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-05 10:47:19 UTC (rev 3369) +++ trunk/doc/Change.log.html 2010-03-08 07:21:03 UTC (rev 3370) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>05/03/10 Lindsay: PrintCustTrans.php generates HTML for Print, PDF for Print PDF +<p>08/03/10 Tim: Corrections to DIFOT report to correctly show the logo</p> +<p>05/03/10 Lindsay: PrintCustTrans.php generates HTML for Print, PDF for Print PDF</p> <p>04/03/10 Tim: Z_DataExport.php - Remove unused fields</p> <p>04/03/10 Tim: PDFQuotation.php - Remove call to SelectFont function</p> <p>01/03/10 Tim: WorkCentres.php - Default value for overhead per hour</p> Modified: trunk/includes/PDFDIFOTPageHeader.inc =================================================================== --- trunk/includes/PDFDIFOTPageHeader.inc 2010-03-05 10:47:19 UTC (rev 3369) +++ trunk/includes/PDFDIFOTPageHeader.inc 2010-03-08 07:21:03 UTC (rev 3370) @@ -6,7 +6,7 @@ $YPos = $Page_Height - $Top_Margin - 50; -$pdf->addJpegFromFile($_SESSION['DatabaseName'],$Left_Margin,$YPos,0,50); +$pdf->addJpegFromFile('companies/'.$_SESSION['DatabaseName'].'/logo.jpg',$Left_Margin,$YPos,0,50); $FontSize=15; @@ -51,4 +51,4 @@ $pdf->line($XPos, $YPos,$Page_Width-$Right_Margin, $YPos); $YPos -= ($line_height); -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-08 13:04:29
|
Revision: 3371 http://web-erp.svn.sourceforge.net/web-erp/?rev=3371&view=rev Author: tim_schofield Date: 2010-03-08 13:04:22 +0000 (Mon, 08 Mar 2010) Log Message: ----------- Tim: PrintCustTransPortrait.php Correctly show the prices Modified Paths: -------------- trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/doc/Change.log.html Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2010-03-08 07:21:03 UTC (rev 3370) +++ trunk/PrintCustTrans.php 2010-03-08 13:04:22 UTC (rev 3371) @@ -362,7 +362,7 @@ } /* end loop to print invoices */ // Start FPDI concatination to append PDF files conditionally to the invoice // This part taken from FPDI example page -not used yet since change to TCPDF Dec 2009 -if ($PrintPDF) { +if (isset($PrintPDF)) { class concat_pdf extends FPDI { var $files = array(); function setFiles($files) { Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2010-03-08 07:21:03 UTC (rev 3370) +++ trunk/PrintCustTransPortrait.php 2010-03-08 13:04:22 UTC (rev 3371) @@ -217,7 +217,7 @@ AND debtortrans.branchcode=custbranch.branchcode AND custbranch.salesman=salesman.salesmancode'; - if ($_POST['PrintEDI']=='No'){ + if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No'){ $sql = $sql . ' AND debtorsmaster.ediinvoices=0'; } } @@ -228,7 +228,7 @@ $title = _('Transaction Print Error Report'); include ('includes/header.inc'); - + prnMsg( _('There was a problem retrieving the invoice or credit note details for note number') . ' ' . $InvoiceToPrint . ' ' . _('from the database') . '. ' . _('To print an invoice, the sales order record, the customer transaction record and the branch record for the customer must not have been purged') . '. ' . _('To print a credit note only requires the customer, transaction, salesman and branch records be available'),'error'); if ($debug==1){ prnMsg (_('The SQL used to get this information that failed was') . "<br>" . $sql,'error'); @@ -241,44 +241,40 @@ $ExchRate = $myrow['rate']; - if ($InvOrCredit=='Invoice'){ - $sql = 'SELECT stockmoves.stkmoveno, - stockmoves.stockid, - stockmaster.description, - stockmaster.serialised, - stockmaster.controlled, - -stockmoves.qty as Quantity, - stockmoves.narrative, - stockmaster.units, - stockmaster.decimalplaces, - stockmoves.discountpercent, - stockmoves.narrative - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 - AND stockmoves.transno = '.$FromTransNo.' - AND stockmoves.show_on_inv_crds=1'; - } else { - /* only credit notes to be retrieved */ - $sql = 'SELECT stockmoves.stkmoveno, - stockmoves.stockid, + if ($InvOrCredit == 'Invoice') { + $sql = 'SELECT stockmoves.stockid, stockmaster.description, - stockmaster.serialised, + -stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * ' . $ExchRate . '* -stockmoves.qty) AS fxnet, + (stockmoves.price * ' . $ExchRate . ') AS fxprice, + stockmoves.narrative, stockmaster.controlled, - stockmoves.qty as Quantity, + stockmaster.units + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=10 + AND stockmoves.transno=' . $FromTransNo . ' + AND stockmoves.show_on_inv_crds=1'; + } else { + /* only credit notes to be retrieved */ + $sql = 'SELECT stockmoves.stockid, + stockmaster.description, + stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * ' . $ExchRate . ' * stockmoves.qty) AS fxnet, + (stockmoves.price * ' . $ExchRate . ') AS fxprice, stockmoves.narrative, - stockmaster.units, - stockmaster.decimalplaces, - stockmoves.discountpercent, - stockmoves.narrative + stockmaster.controlled, + stockmaster.units FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid AND stockmoves.type=11 AND stockmoves.transno=' . $FromTransNo . ' AND stockmoves.show_on_inv_crds=1'; - } + } // end else $result=DB_query($sql,$db); if (DB_error_no($db)!=0) { @@ -302,17 +298,16 @@ $FirstPage = False; while ($myrow2=DB_fetch_array($result)){ + if ($myrow2['discountpercent'] == 0) { + $DisplayDiscount = ''; + } else { + $DisplayDiscount = number_format($myrow2['discountpercent'] * 100, 2) . '%'; + $DiscountPrice = $myrow2['fxprice'] * (1 - $myrow2['discountpercent']); + } + $DisplayNet = $myrow2['fxnet']; + $DisplayPrice = $myrow2['fxprice']; + $DisplayQty = $myrow2['quantity']; - if ($myrow2['discountpercent']==0) { - $DisplayDiscount =''; - } else { - $DisplayDiscount = number_format($myrow2['discountpercent']*100,2) . '%'; - $DiscountPrice=$myrow2['fxprice']*(1-$myrow2['discountpercent']); - } - $DisplayPrice=$myrow2['fxprice']; - $DisplayQty=$myrow2['quantity']; - $DisplayNet=number_format($myrow2['fxnet'],2); - $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos,71,$FontSize,$myrow2['stockid']); $LeftOvers = $pdf->addTextWrap($Left_Margin+80,$YPos,186,$FontSize,$myrow2['description']); $lines=1; @@ -322,11 +317,11 @@ $lines++; } - $LeftOvers = $pdf->addTextWrap($Left_Margin+270,$YPos,76,$FontSize,number_format($myrow3['unitprice'],2),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,36,$FontSize,number_format($myrow2['Quantity'],2),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+270,$YPos,76,$FontSize,number_format($DisplayPrice,2),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,36,$FontSize,number_format($DisplayQty,2),'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+390,$YPos,26,$FontSize,$myrow2['units'],'center'); $LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,26,$FontSize,$DisplayDiscount,'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+450,$YPos,72,$FontSize,$DisplayNet,'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+450,$YPos,72,$FontSize,number_format($DisplayNet,2),'right'); if ($myrow2['controlled']==1){ @@ -547,12 +542,12 @@ } $result=DB_query($sql,$db); // Loop the result set and add appendfile if the field is not 0 or none - + while ($row=DB_fetch_array($result)){ if ($row['appendfile'] !='0' AND $row['appendfile'] !=='none') { $pdf->setFiles(array($_SESSION['reports_dir'] . '/Invoice.pdf','companies/' . $_SESSION['DatabaseName'] . '/pdf_append/' . $row['appendfile'])); $pdf->concat(); - } + } }//End FPDI Concat if (isset($_GET['Email'])){ //email the invoice to address supplied Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-08 07:21:03 UTC (rev 3370) +++ trunk/doc/Change.log.html 2010-03-08 13:04:22 UTC (rev 3371) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/03/10 Tim: PrintCustTransPortrait.php Correctly show the prices</p> <p>08/03/10 Tim: Corrections to DIFOT report to correctly show the logo</p> <p>05/03/10 Lindsay: PrintCustTrans.php generates HTML for Print, PDF for Print PDF</p> <p>04/03/10 Tim: Z_DataExport.php - Remove unused fields</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-08 13:30:50
|
Revision: 3372 http://web-erp.svn.sourceforge.net/web-erp/?rev=3372&view=rev Author: tim_schofield Date: 2010-03-08 13:30:44 +0000 (Mon, 08 Mar 2010) Log Message: ----------- Simon Peter Otandekar: FixedAssetRegister.php Include totals and sub-totals Modified Paths: -------------- trunk/FixedAssetRegister.php trunk/doc/Change.log.html Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2010-03-08 13:04:22 UTC (rev 3371) +++ trunk/FixedAssetRegister.php 2010-03-08 13:30:44 UTC (rev 3372) @@ -1,27 +1,27 @@ <?php - $PageSecurity = 11; - -include('includes/session.inc'); - +include ('includes/session.inc'); $title = _('Fixed Asset Register'); - -if (isset($_POST['submit']) or isset($_POST['pdf'])) { - +$TotalCost = 0; +$Totaldepn = 0; +$TotaldepnInt = 0; +$Totaldisp = 0; +$TotaldepInt = 0; +$TotalNBV = 0; +$TotalNBVInt = 0; +$csv_output = ''; +// Reports being generated in HTML, PDF and CSV/EXCEL format +if (isset($_POST['submit']) or isset($_POST['pdf']) or isset($_POST['csv'])) { if (isset($_POST['pdf'])) { $PaperSize = 'A4_Landscape'; - include('includes/PDFStarter.php'); - } else { - include('includes/header.inc'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . - _('Search') . '" alt="">' . ' ' . $title; + include ('includes/PDFStarter.php'); + } else if (empty($_POST['csv'])) { + include ('includes/header.inc'); + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; } - $dateFrom = FormatDateForSQL($_POST['fromDate']); $dateTo = FormatDateForSQL($_POST['toDate']); - - - $sql='SELECT assetmanager.id, + $sql = 'SELECT assetmanager.id, assetmanager.stockid, stockmaster.longdescription, stockmaster.categoryid, @@ -37,207 +37,236 @@ LEFT JOIN stockmaster ON assetmanager.stockid=stockmaster.stockid LEFT JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid LEFT JOIN fixedassetlocations ON assetmanager.location=fixedassetlocations.locationid - WHERE stockmaster.categoryid like "'.$_POST['assetcategory'].'" - AND stockmaster.stockid like "'.$_POST['assettype'].'" - AND assetmanager.datepurchased BETWEEN "'.$dateFrom.'" AND "'.$dateTo.'"'; - $result=DB_query($sql, $db); - + WHERE stockmaster.categoryid like "' . $_POST['assetcategory'] . '" + AND stockmaster.stockid like "' . $_POST['assettype'] . '" + AND assetmanager.datepurchased BETWEEN "' . $dateFrom . '" AND "' . $dateTo . '"'; + $result = DB_query($sql, $db); if (isset($_POST['pdf'])) { - $FontSize=10; - $pdf->addinfo('Title', _('Fixed Asset Register') ); - $PageNumber=1; - $line_height=12; - include('includes/PDFAssetRegisterHeader.inc'); + $FontSize = 10; + $pdf->addinfo('Title', _('Fixed Asset Register')); + $PageNumber = 1; + $line_height = 12; + include ('includes/PDFAssetRegisterHeader.inc'); + } elseif (isset($_POST['csv'])) { + $csv_output = "Asset ID,Stock ID"; // 'Description','Serial Number','Location','Date Acquired','Cost','Depreciation','NBV','Cost','Depreciation','NBV','Disposal Value'"; + $csv_output.= "\n"; } else { echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table>'; echo '<br><table width=80% cellspacing="9"><tr>'; echo '<th colspan=6></th>'; - echo '<th colspan=3>'._('External Depreciation').'</th>'; - echo '<th colspan=3>'._('Internal Depreciation').'</th><th></th></tr><tr>'; - echo '<th>'._('Asset ID').'</th>'; - echo '<th>'._('Stock ID').'</th>'; - echo '<th>'._('Description').'</th>'; - echo '<th>'._('Serial Number').'</th>'; - echo '<th>'._('Location').'</th>'; - echo '<th>'._('Date Acquired').'</th>'; - echo '<th>'._('Cost').'</th>'; - echo '<th>'._('Depreciation').'</th>'; - echo '<th>'._('NBV').'</th>'; - echo '<th>'._('Cost').'</th>'; - echo '<th>'._('Depreciation').'</th>'; - echo '<th>'._('NBV').'</th>'; - echo '<th>'._('Disposal Value').'</th></tr>'; + echo '<th colspan=3>' . _('External Depreciation') . '</th>'; + echo '<th colspan=3>' . _('Internal Depreciation') . '</th><th></th></tr><tr>'; + echo '<th>' . _('Asset ID') . '</th>'; + echo '<th>' . _('Stock ID') . '</th>'; + echo '<th>' . _('Description') . '</th>'; + echo '<th>' . _('Serial Number') . '</th>'; + echo '<th>' . _('Location') . '</th>'; + echo '<th>' . _('Date Acquired') . '</th>'; + echo '<th>' . _('Cost') . '</th>'; + echo '<th>' . _('Depreciation') . '</th>'; + echo '<th>' . _('NBV') . '</th>'; + echo '<th>' . _('Cost') . '</th>'; + echo '<th>' . _('Depreciation') . '</th>'; + echo '<th>' . _('NBV') . '</th>'; + echo '<th>' . _('Disposal Value') . '</th></tr>'; } - - while ($myrow=DB_fetch_array($result)) { - - $ancestors=array(); - $ancestors[0]=$myrow['locationdescription']; - $i=0; - while ($ancestors[$i]!='') { - $locationsql='SELECT parentlocationid from fixedassetlocations where locationdescription="'.$ancestors[$i].'"'; - $locationresult=DB_query($locationsql, $db); - $locationrow=DB_fetch_array($locationresult); - $parentsql='SELECT locationdescription from fixedassetlocations where locationid="'.$locationrow['parentlocationid'].'"'; - $parentresult=DB_query($parentsql, $db); - $parentrow=DB_fetch_array($parentresult); + while ($myrow = DB_fetch_array($result)) { + $ancestors = array(); + $ancestors[0] = $myrow['locationdescription']; + $i = 0; + while ($ancestors[$i] != '') { + $locationsql = 'SELECT parentlocationid from fixedassetlocations where locationdescription="' . $ancestors[$i] . '"'; + $locationresult = DB_query($locationsql, $db); + $locationrow = DB_fetch_array($locationresult); + $parentsql = 'SELECT locationdescription from fixedassetlocations where locationid="' . $locationrow['parentlocationid'] . '"'; + $parentresult = DB_query($parentsql, $db); + $parentrow = DB_fetch_array($parentresult); $i++; - $ancestors[$i]=$parentrow['locationdescription']; + $ancestors[$i] = $parentrow['locationdescription']; } - $catidsql='SELECT stkcatpropid FROM stockcatproperties WHERE categoryid="'.$myrow['categoryid'] - .'" AND label="'. _('Annual Internal Depreciation Percentage').'"'; - $catidresult=DB_query($catidsql, $db); - $catidrow=DB_fetch_array($catidresult); - $catvaluesql='SELECT value FROM stockitemproperties WHERE stockid="'.$myrow['stockid'].'" AND stkcatpropid='. - $catidrow['stkcatpropid']; - $catvalueresult=DB_query($catvaluesql, $db); - $catvaluerow=DB_fetch_array($catvalueresult); - $MonthsOld=DateDiff(date('d/m/Y'),ConvertSQLDate($myrow['datepurchased']), 'm'); - $InternalDepreciation=$myrow['cost']*$catvaluerow['value']/100*$MonthsOld/12; - if (($InternalDepreciation+$myrow['disposalvalue'])>$myrow['cost']) { - $InternalDepreciation=$myrow['cost']-$myrow['disposalvalue']; + $catidsql = 'SELECT stkcatpropid FROM stockcatproperties WHERE categoryid="' . $myrow['categoryid'] . '" AND label="' . _('Annual Internal Depreciation Percentage') . '"'; + $catidresult = DB_query($catidsql, $db); + $catidrow = DB_fetch_array($catidresult); + $catvaluesql = 'SELECT value FROM stockitemproperties WHERE stockid="' . $myrow['stockid'] . '" AND stkcatpropid=' . $catidrow['stkcatpropid']; + $catvalueresult = DB_query($catvaluesql, $db); + $catvaluerow = DB_fetch_array($catvalueresult); + $MonthsOld = DateDiff(date('d/m/Y'), ConvertSQLDate($myrow['datepurchased']), 'm'); + $InternalDepreciation = $myrow['cost'] * $catvaluerow['value'] / 100 * $MonthsOld / 12; + if (($InternalDepreciation + $myrow['disposalvalue']) > $myrow['cost']) { + $InternalDepreciation = $myrow['cost'] - $myrow['disposalvalue']; } - - if (in_array($_POST['assetlocation'],$ancestors) or $_POST['assetlocation']=='All') { + if (in_array($_POST['assetlocation'], $ancestors) or $_POST['assetlocation'] == 'All') { if (isset($_POST['pdf'])) { - $LeftOvers = $pdf->addTextWrap($Xpos,$YPos,300-$Left_Margin,$FontSize, $myrow['id']); - $LeftOvers = $pdf->addTextWrap($Xpos+40,$YPos,300-$Left_Margin,$FontSize, $myrow['stockid']); - $LeftOvers = $pdf->addTextWrap($Xpos+80,$YPos,300-$Left_Margin,$FontSize, $myrow['longdescription']); - $LeftOvers = $pdf->addTextWrap($Xpos+250,$YPos,300-$Left_Margin,$FontSize, $myrow['serialno']); - $LeftOvers = $pdf->addTextWrap($Xpos+300,$YPos,300-$Left_Margin,$FontSize, $myrow['locationdescription']); - $TempYPos=$YPos; - for ($i=1;$i<sizeOf($ancestors)-1;$i++) { - for ($j=0;$j<$i; $j++) { - $TempYPos -=(0.8*$line_height); - $LeftOvers = $pdf->addTextWrap($Xpos+300,$TempYPos,300-$Left_Margin,$FontSize, ' '); + $LeftOvers = $pdf->addTextWrap($Xpos, $YPos, 300 - $Left_Margin, $FontSize, $myrow['id']); + $LeftOvers = $pdf->addTextWrap($Xpos + 40, $YPos, 300 - $Left_Margin, $FontSize, $myrow['stockid']); + $LeftOvers = $pdf->addTextWrap($Xpos + 80, $YPos, 300 - $Left_Margin, $FontSize, $myrow['longdescription']); + $LeftOvers = $pdf->addTextWrap($Xpos + 250, $YPos, 300 - $Left_Margin, $FontSize, $myrow['serialno']); + $LeftOvers = $pdf->addTextWrap($Xpos + 300, $YPos, 300 - $Left_Margin, $FontSize, $myrow['locationdescription']); + $TempYPos = $YPos; + for ($i = 1;$i < sizeOf($ancestors) - 1;$i++) { + for ($j = 0;$j < $i;$j++) { + $TempYPos-= (0.8 * $line_height); + $LeftOvers = $pdf->addTextWrap($Xpos + 300, $TempYPos, 300 - $Left_Margin, $FontSize, ' '); } - $LeftOvers = $pdf->addTextWrap($Xpos+300,$TempYPos,300-$Left_Margin,$FontSize, '|_'.$ancestors[$i]); + $LeftOvers = $pdf->addTextWrap($Xpos + 300, $TempYPos, 300 - $Left_Margin, $FontSize, '|_' . $ancestors[$i]); } - $LeftOvers = $pdf->addTextWrap($Xpos+380,$YPos,300-$Left_Margin,$FontSize, ConvertSQLDate($myrow['datepurchased'])); - $LeftOvers = $pdf->addTextWrap($Xpos+440,$YPos,55,$FontSize, number_format($myrow['cost'],0), 'right'); - $LeftOvers = $pdf->addTextWrap($Xpos+495,$YPos,55,$FontSize, number_format($myrow['depn'],0), 'right'); - $LeftOvers = $pdf->addTextWrap($Xpos+550,$YPos,50,$FontSize, number_format($myrow['cost']-$myrow['depn'],0), 'right'); - $LeftOvers = $pdf->addTextWrap($Xpos+600,$YPos,55,$FontSize, number_format($myrow['cost'],0),'right'); - $LeftOvers = $pdf->addTextWrap($Xpos+655,$YPos,55,$FontSize, number_format($InternalDepreciation,0),'right'); - $LeftOvers = $pdf->addTextWrap($Xpos+710,$YPos,50,$FontSize, number_format($myrow['cost']-$InternalDepreciation,0),'right'); - $YPos =$TempYPos-(0.8*$line_height); - if ($YPos < $Bottom_Margin + $line_height){ - include('includes/PDFAssetRegisterHeader.inc'); + $LeftOvers = $pdf->addTextWrap($Xpos + 380, $YPos, 300 - $Left_Margin, $FontSize, ConvertSQLDate($myrow['datepurchased'])); + $LeftOvers = $pdf->addTextWrap($Xpos + 440, $YPos, 55, $FontSize, number_format($myrow['cost'], 0), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 495, $YPos, 55, $FontSize, number_format($myrow['depn'], 0), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 550, $YPos, 50, $FontSize, number_format($myrow['cost'] - $myrow['depn'], 0), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 600, $YPos, 55, $FontSize, number_format($myrow['cost'], 0), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 655, $YPos, 55, $FontSize, number_format($InternalDepreciation, 0), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 710, $YPos, 50, $FontSize, number_format($myrow['cost'] - $InternalDepreciation, 0), 'right'); + $YPos = $TempYPos - (0.8 * $line_height); + if ($YPos < $Bottom_Margin + $line_height) { + include ('includes/PDFAssetRegisterHeader.inc'); } + } elseif (isset($_POST['csv'])) { + $csv_output.= $myrow['id'] . "," . $myrow['stockid'] . "\n"; //;.",".$myrow['longdescription'].",".$myrow['serialno'].",".$myrow['locationdescription'].",".$myrow['datepurchased'].",".$myrow['cost'].",".$myrow['depn'].",".($myrow['cost']-$myrow['depn']).",".$myrow['cost'].",".$InternalDepreciation.",".($myrow['cost']-$InternalDepreciation).",".$myrow['disposalvalue']."\n"; + } else { - echo '<tr><td style="vertical-align:top">'.$myrow['id'].'</td>'; - echo '<td style="vertical-align:top">'.$myrow['stockid'].'</td>'; - echo '<td style="vertical-align:top">'.$myrow['longdescription'].'</td>'; - echo '<td style="vertical-align:top">'.$myrow['serialno'].'</td>'; - echo '<td>'.$myrow['locationdescription'].'<br>'; - for ($i=1;$i<sizeOf($ancestors)-1;$i++) { - for ($j=0;$j<$i; $j++) { + echo '<tr><td style="vertical-align:top">' . $myrow['id'] . '</td>'; + echo '<td style="vertical-align:top">' . $myrow['stockid'] . '</td>'; + echo '<td style="vertical-align:top">' . $myrow['longdescription'] . '</td>'; + echo '<td style="vertical-align:top">' . $myrow['serialno'] . '</td>'; + echo '<td>' . $myrow['locationdescription'] . '<br>'; + for ($i = 1;$i < sizeOf($ancestors) - 1;$i++) { + for ($j = 0;$j < $i;$j++) { echo ' '; } - echo '|_'.$ancestors[$i].'<br>'; + echo '|_' . $ancestors[$i] . '<br>'; } - echo '</td><td style="vertical-align:top">'.ConvertSQLDate($myrow['datepurchased']).'</td>'; - echo '<td style="vertical-align:top" class=number>'.number_format($myrow['cost'],2).'</td>'; - echo '<td style="vertical-align:top" class=number>'.number_format($myrow['depn'],2).'</td>'; - echo '<td style="vertical-align:top" class=number>'.number_format($myrow['cost']-$myrow['depn'],2).'</td>'; - echo '<td style="vertical-align:top" class=number>'.number_format($myrow['cost'],2).'</td>'; - echo '<td style="vertical-align:top" class=number>'.number_format($InternalDepreciation,2).'</td>'; - echo '<td style="vertical-align:top" class=number>'.number_format($myrow['cost']-$InternalDepreciation,2).'</td>'; - echo '<td style="vertical-align:top" class=number>'.number_format($myrow['disposalvalue'],2).'</td></tr>'; + echo '</td><td style="vertical-align:top">' . ConvertSQLDate($myrow['datepurchased']) . '</td>'; + echo '<td style="vertical-align:top" class=number>' . number_format($myrow['cost'], 2) . '</td>'; + echo '<td style="vertical-align:top" class=number>' . number_format($myrow['depn'], 2) . '</td>'; + echo '<td style="vertical-align:top" class=number>' . number_format($myrow['cost'] - $myrow['depn'], 2) . '</td>'; + echo '<td style="vertical-align:top" class=number>' . number_format($myrow['cost'], 2) . '</td>'; + echo '<td style="vertical-align:top" class=number>' . number_format($InternalDepreciation, 2) . '</td>'; + echo '<td style="vertical-align:top" class=number>' . number_format($myrow['cost'] - $InternalDepreciation, 2) . '</td>'; + echo '<td style="vertical-align:top" class=number>' . number_format($myrow['disposalvalue'], 2) . '</td></tr>'; } + $TotalCost = $TotalCost + $myrow['cost']; + $Totaldepn = $Totaldepn_pdf + $myrow['depn']; + $TotalNBV = $TotalCost - $Totaldepn; + $TotaldepnInt = $TotaldepnInt + $InternalDepreciation; + $TotalNBVInt = $TotalCost - $TotaldepInt; + $Totaldisp = $Totaldisp + $myrow['disposalvalue']; } } - if (isset($_POST['pdf'])) { - $pdf->Output($_SESSION['DatabaseName'] . '_Asset Register_' . date('Y-m-d').'.pdf', 'I'); + $LeftOvers = $pdf->addTextWrap($Xpos, $YPos, 300 - $Left_Margin, $FontSize, "TOTAL"); + $LeftOvers = $pdf->addTextWrap($Xpos + 40, $YPos, 300 - $Left_Margin, $FontSize, ' '); + $LeftOvers = $pdf->addTextWrap($Xpos + 80, $YPos, 300 - $Left_Margin, $FontSize, ' '); + $LeftOvers = $pdf->addTextWrap($Xpos + 250, $YPos, 300 - $Left_Margin, $FontSize, ' '); + $LeftOvers = $pdf->addTextWrap($Xpos + 300, $YPos, 300 - $Left_Margin, $FontSize, ' '); + $LeftOvers = $pdf->addTextWrap($Xpos + 300, $YPos, 300 - $Left_Margin, $FontSize, ' '); + $LeftOvers = $pdf->addTextWrap($Xpos + 380, $YPos, 300 - $Left_Margin, $FontSize, ' '); // number_format($Totaldepn_pdf,2),'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 440, $YPos, 55, $FontSize, number_format($TotalCost, 2), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 495, $YPos, 55, $FontSize, number_format($Totaldepn, 2), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 550, $YPos, 50, $FontSize, number_format($TotalNBV, 2), 'right'); + //$LeftOvers = $pdf->addTextWrap($Xpos+600,$YPos,50,$FontSize, number_format($TotalNBV_pdf,2),'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 600, $YPos, 55, $FontSize, number_format($TotalCost, 2), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 655, $YPos, 50, $FontSize, number_format($TotaldepnInt, 2), 'right'); + $LeftOvers = $pdf->addTextWrap($Xpos + 705, $YPos, 55, $FontSize, number_format($TotalNBVInt, 2), 'right'); + $pdf->Output($_SESSION['DatabaseName'] . '_Asset Register_' . date('Y-m-d') . '.pdf', 'I'); exit; + } elseif (isset($_POST['csv'])) { + // download now. WFT am I waiting for??? Don't use headers, kinda messy + // $filename="/tmp/".date("Y-m-d").".csv"; + $filename = "/home/tim/workbench/webERP/trunk/companies/weberpdemo/reportwriter/test.csv"; + $csvfile = fopen($filename, 'w'); + $i = fwrite($csvfile, $csv_output); + header("Location: companies/weberpdemo/reportwriter/test.csv"); + // echo "Testing successfully done"; + // header("Content-Type: text/csv"); + // header("Content-disposition: attachment; filename= $cvsfile"); + } else { - echo '<input type=hidden name=fromDate value="'.$_POST['fromDate'].'">'; - echo '<input type=hidden name=toDate value='.$_POST['toDate'].'>'; - echo '<input type=hidden name=assetcategory value='.$_POST['assetcategory'].'>'; - echo '<input type=hidden name=assettype value='.$_POST['assettype'].'>'; - echo '<input type=hidden name=assetlocation value='.$_POST['assetlocation'].'>'; - echo '</table><div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"></div></form>'; + echo '<input type=hidden name=fromDate value="' . $_POST['fromDate'] . '">'; + echo '<input type=hidden name=toDate value=' . $_POST['toDate'] . '>'; + echo '<input type=hidden name=assetcategory value=' . $_POST['assetcategory'] . '>'; + echo '<input type=hidden name=assettype value=' . $_POST['assettype'] . '>'; + echo '<input type=hidden name=assetlocation value=' . $_POST['assetlocation'] . '>'; + //Total Values + echo '<tr></tr>'; + echo '<tr><th style="vertical-align:top">TOTAL</th>'; + echo '<th style="vertical-align:top"></th>'; + echo '<th style="vertical-align:top"></th>'; + echo '<th style="vertical-align:top"></th>'; + echo '<th style="vertical-align:top"></th>'; + echo '<th style="vertical-align:top"></th>'; + echo '<th style="vertical-align:top" class=number>' . number_format($TotalCost, 2) . '</th>'; + echo '<th style="vertical-align:top" class=number>' . number_format($Totaldepn, 2) . '</th>'; + echo '<th style="vertical-align:top" class=number>' . number_format($TotalNBV, 2) . '</th>'; + echo '<th style="vertical-align:top" class=number>' . number_format($TotalCost, 2) . '</th>'; + echo '<th style="vertical-align:top" class=number>' . number_format($TotaldepnInt, 2) . '</th>'; + echo '<th style="vertical-align:top" class=number>' . number_format($TotalNBVInt, 2) . '</th>'; + echo '<th style="vertical-align:top" class=number>' . number_format($Totaldisp, 2) . '</th></tr>'; + echo '</table>'; + echo '<div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"></div></form>'; + echo '</p>'; + echo '<div class="centre"><input type="Submit" name="csv" value="' . _('Print as CSV') . '"></div></form>'; } } else { - include('includes/header.inc'); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . - _('Search') . '" alt="">' . ' ' . $title; - $sql = "SELECT * FROM stockcategory WHERE stocktype='".'A'."'"; - $result = DB_query($sql,$db); - + include ('includes/header.inc'); + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; + $sql = "SELECT * FROM stockcategory WHERE stocktype='" . 'A' . "'"; + $result = DB_query($sql, $db); echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table>'; - echo '<tr><th>'._('Asset Category').'</th>'; + echo '<tr><th>' . _('Asset Category') . '</th>'; echo '<td><select name=assetcategory>'; - echo '<option value="%">'._('ALL').'</option>'; - while ($myrow=DB_fetch_array($result)) { - if (isset($_POST['assetcategory']) and $myrow['categoryid']==$_POST['assetcategory']) { - echo '<option selected value='.$myrow['categoryid'].'>'.$myrow['categorydescription'].'</option>'; + echo '<option value="%">' . _('ALL') . '</option>'; + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['assetcategory']) and $myrow['categoryid'] == $_POST['assetcategory']) { + echo '<option selected value=' . $myrow['categoryid'] . '>' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option value='.$myrow['categoryid'].'>'.$myrow['categorydescription'].'</option>'; + echo '<option value=' . $myrow['categoryid'] . '>' . $myrow['categorydescription'] . '</option>'; } } echo '</select></td></tr>'; - $sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; - $result = DB_query($sql,$db); - - echo '<tr><th>'._('Asset Location').'</th>'; + $result = DB_query($sql, $db); + echo '<tr><th>' . _('Asset Location') . '</th>'; echo '<td><select name=assetlocation>'; - echo '<option value="All">'._('ALL').'</option>'; - while ($myrow=DB_fetch_array($result)) { - if (isset($_POST['assetlocation']) and $myrow['locationdescription']==$_POST['assetlocation']) { - echo '<option selected value="'.$myrow['locationdescription'].'">'.$myrow['locationdescription'].'</option>'; + echo '<option value="All">' . _('ALL') . '</option>'; + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['assetlocation']) and $myrow['locationdescription'] == $_POST['assetlocation']) { + echo '<option selected value="' . $myrow['locationdescription'] . '">' . $myrow['locationdescription'] . '</option>'; } else { - echo '<option value="'.$myrow['locationdescription'].'">'.$myrow['locationdescription'].'</option>'; + echo '<option value="' . $myrow['locationdescription'] . '">' . $myrow['locationdescription'] . '</option>'; } } echo '</select></td></tr>'; - $sql = "SELECT stockid, description FROM stockmaster LEFT JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid WHERE stocktype='A'"; - $result = DB_query($sql,$db); - - echo '<tr><th>'._('Asset Type').'</th>'; + $result = DB_query($sql, $db); + echo '<tr><th>' . _('Asset Type') . '</th>'; echo '<td><select name=assettype>'; - echo '<option value="%">'._('ALL').'</option>'; - while ($myrow=DB_fetch_array($result)) { - if (isset($_POST['assettype']) and $myrow['stockid']==$_POST['assettype']) { - echo '<option selected value='.$myrow['stockid'].'>'.$myrow['description'].'</option>'; + echo '<option value="%">' . _('ALL') . '</option>'; + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['assettype']) and $myrow['stockid'] == $_POST['assettype']) { + echo '<option selected value=' . $myrow['stockid'] . '>' . $myrow['description'] . '</option>'; } else { - echo '<option value='.$myrow['stockid'].'>'.$myrow['description'].'</option>'; + echo '<option value=' . $myrow['stockid'] . '>' . $myrow['description'] . '</option>'; } } - echo '</select></td></tr>'; - if (empty($_POST['fromDate'])) { - $_POST['fromDate']=date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, date("m"), date("d"), date("Y")-1)); + $_POST['fromDate'] = date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, date("m"), date("d"), date("Y") - 1)); } if (empty($_POST['toDate'])) { - $_POST['toDate']=date($_SESSION['DefaultDateFormat']); + $_POST['toDate'] = date($_SESSION['DefaultDateFormat']); } - //FULUSI CHANGE BELOW TO ADD TIME - echo '<tr><th>'._(' From Date')."</th><td><input type='text' class='date' alt='".$_SESSION['DefaultDateFormat']. - "' name='fromDate' maxlength=10 size=11 value='".$_POST['fromDate']."'></td>"; - + echo '<tr><th>' . _(' From Date') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='fromDate' maxlength=10 size=11 value='" . $_POST['fromDate'] . "'></td>"; echo '</tr>'; - echo '<tr> - <th>'._('To Date ')."</th> - <td><input type='text' class='date' alt='".$_SESSION['DefaultDateFormat']. - "' name='toDate' maxlength=10 size=11 value='".$_POST['toDate']."'></td>"; - + echo '<tr><th>' . _('To Date ') . "</th><td><input type='text' class='date' alt='" . $_SESSION['DefaultDateFormat'] . "' name='toDate' maxlength=10 size=11 value='" . $_POST['toDate'] . "'></td>"; echo '</tr>'; //end of FULUSI STUFF - echo '</table><br>'; - echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Show Assets') . '"></div><br />'; - echo '<div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"></div>'; - + echo '<div class="centre"><input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"></div><br/>'; + echo '<div class="centre"><input type="Submit" name = "csv" value= "' . _('Print as CSV') . '"></div>'; echo '</form>'; } - -include('includes/footer.inc'); - +include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-08 13:04:22 UTC (rev 3371) +++ trunk/doc/Change.log.html 2010-03-08 13:30:44 UTC (rev 3372) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/03/10 Simon Peter Otandekar: FixedAssetRegister.php Include totals and sub-totals</p> <p>08/03/10 Tim: PrintCustTransPortrait.php Correctly show the prices</p> <p>08/03/10 Tim: Corrections to DIFOT report to correctly show the logo</p> <p>05/03/10 Lindsay: PrintCustTrans.php generates HTML for Print, PDF for Print PDF</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-08 14:02:12
|
Revision: 3373 http://web-erp.svn.sourceforge.net/web-erp/?rev=3373&view=rev Author: tim_schofield Date: 2010-03-08 14:02:05 +0000 (Mon, 08 Mar 2010) Log Message: ----------- Tim: Small changes to Petty Cash module Modified Paths: -------------- trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcExpensesTypeTab.php trunk/doc/Change.log.html Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2010-03-08 13:30:44 UTC (rev 3372) +++ trunk/PcAssignCashToTab.php 2010-03-08 14:02:05 UTC (rev 3373) @@ -45,8 +45,8 @@ prnMsg('<br>' . _('The Amount must be inputed'),'error'); $Errors[$i] = 'TabCode'; $i++; - } - + } + $sqlLimit = "SELECT tablimit FROM pctabs WHERE tabcode='$SelectedTabs'"; @@ -54,9 +54,9 @@ $ResultLimit = DB_query($sqlLimit,$db); $Limit=DB_fetch_array($ResultLimit); - if (($_POST['CurrentAmount']+$_POST['amount'])>$Limit['tablimit']){ + if (($_POST['CurrentAmount']+$_POST['Amount'])>$Limit['tablimit']){ prnMsg('<br>' . _('The balance after this assignation would be greater than the specified limit for this PC tab'),'warning'); - } + } if ($InputError !=1 AND isset($SelectedIndex) ) { @@ -68,7 +68,7 @@ receipt = '" . $_POST['Receipt'] . "' WHERE counterindex = '$SelectedIndex'"; $msg = _('Assignation of cash to PC Tab ') . ' ' . $SelectedTabs . ' ' . _('has been updated'); - + } elseif ($InputError !=1 ) { // Add new record on submit $sql = "INSERT INTO pcashdetails @@ -119,7 +119,7 @@ then none of the above are true and the list of sales types will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<p><table border=1>'; //Main table echo '<td><table>'; // First column @@ -141,8 +141,8 @@ echo "<option VALUE='"; } echo $myrow['tabcode'] . "'>" . $myrow['tabcode']; - } - + } + echo '</select></td></tr>'; echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table @@ -152,11 +152,11 @@ //end of ifs and buts! if (isset($_POST['process'])OR isset($SelectedTabs)) { - + echo '<p><div class="centre"><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Details Of Petty Cash Tab ') . '' .$SelectedTabs. '<a/></div><p>'; - + if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ - + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo "<div class='centre'><p>" . _('Detail Of PC Tab Movements For Last ') .': '; if(!isset ($Days)){ @@ -166,22 +166,22 @@ echo "<input type=text class=number name='Days' VALUE=" . $Days . " MAXLENGTH =3 size=4> Days "; echo '<input type=submit name="Go" value="' . _('Go') . '">'; echo '<p></div></form>'; - + if (isset($_POST['Cancel'])) { unset($_POST['Amount']); unset($_POST['Date']); unset($_POST['Notes']); unset($_POST['Receipt']); } - -/* $sql = "SELECT pcashdetails.date, - pcashdetails.codeexpense, + +/* $sql = "SELECT pcashdetails.date, + pcashdetails.codeexpense, pcexpenses.description - pcashdetails.amount, - pcashdetails.authorized, - pcashdetails.posted, - pcashdetails.notes, - pcashdetails.receipt + pcashdetails.amount, + pcashdetails.authorized, + pcashdetails.posted, + pcashdetails.notes, + pcashdetails.receipt FROM pcashdetails, pcexpenses WHERE pcashdetails.tabcode='$SelectedTabs' AND pcashdetails.codeexpense = pcexpenses.codeexpense @@ -193,9 +193,9 @@ AND date >=DATE_SUB(CURDATE(), INTERVAL ".$Days." DAY) ORDER BY date, counterindex ASC"; - + $result = DB_query($sql,$db); - + echo '<br><table BORDER=1>'; echo "<tr> <th>" . _('Date') . "</th> @@ -217,19 +217,19 @@ $k=1; } - $sqldes="SELECT description - FROM pcexpenses + $sqldes="SELECT description + FROM pcexpenses WHERE codeexpense='". $myrow['3'] . "'"; - + $ResultDes = DB_query($sqldes,$db); $Description=DB_fetch_array($ResultDes); - + if (!isset($Description['0'])){ $Description['0']='ASSIGNCASH'; } if (($myrow['5'] == "0000-00-00") and ($Description['0'] == 'ASSIGNCASH')){ - // only cash assignations NOT authorized can be modified or deleted + // only cash assignations NOT authorized can be modified or deleted printf("<td>%s</td> <td>%s</td> <td class=number>%s</td> @@ -264,33 +264,33 @@ } } //END WHILE LIST LOOP - - $sqlamount="SELECT sum(amount) + + $sqlamount="SELECT sum(amount) FROM pcashdetails - WHERE tabcode='$SelectedTabs'"; - + WHERE tabcode='$SelectedTabs'"; + $ResultAmount = DB_query($sqlamount,$db); $Amount=DB_fetch_array($ResultAmount); - + if (!isset($Amount['0'])) { $Amount['0']=0; } - + echo "<tr><td colspan=4 style=text-align:right >" . _('Current balance') . ":</td> <td colspan=2>".number_format($Amount['0'],2)."</td></tr>"; echo '</table>'; - - } - + + } + if (! isset($_GET['delete'])) { echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<p><table border=1>'; //Main table echo '<td><table>'; // First column - + if ( isset($_GET['edit'])) { - + $sql = "SELECT * FROM pcashdetails WHERE counterindex='$SelectedIndex'"; @@ -302,45 +302,45 @@ $_POST['Amount'] = $myrow['amount']; $_POST['Notes'] = $myrow['notes']; $_POST['Receipt'] = $myrow['receipt']; - + echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; echo "<input type=hidden name='SelectedIndex' VALUE=" . $SelectedIndex. ">"; echo "<input type=hidden name='CurrentAmount' VALUE=" . $Amount['0']. ">"; echo "<input type=hidden name='Days' VALUE=" .$Days. ">"; } -/* Ricard: needs revision of this date initialization */ +/* Ricard: needs revision of this date initialization */ if (!isset($_POST['Date'])) { $_POST['Date']=Date("d/m/Y"); } - + echo '<tr><td>' . _('Cash Assignation Date') . ":</td>"; - + echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size=10 maxlength=10 value=' . $_POST['Date'] . '></td></tr>'; - + if (!isset($_POST['Amount'])) { $_POST['Amount']=0; } echo "<tr><td>" . _('Amount') . ":</td><td><input type='Text' class='number' name='Amount' size='12' maxlength='11' value='" . $_POST['Amount'] . "'></td></tr>"; - + if (!isset($_POST['Notes'])) { $_POST['Notes']=''; } - + echo "<tr><td>" . _('Notes') . ":</td><td><input type='Text' name='Notes' size=50 maxlength=49 value='" . $_POST['Notes'] . "'></td></tr>"; if (!isset($_POST['Receipt'])) { $_POST['Receipt']=''; } - + echo "<tr><td>" . _('Receipt') . ":</td><td><input type='Text' name='Receipt' size=50 maxlength=49 value='" . $_POST['Receipt'] . "'></td></tr>"; echo "<input type=hidden name='CurrentAmount' VALUE=" . $Amount['0']. ">"; echo "<input type=hidden name='SelectedTabs' VALUE=" . $SelectedTabs . ">"; echo "<input type=hidden name='Days' VALUE=" .$Days. ">"; - + echo '</table>'; // close table in first column echo '</td></tr></table>'; // close main table @@ -349,7 +349,7 @@ echo '</form>'; } // end if user wish to delete - + } include('includes/footer.inc'); Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2010-03-08 13:30:44 UTC (rev 3372) +++ trunk/PcAuthorizeExpenses.php 2010-03-08 14:02:05 UTC (rev 3373) @@ -33,9 +33,11 @@ $Errors = array(); if (isset($SelectedTabs)) { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Petty Cash') . '" alt="">' . ' <a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Authorization Of Petty Cash Expenses ') . ''.$SelectedTabs.'<a/>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Petty Cash') . + '" alt="">' . ' <a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Authorization Of Petty Cash Expenses ') . ''.$SelectedTabs.'<a/>'; } else { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Petty Cash') . '" alt="">' . ' <a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Authorization Of Petty Cash Expenses ') . '<a/>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Petty Cash') . + '" alt="">' . ' <a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '">' . _('Authorization Of Petty Cash Expenses ') . '<a/>'; } if (isset($_POST['submit']) or isset($_POST['update']) OR isset($SelectedTabs) OR isset ($_POST['GO'])) { @@ -90,7 +92,7 @@ while ($myrow=DB_fetch_array($result)) { //update database if update pressed - if (($_POST['submit']=='Update') AND isset($_POST[$myrow['counterindex']])){ + if ((isset($_POST['submit']) and $_POST['submit']=='Update') AND isset($_POST[$myrow['counterindex']])){ $PeriodNo = GetPeriod(ConvertSQLDate($myrow['date']), $db); Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2010-03-08 13:30:44 UTC (rev 3372) +++ trunk/PcExpensesTypeTab.php 2010-03-08 14:02:05 UTC (rev 3373) @@ -24,7 +24,7 @@ } $Errors = array(); - +$InputError=0; if (isset($_POST['submit'])) { if ( $InputError !=1 ) { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-08 13:30:44 UTC (rev 3372) +++ trunk/doc/Change.log.html 2010-03-08 14:02:05 UTC (rev 3373) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/03/10 Tim: Small changes to Petty Cash module</p> <p>08/03/10 Simon Peter Otandekar: FixedAssetRegister.php Include totals and sub-totals</p> <p>08/03/10 Tim: PrintCustTransPortrait.php Correctly show the prices</p> <p>08/03/10 Tim: Corrections to DIFOT report to correctly show the logo</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-09 06:28:44
|
Revision: 3374 http://web-erp.svn.sourceforge.net/web-erp/?rev=3374&view=rev Author: tim_schofield Date: 2010-03-09 06:28:37 +0000 (Tue, 09 Mar 2010) Log Message: ----------- Tim: Updates to Petty Cash Management Report and include new header file Modified Paths: -------------- trunk/PcReportTab.php trunk/doc/Change.log.html Added Paths: ----------- trunk/includes/PDFTabReportHeader.inc Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2010-03-08 14:02:05 UTC (rev 3373) +++ trunk/PcReportTab.php 2010-03-09 06:28:37 UTC (rev 3374) @@ -129,36 +129,36 @@ $YPos -= (2 * $line_height); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Tab Code :')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,70,$FontSize,$SelectedTabs); + $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,20,$FontSize,_(': ')); + $LeftOvers = $pdf->addTextWrap($Left_Margin+110,$YPos,70,$FontSize,$SelectedTabs); $LeftOvers = $pdf->addTextWrap($Left_Margin+290,$YPos,70,$FontSize,_('From ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,20,$FontSize,_(': ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+340,$YPos,70,$FontSize,$_POST['FromDate']); $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('User ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,70,$FontSize,$Tabs['usercode']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,20,$FontSize,_(': ')); + $LeftOvers = $pdf->addTextWrap($Left_Margin+110,$YPos,70,$FontSize,$Tabs['usercode']); $LeftOvers = $pdf->addTextWrap($Left_Margin+290,$YPos,70,$FontSize,_('To ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+320,$YPos,20,$FontSize,_(': ')); $LeftOvers = $pdf->addTextWrap($Left_Margin+340,$YPos,70,$FontSize,$_POST['ToDate']); $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Authorizer ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,70,$FontSize,$Tabs['authorizer']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,20,$FontSize,_(': ')); + $LeftOvers = $pdf->addTextWrap($Left_Margin+110,$YPos,70,$FontSize,$Tabs['authorizer']); $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,_('Currency ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,70,$FontSize,$Tabs['currency']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,20,$FontSize,_(': ')); + $LeftOvers = $pdf->addTextWrap($Left_Margin+110,$YPos,70,$FontSize,$Tabs['currency']); $YPos -= $line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,40,$FontSize,_('Balance before ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,70,$FontSize,$_POST['FromDate']); - $LeftOvers = $pdf->addTextWrap($Left_Margin+90,$YPos,20,$FontSize,_(': ')); - $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,70,$FontSize,number_format($Balance['0'],2)); - $LeftOvers = $pdf->addTextWrap($Left_Margin+140,$YPos,70,$FontSize,$Tabs['currency']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+55,$YPos,70,$FontSize,$_POST['FromDate']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,20,$FontSize,_(': ')); + $LeftOvers = $pdf->addTextWrap($Left_Margin+110,$YPos,70,$FontSize,number_format($Balance['0'],2)); + $LeftOvers = $pdf->addTextWrap($Left_Margin+150,$YPos,70,$FontSize,$Tabs['currency']); $YPos -= (2 * $line_height); $pdf->line($Page_Width-$Right_Margin, $YPos+$line_height,$Left_Margin, $YPos+$line_height); @@ -171,7 +171,6 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,_('Note')); $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,_('Receipt')); $LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,100,$FontSize,_('Date Authorizer')); - $pdf->selectFont('./fonts/Helvetica.afm'); $YPos -= (2 * $line_height); while ($myrow=DB_fetch_array($TabDetail)) { @@ -184,7 +183,7 @@ $Description=DB_fetch_array($ResultDes); if (!isset($Description[0])){ - $Description[0]='ASSIGNCASH'; + $Description[0]='ASSIGNCASH'; } // Print total for each account Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-08 14:02:05 UTC (rev 3373) +++ trunk/doc/Change.log.html 2010-03-09 06:28:37 UTC (rev 3374) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>09/03/10 Tim: Updates to Petty Cash Management Report and include new header file</p> <p>08/03/10 Tim: Small changes to Petty Cash module</p> <p>08/03/10 Simon Peter Otandekar: FixedAssetRegister.php Include totals and sub-totals</p> <p>08/03/10 Tim: PrintCustTransPortrait.php Correctly show the prices</p> Added: trunk/includes/PDFTabReportHeader.inc =================================================================== --- trunk/includes/PDFTabReportHeader.inc (rev 0) +++ trunk/includes/PDFTabReportHeader.inc 2010-03-09 06:28:37 UTC (rev 3374) @@ -0,0 +1,19 @@ +<?php + /* + * PDF page header for the Pc Tab report. + * + */ + + $PageNumber++; + if ($PageNumber>1){ + $pdf->newPage(); + } + + $FontSize = 8; + $YPos = $Page_Height - $Top_Margin; + $pdf->addText($Left_Margin,$YPos,$FontSize,$_SESSION['CompanyRecord']['coyname']); + $pdf->addText($Page_Width-$Right_Margin-120,$YPos,$FontSize, _('Printed'). ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page'). ' ' . $PageNumber); + + + +?> \ No newline at end of file Property changes on: trunk/includes/PDFTabReportHeader.inc ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-09 11:10:43
|
Revision: 3375 http://web-erp.svn.sourceforge.net/web-erp/?rev=3375&view=rev Author: tim_schofield Date: 2010-03-09 11:10:37 +0000 (Tue, 09 Mar 2010) Log Message: ----------- Tim: PDFStockLocTransfer.php - Add a reprint option Modified Paths: -------------- trunk/PDFStockLocTransfer.php trunk/doc/Change.log.html Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2010-03-09 06:28:37 UTC (rev 3374) +++ trunk/PDFStockLocTransfer.php 2010-03-09 11:10:37 UTC (rev 3375) @@ -5,26 +5,35 @@ /* $Revision: 1.12 $ */ $PageSecurity =1; + +$title = _('Stock Location Transfer Docket Error'); include('includes/session.inc'); include('includes/PDFStarter.php'); -$pdf->addInfo('Title', _('Inventory Location Transfer BOL') ); -$pdf->addInfo('Subject', _('Inventory Location Transfer BOL') . ' # ' . $_GET['TransferNo']); -$FontSize=10; -$PageNumber=1; -$line_height=30; -$title = _('Stock Location Transfer Docket Error'); +if (isset($_POST['TransferNo'])) { + $_GET['TransferNo']=$_POST['TransferNo']; +} if (!isset($_GET['TransferNo'])){ include ('includes/header.inc'); - echo '<p>'; - prnMsg( _('This page must be called with a location transfer reference number'),'error' ); + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . + '" alt="">' . ' ' . _('Reprint transfer docket').'<br>'; + echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; + echo '<table><tr><td>'._('Transfer docket to reprint').'</td>'; + echo '<td><input type=text class=number size=10 name="TransferNo"></td></tr></table>'; + echo '<div class="centre"><input type=submit Name="Print" Value="' . _('Print') .'">'; include ('includes/footer.inc'); exit; } +$pdf->addInfo('Title', _('Inventory Location Transfer BOL') ); +$pdf->addInfo('Subject', _('Inventory Location Transfer BOL') . ' # ' . $_GET['TransferNo']); +$FontSize=10; +$PageNumber=1; +$line_height=30; + $ErrMsg = _('An error occurred retrieving the items on the transfer'). '.' . '<p>'. _('This page must be called with a location transfer reference number').'.'; $DbgMsg = _('The SQL that failed while retrieving the items on the transfer was'); $sql = "SELECT loctransfers.reference, @@ -99,4 +108,4 @@ */ $pdf->OutputD($_SESSION['DatabaseName'] . '_StockLocTrfShipment_' . date('Y-m-d') . '.pdf');//UldisN $pdf->__destruct(); //UldisN -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-09 06:28:37 UTC (rev 3374) +++ trunk/doc/Change.log.html 2010-03-09 11:10:37 UTC (rev 3375) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>09/03/10 Tim: PDFStockLocTransfer.php - Add a reprint option</p> <p>09/03/10 Tim: Updates to Petty Cash Management Report and include new header file</p> <p>08/03/10 Tim: Small changes to Petty Cash module</p> <p>08/03/10 Simon Peter Otandekar: FixedAssetRegister.php Include totals and sub-totals</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-10 07:55:11
|
Revision: 3376 http://web-erp.svn.sourceforge.net/web-erp/?rev=3376&view=rev Author: tim_schofield Date: 2010-03-10 07:54:58 +0000 (Wed, 10 Mar 2010) Log Message: ----------- Peter Pettersson: Updated Swedish translation and some changes to Language oriented files Modified Paths: -------------- trunk/Z_poEditLangHeader.php trunk/Z_poEditLangModule.php trunk/Z_poRebuildDefault.php trunk/doc/Change.log.html trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po Modified: trunk/Z_poEditLangHeader.php =================================================================== --- trunk/Z_poEditLangHeader.php 2010-03-09 11:10:37 UTC (rev 3375) +++ trunk/Z_poEditLangHeader.php 2010-03-10 07:54:58 UTC (rev 3376) @@ -40,7 +40,7 @@ $fpOut = fopen($PathToNewLanguage, 'w'); for ($i=1; $i<=17; $i++) { - $Result = fputs($fpOut, stripslashes($_POST['Header_'.$i])."\n"); + $Result = fputs($fpOut, stripslashes(html_entity_decode($_POST['Header_'.$i]))."\n"); } prnMsg (_('Writing the rest of the language file') . '.....<br>', 'info', ' '); @@ -96,7 +96,7 @@ echo '<tr>'; echo '<td>' . _('Header Line') . ' # ' . $i . '</td>'; - echo '<td><input type="text" size="80" name="Header_' . $i . '" VALUE="' . $LanguageHeader[$i] . '"></td>'; + echo '<td><input type="text" size="80" name="Header_' . $i . '" VALUE="' . htmlentities($LanguageHeader[$i]) . '"></td>'; echo '</tr>'; } Modified: trunk/Z_poEditLangModule.php =================================================================== --- trunk/Z_poEditLangModule.php 2010-03-09 11:10:37 UTC (rev 3375) +++ trunk/Z_poEditLangModule.php 2010-03-10 07:54:58 UTC (rev 3376) @@ -32,7 +32,7 @@ /*first rebuild the en_GB default with xgettext */ - $PathToDefault = './locale/en_GB/LC_MESSAGES/messages.po'; + $PathToDefault = './locale/en_GB.utf8/LC_MESSAGES/messages.po'; $FilesToInclude = '*php includes/*.php includes/*.inc'; $xgettextCmd = 'xgettext --no-wrap -L php -o ' . $PathToDefault . ' ' . $FilesToInclude; Modified: trunk/Z_poRebuildDefault.php =================================================================== --- trunk/Z_poRebuildDefault.php 2010-03-09 11:10:37 UTC (rev 3375) +++ trunk/Z_poRebuildDefault.php 2010-03-10 07:54:58 UTC (rev 3376) @@ -14,7 +14,7 @@ /* Your webserver user MUST have read/write access to here, otherwise you'll be wasting your time */ -$PathToDefault = './locale/en_GB/LC_MESSAGES/messages.po'; +$PathToDefault = './locale/en_GB.utf8/LC_MESSAGES/messages.po'; $FilesToInclude = '*.php includes/*.inc includes/*.php api/*.php reportwriter/languages/en_US/reports.php'; $xgettextCmd = 'xgettext --no-wrap -L php -o ' . $PathToDefault . ' ' . $FilesToInclude; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-09 11:10:37 UTC (rev 3375) +++ trunk/doc/Change.log.html 2010-03-10 07:54:58 UTC (rev 3376) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>10/03/10 Peter Pettersson: Updated Swedish translation and some changes to Language oriented files</p> <p>09/03/10 Tim: PDFStockLocTransfer.php - Add a reprint option</p> <p>09/03/10 Tim: Updates to Petty Cash Management Report and include new header file</p> <p>08/03/10 Tim: Small changes to Petty Cash module</p> Modified: trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po 2010-03-09 11:10:37 UTC (rev 3375) +++ trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po 2010-03-10 07:54:58 UTC (rev 3376) @@ -1,832 +1,1522 @@ +# webERP - Swedish Translation File. +# Copyright (C) 2010 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE webERP. +# Peter Pettersson <pet...@gm...>, 2010. +# msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: 3.13rc0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-02-09 09:25+0000\n" -"PO-Revision-Date: 2006-09-27 22:54+0100\n" -"Last-Translator: Samuel Sjöbergsson <sam...@ho...>\n" -"Language-Team: LANGUAGE <LL...@li...>\n" +"POT-Creation-Date: 2010-03-09 09:20+0100\n" +"PO-Revision-Date: 2010-03-09 11:50+0100\n" +"Last-Translator: Peter Pettersson <pet...@gm...>\n" +"Language-Team: Swedish <LL...@li...>\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: AccountGroups.php:8 index.php:1038 +#: AccountGroups.php:9 +#: index.php:1164 msgid "Account Groups" msgstr "Kontogrupper" -#: AccountGroups.php:18 -#, fuzzy -msgid "" -"An error occurred in retrieving the account groups of the parent account " -"group during the check for recursion" +#: AccountGroups.php:19 +msgid "An error occurred in retrieving the account groups of the parent account group during the check for recursion" msgstr "Ett fel inträffade under rekursionskontrollen" -#: AccountGroups.php:19 -#, fuzzy -msgid "" -"The SQL that was used to retrieve the account groups of the parent account " -"group and that failed in the process was" -msgstr "SQL fel" +#: AccountGroups.php:20 +msgid "The SQL that was used to retrieve the account groups of the parent account group and that failed in the process was" +msgstr "Den SQL som användes var" -#: AccountGroups.php:61 -#, fuzzy +#: AccountGroups.php:57 +#: AccountGroups.php:94 +#: AccountGroups.php:177 +#: AccountGroups.php:187 +msgid "The SQL that was used to retrieve the information was" +msgstr "Den SQL som användes var" + +#: AccountGroups.php:58 +msgid "Could not check whether the group exists because" +msgstr "" + +#: AccountGroups.php:65 msgid "The account group name already exists in the database" -msgstr "Mappnamnet finns redan." +msgstr "Kontogruppsnamnet finns redan i databasen" -#: AccountGroups.php:67 +#: AccountGroups.php:71 msgid "The account group name cannot contain the character" -msgstr "Mappnamnet kan inte innehålla returtecknet." +msgstr "Mappnamnet kan inte innehålla tecknet." -#: AccountGroups.php:67 AccountSections.php:74 PaymentMethods.php:37 -#: TaxCategories.php:30 TaxProvinces.php:30 UnitsOfMeasure.php:30 +#: AccountGroups.php:71 +#: AccountSections.php:75 +#: PaymentMethods.php:38 +#: TaxCategories.php:30 +#: TaxProvinces.php:30 +#: UnitsOfMeasure.php:30 msgid "or the character" msgstr "eller tecknet" -#: AccountGroups.php:73 -#, fuzzy +#: AccountGroups.php:77 msgid "The account group name must be at least one character long" -msgstr "Leveransplatskoden måste vara minst 1 tecken lång" +msgstr "Kontogruppnamnet måste vara minst 1 tecken långt" -#: AccountGroups.php:80 -msgid "" -"The parent account group selected appears to result in a recursive account " -"structure - select an alternative parent account group or make this group a " -"top level account group" -msgstr "Den utvalda gruppen verkar resultera i en iterativ konto" -"struktur - välj en annan grupp eller göra denna grupp till ett" -"topp nivå konto" +#: AccountGroups.php:84 +msgid "The parent account group selected appears to result in a recursive account structure - select an alternative parent account group or make this group a top level account group" +msgstr "" -#: AccountGroups.php:99 +#: AccountGroups.php:95 +msgid "Could not check whether the group is recursive because" +msgstr "" + +#: AccountGroups.php:107 msgid "The section in accounts must be an integer" msgstr "Kontotyp måste vara ett heltal" -#: AccountGroups.php:105 +#: AccountGroups.php:113 msgid "The sequence in the trial balance must be an integer" msgstr "sorteringsordningen måste vara ett heltal" -#: AccountGroups.php:111 -#, fuzzy +#: AccountGroups.php:119 msgid "The sequence in the TB must be numeric and less than" -msgstr "Sorteringsordningen måste vara mindre än" +msgstr "Sorteringsordningen måste vara numerisk och mindre än" -#: AccountGroups.php:129 AccountSections.php:105 PaymentMethods.php:87 +#: AccountGroups.php:136 +msgid "An error occurred in updating the account group" +msgstr "" + +#: AccountGroups.php:137 +msgid "The SQL that was used to update the account group was" +msgstr "Den SQL som användes var" + +#: AccountGroups.php:139 +#: AccountSections.php:106 +#: PaymentMethods.php:88 msgid "Record Updated" msgstr "Posten uppdaterad" -#: AccountGroups.php:147 AccountSections.php:117 PaymentMethods.php:109 +#: AccountGroups.php:157 +msgid "An error occurred in inserting the account group" +msgstr "" + +#: AccountGroups.php:158 +msgid "The SQL that was used to insert the account group was" +msgstr "Den SQL som användes var" + +#: AccountGroups.php:159 +#: AccountSections.php:118 +#: PaymentMethods.php:110 msgid "Record inserted" msgstr "Posten skapad" -#: AccountGroups.php:167 -msgid "" -"Cannot delete this account group because general ledger accounts have been " -"created using this group" -msgstr "Kan inte ta bort kontogruppen för att det finns konto som använder den" +#: AccountGroups.php:176 +msgid "An error occurred in retrieving the group information from chartmaster" +msgstr "" -#: AccountGroups.php:168 AccountGroups.php:176 AccountSections.php:138 -#: Areas.php:117 Areas.php:126 BankAccounts.php:149 CreditStatus.php:123 -#: Currencies.php:141 Currencies.php:149 Currencies.php:156 -#: CustomerBranches.php:284 CustomerBranches.php:294 CustomerBranches.php:304 -#: CustomerBranches.php:314 Customers.php:287 Customers.php:296 -#: Customers.php:304 Customers.php:312 CustomerTypes.php:131 -#: CustomerTypes.php:141 Factors.php:129 GLAccounts.php:90 GLAccounts.php:104 -#: Locations.php:217 Locations.php:225 Locations.php:234 Locations.php:242 -#: Locations.php:250 Locations.php:258 Locations.php:266 Locations.php:274 -#: PaymentMethods.php:141 PaymentTerms.php:145 PaymentTerms.php:152 -#: SalesCategories.php:125 SalesCategories.php:133 SalesPeople.php:142 -#: SalesPeople.php:149 SalesTypes.php:145 SalesTypes.php:155 Shippers.php:82 -#: Shippers.php:94 StockCategories.php:165 Stocks.php:442 Stocks.php:451 -#: Stocks.php:459 Stocks.php:467 Stocks.php:475 Stocks.php:483 -#: Suppliers.php:562 Suppliers.php:571 Suppliers.php:579 TaxCategories.php:130 -#: TaxGroups.php:126 TaxGroups.php:133 TaxProvinces.php:125 -#: UnitsOfMeasure.php:140 UnitsOfMeasure.php:147 WorkCentres.php:90 -#: WorkCentres.php:96 WWW_Access.php:84 +#: AccountGroups.php:181 +msgid "Cannot delete this account group because general ledger accounts have been created using this group" +msgstr "Kan inte ta bort kontogruppen för att det finns konton som använder den" + +#: AccountGroups.php:182 +#: AccountGroups.php:192 +#: AccountSections.php:139 +#: Areas.php:117 +#: Areas.php:126 +#: BankAccounts.php:163 +#: CreditStatus.php:124 +#: Currencies.php:142 +#: Currencies.php:150 +#: Currencies.php:157 +#: CustomerBranches.php:294 +#: CustomerBranches.php:304 +#: CustomerBranches.php:314 +#: CustomerBranches.php:324 +#: CustomerTypes.php:151 +#: CustomerTypes.php:161 +#: Customers.php:291 +#: Customers.php:300 +#: Customers.php:308 +#: Customers.php:316 +#: Factors.php:107 +#: FixedAssetCategories.php:175 +#: FixedAssetItems.php:483 +#: FixedAssetItems.php:492 +#: FixedAssetItems.php:500 +#: FixedAssetItems.php:508 +#: FixedAssetItems.php:516 +#: FixedAssetItems.php:524 +#: GLAccounts.php:91 +#: GLAccounts.php:105 +#: Locations.php:218 +#: Locations.php:226 +#: Locations.php:235 +#: Locations.php:243 +#: Locations.php:251 +#: Locations.php:259 +#: Locations.php:267 +#: Locations.php:275 +#: MRPDemandTypes.php:85 +#: PaymentMethods.php:142 +#: PaymentTerms.php:149 +#: PaymentTerms.php:156 +#: PcExpenses.php:116 +#: SalesCategories.php:125 +#: SalesCategories.php:133 +#: SalesPeople.php:142 +#: SalesPeople.php:149 +#: SalesTypes.php:145 +#: SalesTypes.php:155 +#: Shippers.php:82 +#: Shippers.php:94 +#: StockCategories.php:153 +#: Stocks.php:467 +#: Stocks.php:476 +#: Stocks.php:484 +#: Stocks.php:492 +#: Stocks.php:500 +#: Stocks.php:508 +#: Suppliers.php:569 +#: Suppliers.php:578 +#: Suppliers.php:586 +#: TaxCategories.php:130 +#: TaxGroups.php:128 +#: TaxGroups.php:135 +#: TaxProvinces.php:125 +#: UnitsOfMeasure.php:140 +#: UnitsOfMeasure.php:147 +#: WWW_Access.php:84 +#: WorkCentres.php:90 +#: WorkCentres.php:96 msgid "There are" msgstr "Det finns" -#: AccountGroups.php:168 +#: AccountGroups.php:182 msgid "general ledger accounts that refer to this account group" msgstr "konton som refererar till denna kontogrupp" -#: AccountGroups.php:175 -#, fuzzy -msgid "" -"Cannot delete this account group because it is a parent account group of " -"other account group(s)" -msgstr "Kan inte ta bort detta konto för att det används som momskonto" +#: AccountGroups.php:186 +msgid "An error occurred in retrieving the parent group information" +msgstr "" -#: AccountGroups.php:176 +#: AccountGroups.php:191 +msgid "Cannot delete this account group because it is a parent account group of other account group(s)" +msgstr "Kan inte ta bort detta konto eftersom det är föräldrakonto i en kontogrupp" + +#: AccountGroups.php:192 msgid "account groups that have this group as its/there parent account group" -msgstr "grupper som har detta som sin moderbolags kontogrupp" +msgstr "" -#: AccountGroups.php:180 +#: AccountGroups.php:195 +msgid "An error occurred in deleting the account group" +msgstr "" + +#: AccountGroups.php:196 +msgid "The SQL that was used to delete the account group was" +msgstr "Den SQL som användes var" + +#: AccountGroups.php:198 msgid "group has been deleted" msgstr "Kontogruppen har tagits bort" -#: AccountGroups.php:205 +#: AccountGroups.php:223 +msgid "The sql that was used to retrieve the account group information was " +msgstr "Den SQL som användes var" + +#: AccountGroups.php:224 msgid "Could not get account groups because" msgstr "Kan inte hämta kontogrupper för att" -#: AccountGroups.php:210 +#: AccountGroups.php:226 +#: AccountSections.php:177 +#: AddCustomerContacts.php:21 +#: AgedDebtors.php:467 +#: AgedSuppliers.php:276 +#: BOMListing.php:128 +#: BOMs.php:214 +#: BOMs.php:792 +#: DiscountCategories.php:12 +#: DiscountCategories.php:119 +#: DiscountMatrix.php:18 +#: Factors.php:7 +#: FixedAssetJournal.php:335 +#: FixedAssetLocations.php:10 +#: FixedAssetRegister.php:20 +#: FixedAssetRegister.php:212 +#: FixedAssetTransfer.php:32 +#: FormDesigner.php:129 +#: GLBalanceSheet.php:349 +#: GLBudgets.php:30 +#: GLJournal.php:237 +#: PO_AuthorisationLevels.php:12 +#: PO_SelectOSPurchOrder.php:133 +#: PurchData.php:133 +#: PurchData.php:218 +#: SelectCompletedOrder.php:13 +#: SelectCustomer.php:322 +#: SelectGLAccount.php:19 +#: SelectGLAccount.php:79 +#: SelectOrderItems.php:600 +#: SelectOrderItems.php:1337 +#: SelectOrderItems.php:1457 +#: SelectProduct.php:55 +#: SelectSalesOrder.php:152 +#: SelectSupplier.php:12 +#: SelectSupplier.php:219 +#: SelectWorkOrder.php:11 +#: SelectWorkOrder.php:147 +#: Suppliers.php:306 +#: TaxGroups.php:16 +#: TopItems.php:57 +#: WWW_Users.php:38 +#: WhereUsedInquiry.php:18 +#: WorkCentres.php:111 +#: WorkCentres.php:158 +#: WorkOrderEntry.php:11 +msgid "Search" +msgstr "Sök" + +#: AccountGroups.php:230 msgid "Group Name" msgstr "Gruppnamn" -#: AccountGroups.php:211 EDIMessageFormat.php:140 +#: AccountGroups.php:231 +#: EDIMessageFormat.php:141 msgid "Section" msgstr "Typ" -#: AccountGroups.php:212 AccountGroups.php:367 +#: AccountGroups.php:232 +#: AccountGroups.php:389 msgid "Sequence In TB" msgstr "Sekvens på TB" -#: AccountGroups.php:213 AccountGroups.php:351 GLProfit_Loss.php:8 -#: GLProfit_Loss.php:101 GLProfit_Loss.php:102 GLProfit_Loss.php:149 -#: SelectGLAccount.php:51 SelectGLAccount.php:65 +#: AccountGroups.php:233 +#: AccountGroups.php:373 +#: GLProfit_Loss.php:8 +#: GLProfit_Loss.php:104 +#: GLProfit_Loss.php:105 +#: GLProfit_Loss.php:156 +#: SelectGLAccount.php:45 +#: SelectGLAccount.php:59 msgid "Profit and Loss" msgstr "Resultaträkning" -#: AccountGroups.php:214 AccountGroups.php:312 -#, fuzzy +#: AccountGroups.php:234 +#: AccountGroups.php:334 msgid "Parent Group" msgstr "Segment Group" -#: AccountGroups.php:230 AccountGroups.php:233 AccountGroups.php:355 -#: AccountGroups.php:357 BOMs.php:127 BOMs.php:689 BOMs.php:691 -#: CompanyPreferences.php:436 CompanyPreferences.php:438 -#: CompanyPreferences.php:448 CompanyPreferences.php:450 -#: CompanyPreferences.php:460 CompanyPreferences.php:462 -#: CustomerBranches.php:398 Customers.php:526 Customers.php:723 -#: Customers.php:726 DeliveryDetails.php:750 DeliveryDetails.php:790 -#: DeliveryDetails.php:793 GLTransInquiry.php:71 Locations.php:341 -#: PaymentMethods.php:197 PaymentMethods.php:198 PaymentMethods.php:257 -#: PaymentMethods.php:263 PDFChequeListing.php:57 -#: PDFDeliveryDifferences.php:55 PDFDIFOT.php:61 PO_Header.php:555 -#: PO_PDFPurchOrder.php:325 PO_PDFPurchOrder.php:328 PurchData.php:229 -#: PurchData.php:375 PurchData.php:378 RecurringSalesOrders.php:469 -#: RecurringSalesOrders.php:472 SalesAnalReptCols.php:278 -#: SalesAnalReptCols.php:383 SalesAnalReptCols.php:386 SalesAnalRepts.php:404 -#: SalesAnalRepts.php:407 SalesAnalRepts.php:430 SalesAnalRepts.php:433 -#: SalesAnalRepts.php:456 SalesAnalRepts.php:459 SelectProduct.php:734 -#: ShipmentCosting.php:612 Stocks.php:795 Stocks.php:797 Stocks.php:809 -#: Stocks.php:811 SystemParameters.php:329 SystemParameters.php:400 -#: SystemParameters.php:408 SystemParameters.php:448 SystemParameters.php:521 -#: SystemParameters.php:529 SystemParameters.php:547 SystemParameters.php:554 -#: SystemParameters.php:663 SystemParameters.php:794 SystemParameters.php:796 -#: SystemParameters.php:806 SystemParameters.php:808 TaxGroups.php:295 -#: TaxGroups.php:364 TaxGroups.php:367 WWW_Users.php:536 WWW_Users.php:538 +#: AccountGroups.php:250 +#: AccountGroups.php:253 +#: AccountGroups.php:377 +#: AccountGroups.php:379 +#: BOMs.php:128 +#: BOMs.php:712 +#: BOMs.php:714 +#: BankAccounts.php:217 +#: BankAccounts.php:360 +#: BankAccounts.php:362 +#: BankAccounts.php:366 +#: CompanyPreferences.php:437 +#: CompanyPreferences.php:439 +#: CompanyPreferences.php:449 +#: CompanyPreferences.php:451 +#: CompanyPreferences.php:461 +#: CompanyPreferences.php:463 +#: CustLoginSetup.php:574 +#: CustLoginSetup.php:576 +#: CustomerBranches.php:407 +#: Customers.php:563 +#: Customers.php:804 +#: Customers.php:811 +#: Customers.php:814 +#: DeliveryDetails.php:967 +#: DeliveryDetails.php:1007 +#: DeliveryDetails.php:1010 +#: GLTransInquiry.php:72 +#: Locations.php:342 +#: MRP.php:539 +#: MRP.php:543 +#: MRP.php:547 +#: MRP.php:551 +#: MRPCalendar.php:218 +#: PDFChequeListing.php:59 +#: PDFDIFOT.php:63 +#: PDFDeliveryDifferences.php:60 +#: PO_AuthorisationLevels.php:132 +#: PO_AuthorisationLevels.php:137 +#: PO_Header.php:903 +#: PO_PDFPurchOrder.php:366 +#: PO_PDFPurchOrder.php:369 +#: PaymentMethods.php:198 +#: PaymentMethods.php:199 +#: PaymentMethods.php:258 +#: PaymentMethods.php:264 +#: PurchData.php:177 +#: PurchData.php:440 +#: PurchData.php:443 +#: RecurringSalesOrders.php:473 +#: RecurringSalesOrders.php:476 +#: SalesAnalReptCols.php:278 +#: SalesAnalReptCols.php:383 +#: SalesAnalReptCols.php:386 +#: SalesAnalRepts.php:404 +#: SalesAnalRepts.php:407 +#: SalesAnalRepts.php:430 +#: SalesAnalRepts.php:433 +#: SalesAnalRepts.php:456 +#: SalesAnalRepts.php:459 +#: SelectProduct.php:726 +#: ShipmentCosting.php:612 +#: Stocks.php:837 +#: Stocks.php:839 +#: Stocks.php:857 +#: Stocks.php:859 +#: SystemParameters.php:361 +#: SystemParameters.php:437 +#: SystemParameters.php:445 +#: SystemParameters.php:485 +#: SystemParameters.php:558 +#: SystemParameters.php:566 +#: SystemParameters.php:584 +#: SystemParameters.php:591 +#: SystemParameters.php:715 +#: SystemParameters.php:846 +#: SystemParameters.php:848 +#: SystemParameters.php:858 +#: SystemParameters.php:860 +#: SystemParameters.php:914 +#: SystemParameters.php:926 +#: SystemParameters.php:928 +#: TaxGroups.php:290 +#: TaxGroups.php:293 +#: TaxGroups.php:342 +#: WWW_Users.php:593 +#: WWW_Users.php:595 msgid "Yes" msgstr "Ja" -#: AccountGroups.php:236 AccountGroups.php:360 AccountGroups.php:362 -#: BOMs.php:129 BOMs.php:688 BOMs.php:692 CompanyPreferences.php:435 -#: CompanyPreferences.php:439 CompanyPreferences.php:447 -#: CompanyPreferences.php:451 CompanyPreferences.php:459 -#: CompanyPreferences.php:463 CustomerBranches.php:398 Customers.php:525 -#: Customers.php:722 Customers.php:725 DeliveryDetails.php:751 -#: DeliveryDetails.php:791 DeliveryDetails.php:794 GLTransInquiry.php:125 -#: Locations.php:343 PaymentMethods.php:197 PaymentMethods.php:198 -#: PaymentMethods.php:258 PaymentMethods.php:264 PDFChequeListing.php:56 -#: PDFDeliveryDifferences.php:54 PDFDIFOT.php:60 PO_Header.php:555 -#: PO_PDFPurchOrder.php:326 PO_PDFPurchOrder.php:329 PurchData.php:232 -#: PurchData.php:376 PurchData.php:379 RecurringSalesOrders.php:468 -#: RecurringSalesOrders.php:471 SalesAnalReptCols.php:276 -#: SalesAnalReptCols.php:384 SalesAnalReptCols.php:387 SalesAnalRepts.php:403 -#: SalesAnalRepts.php:406 SalesAnalRepts.php:429 SalesAnalRepts.php:432 -#: SalesAnalRepts.php:455 SalesAnalRepts.php:458 SelectProduct.php:737 -#: ShipmentCosting.php:613 Stocks.php:790 Stocks.php:792 Stocks.php:804 -#: Stocks.php:806 SystemParameters.php:330 SystemParameters.php:401 -#: SystemParameters.php:409 SystemParameters.php:449 SystemParameters.php:522 -#: SystemParameters.php:530 SystemParameters.php:548 SystemParameters.php:555 -#: SystemParameters.php:664 SystemParameters.php:793 SystemParameters.php:797 -#: SystemParameters.php:805 SystemParameters.php:809 TaxGroups.php:297 -#: TaxGroups.php:365 TaxGroups.php:368 WWW_Users.php:535 WWW_Users.php:539 -#: includes/PDFLowGPPageHeader.inc:31 includes/PDFTaxPageHeader.inc:34 +#: AccountGroups.php:256 +#: AccountGroups.php:382 +#: AccountGroups.php:384 +#: BOMs.php:130 +#: BOMs.php:711 +#: BOMs.php:715 +#: BankAccounts.php:215 +#: BankAccounts.php:360 +#: BankAccounts.php:362 +#: BankAccounts.php:366 +#: CompanyPreferences.php:436 +#: CompanyPreferences.php:440 +#: CompanyPreferences.php:448 +#: CompanyPreferences.php:452 +#: CompanyPreferences.php:460 +#: CompanyPreferences.php:464 +#: CustLoginSetup.php:573 +#: CustLoginSetup.php:577 +#: CustomerBranches.php:407 +#: Customers.php:562 +#: Customers.php:802 +#: Customers.php:810 +#: Customers.php:813 +#: DeliveryDetails.php:968 +#: DeliveryDetails.php:1008 +#: DeliveryDetails.php:1011 +#: GLTransInquiry.php:126 +#: Locations.php:344 +#: MRP.php:537 +#: MRP.php:541 +#: MRP.php:545 +#: MRP.php:549 +#: MRPCalendar.php:220 +#: PDFChequeListing.php:58 +#: PDFDIFOT.php:62 +#: PDFDeliveryDifferences.php:59 +#: PO_AuthorisationLevels.php:134 +#: PO_AuthorisationLevels.php:139 +#: PO_Header.php:903 +#: PO_PDFPurchOrder.php:367 +#: PO_PDFPurchOrder.php:370 +#: PaymentMethods.php:198 +#: PaymentMethods.php:199 +#: PaymentMethods.php:259 +#: PaymentMethods.php:265 +#: PurchData.php:180 +#: PurchData.php:441 +#: PurchData.php:444 +#: RecurringSalesOrders.php:472 +#: RecurringSalesOrders.php:475 +#: SalesAnalReptCols.php:276 +#: SalesAnalReptCols.php:384 +#: SalesAnalReptCols.php:387 +#: SalesAnalRepts.php:403 +#: SalesAnalRepts.php:406 +#: SalesAnalRepts.php:429 +#: SalesAnalRepts.php:432 +#: SalesAnalRepts.php:455 +#: SalesAnalRepts.php:458 +#: SelectProduct.php:729 +#: ShipmentCosting.php:613 +#: Stocks.php:832 +#: Stocks.php:834 +#: Stocks.php:852 +#: Stocks.php:854 +#: SystemParameters.php:362 +#: SystemParameters.php:438 +#: SystemParameters.php:446 +#: SystemParameters.php:486 +#: SystemParameters.php:559 +#: SystemParameters.php:567 +#: SystemParameters.php:585 +#: SystemParameters.php:592 +#: SystemParameters.php:716 +#: SystemParameters.php:845 +#: SystemParameters.php:849 +#: SystemParameters.php:857 +#: SystemParameters.php:861 +#: SystemParameters.php:915 +#: SystemParameters.php:925 +#: SystemParameters.php:929 +#: TaxGroups.php:291 +#: TaxGroups.php:294 +#: TaxGroups.php:344 +#: WWW_Users.php:592 +#: WWW_Users.php:596 +#: includes/PDFLowGPPageHeader.inc:31 +#: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Nej" -#: AccountGroups.php:245 AccountSections.php:195 AddCustomerContacts.php:121 -#: AddCustomerNotes.php:121 AddCustomerTypeNotes.php:121 Areas.php:162 -#: BankAccounts.php:202 BOMs.php:149 COGSGLPostings.php:107 -#: COGSGLPostings.php:212 CreditStatus.php:172 Currencies.php:232 -#: CustomerBranches.php:402 Customers.php:752 Customers.php:770 -#: CustomerTypes.php:184 EDIMessageFormat.php:161 FreightCosts.php:240 -#: GeocodeSetup.php:169 GLAccounts.php:317 GLTags.php:58 Locations.php:350 -#: PaymentMethods.php:199 PaymentTerms.php:200 Prices_Customer.php:200 -#: Prices.php:178 PurchData.php:242 SalesCategories.php:261 -#: SalesGLPostings.php:132 SalesGLPostings.php:244 SalesPeople.php:201 -#: SalesTypes.php:204 SelectCustomer.php:620 SelectCustomer.php:636 -#: SelectCustomer.php:668 SelectCustomer.php:684 SelectCustomer.php:715 -#: SelectCustomer.php:731 Shippers.php:142 StockCategories.php:227 -#: SupplierContacts.php:153 TaxAuthorities.php:165 TaxCategories.php:181 -#: TaxGroups.php:177 TaxProvinces.php:176 UnitsOfMeasure.php:199 -#: WorkCentres.php:138 WWW_Access.php:124 WWW_Users.php:276 +#: AccountGroups.php:265 +#: AccountSections.php:197 +#: AddCustomerContacts.php:126 +#: AddCustomerNotes.php:125 +#: AddCustomerTypeNotes.php:122 +#: Areas.php:162 +#: BOMs.php:150 +#: BankAccounts.php:226 +#: COGSGLPostings.php:108 +#: COGSGLPostings.php:213 +#: CreditStatus.php:173 +#: Currencies.php:233 +#: CustLoginSetup.php:297 +#: CustomerBranches.php:411 +#: CustomerTypes.php:206 +#: Customers.php:856 +#: Customers.php:888 +#: EDIMessageFormat.php:162 +#: FixedAssetCategories.php:235 +#: FixedAssetLocations.php:81 +#: FreightCosts.php:242 +#: GLAccounts.php:318 +#: GLTags.php:59 +#: GeocodeSetup.php:166 +#: Locations.php:351 +#: MRPDemandTypes.php:117 +#: MRPDemands.php:301 +#: PO_AuthorisationLevels.php:148 +#: PaymentMethods.php:200 +#: PaymentTerms.php:204 +#: PcAssignCashToTab.php:239 +#: PcClaimExpensesFromTab.php:227 +#: PcExpenses.php:173 +#: PcTabs.php:185 +#: PcTypeTabs.php:168 +#: Prices.php:179 +#: Prices_Customer.php:201 +#: PurchData.php:189 +#: SalesCategories.php:261 +#: SalesGLPostings.php:133 +#: SalesGLPostings.php:245 +#: SalesPeople.php:201 +#: SalesTypes.php:204 +#: SelectCustomer.php:679 +#: SelectCustomer.php:695 +#: SelectCustomer.php:727 +#: SelectCustomer.php:743 +#: SelectCustomer.php:774 +#: SelectCustomer.php:790 +#: Shippers.php:142 +#: StockCategories.php:215 +#: SupplierContacts.php:153 +#: TaxAuthorities.php:164 +#: TaxCategories.php:181 +#: TaxGroups.php:179 +#: TaxProvinces.php:176 +#: UnitsOfMeasure.php:199 +#: WWW_Access.php:124 +#: WWW_Users.php:305 +#: WorkCentres.php:138 #: includes/InputSerialItems.php:82 #, php-format msgid "Edit" msgstr "Ändra" -#: AccountGroups.php:246 AccountSections.php:199 AddCustomerContacts.php:122 -#: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:122 Areas.php:163 -#: BankAccounts.php:203 BOMs.php:151 COGSGLPostings.php:108 -#: COGSGLPostings.php:213 Credit_Invoice.php:369 CreditStatus.php:173 -#: Currencies.php:235 CustomerReceipt.php:793 Customers.php:771 -#: CustomerTypes.php:185 DiscountCategories.php:115 DiscountMatrix.php:116 -#: EDIMessageFormat.php:162 FreightCosts.php:241 GeocodeSetup.php:170 -#: GLAccounts.php:318 GLJournal.php:395 Locations.php:351 -#: PaymentMethods.php:200 Payments.php:829 PaymentTerms.php:201 -#: PO_Items.php:858 Prices_Customer.php:201 Prices.php:179 PurchData.php:243 -#: SalesAnalReptCols.php:293 SalesAnalRepts.php:303 SalesCategories.php:262 -#: SalesGLPostings.php:133 SalesGLPostings.php:245 SalesPeople.php:202 -#: SalesTypes.php:205 SelectCreditItems.php:757 SelectCustomer.php:621 -#: SelectCustomer.php:637 SelectCustomer.php:669 SelectCustomer.php:685 -#: SelectCustomer.php:716 SelectCustomer.php:732 SelectOrderItems.php:1182 -#: Shipments.php:418 Shippers.php:143 SpecialOrder.php:580 -#: StockCategories.php:228 StockCategories.php:509 SuppCreditGRNs.php:89 -#: SuppInvGLAnalysis.php:65 SuppInvGRNs.php:128 SupplierContacts.php:154 -#: SuppShiptChgs.php:80 SuppTransGLAnalysis.php:107 TaxAuthorities.php:166 -#: TaxCategories.php:182 TaxGroups.php:178 TaxProvinces.php:177 -#: UnitsOfMeasure.php:200 WorkCentres.php:139 WWW_Access.php:125 -#: WWW_Users.php:277 includes/InputSerialItemsKeyed.php:53 +#: AccountGroups.php:266 +#: AccountSections.php:201 +#: AddCustomerContacts.php:127 +#: AddCustomerNotes.php:126 +#: AddCustomerTypeNotes.php:123 +#: Areas.php:163 +#: BOMs.php:152 +#: BankAccounts.php:227 +#: COGSGLPostings.php:109 +#: COGSGLPostings.php:214 +#: CreditStatus.php:174 +#: Credit_Invoice.php:372 +#: Currencies.php:236 +#: CustLoginSetup.php:298 +#: CustomerReceipt.php:823 +#: CustomerTypes.php:207 +#: Customers.php:889 +#: DiscountCategories.php:201 +#: DiscountMatrix.php:173 +#: EDIMessageFormat.php:163 +#: FixedAssetCategories.php:236 +#: FixedAssetJournal.php:393 +#: FixedAssetLocations.php:83 +#: FreightCosts.php:243 +#: GLAccounts.php:319 +#: GLJournal.php:394 +#: GeocodeSetup.php:167 +#: Locations.php:352 +#: MRPDemandTypes.php:118 +#: MRPDemands.php:302 +#: PO_AuthorisationLevels.php:150 +#: PO_Items.php:953 +#: PaymentMethods.php:201 +#: PaymentTerms.php:205 +#: Payments.php:861 +#: PcAssignCashToTab.php:240 +#: PcClaimExpensesFromTab.php:228 +#: PcExpenses.php:174 +#: PcExpensesTypeTab.php:158 +#: PcTabs.php:186 +#: PcTypeTabs.php:169 +#: Prices.php:180 +#: Prices_Customer.php:202 +#: PurchData.php:190 +#: SalesAnalReptCols.php:293 +#: SalesAnalRepts.php:303 +#: SalesCategories.php:262 +#: SalesGLPostings.php:134 +#: SalesGLPostings.php:246 +#: SalesPeople.php:202 +#: SalesTypes.php:205 +#: SelectCreditItems.php:746 +#: SelectCustomer.php:680 +#: SelectCustomer.php:696 +#: SelectCustomer.php:728 +#: SelectCustomer.php:744 +#: SelectCustomer.php:775 +#: SelectCustomer.php:791 +#: SelectOrderItems.php:1271 +#: Shipments.php:422 +#: Shippers.php:143 +#: SpecialOrder.php:587 +#: StockCategories.php:216 +#: StockCategories.php:497 +#: SuppCreditGRNs.php:89 +#: SuppInvGLAnalysis.php:65 +#: SuppInvGRNs.php:132 +#: SuppShiptChgs.php:79 +#: SuppTransGLAnalysis.php:107 +#: SupplierContacts.php:154 +#: TaxAuthorities.php:165 +#: TaxCategories.php:182 +#: TaxGroups.php:180 +#: TaxProvinces.php:177 +#: UnitsOfMeasure.php:200 +#: WOSerialNos.php:296 +#: WWW_Access.php:125 +#: WWW_Users.php:306 +#: WorkCentres.php:139 +#: includes/InputSerialItemsKeyed.php:53 #, php-format msgid "Delete" msgstr "Ta bort" -#: AccountGroups.php:254 +#: AccountGroups.php:274 msgid "Review Account Groups" msgstr "Visa kontogrupper" -#: AccountGroups.php:285 GLAccounts.php:244 GLAccounts.php:297 -#: Z_ImportGLAccountGroups.php:27 +#: AccountGroups.php:292 +msgid "An error occurred in retrieving the account group information" +msgstr "" + +#: AccountGroups.php:293 +msgid "The SQL that was used to retrieve the account group and that failed in the process was" +msgstr "Den SQL som användes var" + +#: AccountGroups.php:307 +#: GLAccounts.php:245 +#: GLAccounts.php:298 +#: Z_ImportGLAccountGroups.php:28 msgid "Account Group" msgstr "Kontogrupp" -#: AccountGroups.php:309 -#, fuzzy +#: AccountGroups.php:331 msgid "Account Group Name" -msgstr "Kontogruppbeskrivning" +msgstr "Kontogruppsbeskrivning" -#: AccountGroups.php:319 AccountGroups.php:321 +#: AccountGroups.php:341 +#: AccountGroups.php:343 msgid "Top Level Group" -msgstr "Topp nivå grupp" +msgstr "Toppnivågrupp" -#: AccountGroups.php:335 +#: AccountGroups.php:357 msgid "Section In Accounts" msgstr "Kontotyp" -#: AccountGroups.php:374 AccountSections.php:262 AddCustomerContacts.php:182 -#: AddCustomerNotes.php:182 AddCustomerTypeNotes.php:182 Areas.php:218 -#: BankAccounts.php:316 BOMs.php:701 COGSGLPostings.php:341 -#: CreditStatus.php:240 Currencies.php:331 DiscountCategories.php:143 -#: DiscountMatrix.php:167 EDIMessageFormat.php:253 FreightCosts.php:336 -#: GeocodeSetup.php:265 GLAccounts.php:267 Locations.php:516 -#: PaymentMethods.php:269 PaymentTerms.php:274 Prices_Customer.php:243 -#: SalesAnalReptCols.php:465 SalesAnalRepts.php:494 SalesGLPostings.php:411 -#: SalesPeople.php:292 Shippers.php:195 StockCategories.php:528 -#: SupplierContacts.php:249 TaxAuthorities.php:303 TaxCategories.php:231 -#: TaxProvinces.php:226 UnitsOfMeasure.php:250 WorkCentres.php:260 -#: WWW_Users.php:557 +#: AccountGroups.php:396 +#: AccountSections.php:263 +#: AddCustomerContacts.php:202 +#: AddCustomerNotes.php:201 +#: AddCustomerTypeNotes.php:184 +#: Areas.php:218 +#: BOMs.php:724 +#: BankAccounts.php:372 +#: COGSGLPostings.php:342 +#: CreditStatus.php:244 +#: Currencies.php:332 +#: CustLoginSetup.php:595 +#: DiscountMatrix.php:136 +#: EDIMessageFormat.php:254 +#: FixedAssetCategories.php:459 +#: FixedAssetLocations.php:127 +#: FreightCosts.php:338 +#: GLAccounts.php:268 +#: GeocodeSetup.php:262 +#: Locations.php:517 +#: MRPDemandTypes.php:176 +#: MRPDemands.php:417 +#: PO_AuthorisationLevels.php:216 +#: PaymentMethods.php:270 +#: PaymentTerms.php:278 +#: Prices_Customer.php:244 +#: SalesAnalReptCols.php:465 +#: SalesAnalRepts.php:494 +#: SalesGLPostings.php:412 +#: SalesPeople.php:292 +#: Shippers.php:195 +#: StockCategories.php:516 +#: SupplierContacts.php:249 +#: TaxAuthorities.php:302 +#: TaxCategories.php:231 +#: TaxProvinces.php:226 +#: UnitsOfMeasure.php:250 +#: WWW_Users.php:626 +#: WorkCentres.php:260 msgid "Enter Information" msgstr "Ok" -#: AccountSections.php:8 index.php:1043 +#: AccountSections.php:9 +#: index.php:1169 msgid "Account Sections" msgstr "Kontotyper" -#: AccountSections.php:67 -#, fuzzy +#: AccountSections.php:68 msgid "The account section already exists in the database" -msgstr "Konttypen finns redan" +msgstr "Kontotypen existerar redan i databasen" -#: AccountSections.php:74 +#: AccountSections.php:75 msgid "The account section name cannot contain the character" msgstr "Konttypen kan inte innehålla tecknet" -#: AccountSections.php:80 -#, fuzzy +#: AccountSections.php:81 msgid "The account section name must contain at least one character" -msgstr "Konttypen måste innehålla minst 1 tecken" +msgstr "Konttypen måste innehålla minst ett tecken" -#: AccountSections.php:86 AccountSections.php:92 +#: AccountSections.php:87 +#: AccountSections.php:93 msgid "The section number must be an integer" msgstr "Kontotypen måste vara ett heltal" -#: AccountSections.php:137 -msgid "" -"Cannot delete this account section because general ledger accounts groups " -"have been created using this section" -msgstr "" -"Kan inte ta bort denna kontotyp för att det finns kontogrupper som använder " -"den" +#: AccountSections.php:138 +msgid "Cannot delete this account section because general ledger accounts groups have been created using this section" +msgstr "Kan inte ta bort denna kontotyp för att det finns kontogrupper som använder den" -#: AccountSections.php:138 +#: AccountSections.php:139 msgid "general ledger accounts groups that refer to this account section" msgstr "kontogrupper som refererar till denna kontotyp" -#: AccountSections.php:149 +#: AccountSections.php:150 msgid "section has been deleted" msgstr "Meddelandet har tagits bort" -#: AccountSections.php:174 +#: AccountSections.php:175 msgid "Could not get account group sections because" msgstr "Kan inte hämta kontogruppen för att" -#: AccountSections.php:179 AccountSections.php:237 AccountSections.php:254 +#: AccountSections.php:181 +#: AccountSections.php:239 +#: AccountSections.php:256 msgid "Section Number" msgstr "Kontotyp" -#: AccountSections.php:180 AccountSections.php:257 +#: AccountSections.php:182 +#: AccountSections.php:259 msgid "Section Description" msgstr "Kontotypbeskrivning" -#: AccountSections.php:197 +#: AccountSections.php:199 msgid "Restricted" msgstr "Låst" -#: AccountSections.php:208 +#: AccountSections.php:210 msgid "Review Account Sections" msgstr "Visa kontotyper" -#: AccountSections.php:227 +#: AccountSections.php:229 msgid "Could not retrieve the requested section please try again." msgstr "Kan inte hämta kontotypen, försök igen." -#: AddCustomerContacts.php:5 AddCustomerContacts.php:48 SelectCustomer.php:613 -#: SelectCustomer.php:653 -#, fuzzy +#: AddCustomerContacts.php:6 +#: AddCustomerContacts.php:50 +#: SelectCustomer.php:672 +#: SelectCustomer.php:712 msgid "Customer Contacts" -msgstr "Kundofferter" +msgstr "Kundkontakter" -#: AddCustomerContacts.php:19 CustEDISetup.php:10 Customers.php:385 +#: AddCustomerContacts.php:20 +#: CustEDISetup.php:11 +#: CustLoginSetup.php:21 #: Z_CheckDebtorsControl.php:20 msgid "Back to Customers" msgstr "Tillbaka till kunder" -#: AddCustomerContacts.php:30 -#, fuzzy +#: AddCustomerContacts.php:32 msgid "The Contact must be an integer." -msgstr "Kundnummeren måste vara ett heltal" +msgstr "Kontakten måste vara ett heltal" -#: AddCustomerContacts.php:33 -#, fuzzy +#: AddCustomerContacts.php:35 msgid "The contact's name must be forty characters or less long" -msgstr "Kontotsnamn måste vara mindre än 50 tecken" +msgstr "Kontaktensnamn måste vara 40 tecken eller kortare" -#: AddCustomerContacts.php:36 -#, fuzzy +#: AddCustomerContacts.php:38 msgid "The contact's name may not be empty" -msgstr "Momskategorin får inte vara tom" +msgstr "Kontaktnamn får inte vara tomt" -#: AddCustomerContacts.php:48 AddCustomerNotes.php:48 -#: AddCustomerTypeNotes.php:48 Areas.php:74 CustomerTypes.php:48 -#: DeliveryDetails.php:476 Factors.php:59 PO_Items.php:208 -#: SalesAnalReptCols.php:128 SalesPeople.php:92 SalesTypes.php:61 -#: Stocks.php:335 Suppliers.php:475 +#: AddCustomerContacts.php:50 +#: AddCustomerNotes.php:49 +#: AddCustomerTypeNotes.php:49 +#: Areas.php:74 +#: CustomerTypes.php:68 +#: DeliveryDetails.php:673 +#: Factors.php:47 +#: FixedAssetItems.php:351 +#: PO_Items.php:391 +#: PcAssignCashToTab.php:70 +#: PcClaimExpensesFromTab.php:61 +#: PcExpenses.php:57 +#: PcTabs.php:57 +#: PcTypeTabs.php:56 +#: SalesAnalReptCols.php:128 +#: SalesPeople.php:92 +#: SalesTypes.php:61 +#: Stocks.php:353 +#: Suppliers.php:482 msgid "has been updated" msgstr "har uppdaterats" -#: AddCustomerContacts.php:59 -#, fuzzy +#: AddCustomerContacts.php:61 msgid "The contact record has been added" -msgstr "Rabattmatrisen has sparats" +msgstr "Kontaktposten har sparats" -#: AddCustomerContacts.php:83 -#, fuzzy +#: AddCustomerContacts.php:88 msgid "The contact record has been deleted" -msgstr "Rabattmatrisen har makulerats" +msgstr "Kontaktposten har makulerats" -#: AddCustomerContacts.php:93 -#, fuzzy +#: AddCustomerContacts.php:98 msgid "Contacts for Customer: <b>" -msgstr "och för kund" +msgstr "Kontakter för kund: <b>" -#: AddCustomerContacts.php:102 CompanyPreferences.php:226 -#: CustomerBranches.php:365 Customers.php:748 Customers.php:799 -#: SalesPeople.php:183 SelectCustomer.php:616 SuppInvGLAnalysis.php:49 -#: SuppInvGLAnalysis.php:73 SupplierContacts.php:141 SupplierCredit.php:303 -#: SupplierInvoice.php:298 SuppTransGLAnalysis.php:91 -#: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 -#: includes/PDFTaxPageHeader.inc:36 +#: AddCustomerContacts.php:107 +#: CompanyPreferences.php:227 +#: CustomerBranches.php:374 +#: Customers.php:846 +#: Customers.php:852 +#: Customers.php:917 +#: SalesPeople.php:183 +#: SelectCustomer.php:675 +#: StockDispatch.php:181 +#: StockDispatch.php:193 +#: SuppInvGLAnalysis.php:49 +#: SuppInvGLAnalysis.php:73 +#: SuppTransGLAnalysis.php:91 +#: SupplierContacts.php:141 +#: SupplierCredit.php:331 +#: SupplierInvoice.php:308 +#: includes/InputSerialItemsFile.php:84 +#: includes/InputSerialItemsFile.php:124 +#: includes/PDFTaxPageHeader.inc:37 msgid "Name" msgstr "Namn" -#: AddCustomerContacts.php:103 AddCustomerContacts.php:175 Customers.php:749 -#: Customers.php:800 SelectCustomer.php:617 WWW_Access.php:108 +#: AddCustomerContacts.php:108 +#: AddCustomerContacts.php:184 +#: Customers.php:847 +#: Customers.php:853 +#: Customers.php:918 +#: SelectCustomer.php:676 +#: WWW_Access.php:108 #: WWW_Access.php:168 msgid "Role" msgstr "Roll" -#: AddCustomerContacts.php:104 Customers.php:801 -#, fuzzy +#: AddCustomerContacts.php:109 +#: Customers.php:919 msgid "Phone no" msgstr "Telnr" -#: AddCustomerContacts.php:105 AddCustomerContacts.php:179 Customers.php:751 -#: Customers.php:802 SelectCustomer.php:619 SystemParameters.php:270 +#: AddCustomerContacts.php:110 +#: AddCustomerContacts.php:196 +#: Customers.php:849 +#: Customers.php:855 +#: Customers.php:920 +#: PcAssignCashToTab.php:205 +#: PcAssignCashToTab.php:332 +#: PcAuthorizeExpenses.php:84 +#: PcClaimExpensesFromTab.php:193 +#: PcClaimExpensesFromTab.php:345 +#: PcReportTab.php:341 +#: SelectCustomer.php:678 +#: SystemParameters.php:301 +#: WOSerialNos.php:273 +#: WOSerialNos.php:275 msgid "Notes" msgstr "Anteckningar" -#: AddCustomerContacts.php:139 +#: AddCustomerContacts.php:144 msgid "Review all contacts for this Customer" -msgstr "Granska alla kontakter för den här kunden" +msgstr "Visa alla kontakter för denna kund" -#: AddCustomerContacts.php:168 -#, fuzzy +#: AddCustomerContacts.php:173 msgid "Contact Code" -msgstr "Kategorikod" +msgstr "Kontaktkod" -#: AddCustomerContacts.php:173 Factors.php:212 Factors.php:230 +#: AddCustomerContacts.php:178 +#: Factors.php:180 +#: Factors.php:195 #: SupplierContacts.php:217 msgid "Contact Name" msgstr "Namn på kontaktperson" -#: AddCustomerContacts.php:177 PO_Header.php:511 SelectCreditItems.php:234 -#: SelectCustomer.php:444 SelectOrderItems.php:583 -#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:81 -#: includes/PDFTransPageHeaderPortrait.inc:104 +#: AddCustomerContacts.php:190 +#: PDFRemittanceAdvice.php:248 +#: PO_Header.php:1108 +#: PO_Header.php:1183 +#: SelectCreditItems.php:226 +#: SelectCustomer.php:495 +#: SelectOrderItems.php:630 +#: includes/PDFStatementPageHeader.inc:63 +#: includes/PDFTransPageHeader.inc:113 +#: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" msgstr "Telefon" -#: AddCustomerNotes.php:5 AddCustomerNotes.php:48 SelectCustomer.php:661 -#: SelectCustomer.php:700 -#, fuzzy +#: AddCustomerNotes.php:6 +#: AddCustomerNotes.php:49 +#: SelectCustomer.php:720 +#: SelectCustomer.php:759 msgid "Customer Notes" -msgstr "Kundnr" +msgstr "Kundanteckningar" -#: AddCustomerNotes.php:19 AddCustomerTypeNotes.php:19 -#, fuzzy +#: AddCustomerNotes.php:20 +#: AddCustomerTypeNotes.php:20 msgid "Back to Select Customer" -msgstr "Tillbaka till kunder" +msgstr "Tillbaka till kund" -#: AddCustomerNotes.php:30 -#, fuzzy +#: AddCustomerNotes.php:31 msgid "The contact priority must be an integer." -msgstr "Kundnummeren måste vara ett heltal" +msgstr "Kontaktprioritet måste vara ett heltal" -#: AddCustomerNotes.php:33 AddCustomerTypeNotes.php:33 -#, fuzzy +#: AddCustomerNotes.php:34 +#: AddCustomerTypeNotes.php:34 msgid "The contact's notes must be two hundred characters or less long" -msgstr "Kontotsnamn måste vara mindre än 50 tecken" +msgstr "Kontotsnamn måste vara mindre än 200 tecken" -#: AddCustomerNotes.php:36 AddCustomerTypeNotes.php:36 -#, fuzzy +#: AddCustomerNotes.php:37 +#: AddCustomerTypeNotes.php:37 msgid "The contact's notes may not be empty" -msgstr "Momskategorin får inte vara tom" +msgstr "Kontaktanteckningar får inte vara tom" -#: AddCustomerNotes.php:59 -#, fuzzy +#: AddCustomerNotes.php:60 msgid "The contact notes record has been added" -msgstr "Rabattmatrisen has sparats" +msgstr "Kontaktanteckningar har sparats" -#: AddCustomerNotes.php:83 -#, fuzzy +#: AddCustomerNotes.php:87 msgid "The contact note record has been deleted" -msgstr "Rabattmatrisen har makulerats" +msgstr "Kontaktanteckningar har makulerats" -#: AddCustomerNotes.php:93 -#, fuzzy +#: AddCustomerNotes.php:97 msgid "Notes for Customer: <b>" -msgstr "och för kund" +msgstr "Anteckningar för kund: <b>" -#: AddCustomerNotes.php:102 AddCustomerNotes.php:177 -#: AddCustomerTypeNotes.php:102 AddCustomerTypeNotes.php:177 -#: BankMatching.php:212 BankReconciliation.php:181 BankReconciliation.php:253 -#: CustomerAllocations.php:347 CustomerAllocations.php:373 -#: CustomerInquiry.php:184 CustomerTransInquiry.php:85 -#: GLAccountInquiry.php:153 GLTransInquiry.php:46 PaymentAllocations.php:73 -#: PrintCustTrans.php:838 PrintCustTransPortrait.php:850 ReverseGRN.php:330 -#: ShipmentCosting.php:494 ShipmentCosting.php:565 Shipments.php:459 -#: StockLocMovements.php:79 StockMovements.php:98 -#: StockSerialItemResearch.php:74 SupplierAllocations.php:466 -#: SupplierAllocations.php:578 SupplierAllocations.php:648 -#: SupplierInquiry.php:191 SupplierTransInquiry.php:87 +#: AddCustomerNotes.php:106 +#: AddCustomerNotes.php:188 +#: AddCustomerTypeNotes.php:103 +#: AddCustomerTypeNotes.php:178 +#: BankMatching.php:214 +#: BankReconciliation.php:182 +#: BankReconciliation.php:254 +#: CustomerAllocations.php:348 +#: CustomerAllocations.php:374 +#: CustomerInquiry.php:190 +#: CustomerTransInquiry.php:86 +#: GLAccountCSV.php:344 +#: GLAccountInquiry.php:157 +#: GLAccountReport.php:368 +#: GLTransInquiry.php:47 +#: MRPCalendar.php:213 +#: PDFRemittanceAdvice.php:309 +#: PaymentAllocations.php:77 +#: PcAssignCashToTab.php:201 +#: PcAuthorizeExpenses.php:80 +#: PrintCustTrans.php:674 +#: PrintCustTransPortrait.php:859 +#: ReverseGRN.php:329 +#: ShipmentCosting.php:494 +#: ShipmentCosting.php:565 +#: Shipments.php:463 +#: StockDispatch.php:183 +#: StockDispatch.php:195 +#: StockLocMovements.php:80 +#: StockMovements.php:98 +#: StockSerialItemResearch.php:74 +#: SupplierAllocations.php:465 +#: SupplierAllocations.php:577 +#: SupplierAllocations.php:647 +#: SupplierInquiry.php:194 +#: SupplierTransInquiry.php:87 #: includes/PDFQuotationPageHeader.inc:91 -#: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:35 -#: includes/PDFTransPageHeader.inc:48 -#: includes/PDFTransPageHeaderPortrait.inc:57 +#: includes/PDFStatementPageHeader.inc:169 +#: includes/PDFTaxPageHeader.inc:36 +#: includes/PDFTransPageHeader.inc:80 +#: includes/PDFTransPageHeaderPortrait.inc:58 msgid "Date" msgstr "Datum" -#: AddCustomerNotes.php:103 AddCustomerTypeNotes.php:103 Stocks.php:799 +#: AddCustomerNotes.php:107 +#: AddCustomerTypeNotes.php:104 +#: PcReportTab.php:171 +#: Stocks.php:841 +#: Z_Upgrade_3.10-3.11.php:61 +#: Z_Upgrade_3.10-3.11.php:65 +#: Z_Upgrade_3.10-3.11.php:69 +#: Z_Upgrade_3.10-3.11.php:73 +#: Z_Upgrade_3.10-3.11.php:77 msgid "Note" msgstr "Notering" -#: AddCustomerNotes.php:104 AddCustomerNotes.php:175 +#: AddCustomerNotes.php:108 +#: AddCustomerNotes.php:182 msgid "WWW" msgstr "WWW" -#: AddCustomerNotes.php:105 AddCustomerNotes.php:179 -#: AddCustomerTypeNotes.php:105 AddCustomerTypeNotes.php:179 -#, fuzzy +#: AddCustomerNotes.php:109 +#: AddCustomerNotes.php:194 +#: AddCustomerTypeNotes.php:106 +#: AddCustomerTypeNotes.php:181 msgid "Priority" -msgstr "Vinst" +msgstr "Prioritet" -#: AddCustomerNotes.php:139 -#, fuzzy +#: AddCustomerNotes.php:143 msgid "Review all notes for this Customer" -msgstr "kundorder för denna leveransplats/kund" +msgstr "Visa alla anteckningar för denna kund" -#: AddCustomerNotes.php:168 AddCustomerTypeNotes.php:168 -#, fuzzy +#: AddCustomerNotes.php:171 +#: AddCustomerTypeNotes.php:169 msgid "Note ID" -msgstr "Notering" +msgstr "Noterings ID" -#: AddCustomerNotes.php:173 -#, fuzzy +#: AddCustomerNotes.php:176 msgid "Contact Note" -msgstr "Kategorikod" +msgstr "Kontaktnotering" -#: AddCustomerTypeNotes.php:5 SelectCustomer.php:708 -#, fuzzy +#: AddCustomerTypeNotes.php:6 +#: SelectCustomer.php:767 msgid "Customer Type (Group) Notes" -msgstr "Kunden uppdaterad" +msgstr "Kundtyps(grupp)noteringar" -#: AddCustomerTypeNotes.php:30 -#, fuzzy +#: AddCustomerTypeNotes.php:31 msgid "The Contact priority must be an integer." -msgstr "Kundnummeren måste vara ett heltal" +msgstr "Kontaktprioriteten måste vara ett heltal" -#: AddCustomerTypeNotes.php:48 SelectCustomer.php:748 -#, fuzzy +#: AddCustomerTypeNotes.php:49 +#: SelectCustomer.php:807 msgid "Customer Group Notes" -msgstr "Kunden uppdaterad" +msgstr "Kundgruppsnoteringar" -#: AddCustomerTypeNotes.php:59 -#, fuzzy +#: AddCustomerTypeNotes.php:60 msgid "The contact group notes record has been added" -msgstr "Rabattmatrisen has sparats" +msgstr "Kontaktgruppsposten har sparats" -#: AddCustomerTypeNotes.php:83 -#, fuzzy +#: AddCustomerTypeNotes.php:84 msgid "The contact group note record has been deleted" -msgstr "Rabattmatrisen har makulerats" +msgstr "Kontaktgrupsposten har makulerats" -#: AddCustomerTypeNotes.php:93 -#, fuzzy +#: AddCustomerTypeNotes.php:94 msgid "Notes for Customer Type: <b>" -msgstr "och för kund" +msgstr "Anteckningar för kundtyp: <b>" -#: AddCustomerTypeNotes.php:104 AddCustomerTypeNotes.php:175 -#, fuzzy +#: AddCustomerTypeNotes.php:105 +#: AddCustomerTypeNotes.php:176 msgid "href" -msgstr "Huvud" +msgstr "href" -#: AddCustomerTypeNotes.php:139 -#, fuzzy +#: AddCustomerTypeNotes.php:140 msgid "Review all notes for this Customer Type" -msgstr "kundorder för denna leveransplats/kund" +msgstr "Visa alla antekningar för denna kundtyp" -#: AddCustomerTypeNotes.php:173 -#, fuzzy +#: AddCustomerTypeNotes.php:174 msgid "Contact Group Note" msgstr "Kontogruppbeskrivning" -#: AgedDebtors.php:18 +#: AgedDebtors.php:17 msgid "Aged Customer Balance Listing" msgstr "Periodisk kundsaldorapport" -#: AgedDebtors.php:19 +#: AgedDebtors.php:18 msgid "Aged Customer Balances" msgstr "Periodiska kundsaldon" -#: AgedDebtors.php:266 AgedDebtors.php:362 AgedDebtors.php:430 +#: AgedDebtors.php:267 +#: AgedDebtors.php:365 +#: AgedDebtors.php:436 msgid "Aged Customer Account Analysis" msgstr "Periodisk kundkontoanalys" -#: AgedDebtors.php:266 AgedDebtors.php:362 AgedDebtors.php:430 -#: AgedSuppliers.php:104 BOMListing.php:46 BOMListing.php:57 -#: DebtorsAtPeriodEnd.php:59 GLBalanceSheet.php:80 GLBalanceSheet.php:117 -#: GLProfit_Loss.php:149 GLTrialBalance.php:138 InventoryPlanning.php:89 -#: InventoryPlanning.php:159 InventoryPlanning.php:192 -#: InventoryPlanning.php:235 InventoryPlanning.php:269 -#: InventoryValuation.php:71 MailInventoryValuation.php:100 -#: OutstandingGRNs.php:50 PDFCustomerList.php:13 PDFCustomerList.php:233 -#: PDFLowGP.php:17 PDFStockCheckComparison.php:25 -#: PDFStockCheckComparison.php:51 PDFStockCheckComparison.php:258 -#: SelectProduct.php:49 StockCheck.php:38 StockCheck.php:59 StockCheck.php:88 -#: StockCheck.php:138 StockCheck.php:182 SupplierBalsAtPeriodEnd.php:56 -#: SuppPaymentRun.php:106 includes/PDFPaymentRun_PymtFooter.php:52 -#: includes/PDFPaymentRun_PymtFooter.php:111 -#: includes/PDFPaymentRun_PymtFooter.php:149 -#: includes/PDFPaymentRun_PymtFooter.php:181 -#: includes/PDFPaymentRun_PymtFooter.php:213 +#: AgedDebtors.php:267 +#: AgedDebtors.php:365 +#: AgedDebtors.php:436 +#: AgedSuppliers.php:105 +#: BOMExtendedQty.php:156 +#: BOMIndented.php:149 +#: BOMIndentedReverse.php:148 +#: BOMListing.php:48 +#: BOMListing.php:59 +#: DebtorsAtPeriodEnd.php:58 +#: DebtorsAtPeriodEnd.php:70 +#: GLBalanceSheet.php:88 +#: GLBalanceSheet.php:126 +#: GLProfit_Loss.php:156 +#: GLTagProfit_Loss.php:167 +#: GLTrialBalance.php:140 +#: InventoryPlanning.php:97 +#: InventoryPlanning.php:172 +#: InventoryPlanning.php:207 +#: InventoryPlanning.php:250 +#: InventoryPlanning.php:284 +#: InventoryPlanningPrefSupplier.php:208 +#: InventoryPlanningPrefSupplier.php:276 +#: InventoryPlanningPrefSupplier.php:310 +#: InventoryPlanningPrefSupplier.php:353 +#: InventoryPlanningPrefSupplier.php:387 +#: InventoryQuantities.php:81 +#: InventoryValuation.php:76 +#: MRPPlannedPurchaseOrders.php:100 +#: MRPPlannedWorkOrders.php:103 +#: MRPReport.php:133 +#: MRPReschedules.php:35 +#: MRPReschedules.php:47 +#: MRPShortages.php:112 +#: MRPShortages.php:124 +#: MailInventoryValuation.php:115 +#: OutstandingGRNs.php:51 +#: OutstandingGRNs.php:63 +#: PDFCustomerList.php:20 +#: PDFCustomerList.php:232 +#: PDFCustomerList.php:244 +#: PDFLowGP.php:23 +#: PDFStockCheckComparison.php:35 +#: PDFStockCheckComparison.php:61 +#: PDFStockCheckComparison.php:262 +#: ReorderLevel.php:57 +#: SelectProduct.php:48 +#: StockCheck.php:63 +#: StockCheck.php:135 +#: SuppPriceList.php:118 +#: includes/PDFPaymentRun_PymtFooter.php:146 msgid "Problem Report" msgstr "Problemrapport" -#: AgedDebtors.php:268 CustomerInquiry.php:81 CustomerInquiry.php:102 -#: DebtorsAtPeriodEnd.php:61 +#: AgedDebtors.php:269 +#: CustomerInquiry.php:87 +#: CustomerInquiry.php:108 +#: DebtorsAtPeriodEnd.php:60 msgid "The customer details could not be retrieved by the SQL because" msgstr "Kunddetaljerna kan inte visas av SQL:n för att" -#: AgedDebtors.php:269 AgedDebtors.php:365 AgedDebtors.php:436 -#: AgedSuppliers.php:107 AgedSuppliers.php:187 BOMListing.php:49 -#: Credit_Invoice.php:183 DebtorsAtPeriodEnd.php:62 FTP_RadioBeacon.php:187 -#: GetStockImage.php:152 GLBalanceSheet.php:83 GLBalanceSheet.php:120 -#: GLBalanceSheet.php:288 GLProfit_Loss.php:152 GLProfit_Loss.php:480 -#: GLTrialBalance.php:141 GLTrialBalance.php:337 InventoryPlanning.php:92 -#: InventoryPlanning.php:162 InventoryPlanning.php:195 -#: InventoryPlanning.php:238 InventoryPlanning.php:272 -#: InventoryPlanning.php:327 InventoryValuation.php:74 -#: InventoryValuation.php:182 MailInventoryValuation.php:103 -#: MailInventoryValuation.php:202 OutstandingGRNs.php:53 -#: OutstandingGRNs.php:140 PDFCustomerList.php:236 PDFCustomerList.php:363 -#: PDFGrn.php:58 PDFLowGP.php:61 PDFLowGP.php:110 PDFPriceList.php:104 -#: PDFPriceList.php:183 PDFQuotation.php:233 PDFStockCheckComparison.php:29 -#: PDFStockCheckComparison.php:55 PDFStockCheckComparison.php:262 -#: PDFStockCheckComparison.php:314 PDFStockLocTransfer.php:82 -#: PDFStockNegatives.php:67 PDFStockTransfer.php:66 PO_PDFPurchOrder.php:23 -#: PO_PDFPurchOrder.php:115 PrintCustOrder_generic.php:178 -#: PrintCustOrder.php:179 PrintDeliveryNote.php:175 -#: SalesAnalysis_UserDefined.php:36 SalesAnalysis_UserDefined.php:54 -#: SelectCreditItems.php:25 StockCheck.php:41 StockCheck.php:62 -#: StockCheck.php:91 StockCheck.php:141 StockCheck.php:185 StockCheck.php:254 -#: SupplierBalsAtPeriodEnd.php:59 SuppPaymentRun.php:109 -#: SuppPaymentRun.php:177 SuppPaymentRun.php:208 Tax.php:64 Tax.php:159 -#: Z_DataExport.php:73 Z_DataExport.php:169 Z_DataExport.php:260 -#: Z_DataExport.php:309 Z_DataExport.php:348 Z_DataExport.php:384 -#: Z_DataExport.php:420 Z_DataExport.php:474 Z_poRebuildDefault.php:38 +#: AgedDebtors.php:270 +#: AgedDebtors.php:368 +#: AgedDebtors.php:442 +#: AgedSuppliers.php:108 +#: AgedSuppliers.php:190 +#: BOMExtendedQty.php:159 +#: BOMExtendedQty.php:263 +#: BOMIndented.php:152 +#: BOMIndented.php:238 +#: BOMIndentedReverse.php:151 +#: BOMIndentedReverse.php:235 +#: BOMListing.php:51 +#: Credit_Invoice.php:186 +#: DebtorsAtPeriodEnd.php:61 +#: DebtorsAtPeriodEnd.php:73 +#: FTP_RadioBeacon.php:188 +#: GLBalanceSheet.php:91 +#: GLBalanceSheet.php:129 +#: GLBalanceSheet.php:292 +#: GLProfit_Loss.php:159 +#: GLProfit_Loss.php:171 +#: GLTagProfit_Loss.php:170 +#: GLTagProfit_Loss.php:182 +#: GLTrialBalance.php:143 +#: GLTrialBalance.php:155 +#: GetStockImage.php:154 +#: InventoryPlanning.php:100 +#: InventoryPlanning.php:175 +#: InventoryPlanning.php:210 +#: InventoryPlanning.php:253 +#: InventoryPlanning.php:287 +#: InventoryPlanning.php:350 +#: InventoryPlanningPrefSupplier.php:211 +#: InventoryPlanningPrefSupplier.php:279 +#: InventoryPlanningPrefSupplier.php:313 +#: InventoryPlanningPrefSupplier.php:356 +#: InventoryPlanningPrefSupplier.php:390 +#: InventoryPlanningPrefSupplier.php:446 +#: InventoryQuantities.php:84 +#: InventoryQuantities.php:95 +#: InventoryValuation.php:79 +#: InventoryValuation.php:90 +#: MRPPlannedPurchaseOrders.php:103 +#: MRPPlannedPurchaseOrders.php:114 +#: MRPPlannedWorkOrders.php:106 +#: MRPPlannedWorkOrders.php:117 +#: MRPReport.php:36 +#: MRPReport.php:47 +#: MRPReport.php:136 +#: MRPReschedules.php:38 +#: MRPReschedules.php:50 +#: MRPShortages.php:115 +#: MRPShortages.php:127 +#: MailInventoryValuation.php:118 +#: MailInventoryValuation.php:214 +#: OutstandingGRNs.php:54 +#: OutstandingGRNs.php:66 +#: PDFCustomerList.php:235 +#: PDFCustomerList.php:247 +#: PDFGrn.php:81 +#: PDFLowGP.php:62 +#: PDFLowGP.php:74 +#: PDFPriceList.php:107 +#: PDFPriceList.php:221 +#: PDFQuotation.php:237 +#: PDFRemittanceAdvice.php:76 +#: PDFStockCheckComparison.php:39 +#: PDFStockCheckComparison.php:65 +#: PDFStockCheckComparison.php:266 +#: PDFTopItems.php:161 +#: PO_PDFPurchOrder.php:22 +#: PO_PDFPurchOrder.php:132 +#: PcReportTab.php:232 +#: PrintCustOrder.php:198 +#: PrintCustOrder_generic.php:182 +#: PrintSalesOrder_generic.php:183 +#: ReorderLevel.php:60 +#: ReorderLevel.php:149 +#: SalesAnalysis_UserDefined.php:28 +#: SelectCreditItems.php:25 +#: StockCheck.php:45 +#: StockCheck.php:66 +#: StockCheck.php:95 +#: StockCheck.php:138 +#: StockCheck.php:149 +#: StockCheck.php:190 +#: StockDispatch.php:89 +#: StockDispatch.php:100 +#: SuppPaymentRun.php:109 +#: SuppPaymentRun.php:120 +#: SuppPaymentRun.php:184 +#: SuppPaymentRun.php:214 +#: SuppPriceList.php:121 +#: SupplierBalsAtPeriodEnd.php:57 +#: SupplierBalsAtPeriodEnd.php:68 +#: Tax.php:64 +#: Tax.php:177 +#: Tax.php:286 +#: Z_DataExport.php:73 +#: Z_DataExport.php:169 +#: Z_DataExport.php:260 +#: Z_DataExport.php:309 +#: Z_DataExport.php:348 +#: Z_DataExport.php:384 +#: Z_DataExport.php:420 +#: Z_DataExport.php:472 +#: Z_poRebuildDefault.php:37 #: includes/PDFPaymentRun_PymtFooter.php:55 -#: includes/PDFPaymentRun_PymtFooter.php:85 -#: includes/PDFPaymentRun_PymtFooter.php:114 -#: includes/PDFPaymentRun_PymtFooter.php:152 -#: includes/PDFPaymentRun_PymtFooter.php:184 -#: includes/PDFPaymentRun_PymtFooter.php:216 +#: includes/PDFPaymentRun_PymtFooter.php:84 +#: includes/PDFPaymentRun_PymtFooter.php:113 +#: includes/PDFPaymentRun_PymtFooter.php:149 +#: includes/PDFPaymentRun_PymtFooter.php:180 +#: includes/PDFPaymentRun_PymtFooter.php:212 #: includes/ConstructSQLForUserDefinedSalesReport.inc:180 #: includes/ConstructSQLForUserDefinedSalesReport.inc:188 #: includes/ConstructSQLForUserDefinedSalesReport.inc:340 msgid "Back to the menu" msgstr "Tillbaka till menyn" -#: AgedDebtors.php:364 +#: AgedDebtors.php:367 msgid "The details of outstanding transactions for customer" -msgstr "Öppna transaktioner för kunden" +msgstr "?ppna transaktioner för kunden" -#: AgedDebtors.php:364 AgedSuppliers.php:186 GLAccountInquiry.php:145 -#: PO_Items.php:364 PO_Items.php:394 PO_Items.php:496 PO_Items.php:568 -#: PO_Items.php:659 SalesAnalReptCols.php:349 SpecialOrder.php:363 -#: StockLocTransferReceive.php:369 StockQuantityByDate.php:103 -#: includes/SelectOrderItems_IntoCart.inc:49 +#: AgedDebtors.php:367 +#: AgedSuppliers.php:189 +#: GLAccountCSV.php:158 +#: GLAccountInquiry.php:149 +#: GLAccountReport.php:93 +#: PO_Items.php:538 +#: PO_Items.php:568 +#: PO_Items.php:648 +#: PO_Items.php:786 +#: SalesAnalReptCols.php:349 +#: SpecialOrder.php:368 +#: StockLocTransferReceive.php:370 +#: StockQuantityByDate.php:102 +#: includes/SelectOrderItems_IntoCart.inc:52 msgid "could not be retrieved because" -msgstr "kan inte visas för att" +msgstr "kunde inte hämtas eftersom" -#: AgedDebtors.php:367 AgedSuppliers.php:189 Areas.php:96 -#: ConfirmDispatch_Invoice.php:153 ConfirmDispatch_Invoice.php:905 -#: ConfirmDispatch_Invoice.php:919 Credit_Invoice.php:678 -#: Credit_Invoice.php:700 CustomerReceipt.php:460 CustomerReceipt.php:595 -#: CustomerReceipt.php:623 CustomerTransInquiry.php:77 DeliveryNote.php:151 -#: GLProfit_Loss.php:542 Payments.php:292 PurchData.php:36 PurchData.php:94 -#: PurchData.php:115 ReverseGRN.php:143 ReverseGRN.php:157 ReverseGRN.php:318 -#: SelectCreditItems.php:1388 StockCheck.php:215 StockCostUpdate.php:78 -#: StockCostUpdate.php:88 StockLocStatus.php:126 StockMovements.php:91 -#: StockQuantityByDate.php:79 StockReorderLevel.php:40 StockStatus.php:263 -#: StockTransfers.php:153 StockUsageGraph.php:52 StockUsage.php:124 -#: SupplierInquiry.php:78 SupplierInquiry.php:99 SupplierInquiry.php:129 -#: SupplierInquiry.php:174 SupplierTransInquiry.php:79 SuppPaymentRun.php:112 -#: SuppPaymentRun.php:179 SuppPaymentRun.php:210 WorkOrderCosting.php:381 -#: WorkOrderReceive.php:264 Z_ChangeBranchCode.php:108 -#: Z_ChangeCustomerCode.php:90 Z_DeleteCreditNote.php:57 -#: Z_DeleteInvoice.php:83 includes/PDFPaymentRun_PymtFooter.php:57 -#: includes/PDFPay... [truncated message content] |
From: <dai...@us...> - 2010-03-13 05:43:10
|
Revision: 3378 http://web-erp.svn.sourceforge.net/web-erp/?rev=3378&view=rev Author: daintree Date: 2010-03-13 05:43:04 +0000 (Sat, 13 Mar 2010) Log Message: ----------- New scripts to list GL accounts to pdf or csv - added to menu - fixed upgrade script for new tab for petty cash - now also shows setup - the clever sql didnt work for me so went simple - its all I know! Modified Paths: -------------- trunk/GLAccountCSV.php trunk/doc/Change.log.html trunk/index.php trunk/sql/mysql/upgrade3.11.1-3.12.sql Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2010-03-11 10:41:45 UTC (rev 3377) +++ trunk/GLAccountCSV.php 2010-03-13 05:43:04 UTC (rev 3378) @@ -79,11 +79,11 @@ // End select tag echo "</table><p> -<div class='centre'><input type=submit name='RunReport' VALUE='"._('Run Report')."'></div></form>"; +<div class='centre'><input type=submit name='MakeCSV' VALUE='"._('Make CSV File')."'></div></form>"; /* End of the Form rest of script is what happens if the show button is hit*/ -if (isset($_POST['RunReport'])){ +if (isset($_POST['MakeCSV'])){ if (!isset($SelectedPeriod)){ prnMsg(_('A period or range of periods must be selected from the list box'),'info'); @@ -103,7 +103,7 @@ $FileName = $_SESSION['reports_dir'] . '/Accounts_Listing_' . Date('Y-m-d') .'.csv'; - $fp = fopen($filename,"w"); + $fp = fopen($FileName,'w'); if ($fp==FALSE){ prnMsg(_('Could not open or create the file under') . ' ' . $FileName,'error'); @@ -168,7 +168,7 @@ $ErrMsg = _('The transactions for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved because') ; $TransResult = DB_query($sql,$db,$ErrMsg); - fwrite($fp, $SelectedAccount . ' - ' . $AccountName . ' ' . _('for period'). ' ' . $FirstPeriodSelected . ' ' . _('to') . ' ' . $LastPeriodSelected); + fwrite($fp, $SelectedAccount . ' - ' . $AccountName . ' ' . _('for period'). ' ' . $FirstPeriodSelected . ' ' . _('to') . ' ' . $LastPeriodSelected . "\n"); if ($PandLAccount==True) { $RunningTotal = 0; } else { @@ -185,11 +185,7 @@ $RunningTotal =$ChartDetailRow['bfwd']; - if ($RunningTotal < 0 ){ //its a credit balance b/fwd - fwrite($fp, _('Brought Forward Balance') . ',,,,' . number_format(-$RunningTotal,2)); - } else { //its a debit balance b/fwd - fwrite($fp,_('Brought Forward Balance') . ',,,' . number_format($RunningTotal,2)); - } + fwrite($fp,$SelectedAccount . ', ' .$FirstPeriodSelected . ', ' . _('Brought Forward Balance') . ',,,' . number_format($RunningTotal,2) . "\n"); } $PeriodTotal = 0; $PeriodNo = -9999; @@ -212,12 +208,7 @@ $ErrMsg = _('The chart details for account') . ' ' . $SelectedAccount . ' ' . _('could not be retrieved'); $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); $ChartDetailRow = DB_fetch_array($ChartDetailsResult); - - if ($PeriodTotal < 0 ){ - fwrite($fp, _('Period Total') . ',,,,' . number_format(-$PeriodTotal,2)); - } else { //its a debit balance b/fwd - fwrite($fp,_('Period Total') . ',,,' . number_format($PeriodTotal,2)); - } + fwrite($fp, $SelectedAccount . ', ' . $PeriodNo . ', ' . _('Period Total') . ',,,' . number_format($PeriodTotal,2). "\n"); } $PeriodNo = $myrow['periodno']; $PeriodTotal = 0; @@ -226,124 +217,29 @@ $RunningTotal += $myrow['amount']; $PeriodTotal += $myrow['amount']; - if($myrow['amount']>=0){ - $DebitAmount = number_format($myrow['amount'],2); - $CreditAmount = ''; - } else { - $CreditAmount = number_format(-$myrow['amount'],2); - $DebitAmount = ''; - } - + $FormatedTranDate = ConvertSQLDate($myrow['trandate']); $tagsql='SELECT tagdescription FROM tags WHERE tagref='.$myrow['tag']; $tagresult=DB_query($tagsql,$db); $tagrow = DB_fetch_array($tagresult); - fwrite($fp, $myrow['typename'] . ',' . $myrow['typeno'] . ',' . $FormatedTranDate . ',' . $DebitAmount . ',' . $CreditAmount . ',' .$myrow['narrative'] . ',' . $tagrow['tagdescription']); + fwrite($fp, $SelectedAccount . ',' . $myrow['periodno'] . ', ' . $myrow['typename'] . ',' . $myrow['typeno'] . ',' . $FormatedTranDate . ',' . number_format($myrow['amount'],2) . ',' . $myrow['narrative'] . ',' . $tagrow['tagdescription']. "\n"); } - $YPos -=$line_height; + if ($PeriodTotal <>0){ + fwrite($fp, $SelectedAccount . ', ' . $PeriodNo . ', ' . _('Period Total') . ',,,' . number_format($PeriodTotal,2). "\n"); + } if ($PandLAccount==True){ - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize, _('Total Period Movement')); + fwrite($fp, $SelectedAccount . ',' . $LastPeriodSelected . ', ' . _('Total Period Movement') . ',,,' . number_format($RunningTotal,2) . "\n"); } else { /*its a balance sheet account*/ - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize, _('Balance C/Fwd')); + fwrite($fp, $SelectedAccount . ',' . $LastPeriodSelected . ', ' . _('Balance C/Fwd') . ',,,' . number_format($RunningTotal,2) . "\n"); } - if ($RunningTotal >0){ - $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize, number_format(-$RunningTotal,2) , 'right'); - } else { //its a debit balance b/fwd - $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize, number_format($RunningTotal,2) , 'right'); - } - $YPos -=$line_height; - //draw a line under each account printed - $pdf->line($Left_Margin, $YPos,$Page_Width-$Right_Margin, $YPos); } /*end for each SelectedAccount */ -} /* end of if PrintReport button hit */ + fclose($fp); + echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '<br>'; +} /* end of if CreateCSV button hit */ - -/*Now check that there is some output and print the report out */ -if (count($_POST['Account'])==0) { - prnMsg(_('An account or range of accounts must be selected from the list box'),'info'); - include('includes/footer.inc'); - exit; - -} else { //print the report - - - - - - - - - - - - - -| - -function NewPageHeader () { - global $PageNumber, - $pdf, - $YPos, - $Page_Height, - $Page_Width, - $Top_Margin, - $FontSize, - $Left_Margin, - $Right_Margin, - $line_height; - $SelectedAccount; - $AccountName; - - /*PDF page header for GL Account report */ - - if ($PageNumber > 1){ - $pdf->newPage(); - } - - $FontSize=10; - $YPos= $Page_Height-$Top_Margin; - - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,$_SESSION['CompanyRecord']['coyname']); - - $YPos -=$line_height; - - $FontSize=10; - - $ReportTitle = _('GL Account Report'); - - - $LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos,450,$FontSize, $ReportTitle . ' ' . _('for all stock locations')); - - $FontSize=8; - $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-120,$YPos,120,$FontSize,_('Printed') . ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page') . ' ' . $PageNumber); - - $YPos -=(2*$line_height); - - /*Draw a rectangle to put the headings in */ - - $pdf->line($Left_Margin, $YPos+$line_height,$Page_Width-$Right_Margin, $YPos+$line_height); - $pdf->line($Left_Margin, $YPos+$line_height,$Left_Margin, $YPos- $line_height); - $pdf->line($Left_Margin, $YPos- $line_height,$Page_Width-$Right_Margin, $YPos- $line_height); - $pdf->line($Page_Width-$Right_Margin, $YPos+$line_height,$Page_Width-$Right_Margin, $YPos- $line_height); - - /*set up the headings */ - $XPos = $Left_Margin+1; - - $LeftOvers = $pdf->addTextWrap($XPos,$YPos,30,$FontSize,_('Type'),'centre'); - $LeftOvers = $pdf->addTextWrap(80,$YPos,30,$FontSize,_('Reference'),'centre'); - $LeftOvers = $pdf->addTextWrap(110,$YPos,50,$FontSize,_('Date'),'centre'); - $LeftOvers = $pdf->addTextWrap(160,$YPos,50,$FontSize,_('Debit'),'centre'); - $LeftOvers = $pdf->addTextWrap(210,$YPos,50,$FontSize,_('Credit'),'centre'); - $LeftOvers = $pdf->addTextWrap(320,$YPos,150,$FontSize,_('Narrative'),'centre'); - $LeftOvers = $pdf->addTextWrap(470,$YPos,80,$FontSize,_('Tag'),'centre'); - - - $YPos =$YPos - (2*$line_height); - $FontSize=8; -} - +include('includes/footer.inc'); ?> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-11 10:41:45 UTC (rev 3377) +++ trunk/doc/Change.log.html 2010-03-13 05:43:04 UTC (rev 3378) @@ -1,5 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>13/03/10 Phil: GLAccountReport.php - creates a pdf for GL account listings for any selected range of accounts and periods +<p>13/03/10 Phil: GLAccountCSV.php - creates a csv file for GL account report for any selected range of accounts and periods <p>10/03/10 Peter Pettersson: Updated Swedish translation and some changes to Language oriented files</p> <p>09/03/10 Tim: PDFStockLocTransfer.php - Add a reprint option</p> <p>09/03/10 Tim: Updates to Petty Cash Management Report and include new header file</p> Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-03-11 10:41:45 UTC (rev 3377) +++ trunk/index.php 2010-03-13 05:43:04 UTC (rev 3378) @@ -1112,6 +1112,16 @@ </tr> <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/GLAccountReport.php?' . SID . '">' . _('Account Listing') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/GLAccountCSV.php?' . SID . '">' . _('Account Listing to CSV File') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/BankReconciliation.php?' . SID . '">' . _('Bank Account Reconciliation Statement') . '</a></p>'; ?> </td> </tr> Modified: trunk/sql/mysql/upgrade3.11.1-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-03-11 10:41:45 UTC (rev 3377) +++ trunk/sql/mysql/upgrade3.11.1-3.12.sql 2010-03-13 05:43:04 UTC (rev 3378) @@ -51,7 +51,7 @@ ALTER TABLE `purchorderauth` ADD COLUMN `offhold` tinyint(1) NOT NULL DEFAULT 0; -UPDATE `www_users` SET `modulesallowed`=(SELECT insert(`modulesallowed`, 17,0,"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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-13 14:03:11
|
Revision: 3379 http://web-erp.svn.sourceforge.net/web-erp/?rev=3379&view=rev Author: tim_schofield Date: 2010-03-13 14:03:01 +0000 (Sat, 13 Mar 2010) Log Message: ----------- Tim: SupplierContacts.php - Correctly do the while loop to avoid a blank line, and only try to do the database updates when there are no errors Modified Paths: -------------- trunk/SupplierContacts.php trunk/doc/Change.log.html Modified: trunk/SupplierContacts.php =================================================================== --- trunk/SupplierContacts.php 2010-03-13 05:43:04 UTC (rev 3378) +++ trunk/SupplierContacts.php 2010-03-13 14:03:01 UTC (rev 3379) @@ -46,6 +46,7 @@ if (strlen($_POST['Contact']) == 0) { $InputError = 1; prnMsg(_('The contact name must be at least one character long'),'error'); + echo '<br>'; } @@ -53,11 +54,11 @@ /*SelectedContact could also exist if submit had not been clicked this code would not run in this case 'cos submit is false of course see the delete code below*/ - $sql = "UPDATE suppliercontacts SET position='" . $_POST['Position'] . "', - tel='" . $_POST['Tel'] . "', - fax='" . $_POST['Fax'] . "', - email='" . $_POST['Email'] . "', - mobile = '". $_POST['Mobile'] . "' + $sql = "UPDATE suppliercontacts SET position='" . $_POST['Position'] . "', + tel='" . $_POST['Tel'] . "', + fax='" . $_POST['Fax'] . "', + email='" . $_POST['Email'] . "', + mobile = '". $_POST['Mobile'] . "' WHERE contact='$SelectedContact' AND supplierid='$SupplierID'"; $msg = _('The supplier contact information has been updated'); @@ -66,44 +67,44 @@ /*Selected contact is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new supplier contacts form */ - $sql = "INSERT INTO suppliercontacts (supplierid, - contact, - position, - tel, - fax, - email, - mobile) - VALUES ('" . $SupplierID . "', - '" . $_POST['Contact'] . "', - '" . $_POST['Position'] . "', - '" . $_POST['Tel'] . "', - '" . $_POST['Fax'] . "', - '" . $_POST['Email'] . "', + $sql = "INSERT INTO suppliercontacts (supplierid, + contact, + position, + tel, + fax, + email, + mobile) + VALUES ('" . $SupplierID . "', + '" . $_POST['Contact'] . "', + '" . $_POST['Position'] . "', + '" . $_POST['Tel'] . "', + '" . $_POST['Fax'] . "', + '" . $_POST['Email'] . "', '" . $_POST['Mobile'] . "')"; $msg = _('The new supplier contact has been added to the database'); } //run the SQL from either of the above possibilites + if ($InputError != 1) { + $ErrMsg = _('The supplier contact could not be inserted or updated because'); + $DbgMsg = _('The SQL that was used but failed was'); - $ErrMsg = _('The supplier contact could not be inserted or updated because'); - $DbgMsg = _('The SQL that was used but failed was'); + $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); - $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); + prnMsg($msg,'success'); - prnMsg($msg,'success'); - - unset($SelectedContact); - unset($_POST['Contact']); - unset($_POST['Position']); - unset($_POST['Tel']); - unset($_POST['Fax']); - unset($_POST['Email']); - unset($_POST['Mobile']); - + unset($SelectedContact); + unset($_POST['Contact']); + unset($_POST['Position']); + unset($_POST['Tel']); + unset($_POST['Fax']); + unset($_POST['Email']); + unset($_POST['Mobile']); + } } elseif (isset($_GET['delete'])) { - $sql = "DELETE FROM suppliercontacts - WHERE contact='$SelectedContact' + $sql = "DELETE FROM suppliercontacts + WHERE contact='$SelectedContact' AND supplierid = '$SupplierID'"; $ErrMsg = _('The supplier contact could not be deleted because'); @@ -119,13 +120,13 @@ if (!isset($SelectedContact)){ - $sql = "SELECT suppliers.suppname, - contact, - position, - tel, - suppliercontacts.fax, + $sql = "SELECT suppliers.suppname, + contact, + position, + tel, + suppliercontacts.fax, suppliercontacts.email - FROM suppliercontacts, + FROM suppliercontacts, suppliers WHERE suppliercontacts.supplierid=suppliers.supplierid AND suppliercontacts.supplierid = '$SupplierID'"; @@ -144,15 +145,14 @@ <th>" . _('Fax No') . "</th><th>" . _('Email') . "</th></tr>\n"; - do { + while ($myrow = DB_fetch_row($result)) { printf("<tr><td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td><a href='mailto:%s'>%s</td> <td><a href='%s&SupplierID=%s&SelectedContact=%s'>" . _('Edit') . "</td> - <td><a href='%s&SupplierID=%s&SelectedContact=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this contact?') . "');\">" . _('Delete') . '</td> - </tr>', + <td><a href='%s&SupplierID=%s&SelectedContact=%s&delete=yes' onclick=\"return confirm('" . _('Are you sure you wish to delete this contact?') . "');\">" . _('Delete') . '</td></tr>', $myrow[1], $myrow[2], $myrow[3], @@ -165,9 +165,8 @@ $_SERVER['PHP_SELF']. '?' . SID, $SupplierID, $myrow[1]); + }; - } while ($myrow = DB_fetch_row($result)); - //END WHILE LIST LOOP } @@ -187,11 +186,11 @@ if (isset($SelectedContact)) { //editing an existing branch - $sql = "SELECT contact, - position, - tel, - fax, - mobile, + $sql = "SELECT contact, + position, + tel, + fax, + mobile, email FROM suppliercontacts WHERE contact='$SelectedContact' @@ -206,8 +205,8 @@ $_POST['Fax'] = $myrow['fax']; $_POST['Email'] = $myrow['email']; $_POST['Mobile'] = $myrow['mobile']; - echo "<input type=hidden name='SelectedContact' VALUE='" . $_POST['Contact'] . "'>"; - echo "<input type=hidden name='Contact' VALUE='" . $_POST['Contact'] . "'>"; + echo "<input type=hidden name='SelectedContact' value='" . $_POST['Contact'] . "'>"; + echo "<input type=hidden name='Contact' value='" . $_POST['Contact'] . "'>"; echo '<table><tr><td>' . _('Contact') . ':</td><td>' . $_POST['Contact'] . '</td></tr>'; } else { //end of if $SelectedContact only do the else when a new record is being entered Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-13 05:43:04 UTC (rev 3378) +++ trunk/doc/Change.log.html 2010-03-13 14:03:01 UTC (rev 3379) @@ -1,7 +1,8 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>13/03/10 Phil: GLAccountReport.php - creates a pdf for GL account listings for any selected range of accounts and periods -<p>13/03/10 Phil: GLAccountCSV.php - creates a csv file for GL account report for any selected range of accounts and periods +<p>13/03/10 Tim: SupplierContacts.php - Correctly do the while loop to avoid a blank line, and only try to do the database updates when there are no errors</p> +<p>13/03/10 Phil: GLAccountReport.php - creates a pdf for GL account listings for any selected range of accounts and periods</p> +<p>13/03/10 Phil: GLAccountCSV.php - creates a csv file for GL account report for any selected range of accounts and periods</p> <p>10/03/10 Peter Pettersson: Updated Swedish translation and some changes to Language oriented files</p> <p>09/03/10 Tim: PDFStockLocTransfer.php - Add a reprint option</p> <p>09/03/10 Tim: Updates to Petty Cash Management Report and include new header file</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-13 15:42:28
|
Revision: 3380 http://web-erp.svn.sourceforge.net/web-erp/?rev=3380&view=rev Author: tim_schofield Date: 2010-03-13 15:42:22 +0000 (Sat, 13 Mar 2010) Log Message: ----------- Tim: SuppPriceList.php - Remove deprecated split() function Modified Paths: -------------- trunk/SuppPriceList.php trunk/doc/Change.log.html Modified: trunk/SuppPriceList.php =================================================================== --- trunk/SuppPriceList.php 2010-03-13 14:03:01 UTC (rev 3379) +++ trunk/SuppPriceList.php 2010-03-13 15:42:22 UTC (rev 3380) @@ -12,20 +12,20 @@ if (isset($_POST['PrintPDF'])) { include('includes/PDFStarter.php'); - + $FontSize=9; $pdf->addinfo('Title',_('Supplier Price List')); $pdf->addinfo('Subject',_('Price List of goods from a Supplier')); $PageNumber=1; $line_height=12; - - //get supplier + + //get supplier $sqlsup = "SELECT suppname FROM suppliers where supplierid='" . $_POST['supplier'] . "'"; - $resultsup = db_query($sqlsup,$db,$ErrMsg); + $resultsup = db_query($sqlsup,$db); $RowSup = db_fetch_row($resultsup); $Supp=$RowSup['0']; - + //get category if ($_POST['category']!="all"){ $sqlcat="SELECT categorydescription FROM `stockcategory` where categoryid ='" . $_POST['category'] . "'"; @@ -35,42 +35,42 @@ } else { $Categoryname="ALL"; } - + //get currency $sqlcur="SELECT currcode FROM `suppliers` where supplierid='" . $_POST['supplier'] . "'"; - $resultcur = db_query($sqlcur,$db,$ErrMsg); + $resultcur = db_query($sqlcur,$db); $RowCur = db_fetch_row($resultcur); $Currency=$RowCur['0']; - + //get date price if ($_POST['price']=="all"){ $DatePrice=_('All Price'); } else { $DatePrice=_('Current Price'); } - + //price and category = all if (($_POST['price']=="all")and($_POST['category']=="all")){ $sql = "SELECT purchdata.stockid, stockmaster.description, purchdata.price, (purchdata.effectivefrom)as dateprice, - purchdata.supplierdescription + purchdata.supplierdescription FROM purchdata,stockmaster WHERE supplierno='" . $_POST['supplier'] . "' AND stockmaster.stockid=purchdata.stockid ORDER BY stockid ASC ,dateprice DESC"; } else { //category=all and price != all - if (($_POST['price']!="all")and($_POST['category']=="all")){ - - $sql = "SELECT purchdata.stockid, + if (($_POST['price']!="all")and($_POST['category']=="all")){ + + $sql = "SELECT purchdata.stockid, stockmaster.description, - purchdata.price, - (SELECT purchdata.effectivefrom - FROM purchdata - WHERE purchdata.stockid = stockmaster.stockid - ORDER BY effectivefrom DESC + purchdata.price, + (SELECT purchdata.effectivefrom + FROM purchdata + WHERE purchdata.stockid = stockmaster.stockid + ORDER BY effectivefrom DESC LIMIT 0,1) AS dateprice, purchdata.supplierdescription FROM purchdata, stockmaster @@ -78,15 +78,15 @@ AND stockmaster.stockid = purchdata.stockid GROUP BY stockid ORDER BY stockid ASC , dateprice DESC"; - } else { + } else { //price = all category !=all if (($_POST['price']=="all")and($_POST['category']!="all")){ - + $sql = "SELECT purchdata.stockid, stockmaster.description, purchdata.price, (purchdata.effectivefrom)as dateprice, - purchdata.supplierdescription + purchdata.supplierdescription FROM purchdata,stockmaster WHERE supplierno='" . $_POST['supplier'] . "' AND stockmaster.stockid=purchdata.stockid @@ -97,12 +97,12 @@ $sql = "SELECT purchdata.stockid, stockmaster.description, purchdata.price, - (SELECT purchdata.effectivefrom - FROM purchdata - WHERE purchdata.stockid = stockmaster.stockid - ORDER BY effectivefrom DESC + (SELECT purchdata.effectivefrom + FROM purchdata + WHERE purchdata.stockid = stockmaster.stockid + ORDER BY effectivefrom DESC LIMIT 0,1) AS dateprice, - purchdata.supplierdescription + purchdata.supplierdescription FROM purchdata,stockmaster WHERE supplierno='" . $_POST['supplier'] . "' AND stockmaster.stockid=purchdata.stockid @@ -130,7 +130,7 @@ $Page_Width,$Right_Margin,$Supp,$Categoryname,$Currency,$DatePrice); $FontSize=8; - + $code=''; while ($myrow = DB_fetch_array($result,$db)){ $YPos -=$line_height; // Parameters for addTextWrap are defined in /includes/class.pdf.php @@ -138,9 +138,14 @@ // 4) Height 5) Text 6) Alignment 7) Border 8) Fill - True to use SetFillColor // and False to set to transparent - $date=$myrow[3]; - list($year,$month,$day ) = split('[/.-]', $myrow[3]); - $dateprice="$day/$month/$year"; + if (strpos($myrow[3],'-')) { + $DateArray=explode('-', $myrow[3]); + } else if (strpos($myrow[3],'/')) { + $DateArray=explode('/', $myrow[3]); + } else if (strpos($myrow[3],'.')) { + $DateArray=explode('.', $myrow[3]); + } + $dateprice=date($_SESSION['DefaultDateFormat'], mktime(0,0,0,$DateArray[1],$DateArray[2],$DateArray[0])); //if item has more than 1 price, write only price, date and supplier code for the old ones if ($code==$myrow[0]){ @@ -149,17 +154,17 @@ $pdf->addTextWrap(430,$YPos,50,$FontSize,$dateprice,'left'); $pdf->addTextWrap(510,$YPos,40,$FontSize,$myrow[4],'left'); $code=$myrow[0]; - } else { - $code=$myrow[0]; + } else { + $code=$myrow[0]; $pdf->addTextWrap(50,$YPos,90,$FontSize,$myrow[0],'left'); $pdf->addTextWrap(145,$YPos,215,$FontSize,$myrow[1],'left'); $pdf->addTextWrap(350,$YPos,50,$FontSize,number_format($myrow[2],2),'right'); $pdf->addTextWrap(430,$YPos,50,$FontSize,$dateprice,'left'); $pdf->addTextWrap(510,$YPos,40,$FontSize,$myrow[4],'left'); - } + } - if ($YPos < $Bottom_Margin + $line_height){ + if ($YPos < $Bottom_Margin + $line_height){ PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width, $Right_Margin,$Supp,$Categoryname,$Currency,$DatePrice); @@ -168,7 +173,7 @@ } /*end while loop */ - + if ($YPos < $Bottom_Margin + $line_height){ PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width, $Right_Margin,$Supp,$Categoryname,$Currency,$DatePrice); @@ -176,17 +181,17 @@ $pdfcode = $pdf->output(); - + header('Content-type: application/pdf'); header("Content-Length: " . $len); header('Content-Disposition: inline; filename=Supplier Price List.pdf'); header('Expires: 0'); header('Cache-Control: private, post-check=0, pre-check=0'); - header('Pragma: public'); + header('Pragma: public'); $pdf->Output('SuppPriceList.pdf', 'I'); - + } else { /*The option to print PDF was not hit so display form */ $title=_('Supplier Price List'); @@ -195,7 +200,7 @@ echo '<div class="page_help_text">' . _('View the Price List from supplier') . '</div><br>'; echo '<br/><form action=' . $_SERVER['PHP_SELF'] . " method='post'><table>"; - + $sql = "SELECT supplierid,suppname FROM `suppliers`"; $result = DB_query($sql,$db); echo '<table>'; @@ -206,9 +211,9 @@ } else { echo '<option Value="' . $myrow['supplierid'] . '">' . $myrow['supplierid'].' - '.$myrow['suppname']; } - } + } echo '</select></td></tr>'; - + $sql='SELECT categoryid,categorydescription FROM `stockcategory`'; $result = DB_query($sql,$db); echo '<tr><td>' . _('Category') . ':</td><td><select name="category"> '; @@ -219,15 +224,15 @@ } else { echo '<option Value="' . $myrow['categoryid'] . '">' .$myrow['categoryid'].' - '. $myrow['categorydescription']; } - } + } echo '</select></td></tr>'; - + echo '<tr><td>' . _('Price List') . ':</td><td><select name="price"> '; echo '<option Value="all">' ._('All Prices').''; echo '<option Value="current">' ._('Only Current Price').''; echo '</select></td></tr>'; - - + + echo "</table><br/><div class='centre'><input type=submit name='PrintPDF' value='" . _('Print PDF') . "'></div>"; include('includes/footer.inc'); @@ -248,18 +253,18 @@ $FontSize=9; $YPos= $Page_Height-$Top_Margin; $YPos -=(3*$line_height); - + $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize+2,$_SESSION['CompanyRecord']['coyname']); $YPos -=$line_height; - + $pdf->addTextWrap($Left_Margin,$YPos,150,$FontSize,_('Supplier Price List for').' '.$DatePrice); - - $pdf->addTextWrap($Page_Width-$Right_Margin-150,$YPos,160,$FontSize,_('Printed') . ': ' . + + $pdf->addTextWrap($Page_Width-$Right_Margin-150,$YPos,160,$FontSize,_('Printed') . ': ' . Date($_SESSION['DefaultDateFormat']) . ' ' . _('Page') . ' ' . $PageNumber,'left'); $YPos -= $line_height; $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,_('Supplier').' '); $pdf->addTextWrap(95,$YPos,150,$FontSize,_(': ').$Supp); - + $YPos -= $line_height; $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,_('Category').' '); @@ -267,18 +272,18 @@ $YPos -= $line_height; $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,_('Currency').' '); $pdf->addTextWrap(95,$YPos,50,$FontSize,_(': ').$Currency); - $YPos -=(2*$line_height); + $YPos -=(2*$line_height); /*set up the headings */ - - - + + + $pdf->addTextWrap(50,$YPos,100,$FontSize,_('Code'), 'left'); $pdf->addTextWrap(145,$YPos,200,$FontSize,_('Description'), 'left'); $pdf->addTextWrap(370,$YPos,60,$FontSize,_('Price'), 'left'); $pdf->addTextWrap(390,$YPos,80,$FontSize,_('Date Price'), 'right'); $pdf->addTextWrap(470,$YPos,80,$FontSize,_('Supp Code'), 'right'); - - + + $FontSize=8; $PageNumber++; } // End of PrintHeader() function Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-13 14:03:01 UTC (rev 3379) +++ trunk/doc/Change.log.html 2010-03-13 15:42:22 UTC (rev 3380) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>13/03/10 Tim: SuppPriceList.php - Remove deprecated split() function</p> <p>13/03/10 Tim: SupplierContacts.php - Correctly do the while loop to avoid a blank line, and only try to do the database updates when there are no errors</p> <p>13/03/10 Phil: GLAccountReport.php - creates a pdf for GL account listings for any selected range of accounts and periods</p> <p>13/03/10 Phil: GLAccountCSV.php - creates a csv file for GL account report for any selected range of accounts and periods</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-13 16:11:12
|
Revision: 3381 http://web-erp.svn.sourceforge.net/web-erp/?rev=3381&view=rev Author: tim_schofield Date: 2010-03-13 16:11:06 +0000 (Sat, 13 Mar 2010) Log Message: ----------- Tim: Suppliers.php - Remove deprecated split() function Modified Paths: -------------- trunk/Suppliers.php trunk/doc/Change.log.html Modified: trunk/Suppliers.php =================================================================== --- trunk/Suppliers.php 2010-03-13 15:42:22 UTC (rev 3380) +++ trunk/Suppliers.php 2010-03-13 16:11:06 UTC (rev 3381) @@ -396,7 +396,7 @@ // $xml = simplexml_load_file($request_url) or die("url not loading"); $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = split(",", $coordinates); + $coordinatesSplit = explode(",", $coordinates); // Format: Longitude, Latitude, Altitude $latitude = $coordinatesSplit[1]; $longitude = $coordinatesSplit[0]; @@ -406,7 +406,7 @@ // Successful geocode $geocode_pending = false; $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = split(",", $coordinates); + $coordinatesSplit = explode(",", $coordinates); // Format: Longitude, Latitude, Altitude $latitude = $coordinatesSplit[1]; $longitude = $coordinatesSplit[0]; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-13 15:42:22 UTC (rev 3380) +++ trunk/doc/Change.log.html 2010-03-13 16:11:06 UTC (rev 3381) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>13/03/10 Tim: Suppliers.php - Remove deprecated split() function</p> <p>13/03/10 Tim: SuppPriceList.php - Remove deprecated split() function</p> <p>13/03/10 Tim: SupplierContacts.php - Correctly do the while loop to avoid a blank line, and only try to do the database updates when there are no errors</p> <p>13/03/10 Phil: GLAccountReport.php - creates a pdf for GL account listings for any selected range of accounts and periods</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-13 16:14:41
|
Revision: 3382 http://web-erp.svn.sourceforge.net/web-erp/?rev=3382&view=rev Author: tim_schofield Date: 2010-03-13 16:14:34 +0000 (Sat, 13 Mar 2010) Log Message: ----------- Tim: CustomerBranches.php - Remove deprecated split() function Modified Paths: -------------- trunk/CustomerBranches.php trunk/doc/Change.log.html Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2010-03-13 16:11:06 UTC (rev 3381) +++ trunk/CustomerBranches.php 2010-03-13 16:14:34 UTC (rev 3382) @@ -90,7 +90,7 @@ $_POST['EstDeliveryDays']=1; } if (!isset($latitude)) { - $latitude=0.0; + $latitude=0.0; $longitude=0.0; } if ($_SESSION['geocode_integration']==1 ){ @@ -116,7 +116,7 @@ // $xml = simplexml_load_file($request_url) or die("url not loading"); $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = split(",", $coordinates); + $coordinatesSplit = explode(",", $coordinates); // Format: Longitude, Latitude, Altitude $latitude = $coordinatesSplit[1]; $longitude = $coordinatesSplit[0]; @@ -126,7 +126,7 @@ // Successful geocode $geocode_pending = false; $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = split(",", $coordinates); + $coordinatesSplit = explode(",", $coordinates); // Format: Longitude, Latitude, Altitude $latitude = $coordinatesSplit[1]; $longitude = $coordinatesSplit[0]; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-13 16:11:06 UTC (rev 3381) +++ trunk/doc/Change.log.html 2010-03-13 16:14:34 UTC (rev 3382) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>13/03/10 Tim: CustomerBranches.php - Remove deprecated split() function</p> <p>13/03/10 Tim: Suppliers.php - Remove deprecated split() function</p> <p>13/03/10 Tim: SuppPriceList.php - Remove deprecated split() function</p> <p>13/03/10 Tim: SupplierContacts.php - Correctly do the while loop to avoid a blank line, and only try to do the database updates when there are no errors</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-13 16:18:24
|
Revision: 3383 http://web-erp.svn.sourceforge.net/web-erp/?rev=3383&view=rev Author: tim_schofield Date: 2010-03-13 16:18:18 +0000 (Sat, 13 Mar 2010) Log Message: ----------- Tim: geocode.php - Remove deprecated split() function Modified Paths: -------------- trunk/doc/Change.log.html trunk/geocode.php Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-13 16:14:34 UTC (rev 3382) +++ trunk/doc/Change.log.html 2010-03-13 16:18:18 UTC (rev 3383) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>13/03/10 Tim: geocode.php - Remove deprecated split() function</p> <p>13/03/10 Tim: CustomerBranches.php - Remove deprecated split() function</p> <p>13/03/10 Tim: Suppliers.php - Remove deprecated split() function</p> <p>13/03/10 Tim: SuppPriceList.php - Remove deprecated split() function</p> Modified: trunk/geocode.php =================================================================== --- trunk/geocode.php 2010-03-13 16:14:34 UTC (rev 3382) +++ trunk/geocode.php 2010-03-13 16:18:18 UTC (rev 3383) @@ -57,7 +57,7 @@ // Successful geocode $geocode_pending = false; $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = split(",", $coordinates); + $coordinatesSplit = explode(",", $coordinates); // Format: Longitude, Latitude, Altitude $lat = $coordinatesSplit[1]; $lng = $coordinatesSplit[0]; @@ -103,7 +103,7 @@ // Successful geocode $geocode_pending = false; $coordinates = $xml->Response->Placemark->Point->coordinates; - $coordinatesSplit = split(",", $coordinates); + $coordinatesSplit = explode(",", $coordinates); // Format: Longitude, Latitude, Altitude $lat = $coordinatesSplit[1]; $lng = $coordinatesSplit[0]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-13 16:22:48
|
Revision: 3384 http://web-erp.svn.sourceforge.net/web-erp/?rev=3384&view=rev Author: tim_schofield Date: 2010-03-13 16:22:42 +0000 (Sat, 13 Mar 2010) Log Message: ----------- Tim: report_runner.php - Remove deprecated split() function Modified Paths: -------------- trunk/doc/Change.log.html trunk/report_runner.php Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-13 16:18:18 UTC (rev 3383) +++ trunk/doc/Change.log.html 2010-03-13 16:22:42 UTC (rev 3384) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>13/03/10 Tim: report_runner.php - Remove deprecated split() function</p> <p>13/03/10 Tim: geocode.php - Remove deprecated split() function</p> <p>13/03/10 Tim: CustomerBranches.php - Remove deprecated split() function</p> <p>13/03/10 Tim: Suppliers.php - Remove deprecated split() function</p> Modified: trunk/report_runner.php =================================================================== --- trunk/report_runner.php 2010-03-13 16:18:18 UTC (rev 3383) +++ trunk/report_runner.php 2010-03-13 16:22:42 UTC (rev 3384) @@ -2,17 +2,17 @@ <?php //-------------------------------------------------------------------- // report_runner.php -// This program is designed to run reports in batch command mode for +// This program is designed to run reports in batch command mode for // weberp. Much thanks to Phil Daintree as the major author of WEBERP. -// +// // -------------------------------------------------------------------- // Written by Alan B Jones (mo...@ya...) // based on code orgiginally from weberp -// (c) alan jones 2006. +// (c) alan jones 2006. // (c) 2006 logic works Ltd and others // licenced under the terms of the GPL V(2) // if you want to know the details of the use of this software -// and how you are licenced to use it under the terms of the +// and how you are licenced to use it under the terms of the // see here http://www.gnu.org/licenses/gpl.txt //-------------------------------------------------------------------- //you must tell the script where you main installation is located @@ -27,7 +27,7 @@ " -d database name (the mysql db to use for the data for the report)\n". " [-t reporttext ] (some words you want to send with the report-optional)\n". " [ -H weberpHOME] (the home directory for weberp - or edit the php file)\n"; - + if ($argc < 7 ) { echo $usage; exit; @@ -78,7 +78,7 @@ } if ($weberp_home=="") { - echo "weberp home is not set in this file or -H isn't set"; + echo "weberp home is not set in this file or -H isn't set"; } // change directory to the weberp home to get all the includes to work nicely chdir($weberp_home); @@ -86,7 +86,7 @@ // get me the report name from the command line $_GET['ReportID'] = $reportnumber; -$Recipients = split(";",$emailaddresses); +$Recipients = explode(";",$emailaddresses); //wrap in angles so that mail can accept it for ($i=0;$i<count($Recipients); $i++) { $Recipient[$i]="<".$Recipient[$i].">"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-15 19:42:25
|
Revision: 3385 http://web-erp.svn.sourceforge.net/web-erp/?rev=3385&view=rev Author: tim_schofield Date: 2010-03-15 19:42:18 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Tim: Layout changes to make SelectCustomer.php SelectProduct.php and SelectSupplier.php have a similar look and feel to them Modified Paths: -------------- trunk/AccountSections.php trunk/SelectCustomer.php trunk/SelectProduct.php trunk/SelectSupplier.php trunk/css/default/default.css trunk/css/fresh/default.css trunk/css/gel/default.css trunk/css/jelly/default.css trunk/css/professional/default.css trunk/css/professional-rtl/default.css trunk/css/silverwolf/default.css trunk/doc/Change.log.html Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2010-03-13 16:22:42 UTC (rev 3384) +++ trunk/AccountSections.php 2010-03-15 19:42:18 UTC (rev 3385) @@ -176,7 +176,7 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'<br>'; - echo "<table> + echo "<table name='SectionList'> <tr> <th>" . _('Section Number') . "</th> <th>" . _('Section Description') . "</th> @@ -200,7 +200,7 @@ } else { echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&SelectedSectionID=' . $myrow[0] . '&delete=1">' . _('Delete') .'</a></td>'; } - + echo '</tr>'; } //END WHILE LIST LOOP echo '</table><p>'; } //end of ifs and buts! Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2010-03-13 16:22:42 UTC (rev 3384) +++ trunk/SelectCustomer.php 2010-03-15 19:42:18 UTC (rev 3385) @@ -1,40 +1,35 @@ <?php /* $Id$*/ - $PageSecurity = 2; - -include('includes/session.inc'); +include ('includes/session.inc'); $title = _('Search Customers'); -include('includes/header.inc'); -include('includes/SQL_CommonFunctions.inc'); - +include ('includes/header.inc'); +include ('includes/SQL_CommonFunctions.inc'); if (isset($_GET['Select'])) { - $_SESSION['CustomerID']=$_GET['Select']; + $_SESSION['CustomerID'] = $_GET['Select']; } -if (!isset($_SESSION['CustomerID'])){ //initialise if not already done - $_SESSION['CustomerID']=""; +if (!isset($_SESSION['CustomerID'])) { //initialise if not already done + $_SESSION['CustomerID'] = ""; } - -if ($_SESSION['CustomerID'] =="" or ($_SESSION['CustomerID'] !="" and isset($_POST['Search']))){ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Customers') . ''; +echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Customers') . ''; +if (!isset($_SESSION['CustomerType'])) { //initialise if not already done + $_SESSION['CustomerType'] = ""; } - -if (!isset($_SESSION['CustomerType'])){ //initialise if not already done - $_SESSION['CustomerType']=""; -} // only run geocode if integration is turned on and customer has been selected -if ($_SESSION['geocode_integration']==1 AND $_SESSION['CustomerID'] !=""){ - - $sql="SELECT * FROM geocode_param WHERE 1"; +if ($_SESSION['geocode_integration'] == 1 AND $_SESSION['CustomerID'] != "") { + $sql = "SELECT * FROM geocode_param WHERE 1"; $ErrMsg = _('An error occurred in retrieving the information'); $result = DB_query($sql, $db, $ErrMsg); $myrow = DB_fetch_array($result); - $sql = "SELECT debtorsmaster.debtorno,debtorsmaster.name,custbranch.brname, - custbranch.lat, custbranch.lng - FROM debtorsmaster LEFT JOIN custbranch - ON debtorsmaster.debtorno = custbranch.debtorno - WHERE debtorsmaster.debtorno = '" . $_SESSION['CustomerID'] . "' - ORDER BY debtorsmaster.debtorno"; + $sql = "SELECT debtorsmaster.debtorno, + debtorsmaster.name, + custbranch.brname, + custbranch.lat, + custbranch.lng + FROM debtorsmaster LEFT JOIN custbranch + ON debtorsmaster.debtorno = custbranch.debtorno + WHERE debtorsmaster.debtorno = '" . $_SESSION['CustomerID'] . "' + ORDER BY debtorsmaster.debtorno"; $ErrMsg = _('An error occurred in retrieving the information'); $result2 = DB_query($sql, $db, $ErrMsg); $myrow2 = DB_fetch_array($result2); @@ -46,75 +41,67 @@ $map_height = $myrow['map_height']; $map_width = $myrow['map_width']; $map_host = $myrow['map_host']; - echo '<script src="http://maps.google.com/maps?file=api&v=2&key=' . $api_key . '"'; echo ' type="text/javascript"></script>'; echo ' <script type="text/javascript">'; - echo ' //<![CDATA[ '; ?> - - function load() { - if (GBrowserIsCompatible()) { - var map = new GMap2(document.getElementById("map")); - map.addControl(new GSmallMapControl()); - map.addControl(new GMapTypeControl()); - <?php echo 'map.setCenter(new GLatLng(' . $lat . ', ' . $lng . '), 11);'; ?> - <?php echo 'var marker = new GMarker(new GLatLng(' . $lat . ', ' . $lng . '));' ?> - map.addOverlay(marker); - GEvent.addListener(marker, "click", function() { - marker.openInfoWindowHtml(WINDOW_HTML); - }); - marker.openInfoWindowHtml(WINDOW_HTML); - } - } - //]]> - </script> - <body onload="load()" onunload="GUnload()"> - - <?php + echo ' //<![CDATA[ '; + echo 'function load() { + if (GBrowserIsCompatible()) { + var map = new GMap2(document.getElementById("map")); + map.addControl(new GSmallMapControl()); + map.addControl(new GMapTypeControl());'; + echo 'map.setCenter(new GLatLng(' . $lat . ', ' . $lng . '), 11);'; + echo 'var marker = new GMarker(new GLatLng(' . $lat . ', ' . $lng . '));'; + echo 'map.addOverlay(marker); + GEvent.addListener(marker, "click", function() { + marker.openInfoWindowHtml(WINDOW_HTML); + }); + marker.openInfoWindowHtml(WINDOW_HTML); + } + } + //]]> + </script>'; + echo '<body onload="load()" onunload="GUnload()">'; } -$msg=""; - +$msg = ""; if (isset($_POST['Go1']) or isset($_POST['Go2'])) { - $_POST['PageOffset'] = (isset($_POST['Go1']) ? $_POST['PageOffset1'] : $_POST['PageOffset2']); - $_POST['Go'] = ''; + $_POST['PageOffset'] = (isset($_POST['Go1']) ? $_POST['PageOffset1'] : $_POST['PageOffset2']); + $_POST['Go'] = ''; } - if (!isset($_POST['PageOffset'])) { - $_POST['PageOffset'] = 1; + $_POST['PageOffset'] = 1; } else { - if ($_POST['PageOffset']==0) { - $_POST['PageOffset'] = 1; - } + if ($_POST['PageOffset'] == 0) { + $_POST['PageOffset'] = 1; + } } - -if (isset($_POST['Search']) OR isset($_POST['CSV']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])){ - if (isset($_POST['Search'])){ +if (isset($_POST['Search']) OR isset($_POST['CSV']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { + if (isset($_POST['Search'])) { $_POST['PageOffset'] = 1; } if ($_POST['Keywords'] AND (($_POST['CustCode']) OR ($_POST['CustPhone']) OR ($_POST['CustType']))) { - $msg=_('Search Result: Customer Name has been used in search') . '<br>'; + $msg = _('Search Result: Customer Name has been used in search') . '<br>'; $_POST['Keywords'] = strtoupper($_POST['Keywords']); } - if ($_POST['CustCode'] AND $_POST['CustPhone']=="" AND isset($_POST['CustType']) AND $_POST['Keywords']=="") { - $msg=_('Search Result: Customer Code has been used in search') . '<br>'; + if ($_POST['CustCode'] AND $_POST['CustPhone'] == "" AND isset($_POST['CustType']) AND $_POST['Keywords'] == "") { + $msg = _('Search Result: Customer Code has been used in search') . '<br>'; } if (($_POST['CustPhone']) AND ($_POST['CustType'])) { - $msg=_('Search Result: Customer Phone has been used in search') . '<br>'; + $msg = _('Search Result: Customer Phone has been used in search') . '<br>'; } if (($_POST['CustAdd']) AND ($_POST['CustType'])) { - $msg=_('Search Result: Customer Address has been used in search') . '<br>'; + $msg = _('Search Result: Customer Address has been used in search') . '<br>'; } - if ($_POST['CustType'] AND $_POST['CustPhone']=="" AND $_POST['CustCode']=="" AND $_POST['Keywords']=="" AND $_POST['CustAdd']==""){ - $msg=_('Search Result: Customer Type has been used in search') . '<br>'; + if ($_POST['CustType'] AND $_POST['CustPhone'] == "" AND $_POST['CustCode'] == "" AND $_POST['Keywords'] == "" AND $_POST['CustAdd'] == "") { + $msg = _('Search Result: Customer Type has been used in search') . '<br>'; } - if (($_POST['Keywords']=="") AND ($_POST['CustCode']=="") AND ($_POST['CustPhone']=="") AND ($_POST['CustType']=="")) { - - $SQL= "SELECT debtorsmaster.debtorno, + if (($_POST['Keywords'] == "") AND ($_POST['CustCode'] == "") AND ($_POST['CustPhone'] == "") AND ($_POST['CustType'] == "")) { + $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.brname, custbranch.contactname, debtortype.typename, @@ -123,21 +110,17 @@ FROM debtorsmaster LEFT JOIN custbranch ON debtorsmaster.debtorno = custbranch.debtorno, debtortype WHERE debtorsmaster.typeid = debtortype.typeid"; - } else { - if (strlen($_POST['Keywords'])>0) { - + if (strlen($_POST['Keywords']) > 0) { $_POST['Keywords'] = strtoupper(trim($_POST['Keywords'])); - //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - - $SQL = "SELECT debtorsmaster.debtorno, + $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.brname, custbranch.contactname, debtortype.typename, @@ -147,16 +130,14 @@ ON debtorsmaster.debtorno = custbranch.debtorno, debtortype WHERE debtorsmaster.name " . LIKE . " '$SearchString' AND debtorsmaster.typeid = debtortype.typeid"; - - } elseif (strlen($_POST['CustCode'])>0){ - + } elseif (strlen($_POST['CustCode']) > 0) { $_POST['CustCode'] = strtoupper(trim($_POST['CustCode'])); - $SQL = "SELECT debtorsmaster.debtorno, + $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.brname, custbranch.contactname, debtortype.typename, @@ -164,17 +145,15 @@ custbranch.faxno FROM debtorsmaster LEFT JOIN custbranch ON debtorsmaster.debtorno = custbranch.debtorno, debtortype - WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' + WHERE debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' AND debtorsmaster.typeid = debtortype.typeid"; - - } elseif (strlen($_POST['CustPhone'])>0){ - + } elseif (strlen($_POST['CustPhone']) > 0) { $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.brname, custbranch.contactname, debtortype.typename, @@ -182,18 +161,17 @@ custbranch.faxno FROM debtorsmaster LEFT JOIN custbranch ON debtorsmaster.debtorno = custbranch.debtorno, debtortype - WHERE custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%' + WHERE custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%' AND debtorsmaster.typeid = debtortype.typeid"; + // Added an option to search by address. I tried having it search address1, address2, address3, and address4, but my knowledge of MYSQL is limited. This will work okay if you select the CSV Format then you can search though the address1 field. I would like to extend this to all 4 address fields. Gilles Deacur -// Added an option to search by address. I tried having it search address1, address2, address3, and address4, but my knowledge of MYSQL is limited. This will work okay if you select the CSV Format then you can search though the address1 field. I would like to extend this to all 4 address fields. Gilles Deacur - } elseif (strlen($_POST['CustAdd'])>0){ - + } elseif (strlen($_POST['CustAdd']) > 0) { $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.brname, custbranch.contactname, debtortype.typename, @@ -201,58 +179,48 @@ custbranch.faxno FROM debtorsmaster LEFT JOIN custbranch ON debtorsmaster.debtorno = custbranch.debtorno, debtortype - WHERE debtorsmaster.address1 " . LIKE . " '%" . $_POST['CustAdd'] . "%' + WHERE debtorsmaster.address1 " . LIKE . " '%" . $_POST['CustAdd'] . "%' AND debtorsmaster.typeid = debtortype.typeid"; + // End added search feature. Gilles Deacur -// End added search feature. Gilles Deacur - } elseif (strlen($_POST['CustType'])>0){ - - $SQL = "SELECT debtorsmaster.debtorno, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - custbranch.brname, - custbranch.contactname, - debtortype.typename, - custbranch.phoneno, - custbranch.faxno - FROM debtorsmaster LEFT JOIN custbranch - ON debtorsmaster.debtorno = custbranch.debtorno, debtortype - WHERE debtorsmaster.typeid LIKE debtortype.typeid - AND debtortype.typename = '" . $_POST['CustType'] . "'"; + } elseif (strlen($_POST['CustType']) > 0) { + $SQL = "SELECT debtorsmaster.debtorno, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + custbranch.brname, + custbranch.contactname, + debtortype.typename, + custbranch.phoneno, + custbranch.faxno + FROM debtorsmaster LEFT JOIN custbranch + ON debtorsmaster.debtorno = custbranch.debtorno, debtortype + WHERE debtorsmaster.typeid LIKE debtortype.typeid + AND debtortype.typename = '" . $_POST['CustType'] . "'"; } } //one of keywords or custcode or custphone was more than a zero length string - if ($_SESSION['SalesmanLogin']!=''){ - $SQL .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'"; + if ($_SESSION['SalesmanLogin'] != '') { + $SQL.= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'"; } - $SQL .= ' ORDER BY debtorsmaster.name'; + $SQL.= ' ORDER BY debtorsmaster.name'; $ErrMsg = _('The searched customer records requested cannot be retrieved because'); - $result = DB_query($SQL,$db,$ErrMsg); - if (DB_num_rows($result)==1){ - $myrow=DB_fetch_array($result); + $result = DB_query($SQL, $db, $ErrMsg); + if (DB_num_rows($result) == 1) { + $myrow = DB_fetch_array($result); $_POST['Select'] = $myrow['debtorno']; unset($result); - } elseif (DB_num_rows($result)==0){ - prnMsg(_('No customer records contain the selected text') . ' - ' . _('please alter your search criteria and try again'),'info'); - echo '<br>'; + } elseif (DB_num_rows($result) == 0) { + prnMsg(_('No customer records contain the selected text') . ' - ' . _('please alter your search criteria and try again'), 'info'); + echo '<br>'; } } //end of if search - - -if (!isset($_POST['Select'])){ - $_POST['Select']=""; +if (!isset($_POST['Select'])) { + $_POST['Select'] = ""; } - -if ($_POST['Select']!="" or - ($_SESSION['CustomerID']!="" - and !isset($_POST['Keywords']) - and !isset($_POST['CustCode']) - and !isset($_POST['CustType']) - and !isset($_POST['CustPhone']))) { - - if ($_POST['Select']!=""){ +if ($_POST['Select'] != "" or ($_SESSION['CustomerID'] != "" and !isset($_POST['Keywords']) and !isset($_POST['CustCode']) and !isset($_POST['CustType']) and !isset($_POST['CustPhone']))) { + if ($_POST['Select'] != "") { $SQL = "SELECT brname, phoneno FROM custbranch WHERE debtorno='" . $_POST['Select'] . "'"; $_SESSION['CustomerID'] = $_POST['Select']; } else { @@ -261,231 +229,167 @@ custbranch.debtorno='" . $_SESSION['CustomerID'] . "' AND debtorsmaster.debtorno = custbranch.debtorno"; } - $ErrMsg = _('The customer name requested cannot be retrieved because'); - $result = DB_query($SQL,$db,$ErrMsg); - - if ($myrow=DB_fetch_row($result)){ + $result = DB_query($SQL, $db, $ErrMsg); + if ($myrow = DB_fetch_row($result)) { $CustomerName = $myrow[0]; $phone = $myrow[1]; } unset($result); // Adding customer encoding. Not needed for general use. This is not a recommended upgrade submission. Gilles Deacur - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName .' - '. $phone . _(' has been selected') . '</p>'; + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName . ' - ' . $phone . _(' has been selected') . '</p>'; echo '<div class="page_help_text">' . _('Select a menu option to operate using this customer') . '.</div><br>'; - $_POST['Select'] = NULL; - - echo '<table BORDER=2 cellpadding=4><tr><th>' . _('Customer Inquiries') . '</th> - <th>' . _('Customer Maintenance') . '</th></tr>'; - - echo '<tr><td WIDTH=50% class="menu_group_items">'; + echo '<table cellpadding=4 width=90%><tr><th width=33%>' . _('Customer Inquiries') . '</th> + <th width=33%>' . _('Customer Transactions') . '</th> + <th width=33%>' . _('Customer Maintenance') . '</th></tr>'; + echo '<tr><td valign=top class="select">'; /* Customer Inquiry Options */ echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br>'; echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br>'; echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br>'; - echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br>'; echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br>'; - echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br>'; - wikiLink('Customer', $_SESSION['CustomerID']); - - echo '</td><td WIDTH=50% class="menu_group_items">'; - - echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>'; + echo '</td><td valign=top class="select">'; + echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br>'; + echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br>'; + echo '</td><td valign=top class=select>'; + echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>'; echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br>'; echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br>'; - echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Special Customer Prices') . '</a><br>'; echo '<a href="' . $rootpath . '/CustEDISetup.php">' . _('Customer EDI Configuration') . '</a><br>'; echo '<a href="' . $rootpath . '/CustLoginSetup.php">' . _('Customer Login Configuration') . '</a>'; - - echo '</td></tr></table><br>'; + echo '</td>'; + echo '</tr></table><br>'; } else { - echo "<table WIDTH=50% BORDER=2><tr><th>" . _('Customer Inquiries') . "</th> - <th>" . _('Customer Maintenance') . "</th></tr>"; - - echo '<tr><td WIDTH=50%>'; - - echo '</td><td WIDTH=50%>'; - if (!isset($_SESSION['SalesmanLogin']) or $_SESSION['SalesmanLogin']==''){ - echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>'; - } + echo "<table width=90%><tr><th width=33%>" . _('Customer Inquiries') . "</th> + <th width=33%>" . _('Customer Transactions') . "</th> + <th width=33%>" . _('Customer Maintenance') . "</th></tr>"; + echo '<tr><td class="select">'; + echo '</td><td class="select">'; + echo '</td><td class="select">'; + if (!isset($_SESSION['SalesmanLogin']) or $_SESSION['SalesmanLogin'] == '') { + echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>'; + } echo '</td></tr></table>'; } - -?> - -<form action="<?php echo $_SERVER['PHP_SELF'] . '?' . SID; ?>" method=post> - -<b><div class='centre'><?php echo $msg; ?></div></b> -<?php echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . _('Search for Customers'); -?> -<table cellpadding=3 colspan=4> -<tr> -<td colspan=2><?php echo _('Enter a partial Name'); ?>:</td> -<td> -<?php +echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; +echo "<b><div class='centre'>" . $msg . "</div></b>"; +echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . _('Search for Customers'); +echo "<table cellpadding=3 colspan=4 class=selection>"; +echo "<tr><td colspan=2>" . _('Enter a partial Name') . ":</td><td>"; if (isset($_POST['Keywords'])) { - ?> - <input type="Text" name="Keywords" value="<?php echo $_POST['Keywords']?>" size=20 maxlength=25> - <?php + echo '<input type="Text" name="Keywords" value="' . $_POST['Keywords'] . '" size=20 maxlength=25>'; } else { - ?> - <input type="Text" name="Keywords" size=20 maxlength=25> - <?php + echo '<input type="Text" name="Keywords" size=20 maxlength=25>'; } -?> -</td> -<td><font size=3><b><?php echo _('OR'); ?></b></font></td> -<td><?php echo _('Enter a partial Code'); ?>:</td> -<td> -<?php +echo '</td><td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Enter a partial Code') . ':</td><td>'; if (isset($_POST['CustCode'])) { - ?> - <input type="Text" name="CustCode" value="<?php echo $_POST['CustCode'] ?>" size=15 maxlength=18> - <?php + echo '<input type="Text" name="CustCode" value="' . $_POST['CustCode'] . '" size=15 maxlength=18>'; } else { - ?> - <input type="Text" name="CustCode" size=15 maxlength=18> - <?php + echo '<input type="Text" name="CustCode" size=15 maxlength=18>'; } -?> -</td></tr><tr> -<td><font size=3><b><?php echo _('OR'); ?></b></font></td> -<td><?php echo _('Enter a partial Phone Number'); ?>:</td> -<td> -<?php +echo '</td></tr><tr><td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Enter a partial Phone Number') . ':</td><td>'; if (isset($_POST['CustPhone'])) { - ?> - <input type="Text" name="CustPhone" value="<?php echo $_POST['CustPhone'] ?>" size=15 maxlength=18> - <?php + echo '<input type="Text" name="CustPhone" value="' . $_POST['CustPhone'] . '" size=15 maxlength=18>'; } else { - ?> - <input type="Text" name="CustPhone" size=15 maxlength=18> - <?php + echo '<input type="Text" name="CustPhone" size=15 maxlength=18>'; } -?> -</td> - -<!-- Added an option to search by address. This will work okay if you select the CSV Format then you can search though the address1 field. I would like to extend this to all 4 address fields. This needs implementation into the warnings and other scripts in this page for full effect. I don't plan on doing this but hope somebody else can take over from here. Gilles Deacur --> - -<td><font size=3><b><?php echo _('OR'); ?></b></font></td> -<td><?php echo _('Enter part of the Address'); ?>:</td> -<td> -<?php +echo '</td>'; +/* Added an option to search by address. This will work okay if you select the CSV Format then you can search though the +* address1 field. I would like to extend this to all 4 address fields. This needs implementation into the warnings and +* other scripts in this page for full effect. I don't plan on doing this but hope somebody else can take over from here +* . Gilles Deacur +*/ +echo '<td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Enter part of the Address') . ':</td><td>'; if (isset($_POST['CustAdd'])) { - ?> - <input type="Text" name="CustAdd" value="<?php echo $_POST['CustAdd'] ?>" size=20 maxlength=25> - <?php + echo '<input type="Text" name="CustAdd" value="' . $_POST['CustAdd'] . '" size=20 maxlength=25>'; } else { - ?> - <input type="Text" name="CustAdd" size=20 maxlength=25> - <?php + echo '<input type="Text" name="CustAdd" size=20 maxlength=25>'; } -?> -</td> - -<!-- End addded search feature. Gilles Deacur --> - -<td><font size=3><b><?php echo _('OR'); ?></b></font></td> -<td><?php echo _('Choose a Type'); ?>:</td> -<td> - -<?php +echo '</td>'; +/* End addded search feature. Gilles Deacur */ +echo '<td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Choose a Type') . ':</td><td>'; if (isset($_POST['CustType'])) { - // Show Customer Type drop down list - $result2=DB_query('SELECT typeid, typename FROM debtortype ',$db); - // Error if no customer types setup - if (DB_num_rows($result2)==0){ - $DataError =1; - echo '<a href="CustomerTypes.php?" target="_parent">Setup Types</a>'; - echo '<tr><td colspan=2>' . prnMsg(_('No Customer types defined'),'error') . '</td></tr>'; - } else { - // If OK show select box with option selected - echo '<select name="CustType">'; - while ($myrow = DB_fetch_array($result2)) { - if ($_POST['CustType']==$myrow['typename']){ - echo "<option selected VALUE='". $myrow['typename'] . "'>" . $myrow['typename']; - } else { - echo "<option VALUE='". $myrow['typename'] . "'>" . $myrow['typename']; - } - } //end while loop - DB_data_seek($result2,0); - echo '</select></td></tr>'; - } + // Show Customer Type drop down list + $result2 = DB_query('SELECT typeid, typename FROM debtortype ', $db); + // Error if no customer types setup + if (DB_num_rows($result2) == 0) { + $DataError = 1; + echo '<a href="CustomerTypes.php?" target="_parent">Setup Types</a>'; + echo '<tr><td colspan=2>' . prnMsg(_('No Customer types defined'), 'error') . '</td></tr>'; + } else { + // If OK show select box with option selected + echo '<select name="CustType">'; + while ($myrow = DB_fetch_array($result2)) { + if ($_POST['CustType'] == $myrow['typename']) { + echo "<option selected value='" . $myrow['typename'] . "'>" . $myrow['typename']; + } else { + echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename']; + } + } //end while loop + DB_data_seek($result2, 0); + echo '</select></td></tr>'; + } } else { - // No option selected yet, so show Customer Type drop down list - $result2=DB_query('SELECT typeid, typename FROM debtortype ',$db); - // Error if no customer types setup - if (DB_num_rows($result2)==0){ - $DataError =1; - echo '<a href="CustomerTypes.php?" target="_parent">Setup Types</a>'; - echo '<tr><td colspan=2>' . prnMsg(_('No Customer types defined'),'error') . '</td></tr>'; } else { + // No option selected yet, so show Customer Type drop down list + $result2 = DB_query('SELECT typeid, typename FROM debtortype ', $db); + // Error if no customer types setup + if (DB_num_rows($result2) == 0) { + $DataError = 1; + echo '<a href="CustomerTypes.php?" target="_parent">Setup Types</a>'; + echo '<tr><td colspan=2>' . prnMsg(_('No Customer types defined'), 'error') . '</td></tr>'; + } else { // if OK show select box with available options to choose echo '<select name="CustType">'; while ($myrow = DB_fetch_array($result2)) { - echo "<option VALUE='". $myrow['typename'] . "'>" . $myrow['typename']; + echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename']; } //end while loop - DB_data_seek($result2,0); + DB_data_seek($result2, 0); echo '</select></td></tr>'; } } -?> -</td> -</tr> -</table> -<br /><div class='centre'> -<input type=submit name="Search" VALUE="<?php echo _('Search Now'); ?>"> -<input type=submit name="CSV" VALUE="<?php echo _('CSV Format'); ?>"> -</div> - -<?php -if (isset($_SESSION['SalesmanLogin']) and $_SESSION['SalesmanLogin']!=''){ - prnMsg(_('Your account enables you to see only customers allocated to you'),'warn',_('Note: Sales-person Login')); +echo "</td></tr></table><br />"; +echo '<div class="centre"><input type=submit name="Search" value="' . _('Search Now') . '"><input type=submit name="CSV" value="' . _('CSV Format') . '"></div>'; +if (isset($_SESSION['SalesmanLogin']) and $_SESSION['SalesmanLogin'] != '') { + prnMsg(_('Your account enables you to see only customers allocated to you'), 'warn', _('Note: Sales-person Login')); } - if (isset($result)) { unset($_SESSION['CustomerID']); - $ListCount=DB_num_rows($result); - $ListPageMax=ceil($ListCount/$_SESSION['DisplayRecordsMax']); + $ListCount = DB_num_rows($result); + $ListPageMax = ceil($ListCount / $_SESSION['DisplayRecordsMax']); if (!isset($_POST['CSV'])) { if (isset($_POST['Next'])) { if ($_POST['PageOffset'] < $ListPageMax) { $_POST['PageOffset'] = $_POST['PageOffset'] + 1; } } - if (isset($_POST['Previous'])) { if ($_POST['PageOffset'] > 1) { $_POST['PageOffset'] = $_POST['PageOffset'] - 1; } } - - echo "<input type=\"hidden\" name=\"PageOffset\" VALUE=\"". $_POST['PageOffset'] ."\"/>"; - - if ($ListPageMax >1) { + echo "<input type=\"hidden\" name=\"PageOffset\" value=\"" . $_POST['PageOffset'] . "\"/>"; + if ($ListPageMax > 1) { echo "<p><div class=centre> " . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; - echo '<select name="PageOffset1">'; - - $ListPage=1; - while($ListPage <= $ListPageMax) { + $ListPage = 1; + while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option VALUE=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; } else { - echo '<option VALUE=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; } $ListPage++; } echo '</select> - <input type=submit name="Go1" VALUE="' . _('Go') . '"> - <input type=submit name="Previous" VALUE="' . _('Previous') . '"> - <input type=submit name="Next" VALUE="' . _('Next') . '">'; - echo '</div>'; + <input type=submit name="Go1" value="' . _('Go') . '"> + <input type=submit name="Previous" value="' . _('Previous') . '"> + <input type=submit name="Next" value="' . _('Next') . '">'; + echo '</div>'; } - - echo '<br><table cellpadding=2 colspan=7 BORDER=2>'; + echo '<br><table cellpadding=2 colspan=7>'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Customer Name') . '</th> @@ -495,135 +399,97 @@ <th>' . _('Phone') . '</th> <th>' . _('Fax') . '</th> </tr>'; - echo $TableHeader; $j = 1; $k = 0; //row counter to determine background colour - $RowIndex = 0; + $RowIndex = 0; } - if (DB_num_rows($result)<>0){ - + if (DB_num_rows($result) <> 0) { if (isset($_POST['CSV'])) { - echo '<br><p class="page_title_text">' . _('Comma Separated Values (CSV) Search Result') . '</p>'; - echo '<div class="page_help_text">' . _('CSV data can be copied and used to import data into software such as a spreadsheet.') . '</div><br>'; - printf("<div class=csv>Code, Customer Name, Address1, Address2, Address3, Address4, Contact, Type, Phone, Fax"); - while ($myrow2=DB_fetch_array($result)) { - printf("<br>%s, - %s, - %s, - %s, - %s, - %s, - %s, - %s, - %s, - %s", - $myrow2['debtorno'], - str_replace(',', '',$myrow2['name']), - str_replace(',', '',$myrow2['address1']), - str_replace(',', '',$myrow2['address2']), - str_replace(',', '',$myrow2['address3']), - str_replace(',', '',$myrow2['address4']), - str_replace(',', '',$myrow2['contactname']), - str_replace(',', '',$myrow2['typename']), - $myrow2['phoneno'], - $myrow2['faxno']); - + $FileName = $_SESSION['reports_dir'] . '/Customer_Listing_' . Date('Y-m-d') . '.csv'; + echo '<br><p class="page_title_text"><a href="' . $FileName . '">' . _('Click to view the csv Search Result') . '</p>'; + $fp = fopen($FileName, 'w'); + while ($myrow2 = DB_fetch_array($result)) { + fwrite($fp, $myrow2['debtorno'] . ',' . str_replace(',', '', $myrow2['name']) . ',' . str_replace(',', '', $myrow2['address1']) . ',' . str_replace(',', '', $myrow2['address2']) . ',' . str_replace(',', '', $myrow2['address3']) . ',' . str_replace(',', '', $myrow2['address4']) . ',' . str_replace(',', '', $myrow2['contactname']) . ',' . str_replace(',', '', $myrow2['typename']) . ',' . $myrow2['phoneno'] . ',' . $myrow2['faxno'] . "\n"); } - echo '</div>'; + echo '</div>'; } if (!isset($_POST['CSV'])) { - DB_data_seek($result, ($_POST['PageOffset']-1)*$_SESSION['DisplayRecordsMax']); - } - - while (($myrow=DB_fetch_array($result)) AND ($RowIndex <> $_SESSION['DisplayRecordsMax'])) { - - if ($k==1){ + DB_data_seek($result, ($_POST['PageOffset'] - 1) * $_SESSION['DisplayRecordsMax']); + } + while (($myrow = DB_fetch_array($result)) AND ($RowIndex <> $_SESSION['DisplayRecordsMax'])) { + if ($k == 1) { echo '<tr class="EvenTableRows">'; - $k=0; + $k = 0; } else { echo '<tr class="OddTableRows">'; - $k=1; + $k = 1; } - - printf("<td><font size=1><input type=submit name='Select' VALUE='%s'</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td></tr>", - $myrow['debtorno'], - $myrow['name'], - $myrow['brname'], - $myrow['contactname'], - $myrow['typename'], - $myrow['phoneno'], - $myrow['faxno']); - + echo "<td><font size=1><input type=submit name='Select' value='" . $myrow['debtorno'] . "'</font></td> + <td><font size=1>" . $myrow['name'] . "</font></td> + <td><font size=1>" . $myrow['brname'] . "</font></td> + <td><font size=1>" . $myrow['contactname'] . "</font></td> + <td><font size=1>" . $myrow['typename'] . "</font></td> + <td><font size=1>" . $myrow['phoneno'] . "</font></td> + <td><font size=1>" . $myrow['faxno'] . "</font></td></tr>"; $j++; - if ($j == 11 AND ($RowIndex+1 != $_SESSION['DisplayRecordsMax'])){ - $j=1; + if ($j == 11 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { + $j = 1; echo $TableHeader; } + $RowIndex++; + //end of page full new headings if - $RowIndex++; -//end of page full new headings if } //end of while loop echo '</table>'; } } - //end if results to show if (!isset($_POST['CSV'])) { - if (isset($ListPageMax) and $ListPageMax>1) { + if (isset($ListPageMax) and $ListPageMax > 1) { echo "<p><div class=centre> " . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; - echo '<select name="PageOffset2">'; - - $ListPage=1; - while($ListPage <= $ListPageMax) { + $ListPage = 1; + while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option VALUE=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; } else { - echo '<option VALUE=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; } $ListPage++; } echo '</select> - <input type=submit name="Go2" VALUE="' . _('Go') . '"> - <input type=submit name="Previous" VALUE="' . _('Previous') . '"> - <input type=submit name="Next" VALUE="' . _('Next') . '">'; + <input type=submit name="Go2" value="' . _('Go') . '"> + <input type=submit name="Previous" value="' . _('Previous') . '"> + <input type=submit name="Next" value="' . _('Next') . '">'; } //end if results to show echo '</div></form>'; } - // Only display the geocode map if the integration is turned on, and there is a latitude/longitude to display -if (isset($_SESSION['CustomerID']) and $_SESSION['CustomerID']!="") { - if ($_SESSION['geocode_integration']==1){ +if (isset($_SESSION['CustomerID']) and $_SESSION['CustomerID'] != "") { + if ($_SESSION['geocode_integration'] == 1) { echo '<br>'; - if ($lat ==0){ + if ($lat == 0) { echo '<div class="centre">' . _('Mapping is enabled, but no Mapping data to display for this Customer.') . '</div>'; } else { echo '<tr><td colspan=2>'; - echo '<table WIDTH=45% colspan=2 BORDER=2 cellpadding=4>'; - echo "<tr><th WIDTH=33%>" . _('Customer Mapping') . "</th></tr>"; - echo '</td><td VALIGN=TOp>'; /* Mapping */ + echo '<table width=45% colspan=2 cellpadding=4>'; + echo "<tr><th width=33%>" . _('Customer Mapping') . "</th></tr>"; + echo '</td><td valign=TOp>'; /* Mapping */ echo '<div class="centre"' . _('Mapping is enabled, Map will display below.') . '</div>'; - echo '<div align="center" id="map" style="width: '. $map_width . 'px; height: ' . $map_height . 'px"></div><br>'; + echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br>'; echo "</th></tr></table>"; } } // Extended Customer Info only if selected in Configuration - if ($_SESSION['Extended_CustomerInfo']==1){ - if ($_SESSION['CustomerID']!=""){ + if ($_SESSION['Extended_CustomerInfo'] == 1) { + if ($_SESSION['CustomerID'] != "") { $sql = "SELECT debtortype.typeid, debtortype.typename - FROM debtorsmaster, debtortype + FROM debtorsmaster, debtortype WHERE debtorsmaster.typeid = debtortype.typeid - AND debtorsmaster.debtorno = '" . $_SESSION['CustomerID'] . "' - "; + AND debtorsmaster.debtorno = '" . $_SESSION['CustomerID'] . "'"; $ErrMsg = _('An error occurred in retrieving the information'); $result = DB_query($sql, $db, $ErrMsg); $myrow = DB_fetch_array($result); @@ -636,187 +502,150 @@ (TO_DAYS(date(now())) - TO_DAYS(date(debtorsmaster.clientsince))) as customersincedays, (TO_DAYS(date(now())) - TO_DAYS(date(debtorsmaster.lastpaiddate))) as lastpaiddays, debtorsmaster.paymentterms, debtorsmaster.lastpaid, debtorsmaster.lastpaiddate - FROM debtorsmaster - WHERE debtorsmaster.debtorno ='" . $_SESSION['CustomerID'] . "'"; - $DataResult = DB_query($SQL,$db); - $myrow = DB_fetch_array($DataResult); + FROM debtorsmaster + WHERE debtorsmaster.debtorno ='" . $_SESSION['CustomerID'] . "'"; + $DataResult = DB_query($SQL, $db); + $myrow = DB_fetch_array($DataResult); // Select some more data about the customer $SQL = "select sum(ovamount+ovgst) as total from debtortrans where debtorno = '" . $_SESSION['CustomerID'] . "' and type !=12"; - $Total1Result = DB_query($SQL,$db); - $row = DB_fetch_array($Total1Result); + $Total1Result = DB_query($SQL, $db); + $row = DB_fetch_array($Total1Result); echo '<tr><td colspan=2>'; - echo '<table WIDTH=45% colspan=2 BORDER=2 cellpadding=4>'; - echo "<tr><th WIDTH=33%>" . _('Customer Data') . "</th></tr>"; - echo '<tr><td VALIGN=TOp>'; /* Customer Data */ + echo '<table width=45% colspan=2 cellpadding=4>'; + echo "<tr><th width=33% colspan=3>" . _('Customer Data') . "</th></tr>"; + echo '<tr><td valign=top class=select>'; /* Customer Data */ //echo _('Distance to this customer:') . '<b>TBA</b><br>'; - if ($myrow['lastpaiddate'] ==0) { - echo _('Never paid from this customer.') . '<br>'; + if ($myrow['lastpaiddate'] == 0) { + echo _('No receipts from this customer.') . '</td><td class=select></td><td class=select></td></tr>'; } else { - echo _('Last Paid Date:') . ' <b>' . ConvertSQLDate($myrow['lastpaiddate']) . '</b> ' . $myrow['lastpaiddays'] . ' ' . _('days') . '<br>'; + echo _('Last Paid Date:') . '</td><td class=select> <b>' . ConvertSQLDate($myrow['lastpaiddate']) . '</b> </td><td class=select>' . $myrow['lastpaiddays'] . ' ' . _('days') . '</td></tr>'; } - echo _('Last Paid Amount (inc tax):') . ' <b>' . number_format($myrow['lastpaid'],2) . '</b><br>'; - echo _('Customer since:') . ' <b>' . ConvertSQLDate($myrow['clientsince']) . '</b> ' . $myrow['customersincedays'] . ' ' . _('days') . '<br>'; - if ($row['total'] ==0) { - echo _('No Spend from this Customer.') . '</b><br>'; + echo '<tr><td class=select>' . _('Last Paid Amount (inc tax):') . '</td><td class=select> <b>' . number_format($myrow['lastpaid'], 2) . '</b></td><td class=select></td></tr>'; + echo '<tr><td class=select>' . _('Customer since:') . '</td><td class=select> <b>' . ConvertSQLDate($myrow['clientsince']) . '</b> </td><td class=select>' . $myrow['customersincedays'] . ' ' . _('days') . '</td></tr>'; + if ($row['total'] == 0) { + echo '<tr><td class=select>' . _('No Spend from this Customer.') . '</b></td><td class=select></td><td class=select></td></tr>'; } else { - echo _('Total Spend from this Customer (inc tax):') . ' <b>' . number_format($row['total'],2) . '</b><br>'; + echo '<tr><td class=select>' . _('Total Spend from this Customer (inc tax):') . ' </td><td class=select><b>' . number_format($row['total'], 2) . '</b></td><td class=select></td></tr>'; } - echo _('Customer Type:') . ' <b>' . $CustomerTypeName . '</b><br>'; + echo '<tr><td class=select>' . _('Customer Type:') . ' </td><td class=select><b>' . $CustomerTypeName . '</b></td><td class=select></td></tr>>'; echo '</th></tr></table>'; } // Customer Contacts echo '<tr><td colspan=2>'; - $sql = 'SELECT * FROM custcontacts where debtorno="' . $_SESSION['CustomerID'] . '" ORDER BY contid'; - $result = DB_query($sql,$db); - if (DB_num_rows($result)<>0){ - echo '<br><div class="centre"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . _('Customer Contacts') . '" alt="">' . ' ' . _('Customer Contacts') . '</div><br>'; - echo '<table border=1 width=45%>'; + $sql = 'SELECT * FROM custcontacts where debtorno="' . $_SESSION['CustomerID'] . '" ORDER BY contid'; + $result = DB_query($sql, $db); + if (DB_num_rows($result) <> 0) { + echo '<table width=45%>'; + echo '<br><th colspan=7><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="">' . ' ' . _('Customer Contacts') . '</th>'; echo '<tr> - <th>' . _('Name') . '</th> - <th>' . _('Role') . '</th> - <th>' . _('Phone Number') . '</th> - <th>' . _('Notes') . '</th> - <th>' . _('Edit') . '</th> - <th>' . _('Delete') . '</th> + <th>' . _('Name') . '</th> + <th>' . _('Role') . '</th> + <th>' . _('Phone Number') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Edit') . '</th> + <th>' . _('Delete') . '</th> <th> <a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add New Contact') . '</a> </th></tr>'; - $k=0; //row colour counter - while ($myrow = DB_fetch_array($result)) { - if ($k==1){ + $k = 0; //row colour counter + while ($myrow = DB_fetch_array($result)) { + if ($k == 1) { echo '<tr class="OddTableRows">'; - $k=0; + $k = 0; } else { echo '<tr class="EvenTableRows">'; - $k=1; + $k = 1; } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="AddCustomerContacts.php?Id=%s&DebtorNo=%s">'. _('Edit'). '</a></td> - <td><a href="AddCustomerContacts.php?Id=%s&DebtorNo=%s&delete=1">'. _('Delete'). '</a></td> - </tr>', - $myrow[2], - $myrow[3], - $myrow[4], - $myrow[5], - $myrow[0], - $myrow[1], - $myrow[0], - $myrow[1], - $myrow[1]); - - }//END WHILE LIST LOOP + echo '<td>' . $myrow[2] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $myrow[4] . '</td> + <td>' . $myrow[5] . '</td> + <td><a href="AddCustomerContacts.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '">' . _('Edit') . '</a></td> + <td><a href="AddCustomerContacts.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td> + </tr>'; + } //END WHILE LIST LOOP echo '</table>'; } else { - if ($_SESSION['CustomerID']!=""){ - echo '<br><div class="centre"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; + if ($_SESSION['CustomerID'] != "") { + echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; } } // Customer Notes echo '<tr><td colspan=2>'; - $sql = 'SELECT * FROM custnotes where debtorno="' . $_SESSION['CustomerID'] . '" ORDER BY date DESC'; - $result = DB_query($sql,$db); - if (DB_num_rows($result)<>0){ - echo '<br><div class="centre"><img src="'.$rootpath.'/css/'.$theme.'/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br>'; - echo '<table border=1 width=45%>'; - echo '<tr> - <th>' . _('date') . '</th> - <th>' . _('note') . '</th> - <th>' . _('hyperlink') . '</th> - <th>' . _('priority') . '</th> - <th>' . _('Edit') . '</th> - <th>' . _('Delete') . '</th> - <th> <a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note') . '</a> </th></tr>'; - $k=0; //row colour counter - while ($myrow = DB_fetch_array($result)) { - if ($k==1){ - echo '<tr class="OddTableRows">'; - $k=0; - } else { - echo '<tr class="EvenTableRows">'; - $k=1; - } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="AddCustomerNotes.php?Id=%s&DebtorNo=%s">'. _('Edit'). '</a></td> - <td><a href="AddCustomerNotes.php?Id=%s&DebtorNo=%s&delete=1">'. _('Delete'). '</a></td> - </tr>', - $myrow[4], - $myrow[3], - $myrow[2], - $myrow[5], - $myrow[0], - $myrow[1], - $myrow[0], - $myrow[1], - $myrow[1]); - }//END WHILE LIST LOOP - echo '</table>'; + $sql = 'SELECT * FROM custnotes where debtorno="' . $_SESSION['CustomerID'] . '" ORDER BY date DESC'; + $result = DB_query($sql, $db); + if (DB_num_rows($result) <> 0) { + echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br>'; + echo '<table width=45%>'; + echo '<tr> + <th>' . _('date') . '</th> + <th>' . _('note') . '</th> + <th>' . _('hyperlink') . '</th> + <th>' . _('priority') . '</th> + <th>' . _('Edit') . '</th> + <th>' . _('Delete') . '</th> + <th> <a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note') . '</a> </th></tr>'; + $k = 0; //row colour counter + while ($myrow = DB_fetch_array($result)) { + if ($k == 1) { + echo '<tr class="OddTableRows">'; + $k = 0; + } else { + echo '<tr class="EvenTableRows">'; + $k = 1; + } + echo '<td>' . $myrow[4] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[5] . '</td> + <td><a href="AddCustomerNotes.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '">' . _('Edit') . '</a></td> + <td><a href="AddCustomerNotes.php?Id=' . $myrow[0] . '&DebtorNo=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td> + </tr>'; + } //END WHILE LIST LOOP + echo '</table>'; } else { - if ($_SESSION['CustomerID']!=""){ - echo '<br><div class="centre"><img src="'.$rootpath.'/css/'.$theme.'/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; + if ($_SESSION['CustomerID'] != "") { + echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; } } // Custome Type Notes echo '<tr><td colspan=2>'; - $sql = 'SELECT * FROM debtortypenotes where typeid="' . $CustomerType . '" ORDER BY date DESC'; - $result = DB_query($sql,$db); - if (DB_num_rows($result)<>0){ - echo '<br><div class="centre"><img src="'.$rootpath.'/css/'.$theme.'/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br>'; - echo '<table border=1 width=45%>'; - echo '<tr> - <th>' . _('date') . '</th> - <th>' . _('note') . '</th> - <th>' . _('file link / reference / URL') . '</th> - <th>' . _('priority') . '</th> - <th>' . _('Edit') . '</th> - <th>' . _('Delete') . '</th> - <th><a href="AddCustomerTypeNotes.php?DebtorType=' . $CustomerType . '">' . _('Add New Group Note') . '</a></th></tr>'; - $k=0; //row colour counter - while ($myrow = DB_fetch_array($result)) { - if ($k==1){ + $sql = 'SELECT * FROM debtortypenotes where typeid="' . $CustomerType . '" ORDER BY date DESC'; + $result = DB_query($sql, $db); + if (DB_num_rows($result) <> 0) { + echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br>'; + echo '<table width=45%>'; + echo '<tr> + <th>' . _('date') . '</th> + <th>' . _('note') . '</th> + <th>' . _('file link / reference / URL') . '</th> + <th>' . _('priority') . '</th> + <th>' . _('Edit') . '</th> + <th>' . _('Delete') . '</th> + <th><a href="AddCustomerTypeNotes.php?DebtorType=' . $CustomerType . '">' . _('Add New Group Note') . '</a></th></tr>'; + $k = 0; //row colour counter + while ($myrow = DB_fetch_array($result)) { + if ($k == 1) { echo '<tr class="OddTableRows">'; - $k=0; - } else { + $k = 0; + } else { echo '<tr class="EvenTableRows">'; - $k=1; - } - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="AddCustomerTypeNotes.php?Id=%s&DebtorType=%s">'. _('Edit'). '</a></td> - <td><a href="AddCustomerTypeNotes.php?Id=%s&DebtorType=%s&delete=1">'. _('Delete'). '</a></td> - </tr>', - $myrow[4], - $myrow[3], - $myrow[2], - $myrow[5], - $myrow[0], - $myrow[1], - $myrow[0], - $myrow[1], - $myrow[1]); - - }//END WHILE LIST LOOP - echo '</table>'; + $k = 1; + } + echo '<td>' . $myrow[4] . '</td> + <td>' . $myrow[3] . '</td> + <td>' . $myrow[2] . '</td> + <td>' . $myrow[5] . '</td> + <td><a href="AddCustomerTypeNotes.php?Id=' . $myrow[0] . '&DebtorType=' . $myrow[1] . '">' . _('Edit') . '</a></td> + <td><a href="AddCustomerTypeNotes.php?Id=' . $myrow[0] . '&DebtorType=' . $myrow[1] . '&delete=1">' . _('Delete') . '</a></td> + </tr>'; + } //END WHILE LIST LOOP + echo '</table>'; } else { - if ($_SESSION['CustomerID']!=""){ - echo '<br><div class="centre"><img src="'.$rootpath.'/css/'.$theme.'/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br>'; + if ($_SESSION['CustomerID'] != "") { + echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br>'; } } } } - -include('includes/footer.inc'); -?> -<script language="JavaScript" type="text/javascript"> - //<![CDATA[ - <!-- - document.forms[0].CustCode.select(); - document.forms[0].CustCode.focus(); - //--> - //]]> -</script> +echo "<script>defaultControl(document.forms[0].CustCode);</script>"; +include ('includes/footer.inc'); +?> \ No newline at end of file Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2010-03-13 16:22:42 UTC (rev 3384) +++ trunk/SelectProduct.php 2010-03-15 19:42:18 UTC (rev 3385) @@ -1,471 +1,122 @@ <?php /* $Id$*/ - $PageSecurity = 2; $PricesSecurity = 9; - -include('includes/session.inc'); - +include ('includes/session.inc'); $title = _('Search Inventory Items'); - -include('includes/header.inc'); - +include ('includes/header.inc'); $msg = ''; - if (isset($_GET['StockID'])) { - //The page is called with a StockID - $_GET['StockID'] = trim(strtoupper($_GET['StockID'])); - $_POST['Select'] = trim(strtoupper($_GET['StockID'])); + //The page is called with a StockID + $_GET['StockID'] = trim(strtoupper($_GET['StockID'])); + $_POST['Select'] = trim(strtoupper($_GET['StockID'])); } - +echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Inventory Items') . '" alt="">' . ' ' . _('Inventory Items') . ''; if (isset($_GET['NewSearch'])) { - unset($StockID); - unset($_SESSION['SelectedStockItem']); - unset($_POST['Select']); + unset($StockID); + unset($_SESSION['SelectedStockItem']); + unset($_POST['Select']); } - if (!isset($_POST['PageOffset'])) { - $_POST['PageOffset'] = 1; + $_POST['PageOffset'] = 1; } else { - if ($_POST['PageOffset'] == 0) { - $_POST['PageOffset'] = 1; - } + if ($_POST['PageOffset'] == 0) { + $_POST['PageOffset'] = 1; + } } - if (isset($_POST['StockCode'])) { - $_POST['StockCode'] = trim(strtoupper($_POST['StockCode'])); + $_POST['StockCode'] = trim(strtoupper($_POST['StockCode'])); } - // Always show the search facilities - -$SQL='SELECT categoryid, - categorydescription - FROM stockcategory - ORDER BY categorydescription'; - -$result1 = DB_query($SQL,$db); +$SQL = 'SELECT categoryid, + categorydescription + FROM stockcategory + ORDER BY categorydescription'; +$result1 = DB_query($SQL, $db); if (DB_num_rows($result1) == 0) { - echo '<p><font size=4 color=red>' . _('Problem Report') . ':</font><br>' . _('There are no stock categories currently defined please use the link below to set them up'); - echo '<br><a href="' . $rootpath . '/StockCategories.php?' . SID .'">' . _('Define Stock Categories') . '</a>'; - exit; + echo '<p><font size=4 color=red>' . _('Problem Report') . ':</font><br>' . _('There are no stock categories currently defined please use the link below to set them up'); + echo '<br><a href="' . $rootpath . '/StockCategories.php?' . SID . '">' . _('Define Stock Categories') . '</a>'; + exit; } - -echo '<form action="'. $_SERVER['PHP_SELF'] . '?' . SID .'" method=post>'; -echo '<b>' . $msg . '</b>'; -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . _('Search for Inventory Items'); -echo '<table><tr>'; -echo '<td>'. _('In Stock Category') . ':'; -echo '<select name="StockCat">'; - -if (!isset($_POST['StockCat'])) { - $_POST['StockCat'] = ""; -} - -if ($_POST['StockCat'] == "All") { - echo '<option selected value="All">' . _('All'); -} else { - echo '<option value="All">' . _('All'); -} - -while ($myrow1 = DB_fetch_array($result1)) { - if ($myrow1['categoryid'] == $_POST['StockCat']) { - echo '<option selected VALUE="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription']; - } else { - echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescript... [truncated message content] |
From: <tim...@us...> - 2010-03-16 08:23:42
|
Revision: 3386 http://web-erp.svn.sourceforge.net/web-erp/?rev=3386&view=rev Author: tim_schofield Date: 2010-03-16 08:23:36 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Tim: PO_SelecOSPurchOrder.php - Change option from Printed to Print in case where order is not yet printed Modified Paths: -------------- trunk/PO_SelectOSPurchOrder.php trunk/doc/Change.log.html Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2010-03-15 19:42:18 UTC (rev 3385) +++ trunk/PO_SelectOSPurchOrder.php 2010-03-16 08:23:36 UTC (rev 3386) @@ -65,57 +65,57 @@ //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - SUM(locstock.quantity) AS qoh, - stockmaster.units, - SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS qord - FROM stockmaster INNER JOIN locstock - ON stockmaster.stockid = locstock.stockid - INNER JOIN purchorderdetails - ON stockmaster.stockid=purchorderdetails.itemcode + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS qord + FROM stockmaster INNER JOIN locstock + ON stockmaster.stockid = locstock.stockid + INNER JOIN purchorderdetails + ON stockmaster.stockid=purchorderdetails.itemcode WHERE $completed - AND stockmaster.description " . LIKE . " '$SearchString' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units + AND stockmaster.description " . LIKE . " '$SearchString' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units ORDER BY stockmaster.stockid"; - - + + } elseif ($_POST['StockCode']){ - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - SUM(locstock.quantity) AS qoh, - SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS qord, - stockmaster.units - FROM stockmaster INNER JOIN locstock - ON stockmaster.stockid = locstock.stockid - INNER JOIN purchorderdetails - ON stockmaster.stockid=purchorderdetails.itemcode + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + SUM(locstock.quantity) AS qoh, + SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS qord, + stockmaster.units + FROM stockmaster INNER JOIN locstock + ON stockmaster.stockid = locstock.stockid + INNER JOIN purchorderdetails + ON stockmaster.stockid=purchorderdetails.itemcode WHERE $completed - AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units + AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units ORDER BY stockmaster.stockid"; - + } elseif (!$_POST['StockCode'] AND !$_POST['Keywords']) { - $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - SUM(locstock.quantity) AS qoh, - stockmaster.units, - SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS qord - FROM stockmaster INNER JOIN locstock - ON stockmaster.stockid = locstock.stockid - INNER JOIN purchorderdetails - ON stockmaster.stockid=purchorderdetails.itemcode - WHERE $completed - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS qord + FROM stockmaster INNER JOIN locstock + ON stockmaster.stockid = locstock.stockid + INNER JOIN purchorderdetails + ON stockmaster.stockid=purchorderdetails.itemcode + WHERE $completed + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units ORDER BY stockmaster.stockid"; } @@ -268,11 +268,11 @@ /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ if (isset($SelectedSupplier)) { - + if (!isset($_POST['StockLocation'])) { $_POST['StockLocation']=''; } - + if (isset($SelectedStockItem)) { $SQL = "SELECT purchorders.realorderno, purchorders.orderno, @@ -405,7 +405,7 @@ '</th><th>' . _('Order Date') . '</th><th>' . _('Initiated by') . '</th><th>' . _('Supplier') . - '</th><th>' . _('Currency') . + '</th><th>' . _('Currency') . '</th><th>' . _('Order Total') . '</th><th>' . _('Status') . '</th><th>' . _('Modify') . @@ -444,7 +444,7 @@ if ($myrow['status'] == PurchOrder::STATUS_AUTHORISED) { $PrintPurchOrder = ' <a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?' . SID . '&OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2"> - ' . _(PurchOrder::STATUS_PRINTED) . ' + ' . _('Print') . ' </a>'; } else { $PrintPurchOrder = _(PurchOrder::STATUS_PRINTED); @@ -461,10 +461,10 @@ // the tailed two column // <td>%s</font></td> // <td class=number>%s</font></td> -// $myrow['requisitionno'], +// $myrow['requisitionno'], // $myrow['initiator']); // '</td><td class="tableheader">' . _('Requisition') . -// '</td><td class="tableheader">' . _('Initiator') . +// '</td><td class="tableheader">' . _('Initiator') . // <td><a href='%s'>" . _('Receive') . "</a></td> printf("<td>%s</font></td> <td>%s</td> @@ -477,12 +477,12 @@ <td>%s</font></td> <td>%s</font></td> </tr>", - $myrow["orderno"], - $FormatedOrderDate, + $myrow["orderno"], + $FormatedOrderDate, $myrow['initiator'], $myrow['suppname'], $myrow['currcode'], - $FormatedOrderValue, + $FormatedOrderValue, _($myrow['status']), $ModifyPage, $PrintPurchOrder, Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-15 19:42:18 UTC (rev 3385) +++ trunk/doc/Change.log.html 2010-03-16 08:23:36 UTC (rev 3386) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>16/03/10 Tim: PO_SelecOSPurchOrder.php - Change option from Printed to Print in case where order is not yet printed</p> <p>15/03/10 Tim: Layout changes to make SelectCustomer.php SelectProduct.php and SelectSupplier.php have a similar look and feel to them</p> <p>14/03/10 Tim: Various layout improvements</p> <p>13/03/10 Tim: report_runner.php - Remove deprecated split() function</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-16 08:37:13
|
Revision: 3387 http://web-erp.svn.sourceforge.net/web-erp/?rev=3387&view=rev Author: tim_schofield Date: 2010-03-16 08:37:07 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Tim: PO_SelecOSPurchOrder.php - Correctly position link to create a new order Modified Paths: -------------- trunk/PO_SelectOSPurchOrder.php trunk/doc/Change.log.html Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2010-03-16 08:23:36 UTC (rev 3386) +++ trunk/PO_SelectOSPurchOrder.php 2010-03-16 08:37:07 UTC (rev 3387) @@ -35,7 +35,7 @@ if (isset($_POST['ResetPart'])){ - unset($SelectedStockItem); + unset($SelectedStockItem); } if (isset($OrderNumber) && $OrderNumber!='') { @@ -130,10 +130,10 @@ */ if (!isset($OrderNumber) or $OrderNumber=='' ){ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title; - echo '<br><br> <a href="' . $rootpath . '/PO_Header.php?' .SID . '&NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; - echo '<div class="centre">'._('Order Number') . ': <input type=text name="OrderNumber" MAXLENGTH =8 size=9> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; - $sql = 'SELECT loccode, locationname FROM locations'; + echo '<a href="' . $rootpath . '/PO_Header.php?' .SID . '&NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'</p>'; + echo '<div class="centre">'._('Order Number') . ': <input type=text name="OrderNumber" MAXLENGTH =8 size=9> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; + $sql = 'SELECT loccode, locationname FROM locations'; $resultStkLocs = DB_query($sql,$db); while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation'])){ @@ -211,7 +211,7 @@ } printf("<td><input type=submit name='SelectedStockItem' VALUE='%s'</td> - <td>%s</td> + <td>%s</td> <td class=number>%s</td> <td class=number>%s</td> <td>%s</td></tr>", @@ -265,7 +265,7 @@ suppliers.currcode'; } else { - /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ + /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ if (isset($SelectedSupplier)) { @@ -400,7 +400,7 @@ echo '<table cellpadding=2 colspan=7 WIDTH=100%>'; -// '</td><td class="tableheader">' . _('Receive') . +// '</td><td class="tableheader">' . _('Receive') . $TableHeader = '<tr><th>' . _('Order #') . '</th><th>' . _('Order Date') . '</th><th>' . _('Initiated by') . @@ -443,16 +443,16 @@ } if ($myrow['status'] == PurchOrder::STATUS_AUTHORISED) { $PrintPurchOrder = ' - <a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?' . SID . '&OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2"> - ' . _('Print') . ' - </a>'; + <a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?' . SID . '&OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=2"> + ' . _('Print') . ' + </a>'; } else { $PrintPurchOrder = _(PurchOrder::STATUS_PRINTED); } $PrintPurchOrder2 = ' - <a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?' . SID . '&OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=1"> - ' . _('Show') . ' - </a>'; + <a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?' . SID . '&OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=1"> + ' . _('Show') . ' + </a>'; $s2 = '<a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?' . SID . '&OrderNo=' . $myrow['orderno'] . '&realorderno=' . $myrow['realorderno'] . '&ViewingOnly=1">' . $myrow['realorderno']. '</a>'; $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); @@ -465,7 +465,7 @@ // $myrow['initiator']); // '</td><td class="tableheader">' . _('Requisition') . // '</td><td class="tableheader">' . _('Initiator') . -// <td><a href='%s'>" . _('Receive') . "</a></td> +// <td><a href='%s'>" . _('Receive') . "</a></td> printf("<td>%s</font></td> <td>%s</td> <td>%s</td> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-16 08:23:36 UTC (rev 3386) +++ trunk/doc/Change.log.html 2010-03-16 08:37:07 UTC (rev 3387) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>16/03/10 Tim: PO_SelecOSPurchOrder.php - Correctly position link to create a new order</p> <p>16/03/10 Tim: PO_SelecOSPurchOrder.php - Change option from Printed to Print in case where order is not yet printed</p> <p>15/03/10 Tim: Layout changes to make SelectCustomer.php SelectProduct.php and SelectSupplier.php have a similar look and feel to them</p> <p>14/03/10 Tim: Various layout improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2010-03-16 09:17:43
|
Revision: 3388 http://web-erp.svn.sourceforge.net/web-erp/?rev=3388&view=rev Author: daintree Date: 2010-03-16 09:17:37 +0000 (Tue, 16 Mar 2010) Log Message: ----------- mods to requirements in install.txt and upgrading.txt also format of romalpa clause on portrait invoices Modified Paths: -------------- trunk/PrintCustTransPortrait.php trunk/companies/weberpdemo/FormDesigns/SalesInvoice.xml trunk/doc/INSTALL.txt trunk/doc/UPGRADING.txt Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2010-03-16 08:37:07 UTC (rev 3387) +++ trunk/PrintCustTransPortrait.php 2010-03-16 09:17:37 UTC (rev 3388) @@ -466,11 +466,11 @@ if ($InvOrCredit=='Invoice'){ $pdf->addText($Page_Width-$Right_Margin-220, $YPos - ($line_height*3)-6,$FontSize, _('TOTAL INVOICE')); $FontSize=8; - $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos-48,280,$FontSize,$_SESSION['RomalpaClause']); -// while (strlen($LeftOvers)>0 AND $YPos > $Bottom_Margin){ -// $YPos -=25; - $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos-58,280,$FontSize,$LeftOvers); -// } + $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos-18,280,$FontSize,$_SESSION['RomalpaClause']); + while (strlen($LeftOvers)>0 AND $YPos > $Bottom_Margin){ + $YPos -=10; + $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos-18,280,$FontSize,$LeftOvers); + } /* Add Images for Visa / Mastercard / Paypal */ if (file_exists('companies/' . $_SESSION['DatabaseName'] . '/payment.jpg')) { $pdf->addJpegFromFile('companies/' . $_SESSION['DatabaseName'] . '/payment.jpg',$Page_Width/2 -60,$YPos-15,0,20); Modified: trunk/companies/weberpdemo/FormDesigns/SalesInvoice.xml =================================================================== --- trunk/companies/weberpdemo/FormDesigns/SalesInvoice.xml 2010-03-16 08:37:07 UTC (rev 3387) +++ trunk/companies/weberpdemo/FormDesigns/SalesInvoice.xml 2010-03-16 09:17:37 UTC (rev 3388) @@ -479,7 +479,7 @@ </TotalLine> <RomalpaLine type="Line" name="Romalpa Line" id="RomalpaLine"> <startx>590</startx> - <starty>501</starty> + <starty>490</starty> <endx>590</endx> <endy>565</endy> </RomalpaLine> Modified: trunk/doc/INSTALL.txt =================================================================== --- trunk/doc/INSTALL.txt 2010-03-16 08:37:07 UTC (rev 3387) +++ trunk/doc/INSTALL.txt 2010-03-16 09:17:37 UTC (rev 3388) @@ -32,10 +32,10 @@ Pre-requisites: -- A working PHP web server - v 5.0 or later is recommended but it also works with later 4.x releases - with support for mysql databases, gd, gettext and ftp +- A working PHP web server - v 5.0 or later is required (it no longer works with versions prior) PHP must have support for mysql databases (either mysql or mysqli), gd, gettext and ftp - A working MySQL server (MySql version 4.1 or above - innodb tables MUST be enabled - check your my.cnf file to ensure innodb tables are enabled (normally under /etc/my.cnf or the mysql data directory - see the MySQL manual). -Installing these components are well covered elsewhere - but if you need to install these components the recommended solution under windows would be to download and install apache2triad - http://apache2triad.net/ or under windows or *nix download and install XAMP - http://www.apachefriends.org/en/xampp.html +Installing these components are well covered elsewhere - but if you need to install these components the recommended solution under windows would be to download and install apache2triad - http://apache2triad.net/ or under windows or *nix download and install XAMPP - http://www.apachefriends.org/en/xampp.html PHP must have the register globals configuration parameter set to off. This is the default (now). This flag can be set in the php.ini on the server. If it can't be changed on the server's php.ini, it is possibe for apache web servers to alter the configuration using a file called .htaccess. A .htaccess file is included in the webERP directory that ensures the register_globals flag is set to off for those web-servers that support .htaccess files. Modified: trunk/doc/UPGRADING.txt =================================================================== --- trunk/doc/UPGRADING.txt 2010-03-16 08:37:07 UTC (rev 3387) +++ trunk/doc/UPGRADING.txt 2010-03-16 09:17:37 UTC (rev 3388) @@ -69,4 +69,8 @@ NOTES ON UPGRADING FROM 3.04 to 3.05 3.05 now has Dave Premo's report writer scripts included in the distribution - additional tables are required for this functionality. Also, 3.05 allows for weighted average stock valuation - using the existing data fields and retaining integrated general ledger stock values. This requires cost information to be copied over into the grns table. -The upgrade script Z_Upgrade_3.04-3.05.php applies all the additional tables to the database and does the data conversions required wihtout any manual intervention. \ No newline at end of file +The upgrade script Z_Upgrade_3.04-3.05.php applies all the additional tables to the database and does the data conversions required wihtout any manual intervention. + +NOTES ON UPGRADING FROM 3.11 to 3.12 + +PHP 5 is now required because of the simpleXML module of PHP only comes with PHP 5. This is used on the new XML definition of report formats. \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2010-03-16 09:35:58
|
Revision: 3389 http://web-erp.svn.sourceforge.net/web-erp/?rev=3389&view=rev Author: tim_schofield Date: 2010-03-16 09:35:52 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Anand: DateFunctions.inc - When getting the period number compare the same date formats Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/DateFunctions.inc Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-03-16 09:17:37 UTC (rev 3388) +++ trunk/doc/Change.log.html 2010-03-16 09:35:52 UTC (rev 3389) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>16/03/10 Anand: DateFunctions.inc - When getting the period number compare the same date formats</p> <p>16/03/10 Tim: PO_SelecOSPurchOrder.php - Correctly position link to create a new order</p> <p>16/03/10 Tim: PO_SelecOSPurchOrder.php - Change option from Printed to Print in case where order is not yet printed</p> <p>15/03/10 Tim: Layout changes to make SelectCustomer.php SelectProduct.php and SelectSupplier.php have a similar look and feel to them</p> Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2010-03-16 09:17:37 UTC (rev 3388) +++ trunk/includes/DateFunctions.inc 2010-03-16 09:35:52 UTC (rev 3389) @@ -426,7 +426,7 @@ function FormatDateWithTimeForSQL ($datetime) { // Split the time off, fix date and add the time to returned value. $dt = explode(' ', $datetime); - + return FormatDateForSQL( $dt[0] ) . ' ' . $dt[1]; } @@ -844,7 +844,7 @@ $MonthAfterTransDate = Mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)); $GetPrdSQL = "SELECT periodno FROM periods WHERE lastdate_in_period < '" . - Date('Y/m/d', $MonthAfterTransDate) . "' AND lastdate_in_period >= '" . Date('Y/m/d', $TransDate) . "'"; + Date('Y-m-d', $MonthAfterTransDate) . "' AND lastdate_in_period >= '" . Date('Y-m-d', $TransDate) . "'"; $ErrMsg = _('An error occurred in retrieving the period number'); $GetPrdResult = DB_query($GetPrdSQL,$db,$ErrMsg); @@ -853,5 +853,4 @@ return $myrow[0]; } - ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |