Empty sales lines giving warnings

galmokgalmok Member Posts: 44
I am tasked with putting empty sales lines on the orders as messages to the customer (empty lines to split the sales lines from the message).

I add the empty lines but when posting the order, I get a warning about the Type, No. or Description being empty (Type and No. are empty, Description is not).

Is there way to have such empty lines without having the warning pop up on post?

Comments

  • jannestigjannestig Member Posts: 1,000
    Empty sales lines giving warnings

    Just make sure the line type is not blank or add astandard text code of ---- etc if it is.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I presume some customization has been made, as standard NAV the field Type can be blank. It is perfectly possible to post Sales Lines with a empty Type-field, as these are comment lines.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • galmokgalmok Member Posts: 44
    All 3 fields are empty, i.e. Type, No. and Description are empty and this produces a warning:

    The Order 000469 contains lines in which either the Type, the No. or the Description is empty. Please be aware that such lines will not be taken into account when creating an OIOXML document.
    Do you want to continue?

    I can just answer yes and posting completes just fine, but I would of course prefer not to get the warning.

    It is not sufficient to make a standard text (e.g. ---) and have the full text be empty and use that in the No. field. The warning still pops up.

    Putting text in all Description fields and leaving all No. and Type fields empty also gives the warning. I guess some customisation has been made.

    It seems we have to contact the supplier and have him fix this problem. :-/
  • jannestigjannestig Member Posts: 1,000
    I read your previous post about your sales header using OIOXML

    So its during the process of posting using OIOXML that the system is actually telling you its doesn't allow these lines to be taken into account.

    Though not a developer what is the code doing at that point to recognoze the line as one not to include?

    Whatever its criteria are you could somehow add one of the values in Type NO etc to make these lines included :-k
  • galmokgalmok Member Posts: 44
    This is the code I found in CodeUnit 13602:

    EmptyLineFound := FALSE;
    WITH SalesLine DO BEGIN
    RESET;
    SETRANGE("Document Type",SalesHeader."Document Type");
    SETRANGE("Document No.",SalesHeader."No.");
    IF FIND('-') THEN REPEAT
    IF Description = '' THEN
    IF (Type <> Type::" ") AND ("No." <> '') THEN
    ERROR(Text13608,"Document Type","Document No.",
    FIELDCAPTION(Type),FIELDCAPTION("No."),FIELDCAPTION(Description));
    IF (Type = Type::" ") OR ("No." = '')
    THEN EmptyLineFound := TRUE;
    UNTIL (NEXT = 0);

    IF EmptyLineFound THEN
    IF NOT CONFIRM(Text13609 + '\' + Text13610,TRUE,
    "Document Type","Document No.",FIELDCAPTION(Type),FIELDCAPTION("No."),FIELDCAPTION(Description)) THEN
    ERROR(Text13611);
    END;

    When EmptyLineFound it set to true, I get the warning. I don't have the rights to modify that codeunit so I ask if there is a way to create comments in SalesLines that wont set EmptyLineFound to true? Could a virtual item be created in which I modify the Description line to my needs?
  • jannestigjannestig Member Posts: 1,000
    I remember this being a danish modification for electronic files, you may need to ask your Reseller if it is the code you need to modifiy,
    The data is requiring at least 2 fields to be occupied a standard text code with description will do this.

    You could have a standard text code of Note and a description of just :

    You should ensure at least 1 character value occupies each field
    so a Line would be

    Note : (enter text here)

    This will mean end users will either leave this blank or add the additional text as you have specified the dividing lines should be messages to customers

    This would have to be tested of course but it seems to satisfy the codes demands.
  • galmokgalmok Member Posts: 44
    But the problematic lines say:

    IF (Type = Type::" ") OR ("No." = '')
    THEN EmptyLineFound := TRUE;

    So, if the type is empty OR the No is empty, I get a warning. Filling data into No and Description is not enough to not get the warning. I have tried. :-/

    I guess we have to contact our supplier...
  • jannestigjannestig Member Posts: 1,000
    VI Fan :) jag har missade det :D

    Yes it looks like code will have to be added or changed at least it is strange that it would actually do that in the first place

    There are several hotfixes to this e-invoice below is an outline of the latest description for a V5 update, so you may find that the reason it is not allowed as it will be failed at the national level

    YOu may even need to do a new report :S


    Due to a new Schematron validation fields are now cross checked, and evaluated tighter, to make sure mutual related fields and information in general are valid as demanded by "Bekendtgørelse om information i OIOXML elektronisk regning til brug for elektronisk afregning med offentlige myndigheder" encompassed by law no. 1203 § 7 of december 27. 2003.

    Also changes to codeunit 13609 and 13610 is included in this CDCR/hotfix, as an adjustment to TaxTotals in Service invoices.

    This hotfix in total is an enhancement of OIOXML e-invoices.



    Schematron:

    In the danish configuration, if a customer in MDNAV is setup with an EAN-location number, the invoice is not posted on paper, but to a file, typically designated for NET distribution via a VAN, to be delivered at a public authority.
    Errors in the e-invoice might lead to rejection of the invoice at a VAN or at the receiver of the invoice. Normally the user will then be noticed, but sometimes notice is only given to the former link in a chain of distributors. In the last case the user only will experience the invoice is not paid, having troubles to find out why.

    TaxTotals:

    When an OIOXML-file is created for a Service invoice that contains lines with both positive and negative amounts, the class TaxTotal is created twice in the OIOXML-file (one instance for the positive values and one instance for the negative values). Furthermore TaxTotals classes are created for both VAT liable and not liable lines, which results in up to 4 TaxTotals classes.




    http://www.navisionguider.dk for danish forum
Sign In or Register to comment.