[Weberp-svn] SF.net SVN: weberp:[4218] trunk
Brought to you by:
sotandeka,
tim_schofield
|
From: <tim...@us...> - 2011-01-09 19:26:00
|
Revision: 4218
http://weberp.svn.sourceforge.net/weberp/?rev=4218&view=rev
Author: tim_schofield
Date: 2011-01-09 19:25:54 +0000 (Sun, 09 Jan 2011)
Log Message:
-----------
Correct the quotes in the sql literals
Modified Paths:
--------------
trunk/AddCustomerNotes.php
trunk/RecurringSalesOrders.php
Modified: trunk/RecurringSalesOrders.php
===================================================================
--- trunk/RecurringSalesOrders.php 2011-01-09 16:10:31 UTC (rev 4217)
+++ trunk/RecurringSalesOrders.php 2011-01-09 19:25:54 UTC (rev 4218)
@@ -179,6 +179,7 @@
exit;
}
If (isset($_POST['Process'])) {
+ $Result = DB_Txn_Begin($db);
$InputErrors =0;
If (!Is_Date($_POST['StartDate'])){
$InputErrors =1;
@@ -199,10 +200,11 @@
if ($InputErrors == 0 ){ /*Error checks above all passed ok so lets go*/
+
+
if ($NewRecurringOrder=='Yes'){
/* finally write the recurring order header to the database and then the line details*/
-
$DelDate = FormatDateforSQL($_SESSION['Items'.$identifier]->DeliveryDate);
$HeaderSQL = "INSERT INTO recurringsalesorders (
@@ -228,7 +230,7 @@
stopdate,
frequency,
autoinvoice)
- valueS (
+ values (
'" . $_SESSION['Items'.$identifier]->DebtorNo . "',
'" . $_SESSION['Items'.$identifier]->Branch . "',
'". $_SESSION['Items'.$identifier]->CustRef ."',
@@ -253,9 +255,10 @@
'" . $_POST['AutoInvoice'] . "')";
$ErrMsg = _('The recurring order cannot be added because');
- $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg);
+ $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg,true);
$RecurrOrderNo = DB_Last_Insert_ID($db,'recurringsalesorders','recurrorderno');
+ echo 'xxx'.$RecurrOrderNo;
$StartOf_LineItemsSQL = "INSERT INTO recurrsalesorderdetails (
recurrorderno,
stkcode,
@@ -275,7 +278,7 @@
'" . $StockItem->DiscountPercent . "',
'" . $StockItem->Narrative . "'
)";
- $Ins_LineItemResult = DB_query($LineItemsSQL,$db);
+ $Ins_LineItemResult = DB_query($LineItemsSQL,$db,$ErrMsg,$DbgMsg,true);
} /* inserted line items into sales order details */
prnmsg(_('The new recurring order template has been added'),'success');
@@ -302,6 +305,7 @@
exit;
}
+ $result = DB_Txn_Commit($db);
}
echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Search') .
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|