Merged GL entries

veeviiveevii Posts: 5Member
Hi,

I have dilemma with customer requested modification to BC.
In BC, GL Entries with same dimension set are combined into one gl entry. Now I'm requested to do a mod to BC with a purpose of not to combine gl entries.

Rough Example -->
Sales GL Account is 3000
Sales Invoice with two lines and with identical dimensions is posted.
Now with gl entries what BC does is that is combines those two sales lines into one gl entry to that sales account 3000

But what I'm requested to do is that those two invoice lines shouldn't be combined into one gl entry, instead we should have two gl entries.

I have looked into CU's 80 and 12 but really sure about the correct place to do the modification

All help appreciated

Answers

  • da_nealda_neal Posts: 72Member
    You should see table 49 "Invoice Post. Buffer" used in 80 CU.
    So you need to add field for example "Document Line No." and change Primary Key in table "Invoice Post. Buffer". After it modify code in 80 CU where filled this table buffer, see InvPostingBuffer[1].PrepareSales method
  • edoderooedoderoo Posts: 69Member
    da_neal is right. The Invoice Post.Buffer collects all information to be booked, in order to combine posts with the same information. You can add there extra fields/information, in order to split out more entries. When all order lines are processed, ever single line in the Invoice Post. Buffer is then "converted" into a G/L entry. Be careful to not add too many fields, as you might end up with one entry for every single order line, also for item lines.
    IF User.Loves('Edo') THEN ok() ELSE currReport.genSkip;
  • veeviiveevii Posts: 5Member
    Thanks, I will look into that.
    I know that one problem could be that MS does not for some reason allow modify or add primary keys with BC but as said I will look into Invoice Posting Buffer table and that fucntion da_neal mentioned
  • ShaiHuludShaiHulud Posts: 95Member
    If that doesn't work, you can always add a unique dimension value to the lines you don't want merged (like Dimension Code "DOCLINENO", Dimension Value <Line No.>). Could check if you need to add such dimension OnBeforePostSalesDoc and add it if necessary.
    Arturas Kulsinskas
    NaviLogic
  • AKAK GermanyPosts: 213Member
    I strongly advise not to change the primary key of standard objects. Adding unique dimension values to the lines is the way to go.
  • veeviiveevii Posts: 5Member
    Thank you all for replies.
    Looking at table 49 Invoice Post. Buffer and its primary key, there's a field included called "additional grouping identifier". Now I believe I can use that field to separate lines. I just need to insert "sales line"."line no" into that field. And of course find the right EventSubscriber where to do that.
Sign In or Register to comment.