Gen. Journal Line and Cust. Ledger Entry Link

ayashiayashi Member Posts: 78
Does anybody know what is the connection between gen. journal line and cust. ledger entry after doing set applies-to id from cash receipt journal ?

I did some tests :
1. Create two open invoice (inv1 and inv2)

2. Create two exact record from cash receipt journal (document no. also the same) except the amount.

3. Function Apply Entries...

4. Set Applies-to ID (first record in cash receipt for inv2)

5. Repeat the step from step 3 to 4, but this time second record in cash receipt for inv1)

6. Post

Check in cust. ledger entry, nav can detect which cash recept for which inv, even with the same exact posting date, document no., etc.

How they do this ? Please help ....


Thanks before

Comments

  • ara3nara3n Member Posts: 9,256
    It is the GenJournalLine."document No." = custLedger."applies to ID".
    GenjounalLine."Customer No." = custledger."Customer No."


    here is the code unit CU 12


      OldCustLedgEntry.SETRANGE("Customer No.",NewCVLedgEntryBuf."CV No.");
      OldCustLedgEntry.SETRANGE("Applies-to ID",GenJnlLine."Applies-to ID");
      OldCustLedgEntry.SETRANGE(Open,TRUE);
      OldCustLedgEntry.SETFILTER("Entry No.",'<>%1',NewCVLedgEntryBuf."Entry No.");
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ayashiayashi Member Posts: 78
    hi ara3n,


    based on the code, don't you think the first record of gen. journal line would find the first inv in cust. ledger, since the second gen.journal line document no. is exactly the same as the first record.
  • ara3nara3n Member Posts: 9,256
    Yep that is possible, but then the two payments should have the different document no. Otherwise they are one payment. You can modify it off course and add additional fields, but usually customers use numbering series or Custome's check Number as doc number.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.