Sage 50 Quantum SDK SalesJournal, journalentry error

SUGGESTED

Hi,

I am trying to post sales invoices to Sage 50 Quantum. But when posting I get following error

There is no journal entry created from this transaction. If posted, any inventory quantities will be updated, but the invoice cannot be adjusted later

Anyone got an idea what this error mean and how can I solve it ?

  • 0
    SUGGESTED

    Without seeing the journal entry you are trying to post, I would assume your entry is resulting in something like

    Dr 1510 Inventory A 1000

    Cr 1510 Inventory A           1000

    Doing this through a sales invoice would result in that type of message because the program gives that kind of message when you post from a subjournal and there is no change in any G/L Account balance.  The program will record it as part of the inventory tracking but not the journal entries.

  • 0 in reply to Richard S. Ridings

    Hi Richard, thanks for your response. I am not familiar at all with accouting.

                SalesJournal salJourn = SDKInstanceManager.Instance.OpenSalesJournal();
    
                        try
                        {
                            salJourn.SelectTransType(0); // Invoice
                        }
                        catch (SimplyNoAccessException)
                        {
                            SDKInstanceManager.Instance.ClosePurchasesJournal();
                            throw new System.ArgumentException("Invoices are currently not available in this database");
                        }
    
                        salJourn.InvoiceNumber = pFacture.NoFacture;
                        salJourn.SelectAPARLedger(pFacture.ClientNom);
                        salJourn.SetComment(pFacture.POClient);
                        
                        
    
                        int i = 1;
                        foreach (FactureDetail fd in pFacture.FactureDetails)
                        {
                            if (RechercherItem(fd.CodeProduit))
                            {
                                salJourn.SetItemNumber(fd.CodeProduit, i);
                                salJourn.SetDescription(fd.DescProduit, i);
                                salJourn.SetQuantity(fd.Quantite, i);
                                salJourn.SetUnit(fd.UOM, i);
                                salJourn.SetPrice((double)fd.PrixUnitaire, i);
                                salJourn.SetLineAmount(fd.TotalLigne, i);
                                salJourn.SetLineAccount(fd.CodeGl, i);
                            }
                            else
                            {
                                SDKInstanceManager.Instance.ClosePurchasesJournal();
                                FermerConnexion();
                                throw new System.ArgumentException("Item '" + fd.CodeProduit.Trim() + "' n'existe pas");
                            }
                            
                            
                        }
    
                        try
                        {
                            if (salJourn.Post())
                            {
                                FermerConnexion();
                                return true;
                            }
                            else
                            {
                                FermerConnexion();
                                return false;
                            }
                                
                        }
                        catch (SimplyErrorMessageException ex)
                        {
                            FermerConnexion();
                            throw new ArgumentException("Sage50 PostFacture:"+ex.Message);
                        }
                        finally
                        {
                            //SDKInstanceManager.Instance.ClosePurchasesJournal();
                        }

    Using this code, we can post invoice in a Sample Company provided by Sage 50 Pro.

    But we are getting the Journal error on our customer database. So I do not post GL transaction directly and thought it should be handled correctly with Sage 50 SDK. Am I wrong ?

  • 0 in reply to SergeTurgeon

    Unfortunately, I don't read C# very well and I don't use the SDK in my programming.  Seeing the code isn't the same as seeing the journal entry.  From what I can read of your code, I don't see any major problems.

    Two Questions

    1) Does the customer indicated by salJourn.SelectAPARLedger(pFacture.ClientNom); exist in the company file?

    2) Does the item exist in the company file for each row (salJourn.SetItemNumber(fd.CodeProduit, i);)?

    I am not 100% sure about this but do you need to SetLineAccount if you are using an itemNumber currently in the system with a linked Revenue account?

  • 0 in reply to Richard S. Ridings

    Hi Richard, thanks for the answer.

    About yours questions 1) yes, 2) Yes
    I did not think that SetLineAccount was required, I added it just in case it was the source of the error.

     I am really scratching my head over this !!!

  • 0 in reply to SergeTurgeon

    Sorry but I don't know what else I can suggest without seeing the actual journal entry.  I am guessing the message is real and I indicated the reason above.

    I have assumed the posting in your copy of the Universal Sample file is the exact same entry tried in your database, but the results indicate this is not the case.

    So the last thing I can suggest is that you use the Sage 50 user interface to post the exact same invoice using the Sales data entry screens in both files and see if the journal entry is exactly the same (Report menu) and if so and one posts in the sample file and the other file does not, then you have the data entry screen images and resulting journal entries you can post here to get more help.

  • 0 in reply to Richard S. Ridings

    Thanks for your help. Among the first thing I tried is to post manually in sage the same invoice and it works no error ... kinda confusing but I will find a way ! There is always a way !!! I just need to figure out what is the difference between test and real company. Thanks again