PublicAPI.CRM.InpaymentELMA API Documentation
Inpayment
Access path: PublicAPI.CRM.Inpayment
Methods

  NameDescription
Public methodAddComment(Inpayment, String)
Add a comment to the inpayment
Public methodAddComment(Inpayment, String, User)
Public methodCount 
Returns the total number of objects of this type
Public methodCount(IEntityFilter)
Get Total Number of Objects by Filter
Public methodCreate
Create New Entity (without a Database entry)
Public methodDelete
Delete Object
Public methodFilter
Creates an assistant for working with the "Inpayment" object filter
Public methodFind(FetchOptions)
Find objects according to fetch options
Public methodFind(String)
Find objects according to the filter in the EQL language
Public methodFind(IEntityFilter, FetchOptions)
Fing objects according to fetch options and filter
Public methodFindByIdArray
Find All Objects by Array IDs
Public methodIsDirty
Check, if there are unsaved changes in the object
Public methodIsNew
Check, if the object is new (not saved in the database)
Public methodLoad(Guid)
Load by UID. If not found, an exception is invoked
Public methodLoad(Int64)
Load by ID. If not found, an exception is invoked
Public methodLoadOrCreate(Guid)
Load by ID. If not found, the new object is returned
Public methodLoadOrCreate(Int64)
Load by ID. If not found, the new object is returned
Public methodLoadOrNull(Guid)
Load by UID. If not found, null is returned
Public methodLoadOrNull(Int64)
Load by ID. If not found, null is returned
Public methodRefresh
Refresh (read over) Object from Database
Public methodSave
Save Object to Database
Public methodSetCancelledStatus
Set the "Cancelled" status
Public methodSetInpaymentDate(Inpayment)
Set null value to the "inpayment" field
Public methodSetInpaymentDate(Inpayment, DateTime)
Change the impayment date
Public methodSetInpaymentStatus
Change Inpayment Status
Public methodSetInPlanStatus
Set the "In Plan" status
Public methodSetReceivedStatus
Set the "Received" status
Back to Top
Properties

  NameDescription
Public propertyTypeUid
Returns the unique object identifier "Inpayment"
Back to Top
Remarks

Section containing methods for managing inpayments
Examples

Create an inpayment for the deal, created here

var myInpayment = PublicAPI.CRM.Sale.CreateInpayment(mySale);

Before you start working with mySale variable, fill in its requested fields (except for "Deal", it is already filled)

//Inpayment Name
myInpayment.Name = "Payment for equipment";
//Inpayment Sum
myInpayment.Sum = new Money{Value = 1500};
//Select inpayment status "Plan"
myInpayment.Status = InpaymentStatus.InPlan;

Remember to save the object to the database for its correct work

myInpayment.Save();

Select inpayment date

PublicAPI.CRM.Inpayment.SetInpaymentDate(myInpayment, DateTime.Now);

Change inpayment status from "Plan" to "Received"

PublicAPI.CRM.Inpayment.SetReceivedStatus(myInpayment, "A comment, when changing inpayment status");

See Also