Acumatica 带In运算符的Bql查询返回不正确的结果

Acumatica 带In运算符的Bql查询返回不正确的结果,acumatica,Acumatica,我正在使用InvoiceEntryExt图形扩展,并添加了一个名为“receives”的DAC,我已用IEnumerable方法覆盖了该DAC public PXSelect<POReceipt> Receipts; public IEnumerable receipts() { List<string> receiptNbrList = new List<string>(); foreach(APTran tran in Base.Transa

我正在使用InvoiceEntryExt图形扩展,并添加了一个名为“receives”的DAC,我已用IEnumerable方法覆盖了该DAC

public PXSelect<POReceipt> Receipts;
public IEnumerable receipts()
{
   List<string> receiptNbrList = new List<string>(); 
   foreach(APTran tran in Base.Transactions.Select())
   {
      if(!string.IsNullOrEmpty(tran.ReceiptNbr) && !receiptNbrList.Contains(tran.ReceiptNbr))
      {
        receiptNbrList.Add(tran.ReceiptNbr);
      } 
   }

   object[] values = receiptNbrList.ToArray();       
   PXResultset<POReceipt> rcpts = PXSelect<POReceipt, Where<POReceipt.receiptNbr, In<Required<POReceipt.receiptNbr>>>>.Select(new PXGraph(), values);             
   return rcpts;
}
选择公共收据;
公共收入
{
List receiptNbrList=新列表();
foreach(Base.Transactions.Select()中的APTran-tran)
{
如果(!string.IsNullOrEmpty(trans.ReceiptNbr)和&!receiptNbrList.Contains(trans.ReceiptNbr))
{
接收编号列表。添加(传输接收编号);
} 
}
object[]values=receiptNbrList.ToArray();
PXResultset rcpts=PXSelect.Select(新PXGraph(),值);
返回RCPT;
}

当查询执行时,我将多个收据编号传递到值数组中,但每次只得到一个收据结果,因为我知道事实上应该有更多的收据结果。

传递值的方式不正确,如下代码所示

object[] values = receiptNbrList.ToArray();       
PXResultset<POReceipt> rcpts = PXSelect<POReceipt, Where<POReceipt.receiptNbr, In<Required<POReceipt.receiptNbr>>>>.Select(new PXGraph(), values);    
您应该将一个对象数组传递给Select方法,该数组的第一个成员应该是字符串数组,它对应于in运算符中所需的运算符

string[] values = receiptNbrList.ToArray();       
PXResultset<POReceipt> rcpts = PXSelect<POReceipt, Where<POReceipt.receiptNbr, In<Required<POReceipt.receiptNbr>>>>.Select(new PXGraph(), new object[]{ values });