Refactor product cost retrieval in DirectorWorker: Simplify the SQL query by removing the original_sell_cost from the selection, and adjust the cost resolution logic to improve clarity and efficiency in database interactions.

This commit is contained in:
Torsten Schulz (local)
2026-01-28 14:41:27 +01:00
parent c9e0781b61
commit 1d9a7ba8a0
3 changed files with 3 additions and 9 deletions

View File

@@ -44,7 +44,7 @@ VALUES ($1, $2, FALSE, NOW(), NOW());
// Product pricing
pub const QUERY_GET_PRODUCT_COST: &str = r#"
SELECT original_sell_cost, sell_cost FROM falukant_type.product WHERE id = $1;
SELECT sell_cost FROM falukant_type.product WHERE id = $1;
"#;
pub const QUERY_GET_DIRECTORS: &str = r#"