2013-10-10 40 views
0
  • 您如何判斷QBFC中的Quickbooks採購訂單是否已完成/已填寫/關閉了 ?

回答

0

QuickBooks中的採購訂單被視爲已關閉,前提是已收到所有物料或已手動關閉行。如果所有項目都已收到,則IsFullyReceived將爲真(並且採購單將顯示「全部收到」郵票)。如果用戶手動「關閉」未清項目,則PO將被關閉,並且IsManuallyClosed將爲真。請記住,如果兩者都是錯誤的,這並不意味着整個採購訂單是開放的,因爲可能會有部分接收是針對訂單完成的。

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 
     } 
    } 
} 
相關問題