|
From: <dai...@us...> - 2014-10-27 07:21:00
|
Revision: 6945
http://sourceforge.net/p/web-erp/reponame/6945
Author: daintree
Date: 2014-10-27 07:20:48 +0000 (Mon, 27 Oct 2014)
Log Message:
-----------
removed all $db from DB_Txn_XXXXX($db) calls
Modified Paths:
--------------
trunk/BankReconciliation.php
trunk/ConfirmDispatch_Invoice.php
trunk/ContractCosting.php
trunk/Contracts.php
trunk/CopyBOM.php
trunk/CounterReturns.php
trunk/CounterSales.php
trunk/Credit_Invoice.php
trunk/Currencies.php
trunk/CustomerAllocations.php
trunk/CustomerReceipt.php
trunk/DeliveryDetails.php
trunk/Departments.php
trunk/FixedAssetDepreciation.php
trunk/FixedAssetItems.php
trunk/GLJournal.php
trunk/GoodsReceived.php
trunk/ImportBankTrans.php
trunk/InternalStockRequest.php
trunk/InternalStockRequestFulfill.php
trunk/PDFStockCheckComparison.php
trunk/PO_Items.php
trunk/Payments.php
trunk/PcAuthorizeExpenses.php
trunk/RecurringSalesOrders.php
trunk/RecurringSalesOrdersProcess.php
trunk/ReverseGRN.php
trunk/SelectCreditItems.php
trunk/SelectSalesOrder.php
trunk/ShipmentCosting.php
trunk/ShopParameters.php
trunk/SpecialOrder.php
trunk/StockAdjustments.php
trunk/StockClone.php
trunk/StockCostUpdate.php
trunk/StockLocTransfer.php
trunk/StockLocTransferReceive.php
trunk/StockTransfers.php
trunk/Stocks.php
trunk/SuppPaymentRun.php
trunk/SupplierAllocations.php
trunk/SupplierCredit.php
trunk/SupplierInvoice.php
trunk/SystemParameters.php
trunk/TaxCategories.php
trunk/UnitsOfMeasure.php
trunk/WOSerialNos.php
trunk/WorkOrderCosting.php
trunk/WorkOrderEntry.php
trunk/WorkOrderIssue.php
trunk/WorkOrderReceive.php
trunk/Z_BottomUpCosts.php
trunk/Z_ChangeBranchCode.php
trunk/Z_ChangeCustomerCode.php
trunk/Z_ChangeGLAccountCode.php
trunk/Z_ChangeLocationCode.php
trunk/Z_ChangeStockCategory.php
trunk/Z_ChangeStockCode.php
trunk/Z_ChangeSupplierCode.php
trunk/Z_CreateChartDetails.php
trunk/Z_DeleteCreditNote.php
trunk/Z_DeleteInvoice.php
trunk/Z_ImportDebtors.php
trunk/Z_ImportFixedAssets.php
trunk/Z_ImportGLTransactions.php
trunk/Z_ImportPriceList.php
trunk/Z_ImportStocks.php
trunk/Z_ImportSuppliers.php
trunk/api/api_debtortransactions.php
trunk/api/api_purchdata.php
trunk/api/api_salesorders.php
trunk/api/api_stock.php
trunk/api/api_workorders.php
trunk/includes/DefineTenderClass.php
trunk/includes/GLPostings.inc
trunk/includes/PDFPaymentRun_PymtFooter.php
trunk/includes/SQL_CommonFunctions.inc
Modified: trunk/BankReconciliation.php
===================================================================
--- trunk/BankReconciliation.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/BankReconciliation.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -53,7 +53,7 @@
/*Post the exchange difference to the last day of the month prior to current date*/
$PostingDate = Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, Date('m'), 0,Date('Y')));
$PeriodNo = GetPeriod($PostingDate,$db);
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
//yet to code the journal
@@ -92,7 +92,7 @@
$result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
prnMsg(_('Exchange difference of') . ' ' . locale_number_format($ExchangeDifference,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('has been posted'),'success');
} //end if the bank statement balance was numeric
}
Modified: trunk/ConfirmDispatch_Invoice.php
===================================================================
--- trunk/ConfirmDispatch_Invoice.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/ConfirmDispatch_Invoice.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -750,7 +750,7 @@
/*Start an SQL transaction */
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
if ($DefaultShipVia != $_SESSION['Items'.$identifier]->ShipVia){
$SQL = "UPDATE custbranch
@@ -1630,7 +1630,7 @@
EnsureGLEntriesBalance(10,$InvoiceNo,$db);
} /*end of if Sales and GL integrated */
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
// *************************************************************************
// E N D O F I N V O I C E S Q L P R O C E S S I N G
// *************************************************************************
Modified: trunk/ContractCosting.php
===================================================================
--- trunk/ContractCosting.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/ContractCosting.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -238,7 +238,7 @@
$ContractCloseNo = GetNextTransNo( 32 ,$db);
$PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db);
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
$SQL = "INSERT INTO gltrans (type,
typeno,
@@ -432,7 +432,7 @@
}//end if there was a row returned from the woitems query
} //end if the work order was still open (so end of closing it and processing receipt if necessary)
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
$_SESSION['Contract'.$identifier]->Status=3;
prnMsg(_('The contract has been closed. No further charges can be posted against this contract.'),'success');
Modified: trunk/Contracts.php
===================================================================
--- trunk/Contracts.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Contracts.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -529,7 +529,7 @@
$CustomerDetailsRow = DB_fetch_array($CustomerDetailsResult);
//start a DB transaction
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
$OrderNo = GetNextTransNo(30, $db);
$HeaderSQL = "INSERT INTO salesorders ( orderno,
debtorno,
@@ -600,7 +600,7 @@
WHERE contractref='" . DB_escape_string($_SESSION['Contract'.$identifier]->ContractRef) . "'";
$ErrMsg = _('Unable to update the contract status and order number because');
$UpdContractResult = DB_query($sql,$ErrMsg,$DbgMsg,true);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
$_SESSION['Contract'.$identifier]->Status=1;
$_SESSION['Contract'.$identifier]->OrderNo=$OrderNo;
prnMsg(_('The contract has been made into quotation number') . ' ' . $OrderNo,'info');
Modified: trunk/CopyBOM.php
===================================================================
--- trunk/CopyBOM.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/CopyBOM.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -30,7 +30,7 @@
$NewStockID = $_POST['ExStockID'];
}
if ($InputError==0){
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
if($NewOrExisting == 'N') {
/* duplicate rows into stockmaster */
@@ -150,7 +150,7 @@
$result = DB_query($sql);
}
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
UpdateCost($db, $NewStockID);
Modified: trunk/CounterReturns.php
===================================================================
--- trunk/CounterReturns.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/CounterReturns.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -903,7 +903,7 @@
// *************************************************************************
// S T A R T O F C R E D I T N O T E S Q L P R O C E S S I N G
// *************************************************************************
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
/*Now Get the next invoice number - GetNextTransNo() function in SQL_CommonFunctions
* GetPeriod() in includes/DateFunctions.inc */
@@ -1585,7 +1585,7 @@
$result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
} //end if $_POST['AmountPaid']!= 0
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
// *************************************************************************
// E N D O F C R E D I T N O T E S Q L P R O C E S S I N G
// *************************************************************************
Modified: trunk/CounterSales.php
===================================================================
--- trunk/CounterSales.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/CounterSales.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -1069,7 +1069,7 @@
// *************************************************************************
// S T A R T O F I N V O I C E S Q L P R O C E S S I N G
// *************************************************************************
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
/*First add the order to the database - it only exists in the session currently! */
$OrderNo = GetNextTransNo(30, $db);
$InvoiceNo = GetNextTransNo(10, $db);
@@ -2034,7 +2034,7 @@
$result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
} //end if $_POST['AmountPaid']!= 0
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
// *************************************************************************
// E N D O F I N V O I C E S Q L P R O C E S S I N G
// *************************************************************************
Modified: trunk/Credit_Invoice.php
===================================================================
--- trunk/Credit_Invoice.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Credit_Invoice.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -538,7 +538,7 @@
/*Start an SQL transaction */
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
$DefaultDispatchDate= FormatDateForSQL($DefaultDispatchDate);
@@ -1472,7 +1472,7 @@
} /*end of if Sales and GL integrated */
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
unset($_SESSION['CreditItems' . $identifier]->LineItems);
unset($_SESSION['CreditItems' . $identifier]);
Modified: trunk/Currencies.php
===================================================================
--- trunk/Currencies.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Currencies.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -134,7 +134,7 @@
}
//run the SQL from either of the above possibilites
$ExDiffTransNo = GetNextTransNo(36,$db);
- $resultTx = DB_Txn_Begin($db);
+ $resultTx = DB_Txn_Begin();
$result = DB_query($sql);
if ($InputError!=1){
@@ -219,7 +219,7 @@
}
}
}
- $resultTx = DB_Txn_Commit($db);
+ $resultTx = DB_Txn_Commit();
unset($SelectedCurrency);
unset($_POST['Country']);
Modified: trunk/CustomerAllocations.php
===================================================================
--- trunk/CustomerAllocations.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/CustomerAllocations.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -83,7 +83,7 @@
//========[ START TRANSACTION ]===========
//
$Error = '';
- $Result= DB_Txn_Begin($db);
+ $Result= DB_Txn_Begin();
$AllAllocations = 0;
foreach ($_SESSION['Alloc']->Allocs as $AllocnItem) {
if ($AllocnItem->PrevAllocRecordID != 'NA') {
@@ -197,9 +197,9 @@
//========[ COMMIT TRANSACTION ]===========
//
if (empty($Error) ) {
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
} else {
- $Result = DB_Txn_Rollback($db);
+ $Result = DB_Txn_Rollback();
prnMsg($Error,'error');
}
unset($_SESSION['Alloc']);
Modified: trunk/CustomerReceipt.php
===================================================================
--- trunk/CustomerReceipt.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/CustomerReceipt.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -255,7 +255,7 @@
$_SESSION['ReceiptBatch']->BatchNo = GetNextTransNo(12,$db);
/*Start a transaction to do the whole lot inside */
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$BatchReceiptsTotal = 0; //in functional currency
$BatchDiscount = 0; //in functional currency
@@ -572,7 +572,7 @@
$ErrMsg = _('Cannot commit the changes');
$DbgMsg = _('The SQL that failed was');
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
echo '<br />';
prnMsg( _('Receipt batch') . ' ' . $_SESSION['ReceiptBatch']->BatchNo . ' ' . _('has been successfully entered into the database'),'success');
Modified: trunk/DeliveryDetails.php
===================================================================
--- trunk/DeliveryDetails.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/DeliveryDetails.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -333,7 +333,7 @@
$QuotDate = FormatDateforSQL($_SESSION['Items'.$identifier]->QuoteDate);
$ConfDate = FormatDateforSQL($_SESSION['Items'.$identifier]->ConfirmedDate);
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
$OrderNo = GetNextTransNo(30, $db);
@@ -584,7 +584,7 @@
}//end if auto create WOs in on
} /* end inserted line items into sales order details */
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
echo '<br />';
if ($_SESSION['Items'.$identifier]->Quotation==1){
prnMsg(_('Quotation Number') . ' ' . $OrderNo . ' ' . _('has been entered'),'success');
@@ -653,7 +653,7 @@
$QuotDate = FormatDateforSQL($_SESSION['Items'.$identifier]->QuoteDate);
$ConfDate = FormatDateforSQL($_SESSION['Items'.$identifier]->ConfirmedDate);
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
/*see if this is a contract quotation being changed to an order? */
if ($_SESSION['Items'.$identifier]->Quotation==0) { //now its being changed? to an order
@@ -797,7 +797,7 @@
} /* updated line items into sales order details */
- $Result=DB_Txn_Commit($db);
+ $Result=DB_Txn_Commit();
$Quotation = $_SESSION['Items'.$identifier]->Quotation;
unset($_SESSION['Items'.$identifier]->LineItems);
unset($_SESSION['Items'.$identifier]);
Modified: trunk/Departments.php
===================================================================
--- trunk/Departments.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Departments.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -92,7 +92,7 @@
if ($InputError!=1){
//run the SQL from either of the above possibilites
if (is_array($sql)) {
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$ErrMsg = _('The department could not be inserted');
$DbgMsg = _('The sql that failed was') . ':';
foreach ($sql as $SQLStatement ) {
@@ -103,9 +103,9 @@
}
}
if ($InputError!=1){
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
} else {
- $result = DB_Txn_Rollback($db);
+ $result = DB_Txn_Rollback();
}
} else {
$result = DB_query($sql);
Modified: trunk/FixedAssetDepreciation.php
===================================================================
--- trunk/FixedAssetDepreciation.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/FixedAssetDepreciation.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -80,7 +80,7 @@
$InputError =true;
}
if (isset($_POST['CommitDepreciation']) AND $InputError==false){
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$TransNo = GetNextTransNo(44, $db);
$PeriodNo = GetPeriod($_POST['ProcessDate'],$db);
}
@@ -266,7 +266,7 @@
<br />';
if (isset($_POST['CommitDepreciation']) AND $InputError==false){
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
prnMsg(_('Depreciation') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success');
unset($_POST['ProcessDate']);
echo '<br /><a href="index.php">' ._('Return to main menu') . '</a>';
Modified: trunk/FixedAssetItems.php
===================================================================
--- trunk/FixedAssetItems.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/FixedAssetItems.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -127,7 +127,7 @@
if ($_POST['submit']==_('Update')) { /*so its an existing one */
/*Start a transaction to do the whole lot inside */
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
/*Need to check if changing the balance sheet codes - as will need to do journals for the cost and accum depn of the asset to the new category */
$result = DB_query("SELECT assetcategoryid,
@@ -279,7 +279,7 @@
unset($_POST['BarCode']);
unset($_POST['SerialNo']);
}//ALL WORKED SO RESET THE FORM VARIABLES
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
}
} else {
echo '<br />' . "\n";
@@ -315,7 +315,7 @@
prnMsg(_('There is a purchase order set up for this asset. The purchase order line must be deleted first'),'error');
}
if ($CancelDelete==0) {
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
/*Need to remove cost and accumulate depreciation from cost and accumdepn accounts */
$PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db);
@@ -366,7 +366,7 @@
$sql="DELETE FROM fixedassets WHERE assetid='" . $AssetID . "'";
$result=DB_query($sql, _('Could not delete the asset record'),'',true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
prnMsg(_('Deleted the asset record for asset number' ) . ' ' . $AssetID );
unset($_POST['LongDescription']);
@@ -382,7 +382,7 @@
} //end if OK Delete Asset
} /* end if delete asset */
-$result = DB_Txn_Commit($db);
+$result = DB_Txn_Commit();
echo '<form id="AssetForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">
<div>';
Modified: trunk/GLJournal.php
===================================================================
--- trunk/GLJournal.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/GLJournal.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -61,7 +61,7 @@
$PeriodNo = GetPeriod($_SESSION['JournalDetail']->JnlDate,$db);
/*Start a transaction to do the whole lot inside */
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$TransNo = GetNextTransNo( 0, $db);
@@ -114,7 +114,7 @@
$ErrMsg = _('Cannot commit the changes');
- $result= DB_Txn_Commit($db);
+ $result= DB_Txn_Commit();
prnMsg(_('Journal').' ' . $TransNo . ' '._('has been successfully entered'),'success');
Modified: trunk/GoodsReceived.php
===================================================================
--- trunk/GoodsReceived.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/GoodsReceived.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -386,7 +386,7 @@
/* *********************** BEGIN SQL TRANSACTIONS *********************** */
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
/*Now Get the next GRN - function in SQL_CommonFunctions*/
$GRN = GetNextTransNo(25, $db);
@@ -730,7 +730,7 @@
EnsureGLEntriesBalance(25, $GRN,$db);
}
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
$PONo = $_SESSION['PO'.$identifier]->OrderNo;
unset($_SESSION['PO'.$identifier]->LineItems);
unset($_SESSION['PO'.$identifier]);
Modified: trunk/ImportBankTrans.php
===================================================================
--- trunk/ImportBankTrans.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/ImportBankTrans.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -161,7 +161,7 @@
*/
for($i=1;$i<=count($_SESSION['Trans']);$i++){
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
if ($_SESSION['Trans'][$i]->DebtorNo!='' OR
$_SESSION['Trans'][$i]->SupplierID!='' OR
$_SESSION['Trans'][$i]->GLTotal == $_SESSION['Trans'][$i]->Amount){
@@ -452,7 +452,7 @@
_('The SQL that failed to insert the bank transaction was'),
true);
}
- DB_Txn_Commit($db); // complete this bank transactions posting
+ DB_Txn_Commit(); // complete this bank transactions posting
} //end loop around the transactions
echo '<p />';
prnMsg(_('Completed the importing of analysed bank transactions'),'info');
Modified: trunk/InternalStockRequest.php
===================================================================
--- trunk/InternalStockRequest.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/InternalStockRequest.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -60,7 +60,7 @@
}
if (isset($_POST['Submit'])) {
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
$InputError=0;
if ($_SESSION['Request']->Department=='') {
prnMsg( _('You must select a Department for the request'), 'error');
@@ -127,7 +127,7 @@
}
}
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
prnMsg( _('The internal stock request has been entered and now needs to be authorised'), 'success');
echo '<br /><div class="centre"><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?New=Yes">' . _('Create another request') . '</a></div>';
include('includes/footer.inc');
Modified: trunk/InternalStockRequestFulfill.php
===================================================================
--- trunk/InternalStockRequestFulfill.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/InternalStockRequestFulfill.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -42,7 +42,7 @@
$PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db);
$SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat']));
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
// Need to get the current location quantity will need it later for the stock movement
$SQL="SELECT locstock.quantity
@@ -166,7 +166,7 @@
$Result = DB_query($SQL, $ErrMsg, $DbgMsg,true);
}
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
$ConfirmationText = _('An internal stock request for'). ' ' . $StockID . ' ' . _('has been fulfilled from location').' ' . $Location .' '. _('for a quantity of') . ' ' . locale_number_format($Quantity, $DecimalPlaces ) ;
prnMsg( $ConfirmationText,'success');
Modified: trunk/PDFStockCheckComparison.php
===================================================================
--- trunk/PDFStockCheckComparison.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/PDFStockCheckComparison.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -79,7 +79,7 @@
if ($StockQtyDifference !=0){ // only adjust stock if there is an adjustment to make!!
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
// Need to get the current location quantity will need it later for the stock movement
$SQL="SELECT locstock.quantity
@@ -171,7 +171,7 @@
} //END INSERT GL TRANS
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Unable to COMMIT transaction while adjusting stock in StockCheckAdjustmet report');
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
} // end if $StockQtyDifference !=0
Modified: trunk/PO_Items.php
===================================================================
--- trunk/PO_Items.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/PO_Items.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -78,7 +78,7 @@
*/
if ($InputError!=1){
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
/*figure out what status to set the order to */
if (IsEmailAddress($_SESSION['UserEmail'])){
@@ -388,7 +388,7 @@
} /*end of if its a new order or an existing one */
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
/* Only show the link to auto receive the order if the user has permission to receive goods and permission to authorise and has authorised the order */
if ($_SESSION['PO'.$identifier]->Status == 'Authorised'
AND in_array($_SESSION['PageSecurityArray']['GoodsReceived.php'], $_SESSION['AllowedPageSecurityTokens'])){
Modified: trunk/Payments.php
===================================================================
--- trunk/Payments.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Payments.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -319,7 +319,7 @@
//Start a transaction to do the whole lot inside
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
if ($_SESSION['PaymentDetail' . $identifier]->SupplierID=='') {
@@ -589,7 +589,7 @@
$DbgMsg = _('Cannot insert a bank transaction using the SQL');
$result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
prnMsg(_('Payment') . ' ' . $TransNo . ' ' . _('has been successfully entered'),'success');
$LastSupplier = ($_SESSION['PaymentDetail' . $identifier]->SupplierID);
Modified: trunk/PcAuthorizeExpenses.php
===================================================================
--- trunk/PcAuthorizeExpenses.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/PcAuthorizeExpenses.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -141,7 +141,7 @@
//build narrative
$Narrative= _('PettyCash') . ' - '. $myrow['tabcode'] . ' - ' . $myrow['codeexpense'] . ' - ' . DB_escape_string($myrow['notes']) . ' - ' . $myrow['receipt'];
//insert to gltrans
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
$sqlFrom="INSERT INTO `gltrans` (`counterindex`,
`type`,
@@ -232,7 +232,7 @@
posted = 1
WHERE counterindex = '".$myrow['counterindex']."'";
$resultupdate = DB_query($sql, '', '', true);
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
}
if ($k==1){
Modified: trunk/RecurringSalesOrders.php
===================================================================
--- trunk/RecurringSalesOrders.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/RecurringSalesOrders.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -189,7 +189,7 @@
exit;
}
If (isset($_POST['Process'])) {
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
$InputErrors =0;
If (!Is_Date($_POST['StartDate'])){
$InputErrors =1;
@@ -290,7 +290,7 @@
} /* inserted line items into sales order details */
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
prnmsg(_('The new recurring order template has been added'),'success');
} else { /* must be updating an existing recurring order */
Modified: trunk/RecurringSalesOrdersProcess.php
===================================================================
--- trunk/RecurringSalesOrdersProcess.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/RecurringSalesOrdersProcess.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -89,7 +89,7 @@
$EmailText ='';
echo '<br />' . _('Recurring order') . ' ' . $RecurrOrderRow['recurrorderno'] . ' ' . _('for') . ' ' . $RecurrOrderRow['debtorno'] . ' - ' . $RecurrOrderRow['branchcode'] . ' ' . _('is being processed');
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
/*the last recurrence was the date of the last time the order recurred
the frequency is the number of times per annum that the order should recurr
@@ -197,7 +197,7 @@
$ErrMsg = _('Could not update the last recurrence of the recurring order template. The database reported the error:');
$Result = DB_query($sql,$ErrMsg,true);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
prnMsg(_('Recurring order was created for') . ' ' . $RecurrOrderRow['name'] . ' ' . _('with order Number') . ' ' . $OrderNo, 'success');
@@ -241,7 +241,7 @@
$PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db);
/*Start an SQL transaction */
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$TotalFXNetInvoice = 0;
$TotalFXTax = 0;
@@ -695,7 +695,7 @@
$DbgMsg = _('The following SQL to insert the debtor transaction taxes record was used');
$Result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
prnMsg(_('Invoice number'). ' '. $InvoiceNo .' '. _('processed'),'success');
Modified: trunk/ReverseGRN.php
===================================================================
--- trunk/ReverseGRN.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/ReverseGRN.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -115,7 +115,7 @@
/*Start an SQL transaction */
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
$PeriodNo = GetPeriod(ConvertSQLDate($GRN['deliverydate']), $db);
@@ -332,7 +332,7 @@
} /* end of if GL and stock integrated*/
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
echo '<br />' . _('GRN number') . ' ' . $_GET['GRNNo'] . ' ' . _('for') . ' ' . $QtyToReverse . ' x ' . $GRN['itemcode'] . ' - ' . $GRN['itemdescription'] . ' ' . _('has been reversed') . '<br />';
unset($_GET['GRNNo']); // to ensure it cant be done again!!
Modified: trunk/SelectCreditItems.php
===================================================================
--- trunk/SelectCreditItems.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/SelectCreditItems.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -1125,7 +1125,7 @@
$PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db);
/*Start an SQL transaction */
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
/*Now insert the Credit Note into the DebtorTrans table allocations will have to be done seperately*/
@@ -1988,7 +1988,7 @@
} /*end of if Sales and GL integrated */
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
unset($_SESSION['CreditItems'.$identifier]->LineItems);
unset($_SESSION['CreditItems'.$identifier]);
Modified: trunk/SelectSalesOrder.php
===================================================================
--- trunk/SelectSalesOrder.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/SelectSalesOrder.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -231,11 +231,11 @@
if ($SupplierID !=''){ //then we have just added a purchase order
echo '<br />';
prnMsg(_('Purchase Order') . ' ' . $PO_OrderNo . ' ' . _('on') . ' ' . $SupplierID . ' ' . _('has been created'),'success');
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
}
/*Starting a new purchase order with a different supplier */
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$PO_OrderNo = GetNextTransNo(18, $db); //get the next PO number
@@ -394,7 +394,7 @@
if ($SupplierID !=''){ //then we have just added a purchase order irrespective of autoauthorise status
echo '<br />';
prnMsg(_('Purchase Order') . ' ' . $PO_OrderNo . ' ' . _('on') . ' ' . $SupplierID . ' ' . _('has been created'),'success');
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
}
$result = DB_query("UPDATE salesorders SET poplaced=1 WHERE " . $OrdersToPlacePOFor);
}/*There were items that had purchasing data set up to create POs for */
Modified: trunk/ShipmentCosting.php
===================================================================
--- trunk/ShipmentCosting.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/ShipmentCosting.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -136,7 +136,7 @@
if (isset($_POST['Close'])){
/*Set up a transaction to buffer all updates or none */
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db);
}
@@ -697,7 +697,7 @@
TRUE);
$result = DB_query("UPDATE shipments SET closed=1 WHERE shiptref='" .$_GET['SelectedShipment']. "'",_('Could not update the shipment to closed'),'',TRUE);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
echo '<br /><br />';
prnMsg( _('Shipment'). ' ' . $_GET['SelectedShipment'] . ' ' . _('has been closed') );
Modified: trunk/ShopParameters.php
===================================================================
--- trunk/ShopParameters.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/ShopParameters.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -170,11 +170,11 @@
if (sizeof($SQL) > 0 ) {
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
foreach ($SQL as $SqlLine) {
$result = DB_query($SqlLine,$ErrMsg,$DbgMsg,true);
}
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
prnMsg( _('Shop configuration updated'),'success');
$ForceConfigReload = True; // Required to force a load even if stored in the session vars
Modified: trunk/SpecialOrder.php
===================================================================
--- trunk/SpecialOrder.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/SpecialOrder.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -345,7 +345,7 @@
$StkLocAddResult = DB_query($sql);
$StkLocAddress = DB_fetch_array($StkLocAddResult);
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
/*Insert to purchase order header record */
$sql = "INSERT INTO purchorders (supplierno,
@@ -578,7 +578,7 @@
}
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
unset($_SESSION['SPL'.$identifier]); /*Clear the PO data to allow a newy to be input*/
echo '<br /><br /><a href="' . $RootPath . '/SpecialOrder.php">' . _('Enter A New Special Order') . '</a>';
exit;
Modified: trunk/StockAdjustments.php
===================================================================
--- trunk/StockAdjustments.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/StockAdjustments.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -195,7 +195,7 @@
$PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db);
$SQLAdjustmentDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat']));
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
// Need to get the current location quantity will need it later for the stock movement
$SQL="SELECT locstock.quantity
@@ -364,7 +364,7 @@
EnsureGLEntriesBalance(17, $AdjustmentNumber,$db);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
$ConfirmationText = _('A stock adjustment for'). ' ' . $_SESSION['Adjustment' . $identifier]->StockID . ' - ' . $_SESSION['Adjustment' . $identifier]->ItemDescription . ' '._('has been created from location').' ' . $_SESSION['Adjustment' . $identifier]->StockLocation .' '. _('for a quantity of') . ' ' . locale_number_format($_SESSION['Adjustment' . $identifier]->Quantity,$_SESSION['Adjustment' . $identifier]->DecimalPlaces) ;
prnMsg( $ConfirmationText,'success');
Modified: trunk/StockClone.php
===================================================================
--- trunk/StockClone.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/StockClone.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -272,7 +272,7 @@
$Errors[$i] = 'DuplicateStockID';
//exit;
} else {
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
$sql = "INSERT INTO stockmaster (stockid,
description,
longdescription,
@@ -367,7 +367,7 @@
$ErrMsg = _('The locations for the item') . ' ' . $_POST['StockID'] . ' ' . _('could not be added because');
$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);
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
//check for any purchase data
$sql = "SELECT purchdata.supplierno,
suppliers.suppname,
@@ -485,7 +485,7 @@
$OldRow = DB_fetch_array($OldResult);
//now update cloned item costs
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
$SQL = "UPDATE stockmaster SET materialcost='" . $OldRow['materialcost'] . "',
labourcost ='" . $OldRow['labourcost'] . "',
overheadcost ='" . $OldRow['overheadcost'] . "',
@@ -495,7 +495,7 @@
$ErrMsg = _('The cost details for the cloned stock item could not be updated because');
$DbgMsg = _('The SQL that failed was');
$Result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
//finish up
if (DB_error_no() ==0) {
Modified: trunk/StockCostUpdate.php
===================================================================
--- trunk/StockCostUpdate.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/StockCostUpdate.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -64,7 +64,7 @@
prnMsg (_('The entered item code does not exist'),'error',_('Non-existent Item'));
} elseif ($OldCost != $NewCost){
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $_POST['QOH']);
$SQL = "UPDATE stockmaster SET materialcost='" . filter_number_format($_POST['MaterialCost']) . "',
@@ -78,7 +78,7 @@
$DbgMsg = _('The SQL that failed was');
$Result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
UpdateCost($db, $StockID); //Update any affected BOMs
}
Modified: trunk/StockLocTransfer.php
===================================================================
--- trunk/StockLocTransfer.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/StockLocTransfer.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -189,7 +189,7 @@
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to BEGIN Location Transfer transaction');
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
for ($i=0;$i < $_POST['LinesCounter'];$i++){
@@ -216,7 +216,7 @@
}
}
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('Unable to COMMIT Location Transfer transaction');
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
prnMsg( _('The inventory transfer records have been created successfully'),'success');
echo '<p><a href="'.$RootPath.'/PDFStockLocTransfer.php?TransferNo=' . $_POST['Trf_ID'] . '">' . _('Print the Transfer Docket'). '</a></p>';
Modified: trunk/StockLocTransferReceive.php
===================================================================
--- trunk/StockLocTransferReceive.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/StockLocTransferReceive.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -65,7 +65,7 @@
foreach ($_SESSION['Transfer']->TransferItem AS $TrfLine) {
if ($TrfLine->Quantity >=0){
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
/* Need to get the current location quantity will need it later for the stock movement */
$SQL="SELECT locstock.quantity
@@ -358,7 +358,7 @@
} /*end of foreach TransferItem */
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Unable to COMMIT the Stock Transfer transaction');
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
unset($_SESSION['Transfer']->LineItem);
unset($_SESSION['Transfer']);
Modified: trunk/StockTransfers.php
===================================================================
--- trunk/StockTransfers.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/StockTransfers.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -189,7 +189,7 @@
$PeriodNo = GetPeriod (Date($_SESSION['DefaultDateFormat']), $db);
$SQLTransferDate = FormatDateForSQL(Date($_SESSION['DefaultDateFormat']));
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
// Need to get the current location quantity will need it later for the stock movement
$SQL="SELECT locstock.quantity
@@ -443,7 +443,7 @@
$DbgMsg = _('The following SQL to update the location stock record was used');
$Result = DB_query($SQL,$ErrMsg, $DbgMsg, true);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
prnMsg(_('An inventory transfer of').' ' . $_SESSION['Transfer']->TransferItem[0]->StockID . ' - ' . $_SESSION['Transfer']->TransferItem[0]->ItemDescription . ' '. _('has been created from').' ' . $_SESSION['Transfer']->StockLocationFrom . ' '. _('to') . ' ' . $_SESSION['Transfer']->StockLocationTo . ' '._('for a quantity of').' ' . $_SESSION['Transfer']->TransferItem[0]->Quantity,'success');
echo '<br /><a href="PDFStockTransfer.php?TransferNo='.$TransferNumber.'">' . _('Print Transfer Note') . '</a>';
Modified: trunk/Stocks.php
===================================================================
--- trunk/Stocks.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Stocks.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -394,7 +394,7 @@
if ($InputError == 0){
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
$sql = "UPDATE stockmaster
SET longdescription='" . $_POST['LongDescription'] . "',
@@ -564,7 +564,7 @@
$result = DB_query($SQL, $ErrMsg, $DbgMsg,true);
}
} /* end if the stock category changed and forced a change in WIP account */
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
prnMsg( _('Stock Item') . ' ' . $StockID . ' ' . _('has been updated'), 'success');
echo '<br />';
}
@@ -581,7 +581,7 @@
$Errors[$i] = 'StockID';
$i++;
} else {
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
$sql = "INSERT INTO stockmaster (stockid,
description,
longdescription,
@@ -675,7 +675,7 @@
$ErrMsg = _('The locations for the item') . ' ' . $StockID . ' ' . _('could not be added because');
$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);
+ DB_Txn_Commit();
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') .
@@ -799,7 +799,7 @@
}
if ($CancelDelete==0) {
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
/*Deletes LocStock records*/
$sql ="DELETE FROM locstock WHERE stockid='".$StockID."'";
@@ -822,7 +822,7 @@
$sql="DELETE FROM stockmaster WHERE stockid='".$StockID."'";
$result=DB_query($sql, _('Could not delete the item record'),'',true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
prnMsg(_('Deleted the stock master record for') . ' ' . $StockID . '....' .
'<br />. . ' . _('and all the location stock records set up for the part') .
Modified: trunk/SuppPaymentRun.php
===================================================================
--- trunk/SuppPaymentRun.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/SuppPaymentRun.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -67,7 +67,7 @@
if (isset($_POST['PrintPDFAndProcess'])){
- $ProcessResult = DB_Txn_Begin($db);
+ $ProcessResult = DB_Txn_Begin();
}
while ($SuppliersToPay = DB_fetch_array($SuppliersResult)){
@@ -187,7 +187,7 @@
if ($debug==1){
echo '<br />' . _('The SQL that failed was') . $SQL;
}
- $ProcessResult = DB_Txn_Rollback($db);
+ $ProcessResult = DB_Txn_Rollback();
include('includes/footer.inc');
exit;
}
@@ -208,7 +208,7 @@
/*All the payment processing is in the below file */
include('includes/PDFPaymentRun_PymtFooter.php');
- $ProcessResult = DB_Txn_Commit($db);
+ $ProcessResult = DB_Txn_Commit();
if (DB_error_no() !=0) {
$Title = _('Payment Processing - Problem Report') . '.... ';
@@ -218,7 +218,7 @@
if ($debug==1){
prnMsg(_('The SQL that failed was') . '<br />' . $SQL,'error');
}
- $ProcessResult = DB_Txn_Rollback($db);
+ $ProcessResult = DB_Txn_Rollback();
include('includes/footer.inc');
exit;
}
Modified: trunk/SupplierAllocations.php
===================================================================
--- trunk/SupplierAllocations.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/SupplierAllocations.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -103,7 +103,7 @@
/* actions to take having checked that the input is sensible
1st set up a transaction on this thread*/
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
foreach ($_SESSION['Alloc']->Allocs as $AllocnItem) {
@@ -246,7 +246,7 @@
/* OK Commit the transaction */
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
/*finally delete the session variables holding all the previous data */
Modified: trunk/SupplierCredit.php
===================================================================
--- trunk/SupplierCredit.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/SupplierCredit.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -667,7 +667,7 @@
/*Start an SQL transaction */
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
/*Get the next transaction number for internal purposes and the period to post GL transactions in based on the credit note date*/
@@ -1324,7 +1324,7 @@
$Result = DB_query($SQL,$ErrMsg, $DbgMsg, true);
} //end of non-gl fixed asset stuff
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
prnMsg(_('Supplier credit note number') . ' ' . $CreditNoteNo . ' ' . _('has been processed'),'success');
echo '<br /><div class="centre"><a href="' . $RootPath . '/SupplierCredit.php?&SupplierID=' .$_SESSION['SuppTrans']->SupplierID . '">' . _('Enter another Credit Note for this Supplier') . '</a></div>';
Modified: trunk/SupplierInvoice.php
===================================================================
--- trunk/SupplierInvoice.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/SupplierInvoice.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -149,7 +149,7 @@
include('includes/PO_ReadInOrder.inc');
if ($_SESSION['PO'.$identifier]->Status == 'Authorised'){
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
/*Now Get the next GRN - function in SQL_CommonFunctions*/
$GRN = GetNextTransNo(25, $db);
if (!isset($_GET['DeliveryDate'])){
@@ -432,7 +432,7 @@
EnsureGLEntriesBalance(25, $GRN,$db);
}
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
//Now add all these deliveries to this purchase invoice
@@ -1048,7 +1048,7 @@
/* SQL to process the postings for purchase invoice */
/*Start an SQL transaction */
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
/*Get the next transaction number for internal purposes and the period to post GL transactions in based on the invoice date*/
$InvoiceNo = GetNextTransNo(20, $db);
@@ -1876,7 +1876,7 @@
$Result = DB_query($SQL,$ErrMsg, $DbgMsg, true);
} //end of non-gl fixed asset stuff
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
prnMsg(_('Supplier invoice number') . ' ' . $InvoiceNo . ' ' . _('has been processed'),'success');
echo '<br />
Modified: trunk/SystemParameters.php
===================================================================
--- trunk/SystemParameters.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/SystemParameters.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -335,11 +335,11 @@
}
$ErrMsg = _('The system configuration could not be updated because');
if (sizeof($sql) > 1 ) {
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
foreach ($sql as $line) {
$result = DB_query($line,$ErrMsg);
}
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
} elseif(sizeof($sql)==1) {
$result = DB_query($sql,$ErrMsg);
}
Modified: trunk/TaxCategories.php
===================================================================
--- trunk/TaxCategories.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/TaxCategories.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -79,7 +79,7 @@
$InputError = 1;
prnMsg( _('The tax category cannot be created because another with the same name already exists'),'error');
} else {
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$sql = "INSERT INTO taxcategories (
taxcatname )
VALUES (
@@ -99,7 +99,7 @@
FROM taxauthorities CROSS JOIN taxprovinces";
$result = DB_query($sql,$ErrMsg,true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
}
$msg = _('New tax category added');
}
Modified: trunk/UnitsOfMeasure.php
===================================================================
--- trunk/UnitsOfMeasure.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/UnitsOfMeasure.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -90,7 +90,7 @@
if ($InputError!=1){
//run the SQL from either of the above possibilites
if (is_array($sql)) {
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
$tmpErr = _('Could not update unit of measure');
$tmpDbg = _('The sql that failed was') . ':';
foreach ($sql as $stmt ) {
@@ -101,9 +101,9 @@
}
}
if ($InputError!=1){
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
} else {
- $result = DB_Txn_Rollback($db);
+ $result = DB_Txn_Rollback();
}
} else {
$result = DB_query($sql);
Modified: trunk/WOSerialNos.php
===================================================================
--- trunk/WOSerialNos.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/WOSerialNos.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -53,7 +53,7 @@
if (!is_numeric(filter_number_format($_POST['NumberToAdd']))){
prnMsg(_('The quantity of controlled items to add was not numeric - a number is expected'),'error');
} else {
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
/*Process the additional controlled items into woserialnos and update the quantity on the work order order in woitems*/
$InputError = false;
@@ -106,7 +106,7 @@
$ErrMsg,
$DbgMsg,
true);
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
}
} // end Adding a number of serial numbers automatically
else { //adding just an individual entry
@@ -135,7 +135,7 @@
prnMsg(_('The serial number or batch reference must be unique to the item. The serial number/batch entered already exists'),'error');
}
if (!$InputError){
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
$ErrMsg = _('Could not add a new serial number/batch');
$result = DB_query("UPDATE woitems
SET qtyreqd=qtyreqd+" . filter_number_format($_POST['Quantity']) . "
@@ -158,7 +158,7 @@
$ErrMsg = _('Unable to add the batch or serial number requested');
$result = DB_query($sql,$ErrMsg,$DbgMsg,true);
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
}
}
}
@@ -224,7 +224,7 @@
}//end loop around all serial numbers/batches
$ErrMsg = _('Could not update serial/batches on the work order');
if (sizeof($sql)>0){
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
foreach ($sql as $SQLStatement){
$result = DB_query($SQLStatement,$ErrMsg,$DbgMsg,true);
}
@@ -234,7 +234,7 @@
$ErrMsg,
$DbgMsg,
true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
}
}
Modified: trunk/WorkOrderCosting.php
===================================================================
--- trunk/WorkOrderCosting.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/WorkOrderCosting.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -319,7 +319,7 @@
$TotalVariance = $TotalUsageVar + $TotalCostVar;
$PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']), $db);
$WOCloseNo = GetNextTransNo(29, $db);
- $TransResult = DB_Txn_Begin($db);
+ $TransResult = DB_Txn_Begin();
while ($WORow = DB_fetch_array($WOItemsResult)){
if ($TotalStdValueRecd==0){
@@ -522,7 +522,7 @@
_('Could not delete the predefined work order serial numbers'),
_('The SQL used to delete the predefined serial numbers was:'),
true);
- $TransResult = DB_Txn_Commit($db);
+ $TransResult = DB_Txn_Commit();
if ($_SESSION['CompanyRecord']['gllink_stock']==1){
if ($_SESSION['WeightedAverageCosting']==1){
prnMsg(_('The item cost as calculated from the work order has been applied against the weighted average cost and the necessary GL journals created to update stock as a result of closing this work order'),'success');
Modified: trunk/WorkOrderEntry.php
===================================================================
--- trunk/WorkOrderEntry.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/WorkOrderEntry.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -298,7 +298,7 @@
$EOQ=1;
}
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
// insert parent item info
$SQL = "INSERT INTO woitems (wo,
@@ -317,7 +317,7 @@
//Recursively insert real component requirements - see includes/SQL_CommonFunctions.in for function WoRealRequirements
WoRealRequirements($db, $_POST['WO'], $_POST['StockLocation'], $NewItem);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
unset($NewItem);
} //end if there were no input errors
@@ -445,7 +445,7 @@
}
if ($CancelDelete==false) { //ie all tests proved ok to delete
- DB_Txn_Begin($db);
+ DB_Txn_Begin();
$ErrMsg = _('The work order could not be deleted');
$DbgMsg = _('The SQL used to delete the work order was');
//delete the worequirements
@@ -463,7 +463,7 @@
$ErrMsg=_('The work order could not be deleted');
$result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
prnMsg(_('The work order has been cancelled'),'success');
Modified: trunk/WorkOrderIssue.php
===================================================================
--- trunk/WorkOrderIssue.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/WorkOrderIssue.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -147,7 +147,7 @@
/************************ BEGIN SQL TRANSACTIONS ************************/
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
/*Now Get the next WO Issue transaction type 28 - function in SQL_CommonFunctions*/
$WOIssueNo = GetNextTransNo(28, $db);
@@ -369,7 +369,7 @@
true);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
prnMsg(_('The issue of') . ' ' . $QuantityIssued . ' ' . _('of') . ' ' . $_POST['IssueItem'] . ' ' . _('against work order') . ' '. $_POST['WO'] . ' ' . _('has been processed'),'info');
echo '<p><ul><li><a href="' . $RootPath . '/WorkOrderIssue.php?WO=' . $_POST['WO'] . '&StockID=' . $_POST['StockID'] . '">' . _('Issue more components to this work order') . '</a></li>';
Modified: trunk/WorkOrderReceive.php
===================================================================
--- trunk/WorkOrderReceive.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/WorkOrderReceive.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -190,7 +190,7 @@
if ($InputError==false){
/************************ BEGIN SQL TRANSACTIONS ************************/
- $Result = DB_Txn_Begin($db);
+ $Result = DB_Txn_Begin();
/*Now Get the next WOReceipt transaction type 26 - function in SQL_CommonFunctions*/
$WOReceiptNo = GetNextTransNo(26, $db);
@@ -731,7 +731,7 @@
true);
- $Result = DB_Txn_Commit($db);
+ $Result = DB_Txn_Commit();
prnMsg(_('The receipt of') . ' ' . $QuantityReceived . ' ' . $WORow['units'] . ' ' . _('of') . ' ' . $_POST['StockID'] . ' - ' . $WORow['description'] . ' ' . _('against work order') . ' '. $_POST['WO'] . ' ' . _('has been processed'),'info');
echo '<a href="' . $RootPath . '/SelectWorkOrder.php">' . _('Select a different work order for receiving finished stock against'). '</a>';
Modified: trunk/Z_BottomUpCosts.php
===================================================================
--- trunk/Z_BottomUpCosts.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_BottomUpCosts.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -38,9 +38,9 @@
if ($inputerror == 1) { //exited loop with errors so rollback
prnMsg(_('Failed on item') . ' ' . $item['component']. ' ' . _('Cost update has been rolled back'),'error');
- DB_Txn_Rollback($db);
+ DB_Txn_Rollback();
} else { //all good so commit data transaction
- DB_Txn_Commit($db);
+ DB_Txn_Commit();
prnMsg( _('All cost updates committed to the database.'),'success');
}
Modified: trunk/Z_ChangeBranchCode.php
===================================================================
--- trunk/Z_ChangeBranchCode.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_ChangeBranchCode.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -40,7 +40,7 @@
}
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
prnMsg(_('Inserting the new customer branches master record'),'info');
$sql = "INSERT INTO custbranch (`branchcode`,
@@ -178,7 +178,7 @@
$ErrMsg = _('The SQL to update contract header records failed because');
$result = DB_query($sql,$ErrMsg,$DbgMsg,true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
$result = DB_IgnoreForeignKeys($db);
prnMsg(_('Deleting the old customer branch record'),'info');
Modified: trunk/Z_ChangeCustomerCode.php
===================================================================
--- trunk/Z_ChangeCustomerCode.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_ChangeCustomerCode.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -30,7 +30,7 @@
exit;
}
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
prnMsg(_('Inserting the new debtors master record'),'info');
$sql = "INSERT INTO debtorsmaster (`debtorno`,
@@ -218,7 +218,7 @@
$result = DB_query($sql,$ErrMsg,$DbgMsg,true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
$result = DB_ReinstateForeignKeys($db);
}
Modified: trunk/Z_ChangeGLAccountCode.php
===================================================================
--- trunk/Z_ChangeGLAccountCode.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_ChangeGLAccountCode.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -41,7 +41,7 @@
if ($InputError ==0){ // no input errors
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
echo '<br />' . _('Adding the new chartmaster record');
$sql = "INSERT INTO chartmaster (accountcode,
accountname,
@@ -112,7 +112,7 @@
DB_ReinstateForeignKeys($db);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
echo '<br />' . _('Deleting the old chartmaster record');
$sql = "DELETE FROM chartmaster WHERE accountcode='" . $_POST['OldAccountCode'] . "'";
Modified: trunk/Z_ChangeLocationCode.php
===================================================================
--- trunk/Z_ChangeLocationCode.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_ChangeLocationCode.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -48,7 +48,7 @@
}
if ($InputError ==0){ // no input errors
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
DB_IgnoreForeignKeys($db);
echo '<br />' . _('Adding the new location record');
@@ -225,7 +225,7 @@
DB_ReinstateForeignKeys($db);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
echo '<br />' . _('Deleting the old location record');
$sql = "DELETE FROM locations WHERE loccode='" . $_POST['OldLocationID'] . "'";
Modified: trunk/Z_ChangeStockCategory.php
===================================================================
--- trunk/Z_ChangeStockCategory.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_ChangeStockCategory.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -40,7 +40,7 @@
include ('includes/footer.inc');
exit;
}
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
echo '<br />' . _('Adding the new stock Category record');
$sql = "INSERT INTO stockcategory (categoryid,
categorydescription,
@@ -92,7 +92,7 @@
$sql = 'SET FOREIGN_KEY_CHECKS=1';
$result = DB_query($sql, $ErrMsg, $DbgMsg, true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
echo '<br />' . _('Deleting the old stock category record');
$sql = "DELETE FROM stockcategory WHERE categoryid='" . $_POST['OldStockCategory'] . "'";
$ErrMsg = _('The SQL to delete the old stock category record failed');
Modified: trunk/Z_ChangeStockCode.php
===================================================================
--- trunk/Z_ChangeStockCode.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_ChangeStockCode.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -52,7 +52,7 @@
if ($InputError ==0){ // no input errors
DB_IgnoreForeignKeys($db);
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
echo '<br />' . _('Adding the new stock master record');
$sql = "INSERT INTO stockmaster (stockid,
categoryid,
@@ -179,7 +179,7 @@
DB_ReinstateForeignKeys($db);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
echo '<br />' . _('Deleting the old stock master record');
$sql = "DELETE FROM stockmaster WHERE stockid='" . $_POST['OldStockID'] . "'";
Modified: trunk/Z_ChangeSupplierCode.php
===================================================================
--- trunk/Z_ChangeSupplierCode.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_ChangeSupplierCode.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -60,7 +60,7 @@
return;
}
- $result = DB_Txn_Begin($db);
+ $result = DB_Txn_Begin();
prnMsg(_('Inserting the new supplier record'),'info');
$sql = "INSERT INTO suppliers (`supplierid`,
@@ -96,7 +96,7 @@
$ErrMsg = _('The SQL to delete the old supplier record failed');
$result = DB_query($sql,$ErrMsg,$DbgMsg,true);
- $result = DB_Txn_Commit($db);
+ $result = DB_Txn_Commit();
}
function checkSupplierExist($codeSupplier) {
Modified: trunk/Z_CreateChartDetails.php
===================================================================
--- trunk/Z_CreateChartDetails.php 2014-10-27 07:15:34 UTC (rev 6944)
+++ trunk/Z_CreateChartDetails.php 2014-10-27 07:20:48 UTC (rev 6945)
@@ -60,7 +60,7 @@
...
[truncated message content] |