Skip to content

Commit

Permalink
fix: round amounts in CSV export to 2 decimals (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: Dietmar Fischer <[email protected]>
  • Loading branch information
Didiman1998 and xXDietmarFischer authored Mar 27, 2024
1 parent d9378d5 commit ce65cc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext_datev/erpnext_datev/report/datev/datev.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ def run_query(filters, extra_fields, extra_joins, extra_filters, as_dict=1):
SELECT
/* either debit or credit amount; always positive */
case gl.debit when 0 then gl.credit else gl.debit end as 'Umsatz (ohne Soll/Haben-Kz)',
case ROUND(gl.debit, 2) when 0 then ROUND(gl.credit, 2) else ROUND(gl.debit, 2) end as 'Umsatz (ohne Soll/Haben-Kz)',
/* 'H' when credit, 'S' when debit */
case gl.debit when 0 then 'H' else 'S' end as 'Soll/Haben-Kennzeichen',
case ROUND(gl.debit, 2) when 0 then 'H' else 'S' end as 'Soll/Haben-Kennzeichen',
/* account number or, if empty, party account number */
acc.account_number as 'Konto',
Expand Down

0 comments on commit ce65cc7

Please sign in to comment.