DB_Trans.Source is no longer of type INT - it is of type VARCHAR and it points to an SY_Forms entry. This tells us exactly which form created the transaction (instead of relying on a hard-coded digit that maps to a module as in earlier versions of Jiwa). If you compare your stored procedure to the new v7 standard one, the first difference you will see (at line 147) is that your code:
- Code: Select all
CASE DB_Trans.Source
WHEN 0 THEN 'Sales Orders'
WHEN 1 THEN 'Debtor Sourced Transactions'
WHEN 2 THEN
CASE DB_Trans.SubType
WHEN 0 THEN 'Cash Book Receipts'
ELSE 'Cash Book Payments'
END
WHEN 3 THEN 'Bank Reconciliation'
ELSE 'Unknown'
END,
Has been replaced with:
- Code: Select all
CASE SY_Forms.Description
WHEN NULL THEN 'Unknown'
ELSE SY_Forms.Description
END,
This implies that we need to join in the "SY_Forms" table. If we look a little bit further down, we see in the FROM part of the query that the line:
- Code: Select all
LEFT JOIN SY_Forms ON SY_Forms.ClassName = DB_Trans.Source
has been inserted above the "WHERE" line.
The same is also true for line 179 and it's associated FROM clause.