updated vat allocation previous month work
This commit is contained in:
parent
7097d61c6e
commit
7dceb6356c
|
|
@ -422,7 +422,21 @@ def get_sales_invoice_items_previous_months(year, month, customers=None, min_amo
|
|||
year < %(year)s
|
||||
OR (year = %(year)s AND month < %(month)s)
|
||||
)
|
||||
ORDER BY year DESC, month DESC
|
||||
ORDER BY year DESC,
|
||||
CASE month
|
||||
WHEN 'January' THEN 1
|
||||
WHEN 'February' THEN 2
|
||||
WHEN 'March' THEN 3
|
||||
WHEN 'April' THEN 4
|
||||
WHEN 'May' THEN 5
|
||||
WHEN 'June' THEN 6
|
||||
WHEN 'July' THEN 7
|
||||
WHEN 'August' THEN 8
|
||||
WHEN 'September' THEN 9
|
||||
WHEN 'October' THEN 10
|
||||
WHEN 'November' THEN 11
|
||||
WHEN 'December' THEN 12
|
||||
END DESC
|
||||
LIMIT 1
|
||||
""", {
|
||||
'year': year,
|
||||
|
|
@ -1018,7 +1032,21 @@ def get_payment_entries_previous_months(year, month, customers=None, min_amount=
|
|||
year < %(year)s
|
||||
OR (year = %(year)s AND month < %(month)s)
|
||||
)
|
||||
ORDER BY year DESC, month DESC
|
||||
ORDER BY year DESC,
|
||||
CASE month
|
||||
WHEN 'January' THEN 1
|
||||
WHEN 'February' THEN 2
|
||||
WHEN 'March' THEN 3
|
||||
WHEN 'April' THEN 4
|
||||
WHEN 'May' THEN 5
|
||||
WHEN 'June' THEN 6
|
||||
WHEN 'July' THEN 7
|
||||
WHEN 'August' THEN 8
|
||||
WHEN 'September' THEN 9
|
||||
WHEN 'October' THEN 10
|
||||
WHEN 'November' THEN 11
|
||||
WHEN 'December' THEN 12
|
||||
END DESC
|
||||
""", {
|
||||
'year': year,
|
||||
'month': month_number
|
||||
|
|
|
|||
Loading…
Reference in New Issue