Zum Inhalt

AddPersonProduct (Opus Funktion)

Beschreibung

Ordnet einer Person ein Produkt zu. Adds a product to a person's billing account. Returns the new person product ID or 0 if creation failed.

Argumente

Name

Typ

Beschreibung

CompanyID

integer

ID of the company context

LocationID

integer

ID of the seminar centre / location

AddressRoleID

integer

ID of the person (address role) for whom the product is added

ProductDefinitionID

integer

ID of the product definition to add

Number

float

(optional) quantity; defaults to 1.0

PartialBill

integer

(optional) 1 = include in partial billing, 0 = full billing only; defaults to 1

ReferenceDataset

string

(optional) dataset name linking this product to a source record

ReferenceRecord1ID

integer

(optional) primary reference record ID

ReferenceRecord2ID

integer

(optional) secondary reference record ID

ReferenceRecord3ID

integer

(optional) tertiary reference record ID

ValutaDate

datetime

(optional) value date for the product; defaults to null

StartDate

datetime

(optional) validity start date; defaults to null

EndDate

datetime

(optional) validity end date; defaults to null

VoucherCode

string

(optional) voucher code to apply as a discount

PayAddressRoleID

integer

(optional) ID of the payer if different from AddressRoleID; 0 = same person

CheckDuplicates

integer

(optional) Default = 1, gibt an, ob Duplikate geprüft werden sollen oder nicht.
1 = prevent adding duplicate products, 0 = allow; defaults to 1

Order

integer

sort order within the invoice; defaults to 0

ProductDefinitionModifierID

integer

ID of a product modifier to apply

AccrualOffset)

integer

accrual period offset in months

Rückgabewert integer

SSF_PersonProductID

Wenn Duplikate geprüft werden, dann kann es sein, dass eine bereits bestehende ID zurückgegeben wird. ID of the newly created person product record, or 0 on failure

Beispiel

Li_PersonProductID := AddPersonProduct(Ai_CompanyID, Ai_SeminarCenterID, Li_AddressRoleID[0], Li_ProdDefID, 1, 1, "Address_PlanningPeriod", Ai_AddressID, Ai_PlanningPeriodID);

Siehe auch