get_user_currency 查 account.currency 报 Unknown column——migration SQL 给 5 张账务表 加了多币种列但 models json 未同步。逐表对齐 multi_currency_migration.sql: - account: +currency - bill: +currency +base_amount - bill_detail/ledger/acc_detail: +currency +exchange_rate +base_amount
108 lines
2.4 KiB
JSON
108 lines
2.4 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "account",
|
|
"title": "机构账户表",
|
|
"primary": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "id",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "accounting_orgid",
|
|
"title": "账本机构",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "orgid",
|
|
"title": "主机构id",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "org1id",
|
|
"title": "从机构id",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "currency",
|
|
"title": "币种",
|
|
"type": "str",
|
|
"length": 3,
|
|
"nullable": "yes"
|
|
},
|
|
{
|
|
"name": "subjectid",
|
|
"title": "科目号",
|
|
"type": "str",
|
|
"length": 21
|
|
},
|
|
{
|
|
"name": "balance_at",
|
|
"title": "余额方向",
|
|
"type": "str",
|
|
"length": 1
|
|
},
|
|
{
|
|
"name": "max_detailno",
|
|
"title": "最大明细顺序号",
|
|
"type": "short"
|
|
},
|
|
{
|
|
"name": "balance",
|
|
"title": "余额",
|
|
"type": "float",
|
|
"length": 20,
|
|
"dec": 2
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx1",
|
|
"idxtype": "unique",
|
|
"idxfields": [
|
|
"accounting_orgid",
|
|
"orgid",
|
|
"subjectid",
|
|
"org1id"
|
|
]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "subjectid",
|
|
"table": "subject",
|
|
"valuefield": "id",
|
|
"textfield": "name"
|
|
},
|
|
{
|
|
"field": "orgid",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
},
|
|
{
|
|
"field": "balance_at",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='accounting_dir'"
|
|
},
|
|
{
|
|
"field": "org1id",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
}
|
|
]
|
|
}
|