1

كيف يمكن حصر الحركات التي تمت علي حسابات ذمم غير المذكورة في العملاء

كيف يمكن حصر الحركات التي تمت علي حسابات ذمم غير المذكورة في العملاء
حيث قام العميل بتغيير الحسابات في العميل بعد استعمالها في قيود

Eldabbas's avatar
9.1k
Eldabbas
asked 2019-01-06 05:48:21 +0200
Ahmed Qasid's avatar
5.8k
Ahmed Qasid
updated 2019-01-06 11:45:46 +0200
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

select distinct l.originType,l.originId,l.originCode from customer c inner join ledgertransline l on l.subsidiaryId = c.id
where l.account_id <>   c.mainAccount_id and (c.account1_id is null or l.account_id <> c.account1_id)
order by l.originType
and (c.account2_id is null or l.account_id <> c.account2_id)
and (c.account3_id is null or l.account_id <> c.account3_id)
and (c.account4_id is null or l.account_id <> c.account4_id)
and (c.account5_id is null or l.account_id <> c.account5_id)
and (c.account6_id is null or l.account_id <> c.account6_id)
and (c.account7_id is null or l.account_id <> c.account7_id)
and (c.account8_id is null or l.account_id <> c.account8_id)
and (c.account9_id is null or l.account_id <> c.account9_id)
and (c.account10_id is null or l.account_id <> c.account10_id)
and (c.account11_id is null or l.account_id <> c.account11_id)
and (c.account12_id is null or l.account_id <> c.account12_id)
and (c.account13_id is null or l.account_id <> c.account13_id)
and (c.account14_id is null or l.account_id <> c.account14_id)
and (c.account15_id is null or l.account_id <> c.account15_id)
and (c.account16_id is null or l.account_id <> c.account16_id)
and (c.account17_id is null or l.account_id <> c.account17_id)
and (c.account18_id is null or l.account_id <> c.account18_id)
and (c.account19_id is null or l.account_id <> c.account19_id)
and (c.account20_id is null or l.account_id <> c.account20_id)
Eldabbas's avatar
9.1k
Eldabbas
answered 2019-01-06 05:49:25 +0200
Ahmed Qasid's avatar
5.8k
Ahmed Qasid
updated 2019-01-06 11:46:18 +0200
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer