Order by descending id to get the last 10 purchases

Closes #12497
This commit is contained in:
Cédric Krier
2023-08-17 16:18:21 +02:00
parent 2df45a15d4
commit 3cbb0efb43
+1 -1
View File
@@ -421,7 +421,7 @@ class Purchase(
table.invoice_method,
where=(table.party == self.party.id)
& (table.invoice_party == invoice_party),
order_by=table.id,
order_by=table.id.desc,
limit=10)
cursor.execute(*subquery.select(
subquery.currency,