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:
@@ -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#"
|
||||
|
||||
Reference in New Issue
Block a user