PublicAPI.CRM.Sale.CreateInpayment ELMA API Documentation
Create an inpayment, linked to the sale. Creates an object without saving to the database
 
 
Syntax

public Inpayment CreateInpayment(
	Sale sale
)

Parameters

sale
Type: Sale
Sale. Object. Access path: PublicAPI.CRM.Sale

Return Value

Type: Inpayment
Inpayment
Examples

//load a sale by ID 
var sale = PublicAPI.CRM.Sale.Load(3);

//create an inpayment 
var myInpayment = PublicAPI.CRM.Sale.CreateInpayment(sale);

//myInpayment - created inpayment, linked to the sale 

//WARNING!! An inpayment is created without a name. For correct work with the inpayment 
//you should specify its name and save it to the database
myInpayment.Name = "Inpayment Name";
myInpayment.Save();
See Also