Cannot post a imported invoice

mgerhartzmgerhartz Member Posts: 50
Hi,

I've got the following problem: I designed a dataport to import invoices from a excelsheet to a navision table. After this, I designed a report to create invoices from the new table. Till this point everthing works fine.

BUT, when I tried to post one of the new invoices, the following message popped up:

"You must specify. "Gen. Bus. Posting Group" in Sales Line Document Type ='Invoice', Document No. = '1000000D69872', Line No. ='10000'."

I specified the "Gen. Bus. Posting Group" for this account no. at the table "Chart of Accounts". So where do I specify this posting group for the Sales Lines?

Thanks for your help!

Markus

Comments

  • krikikriki Member, Moderator Posts: 9,118
    "Gen. Bus. Posting Group" is copied from the header-record, so in the OnValidate of "No." you write code to copy it from the G/L Account.
    Something like
    GLAcc.GET("No.");
          GLAcc.CheckGLAcc;
          IF NOT "System-Created Entry" THEN
            GLAcc.TESTFIELD("Direct Posting",TRUE);
          Description := GLAcc.Name;
          "Gen. Prod. Posting Group" := GLAcc."Gen. Prod. Posting Group";
          "VAT Prod. Posting Group" := GLAcc."VAT Prod. Posting Group";
    // START
          VALIDATE("Gen. Bus. Posting Group",GLAcc."Gen. Bus. Posting Group"); // this will also copy the standard VAT. Bus pst group from the "Gen. Bus. Pst grp".
    // STOP
          "Tax Group Code" := GLAcc."Tax Group Code";
          "Allow Invoice Disc." := FALSE;
          "Allow Item Charge Assignment" := FALSE;
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • HalMdyHalMdy Member Posts: 429
    You have to validate the field "No." in the dataport.

    To do that, in the dataport designer, display the column "CallFieldValidate" and marks the line concerning field "No.".

    I hope that could help ...
  • mgerhartzmgerhartz Member Posts: 50
    Wow, that's fast! Thanks guys. I'll try it out and let you know what happens.
  • mgerhartzmgerhartz Member Posts: 50
    Thanks again. It's now working :)
  • SavatageSavatage Member Posts: 7,142
    mgerhartz wrote:
    Wow, that's fast! Thanks guys.

    There's no messing around here! 8) \:D/

    RSS Feeds =D>
Sign In or Register to comment.