Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
removed dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
dvalnn committed May 29, 2024
1 parent 6b4a57f commit cc8f35b
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/db_api/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,30 +158,6 @@ impl Item {
.await
}

pub async fn current_stock(
con: &mut sqlx::PgConnection,
) -> sqlx::Result<i64> {
let row = sqlx::query!(
r#"
SELECT COUNT(*) as quantity
FROM items
WHERE items.status = $1
"#,
ItemStatus::InStock as ItemStatus,
)
.fetch_one(con)
.await?;
Ok(row.quantity.unwrap_or(0))
}

pub async fn get_stock_prevision(
_day: i32,
_con: &mut sqlx::PgConnection,
) -> sqlx::Result<i64> {
//TODO: total stock prevision for day is current stock + arrivals - departures
todo!()
}

pub async fn update(
&self,
con: &mut sqlx::PgConnection,
Expand Down

0 comments on commit cc8f35b

Please sign in to comment.