|
From: <vv...@us...> - 2012-02-25 22:46:05
|
Revision: 4971
http://web-erp.svn.sourceforge.net/web-erp/?rev=4971&view=rev
Author: vvs2012
Date: 2012-02-25 22:45:53 +0000 (Sat, 25 Feb 2012)
Log Message:
-----------
sql in PDFSuppTransListing.php would not fetch any data and debug message was not showing
Modified Paths:
--------------
trunk/PDFChequeListing.php
trunk/PDFSuppTransListing.php
trunk/SelectSalesOrder.php
Modified: trunk/PDFChequeListing.php
===================================================================
--- trunk/PDFChequeListing.php 2012-02-25 14:07:04 UTC (rev 4970)
+++ trunk/PDFChequeListing.php 2012-02-25 22:45:53 UTC (rev 4971)
@@ -76,17 +76,17 @@
include('includes/ConnectDB.inc');
}
-$SQL = "SELECT bankaccountname,
+$sql = "SELECT bankaccountname,
decimalplaces AS bankcurrdecimalplaces
FROM bankaccounts INNER JOIN currencies
ON bankaccounts.currcode=currencies.currabrev
WHERE accountcode = '" .$_POST['BankAccount'] . "'";
-$BankActResult = DB_query($SQL,$db);
+$BankActResult = DB_query($sql,$db);
$myrow = DB_fetch_row($BankActResult);
$BankAccountName = $myrow[0];
$BankCurrDecimalPlaces = $myrow[1];
-$SQL= "SELECT amount,
+$sql= "SELECT amount,
ref,
transdate,
banktranstype,
@@ -98,13 +98,13 @@
AND transdate >='" . FormatDateForSQL($_POST['FromDate']) . "'
AND transdate <='" . FormatDateForSQL($_POST['ToDate']) . "'";
-$Result=DB_query($SQL,$db,'','',false,false);
+$Result=DB_query($sql,$db,'','',false,false);
if (DB_error_no($db)!=0){
$title = _('Payment Listing');
include('includes/header.inc');
prnMsg(_('An error occurred getting the payments'),'error');
- if ($Debug==1){
- prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error');
+ if ($debug==1){
+ prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $sql,'error');
}
include('includes/footer.inc');
exit;
Modified: trunk/PDFSuppTransListing.php
===================================================================
--- trunk/PDFSuppTransListing.php 2012-02-25 14:07:04 UTC (rev 4970)
+++ trunk/PDFSuppTransListing.php 2012-02-25 22:45:53 UTC (rev 4971)
@@ -65,11 +65,11 @@
decimalplaces AS currdecimalplaces,
suppname
FROM supptrans INNER JOIN suppliers
- ON supptrans.supplierno = suppliers.supplierno
+ ON supptrans.supplierno = suppliers.supplierid
INNER JOIN currencies
ON suppliers.currcode=currencies.currabrev
WHERE type='" . $_POST['TransType'] . "'
- AND inputdate='" . FormatDateForSQL($_POST['Date']) . "'";
+ AND trandate='" . FormatDateForSQL($_POST['Date']) . "'";
$result=DB_query($sql,$db,'','',false,false);
@@ -77,8 +77,8 @@
$title = _('Payment Listing');
include('includes/header.inc');
prnMsg(_('An error occurred getting the payments'),'error');
- if ($Debug==1){
- prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error');
+ if ($debug==1){
+ prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $sql,'error');
}
include('includes/footer.inc');
exit;
Modified: trunk/SelectSalesOrder.php
===================================================================
--- trunk/SelectSalesOrder.php 2012-02-25 14:07:04 UTC (rev 4970)
+++ trunk/SelectSalesOrder.php 2012-02-25 22:45:53 UTC (rev 4971)
@@ -186,7 +186,7 @@
if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $Order_Value) { //user has authority to authrorise as well as create the order
$StatusComment = date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . ' ' . $UserDetails . ' - '._('Auto created from sales orders') .'<br />';
$ErrMsg = _('Could not update purchase order status to Authorised');
- $Debug = _('The SQL that failed was');
+ $DbgMsg = _('The SQL that failed was');
$result = DB_query("UPDATE purchorders SET allowprint=1,
status='Authorised',
stat_comment='" . $StatusComment . "'
@@ -350,7 +350,7 @@
if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $Order_Value) { //user has authority to authrorise as well as create the order
$StatusComment = date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . $UserDetails . ' - '._('Auto created from sales orders') .'<br />';
$ErrMsg = _('Could not update purchase order status to Authorised');
- $Debug = _('The SQL that failed was');
+ $DbgMsg = _('The SQL that failed was');
$result = DB_query("UPDATE purchorders SET allowprint=1,
status='Authorised',
stat_comment='" . $StatusComment . "'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|