Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
7063 Vistas

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
Descartar
Autor

Thx thats good information

Mejor respuesta

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
Descartar
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.

Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 15
4139
2
nov 16
5418