due_at fix

This commit is contained in:
2022-01-06 21:06:16 +01:00
parent 422a8d37ab
commit 2fc7922707
10 changed files with 191 additions and 64 deletions

View File

@ -269,6 +269,9 @@ SELECT
,account
FROM tenant_t
WHERE account = %s
ORDER BY
lastname
,firstname
""",
"params": (accountId, )
}
@ -391,6 +394,8 @@ SELECT
,account
FROM premise_t
WHERE account = %s
ORDER BY
description
""",
"params": (accountId, )
}
@ -507,6 +512,9 @@ SELECT
,flat_no
FROM flat_t
WHERE premise = %s
ORDER BY
premise
,description
""",
"params": (premiseId, )
}
@ -674,6 +682,9 @@ SELECT
,flat
FROM overhead_advance_flat_mapping_t
WHERE overhead_advance = %s
ORDER BY
overhead_advance
,flat
""",
"params": (overhead_advanceId, )
}
@ -688,6 +699,9 @@ SELECT
,flat
FROM overhead_advance_flat_mapping_t
WHERE flat = %s
ORDER BY
overhead_advance
,flat
""",
"params": (flatId, )
}
@ -784,6 +798,9 @@ SELECT
,premise
FROM parking_t
WHERE premise = %s
ORDER BY
premise
,description
""",
"params": (premiseId, )
}
@ -880,6 +897,9 @@ SELECT
,premise
FROM commercial_premise_t
WHERE premise = %s
ORDER BY
premise
,description
""",
"params": (premiseId, )
}
@ -1011,6 +1031,9 @@ SELECT
,enddate
FROM tenancy_t
WHERE tenant = %s
ORDER BY
description
,startdate
""",
"params": (tenantId, )
}
@ -1030,6 +1053,9 @@ SELECT
,enddate
FROM tenancy_t
WHERE flat = %s
ORDER BY
description
,startdate
""",
"params": (flatId, )
}
@ -1049,6 +1075,9 @@ SELECT
,enddate
FROM tenancy_t
WHERE parking = %s
ORDER BY
description
,startdate
""",
"params": (parkingId, )
}
@ -1068,6 +1097,9 @@ SELECT
,enddate
FROM tenancy_t
WHERE commercial_premise = %s
ORDER BY
description
,startdate
""",
"params": (commercial_premiseId, )
}
@ -1323,12 +1355,13 @@ SELECT
,description
,account
,created_at
,due_at
,amount
,document_no
,account_entry_category
FROM account_entry_t
ORDER BY
amount
created_at
""",
"params": ()
}
@ -1340,6 +1373,7 @@ def insert_account_entry(user, token_info, **args):
v_description = body["description"]
v_account = body["account"]
v_created_at = body["created_at"]
v_due_at = body["due_at"]
v_amount = body["amount"]
v_document_no = body["document_no"]
v_account_entry_category = body["account_entry_category"]
@ -1350,6 +1384,7 @@ INSERT INTO account_entry_t
description
,account
,created_at
,due_at
,amount
,document_no
,account_entry_category
@ -1360,6 +1395,7 @@ INSERT INTO account_entry_t
,%s
,%s
,%s
,%s
)
RETURNING *
""",
@ -1367,6 +1403,7 @@ INSERT INTO account_entry_t
v_description
,v_account
,v_created_at
,v_due_at
,v_amount
,v_document_no
,v_account_entry_category
@ -1385,6 +1422,7 @@ SELECT
,description
,account
,created_at
,due_at
,amount
,document_no
,account_entry_category
@ -1405,11 +1443,14 @@ SELECT
,description
,account
,created_at
,due_at
,amount
,document_no
,account_entry_category
FROM account_entry_t
WHERE account = %s
ORDER BY
created_at
""",
"params": (accountId, )
}
@ -1423,11 +1464,14 @@ SELECT
,description
,account
,created_at
,due_at
,amount
,document_no
,account_entry_category
FROM account_entry_t
WHERE account_entry_category = %s
ORDER BY
created_at
""",
"params": (account_entry_categoryId, )
}
@ -1442,6 +1486,8 @@ SELECT
,tenant
,note
FROM note_t
ORDER BY
created_at
""",
"params": ()
}
@ -1505,6 +1551,8 @@ SELECT
,note
FROM note_t
WHERE tenant = %s
ORDER BY
created_at
""",
"params": (tenantId, )
}

View File

@ -129,6 +129,14 @@ SELECT
#end for
FROM ${table.name}_t
WHERE ${column.name} = %s
#if $table.selectors
ORDER BY
#set $sep = ""
#for $selector in $table.selectors
$sep$selector
#set $sep = ","
#end for
#end if
""",
"params": (${column.name}Id, )
}

View File

@ -1790,6 +1790,9 @@ components:
type: integer
created_at:
type: string
due_at:
type: string
nullable: true
amount:
type: number
document_no: