0
  • 您如何判断 Quickbooks 采购订单是否在 QBFC 中完成/填写/关闭?
4

1 回答 1

0

如果已收到所有项目或已手动关闭行,则 QuickBooks 中的采购订单被视为已关闭。如果所有项目都已收到,则 IsFullyReceived 将为真(并且 PO 将显示“已收到完整”标记)。如果用户手动“关闭”打开的项目,那么 PO 将被关闭并且 IsManuallyClosed 将为真。请记住,如果两者都是错误的,这并不意味着整个 PO 都是打开的,因为可能已经对订单进行了部分接收。

IPurchaseOrderRet poRet = poRetList.GetAt(0);
if(poRet.IsFullyReceived == true || poRet.IsManuallyClosed == true)
{
    // The PO is 'closed'
}
else
{
    // There are still some open items on the PO
    for(int index=0;index<poRet.ORPurchaseOrderLineRetList.Count;index++)
    {
        IORPurchaseOrderLineRet poLine = poRet.ORPurchaseOrderLineRetList.GetAt(index);
        if(poLine.ortype == ENORPurchaseOrderLineRet.orpolrPurchaseOrderLineRet)
        {
            // Check if the received quantity matches the ordered quantity
            if(poLine.PurchaseOrderLineRet.Quantity.GetValue() == poLine.PurchaseOrderLineRet.ReceivedQuantity.GetValue())
            {
                 // Line has been fully received
            }
            if(poLine.PurchaseOrderLineRet.IsManuallyClosed.GetValue() == true)
            {
                 // Line has been manually closed, but could still have
                 // partial received quantity
            }
        }
        else
        {
            // Check the GroupLineRet
        }
    }
}
于 2013-10-14T15:10:46.560 回答