Importing Sales Invoice with .imp file, keep getting transaction is not balanced error.

Hi, I'm using a .imp file to import sales invoices into Sage 50 but whenever I try to import something I get a transaction is not balanced error. Ive tried a couple different methods, putting the full amount and the tax information in the transaction line and I've also tried putting the full amount minus the tax and the tax information in the transaction line, both methods still give the error.

Here is an example of one of my <SalInvoice> nodes, the total amount including tax is $480.25.

<SalInvoice>
"Test Company",,,"123 Test St","","WINDSOR","ON","N8X 4L4","CAN","","","","",
"2","6394","6394-0-A","11-14-2016","0","","425","0.00","HST","0","0","13.00","55.25"
"4000","1","326.95","326.95"
"4000","1","98.05","98.05"
</SalInvoice>

Is there something I'm missing? Should tax be included as a line item as well as the tax information portion?

Looks like I get this error even without tax information...here is another example where I get the Transaction is not balanced error:

<SalInvoice>
"Test Company 2",,,"123 Test St","","WINDSOR","ON","N8X 4L4","CAN","","","","",
"2","6422","6422-0-A","11-14-2016","0","","195","195"
"4000","1","150","150"
"4000","1","45","45"
</SalInvoice>

  • 0
    Your first example is $425 plus $55.25 in Freight Tax but the freight itself is $0.

    $326.95+98.05+55.25 <> 425

    If your second example, you have $195 as the total of two line items plus $195 in Freight <> $195 for the total invoice.

    The tax belongs on each line that it is applicable to and the last time I checked the HST is refundable but you have it marked as not refundable, so unless you have a tax code set up in your file with the non-refundable settings, you will still get errors, even if you fix the math and tax amounts in your examples.
  • 0 in reply to Richard S. Ridings

    I've tried the following with a test company that I set up as a generic company (with system generated COAs) and when I select the account the 4000 item belongs to it works fine, but when I try with my company with an account we created (but is set up the same as the generic account I chose for the test company) it gives me the transaction not balanced error.

    <SalInvoice>
    "Test Company 2",,,"123 Test St","","WINDSOR","ON","N8X 4L4","CAN","","","","",
    "2","6422","6422-0-A","11-14-2016","0","","195","0.00"
    "4000","1","150","150"
    "4000","1","45","45"
    </SalInvoice>

    Could there be an issue with the account I'm choosing? In both cases its a revenue account I selected.

    I also updated the tax example to:

    <Version>
    "12001", "1"
    </Version>
    <SalInvoice>
    "Test Company 2.",,,"123 Test St","","WINDSOR","ON","N8X 4L4","CAN","","","","",
    "2","6394","6394-0-A","11-14-2016","0","","480.25","0.00","HST","1","1","13.00","55.25"
    "4000","1","326.95","326.95"
    "4000","1","98.05","98.05"
    </SalInvoice>

    And again this one will import for the test company but not my company, I also see what you're saying about the tax being applied to the freight amount when the freight amount is $0, is this where it should be applied when the tax is on the whole invoice and not individual line items?...I'm a tech person and not an expert when it comes to the actual accounting info so your help is greatly appreciated.

  • 0 in reply to krissyj05

    Did you ever get a resolution to this? I have a similar problem, out of balance sales invoice which imports fine in my test company but not in the production company. Only seems to fail when there's a freight amount other than 0.