Codeunit "Items Selection Mgt WCAP"
ID 70345413
Namespace: CapVision.CapCollecte.Missions.MissionRequest
Properties
| Name |
Value |
| SingleInstance |
True
|
| Access |
Public
|
Methods
LoadCustomerRecords
Va appliquer les filtres sur les lignes de prix de vente associées au client ou à son groupe de prix.
Si on trouve une ligne qui n'existe pas déjà dans la table "Items Selection", on l'ajoute.
procedure LoadCustomerRecords(var ItemsSelection: Record "Items Selection WCAP"; CustomerNo: Code[20]; ShiptoCode: Code[10]; SearchInAllCompanies: Boolean; SearchInPriceGroups: Boolean)
Parameters
| Name |
Type |
Description |
|
ItemsSelection
|
Table CapVision.CapCollecte.Missions.MissionRequest."Items Selection WCAP" |
La table temporaire que l'on va remplir avec les lignes de prix trouvées
|
|
CustomerNo
|
Code[20] |
Le n° de client pour lequel on recherche ses prix
|
|
ShiptoCode
|
Code[10] |
Le code adresse pour lequel on recherche ses prix. Peut être vide
|
|
SearchInAllCompanies
|
Boolean |
Spécifie si on cherche les lignes de prix dans toutes les sociétés ou seulement la société courante
|
|
SearchInPriceGroups
|
Boolean |
Spécifie si on cherche aussi les lignes de prix dans le groupe de prix du client
|
SetJobProductLineFilters
Applique les filtres sur les lignes produit affaire pour un client et un code adresse donnés.
procedure SetJobProductLineFilters(var JobProductLine: Record "Job Product Line WCAP"; CustomerNo: Code[20]; ShiptoCode: Code[10])
Parameters
| Name |
Type |
Description |
|
JobProductLine
|
Table CapVision.CapCollecte.Job."Job Product Line WCAP" |
La ligne de produit affaire sur laquelle appliquer les filtres
|
|
CustomerNo
|
Code[20] |
Le n° du client pour lequel on veut récupérer ses lignes de contrats
|
|
ShiptoCode
|
Code[10] |
Le code adresse du client. Il peut être vide.
|
CreateFromJobProductLine
Va parcourir les lignes de produit affaire filtrées et les ajouter dans la table "Items Selection" si elles n'existent pas déjà.
On cherche soit les lignes de produits, soit les lignes de prestations générales (associées à aucun produit).
En fonction du paramètre "SearchInAllCompanies", on va chercher les lignes dans toutes les sociétés ou seulement la société courante.
procedure CreateFromJobProductLine(var ItemsSelection: Record "Items Selection WCAP"; var JobProductLine: Record "Job Product Line WCAP"; var EntryNo: Integer; SearchInAllCompanies: Boolean): Boolean
Parameters
Returns
CheckIfLinesFromMultipleCompanyUsed
Vérifie si les lignes sélectionnées depuis la page de sélection des articles proviennent de la même société.
procedure CheckIfLinesFromMultipleCompanyUsed(var ItemsSelection: Record "Items Selection WCAP"; var SelectedCompany: Text)
Parameters
CreateMissionFromItemsSelection
Créer des missions depuis l'enregistrement sélection des articles et le client / site donné en paramètre.
procedure CreateMissionFromItemsSelection(var TempItemsSelection: Record "Items Selection WCAP" temporary; CustomerNo: Code[20]; ShiptoCode: Code[10]; SelectedCompany: Text): List of [Code[20]]
Parameters
Returns
| Type |
Description |
|
List of [Code[20]] |
|
CreateOrderToCreate
Cette procédure va créer une commande de vente à créer à partir des lignes sélectionnées dans la page de sélection des articles.
Elle va créer une session dans la société de destination pour y créer la commande de vente.
procedure CreateOrderToCreate(var TempItemsSelection: Record "Items Selection WCAP" temporary; CustomerNo: Code[20]; ShiptoCode: Code[10]; SelectedCompany: Text)
Parameters
GetAddressName
Obsolete
This element will become obsolete from version V27.202605. This procedure is obsolete since the contracts are based on the standard Job module.
[Obsolete(This procedure is obsolete since the contracts are based on the standard Job module.,V27.202605)]
procedure GetAddressName(PriceListCode: Code[20]; var OutletDescription: Text[250]; var OutletType: Enum "Outlet Type WCAP"; CompanyName: Text[30]): Text[100]
Parameters
Returns
| Type |
Description |
|
Text[100] |
|
CreateFromPriceListLine
Obsolete
This element will become obsolete from version V27.202601. Use CreateFromJobProductLine instead since the contracts are based on the standard Job module.
[Obsolete(Use CreateFromJobProductLine instead since the contracts are based on the standard Job module.,V27.202601)]
procedure CreateFromPriceListLine(var ItemsSelection: Record "Items Selection WCAP"; var PriceListLine: Record "Price List Line"; var EntryNo: Integer; SearchInAllCompanies: Boolean): Boolean
Parameters
Returns
LoadCustomerRecords
Obsolete
This element will become obsolete from version V25.202505. Use LoadCustomerRecords with SearchInPriceGroups instead
[Obsolete(Use LoadCustomerRecords with SearchInPriceGroups instead,V25.202505)]
procedure LoadCustomerRecords(var ItemsSelection: Record "Items Selection WCAP"; CustomerNo: Code[20]; ShiptoCode: Code[10]; SearchInAllCompanies: Boolean)
Parameters
SetSalesPriceListLineFilters
Obsolete
This element will become obsolete from version V27.202601. Use SetJobProductLineFilters instead since the contracts are based on the standard Job module.
[Obsolete(Use SetJobProductLineFilters instead since the contracts are based on the standard Job module.,V27.202601)]
procedure SetSalesPriceListLineFilters(var PriceListLine: Record "Price List Line"; CustomerNo: Code[20]; ShiptoCode: Code[10])
Parameters
| Name |
Type |
Description |
|
PriceListLine
|
Record "Price List Line" |
|
|
CustomerNo
|
Code[20] |
|
|
ShiptoCode
|
Code[10] |
|
SetPurchPriceListLineFilters
Obsolete
This element will become obsolete from version V27.202601. Not used anymore since the contracts are based on the standard Job module.
[Obsolete(Not used anymore since the contracts are based on the standard Job module.,V27.202601)]
procedure SetPurchPriceListLineFilters(var PriceListLine: Record "Price List Line"; VendorNo: Code[20]; OrderAddressCode: Code[10])
Parameters
| Name |
Type |
Description |
|
PriceListLine
|
Record "Price List Line" |
|
|
VendorNo
|
Code[20] |
|
|
OrderAddressCode
|
Code[10] |
|
CreateBusinessServiceFromPriceListLine
Obsolete
This element will become obsolete from version V27.202601. Use CreateBusinessServiceFromJobProductLine instead since the contracts are based on the standard Job module.
[Obsolete(Use CreateBusinessServiceFromJobProductLine instead since the contracts are based on the standard Job module.,V27.202601)]
procedure CreateBusinessServiceFromPriceListLine(var TempPriceListLine: Record "Price List Line" temporary; var PriceListLine: Record "Price List Line")
Parameters
| Name |
Type |
Description |
|
TempPriceListLine
|
Record "Price List Line" temporary |
|
|
PriceListLine
|
Record "Price List Line" |
|
LoadGeneralRecords
Obsolete
This element will become obsolete from version V27.202602. Not used anymore since the contracts are based on the standard Job module.
[Obsolete(Not used anymore since the contracts are based on the standard Job module.,V27.202602)]
procedure LoadGeneralRecords(var ItemsSelection: Record "Items Selection WCAP"; CustomerNo: Code[20]; SearchInAllCompanies: Boolean)
Parameters
SetSalesGeneralPriceListLineFilters
Obsolete
This element will become obsolete from version V27.202602. Not used anymore since the contracts are based on the standard Job module.
[Obsolete(Not used anymore since the contracts are based on the standard Job module.,V27.202602)]
procedure SetSalesGeneralPriceListLineFilters(var PriceListLine: Record "Price List Line")
Parameters
| Name |
Type |
Description |
|
PriceListLine
|
Record "Price List Line" |
|
SetSalesPriceListLineFilter
Obsolete
This element will become obsolete from version V27.202602. Not used anymore since the contracts are based on the standard Job module.
[Obsolete(Not used anymore since the contracts are based on the standard Job module.,V27.202602)]
procedure SetSalesPriceListLineFilter(var PriceListLine: Record "Price List Line")
Parameters
| Name |
Type |
Description |
|
PriceListLine
|
Record "Price List Line" |
|
Events
OnAfterCreateSalesLine
[IntegrationEvent(False,False)]
local procedure OnAfterCreateSalesLine(var SalesLine: Record "Sales Line"; ItemsSelection: Record "Items Selection WCAP")
Parameters
OnAfterCreateSalesServiceLine
[IntegrationEvent(False,False)]
local procedure OnAfterCreateSalesServiceLine(var SalesLine: Record "Sales Line"; ItemsSelection: Record "Items Selection WCAP")
Parameters
OnLoadVendorRecordsOnAfterSetFilters
[IntegrationEvent(False,False)]
local procedure OnLoadVendorRecordsOnAfterSetFilters(var PriceListLine: Record "Price List Line")
Parameters
| Name |
Type |
Description |
|
PriceListLine
|
Record "Price List Line" |
|
OnAfterSetJobProductLineFilters
[IntegrationEvent(False,False)]
local procedure OnAfterSetJobProductLineFilters(var JobProductLine: Record "Job Product Line WCAP")
Parameters
OnAfterInsertItemsSelectionLine
[IntegrationEvent(False,False)]
local procedure OnAfterInsertItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; JobProductLine: Record "Job Product Line WCAP"; var EntryNo: Integer; Company: Record Company)
Parameters
OnItemSelectionLineAlreadyExistsOnAfterSetFilters
[IntegrationEvent(False,False)]
local procedure OnItemSelectionLineAlreadyExistsOnAfterSetFilters(var ItemsSelection: Record "Items Selection WCAP"; JobProductLine: Record "Job Product Line WCAP"; RecordCompany: Text[30]; var AlreadyExists: Boolean; var IsHandled: Boolean)
Parameters
OnPriceListItemSelectionLineAlreadyExistsOnAfterSetFilters
[IntegrationEvent(False,False)]
local procedure OnPriceListItemSelectionLineAlreadyExistsOnAfterSetFilters(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; RecordCompany: Text[30]; var AlreadyExists: Boolean; var IsHandled: Boolean)
Parameters
OnBeforeCreateItemsSelectionLine
[IntegrationEvent(False,False)]
local procedure OnBeforeCreateItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; JobProductLine: Record "Job Product Line WCAP")
Parameters
OnBeforeCreatePriceListItemsSelectionLine
[IntegrationEvent(False,False)]
local procedure OnBeforeCreatePriceListItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line")
Parameters
OnCreateBusinessServiceOnFilterJobServiceLine
[IntegrationEvent(False,False)]
local procedure OnCreateBusinessServiceOnFilterJobServiceLine(var JobServiceLine: Record "Job Service Line WCAP")
Parameters
OnAfterCreateMissionFromJobProductLine
[IntegrationEvent(False,False)]
local procedure OnAfterCreateMissionFromJobProductLine(var Mission: Record "Mission WCAP"; JobProductLine: Record "Job Product Line WCAP"; var TempItemsSelection: Record "Items Selection WCAP" temporary)
Parameters
OnLoadCustomerRecordsOnAfterSetFilters
Obsolete
This element will become obsolete from version V27.202601. Use SetJobProductLineFilters instead since the contracts are based on the standard Job module.
[IntegrationEvent(False,False)]
[Obsolete(Use SetJobProductLineFilters instead since the contracts are based on the standard Job module.,V27.202601)]
local procedure OnLoadCustomerRecordsOnAfterSetFilters(var PriceListLine: Record "Price List Line")
Parameters
| Name |
Type |
Description |
|
PriceListLine
|
Record "Price List Line" |
|
OnAfterCreateItemsSelectionLine
Obsolete
This element will become obsolete from version V27.202601. Not used anymore.
[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnAfterCreateItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; var EntryNo: Integer; Company: Record Company)
Parameters
OnAfterCreateItemsSelectionServiceLine
Obsolete
This element will become obsolete from version V27.202601. Not used anymore.
[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnAfterCreateItemsSelectionServiceLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; var EntryNo: Integer; Company: Record Company)
Parameters
OnCheckItemSelectionLineAlreadyExistsOnAfterSetFilters
Obsolete
This element will become obsolete from version V27.202601. Replaced by OnItemSelectionLineAlreadyExistsOnAfterSetFilters with JobProductLine.
[IntegrationEvent(False,False)]
[Obsolete(Replaced by OnItemSelectionLineAlreadyExistsOnAfterSetFilters with JobProductLine.,V27.202601)]
local procedure OnCheckItemSelectionLineAlreadyExistsOnAfterSetFilters(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; RecordCompany: Text[30]; var AlreadyExists: Boolean; var IsHandled: Boolean)
Parameters
OnCheckItemSelectionServiceLineAlreadyExistsOnAfterSetFilters
Obsolete
This element will become obsolete from version V27.202601. Not used anymore.
[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnCheckItemSelectionServiceLineAlreadyExistsOnAfterSetFilters(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line"; RecordCompany: Text[30]; var AlreadyExists: Boolean; var IsHandled: Boolean)
Parameters
OnLoadCustomerRecordsOnBeforeCheckCustomerPriceGroup
Obsolete
This element will become obsolete from version V27.202601. Not used anymore.
[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnLoadCustomerRecordsOnBeforeCheckCustomerPriceGroup(var ItemsSelection: Record "Items Selection WCAP"; CustomerNo: Code[20]; var IsHandled: Boolean)
Parameters
OnBeforeInsertItemsSelectionLine
Obsolete
This element will become obsolete from version V27.202601. Replaced by OnBeforeCreateItemsSelectionLine with JobProductLine.
[IntegrationEvent(False,False)]
[Obsolete(Replaced by OnBeforeCreateItemsSelectionLine with JobProductLine.,V27.202601)]
local procedure OnBeforeInsertItemsSelectionLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line")
Parameters
OnBeforeInsertItemsSelectionServiceLine
Obsolete
This element will become obsolete from version V27.202601. Not used anymore.
[IntegrationEvent(False,False)]
[Obsolete(Not used anymore.,V27.202601)]
local procedure OnBeforeInsertItemsSelectionServiceLine(var ItemsSelection: Record "Items Selection WCAP"; PriceListLine: Record "Price List Line")
Parameters
OnFilterServicePriceListLine
Obsolete
This element will become obsolete from version V27.202601. Use CreateBusinessServiceFromJobProductLine instead since the contracts are based on the standard Job module.
[IntegrationEvent(False,False)]
[Obsolete(Use CreateBusinessServiceFromJobProductLine instead since the contracts are based on the standard Job module.,V27.202601)]
local procedure OnFilterServicePriceListLine(var ServicePriceListLine: Record "Price List Line")
Parameters
| Name |
Type |
Description |
|
ServicePriceListLine
|
Record "Price List Line" |
|
OnAfterCreateMissionFromPickupContractLine
Obsolete
This element will become obsolete from version V27.202601. Replaced by OnAfterCreateMissionFromJobProductLine with JobProductLine.
[IntegrationEvent(False,False)]
[Obsolete(Replaced by OnAfterCreateMissionFromJobProductLine with JobProductLine.,V27.202601)]
local procedure OnAfterCreateMissionFromPickupContractLine(var Mission: Record "Mission WCAP"; PickupContractLine: Record "Pickup Contract Line WCAP"; var TempItemsSelection: Record "Items Selection WCAP" temporary)
Parameters
See also