Skip to content

KVSTRDMultiVATShipToAddrEvMgt#

Events#

KVSTRDOnBeforeGetVATCustomer(Record Customer, Code[20], Code[20], Boolean, Boolean) :#

Summary: This event is raised in an event subscriber before getting the VAT customer record. The VAT customer record is used to get the VAT registration number and the posting group fields.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeGetVATCustomer(var VATCustomer: Record "Customer"; SellToCustomerNo: Code[20]; BillToCustomerNo: Code[20]; var VATCustomerGot: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDMultiVATShipToAddrEvMgt", 'KVSTRDOnBeforeGetVATCustomer', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeGetVATCustomer(var VATCustomer: Record "Customer"; SellToCustomerNo: Code[20]; BillToCustomerNo: Code[20]; var VATCustomerGot: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • VATCustomer: The VAT customer record.
  • SellToCustomerNo: The sell-to customer number from the sales header or service header.
  • BillToCustomerNo: The bill-to customer number from the sales header or service header.
  • VATCustomerGot: Indicates whether the VAT customer record was successfully retrieved.
  • IsHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.

KVSTRDOnBeforeOnAfterValidateSalesHeaderShiptoCode(Record Sales Header, Record Sales Header, Integer, Boolean) :#

Summary: This event is raised in an event subscriber after validating the "Sales Header" field "Ship-to Code". In Microsoft standard posting group fields are only located at the customer record. In KUMAVISION trade these information can be set up for each ship-to address. This function copies values of theses additional posting group fields in the "Ship-to Address" table to the current Sales Header record if they are filled. Otherwise the default values from the customer are copied.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeOnAfterValidateSalesHeaderShiptoCode(var SalesHeader: Record "Sales Header"; var xSalesHeader: Record "Sales Header"; CurrFieldNo: Integer; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDMultiVATShipToAddrEvMgt", 'KVSTRDOnBeforeOnAfterValidateSalesHeaderShiptoCode', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnAfterValidateSalesHeaderShiptoCode(var SalesHeader: Record "Sales Header"; var xSalesHeader: Record "Sales Header"; CurrFieldNo: Integer; var IsHandled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The current Sales Header record.
  • xSalesHeader: The Sales Header record before the field was modified.
  • CurrFieldNo: The number of the field the event was triggered from.
  • isHandled: Specifies if the event has been handled. If set to true, the trade logic will not be executed.

KVSTRDOnBeforeShouldCalculateVATOnBillToCustomer(Boolean, Boolean) :#

Summary: This event is raised in an event subscriber before determining whether to calculate VAT on the bill-to customer.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeShouldCalculateVATOnBillToCustomer(var ReturnValue: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDMultiVATShipToAddrEvMgt", 'KVSTRDOnBeforeShouldCalculateVATOnBillToCustomer', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeShouldCalculateVATOnBillToCustomer(var ReturnValue: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • ReturnValue: Indicates whether VAT should be calculated on the bill-to customer.
  • IsHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.