From: <dai...@us...> - 2011-03-08 09:32:55
|
Revision: 4505 http://web-erp.svn.sourceforge.net/web-erp/?rev=4505&view=rev Author: daintree Date: 2011-03-08 09:32:48 +0000 (Tue, 08 Mar 2011) Log Message: ----------- PO Not an Asset SQL fix Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-03-08 07:38:45 UTC (rev 4504) +++ trunk/PO_Items.php 2011-03-08 09:32:48 UTC (rev 4505) @@ -195,7 +195,7 @@ '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' )"; - + $ErrMsg = _('The purchase order header record could not be inserted into the database because'); $DbgMsg = _('The SQL statement used to insert the purchase order header record and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); @@ -250,6 +250,7 @@ '" . $POLine->ConversionFactor . "')"; $ErrMsg =_('One of the purchase order detail records could not be inserted into the database because'); $DbgMsg =_('The SQL statement used to insert the purchase order detail record and failed was'); + $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); } } /* end of the loop round the detail line items on the order */ @@ -510,7 +511,10 @@ $_POST['ItemDescription'] = $AssetRow['description']; } } - } //end if an AssetID is entered + } /*end if an AssetID is entered */ + else { + $_POST['AssetID'] = 0; // cannot commit a string to an integer field so make it 0 if AssetID = 'Not an Asset' + } if (strlen($_POST['ItemDescription'])<=3){ $AllowUpdate = false; prnMsg(_('Cannot enter this order line') . ':<br />' . _('The description of the item being purchased is required where a non-stock item is being ordered'),'warn'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |