ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Report 10707 "Make 347 Declaration"

Open asaez85 opened this issue 3 years ago • 4 comments

Hi, I need an integration event before each OutFile.Write(OutText) in Report 10707 "Make 347 Declaration".

1 - Cust. Ledger Entry - OnPostDataItem

    OutText :=
        '2347' + FiscalYear + UpperCase(VATRegNo) + UpperCase(VATRegNo347) + PadStr('', 9, ' ') +
        UpperCase(Name347) + LetterDTxt +
        CountyCode + CVCountryCode + PadStr('', 1, ' ') + LetterBTxt + AmountText + PadStr('', 2, ' ') +
        CashAmtText + FormatAmount(0) + YearText + GetSalesQuarterAmountsText() + PadStr('', 17, ' ') +
        GetVATCashRegimeText(AnnualAmountVATCashRegime, OperationsCashAccountingCriteria, ReverseChargeOperation);
    OutText := PadStr(OutText, 500, ' ');
    // New Event 
    OnBeforeWriteCustomer347Declaration(OutText, FiscalYear, UpperCase(VATRegNo), UpperCase(VATRegNo347), UpperCase(Name347),
        LetterDTxt, CountyCode, CVCountryCode, LetterBTxt, AmountText, CashAmtText, FormatAmount(0), YearText, GetSalesQuarterAmountsText(),
        GetVATCashRegimeText(AnnualAmountVATCashRegime, OperationsCashAccountingCriteria, ReverseChargeOperation));
    //
    OutFile.Write(OutText);

    [IntegrationEvent(false, false)]
    local procedure OnBeforeWriteCustomer347Declaration(var OutText: Text; FiscalYear: Text; VATRegNo: Text; VATRegNo347: Text; Name347: Text;
                        LetterDTxt: Text; CountyCode: Text; CVCountryCode: Text; LetterBTxt: Text; AmountText: Text; CashAmtText: Text;
                        ZeroAmount: Text; YearText: Text; SalesQuarterAmountsText: Text; VATCashRegimeText: Text);
    begin
    end;

2 - Cust. Ledger Entry - OnPostDataItem

    OutText :=
        '2347' + FiscalYear + UpperCase(VATRegNo) + UpperCase(VATRegNo347) + PadStr('', 9, ' ') + UpperCase(Name347) +
        LetterDTxt + CountyCode + CVCountryCode + PadStr('', 1, ' ') + LetterBTxt + AmountText + PadStr('', 2, ' ') +
        CashAmtText + FormatAmount(0) + YearText + GetQuarterZeroAmountsText() + PadStr('', 17, ' ') +
        GetVATCashRegimeText(AnnualAmountVATCashRegime, OperationsCashAccountingCriteria, ReverseChargeOperation);
    OutText := PadStr(OutText, 500, ' ');
    // New Event
    OnBeforeWriteCustomerCashBuffer347Declaration(OutText, FiscalYear, UpperCase(VATRegNo), UpperCase(VATRegNo347), UpperCase(Name347),
        LetterDTxt, CountyCode, CVCountryCode, LetterBTxt, AmountText, CashAmtText, FormatAmount(0), YearText, GetQuarterZeroAmountsText(),
        GetVATCashRegimeText(AnnualAmountVATCashRegime, OperationsCashAccountingCriteria, ReverseChargeOperation));
    //
    OutFile.Write(OutText);
    [IntegrationEvent(false, false)]
    local procedure OnBeforeWriteCustomerCashBuffer347Declaration(var OutText: Text; FiscalYear: Text; VATRegNo: Text; VATRegNo347: Text; Name347: Text;
                        LetterDTxt: Text; CountyCode: Text; CVCountryCode: Text; LetterBTxt: Text; AmountText: Text; CashAmtText: Text;
                        ZeroAmount: Text; YearText: Text; SalesQuarterZeroAmountsText: Text; VATCashRegimeText: Text);
    begin
    end;

3 - Vendor Ledger Entry - OnPostDataItem

    Clear(OutText);
    AmountText := FormatAmount(PurchasesAmt);
    OutText :=
        '2347' + FiscalYear + UpperCase(VATRegNo) + UpperCase(VATRegNo347) + PadStr('', 9, ' ') +
        UpperCase(Name347) + LetterDTxt + CountyCode + CVCountryCode + PadStr('', 1, ' ') + LetterATxt +
        AmountText + PadStr('', 2, ' ') + PadStr('', 15, '0') + ' ' + PadStr('', 15, '0') + PadStr('', 4, '0') +
        GetPurchQuarterAmountsText(1) + PadStr('', 17, ' ') +
        GetVATCashRegimeText(AnnualAmountVATCashRegime, OperationsCashAccountingCriteria, '');
    OutText := PadStr(OutText, 500, ' ');
    // New Event
    OnBeforeWriteVendor347Declaration(OutText, FiscalYear, VATRegNo, VATRegNo347, Name347, CountyCode, CVCountryCode,
        LetterATxt, AmountText, GetPurchQuarterAmountsText(1), GetVATCashRegimeText(AnnualAmountVATCashRegime, OperationsCashAccountingCriteria, ''));
    //
    OutFile.Write(OutText);
    [IntegrationEvent(false, false)]
    local procedure OnBeforeWriteVendor347Declaration(var OutText: Text; FiscalYear: Text; VATRegNo: Text; VATRegNo347: Text; Name347: Text;
                        CountyCode: Text; CVCountryCode: Text; LetterATxt: Text; AmountText: Text; PurchQuarterAmountsText: Text; VATCashRegimeText: Text);
    begin
    end;

4 - Vendor Ledger Entry - OnPostDataItem

    Clear(OutText);
    AmountText := FormatAmount(ISPPurchasesAmt);
    OutText :=
        '2347' + FiscalYear + UpperCase(VATRegNo) + UpperCase(VATRegNo347) + PadStr('', 9, ' ') +
        UpperCase(Name347) + LetterDTxt + CountyCode + CVCountryCode + PadStr('', 1, ' ') + LetterATxt +
        AmountText + PadStr('', 2, ' ') + PadStr('', 15, '0') + ' ' + PadStr('', 15, '0') + PadStr('', 4, '0') +
        GetPurchQuarterAmountsText(2) + PadStr('', 17, ' ') +
        GetVATCashRegimeText(0, '', ReverseChargeOperation);
    OutText := PadStr(OutText, 500, ' ');
    // New Event
    OnBeforeWriteVendorISP347Declaration(OutText, FiscalYear, VATRegNo, VATRegNo347, Name347, CountyCode, CVCountryCode,
                                        LetterATxt, AmountText, GetPurchQuarterAmountsText(2),
                                        GetVATCashRegimeText(0, '', ReverseChargeOperation));
    //
    OutFile.Write(OutText);
    [IntegrationEvent(false, false)]
    local procedure OnBeforeWriteVendorISP347Declaration(var OutText: Text; FiscalYear: Text; VATRegNo: Text; VATRegNo347: Text; Name347: Text;
                        CountyCode: Text; CVCountryCode: Text; LetterATxt: Text; AmountText: Text; PurchQuarterAmountsText: Text; VATCashRegimeText: Text);
    begin
    end;

5 - CreateFileHeader - Procedure

        OutText :=
          OutText + PadStr('', 1, ' ') + ReplacementDecText + PreDeclarationNum +
          ConvertStr(Format(Acum, 9, IntegerTypeTxt), ' ', '0') + AmountText +
          PadStr('', 9, '0') + ' ' + PadStr('', 15, '0') + PadStr('', 315, ' ');
        // New Event
        OnBeforeWriteFileHeader(OutText, FiscalYear, VATRegNo, FormatTextName(CompanyInfo.Name), DeclrationMT,
            ContactTelephone, FormatTextName(ContactName), DeclarationNum, ReplacementDecText,
            PreDeclarationNum, Format(Acum, 9, IntegerTypeTxt), AmountText);
        //
        OutFile.Write(OutText);
    [IntegrationEvent(false, false)]
    local procedure OnBeforeWriteFileHeader(var OutText: Text; FiscalYear: Text; VATRegNo: Text; CompanyName: Text; DeclrationMT: Text;
                        ContactTelephone: Text; ContactName: Text; DeclarationNum: Text; ReplacementDecText: Text;
                        PreDeclarationNum: Text; Acum: Text; AmountText: Text);
    begin
    end;

asaez85 avatar Feb 14 '23 09:02 asaez85

Hello @AlexanderYakunin, I'm wondering if there is any update on the status of this issue

asaez85 avatar Mar 29 '23 08:03 asaez85

Please consider that we have no SLA for event request and process them when possible. We do not process events several weeks before major version release, as Code Complete happens well before this date.

Here you would like to extend legal requirements, any reason for that? Should you tell us if we are missing anything in this declaration instead of asking for events?

@altotovi

AlexanderYakunin avatar Mar 29 '23 08:03 AlexanderYakunin

Thank you for your quick response. I would like to clarify that there is no change in legal requirements. The event request is due to the need to export the declaration information in a different format. We understand and can wait for the event request to be processed when possible. Thank you again for your attention to this matter.

asaez85 avatar Mar 29 '23 08:03 asaez85

I just saw that this report has been refactored in BC21.5. I am canceling the request for now.

Thank you

asaez85 avatar Mar 29 '23 14:03 asaez85