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 | ID of the company context | |
LocationID | ID of the seminar centre / location | |
AddressRoleID | ID of the person (address role) for whom the product is added | |
ProductDefinitionID | ID of the product definition to add | |
Number | (optional) quantity; defaults to 1.0 | |
PartialBill | (optional) 1 = include in partial billing, 0 = full billing only; defaults to 1 | |
ReferenceDataset | (optional) dataset name linking this product to a source record | |
ReferenceRecord1ID | (optional) primary reference record ID | |
ReferenceRecord2ID | (optional) secondary reference record ID | |
ReferenceRecord3ID | (optional) tertiary reference record ID | |
ValutaDate | (optional) value date for the product; defaults to null | |
StartDate | (optional) validity start date; defaults to null | |
EndDate | (optional) validity end date; defaults to null | |
VoucherCode | (optional) voucher code to apply as a discount | |
PayAddressRoleID | (optional) ID of the payer if different from AddressRoleID; 0 = same person | |
CheckDuplicates | (optional) Default = 1, gibt an, ob Duplikate geprüft werden sollen oder nicht. | |
Order | sort order within the invoice; defaults to 0 | |
ProductDefinitionModifierID | ID of a product modifier to apply | |
AccrualOffset) | 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); |
|---|