Apply Vendor Entries Posting Problem

aperfettiaperfetti Member Posts: 7
edited 2006-03-04 in Navision Financials
this is on US Navision Financials 2.01b

we have an incorrect posted vendor invoice...so to correct it...we create a
new credit memo...and click functions->copy document
select posted invoice as the document type and enter the invoice
number...also check the boxes to include the header and recalc document lines.
this populates the credit memo as expected...so we enter the vendor credit
memo number and post the credit memo...navision then gives the following
error:

Currency Code '' does not exist

if we remove the "Applies-to Doc. No" value from the header...the memo will
post...but then navision doesn't automatically apply the memo to the
invoice...when you try to manually apply the entries by going to the vendor
card, vendor ledger entries, apply entries, "Set Applies-to id" (F9) on each
entry, then F11 to post the application...it gives the same error

other related info:

this company does not use multiple currencies and is not licensed for
multiple currencies.

the currency table does not have any records in it at all...all
invoices/credit memos before and after this work correctly.

the currency field in each related ledger entry is blank...and if you try to
type a value in any of the fields...it gives the same error that it does when
it tries to post the application because there are no currency records in the
related lookup table.

any ideas would be greatly appreciated.

Thanks!

--
-Adam Perfetti
-Adam

Comments

  • krikikriki Member, Moderator Posts: 9,112
    The only thing I can think of is that in the currency code a hard-space (ASCII=255) has gotten into it.
    A hard-space is visually the same as a space but it behaves like a normal character (like A or B).
    From the object designer (with developer license), got to the invoice and CM, go to the field and blank it out (=hit DELETE) and then hit ARROW-DOWN or UP to leave the field and the record and thus saving it. You might have to do the same on the vendor ledger entries for the invoice.

    If this doesn't work, you should use the debugger to see where the error is (probably a GET on table Currency) and then see why he does the get. It could also be some customization-bug.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • aperfettiaperfetti Member Posts: 7
    yes...i had already verified that the currency code field is empty on the posted header and on the vendor ledger entry.

    in the debugger...it gets into codeunit 227 on this line:

    GenJnlPostLine.VendPostApplyVendLedgEntry(GenJnlLine,Rec);

    pushing F8 there throws the error


    the first 3 lines of that function are:


    GenJnlLine := GenJnlLinePostApply;

    GenJnlLine."Source Currency Code" := VendLedgEntryPostApply."Currency Code";

    VendLedgEntry := VendLedgEntryPostApply;

    i'm thinking that maybe the 2nd line is causing it...but the field referenced there is empty!

    could this be some sort of data corruption?
    -Adam
  • krikikriki Member, Moderator Posts: 9,112
    Strange, the code you gave, can't have generated the error.

    Have you also checked the "Currency Code" of ALL records (vendor ledger entry, invoice header,...) of the invoice you want to apply?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • aperfettiaperfetti Member Posts: 7
    i don't think it has anything to do with the credit memo because i can generate another invoice and apply the credit memo to it successfully.

    there is only one line on the purchase invoice...and it is a G/L account...not an item...so hitting navigate on the posted purchase invoice only shows 3 tables with entries...Posted Purchase Invoice (1 entry), G/L Entry (2 entries), and Vendor Ledger Entry (1 entry)....only 2 of those tables have a currency code field...

    i have verified that the "Currency Code" field is blank by using a dev license and directly running the following tables:

    Table 122 Purch. Inv. Header (1 record)
    Table 25 Vendor Ledger Entry (1 record)

    is there somewhere else that i need to check?
    are these the only tables involved in posting a transaction like this?

    ](*,)
    -Adam
  • ara3nara3n Member Posts: 9,256
    try to insert a currency code of blank with your developer license. and try to post with your developer license. Then Delete the currency code record.
    I know this is a hack, but if it works, it works.
    Also another option would be do do a backup and restore it to a 3.7 version, it has better debugging tool and will help finding right place of code.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • themavethemave Member Posts: 1,058
    Try copy document, but do not recalculate lines, this will copy the document exactly like the original. then post it

    Also, do not include header. just type it in manually. Try a combo of the two, one will work.
Sign In or Register to comment.