Payment error with Foreign currency

Payment error with Foreign currency

Purpose: 

Internal to Support Team

 

Environment: 

iVend 6.6 Unplugged

 

Problem statement:  

Getting an error "Load failed. Criteria NHibernate.Criterion.Query" while doing payment with Foreign Currency

 

Symptoms: 

Upon doing payment with foreign currency at Point of sale, POS user faced below error:

 

"Load failed. Criteria NHibernate.Criterion.Query" 

 

In the log file below error was captured:

 

<Event>
      <Version>6.6.7425.36652</Version>
      <Category>ERROR</Category>
      <Time>12:39:36 PM</Time>
      <Message>query did not return a unique result: 2</Message>
      <ExceptionInfo>
        <Type>NHibernate.NonUniqueResultException</Type>
        <Message>query did not return a unique result: 2</Message>
        <Source>NHibernate</Source>
        <TargetSite>System.Object UniqueElement(System.Collections.IList)</TargetSite>
        <StackTrace>   at NHibernate.Impl.AbstractQueryImpl.UniqueElement(IList list)
    at NHibernate.Impl.CriteriaImpl.UniqueResult[T]()
    at NHibernate.Criterion.QueryOver`1.SingleOrDefault()
    at NHibernate.Criterion.QueryOver`1.NHibernate.IQueryOver&lt;TRoot&gt;.SingleOrDefault()
    at ‪‌‏‫‫‎‪‪​‎‍‎‫‎​‏‪‌.​‫​‏​​‪​‪‫​​​‌‏[&#x1;](IQueryOver`1 )</StackTrace>
      </ExceptionInfo>
    </Event>

 
Resolution/Work Around: 

Upon Checking in the database it was found that there were duplicate Exchange rate keys. Hence duplicate record needs to be removed.