[solved] sales statistic form inv. discount amount

NavStudent
NavStudent Member Posts: 399
Hello
In Navision on sales order when you hit F9, the statistic window opens up. On some orders in cronus the Inv. discountn amount is editable, on others it is not. I can't find the reason. Could somebody explain that to me.

Thanks in advance.
my 2 cents

Comments

  • kine
    kine Member Posts: 12,562
    It depends on if the Disc. amount is enabled or if the VAT Amount is enabled. See this part of code (if you are developer and not consultant or user):
    AllowInvDisc := NOT (SalesSetup."Calc. Inv. Discount" AND CustInvDiscRecExists("Invoice Disc. Code"));
    AllowVATDifference :=
      SalesSetup."Allow VAT Difference" AND
      NOT ("Document Type" IN ["Document Type"::Quote,"Document Type"::"Blanket Order"]);
    SubformIsEditable := AllowVATDifference OR AllowInvDisc;
    CurrForm.EDITABLE := SubformIsEditable;
    

    If you are consultant or user, it means (I am skipping the part that "Calc. Inv. Discount" is enabled, because you are talking about just some orders have the field noneditable...) that "Invoice Disc. Code" on the document must be filled. Than another way how to get the field to be editable is to have Allow VAT Difference enabled (and the document cannot be Quote or Blanket order).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • NavStudent
    NavStudent Member Posts: 399
    ok I think I got it.

    The inv. discount amount is enabled, if the the setup is SalesSetup."Calc. Inv. Discount" is checked and if the Customer has Cust Inv Disc. filled in.



    As far as allow vat difference goes, that is a different matter. It basically allows you to manaually change the vat/tax amount on invoicing tab of statistic manually.


    Thanks again.
    my 2 cents