|
From: <dai...@us...> - 2011-10-05 07:26:15
|
Revision: 4712
http://web-erp.svn.sourceforge.net/web-erp/?rev=4712&view=rev
Author: daintree
Date: 2011-10-05 07:26:06 +0000 (Wed, 05 Oct 2011)
Log Message:
-----------
number_formats
Modified Paths:
--------------
trunk/PDFBankingSummary.php
trunk/PDFChequeListing.php
trunk/PDFCustTransListing.php
trunk/PDFCustomerList.php
trunk/PDFDeliveryDifferences.php
trunk/PDFGrn.php
trunk/PDFLowGP.php
trunk/PDFOrderStatus.php
trunk/PDFOrdersInvoiced.php
trunk/PDFPeriodStockTransListing.php
trunk/PDFPickingList.php
trunk/PDFPriceList.php
trunk/PDFPrintLabel.php
trunk/PDFQuotation.php
trunk/PDFQuotationPortrait.php
trunk/PDFReceipt.php
trunk/PDFRemittanceAdvice.php
trunk/PDFStockCheckComparison.php
trunk/PDFStockLocTransfer.php
trunk/PDFStockNegatives.php
trunk/PDFStockTransfer.php
trunk/PDFSuppTransListing.php
trunk/PDFTopItems.php
trunk/POReport.php
trunk/PO_Header.php
trunk/PO_SelectOSPurchOrder.php
trunk/PO_SelectPurchOrder.php
trunk/PageSecurity.php
trunk/PaymentAllocations.php
trunk/PaymentTerms.php
trunk/PcAssignCashToTab.php
trunk/PcAuthorizeExpenses.php
trunk/PcClaimExpensesFromTab.php
trunk/PcTabs.php
trunk/Prices.php
trunk/TopItems.php
trunk/doc/INSTALL.txt
trunk/doc/Manual/ManualCreatingNewSystem.html
trunk/doc/Manual/ManualIntroduction.html
trunk/includes/GetConfig.php
Modified: trunk/PDFBankingSummary.php
===================================================================
--- trunk/PDFBankingSummary.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFBankingSummary.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -32,8 +32,14 @@
while ($myrow=DB_fetch_array($result)) {
echo '<option value="'.$myrow['transno'].'">'._('Batch') .' '. $myrow['transno'].' - '.ConvertSqlDate($myrow['transdate']).'</option>';
}
- echo '</select></td></tr></table>';
- echo '<br /><div class="centre"><input type="submit" name="EnterBatchNo" value="' . _('Create PDF') . '"></div></form>';
+ echo '</select></td>
+ </tr>
+ </table>';
+ echo '<br />
+ <div class="centre">
+ <input type="submit" name="EnterBatchNo" value="' . _('Create PDF') . '">
+ </div>
+ </form>';
include ('includes/footer.inc');
exit;
@@ -41,21 +47,21 @@
if (isset($_POST['BatchNo']) and $_POST['BatchNo']!='') {
$SQL= "SELECT bankaccountname,
- bankaccountnumber,
- ref,
- transdate,
- banktranstype,
- bankact,
- banktrans.exrate,
- banktrans.functionalexrate,
- banktrans.currcode,
- currencies.decimalplaces AS currdecimalplaces
- FROM bankaccounts INNER JOIN banktrans
- ON bankaccounts.accountcode=banktrans.bankact
- INNER JOIN currencies
- ON bankaccounts.currcode=currencies.currabrev
- WHERE banktrans.transno='" . $_POST['BatchNo'] . "'
- AND banktrans.type=12";
+ bankaccountnumber,
+ ref,
+ transdate,
+ banktranstype,
+ bankact,
+ banktrans.exrate,
+ banktrans.functionalexrate,
+ banktrans.currcode,
+ currencies.decimalplaces AS currdecimalplaces
+ FROM bankaccounts INNER JOIN banktrans
+ ON bankaccounts.accountcode=banktrans.bankact
+ INNER JOIN currencies
+ ON bankaccounts.currcode=currencies.currabrev
+ WHERE banktrans.transno='" . $_POST['BatchNo'] . "'
+ AND banktrans.type=12";
$ErrMsg = _('An error occurred getting the header information about the receipt batch number') . ' ' . $_POST['BatchNo'];
$DbgMsg = _('The SQL used to get the receipt header information that failed was');
Modified: trunk/PDFChequeListing.php
===================================================================
--- trunk/PDFChequeListing.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFChequeListing.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -26,17 +26,17 @@
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' .
$title . '" alt="" />' . ' ' . $title . '</p>';
- if ($InputError==1){
- prnMsg($msg,'error');
- }
+ if ($InputError==1){
+ prnMsg($msg,'error');
+ }
echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<table class=selection>
- <tr>
+ echo '<table class="selection">
+ <tr>
<td>' . _('Enter the date from which cheques are to be listed') . ':</td>
- <td><input type="text" name="FromDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td>
+ <td><input type="text" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
</tr>';
echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ':</td>
<td><input type="text" name="ToDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td>
@@ -56,14 +56,18 @@
echo '</select></td></tr>';
- echo '<tr><td>' . _('Email the report off') . ':</td>
- <td><select name="Email">';
- echo '<option selected value="No">' . _('No') . '</option>';
- echo '<option value="Yes">' . _('Yes') . '</option>';
- echo '</select></td>
+ echo '<tr>
+ <td>' . _('Email the report off') . ':</td>
+ <td><select name="Email">
+ <option selected value="No">' . _('No') . '</option>
+ <option value="Yes">' . _('Yes') . '</option>
+ </select></td>
</tr>
</table>
- <br /><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>';
+ <br />
+ <div class="centre">
+ <input type=submit name="Go" value="' . _('Create PDF') . '">
+ </div>';
include('includes/footer.inc');
exit;
Modified: trunk/PDFCustTransListing.php
===================================================================
--- trunk/PDFCustTransListing.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFCustTransListing.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -17,8 +17,10 @@
$title = _('Customer Transaction Listing');
include ('includes/header.inc');
- echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' '
- . _('Customer Transaction Listing').'</p>';
+ echo '<div class="centre">
+ <p class="page_title_text">
+ <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' ' . _('Customer Transaction Listing').
+ '</p>';
if ($InputError==1){
prnMsg($msg,'error');
@@ -27,24 +29,25 @@
echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<table class="selection">
- <tr>
+ <tr>
<td>' . _('Enter the date for which the transactions are to be listed') . ':</td>
<td><input type="text" name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td>
</tr>';
- echo '<tr><td>' . _('Transaction type') . '</td><td>';
+ echo '<tr><td>' . _('Transaction type') . '</td>
+ <td><select name="TransType">
+ <option value=10>' . _('Invoices') . '</option>
+ <option value=11>' . _('Credit Notes') . '</option>
+ <option value=12>' . _('Receipts') . '</option>
+ </select></td>
+ </tr>';
- echo '<select name="TransType">';
-
- echo '<option value=10>' . _('Invoices') . '</option>';
- echo '<option value=11>' . _('Credit Notes') . '</option>';
- echo '<option value=12>' . _('Receipts') . '</option>';
-
- echo '</select></td></tr>';
-
echo '</select></td></tr>
</table>
- <br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>';
+ <br />
+ <div class="centre">
+ <input type="submit" name="Go" value="' . _('Create PDF') . '">
+ </div>';
include('includes/footer.inc');
exit;
Modified: trunk/PDFCustomerList.php
===================================================================
--- trunk/PDFCustomerList.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFCustomerList.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -28,141 +28,141 @@
if (in_array('All', $_POST['Areas'])){
if (in_array('All', $_POST['SalesPeople'])){
- $SQL = 'SELECT debtorsmaster.debtorno,
- debtorsmaster.name,
- debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
- debtorsmaster.address5,
- debtorsmaster.address6,
- debtorsmaster.salestype,
- custbranch.branchcode,
- custbranch.brname,
- custbranch.braddress1,
- custbranch.braddress2,
- custbranch.braddress3,
- custbranch.braddress4,
- custbranch.braddress5,
- custbranch.braddress6,
- custbranch.contactname,
- custbranch.phoneno,
- custbranch.faxno,
- custbranch.email,
- custbranch.area,
- custbranch.salesman,
- areas.areadescription,
- salesman.salesmanname
- FROM debtorsmaster INNER JOIN custbranch
- ON debtorsmaster.debtorno=custbranch.debtorno
- INNER JOIN areas
- ON custbranch.area = areas.areacode
- INNER JOIN salesman
- ON custbranch.salesman=salesman.salesmancode
- ORDER BY area,
- salesman,
- debtorsmaster.debtorno,
- custbranch.branchcode';
+ $SQL = "SELECT debtorsmaster.debtorno,
+ debtorsmaster.name,
+ debtorsmaster.address1,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
+ debtorsmaster.address5,
+ debtorsmaster.address6,
+ debtorsmaster.salestype,
+ custbranch.branchcode,
+ custbranch.brname,
+ custbranch.braddress1,
+ custbranch.braddress2,
+ custbranch.braddress3,
+ custbranch.braddress4,
+ custbranch.braddress5,
+ custbranch.braddress6,
+ custbranch.contactname,
+ custbranch.phoneno,
+ custbranch.faxno,
+ custbranch.email,
+ custbranch.area,
+ custbranch.salesman,
+ areas.areadescription,
+ salesman.salesmanname
+ FROM debtorsmaster INNER JOIN custbranch
+ ON debtorsmaster.debtorno=custbranch.debtorno
+ INNER JOIN areas
+ ON custbranch.area = areas.areacode
+ INNER JOIN salesman
+ ON custbranch.salesman=salesman.salesmancode
+ ORDER BY area,
+ salesman,
+ debtorsmaster.debtorno,
+ custbranch.branchcode";
} else {
/* there are a range of salesfolk selected need to build the where clause */
- $SQL = 'SELECT debtorsmaster.debtorno,
- debtorsmaster.name,
- debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
- debtorsmaster.address5,
- debtorsmaster.address6,
- debtorsmaster.salestype,
- custbranch.branchcode,
- custbranch.brname,
- custbranch.braddress1,
- custbranch.braddress2,
- custbranch.braddress3,
- custbranch.braddress4,
- custbranch.braddress5,
- custbranch.braddress6,
- custbranch.contactname,
- custbranch.phoneno,
- custbranch.faxno,
- custbranch.email,
- custbranch.area,
- custbranch.salesman,
- areas.areadescription,
- salesman.salesmanname
- FROM debtorsmaster INNER JOIN custbranch
- ON debtorsmaster.debtorno=custbranch.debtorno
- INNER JOIN areas
- ON custbranch.area = areas.areacode
- INNER JOIN salesman
- ON custbranch.salesman=salesman.salesmancode
- WHERE (';
+ $SQL = "SELECT debtorsmaster.debtorno,
+ debtorsmaster.name,
+ debtorsmaster.address1,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
+ debtorsmaster.address5,
+ debtorsmaster.address6,
+ debtorsmaster.salestype,
+ custbranch.branchcode,
+ custbranch.brname,
+ custbranch.braddress1,
+ custbranch.braddress2,
+ custbranch.braddress3,
+ custbranch.braddress4,
+ custbranch.braddress5,
+ custbranch.braddress6,
+ custbranch.contactname,
+ custbranch.phoneno,
+ custbranch.faxno,
+ custbranch.email,
+ custbranch.area,
+ custbranch.salesman,
+ areas.areadescription,
+ salesman.salesmanname
+ FROM debtorsmaster INNER JOIN custbranch
+ ON debtorsmaster.debtorno=custbranch.debtorno
+ INNER JOIN areas
+ ON custbranch.area = areas.areacode
+ INNER JOIN salesman
+ ON custbranch.salesman=salesman.salesmancode
+ WHERE (";
$i=0;
foreach ($_POST['SalesPeople'] as $Salesperson){
if ($i>0){
- $SQL .= ' OR ';
+ $SQL .= " OR ";
}
$i++;
$SQL .= "custbranch.salesman='" . $Salesperson ."'";
}
- $SQL .=') ORDER BY area,
+ $SQL .=") ORDER BY area,
salesman,
debtorsmaster.debtorno,
- custbranch.branchcode';
+ custbranch.branchcode";
} /*end if SalesPeople =='All' */
} else { /* not all sales areas has been selected so need to build the where clause */
if (in_array('All', $_POST['SalesPeople'])){
- $SQL = 'SELECT debtorsmaster.debtorno,
- debtorsmaster.name,
- debtorsmaster.address1,
- debtorsmaster.address2,
- debtorsmaster.address3,
- debtorsmaster.address4,
- debtorsmaster.address5,
- debtorsmaster.address6,
- debtorsmaster.salestype,
- custbranch.branchcode,
- custbranch.brname,
- custbranch.braddress1,
- custbranch.braddress2,
- custbranch.braddress3,
- custbranch.braddress4,
- custbranch.braddress5,
- custbranch.braddress6,
- custbranch.contactname,
- custbranch.phoneno,
- custbranch.faxno,
- custbranch.email,
- custbranch.area,
- custbranch.salesman,
- areas.areadescription,
- salesman.salesmanname
- FROM debtorsmaster INNER JOIN custbranch
- ON debtorsmaster.debtorno=custbranch.debtorno
- INNER JOIN areas
- ON custbranch.area = areas.areacode
- INNER JOIN salesman
- ON custbranch.salesman=salesman.salesmancode
- WHERE (';
-
+ $SQL = "SELECT debtorsmaster.debtorno,
+ debtorsmaster.name,
+ debtorsmaster.address1,
+ debtorsmaster.address2,
+ debtorsmaster.address3,
+ debtorsmaster.address4,
+ debtorsmaster.address5,
+ debtorsmaster.address6,
+ debtorsmaster.salestype,
+ custbranch.branchcode,
+ custbranch.brname,
+ custbranch.braddress1,
+ custbranch.braddress2,
+ custbranch.braddress3,
+ custbranch.braddress4,
+ custbranch.braddress5,
+ custbranch.braddress6,
+ custbranch.contactname,
+ custbranch.phoneno,
+ custbranch.faxno,
+ custbranch.email,
+ custbranch.area,
+ custbranch.salesman,
+ areas.areadescription,
+ salesman.salesmanname
+ FROM debtorsmaster INNER JOIN custbranch
+ ON debtorsmaster.debtorno=custbranch.debtorno
+ INNER JOIN areas
+ ON custbranch.area = areas.areacode
+ INNER JOIN salesman
+ ON custbranch.salesman=salesman.salesmancode
+ WHERE (";
+
$i=0;
foreach ($_POST['Areas'] as $Area){
if ($i>0){
- $SQL .= ' OR ';
+ $SQL .= " OR ";
}
$i++;
$SQL .= "custbranch.area='" . $Area ."'";
}
- $SQL .= ') ORDER BY custbranch.area,
+ $SQL .= ") ORDER BY custbranch.area,
custbranch.salesman,
debtorsmaster.debtorno,
- custbranch.branchcode';
+ custbranch.branchcode";
} else {
/* there are a range of salesfolk selected need to build the where clause */
- $SQL = 'SELECT debtorsmaster.debtorno,
+ $SQL = "SELECT debtorsmaster.debtorno,
debtorsmaster.name,
debtorsmaster.address1,
debtorsmaster.address2,
@@ -193,32 +193,32 @@
ON custbranch.area = areas.areacode
INNER JOIN salesman
ON custbranch.salesman=salesman.salesmancode
- WHERE (';
+ WHERE (";
$i=0;
foreach ($_POST['Areas'] as $Area){
if ($i>0){
- $SQL .= ' OR ';
+ $SQL .= " OR ";
}
$i++;
$SQL .= "custbranch.area='" . $Area ."'";
}
- $SQL .= ') AND (';
+ $SQL .= ") AND (";
$i=0;
foreach ($_POST['SalesPeople'] as $Salesperson){
if ($i>0){
- $SQL .= ' OR ';
+ $SQL .= " OR ";
}
$i++;
$SQL .= "custbranch.salesman='" . $Salesperson ."'";
}
- $SQL .=') ORDER BY custbranch.area,
+ $SQL .=") ORDER BY custbranch.area,
custbranch.salesman,
debtorsmaster.debtorno,
- custbranch.branchcode';
+ custbranch.branchcode";
} /*end if Salesfolk =='All' */
} /* end if not all sales areas was selected */
@@ -261,11 +261,11 @@
since the date entered */
$SQL = "SELECT SUM((ovamount+ovfreight+ovdiscount)/rate) AS turnover
- FROM debtortrans
- WHERE debtorno='" . $Customers['debtorno'] . "'
- AND branchcode='" . $Customers['branchcode'] . "'
- AND (type=10 or type=11)
- AND trandate >='" . FormatDateForSQL($_POST['ActivitySince']). "'";
+ FROM debtortrans
+ WHERE debtorno='" . $Customers['debtorno'] . "'
+ AND branchcode='" . $Customers['branchcode'] . "'
+ AND (type=10 or type=11)
+ AND trandate >='" . FormatDateForSQL($_POST['ActivitySince']). "'";
$ActivityResult = DB_query($SQL, $db, _('Could not retrieve the activity of the branch because'), _('The failed SQL was'));
$ActivityRow = DB_fetch_row($ActivityResult);
@@ -382,10 +382,10 @@
}
echo '</select></td></tr>';
- echo '<tr><td>' . _('For Sales folk'). ':</td><td><select name=SalesPeople[] multiple>';
+ echo '<tr><td>' . _('For Sales folk'). ':</td>
+ <td><select name=SalesPeople[] multiple>
+ <option selected value="All">'. _('All sales folk') . '</option>';
- echo '<option selected value="All">'. _('All sales folk');
-
$sql = "SELECT salesmancode, salesmanname FROM salesman";
$SalesFolkResult = DB_query($sql,$db);
@@ -394,20 +394,28 @@
}
echo '</select></td></tr>';
- echo '<tr><td>' . _('Level Of Activity'). ':</td><td><select name="Activity">';
+ echo '<tr><td>' . _('Level Of Activity'). ':</td>
+ <td><select name="Activity">
+ <option selected value="All">'. _('All customers') . '</option>
+ <option value="GreaterThan">'. _('Sales Greater Than') . '</option>
+ <option value="LessThan">'. _('Sales Less Than') . '</option>
+ </select></td>
+ <td>';
- echo '<option selected value="All">'. _('All customers') . '</option>';
- echo '<option value="GreaterThan">'. _('Sales Greater Than') . '</option>';
- echo '<option value="LessThan">'. _('Sales Less Than') . '</option>';
- echo '</select></td><td>';
+ echo '<input type="text" class="number" name="ActivityAmount" size="8" maxlength="8" value=0></td>
+ </tr>';
- echo '<input type="text" class=number name="ActivityAmount" size=8 maxlength=8 value=0></td></tr>';
-
$DefaultActivitySince = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-6,0,Date('y')));
- echo '<tr><td>' . _('Activity Since'). ':</td>
- <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ActivitySince" size=10 maxlength=10 value="' . $DefaultActivitySince . '"></td></tr>';
+ echo '<tr>
+ <td>' . _('Activity Since'). ':</td>
+ <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ActivitySince" size="10" maxlength="10" value="' . $DefaultActivitySince . '"></td>
+ </tr>';
- echo '</table><br /><div class="centre"><input type=Submit Name="PrintPDF" Value="'. _('Print PDF'). '"></div>';
+ echo '</table>
+ <br />
+ <div class="centre">
+ <input type=Submit Name="PrintPDF" value="'. _('Print PDF'). '">
+ </div>';
include('includes/footer.inc');
Modified: trunk/PDFDeliveryDifferences.php
===================================================================
--- trunk/PDFDeliveryDifferences.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFDeliveryDifferences.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -26,30 +26,39 @@
echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<table class=selection>
+ echo '<table class="selection">
<tr>
<td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td>
- <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td>
+ <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td>
</tr>';
- echo '<tr>
- <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td>
+ echo '<tr>
+ <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>
</tr>';
- echo '<tr><td>' . _('Inventory Category') . '</td><td>';
+ echo '<tr>
+ <td>' . _('Inventory Category') . '</td>
+ <td>';
- $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'";
- $result = DB_query($sql,$db);
+ $sql = "SELECT categorydescription,
+ categoryid
+ FROM stockcategory
+ WHERE stocktype<>'D'
+ AND stocktype<>'L'";
+
+ $result = DB_query($sql,$db);
- echo '<select name="CategoryID">';
- echo '<option selected value="All">' . _('Over All Categories') . '</option>';
+ echo '<select name="CategoryID">
+ <option selected value="All">' . _('Over All Categories') . '</option>';
while ($myrow=DB_fetch_array($result)){
echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>';
}
- echo '</select></td></tr>';
+ echo '</select></td>
+ </tr>';
- echo '<tr><td>' . _('Inventory Location') . ':</td>
+ echo '<tr>
+ <td>' . _('Inventory Location') . ':</td>
<td><select name="Location">
<option selected value="All">' . _('All Locations') . '</option>';
@@ -59,16 +68,18 @@
}
echo '</select></td></tr>';
- echo '<tr><td>' . _('Email the report off') . ':</td>
+ echo '<tr>
+ <td>' . _('Email the report off') . ':</td>
<td><select name="Email">
<option selected value="No">' . _('No') . '</option>
<option value="Yes">' . _('Yes') . '</option>
- </select>
- </td>
+ </select></td>
</tr>
</table>
<br />
- <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>';
+ <div class="centre">
+ <input type="submit" name="Go" value="' . _('Create PDF') . '">
+ </div>';
if ($InputError==1){
prnMsg($msg,'error');
@@ -84,6 +95,7 @@
orderdeliverydifferenceslog.orderno,
orderdeliverydifferenceslog.stockid,
stockmaster.description,
+ stockmaster.decimalplaces,
quantitydiff,
trandate,
orderdeliverydifferenceslog.debtorno,
@@ -100,6 +112,7 @@
orderdeliverydifferenceslog.orderno,
orderdeliverydifferenceslog.stockid,
stockmaster.description,
+ stockmaster.decimalplaces,
quantitydiff,
trandate,
orderdeliverydifferenceslog.debtorno,
@@ -117,6 +130,7 @@
orderdeliverydifferenceslog.orderno,
orderdeliverydifferenceslog.stockid,
stockmaster.description,
+ stockmaster.decimalplaces,
quantitydiff,
trandate,
orderdeliverydifferenceslog.debtorno,
@@ -138,6 +152,7 @@
orderdeliverydifferenceslog.orderno,
orderdeliverydifferenceslog.stockid,
stockmaster.description,
+ stockmaster.decimalplaces,
quantitydiff,
trandate,
orderdeliverydifferenceslog.debtorno,
@@ -162,7 +177,7 @@
include('includes/header.inc');
prnMsg( _('An error occurred getting the variances between deliveries and orders'),'error');
if ($debug==1){
- prnMsg( _('The SQL used to get the variances between deliveries and orders that failed was') . "<br />$SQL",'error');
+ prnMsg( _('The SQL used to get the variances between deliveries and orders that failed was') . '<br />' . $SQL,'error');
}
include ('includes/footer.inc');
exit;
@@ -195,7 +210,7 @@
$LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,40,$FontSize,$myrow['orderno'], 'left');
$LeftOvers = $pdf->addTextWrap($Left_Margin+80,$YPos,200,$FontSize,$myrow['stockid'] . ' - ' . $myrow['description'], 'left');
- $LeftOvers = $pdf->addTextWrap($Left_Margin+280,$YPos,50,$FontSize,locale_number_format($myrow['quantitydiff']), 'right');
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+280,$YPos,50,$FontSize,locale_number_format($myrow['quantitydiff'],$myrow['decimalplaces']), 'right');
$LeftOvers = $pdf->addTextWrap($Left_Margin+335,$YPos,50,$FontSize,$myrow['debtorno'], 'left');
$LeftOvers = $pdf->addTextWrap($Left_Margin+385,$YPos,50,$FontSize,$myrow['branch'], 'left');
$LeftOvers = $pdf->addTextWrap($Left_Margin+435,$YPos,50,$FontSize,ConvertSQLDate($myrow['trandate']), 'left');
Modified: trunk/PDFGrn.php
===================================================================
--- trunk/PDFGrn.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFGrn.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -54,7 +54,7 @@
ON grns.podetailitem=purchorderdetails.podetailitem
LEFT JOIN stockmaster
ON grns.itemcode=stockmaster.stockid
- WHERE grnbatch='".filter_number_format($GRNNo)."'";
+ WHERE grnbatch='". $GRNNo ."'";
$GRNResult=DB_query($sql, $db);
$NoOfGRNs = DB_num_rows($GRNResult);
@@ -69,7 +69,7 @@
suppliers.address6
FROM grns INNER JOIN suppliers
ON grns.supplierid=suppliers.supplierid
- WHERE grnbatch='".filter_number_format($GRNNo)."'";
+ WHERE grnbatch='". $GRNNo ."'";
$SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN'));
$SuppRow = DB_fetch_array($SuppResult);
}
@@ -88,7 +88,7 @@
$DecimalPlaces=2;
}
if (is_numeric($myrow['conversionfactor']) AND $myrow['conversionfactor'] !=0){
- $SuppliersQuantity=locale_number_format(filter_number_format($myrow['qtyrecd']/$myrow['conversionfactor']),$DecimalPlaces);
+ $SuppliersQuantity=locale_number_format($myrow['qtyrecd']/$myrow['conversionfactor'],$DecimalPlaces);
} else {
$SuppliersQuantity=locale_number_format($myrow['qtyrecd'],$DecimalPlaces);
}
Modified: trunk/PDFLowGP.php
===================================================================
--- trunk/PDFLowGP.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFLowGP.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -47,7 +47,7 @@
ON stockmoves.debtorno=debtorsmaster.debtorno
WHERE stockmoves.trandate >= '" . FormatDateForSQL($_POST['FromDate']) . "'
AND stockmoves.trandate <= '" . FormatDateForSQL($_POST['ToDate']) . "'
- AND ((stockmoves.price*(1-stockmoves.discountpercent)) - (stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost))/(stockmoves.price*(1-stockmoves.discountpercent)) <=" . filter_number_format(filter_number_format($_POST['GPMin'])/100) . "
+ AND ((stockmoves.price*(1-stockmoves.discountpercent)) - (stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost))/(stockmoves.price*(1-stockmoves.discountpercent)) <=" . $_POST['GPMin']/100 . "
ORDER BY stockmaster.stockid";
$LowGPSalesResult = DB_query($SQL,$db,'','',false,false);
@@ -129,21 +129,21 @@
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td>
- <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size=10 maxlength="10" value="' . $_POST['FromDate'] . '"></td>
+ <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size=10 maxlength="10" value="' . $_POST['FromDate'] . '" /></td>
</tr>';
echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td>
- <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td>
+ <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td>
</tr>';
echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ':</td>
- <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td>
+ <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '" /></td>
</tr>';
echo '</table>
<br />
<div class="centre">
- <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '">
+ <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" />
</div>';
}
include('includes/footer.inc');
Modified: trunk/PDFOrderStatus.php
===================================================================
--- trunk/PDFOrderStatus.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFOrderStatus.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -34,7 +34,7 @@
echo '<table class="selection">
<tr>
<td>' . _('Enter the date from which orders are to be listed') . ':</td>
- <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td>
+ <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td>
</tr>';
echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td><td>';
echo '<input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>';
Modified: trunk/PDFOrdersInvoiced.php
===================================================================
--- trunk/PDFOrdersInvoiced.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFOrdersInvoiced.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -290,7 +290,7 @@
if($OrderNo != $myrow['orderno']){
if ($AccumOrderTotal !=0){
$LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,120,$FontSize,_('Total Invoiced for order') . ' ' . $OrderNo , 'left');
- $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,locale_number_format(filter_number_format($AccumOrderTotal),$_SESSION['CompanyRecord']['decimalplaces']), 'right');
+ $LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,locale_number_format($AccumOrderTotal,$_SESSION['CompanyRecord']['decimalplaces']), 'right');
$YPos -= ($line_height);
$AccumOrderTotal =0;
}
@@ -395,7 +395,7 @@
while ($InvRow=DB_fetch_array($InvoicesResult)){
- $ValueInvoiced = filter_number_format($InvRow['price']*$InvRow['quantity']);
+ $ValueInvoiced = $InvRow['price']*$InvRow['quantity'];
$LeftOvers = $pdf->addTextWrap($Left_Margin+150,$YPos,90,$FontSize,$InvRow['typename'] . ' ' . $InvRow['transno'], 'left');
$LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,60,$FontSize,locale_number_format($InvRow['quantity'],$myrow['decimalplaces']), 'right');
@@ -424,7 +424,7 @@
$YPos -= ($line_height);
$LeftOvers = $pdf->addTextWrap($Left_Margin+260,$YPos,100,$FontSize,_('GRAND TOTAL INVOICED'), 'right');
-$LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,locale_number_format(filter_number_format($AccumTotalInv),$_SESSION['CompanyRecord']['decimalplaces']), 'right');
+$LeftOvers = $pdf->addTextWrap($Left_Margin+360,$YPos,80,$FontSize,locale_number_format($AccumTotalInv,$_SESSION['CompanyRecord']['decimalplaces']), 'right');
$YPos -= ($line_height);
$pdf->OutputD($_SESSION['DatabaseName'] . '_OrdersInvoiced_' . date('Y-m-d') . '.pdf');
Modified: trunk/PDFPeriodStockTransListing.php
===================================================================
--- trunk/PDFPeriodStockTransListing.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFPeriodStockTransListing.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -46,16 +46,18 @@
<option value=17>' . _('Stock Adjustment').'</option>
<option value=25>' . _('Purchase Order Delivery').'</option>
<option value=26>' . _('Work Order Receipt').'</option>
- <option value=28>' . _('Work Order Issue').'</option>';
+ <option value=28>' . _('Work Order Issue').'</option>
+ </select></td>
+ </tr>';
- echo '</select></td></tr>';
-
$sql = "SELECT loccode, locationname FROM locations";
$resultStkLocs = DB_query($sql, $db);
- echo '<tr><td>' . _('For Stock Location') . ':</td>
- <td><select name="StockLocation">';
- echo '<option value="All">' . _('All') . '</option>';
+ echo '<tr>
+ <td>' . _('For Stock Location') . ':</td>
+ <td><select name="StockLocation">
+ <option value="All">' . _('All') . '</option>';
+
while ($myrow=DB_fetch_array($resultStkLocs)){
if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){
if ($myrow['loccode'] == $_POST['StockLocation']){
Modified: trunk/PDFPickingList.php
===================================================================
--- trunk/PDFPickingList.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFPickingList.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -12,13 +12,13 @@
$title = _('Picking Lists Not Enabled');
include('includes/header.inc');
echo '<br />';
- prnMsg( _('The system is not configured for picking lists. Please consult your system administrator.'), 'info');
+ prnMsg( _('The system is not configured for picking lists. A configuration parameter is required where picking slips are required. Please consult your system administrator.'), 'info');
include('includes/footer.inc');
exit;
}
/* Show selection screen if we have no orders to work with */
-if ((!isset($_GET['TransNo']) or $_GET['TransNo']=="") and !isset($_POST['TransDate'])){
+if ((!isset($_GET['TransNo']) or $_GET['TransNo']=='') and !isset($_POST['TransDate'])){
$title = _('Select Picking Lists');
include('includes/header.inc');
$sql="SELECT loccode,
@@ -28,17 +28,24 @@
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />';
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post" name="form">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- echo '<table class="selection"><tr>';
- echo '<td>'._('Create picking lists for all deliveries to be made on').' : '.'</td>';
- echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength=10 size=11 value='.date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)).'></td></tr>';
+ echo '<table class="selection">
+ <tr>
+ <td>'._('Create picking lists for all deliveries to be made on').' : '.'</td>
+ <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength="10" size="11" value="'.date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)).'" /></td>
+ </tr>';
echo '<tr><td>'._('From Warehouse').' : '.'</td>
<td><select name="loccode">';
while ($myrow=DB_fetch_array($result)) {
echo '<option value='.$myrow['loccode'].'>'.$myrow['locationname'].'</option>';
}
- echo '</select></td></tr>';
- echo '</table>';
- echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Print Picking Lists') . '"></div></form>';
+ echo '</select></td>
+ </tr>
+ </table>';
+ echo '<br />
+ <div class="centre">
+ <input type="submit" name="Process" value="' . _('Print Picking Lists') . '">
+ </div>
+ </form>';
include('includes/footer.inc');
exit();
}
@@ -46,7 +53,7 @@
/*retrieve the order details from the database to print */
$ErrMsg = _('There was a problem retrieving the order header details from the database');
-if (!isset($_POST['TransDate']) and $_GET['TransNo'] != 'Preview') {
+if (!isset($_POST['TransDate']) AND $_GET['TransNo'] != 'Preview') {
/* If there is no transaction date set, then it must be for a single order */
$sql = "SELECT salesorders.debtorno,
salesorders.orderno,
@@ -80,7 +87,7 @@
WHERE salesorders.debtorno=debtorsmaster.debtorno
AND salesorders.shipvia=shippers.shipper_id
AND salesorders.fromstkloc=locations.loccode
- AND salesorders.orderno='" . filter_number_format($_GET['TransNo'])."'";
+ AND salesorders.orderno='" . $_GET['TransNo']."'";
} else if (isset($_POST['TransDate'])
OR (isset($_GET['TransNo']) AND $_GET['TransNo'] != 'Preview')) {
/* We are printing picking lists for all orders on a day */
@@ -117,22 +124,26 @@
AND salesorders.shipvia=shippers.shipper_id
AND salesorders.fromstkloc=locations.loccode
AND salesorders.fromstkloc='".$_POST['loccode']."'
- AND salesorders.deliverydate='" . FormatDateForSQL($_POST['TransDate'])."'";
+ AND salesorders.deliverydate<='" . FormatDateForSQL($_POST['TransDate'])."'";
}
if (isset($_POST['TransDate'])
OR (isset($_GET['TransNo']) AND $_GET['TransNo'] != 'Preview')) {
$result=DB_query($sql,$db, $ErrMsg);
-
+
/*if there are no rows, there's a problem. */
if (DB_num_rows($result)==0){
$title = _('Print Picking List Error');
include('includes/header.inc');
echo '<br />';
prnMsg( _('Unable to Locate any orders for this criteria '), 'info');
- echo '<br /><table class="selection"><tr><td>
- <a href="'. $rootpath . '/PDFPickingList.php">' . _('Enter Another Date') . '</a>
- </td></tr></table><br />';
+ echo '<br />
+ <table class="selection">
+ <tr>
+ <td><a href="'. $rootpath . '/PDFPickingList.php">' . _('Enter Another Date') . '</a></td>
+ </tr>
+ </table>
+ <br />';
include('includes/footer.inc');
exit();
}
@@ -207,10 +218,10 @@
/* Are there any picking lists for this order already */
$sql="SELECT COUNT(orderno)
FROM pickinglists
- WHERE orderno='" . filter_number_format($OrdersToPick[$i]['orderno']) . "'";
- $countresult=DB_query($sql, $db);
- $count=DB_fetch_row($countresult);
- if ($count[0]==0) {
+ WHERE orderno='" . $OrdersToPick[$i]['orderno'] . "'";
+ $CountResult=DB_query($sql, $db);
+ $Count=DB_fetch_row($CountResult);
+ if ($Count[0]==0) {
/* There are no previous picking lists for this order */
$sql = "SELECT salesorderdetails.stkcode,
stockmaster.description,
@@ -223,7 +234,7 @@
FROM salesorderdetails
INNER JOIN stockmaster
ON salesorderdetails.stkcode=stockmaster.stockid
- WHERE salesorderdetails.orderno='" . filer_locale_number_format($OrdersToPick[$i]['orderno']) ."'";
+ WHERE salesorderdetails.orderno='" . $OrdersToPick[$i]['orderno'] ."'";
} else {
/* There are previous picking lists for this order so
* need to take those quantities into account
@@ -245,22 +256,25 @@
ON salesorderdetails.orderno=pickinglists.orderno
LEFT JOIN pickinglistdetails
ON pickinglists.pickinglistno=pickinglistdetails.pickinglistno
- WHERE salesorderdetails.orderno='" . filter_number_format($OrdersToPick[$i]['orderno']) ."'
+ WHERE salesorderdetails.orderno='" . $OrdersToPick[$i]['orderno'] ."'
AND salesorderdetails.orderlineno=pickinglistdetails.orderlineno";
}
- $lineresult=DB_query($sql,$db, $ErrMsg);
+ $LineResult=DB_query($sql,$db, $ErrMsg);
}
- if ((isset($_GET['TransNo']) and $_GET['TransNo'] == 'Preview') or (isset($lineresult) and DB_num_rows($lineresult)>0)){
+ if ((isset($_GET['TransNo'])
+ AND $_GET['TransNo'] == 'Preview')
+ OR (isset($LineResult)
+ AND DB_num_rows($LineResult)>0)){
/*Yes there are line items to start the ball rolling with a page header */
include('includes/PDFPickingListHeader.inc');
if (isset($_POST['TransDate']) or (isset($_GET['TransNo']) and $_GET['TransNo'] != 'Preview')) {
- $LinesToShow=DB_num_rows($lineresult);
+ $LinesToShow=DB_num_rows($LineResult);
$PickingListNo = GetNextTransNo(19, $db);
$sql="INSERT INTO pickinglists
VALUES (
'" . $PickingListNo ."',
- '" . filter_number_format($OrdersToPick[$i]['orderno'])."',
+ '" . $OrdersToPick[$i]['orderno']."',
'" . FormatDateForSQL($_POST['TransDate'])."',
'" . date('Y-m-d')."',
'0000-00-00')";
@@ -274,6 +288,7 @@
while ($Lines<$LinesToShow){
if (isset($_GET['TransNo']) and $_GET['TransNo'] == 'Preview') {
$myrow2['stkcode']=str_pad('',10,'x');
+ $myrow2['decimalplaces']=2;
$DisplayQty='XXXX.XX';
$DisplayPrevDel='XXXX.XX';
$DisplayQtySupplied='XXXX.XX';
@@ -281,23 +296,23 @@
$myrow2['narrative']=str_pad('',18,'x');
$itemdesc = $myrow2['description'] . ' - ' . $myrow2['narrative'];
} else {
- $myrow2=DB_fetch_array($lineresult);
- if ($count[0]==0) {
+ $myrow2=DB_fetch_array($LineResult);
+ if ($Count[0]==0) {
$myrow2['qtyexpected']=0;
$myrow2['qtypicked']=0;
}
$DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']);
$DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']);
- $DisplayQtySupplied = locale_number_format(filer_locale_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced']-$myrow2['qtyexpected']-$myrow2['qtypicked']),$myrow2['decimalplaces']);
+ $DisplayQtySupplied = locale_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced']-$myrow2['qtyexpected']-$myrow2['qtypicked'],$myrow2['decimalplaces']);
$itemdesc = $myrow2['description'] . ' - ' . $myrow2['narrative'];
$sql="INSERT INTO pickinglistdetails
VALUES(
'" . $PickingListNo ."',
'" . $Lines."',
'" . $myrow2['orderlineno']."',
- '" . filter_number_format($DisplayQtySupplied) ."',
+ '" . $DisplayQtySupplied ."',
0)";
- $lineresult=DB_query($sql, $db);
+ $LineResult=DB_query($sql, $db);
}
$ListCount ++;
Modified: trunk/PDFPriceList.php
===================================================================
--- trunk/PDFPriceList.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFPriceList.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -181,7 +181,7 @@
$LeftOvers = $pdf->addTextWrap($Left_Margin+80+47+47+130,$YPos,150,$FontSize,$DisplayUnitPrice, 'right');
if ($PriceList['price']!=0){
- $DisplayGPPercent = (int)filter_number_format((($PriceList['price']-$PriceList['standardcost'])*100/$PriceList['price'])) . '%';
+ $DisplayGPPercent = locale_number_format((($PriceList['price']-$PriceList['standardcost'])*100/$PriceList['price']),1) . '%';
} else {
$DisplayGPPercent = 0;
}
Modified: trunk/PDFPrintLabel.php
===================================================================
--- trunk/PDFPrintLabel.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFPrintLabel.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -10,12 +10,13 @@
$MsgErr=null;
$DecimalPlaces=2;
$pdf= null;
+/* The variable $AllLabels is the global variable that contains the list */
+$AllLabels = getXMLFile(LABELS_FILE);
+/* of all the label objects defined until now. In case of a fresh
+installation or an empty XML labels file it holds a NULL value.
- $AllLabels = //!< The variable $AllLabels is the global variable that contains the list
- getXMLFile(LABELS_FILE); //!< of all the label objects defined until now. In case of a fresh
- //!< installation or an empty XML labels file it holds a NULL value.
-
-// If there is no label templates, the user could select to set up a new one
+If there is no label templates, the user could select to set up a new one
+*/
if ($AllLabels==null) {
abortMsg( _('There isn\'t any label template to select for printing. Click') .
@@ -345,11 +346,12 @@
$obj = $label->dimensions;
$unit = (string)$obj->Unit;
- if ( array_key_exists($unit , $scales) )
+ if ( array_key_exists($unit , $scales) ) {
$factor = $scales[$unit];
- else
+ } else {
abortMsg( _('Unit not defined in scale operation! Correct the template') );
-
+ }
+
$dims = array();
foreach ($DimensionTags as $iTag=>$tag) {
if ($tag['type']=='n') // it is a data numeric
Modified: trunk/PDFQuotation.php
===================================================================
--- trunk/PDFQuotation.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFQuotation.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -7,19 +7,32 @@
//Get Out if we have no order number to work with
If (!isset($_GET['QuotationNo']) || $_GET['QuotationNo']==""){
- $title = _('Select Quotation To Print');
- include('includes/header.inc');
- echo '<div class="centre"><br /><br /><br />';
- prnMsg( _('Select a Quotation to Print before calling this page') , 'error');
- echo '<br /><br /><br /><table class="table_index"><tr><td class="menu_group_item">
- <li><a href="'. $rootpath . '/SelectSalesOrder.php?'. SID .'&Quotations=Quotes_Only">' . _('Quotations') . '</a></li>
- </td></tr></table></div><br /><br /><br />';
- include('includes/footer.inc');
- exit();
+ $title = _('Select Quotation To Print');
+ include('includes/header.inc');
+ echo '<div class="centre">
+ <br />
+ <br />
+ <br />';
+ prnMsg( _('Select a Quotation to Print before calling this page') , 'error');
+ echo '<br />
+ <br />
+ <br />
+ <table class="table_index">
+ <tr>
+ <td class="menu_group_item">
+ <a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Quotations') . '</a></td>
+ </tr>
+ </table>
+ </div>
+ <br />
+ <br />
+ <br />';
+ include('includes/footer.inc');
+ exit();
}
/*retrieve the order details from the database to print */
-$ErrMsg = _('There was a problem retrieving the quotation header details for Order Number') . ' ' . filter_number_format($_GET['QuotationNo']) . ' ' . _('from the database');
+$ErrMsg = _('There was a problem retrieving the quotation header details for Order Number') . ' ' . $_GET['QuotationNo'] . ' ' . _('from the database');
$sql = "SELECT salesorders.customerref,
salesorders.comments,
@@ -55,7 +68,7 @@
INNER JOIN currencies
ON debtorsmaster.currcode=currencies.currabrev
WHERE salesorders.quotation=1
- AND salesorders.orderno='" . filter_number_format($_GET['QuotationNo']) ."'";
+ AND salesorders.orderno='" . $_GET['QuotationNo'] ."'";
$result=DB_query($sql,$db, $ErrMsg);
@@ -63,15 +76,18 @@
if (DB_num_rows($result)==0){
$title = _('Print Quotation Error');
include('includes/header.inc');
- echo '<div class="centre"><br /><br /><br />';
- prnMsg( _('Unable to Locate Quotation Number') . ' : ' . filter_number_format($_GET['QuotationNo']) . ' ', 'error');
+ echo '<div class="centre">
+ <br />
+ <br />
+ <br />';
+ prnMsg( _('Unable to Locate Quotation Number') . ' : ' . $_GET['QuotationNo'] . ' ', 'error');
echo '<br />
<br />
<br />
<table class="table_index">
<tr>
<td class="menu_group_item">
- <ul><li><a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a></li></ul>
+ <a href="'. $rootpath . '/SelectSalesOrder.php?Quotations=Quotes_Only">' . _('Outstanding Quotations') . '</a>
</td>
</tr>
</table>
@@ -116,7 +132,7 @@
stockmaster.decimalplaces
FROM salesorderdetails INNER JOIN stockmaster
ON salesorderdetails.stkcode=stockmaster.stockid
- WHERE salesorderdetails.orderno='" . filter_number_format($_GET['QuotationNo']) . "'";
+ WHERE salesorderdetails.orderno='" . $_GET['QuotationNo'] . "'";
$result=DB_query($sql,$db, $ErrMsg);
@@ -147,7 +163,7 @@
$DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']);
$DisplayPrice = locale_number_format($myrow2['unitprice'],$myrow['currdecimalplaces']);
$DisplayDiscount = locale_number_format($myrow2['discountpercent']*100,2) . '%';
- $SubTot = filter_number_format($myrow2['unitprice']*$myrow2['quantity']*(1-$myrow2['discountpercent']));
+ $SubTot = $myrow2['unitprice']*$myrow2['quantity']*(1-$myrow2['discountpercent']);
$TaxProv = $myrow['taxprovinceid'];
$TaxCat = $myrow2['taxcatid'];
$Branch = $myrow['branchcode'];
@@ -169,11 +185,11 @@
$TaxClass = 100 * $myrow4['taxrate'];
}
- $DisplayTaxClass = $TaxClass . "%";
- $TaxAmount = filter_number_format((($SubTot/100)*(100+$TaxClass))-$SubTot);
+ $DisplayTaxClass = $TaxClass . '%';
+ $TaxAmount = (($SubTot/100)*(100+$TaxClass))-$SubTot;
$DisplayTaxAmount = locale_number_format($TaxAmount,$myrow['currdecimalplaces']);
- $LineTotal = filter_number_format($SubTot + $TaxAmount);
+ $LineTotal = $SubTot + $TaxAmount;
$DisplayTotal = locale_number_format($LineTotal,$myrow['currdecimalplaces']);
$FontSize=10;
Modified: trunk/PDFQuotationPortrait.php
===================================================================
--- trunk/PDFQuotationPortrait.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFQuotationPortrait.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -70,7 +70,7 @@
INNER JOIN currencies
ON debtorsmaster.currcode=currencies.currabrev
WHERE salesorders.quotation=1
- AND salesorders.orderno='" . filter_number_format($_GET['QuotationNo']) ."'";
+ AND salesorders.orderno='" . $_GET['QuotationNo'] ."'";
$result=DB_query($sql,$db, $ErrMsg);
@@ -82,7 +82,7 @@
<br />
<br />
<br />';
- prnMsg( _('Unable to Locate Quotation Number') . ' : ' . filter_number_format($_GET['QuotationNo']) . ' ', 'error');
+ prnMsg( _('Unable to Locate Quotation Number') . ' : ' . $_GET['QuotationNo'] . ' ', 'error');
echo '<br />
<br />
<br />
@@ -111,7 +111,7 @@
$PaperSize = 'A4';
include('includes/PDFStarter.php');
$pdf->addInfo('Title', _('Customer Quotation') );
-$pdf->addInfo('Subject', _('Quotation') . ' ' . filter_number_format($_GET['QuotationNo']));
+$pdf->addInfo('Subject', _('Quotation') . ' ' . $_GET['QuotationNo']);
$FontSize=12;
$PageNumber = 1;
$line_height=24;
@@ -163,7 +163,7 @@
$DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']);
$DisplayPrice = locale_number_format($myrow2['unitprice'],$myrow['currdecimalplaces']);
$DisplayDiscount = locale_number_format($myrow2['discountpercent']*100,2) . '%';
- $SubTot = filter_number_format($myrow2['unitprice']*$myrow2['quantity']*(1-$myrow2['discountpercent']));
+ $SubTot = $myrow2['unitprice']*$myrow2['quantity']*(1-$myrow2['discountpercent']);
$TaxProv = $myrow['taxprovinceid'];
$TaxCat = $myrow2['taxcatid'];
$Branch = $myrow['branchcode'];
@@ -186,7 +186,7 @@
}
$DisplayTaxClass = $TaxClass . "%";
- $TaxAmount = filter_number_fomat((($SubTot/100)*(100+$TaxClass))-$SubTot);
+ $TaxAmount = (($SubTot/100)*(100+$TaxClass))-$SubTot;
$DisplayTaxAmount = locale_number_format($TaxAmount,$myrow['currdecimalplaces']);
$LineTotal = $SubTot + $TaxAmount;
Modified: trunk/PDFReceipt.php
===================================================================
--- trunk/PDFReceipt.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFReceipt.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -57,7 +57,7 @@
FROM debtortrans
WHERE type=12
AND transno='".$_GET['BatchNumber']."'
- AND id='". filter_number_format($StartReceiptNumber-1+$_GET['ReceiptNumber']) ."'";
+ AND id='". $StartReceiptNumber-1+$_GET['ReceiptNumber'] ."'";
$result=DB_query($sql, $db);
$myrow=DB_fetch_array($result);
$DebtorNo=$myrow['debtorno'];
@@ -70,7 +70,7 @@
WHERE currabrev=(SELECT currcode
FROM banktrans
WHERE type=12
- AND transno='" . filter_number_format($_GET['BatchNumber'])."')";
+ AND transno='" . $_GET['BatchNumber']."')";
$result=DB_query($sql, $db);
$myrow=DB_fetch_array($result);
$Currency=$myrow['currency'];
@@ -116,5 +116,5 @@
$LeftOvers = $pdf->addTextWrap(50,$YPos,300,$FontSize,'______________________________________________________________________________');
-$pdf->Output('Receipt-'.filter_number_format($_GET['ReceiptNumber']), 'I');
+$pdf->Output('Receipt-'.$_GET['ReceiptNumber'], 'I');
?>
\ No newline at end of file
Modified: trunk/PDFRemittanceAdvice.php
===================================================================
--- trunk/PDFRemittanceAdvice.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFRemittanceAdvice.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -145,10 +145,14 @@
} else {
$DefaultToCriteria = $_POST['ToCriteria'];
}
- echo '<tr><td>' . _('From Supplier Code') . ':</font></td>
- <td><input type="text" maxlength="6" size="7" name="FromCriteria" value="' . $DefaultFromCriteria . '"></td></tr>';
- echo '<tr><td>' . _('To Supplier Code') . ':</td>
- <td><input type="text" maxlength="6" size="7" name="ToCriteria" value="' . $DefaultToCriteria . '"></td></tr>';
+ echo '<tr>
+ <td>' . _('From Supplier Code') . ':</font></td>
+ <td><input type="text" maxlength="6" size="7" name="FromCriteria" value="' . $DefaultFromCriteria . '" /></td>
+ </tr>';
+ echo '<tr>
+ <td>' . _('To Supplier Code') . ':</td>
+ <td><input type="text" maxlength="6" size="7" name="ToCriteria" value="' . $DefaultToCriteria . '" /></td>
+ </tr>';
if (!isset($_POST['PaymentDate'])){
$DefaultDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')+1,0 ,Date('y')));
@@ -156,19 +160,19 @@
$DefaultDate = $_POST['PaymentDate'];
}
- echo '<tr><td>' . _('Date Of Payment') . ':</td>
- <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="PaymentDate" maxlength="11" size="12" value="' . $DefaultDate . '" /></td>
- </tr>';
+ echo '<tr>
+ <td>' . _('Date Of Payment') . ':</td>
+ <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="PaymentDate" maxlength="11" size="12" value="' . $DefaultDate . '" /></td>
+ </tr>';
- echo '</table><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>';
+ echo '</table>
+ <div class="centre">
+ <input type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '">
+ </div>';
include ('includes/footer.inc');
} /*end of else not PrintPDF */
-
-
-
-
function PageHeader(){
global $pdf;
global $PageNumber;
Modified: trunk/PDFStockCheckComparison.php
===================================================================
--- trunk/PDFStockCheckComparison.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFStockCheckComparison.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -20,12 +20,13 @@
if ($_POST['ReportOrClose']=='ReportAndClose'){
$sql = "SELECT stockcheckfreeze.stockid,
- stockcheckfreeze.loccode,
- qoh,
- materialcost+labourcost+overheadcost AS standardcost
- FROM stockmaster INNER JOIN stockcheckfreeze
+ stockcheckfreeze.loccode,
+ qoh,
+ materialcost+labourcost+overheadcost AS standardcost
+ FROM stockmaster INNER JOIN stockcheckfreeze
ON stockcheckfreeze.stockid=stockmaster.stockid
- ORDER BY stockcheckfreeze.loccode, stockcheckfreeze.stockid";
+ ORDER BY stockcheckfreeze.loccode,
+ stockcheckfreeze.stockid";
$StockChecks = DB_query($sql, $db,'','',false,false);
if (DB_error_no($db) !=0) {
@@ -49,9 +50,9 @@
$sql = "SELECT SUM(stockcounts.qtycounted) AS totcounted,
COUNT(stockcounts.stockid) AS noofcounts
- FROM stockcounts
- WHERE stockcounts.stockid='" . $myrow['stockid'] . "'
- AND stockcounts.loccode='" . $myrow['loccode'] . "'";
+ FROM stockcounts
+ WHERE stockcounts.stockid='" . $myrow['stockid'] . "'
+ AND stockcounts.loccode='" . $myrow['loccode'] . "'";
$StockCounts = DB_query($sql, $db);
if (DB_error_no($db) !=0) {
@@ -70,7 +71,7 @@
$StkCountResult = DB_query($sql,$db);
$StkCountRow = DB_fetch_array($StkCountResult);
- $StockQtyDifference = filter_number_format($StkCountRow['totcounted'] - $myrow['qoh']);
+ $StockQtyDifference = $StkCountRow['totcounted'] - $myrow['qoh'];
if ($_POST['ZeroCounts']=='Leave' AND $StkCountRow['noofcounts']==0){
$StockQtyDifference =0;
@@ -112,7 +113,7 @@
'" . $PeriodNo . "',
'" . _('Inventory Check') . "',
'" . $StockQtyDifference . "',
- '" . filter_number_format($QtyOnHandPrior + $StockQtyDifference) . "'
+ '" . $QtyOnHandPrior + $StockQtyDifference . "'
)";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock movement record cannot be inserted because');
@@ -145,7 +146,7 @@
'" . $SQLAdjustmentDate . "',
'" . $PeriodNo . "',
'" . $StockGLCodes['adjglact'] . "',
- '" . filter_number_format($myrow['standardcost'] * -($StockQtyDifference)) . "',
+ '" . $myrow['standardcost'] * -($StockQtyDifference) . "',
'" . $myrow['stockid'] . " x " . $StockQtyDifference . " @ " . $myrow['standardcost'] . " - " . _('Inventory Check') . "')";
$Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true);
@@ -164,14 +165,13 @@
'" . $SQLAdjustmentDate . "',
'" . $PeriodNo . "',
'" . $StockGLCodes['stockact'] . "',
- '" . filter_number_format($myrow['standardcost'] * $StockQtyDifference) . "',
+ '" . $myrow['standardcost'] * $StockQtyDifference . "',
'" . $myrow['stockid'] . " x " . $StockQtyDifference . " @ " . $myrow['standardcost'] . " - " . _('Inventory Check') . "')";
$Result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true);
} //END INSERT GL TRANS
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Unable to COMMIT transaction while adjusting stock in StockCheckAdjustmet report');
- $SQL = "COMMIT";
- $Result = DB_query($SQL,$db, $ErrMsg,'',true);
+ DB_Txn_Commit($db);
} // end if $StockQtyDifference !=0
Modified: trunk/PDFStockLocTransfer.php
===================================================================
--- trunk/PDFStockLocTransfer.php 2011-10-05 05:19:10 UTC (rev 4711)
+++ trunk/PDFStockLocTransfer.php 2011-10-05 07:26:06 UTC (rev 4712)
@@ -8,7 +8,7 @@
include('includes/PDFStarter.php');
if (isset($_POST['TransferNo'])) {
- $_GET['TransferNo']=filter_number_format($_POST['TransferNo']);
+ $_GET['TransferNo']=$_POST['TransferNo'];
}
if (!isset($_GET['TransferNo'])){
@@ -16,16 +16,19 @@
include ('includes/header.inc');
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') .
'" alt="" />' . ' ' . _('Reprint transfer docket').'</p><br />';
- echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
+ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- 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') .'">';
+ echo '<table>
+ <tr>
+ <td>'._('Transfer docket to reprint').'</td>
+ <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;
-} else {
- $_GET['TransferNo'] = filter_number_format($_GET['TransferNo']);
-}
+}
$pdf->addInfo('Title', _('Inventory Location Transfer BOL') );
$pdf->addInfo('Subject', _('Inventory Location Transfer BOL') . ' # ' . $_GET['TransferNo']);
@@ -43,12 +46,13 @@
loctransfers.shiploc,
locations.locationname as shiplocname,
...
[truncated message content] |