Querying Journal Entries - Debit/Credit mismatches?

SUGGESTED

I'm working through an export from Simply Accounting into a BI Package.

I have a basic query written that flushes out the journal entry - but the debits and credits for the journal entry are not 'netting' zero because of the positive/negative sign...

First image shows an export based on a SQL Query out of Simply accounting, showing a line for each line entry in the journal. You will notice that the debit/credit amounts differ types (debits vs credits) than those shown in the Simply Screen shot showing the Purchase Transaction Detail.

Results of my flushed out query:

Showing 475.96 as a debit..

Showing 4007.99, 4483.95 as a credit...

View from Simply: Purchase Transaction Detail

Showing 475.96 and 4007.99 as debits..

Showing 4483.95 s a credit...

Is there a simply way to fix this in my query? How is the data stored in the tables vs how it is displayed in the Simply Screen shot???

Any help you can provide would be appreciated.

Thanks.

Mike