diff --git a/modules/automation/automation.py b/modules/automation/automation.py index 83b5f8c..d99065e 100644 --- a/modules/automation/automation.py +++ b/modules/automation/automation.py @@ -227,7 +227,7 @@ class AutomationDocument(ModelSQL, ModelView, Workflow): t.SELL_PREMIUM, t.SALE_CONTRACT_NUMBER, t.SALE_DECLARATION_KEY, - where=(t.BOOKING_NUMBER == int(sh[0].bl_number)) + where=(t.BOOKING_NUMBER == int(sh[0].reference)) ) logger.info("QUERY:%s",*query) cursor.execute(*query)