Sales Quote (REP204) cannot run for Contact

lvanvugtlvanvugt Member Posts: 774
My basic question is:

What is the design reason behind the following?

Sales Quote (REP204) fails when I execute it from the sales quote window (FOR41) with "Sell-to Customer No." = '' AND "Sell-to Contact No." <> ''
[so "Sell-to Customer No." is empty while "Sell-to Contact No." is populated]

The thing is that when I create a new contact (of type Company) I can create a sales quote for that new contact, but I cannot print it.

Thanx for replies
Luc van Vugt, fluxxus.nl
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community

Answers

  • jannestigjannestig Member Posts: 1,000
    I can print that report when customer No Field is greyed out and when contact it is filled in.

    What version are you in. I did it in a 5.1 SWE no issues
  • lvanvugtlvanvugt Member Posts: 774
    60SP1 (NAV2009) ...

    [and yes, you are right: it is working on 50SP1;,I thought I had tried that already :-P]

    Have logged a bug for it on partnersource. No. 9594805.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • jannestigjannestig Member Posts: 1,000
    IT only occurs where you have invoice rounding turned on. If you turn it off it works :S

    Definately a bug though in tbl 37. For that procedure CALCVATAMOUNTLINES they have added the cust and cust bus group to it.

    Definately a bug though. Since it worked in 5.1 with invoice rounding in S&M turned on
  • lvanvugtlvanvugt Member Posts: 774
    OK, great additional info. Thanx! Will add it to the bug I already recorded.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • lvanvugtlvanvugt Member Posts: 774
    Reply from MS:
    The issue has been already reported and postponed as service pack fix that means that the correction will be included in the next service pack.
    I've already ask to the escalation engineer that opened the bug if could be possible to re-open it and ask for an hot fix since version 5.0 SP1 works as expected.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • jannestigjannestig Member Posts: 1,000
    Just a fix i found for it was

    TBL 37
    CalcVATAmountLines(QtyType : 'General,Invoicing,Shipping';VAR SalesHeader : Record "Sales Header";VAR SalesLine : Record "Sales Line";V

    WITH SalesLine DO BEGIN
    SETRANGE("Document Type",SalesHeader."Document Type");
    SETRANGE("Document No.",SalesHeader."No.");
    SalesSetup.GET;
    IF (SalesSetup."Invoice Rounding") AND (SalesHeader."Bill-to Customer No."<>'') THEN BEGIN
    Cust.GET(SalesHeader."Bill-to Customer No.");
    CustPostingGroup.GET(Cust."Customer Posting Group");
    END;
  • lvanvugtlvanvugt Member Posts: 774
    MS has provided a hot fix for this issue (9594805):
    Table 37 - Sales Line 
    
    ---------- Before (BUGFIX) ---------- Table 37 ---------- Function CalcVATAmountLines 
    SalesSetup@1008 : Record 311;
    RoundingLineInserted@1010 : Boolean;
    TotalVATAmount@1011 : Decimal;
    BEGIN
    IF SalesHeader."Currency Code" = '' THEN
    Currency.InitRoundingPrecision
    ---------- After (BUGFIX) --------------------------------------------
    SalesSetup@1008 : Record 311;
    RoundingLineInserted@1010 : Boolean;
    TotalVATAmount@1011 : Decimal;
    // CODE.begin
    CustTemplate@1014 : Record 5105;
    // CODE.end
    BEGIN
    IF SalesHeader."Currency Code" = '' THEN
      Currency.InitRoundingPrecision
    
    
    ---------- Before (BUGFIX) ---------- Table 37 ---------- Function CalcVATAmountLines 
    SETRANGE("Document No.",SalesHeader."No.");
    SalesSetup.GET;
    IF SalesSetup."Invoice Rounding" THEN BEGIN
    // CODE.begin
      Cust.GET(SalesHeader."Bill-to Customer No.");
      CustPostingGroup.GET(Cust."Customer Posting Group");
    // CODE.end
    END;
    IF FINDSET THEN
    REPEAT
    ---------- After (BUGFIX) --------------------------------------------
    SETRANGE("Document No.",SalesHeader."No.");
    SalesSetup.GET;
    IF SalesSetup."Invoice Rounding" THEN BEGIN
      // CODE.begin
      IF Cust.GET(SalesHeader."Bill-to Customer No.") THEN
        CustPostingGroup.GET(Cust."Customer Posting Group")
      ELSE IF CustTemplate.GET(SalesHeader."Sell-to Customer Template Code") THEN
        CustPostingGroup.GET(CustTemplate."Customer Posting Group");
      // CODE.end
    END;
    IF FINDSET THEN
    REPEAT
    
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
Sign In or Register to comment.