We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
procedure UpdateSetupOnBillToCustomerChangeInSalesHeader(var SalesHeader: Record "Sales Header"; xSalesHeader: Record "Sales Header"; BillToCustomer: Record Customer) var GLSetup: Record "General Ledger Setup"; begin GLSetup.Get(); if GLSetup."Bill-to/Sell-to VAT Calc." <> GLSetup."Bill-to/Sell-to VAT Calc."::"Bill-to/Pay-to No." then exit; if IsAltVATRegUsed(SalesHeader) then begin if SalesHeader."Bill-to Customer No." = SalesHeader."Sell-to Customer No." then exit; CopyFromCustomer(SalesHeader, xSalesHeader, BillToCustomer); exit; end; if (SalesHeader."VAT Bus. Posting Group" <> '') and (SalesHeader."VAT Bus. Posting Group" <> BillToCustomer."VAT Bus. Posting Group") then SalesHeader.Validate("VAT Bus. Posting Group", BillToCustomer."VAT Bus. Posting Group") else SalesHeader."VAT Bus. Posting Group" := BillToCustomer."VAT Bus. Posting Group"; SalesHeader."VAT Country/Region Code" := BillToCustomer."Country/Region Code"; SalesHeader."VAT Registration No." := BillToCustomer."VAT Registration No."; SalesHeader."Registration Number" := BillToCustomer."Registration Number"; SalesHeader."Gen. Bus. Posting Group" := BillToCustomer."Gen. Bus. Posting Group"; //NewEvent OnAfterUpdateSetupOnBillToCustomerChangeInSalesHeader(SalesHeader,BillToCustomer); //NewEvent end; [IntegrationEvent(false, false)] local procedure OnAfterUpdateSetupOnBillToCustomerChangeInSalesHeader(var SalesHeader: Record "Sales Header"; Customer: Record Customer) begin end;
To not replicate code when setting custom VAT Registration field from bill to customer
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the request
Additional context
To not replicate code when setting custom VAT Registration field from bill to customer
The text was updated successfully, but these errors were encountered: