Home Page link  

Validation error 331: The tender amount or change is incorrect

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Validation error 331: The tender amount or change is incorrect CStore 08-20-2006
Posted by CStore on August 20, 2006, 1:54 pm
Please log in for more thread options
I have a custom process button the that tenders a transaction for a unique
payment method. Towards the end of the process I get the 331 error. Here is
an example of my totals:

Subtotal $77.94
Tax $6.61
Shipping $15.00
Total $99.45
Tender amount $99.45


My tender amount and total are the same. What could be gifing me the error?

Here is a snippet of my code:


Public Class Program

Public Function Process(ByVal session As Object) As Boolean

Try

Dim transaction As Object

transaction = session.Transaction



If Not transaction.IsOrder Then

MsgBox("There is no order available to proceed")

Return False

End If



If transaction.OrderClosed Then

MsgBox("Order is closed")

Return False

End If



If transaction.TransactionType <> 2 Then

MsgBox("Transaction can be performed just on work order")

Return False

End If





Dim orderTotal As Double

orderTotal = transaction.Total

Dim orderID As Integer

orderID = transaction.OrderID





Dim webService As New NwsWebService.SyncService()

Dim response As NwsWebService.WebServiceResponse



Dim userName As String

Dim password As String



Dim rk As Microsoft.Win32.RegistryKey

rk = Nothing



Try

rk =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARETawnyWebStoreSy
ncService", False)



userName = rk.GetValue("WSU")

password = rk.GetValue("WSP")

webService.Url = rk.GetValue("Url")

Catch e As Exception

MsgBox("Exception was trown: " + e.Message)

Return False

Finally

If Not rk Is Nothing Then

rk.Close()

End If

End Try



Try

response = webService.ProcessOrder(userName, password,
orderID, orderTotal)

Catch e As Exception

MsgBox(e.Message)

Return False

End Try



If response Is Nothing Then

MsgBox("Tawny RMS Web Service is unavailable")

Return False

End If



If response.Result = 0 Then

If response.PaymentProcessorResponse.Result = 0 Then

MsgBox("Customer is charged " + orderTotal.ToString())

Else

MsgBox("Payment processor answer: " +
response.PaymentProcessorResponse.RespMSG)

Return False

End If

Else

MsgBox(response.Message)

Return False

'MsgBox("Execution continues for test purposes")

End If



Dim tenderAmountIn As Double

tenderAmountIn = transaction.OrderBalance 'orderTotal -
transaction.DepositTotal ' transaction.OrderBalance

transaction.TenderDefault.AmountIn = tenderAmountIn



MsgBox("Order total: " + orderTotal.ToString() + " Balance: " +
tenderAmountIn.ToString())



Dim preTenderValidateResult As Integer

preTenderValidateResult = transaction.PreTenderValidate()

MsgBox("PreTenderValidate result code: " +
preTenderValidateResult.ToString())



transaction.TendersForceValidation()



Dim transactionPostResult As Integer

transactionPostResult = transaction.Post(session.Cashier.ID)

MsgBox("Transaction Post result code: " +
transactionPostResult.ToString())



Dim postTenderValidateResult As Integer

postTenderValidateResult = transaction.PostTenderValidate()

MsgBox("PostTenderValidate result code: " +
postTenderValidateResult.ToString())





'System.Windows.Forms.SendKeys.SendWait("")

'System.Windows.Forms.SendKeys.SendWait("")

'System.Windows.Forms.SendKeys.SendWait("")

'System.Windows.Forms.SendKeys.SendWait("")

'System.Windows.Forms.SendKeys.SendWait("")



Return True

Catch globalException As Exception

MsgBox("Exception thrown: " + globalException.Message)

End Try

End Function

End Class



Similar ThreadsPosted
Tender validation error. August 20, 2007, 9:50 am
Validation error 311 July 6, 2005, 7:59 am
Validation Error 325 November 12, 2008, 4:20 pm
Validation Error 311 On Layaways June 7, 2005, 3:58 pm
Item Cost Change to incorrect figures without prompting June 30, 2006, 12:57 pm
Change in Sale Amount July 6, 2007, 6:40 am
Incorrect function GetInputCount Error July 9, 2009, 9:31 am
Tender Amount for a cash transaction refund January 12, 2007, 10:42 am
Tender Paid Out unbalance Amount Deposited in Bank December 19, 2006, 9:49 pm
Cash will tender as Credit Card when no exact amount is entered! November 25, 2005, 8:18 pm

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap