Description
To close a goods receipt PO or a goods return, specify a posting date to be used in the clearing journal entry.
Field: ClosingOpt.
Property type
Read-write property
Syntax
Example
| Closing Goods Receipt POs or Goods Returns (C#) | Copy Code |
|---|
//Close by current system date Documents doc = (Documents)oCompany.GetBusinessObject(BoObjectTypes.oPurchaseReturns); doc.GetByKey(1); doc.ClosingOption = ClosingOptionEnum.coByCurrentSystemDate; doc.Close(); //Close by original document date Documents doc = (Documents)oCompany.GetBusinessObject(BoObjectTypes.oPurchaseReturns); doc.GetByKey(1); doc.ClosingOption = ClosingOptionEnum.coByOriginalDocumentDate; doc.Close(); //Close by specified date Documents doc = (Documents)oCompany.GetBusinessObject(BoObjectTypes.oPurchaseReturns); doc.GetByKey(1); doc.ClosingOption = ClosingOptionEnum.coBySpecifiedDate; DateTime date = DateTime.Parse("2010/6/26"); doc.SpecifiedClosingDate = date; doc.Close(); |
|
See Also