-
Notifications
You must be signed in to change notification settings - Fork 357
Description
Describe the issue
To be able to extend subscription billing customer subscription contracts there are procedures available, but are inaccessible due to its protection level.
As the procedures are currently internal for no reason they should be available, to avoid duplicating code through PTE or ISV solutions.
Currently protected procedures are:
- internal procedure InsertFromItemNoAndCustomerContract(var ServiceObject: Record "Subscription Header"; ItemNo: Code[20]; VariantCode: Code[10]; SourceQuantity: Decimal; ProvisionStartDate: Date; CustomerContract: Record "Customer Subscription Contract")
- internal procedure ExtendContract(var ServiceObject: Record "Subscription Header"; var TempServiceCommitmentPackage: Record "Subscription Package" temporary; ExtendCustomerContract: Boolean; var CustomerContract: Record "Customer Subscription Contract"; ExtendVendorContract: Boolean; var VendorContract: Record "Vendor Subscription Contract"; UsageBasedBillingPackageLinesOnly: Boolean; SupplierReferenceEntryNo: Integer)
Additionally, in "Extend Sub. Contract Mgt." codeunit there is an global variable HideDialog to supress the the message at the end, but the variable is never set and there is no methode or event publisher to interact with.
Therefor a SetHideDialog(Hide: Boolean) should be introduced, equal to other implementations with HideDialog variable:
procedure SetHideDialogs(Hide: Boolean)
begin
HideDialogs := Hide;
end;The main issue is, that this level of protection in "Customer Subscription Contract" and "Vendor Subscription Contract" could lead to duplicated could which potentially will break business process, if base implementation envolves and PTE extensions, with copied/duplicated code, will not be adopted.
Expected behavior
Procedures to manage customer contracts should NOT be protected for no reason, but only to secure business process. Base-level procedure, e.g. create "Subscription Header", extend "Customer Subscription Contract" or "Vendor Subscription Contract", should be available to interact with.
Steps to reproduce
- internal procedure InsertFromItemNoAndCustomerContract(var ServiceObject: Record "Subscription Header"; ItemNo: Code[20]; VariantCode: Code[10]; SourceQuantity: Decimal; ProvisionStartDate: Date; CustomerContract: Record "Customer Subscription Contract") is inaccessible due to its protection level
- internal procedure ExtendContract(var ServiceObject: Record "Subscription Header"; var TempServiceCommitmentPackage: Record "Subscription Package" temporary; ExtendCustomerContract: Boolean; var CustomerContract: Record "Customer Subscription Contract"; ExtendVendorContract: Boolean; var VendorContract: Record "Vendor Subscription Contract"; UsageBasedBillingPackageLinesOnly: Boolean; SupplierReferenceEntryNo: Integer) is inaccessible due to its protection level
Additional context
No response
I will provide a fix for a bug
- I will provide a fix for a bug