|
From: <dai...@us...> - 2014-10-27 07:06:55
|
Revision: 6943
http://sourceforge.net/p/web-erp/reponame/6943
Author: daintree
Date: 2014-10-27 07:06:42 +0000 (Mon, 27 Oct 2014)
Log Message:
-----------
removed all $db from DB_error_no($db) calls
Modified Paths:
--------------
trunk/AgedDebtors.php
trunk/AgedSuppliers.php
trunk/BOMExtendedQty.php
trunk/BOMIndented.php
trunk/BOMIndentedReverse.php
trunk/BOMListing.php
trunk/CustomerBranches.php
trunk/CustomerReceipt.php
trunk/Dashboard.php
trunk/DebtorsAtPeriodEnd.php
trunk/FixedAssetItems.php
trunk/GLBalanceSheet.php
trunk/GLProfit_Loss.php
trunk/GLTagProfit_Loss.php
trunk/GLTrialBalance.php
trunk/InventoryPlanning.php
trunk/InventoryPlanningPrefSupplier.php
trunk/InventoryQuantities.php
trunk/InventoryValuation.php
trunk/MRP.php
trunk/MRPPlannedPurchaseOrders.php
trunk/MRPPlannedWorkOrders.php
trunk/MRPReport.php
trunk/MRPReschedules.php
trunk/MRPShortages.php
trunk/MailInventoryValuation.php
trunk/OutstandingGRNs.php
trunk/PDFBankingSummary.php
trunk/PDFChequeListing.php
trunk/PDFCustTransListing.php
trunk/PDFCustomerList.php
trunk/PDFDIFOT.php
trunk/PDFDeliveryDifferences.php
trunk/PDFLowGP.php
trunk/PDFOrderStatus.php
trunk/PDFOrdersInvoiced.php
trunk/PDFPeriodStockTransListing.php
trunk/PDFPriceList.php
trunk/PDFPrintLabel.php
trunk/PDFRemittanceAdvice.php
trunk/PDFSellThroughSupportClaim.php
trunk/PDFStockCheckComparison.php
trunk/PDFSuppTransListing.php
trunk/PO_Items.php
trunk/PcReportTab.php
trunk/Prices_Customer.php
trunk/PrintCustStatements.php
trunk/PrintCustTrans.php
trunk/PrintCustTransPortrait.php
trunk/PurchaseByPrefSupplier.php
trunk/ReorderLevel.php
trunk/SalesGraph.php
trunk/SelectCompletedOrder.php
trunk/ShipmentCosting.php
trunk/StockCheck.php
trunk/StockClone.php
trunk/StockDispatch.php
trunk/StockUsage.php
trunk/StockUsageGraph.php
trunk/Stocks.php
trunk/SuppPaymentRun.php
trunk/SuppPriceList.php
trunk/SupplierBalsAtPeriodEnd.php
trunk/Tax.php
trunk/UpgradeDatabase.php
trunk/Z_ChangeLocationCode.php
trunk/Z_ChangeStockCode.php
trunk/Z_DataExport.php
trunk/Z_ImportDebtors.php
trunk/Z_ImportFixedAssets.php
trunk/Z_ImportStocks.php
trunk/Z_ImportSuppliers.php
trunk/Z_Upgrade3.10.php
trunk/Z_Upgrade_3.10-3.11.php
trunk/Z_Upgrade_3.11-4.00.php
trunk/api/api_branches.php
trunk/api/api_customers.php
trunk/api/api_debtortransactions.php
trunk/api/api_glaccounts.php
trunk/api/api_glgroups.php
trunk/api/api_glsections.php
trunk/api/api_locations.php
trunk/api/api_purchdata.php
trunk/api/api_salesareas.php
trunk/api/api_salesman.php
trunk/api/api_salesorders.php
trunk/api/api_salestypes.php
trunk/api/api_session.inc
trunk/api/api_stock.php
trunk/api/api_stockcategories.php
trunk/api/api_suppliers.php
trunk/api/api_workorders.php
trunk/doc/Change.log
trunk/includes/ConnectDB_mysql.inc
trunk/includes/ConnectDB_mysqli.inc
trunk/includes/ConnectDB_postgres.inc
trunk/includes/DefineOfferClass.php
trunk/includes/FreightCalculation.inc
trunk/includes/GetConfig.php
trunk/includes/PDFPaymentRun_PymtFooter.php
trunk/includes/SQL_CommonFunctions.inc
Modified: trunk/AgedDebtors.php
===================================================================
--- trunk/AgedDebtors.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/AgedDebtors.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -263,7 +263,7 @@
}
$CustomerResult = DB_query($SQL,'','',False,False); /*dont trap errors handled below*/
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '.... ';
include('includes/header.inc');
prnMsg(_('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
@@ -365,7 +365,7 @@
}
$DetailResult = DB_query($sql,'','',False,False); /*Dont trap errors */
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Aged Customer Account Analysis') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/AgedSuppliers.php
===================================================================
--- trunk/AgedSuppliers.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/AgedSuppliers.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -104,7 +104,7 @@
$SupplierResult = DB_query($SQL,'','',False,False); /*dont trap errors */
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Aged Supplier Account Analysis') . ' - ' . _('Problem Report') ;
include('includes/header.inc');
prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
@@ -191,7 +191,7 @@
AND supptrans.supplierno = '" . $AgedAnalysis["supplierid"] . "'";
$DetailResult = DB_query($sql,'','',False,False); /*dont trap errors - trapped below*/
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Aged Supplier Account Analysis - Problem Report');
include('includes/header.inc');
prnMsg(_('The details of outstanding transactions for Supplier') . ' - ' . $AgedAnalysis['supplierid'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/BOMExtendedQty.php
===================================================================
--- trunk/BOMExtendedQty.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/BOMExtendedQty.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -150,7 +150,7 @@
} // End of while $ComponentCounter > 0
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Quantity Extended BOM Listing') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The Quantiy Extended BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/BOMIndented.php
===================================================================
--- trunk/BOMIndented.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/BOMIndented.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -148,7 +148,7 @@
} // End of while $ComponentCounter > 0
} // End of if $_POST['Levels']
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Indented BOM Listing') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/BOMIndentedReverse.php
===================================================================
--- trunk/BOMIndentedReverse.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/BOMIndentedReverse.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -136,7 +136,7 @@
} // End of while $ComponentCounter > 0
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Indented BOM Listing') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The Indented BOM Listing could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/BOMListing.php
===================================================================
--- trunk/BOMListing.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/BOMListing.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -38,7 +38,7 @@
$BOMResult = DB_query($SQL,'','',false,false); //dont do error trapping inside DB_query
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Bill of Materials Listing') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg(_('The Bill of Material listing could not be retrieved by the SQL because'),'error');
Modified: trunk/CustomerBranches.php
===================================================================
--- trunk/CustomerBranches.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/CustomerBranches.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -255,7 +255,7 @@
$result = DB_query($SQL, $ErrMsg);
}
- if (DB_error_no($db) ==0 AND $InputError==0) {
+ if (DB_error_no() ==0 AND $InputError==0) {
prnMsg($msg,'success');
unset($_POST['BranchCode']);
unset($_POST['BrName']);
@@ -355,7 +355,7 @@
}
$ErrMsg = _('The branch record could not be deleted') . ' - ' . _('the SQL server returned the following message');
$result = DB_query($SQL,$ErrMsg);
- if (DB_error_no($db)==0){
+ if (DB_error_no()==0){
prnMsg(_('Branch Deleted'),'success');
}
}
Modified: trunk/CustomerReceipt.php
===================================================================
--- trunk/CustomerReceipt.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/CustomerReceipt.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -635,7 +635,7 @@
}
$CustomerSearchResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
prnMsg(_('The searched customer records requested cannot be retrieved because') . ' - ' . DB_error_msg($db),'error');
if ($debug==1){
prnMsg(_('SQL used to retrieve the customer details was') . '<br />' . $sql,'error');
Modified: trunk/Dashboard.php
===================================================================
--- trunk/Dashboard.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/Dashboard.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -141,7 +141,7 @@
ROUND(ABS(SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)),currencies.decimalplaces) > 0";
$CustomerResult = DB_query($SQL,'','',False,False); /*dont trap errors handled below*/
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
prnMsg(_('The customer details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>';
if ($debug==1){
@@ -252,7 +252,7 @@
}
$DetailResult = DB_query($sql,'','',False,False);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
prnMsg(_('The details of outstanding transactions for customer') . ' - ' . $AgedAnalysis['debtorno'] . ' ' . _('could not be retrieved because') . ' - ' . DB_error_msg($db),'error');
echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>';
if ($debug==1){
@@ -418,7 +418,7 @@
supptrans.transno";
$TransResult = DB_query($sql,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg($db),'error');
echo '<br /><a href="' . $RootPath . '/index.php">' . _('Back to the menu') . '</a>';
if ($debug==1){
Modified: trunk/DebtorsAtPeriodEnd.php
===================================================================
--- trunk/DebtorsAtPeriodEnd.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/DebtorsAtPeriodEnd.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -53,7 +53,7 @@
$CustomerResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Customer Balances') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg(_('The customer details could not be retrieved by the SQL because') . DB_error_msg($db),'error');
Modified: trunk/FixedAssetItems.php
===================================================================
--- trunk/FixedAssetItems.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/FixedAssetItems.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -271,7 +271,7 @@
$DbgMsg = _('The SQL that was used to add the asset failed was');
$result = DB_query($sql, $ErrMsg, $DbgMsg);
- if (DB_error_no($db) ==0) {
+ if (DB_error_no() ==0) {
$NewAssetID = DB_Last_Insert_ID($db,'fixedassets', 'assetid');
prnMsg( _('The new asset has been added to the database with an asset code of:') . ' ' . $NewAssetID,'success');
unset($_POST['LongDescription']);
Modified: trunk/GLBalanceSheet.php
===================================================================
--- trunk/GLBalanceSheet.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/GLBalanceSheet.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -104,7 +104,7 @@
WHERE accountgroups.pandl=1";
$AccumProfitResult = DB_query($SQL);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The accumulated profits brought forward could not be calculated by the SQL because') . ' - ' . DB_error_msg($db) );
@@ -143,7 +143,7 @@
$AccountsResult = DB_query($SQL);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) );
Modified: trunk/GLProfit_Loss.php
===================================================================
--- trunk/GLProfit_Loss.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/GLProfit_Loss.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -181,7 +181,7 @@
$AccountsResult = DB_query($SQL);
- if (DB_error_no($db) != 0) {
+ if (DB_error_no() != 0) {
$Title = _('Profit and Loss') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) );
Modified: trunk/GLTagProfit_Loss.php
===================================================================
--- trunk/GLTagProfit_Loss.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/GLTagProfit_Loss.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -190,7 +190,7 @@
$AccountsResult = DB_query($SQL);
- if (DB_error_no($db) != 0) {
+ if (DB_error_no() != 0) {
$Title = _('Income and Expenditure') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) );
Modified: trunk/GLTrialBalance.php
===================================================================
--- trunk/GLTrialBalance.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/GLTrialBalance.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -159,7 +159,7 @@
chartdetails.accountcode";
$AccountsResult = DB_query($SQL);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Trial Balance') . ' - ' . _('Problem Report') . '....';
$ViewTopic = 'GeneralLedger';
$BookMark = 'TrialBalance';
Modified: trunk/InventoryPlanning.php
===================================================================
--- trunk/InventoryPlanning.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/InventoryPlanning.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -101,7 +101,7 @@
}
$InventoryResult = DB_query($SQL, '', '', false, false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -178,7 +178,7 @@
$SalesResult = DB_query($SQL,'','', false, false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -215,7 +215,7 @@
$DemandResult = DB_query($SQL, '', '', false , false);
$ListCount = DB_num_rows($DemandResult);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -264,7 +264,7 @@
$BOMDemandResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/InventoryPlanningPrefSupplier.php
===================================================================
--- trunk/InventoryPlanningPrefSupplier.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/InventoryPlanningPrefSupplier.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -179,7 +179,7 @@
$InventoryResult = DB_query($SQL, '', '', false, false);
$ListCount = DB_num_rows($InventoryResult);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -237,7 +237,7 @@
$SalesResult=DB_query($SQL,'','',FALSE,FALSE);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -264,7 +264,7 @@
$DemandResult = DB_query($SQL, '', '', false, false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -297,7 +297,7 @@
$BOMDemandResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/InventoryQuantities.php
===================================================================
--- trunk/InventoryQuantities.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/InventoryQuantities.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -80,7 +80,7 @@
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Quantities') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The Inventory Quantity report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/InventoryValuation.php
===================================================================
--- trunk/InventoryValuation.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/InventoryValuation.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -66,7 +66,7 @@
}
$InventoryResult = DB_query($SQL,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Valuation') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The inventory valuation could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/MRP.php
===================================================================
--- trunk/MRP.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/MRP.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -536,7 +536,7 @@
// Display parameters from last run
$sql = "SELECT * FROM mrpparameters";
$result = DB_query($sql,'','',false,false);
- if (DB_error_no($db)==0){
+ if (DB_error_no()==0){
$myrow = DB_fetch_array($result);
Modified: trunk/MRPPlannedPurchaseOrders.php
===================================================================
--- trunk/MRPPlannedPurchaseOrders.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/MRPPlannedPurchaseOrders.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -110,7 +110,7 @@
}
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('MRP Planned Purchase Orders') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The MRP planned purchase orders could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/MRPPlannedWorkOrders.php
===================================================================
--- trunk/MRPPlannedWorkOrders.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/MRPPlannedWorkOrders.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -102,7 +102,7 @@
}
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('MRP Planned Work Orders') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The MRP planned work orders could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/MRPReport.php
===================================================================
--- trunk/MRPReport.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/MRPReport.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -30,7 +30,7 @@
ORDER BY daterequired,whererequired";
$result = DB_query($sql,'','',False,False);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$errors = 1;
$holddb = $db;
$Title = _('Print MRP Report Error');
@@ -81,7 +81,7 @@
WHERE part = '" . $_POST['Part'] . "'
ORDER BY mrpdate";
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$errors = 1;
$holddb = $db;
}
@@ -115,7 +115,7 @@
TO_DAYS(duedate) - TO_DAYS(CURRENT_DATE) AS datediff
FROM mrpplannedorders WHERE part = '" . $_POST['Part'] . "' ORDER BY mrpdate";
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$errors = 1;
$holddb = $db;
}
Modified: trunk/MRPReschedules.php
===================================================================
--- trunk/MRPReschedules.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/MRPReschedules.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -41,7 +41,7 @@
ORDER BY mrpsupplies.part";
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('MRP Reschedules') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The MRP reschedules could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/MRPShortages.php
===================================================================
--- trunk/MRPShortages.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/MRPShortages.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -151,7 +151,7 @@
" ORDER BY '" . $_POST['Sort'] . "'";
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('MRP Shortages and Excesses') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The MRP shortages and excesses could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/MailInventoryValuation.php
===================================================================
--- trunk/MailInventoryValuation.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/MailInventoryValuation.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -115,7 +115,7 @@
$InventoryResult = DB_query($SQL,'','',false,true);
$ListCount = DB_num_rows($InventoryResult);
-if (DB_error_no($db) !=0) {
+if (DB_error_no() !=0) {
$Title = _('Inventory Valuation') . ' - ' . _('Problem Report');
include('includes/header.inc');
echo _('The inventory valuation could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db);
Modified: trunk/OutstandingGRNs.php
===================================================================
--- trunk/OutstandingGRNs.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/OutstandingGRNs.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -42,7 +42,7 @@
$GRNsResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Outstanding GRN Valuation') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg(_('The outstanding GRNs valuation details could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/PDFBankingSummary.php
===================================================================
--- trunk/PDFBankingSummary.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFBankingSummary.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -103,7 +103,7 @@
AND debtortrans.type=12";
$CustRecs=DB_query($SQL,'','',false,false);
- if (DB_error_no($db)!=0){
+ if (DB_error_no()!=0){
$Title = _('Create PDF Print-out For A Batch Of Receipts');
include ('includes/header.inc');
prnMsg(_('An error occurred getting the customer receipts for batch number') . ' ' . $_POST['BatchNo'],'error');
@@ -122,7 +122,7 @@
AND gltrans.account !='" . $_SESSION['CompanyRecord']['debtorsact'] . "'";
$GLRecs=DB_query($SQL,'','',false,false);
- if (DB_error_no($db)!=0){
+ if (DB_error_no()!=0){
$Title = _('Create PDF Print-out For A Batch Of Receipts');
include ('includes/header.inc');
prnMsg(_('An error occurred getting the GL receipts for batch number') . ' ' . $_POST['BatchNo'],'error');
Modified: trunk/PDFChequeListing.php
===================================================================
--- trunk/PDFChequeListing.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFChequeListing.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -102,7 +102,7 @@
AND transdate <='" . FormatDateForSQL($_POST['ToDate']) . "'";
$Result=DB_query($sql,'','',false,false);
-if (DB_error_no($db)!=0){
+if (DB_error_no()!=0){
$Title = _('Payment Listing');
include('includes/header.inc');
prnMsg(_('An error occurred getting the payments'),'error');
@@ -145,7 +145,7 @@
AND gltrans.type='" . $myrow['type'] . "'";
$GLTransResult = DB_query($sql,'','',false,false);
- if (DB_error_no($db)!=0){
+ if (DB_error_no()!=0){
$Title = _('Payment Listing');
include('includes/header.inc');
prnMsg(_('An error occurred getting the GL transactions'),'error');
Modified: trunk/PDFCustTransListing.php
===================================================================
--- trunk/PDFCustTransListing.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFCustTransListing.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -78,7 +78,7 @@
$result=DB_query($sql,'','',false,false);
-if (DB_error_no($db)!=0){
+if (DB_error_no()!=0){
$Title = _('Payment Listing');
include('includes/header.inc');
prnMsg(_('An error occurred getting the transactions'),'error');
Modified: trunk/PDFCustomerList.php
===================================================================
--- trunk/PDFCustomerList.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFCustomerList.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -228,7 +228,7 @@
$CustomersResult = DB_query($SQL);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Customer List') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The customer List could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db) );
Modified: trunk/PDFDIFOT.php
===================================================================
--- trunk/PDFDIFOT.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFDIFOT.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -186,7 +186,7 @@
$Result=DB_query($sql,'','',false,false); //dont error check - see below
-if (DB_error_no($db)!=0){
+if (DB_error_no()!=0){
$Title = _('DIFOT Report Error');
include('includes/header.inc');
prnMsg( _('An error occurred getting the days between delivery requested and actual invoice'),'error');
Modified: trunk/PDFDeliveryDifferences.php
===================================================================
--- trunk/PDFDeliveryDifferences.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFDeliveryDifferences.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -187,7 +187,7 @@
$Result=DB_query($sql,'','',false,false); //dont error check - see below
-if (DB_error_no($db)!=0){
+if (DB_error_no()!=0){
$Title = _('Delivery Differences Log Report Error');
include('includes/header.inc');
prnMsg( _('An error occurred getting the variances between deliveries and orders'),'error');
Modified: trunk/PDFLowGP.php
===================================================================
--- trunk/PDFLowGP.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFLowGP.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -52,7 +52,7 @@
$LowGPSalesResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
include('includes/header.inc');
prnMsg(_('The low GP items could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/PDFOrderStatus.php
===================================================================
--- trunk/PDFOrderStatus.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFOrderStatus.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -260,7 +260,7 @@
$Result=DB_query($sql,'','',false,false); //dont trap errors here
-if (DB_error_no($db)!=0){
+if (DB_error_no()!=0){
include('includes/header.inc');
echo '<br />' . _('An error occurred getting the orders details');
if ($debug==1){
Modified: trunk/PDFOrdersInvoiced.php
===================================================================
--- trunk/PDFOrdersInvoiced.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFOrdersInvoiced.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -248,7 +248,7 @@
$Result=DB_query($sql,'','',false,false); //dont trap errors here
-if (DB_error_no($db)!=0){
+if (DB_error_no()!=0){
include('includes/header.inc');
prnMsg(_('An error occurred getting the orders details'),'',_('Database Error'));
if ($debug==1){
Modified: trunk/PDFPeriodStockTransListing.php
===================================================================
--- trunk/PDFPeriodStockTransListing.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFPeriodStockTransListing.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -133,7 +133,7 @@
}
$result=DB_query($sql,'','',false,false);
-if (DB_error_no($db)!=0){
+if (DB_error_no()!=0){
$Title = _('Transaction Listing');
include('includes/header.inc');
prnMsg(_('An error occurred getting the transactions'),'error');
Modified: trunk/PDFPriceList.php
===================================================================
--- trunk/PDFPriceList.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFPriceList.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -147,7 +147,7 @@
}
$PricesResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Price List') . ' - ' . _('Problem Report....');
include('includes/header.inc');
prnMsg( _('The Price List could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error');
Modified: trunk/PDFPrintLabel.php
===================================================================
--- trunk/PDFPrintLabel.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFPrintLabel.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -40,7 +40,7 @@
$LabelsResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
prnMsg( _('The Price Labels could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error');
echo '<br /><a href="' .$RootPath .'/index.php">' . _('Back to the menu'). '</a>';
if ($debug==1){
Modified: trunk/PDFRemittanceAdvice.php
===================================================================
--- trunk/PDFRemittanceAdvice.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFRemittanceAdvice.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -76,7 +76,7 @@
$TransResult = DB_query($sql,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Remittance Advice Problem Report');
include('includes/header.inc');
prnMsg(_('The details of the payment to the supplier could not be retrieved because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/PDFSellThroughSupportClaim.php
===================================================================
--- trunk/PDFSellThroughSupportClaim.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFSellThroughSupportClaim.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -67,7 +67,7 @@
$ClaimsResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
include('includes/header.inc');
prnMsg(_('The sell through support items to claim could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/PDFStockCheckComparison.php
===================================================================
--- trunk/PDFStockCheckComparison.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFStockCheckComparison.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -29,7 +29,7 @@
stockcheckfreeze.stockid";
$StockChecks = DB_query($sql,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Stock Freeze') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
echo '<br />';
@@ -55,7 +55,7 @@
AND stockcounts.loccode='" . $myrow['loccode'] . "'";
$StockCounts = DB_query($sql);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Stock Count Comparison') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
echo '<br />';
@@ -261,7 +261,7 @@
$Counts = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Inventory Comparison') . ' - ' . _('Problem Report') . '.... ';
include('includes/header.inc');
echo '<br />';
Modified: trunk/PDFSuppTransListing.php
===================================================================
--- trunk/PDFSuppTransListing.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PDFSuppTransListing.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -76,7 +76,7 @@
$result=DB_query($sql,'','',false,false);
-if (DB_error_no($db)!=0){
+if (DB_error_no()!=0){
$Title = _('Payment Listing');
include('includes/header.inc');
prnMsg(_('An error occurred getting the payments'),'error');
Modified: trunk/PO_Items.php
===================================================================
--- trunk/PO_Items.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PO_Items.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -451,7 +451,7 @@
$ErrMsg = _('The account details for') . ' ' . $_POST['GLCode'] . ' ' . _('could not be retrieved because');
$DbgMsg = _('The SQL used to retrieve the details of the account, but failed was');
$GLValidResult = DB_query($sql,$ErrMsg,$DbgMsg,false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$AllowUpdate = false;
prnMsg( _('The validation process for the GL Code entered could not be executed because') . ' ' . DB_error_msg($db), 'error');
if ($debug==1){
Modified: trunk/PcReportTab.php
===================================================================
--- trunk/PcReportTab.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PcReportTab.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -97,7 +97,7 @@
$TabDetail = DB_query($SQL);
- if (DB_error_no($db)!=0){
+ if (DB_error_no()!=0){
include('includes/header.inc');
prnMsg(_('An error occurred getting the orders details'),'',_('Database Error'));
if ($debug==1){
Modified: trunk/Prices_Customer.php
===================================================================
--- trunk/Prices_Customer.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/Prices_Customer.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -151,7 +151,7 @@
//run the SQL from either of the above possibilites
if ($InputError!=1){
$result = DB_query($sql,'','',false,false);
- if (DB_error_no($db)!=0){
+ if (DB_error_no()!=0){
If ($msg==_('Price Updated')){
$msg = _('The price could not be updated because') . ' - ' . DB_error_msg($db);
} else {
Modified: trunk/PrintCustStatements.php
===================================================================
--- trunk/PrintCustStatements.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PrintCustStatements.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -57,7 +57,7 @@
FROM bankaccounts
WHERE bankaccounts.invoice = '1'";
$result=DB_query($sql,'','',false,false);
- if (DB_error_no($db)!=1) {
+ if (DB_error_no()!=1) {
if (DB_num_rows($result)==1){
$myrow = DB_fetch_array($result);
$DefaultBankAccountNumber = $myrow['bankaccountnumber'];
Modified: trunk/PrintCustTrans.php
===================================================================
--- trunk/PrintCustTrans.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PrintCustTrans.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -219,7 +219,7 @@
$result=DB_query($sql, '', '',false, false);
- if (DB_error_no($db)!=0) {
+ if (DB_error_no()!=0) {
$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');
@@ -273,7 +273,7 @@
} // end else
$result=DB_query($sql);
- if (DB_error_no($db)!=0 OR DB_num_rows($result)==0) {
+ if (DB_error_no()!=0 OR DB_num_rows($result)==0) {
$Title = _('Transaction Print Error Report');
include ('includes/header.inc');
@@ -698,7 +698,7 @@
}
$result=DB_query($sql);
- if (DB_num_rows($result)==0 OR DB_error_no($db)!=0) {
+ if (DB_num_rows($result)==0 OR DB_error_no()!=0) {
echo '<p>' . _('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');
if ($debug==1) {
echo _('The SQL used to get this information that failed was') . '<br />' . $sql;
@@ -881,7 +881,7 @@
echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>';
$result=DB_query($sql);
- if (DB_error_no($db)!=0) {
+ if (DB_error_no()!=0) {
echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database');
if ($debug==1){
echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' .$sql;
Modified: trunk/PrintCustTransPortrait.php
===================================================================
--- trunk/PrintCustTransPortrait.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PrintCustTransPortrait.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -90,7 +90,7 @@
FROM bankaccounts
WHERE bankaccounts.invoice = '1'";
$result=DB_query($sql,'','',false,false);
- if (DB_error_no($db)!=1) {
+ if (DB_error_no()!=1) {
if (DB_num_rows($result)==1){
$myrow = DB_fetch_array($result);
$DefaultBankAccountNumber = _('Account:') .' ' .$myrow['bankaccountnumber'];
@@ -240,7 +240,7 @@
$result=DB_query($sql,'','',false,false);
- if (DB_error_no($db)!=0) {
+ if (DB_error_no()!=0) {
$Title = _('Transaction Print Error Report');
include ('includes/header.inc');
@@ -299,7 +299,7 @@
} // end else
$result=DB_query($sql);
- if (DB_error_no($db)!=0) {
+ if (DB_error_no()!=0) {
$Title = _('Transaction Print Error Report');
include ('includes/header.inc');
echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database');
@@ -742,7 +742,7 @@
}
$result=DB_query($sql);
- if (DB_num_rows($result)==0 OR DB_error_no($db)!=0) {
+ if (DB_num_rows($result)==0 OR DB_error_no()!=0) {
echo '<p>' . _('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');
if ($debug==1){
prnMsg( _('The SQL used to get this information that failed was') . '<br />' . $sql,'warn');
@@ -933,7 +933,7 @@
echo '<div class="centre"><h4>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</h4></div>';
$result=DB_query($sql);
- if (DB_error_no($db)!=0) {
+ if (DB_error_no()!=0) {
echo '<br />' . _('There was a problem retrieving the invoice or credit note stock movement details for invoice number') . ' ' . $FromTransNo . ' ' . _('from the database');
if ($debug==1){
echo '<br />' . _('The SQL used to get this information that failed was') . '<br />' . $sql;
Modified: trunk/PurchaseByPrefSupplier.php
===================================================================
--- trunk/PurchaseByPrefSupplier.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/PurchaseByPrefSupplier.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -395,7 +395,7 @@
$ItemsResult = DB_query($SQL, '', '', false, false);
$ListCount = DB_num_rows($ItemsResult);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Supplier Ordering') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg(_('The supplier inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -443,7 +443,7 @@
AND (type=10 OR type=11)";
$SalesResult=DB_query($SQL,'','',FALSE,FALSE);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -467,7 +467,7 @@
$DemandResult = DB_query($SQL, '', '', false, false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -496,7 +496,7 @@
$BOMDemandResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
@@ -527,7 +527,7 @@
$TotalDemand = $DemandRow['qtydemand'] + $BOMDemandRow['dem'];
$OnOrdResult = DB_query($SQL, '', '', false, false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Preferred supplier purchasing') . ' - ' . _('Problem Report') . '....';
include('includes/header.inc');
prnMsg( _('The purchase order quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error');
Modified: trunk/ReorderLevel.php
===================================================================
--- trunk/ReorderLevel.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/ReorderLevel.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -56,7 +56,7 @@
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Reorder Level') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The Reorder Level report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/SalesGraph.php
===================================================================
--- trunk/SalesGraph.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/SalesGraph.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -294,7 +294,7 @@
$graph->SetPrecisionY($_SESSION['CompanyRecord']['decimalplaces']);
$SalesResult = DB_query($SQL);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
prnMsg(_('The sales graph data for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db),'error');
include('includes/footer.inc');
Modified: trunk/SelectCompletedOrder.php
===================================================================
--- trunk/SelectCompletedOrder.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/SelectCompletedOrder.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -420,7 +420,7 @@
$SalesOrdersResult = DB_query($SQL);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
prnMsg( _('No orders were returned by the SQL because') . ' ' . DB_error_msg($db), 'info');
echo '<br /> ' . $SQL;
}
Modified: trunk/ShipmentCosting.php
===================================================================
--- trunk/ShipmentCosting.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/ShipmentCosting.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -96,7 +96,7 @@
$ErrMsg = _('Shipment') . ' ' . $_GET['SelectedShipment'] . ' ' . _('Item costs cannot be retrieved from the database');
$GetShiptCostsResult = DB_query($sql);
-if (DB_error_no($db) !=0 OR DB_num_rows($GetShiptCostsResult)==0) {
+if (DB_error_no() !=0 OR DB_num_rows($GetShiptCostsResult)==0) {
echo '<br />';
prnMsg ( _('No Item Cost Records exist for Shipment') . ' ' . $_GET['SelectedShipment'] . ' ' . _('in the database'), 'error');
include ('includes/footer.inc');
Modified: trunk/StockCheck.php
===================================================================
--- trunk/StockCheck.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/StockCheck.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -39,7 +39,7 @@
stockmaster.mbflag!='D'";
$result = DB_query($sql,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Stock Count Sheets - Problem Report');
include('includes/header.inc');
prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg($db),'error');
@@ -61,7 +61,7 @@
AND stockcheckfreeze.loccode='" . $_POST['Location'] . "'";
$result = DB_query($sql,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Stock Freeze') . ' - ' . _('Problem Report') . '.... ';
include('includes/header.inc');
prnMsg(_('The old quantities could not be deleted from the freeze file because') . ' ' . DB_error_msg($db),'error');
@@ -92,7 +92,7 @@
AND stockmaster.mbflag!='D'";
$result = DB_query($sql,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Stock Freeze - Problem Report');
include('includes/header.inc');
prnMsg(_('The inventory quantities could not be added to the freeze file because') . ' ' . DB_error_msg($db),'error');
@@ -135,7 +135,7 @@
$InventoryResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Stock Sheets') . ' - ' . _('Problem Report') . '.... ';
include('includes/header.inc');
prnMsg( _('The inventory quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
@@ -188,7 +188,7 @@
$DemandResult = DB_query($SQL,'','',false, false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Stock Check Sheets - Problem Report');
include('includes/header.inc');
prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' ' . DB_error_msg($db), 'error');
@@ -218,7 +218,7 @@
AND salesorders.quotation=0";
$DemandResult = DB_query($sql,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
prnMsg(_('The demand for this product from') . ' ' . $myrow['loccode'] . ' ' . _('cannot be retrieved because') . ' - ' . DB_error_msg($db),'error');
if ($debug==1){
echo '<br />' . _('The SQL that failed was') . ' ' . $sql;
Modified: trunk/StockClone.php
===================================================================
--- trunk/StockClone.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/StockClone.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -317,7 +317,7 @@
$ErrMsg = _('The item could not be added because');
$DbgMsg = _('The SQL that was used to add the item failed was');
$result = DB_query($sql, $ErrMsg, $DbgMsg,'',true);
- if (DB_error_no($db) ==0) {
+ if (DB_error_no() ==0) {
//now insert the language descriptions
$ErrMsg = _('Could not update the language description because');
$DbgMsg = _('The SQL that was used to update the language description and failed was');
@@ -498,7 +498,7 @@
$Result = DB_Txn_Commit($db);
//finish up
- if (DB_error_no($db) ==0) {
+ if (DB_error_no() ==0) {
prnMsg( _('New cloned Item') .' ' . '<a href="SelectProduct.php?StockID=' . $_POST['StockID'] . '">' . $_POST['StockID'] . '</a> '. _('has been added to the database') .
'<br />' . _('We also attempted to setup item purchase data and pricing.'));
Modified: trunk/StockDispatch.php
===================================================================
--- trunk/StockDispatch.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/StockDispatch.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -120,7 +120,7 @@
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Stock Dispatch - Problem Report');
include('includes/header.inc');
prnMsg( _('The Stock Dispatch report could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/StockUsage.php
===================================================================
--- trunk/StockUsage.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/StockUsage.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -136,7 +136,7 @@
}
$MovtsResult = DB_query($sql);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
echo _('The stock usage for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db);
if ($debug==1){
echo '<br />' . _('The SQL that failed was') . $sql;
Modified: trunk/StockUsageGraph.php
===================================================================
--- trunk/StockUsageGraph.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/StockUsageGraph.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -47,7 +47,7 @@
ORDER BY periodno LIMIT 24";
}
$MovtsResult = DB_query($sql);
-if (DB_error_no($db) !=0) {
+if (DB_error_no() !=0) {
$Title = _('Stock Usage Graph Problem');
include ('includes/header.inc');
echo _('The stock usage for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db);
Modified: trunk/Stocks.php
===================================================================
--- trunk/Stocks.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/Stocks.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -626,7 +626,7 @@
$ErrMsg = _('The item could not be added because');
$DbgMsg = _('The SQL that was used to add the item failed was');
$result = DB_query($sql, $ErrMsg, $DbgMsg,'',true);
- if (DB_error_no($db) ==0) {
+ if (DB_error_no() ==0) {
//now insert the language descriptions
$ErrMsg = _('Could not update the language description because');
$DbgMsg = _('The SQL that was used to update the language description and failed was');
@@ -676,7 +676,7 @@
$DbgMsg = _('NB Locations records can be added by opening the utility page') . ' <i>Z_MakeStockLocns.php</i> ' . _('The SQL that was used to add the location records that failed was');
$InsResult = DB_query($sql,$ErrMsg,$DbgMsg,true);
DB_Txn_Commit($db);
- if (DB_error_no($db) ==0) {
+ if (DB_error_no() ==0) {
prnMsg( _('New Item') .' ' . '<a href="SelectProduct.php?StockID=' . $StockID . '">' . $StockID . '</a> '. _('has been added to the database') .
'<br />' . _('NB: The item cost and pricing must also be setup') .
'<br />' . '<a target="_blank" href="StockCostUpdate.php?StockID=' . $StockID . '">' . _('Enter Item Cost') . '</a>
Modified: trunk/SuppPaymentRun.php
===================================================================
--- trunk/SuppPaymentRun.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/SuppPaymentRun.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -105,7 +105,7 @@
supptrans.transno";
$TransResult = DB_query($sql,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Payment Run - Problem Report');
include('includes/header.inc');
prnMsg(_('The details of supplier invoices due could not be retrieved because') . ' - ' . DB_error_msg($db),'error');
@@ -179,7 +179,7 @@
AND transno = '" . $DetailTrans['transno'] . "'";
$ProcessResult = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Payment Processing - Problem Report') . '.... ';
include('includes/header.inc');
prnMsg(_('None of the payments will be processed since updates to the transaction records for') . ' ' .$SupplierName . ' ' . _('could not be processed because') . ' - ' . DB_error_msg($db),'error');
@@ -210,7 +210,7 @@
$ProcessResult = DB_Txn_Commit($db);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Payment Processing - Problem Report') . '.... ';
include('includes/header.inc');
prnMsg(_('None of the payments will be processed. Unfortunately, there was a problem committing the changes to the database because') . ' - ' . DB_error_msg($db),'error');
@@ -313,7 +313,7 @@
$AccountsResults = DB_query($SQL,'','',false,false);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
echo '<br />' . _('The bank accounts could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db);
if ($debug==1){
echo '<br />' . _('The SQL used to retrieve the bank accounts was') . ':<br />' . $SQL;
Modified: trunk/SuppPriceList.php
===================================================================
--- trunk/SuppPriceList.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/SuppPriceList.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -134,7 +134,7 @@
}
$result = DB_query($sql,'','',false,true);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Price List') . ' - ' . _('Problem Report');
include('includes/header.inc');
prnMsg( _('The Price List could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/SupplierBalsAtPeriodEnd.php
===================================================================
--- trunk/SupplierBalsAtPeriodEnd.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/SupplierBalsAtPeriodEnd.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -47,7 +47,7 @@
$SupplierResult = DB_query($SQL);
- if (DB_error_no($db) !=0) {
+ if (DB_error_no() !=0) {
$Title = _('Supplier Balances - Problem Report');
include('includes/header.inc');
prnMsg(_('The Supplier details could not be retrieved by the SQL because') . ' ' . DB_error_msg($db),'error');
Modified: trunk/Tax.php
===================================================================
--- trunk/Tax.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/Tax.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -50,7 +50,7 @@
$DebtorTransResult = DB_query($SQL,'','',false,false); //don't trap errors in DB_query
- if(DB_error_no($db) !=0) {
+ if(DB_error_no() !=0) {
$Title = _('Taxation Reporting Error');
include('includes/header.inc');
prnMsg(_('The accounts receivable transaction details could not be retrieved because') . ' ' . DB_error_msg($db),'error');
@@ -164,7 +164,7 @@
$SuppTransResult = DB_query($SQL,'','',false,false); //doint trap errors in DB_query
- if(DB_error_no($db) !=0) {
+ if(DB_error_no() !=0) {
$Title = _('Taxation Reporting Error');
include('includes/header.inc');
echo _('The accounts payable transaction details could not be retrieved because') . ' ' . DB_error_msg($db);
Modified: trunk/UpgradeDatabase.php
===================================================================
--- trunk/UpgradeDatabase.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/UpgradeDatabase.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -228,7 +228,7 @@
$sql = mb_substr($sql,0,mb_strlen($sql)-1);
$result = DB_query($sql, '','', false, false);
echo '<tr><td>' . $sql . '</td>';
- switch (DB_error_no($db)) {
+ switch (DB_error_no()) {
case 0:
echo '<td style="background-color:green">' . _('Success') . '</td></tr>';
break;
@@ -260,7 +260,7 @@
echo '<td style="background-color:yellow">' . _('Note').' - '. _('Index already dropped previously') . '</td></tr>';
break;
default:
- echo '<td style="background-color:red">' . _('Failure').' - '. _('Error number').' - '.DB_error_no($db) .' ' . DB_error_msg($db) . '</td></tr>';
+ echo '<td style="background-color:red">' . _('Failure').' - '. _('Error number').' - '.DB_error_no() .' ' . DB_error_msg() . '</td></tr>';
break;
}
$sql='';
Modified: trunk/Z_ChangeLocationCode.php
===================================================================
--- trunk/Z_ChangeLocationCode.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/Z_ChangeLocationCode.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -143,7 +143,7 @@
//check if MRP tables exist before assuming
$result = DB_query("SELECT COUNT(*) FROM mrpparameters",'','',false,false);
- if (DB_error_no($db)==0) {
+ if (DB_error_no()==0) {
echo '<br />' . _('Changing MRP parameters information');
$sql = "UPDATE mrpparameters SET location='" . $_POST['NewLocationID'] . "' WHERE location='" . $_POST['OldLocationID'] . "'";
$ErrMsg = _('The SQL to update the mrpparameters records failed');
Modified: trunk/Z_ChangeStockCode.php
===================================================================
--- trunk/Z_ChangeStockCode.php 2014-10-27 02:48:29 UTC (rev 6942)
+++ trunk/Z_ChangeStockCode.php 2014-10-27 07:06:42 UTC (rev 6943)
@@ -122,19 +122,19 @@
//check if MRP tables exist before assuming
$sql = "SELECT * FROM mrpparameters";
$result = DB_query($sql, '', '', false, false);
- if (DB_error_no($db) == 0) {
+ if (DB_error_no() == 0) {
$result = DB_query("SELECT COUNT(*) FROM mrpplannedorders",'','',false,false);
- if (DB_error_no($db)==0) {
+ if (DB_error_no()==0) {
ChangeFieldInTable("mrpplannedorders", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db);
}
$result = DB_query("SELECT * FROM mrprequirements" ,'','',false,false);
- if (DB_error_no($db)==0){
+ if (DB_error_no()==0){
ChangeFieldInTable("mrprequirements", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db);
}
$result = DB_query("SELECT * FROM mrpsupplies" ,'','',false,false);
- if (DB_error_no($db)==0){
+ if (DB_error_no()==0){
ChangeFieldInTable("mrpsupplies", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db);
...
[truncated message content] |