Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7128 Zobrazení

I found this line inside __compute, mapping{ in account.py

'debit': "COALESCE(SUM(l.debit), 0) as debit",

but I don't understand what is l.debit or l.credit also the parent_right parent_left mechanics

Avatar
Zrušit
Autor

Thx thats good information

Nejlepší odpověď

Debit and Credit are basic accounting concepts, used in the double-entry bookkeeping system.

COALESCE is this case works like Oracle's NVL and SQLServer's IsNull: COALESCE(a, b) returns a if a is not null, and returns b if a is null.

It safely defaults to a zero value if no data is found.

Avatar
Zrušit
Autor

well I already knew all of that. What im asking is how the mapping to l.debit or other l. variables works, and how the parent_right and parent_left are generated and what is their role in the calculation.

Related Posts Odpovědi Zobrazení Aktivita
1
bře 15
4251
2
lis 16
5499