diff --git a/src/db_api/items.rs b/src/db_api/items.rs index fc41d6d..4e3c9e1 100644 --- a/src/db_api/items.rs +++ b/src/db_api/items.rs @@ -158,30 +158,6 @@ impl Item { .await } - pub async fn current_stock( - con: &mut sqlx::PgConnection, - ) -> sqlx::Result { - 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 { - //TODO: total stock prevision for day is current stock + arrivals - departures - todo!() - } - pub async fn update( &self, con: &mut sqlx::PgConnection,