Sage 500 Upgrade - Error 13


upon trying to save an invoice I am receiving this error in my testing of Sage 500 2013:

Module: Company: TT1 AppName: ProcessInvoices Error <13> occurred at <frmInvcEntry> in Procedure <DMPostSave> Type mismatch. 

happens on each and every invoice.  Could anyone please advise?

Thank you.

  • 0

    What version are you upgrading to?  Error 13 indicates a type mismatch error within the client. (Example trying to place a character value into a numeric value) .  Do you have any type of customization (Customizer or source code) for this task?  If not I would recommend contacting Sage support as there isn't much you can do for this issue as it is occurring within the client and not the database.

  • 0 in reply to LouDavis

    Thanks Lou, I have a case with Sage.  I am upgrading from 7.3 to 2013.  This is on a test box currently but we are hoping to go into production as early as end of next week/ beginning of following.  Another error that occurs almost hand-in-hand with this is "Cannot insert the value NULL into column 'TradeDiscAmt' table.  dbo.tarinvoicelinedest column does not allow nulls; Insert fails'.  the value on the screen for tradediscamt is 0 and percentage is 0 ~ even if I add an amount I still cannot save.  I will update once a solution has been concluded.

  • 0 in reply to Mykidz9598

    Are you using Avatax by any chance?

  • 0 in reply to Katie.Mercure


    The fixes are probably pretty easy if you'd have someone with SQL knowledge help.  For instance you could do select * from tarInvoicelinedist where tradediscamt is null in SQLManagement Studio.  If it finds some then you could update them to be equal to zero.  I'd recommend getting someone like Lou or maybe Joe Noll or your reseller involved.  They may cost a bit but you'll save tons of time plus they are not likely to make unrecoverable mistakes.  Lou or Joe could easily troubleshoot the error 13 and the null issue.  I'd offer to do the work but my boss says I have to charge 2,752.32 per hour if I am helping another company.  :)


  • 0 in reply to JohnHanrahan

    Yes, Katie, we are using Avatax.  And, we are getting errors related to Avatax as well since it is not exactly setup correctly.  I have never used Avatax and not familiar but we are in process of getting our test sandbox setup so we can test it efficiently.

    John - as for the tarInvoicelinedist, great suggestion, I never even thought to try that.  However, my query turned up 0 records.  And even when I enter a value in tradediscamt on entry of the Invoice and/or Sales Order I get the same error.  

    side note:  we use DC Warehouse for our sales order and that does not give the error 13, but I did at least try the Sage SO for kicks and giggles! :)

  • 0 in reply to Mykidz9598

    Also, the SQL Profiler appears to hang up on the tradediscamt regardless of the value - 0.00 or greater. Could it be related to Avatax?

  • 0 in reply to Mykidz9598

    It's hard to know but it sounds like there is a bug in SO Entry.  SQL Profiler might be hanging because the vb program is hanging.  Do you know if DC has integrated Avatax into their code?  We use DC also but do not use Avatax.  I actually fixed a ton of the Avatax code (at a previous employer) in version 6.3 or 7.0 or around there but then Sage updated how they do taxes so it would be easier to integrate.  I am not familiar with what they are doing now.  I'd still suggest considering working with Lou/Joe because they'll be able to trace the code in VB.  Or ask Sage to escalate it.  You might turn off avatax integration and try it.  That might point a finger.

  • 0 in reply to JohnHanrahan

    What does SQL Syntax look like that you put together to pull this information, that turned up 0 records as you stated above?

  • 0 in reply to jnoll

    select * from tarInvoicelinedist where tradediscamt is not null   --- this one pulled up 0 records.

    select isnull(tradediscamt, 8) from tarInvoicelinedist where tradediscamt <> 0 order by tradediscamt  -- ran this just in case.   -- this one pulled about 300 records out of 4000.

  • 0 in reply to Mykidz9598

    If you are trying to get the null records shouldn't it be...

    -- To see the NULL rows

    select * from tarInvoicelinedist where tradediscamt is not null

    -- To Update the NULL rows to 0

    update tarInvoicelinedist set TradeDiscAmt = 0 where TradeDiscAmt is null

    Maybe I am missing something.