Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 2 additions & 12 deletions crates/horae/src/reports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,8 @@ fn projects_xlsx(rows: &[ProjectExportRow]) -> Result<Vec<u8>, StatusCode> {

// ── Invoice export ────────────────────────────────────────────────────────────

/// An invoice and its line items, org-scoped — shared with the `get_invoice`
/// server fn so exports render exactly what the app serves. `None` when the
/// org has no such invoice; each caller maps that to its own not-found error.
pub(crate) async fn fetch_invoice_with_lines(
invoice_id: uuid::Uuid,
org_id: uuid::Uuid,
) -> Result<Option<(crate::models::Invoice, Vec<crate::models::InvoiceLine>)>, sqlx::Error> {
let state = crate::state::global_state().await;
let mut connection = state.db.acquire().await?;
fetch_invoice_from(&mut connection, invoice_id, org_id).await
}

/// Shared org-scoped invoice projection. Callers authorize the actor and choose
/// the transaction so metadata and lines belong to the same snapshot.
pub(crate) async fn fetch_invoice_from(
connection: &mut sqlx::PgConnection,
invoice_id: uuid::Uuid,
Expand Down
2 changes: 2 additions & 0 deletions crates/horae/src/server_fns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,8 @@ mod plugins;
mod project_creation;
mod projects;
mod reports;
#[cfg(feature = "server")]
mod snapshot;
mod time_entries;
mod users;

Expand Down
Loading
Loading