add fiscal_year, drop due_to
This commit is contained in:
parent
0e4fd12238
commit
ab365c65a1
@ -1365,7 +1365,7 @@ SELECT
|
|||||||
,description
|
,description
|
||||||
,account
|
,account
|
||||||
,created_at
|
,created_at
|
||||||
,due_at
|
,fiscal_year
|
||||||
,amount
|
,amount
|
||||||
,document_no
|
,document_no
|
||||||
,account_entry_category
|
,account_entry_category
|
||||||
@ -1383,7 +1383,7 @@ def insert_account_entry(user, token_info, **args):
|
|||||||
v_description = body["description"]
|
v_description = body["description"]
|
||||||
v_account = body["account"]
|
v_account = body["account"]
|
||||||
v_created_at = body["created_at"]
|
v_created_at = body["created_at"]
|
||||||
v_due_at = body["due_at"]
|
v_fiscal_year = body["fiscal_year"]
|
||||||
v_amount = body["amount"]
|
v_amount = body["amount"]
|
||||||
v_document_no = body["document_no"]
|
v_document_no = body["document_no"]
|
||||||
v_account_entry_category = body["account_entry_category"]
|
v_account_entry_category = body["account_entry_category"]
|
||||||
@ -1394,7 +1394,7 @@ INSERT INTO account_entry_t
|
|||||||
description
|
description
|
||||||
,account
|
,account
|
||||||
,created_at
|
,created_at
|
||||||
,due_at
|
,fiscal_year
|
||||||
,amount
|
,amount
|
||||||
,document_no
|
,document_no
|
||||||
,account_entry_category
|
,account_entry_category
|
||||||
@ -1413,7 +1413,7 @@ INSERT INTO account_entry_t
|
|||||||
v_description
|
v_description
|
||||||
,v_account
|
,v_account
|
||||||
,v_created_at
|
,v_created_at
|
||||||
,v_due_at
|
,v_fiscal_year
|
||||||
,v_amount
|
,v_amount
|
||||||
,v_document_no
|
,v_document_no
|
||||||
,v_account_entry_category
|
,v_account_entry_category
|
||||||
@ -1432,7 +1432,7 @@ SELECT
|
|||||||
,description
|
,description
|
||||||
,account
|
,account
|
||||||
,created_at
|
,created_at
|
||||||
,due_at
|
,fiscal_year
|
||||||
,amount
|
,amount
|
||||||
,document_no
|
,document_no
|
||||||
,account_entry_category
|
,account_entry_category
|
||||||
@ -1453,7 +1453,7 @@ SELECT
|
|||||||
,description
|
,description
|
||||||
,account
|
,account
|
||||||
,created_at
|
,created_at
|
||||||
,due_at
|
,fiscal_year
|
||||||
,amount
|
,amount
|
||||||
,document_no
|
,document_no
|
||||||
,account_entry_category
|
,account_entry_category
|
||||||
@ -1474,7 +1474,7 @@ SELECT
|
|||||||
,description
|
,description
|
||||||
,account
|
,account
|
||||||
,created_at
|
,created_at
|
||||||
,due_at
|
,fiscal_year
|
||||||
,amount
|
,amount
|
||||||
,document_no
|
,document_no
|
||||||
,account_entry_category
|
,account_entry_category
|
||||||
|
@ -1793,9 +1793,8 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
created_at:
|
created_at:
|
||||||
type: string
|
type: string
|
||||||
due_at:
|
fiscal_year:
|
||||||
type: string
|
type: integer
|
||||||
nullable: true
|
|
||||||
amount:
|
amount:
|
||||||
type: number
|
type: number
|
||||||
document_no:
|
document_no:
|
||||||
|
@ -5,6 +5,6 @@ from flask_cors import CORS
|
|||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
app = connexion.App('hv2-api')
|
app = connexion.App('hv2-api')
|
||||||
app.add_api('./openapi.yaml')
|
app.add_api('./openapi.yaml', options = {"swagger_ui": True})
|
||||||
CORS(app.app)
|
CORS(app.app)
|
||||||
app.run(port=8080)
|
app.run(port=8080)
|
||||||
|
@ -138,7 +138,7 @@
|
|||||||
{ "name": "description", "sqltype": "varchar(1024)", "notnull": true },
|
{ "name": "description", "sqltype": "varchar(1024)", "notnull": true },
|
||||||
{ "name": "account", "sqltype": "integer", "notnull": true, "foreignkey": true },
|
{ "name": "account", "sqltype": "integer", "notnull": true, "foreignkey": true },
|
||||||
{ "name": "created_at", "sqltype": "timestamp", "notnull": true, "default": "now()", "selector": 0 },
|
{ "name": "created_at", "sqltype": "timestamp", "notnull": true, "default": "now()", "selector": 0 },
|
||||||
{ "name": "due_at", "sqltype": "timestamp", "notnull": false },
|
{ "name": "fiscal_year", "sqltype": "integer", "notnull": true },
|
||||||
{ "name": "amount", "sqltype": "numeric(10,2)", "notnull": true },
|
{ "name": "amount", "sqltype": "numeric(10,2)", "notnull": true },
|
||||||
{ "name": "document_no", "sqltype": "integer", "unique": true },
|
{ "name": "document_no", "sqltype": "integer", "unique": true },
|
||||||
{ "name": "account_entry_category", "sqltype": "integer", "notnull": true, "foreignkey": true }
|
{ "name": "account_entry_category", "sqltype": "integer", "notnull": true, "foreignkey": true }
|
||||||
|
@ -150,7 +150,7 @@ CREATE TABLE account_entry_t (
|
|||||||
,description varchar(1024) not null
|
,description varchar(1024) not null
|
||||||
,account integer not null references account_t (id)
|
,account integer not null references account_t (id)
|
||||||
,created_at timestamp not null default now()
|
,created_at timestamp not null default now()
|
||||||
,due_at timestamp
|
,fiscal_year integer not null
|
||||||
,amount numeric(10,2) not null
|
,amount numeric(10,2) not null
|
||||||
,document_no integer unique
|
,document_no integer unique
|
||||||
,account_entry_category integer not null references account_entry_category_t (id)
|
,account_entry_category integer not null references account_entry_category_t (id)
|
||||||
|
@ -193,7 +193,7 @@ export interface AccountEntry {
|
|||||||
description: string
|
description: string
|
||||||
account: number
|
account: number
|
||||||
created_at: string
|
created_at: string
|
||||||
due_at: string
|
fiscal_year: number
|
||||||
amount: number
|
amount: number
|
||||||
document_no: number
|
document_no: number
|
||||||
account_entry_category: number
|
account_entry_category: number
|
||||||
@ -203,7 +203,7 @@ export const NULL_AccountEntry: AccountEntry = {
|
|||||||
,description: ''
|
,description: ''
|
||||||
,account: undefined
|
,account: undefined
|
||||||
,created_at: ''
|
,created_at: ''
|
||||||
,due_at: ''
|
,fiscal_year: undefined
|
||||||
,amount: undefined
|
,amount: undefined
|
||||||
,document_no: undefined
|
,document_no: undefined
|
||||||
,account_entry_category: undefined
|
,account_entry_category: undefined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user