Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- query = table.select(table.id, where=Exists(
- subtable.select(subtable.id,
- where=((table.id != subtable.id) &
- (table.account == subtable.account) &
- (table.party == subtable.party) &
- (((table.debit != zero) & (subtable.credit != zero))
- | ((table.credit != zero) &
- (subtable.credit != zero))) &
- (table.reconciliation == None) &
- (subtable.reconciliation == None))
- )))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement