This commit is contained in:
JMARyA 2024-05-03 10:34:09 +02:00
parent 4de834b385
commit fa9f394070
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -365,10 +365,17 @@ impl Variant {
todo!()
}
// case: import
// made / bought an item -> supply
// check in with attrs -> uuid (transaction)
// commited to db
/// Records a supply transaction in the database.
///
/// # Arguments
///
/// * `amount` - The quantity of items supplied.
/// * `price` - The price of the supplied items.
/// * `origin` - The origin or source of the supplied items.
///
/// # Returns
///
/// Returns a UUID string representing the transaction.
pub async fn supply(&self, amount: usize, price: Price, origin: &str) -> String {
let db = get_mongo!();