Index: branches/b_3_45_00_00/Database/Triggers/tr_bd_customer.sql
===================================================================
diff -u -r252348 -r252351
--- branches/b_3_45_00_00/Database/Triggers/tr_bd_customer.sql	(.../tr_bd_customer.sql)	(revision 252348)
+++ branches/b_3_45_00_00/Database/Triggers/tr_bd_customer.sql	(.../tr_bd_customer.sql)	(revision 252351)
@@ -1,19 +1,24 @@
-CREATE TRIGGER tr_bd_customer
+
+CREATE  TRIGGER tr_bd_customer
   BEFORE DELETE ON CUSTOMER
   REFERENCING OLD AS deleted
   for each row BEGIN
 DECLARE v_text varchar(254);
- DECLARE v_CQT_text varchar(1000);
+DECLARE v_CQT_text varchar(1000);
+
   SET v_text=deleted.CUSTOMER_NUM || '|' || deleted.ALPHA_KEY;
   SET v_text=v_text || '|' || deleted.NAME || '|' || deleted.ADDRESS1;
   SET v_text=v_text || '|' || deleted.PHONE;
+
+  SET v_CQT_text=deleted.ID || '|' || deleted.CUSTOMER_NUM || '|' || deleted.GLOBAL_CUSTOMER_ID;
+  SET v_CQT_text=v_CQT_text || '|' || deleted.LAST_MODIFIED_DATE || '|' || deleted.MODIFIED_BY_EMPLOYEE_ID;
+
   CALL sp_log_file_insdel_activity (deleted.loc, 68,
       deleted.id, NULL, NULL,
       v_text, 'D', deleted.last_modified_date, deleted.modified_by_employee_id, 1);
-  If ((Select send_customer_domain from tams.store_profile) = 'Y') Then    
-    SET v_CQT_text=deleted.ID || '|' || deleted.CUSTOMER_NUM || '|' || GLOBAL_CUSTOMER_ID;
-    SET v_CQT_text=v_CQT_text || '|' || deleted.LAST_MODIFIED_DATE || '|' || deleted.MODIFIED_BY_EMPLOYEE_ID;
-    Insert Into customer_change_queue (customer_id,loc,action,trigger_source,deleted_value)
-			 Values (deleted.id,deleted.loc,'D','CUSTOMER',v_CQT_text);	
-  Endif;
+
+  If ((Select send_customer_domain from tams.store_profile) = 'Y') THEN
+    Insert Into customer_change_queue (customer_id,loc,action,trigger_source,deleted_value) 
+			 Values (deleted.id,deleted.loc,'D','CUSTOMER',v_CQT_text);	 
+  END IF;
 End;
\ No newline at end of file
