Method Community

 

Journal Entry - what is the correct way to enter the JournalEntryLine

Last post 07-10-2009 11:33 AM by Keith. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-09-2009 1:54 PM

    • Keith
    • Top 200 Contributor
    • Joined on 06-03-2009
    • Posts 23

    Journal Entry - what is the correct way to enter the JournalEntryLine

     Can anyone shed some light on how the JournalEntryLine should be formatted in a API rrequest?

    Do both debit and credit need to be entered in the same JournalEntryLine api request?

    Or do you have to enter seperate JournalEntryLine for a debit and then a credit?

     

    Thanks

  • 07-09-2009 7:21 PM In reply to

    Re: Journal Entry - what is the correct way to enter the JournalEntryLine

     Keith,

    It doesn't matter if the debit and credits are on the same line or on different lines. What matters is the total of line items for Debit equal to the total of the line items for Credit once the Journal Entry is saved. If they are not the same Method and QB will give you a warning you cannot save the Journal Entry.

    You can see how it works in method if you try to save a Journal Entry which doesn't have the total of the Journal Entry Line Items for debit does not equal the total entries for credit.

    So for the API I'd create the Journal Entry and then add the Journal Entry Line Items. It doesn't matter how many line items are added as long they all match up. As a check after the line items are added, make an update call with the API to the Journal Entry table, the code in the API will verify the debit and credit in the lines items match up.  If not they will give you the same message as you would in Method.

    Peter

     

  • 07-10-2009 8:00 AM In reply to

    • Keith
    • Top 200 Contributor
    • Joined on 06-03-2009
    • Posts 23

    Re: Journal Entry - what is the correct way to enter the JournalEntryLine

     Thanks Peter... let me see if I understand: my error comes on entry of the JournalEntrylines so I assume the initial JournalEntry was OK

    Example on enterring JournalEntryLines:

    fields I want to enter in the JEL. First I fill in my Credit line:

    Account="xyz"
    AmountCredit ="5.00"
    AmountDebit 
    Entity ="John Smith"
    JournalEntryRecordID = x
    Memo ="This is a credit"

    Now at this point I do the insert and check for success and get the insert error.. how and when do I insert the Debit line: 

    Account="abc"
    AmountCredit =
    AmountDebit  ="5.00"
    Entity ="Vendor1"
    JournalEntryRecordID = x
    Memo ="This is a debit"

  • 07-10-2009 8:34 AM In reply to

    Re: Journal Entry - what is the correct way to enter the JournalEntryLine

    Keith,

    I tried to go through your example and my suggestion is to not include the AmountCredit in the insertion array if you won't entering a value or I would apply a 0.00 amount to it. Same for the AmountDebit in the first Credit Line.

    If that still doesn't work then can you copy and paste your exact code where you are creating the arrays and calling the Method API.

    Peter

  • 07-10-2009 11:33 AM In reply to

    • Keith
    • Top 200 Contributor
    • Joined on 06-03-2009
    • Posts 23

    Re: Journal Entry - what is the correct way to enter the JournalEntryLine

     Looks like that worked OK.. I applied 0.00 to the required credit/debit fld and I was able to insert both a debit line and a credit line.

    Thanks for your help,

    Keith

     

Page 1 of 1 (5 items)