accounts renamed to ledger_accounts from now on

This commit is contained in:
Priec
2026-08-17 19:07:36 +02:00
parent d3b2f14fd2
commit 444ca26d47
10 changed files with 16 additions and 16 deletions

View File

@@ -1040,7 +1040,7 @@ mod tests {
let error = draft.validate(crate::i18n::Locale::default()).unwrap_err();
assert!(error.contains("38 characters"), "{error}");
draft.table_name = "accounts".to_string();
draft.table_name = "ledger_accounts".to_string();
assert!(draft.validate(crate::i18n::Locale::default()).is_err());
draft.table_name = "general_ledger".to_string();
assert!(draft.validate(crate::i18n::Locale::default()).is_err());

View File

@@ -98,7 +98,7 @@ pub(crate) async fn load_page(
.into_iter()
// The profile's ledger accounts are not a link target of their own: an
// ACCOUNTING column is how a row is posted to one.
.filter(|table| table.name != crate::schema::ACCOUNTS_TABLE)
.filter(|table| table.name != crate::schema::LEDGER_ACCOUNTS_TABLE)
.map(|table| RelationTableOption {
name: table.name,
global: table.global,

View File

@@ -349,7 +349,7 @@ impl TableDefinitionPageState {
/// A table cannot link to itself, and the chart of accounts is reached
/// through an ACCOUNTING row rather than through a link of one's own.
fn eligible_link_target(&self, table: &TableSummary) -> bool {
table.name != self.selection.table && table.name != crate::schema::ACCOUNTS_TABLE
table.name != self.selection.table && table.name != crate::schema::LEDGER_ACCOUNTS_TABLE
}
pub(crate) fn global_link_target_tables(&self) -> Vec<&str> {

View File

@@ -268,8 +268,8 @@ mod tests {
profile: "billing".to_string(),
table: "invoice".to_string(),
},
tables: vec![table("invoice", "dynamic"), table("accounts", "system")],
link_targets: vec![table("invoice", "dynamic"), table("accounts", "system")],
tables: vec![table("invoice", "dynamic"), table("ledger_accounts", "system")],
link_targets: vec![table("invoice", "dynamic"), table("ledger_accounts", "system")],
detail: Some(TableDetailView {
id: 7,
row_version: 1,
@@ -398,7 +398,7 @@ mod tests {
#[test]
fn a_system_table_gets_no_write_form() {
let mut state = page();
state.selection.table = "accounts".to_string();
state.selection.table = "ledger_accounts".to_string();
let html = render_delete_page(&state);
assert!(!html.contains("Template error"), "{html}");
@@ -551,7 +551,7 @@ mod tests {
assert!(html.contains(r#"<optgroup label="System-created">"#));
assert!(!html.contains(r#"<option value="invoice""#));
// The chart of accounts is reached through ACCOUNTING, never linked to.
assert!(!html.contains(r#"<option value="accounts""#));
assert!(!html.contains(r#"<option value="ledger_accounts""#));
}
/// The append screen holds a column to the same rules the builder does,