Enhance logging for sales checks in DirectorWorker: Added detailed logging statements to track the sales verification process, including cases with no items to sell and the number of inventory items found. This improves visibility into the sales workflow and aids in debugging.
This commit is contained in:
@@ -652,10 +652,17 @@ impl DirectorWorker {
|
||||
conn.prepare("remove_inventory", QUERY_REMOVE_INVENTORY)?;
|
||||
conn.prepare("add_sell_log", QUERY_ADD_SELL_LOG)?;
|
||||
|
||||
// Falls es nichts zu verkaufen gibt, können wir sofort zurückkehren.
|
||||
if items.is_empty() {
|
||||
eprintln!(
|
||||
"[DirectorWorker] Verkaufsprüfung Director {} (branch_id={}): nichts zu verkaufen",
|
||||
director.id, director.branch_id
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
eprintln!(
|
||||
"[DirectorWorker] Verkaufsprüfung Director {} (branch_id={}): {} Inventar-Items gefunden",
|
||||
director.id, director.branch_id, items.len()
|
||||
);
|
||||
|
||||
// Für alle Items dieses Directors sollten die user_id-Felder identisch
|
||||
// sein (Arbeitgeber des Directors).
|
||||
|
||||
Reference in New Issue
Block a user