SELECT T1."ACCT_NR" AS "Acct Nr_ori",
	T1."LEDGER_ACCTS_NAME" AS "Ledger Accts Name",
	T1."LEDGER_ACCTS_NAME2" AS "Ledger Accts Name2",
	T1."HANDLER" AS "Handler_2",
	T1."DEPT_SPLIT" AS "Dept Split",
	T1."TYPE_ACCTT" AS "Type Acctt",
	(rtrim(T2."ACCT_NO")) + '_STK' AS "Acct No",
	T2."BOOKKEEP_DATE" AS "Bookkeep Date",
	T2."BOOKKEEP_PERIOD" AS "Bookkeep Period",
	T2."DOCUMENT_NO" AS "Document No",
	T2."ORIGIN" AS "Origin",
	T2."STATUS" AS "Status",
	T2."DEBIT_AMOUNT" AS "Debit Amount",
	T2."CREDIT_AMOUNT" AS "Credit Amount",
	T2."DEBIT_QUANTITY" AS "Debit Quantity",
	T2."CREDIT_QUANTITY" AS "Credit Quantity",
	T2."AA_TRTYPE" AS "Aa Trtype",
	T2."DEPARTMENT" AS "Department",
	T2."STOCK" AS "Stock",
	T2."MAKE_FAMILY" AS "Make Family",
	T2."MAKE" AS "Make",
	T2."VEHICLE_TYPE" AS "Vehicle Type",
	T2."MODEL_LINE" AS "Model Line",
	T2."FACTORY_MODEL" AS "Factory Model",
	T2."WORKSHOP_MODEL" AS "Workshop Model",
	T2."PRODUCT_GROUP" AS "Product Group",
	T2."REPAIR_GROUP" AS "Repair Group",
	T2."KIT_GROUP" AS "Kit Group",
	T2."TIME_CODE" AS "Time Code",
	T2."INT_VOUCHER_NO" AS "Int Voucher No",
	T2."BALANCING_MARK" AS "Balancing Mark",
	T2."USED_VEH_DEST_CODE" AS "Used Veh Dest Code",
	T2."USE_OF_VEHICLE" AS "Use Of Vehicle",
	T2."ACCT_NO_NEXT_CHART" AS "Acct No Next Chart",
	T3."REFERENCE_IDENT" AS "Reference Ident",
	T3."TRANSACT_DATE" AS "Transact Date",
	T3."HANDLER" AS "Handler",
	T3."PROGRAM" AS "Program",
	T3."FUNCTION_CODE" AS "Function Code",
	T3."MODUL" AS "Modul",
	T3."DOCUMENT_KEY" AS "Document Key",
	T3."COMMENT" AS "Comment",
	T4."DEPARTMENT_TYPE_ID" AS "Department Type Id",
	T4."DESCRIPTION" AS "Description_2",
	T4."DEPARTMENT_GROUP" AS "Department Group",
	T5."AA_TRTYPE_ID" AS "Aa Trtype Id",
	T5."DESCRIPTION" AS "Description",
	T5."OWN_DESCRIPTION" AS "Own Description",
	'1' AS "Rechtseinheit",
	'01' AS "Betrieb",
	CASE 
		WHEN (
				(
					(NOT T2."MAKE" IN ('OP', 'PE'))
					OR (T2."MAKE" IS NULL)
					)
				OR (T2."MAKE" = ' ')
				)
			THEN (
					(
						CASE 
							WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
								THEN ('OP')
							WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
								THEN ('PE')
							ELSE ('00')
							END
						)
					)
		ELSE (T2."MAKE")
		END AS "Marke",
	T2."DEBIT_AMOUNT" + T2."CREDIT_AMOUNT" AS "Betrag_Euro",
	'1' AS "Mandant",
	(T2."DEBIT_QUANTITY" + T2."CREDIT_QUANTITY") AS "Betrag",
	CASE 
		WHEN ((- 1 * datediff(day, (getdate()), T2."BOOKKEEP_DATE")) <= 120)
			THEN ((left((((T2."DOCUMENT_NO"))), 7)) + ' - ' + T3."COMMENT")
		ELSE NULL
		END AS "Text",
	(left(((rtrim(T2."ACCT_NO")) + '_STK'), 1)) AS "Susa_2",
	T6."ORDER_NUMBER" AS "Order Number",
	T6."LINE_NUMBER" AS "Line Number",
	T6."INV_TIME" AS "Inv Time",
	T6."INV_TIME_INT" AS "Inv Time Int",
	T6."MAKE_TIME_UNIT" AS "Make Time Unit",
	T2."SITE" AS "Site",
	CASE 
		WHEN (T2."DEPARTMENT" = '    ')
			THEN ('00')
		ELSE (T2."DEPARTMENT")
		END AS "KST",
	T7."MODEL_LINE" AS "Model Line_vpp5q",
	T7."MOD_LIN_SPECIFY" AS "Mod Lin Specify_vpp5q",
	CASE 
		WHEN (T7."MODEL_LINE" IS NOT NULL)
			THEN (T7."MODEL_LINE" + ' - ' + T7."MOD_LIN_SPECIFY")
		ELSE ('00 - ohne')
		END AS "Kostentr�ger_mit_Bez_",
	T8."CUSTOMER_NUMBER" AS "Customer Number",
	(
		substring((
				CASE 
					WHEN (T7."MODEL_LINE" IS NOT NULL)
						THEN (T7."MODEL_LINE" + ' - ' + T7."MOD_LIN_SPECIFY")
					ELSE ('00 - ohne')
					END
				), 1, 2)
		) AS "Kostentr�ger",
	T9."CUSTOMER_GROUP" AS "Customer Group",
	CASE 
		WHEN (
				(T2."DESTINATION" = '00')
				AND (T2."PRICE_CODE" <> '')
				)
			THEN (T2."PRICE_CODE")
		WHEN (
				(
					(T2."DESTINATION" = '00')
					AND (T2."PRICE_CODE" = '')
					)
				AND (T9."CUSTOMER_GROUP" <> '')
				)
			THEN (T9."CUSTOMER_GROUP")
		WHEN ((rtrim(T2."DESTINATION")) = '')
			THEN ('00')
		ELSE (T2."DESTINATION")
		END AS "Absatzkanal",
	'3' AS "GuV_Bilanz",
	'STK' AS "Susa",
	CASE 
		WHEN (
				(
					(
						substring((
								CASE 
									WHEN (T2."DEPARTMENT" = '    ')
										THEN ('00')
									ELSE (T2."DEPARTMENT")
									END
								), 1, 1)
						) = '1'
					)
				AND (
					NOT (
						(
							substring((
									CASE 
										WHEN (T7."MODEL_LINE" IS NOT NULL)
											THEN (T7."MODEL_LINE" + ' - ' + T7."MOD_LIN_SPECIFY")
										ELSE ('00 - ohne')
										END
									), 1, 2)
							)
						) IN ('00')
					)
				)
			THEN ('Neuwagen')
		WHEN (
				(
					(
						substring((
								CASE 
									WHEN (T2."DEPARTMENT" = '    ')
										THEN ('00')
									ELSE (T2."DEPARTMENT")
									END
								), 1, 1)
						) = '2'
					)
				AND (
					NOT (
						(
							substring((
									CASE 
										WHEN (T7."MODEL_LINE" IS NOT NULL)
											THEN (T7."MODEL_LINE" + ' - ' + T7."MOD_LIN_SPECIFY")
										ELSE ('00 - ohne')
										END
									), 1, 2)
							)
						) IN ('00')
					)
				)
			THEN ('Gebrauchtwagen')
		ELSE ('Ohne Kostentr�ger')
		END AS "Ebene31",
	CASE 
		WHEN (
				(
					(NOT T2."MAKE" IN ('OP', 'PE'))
					OR (T2."MAKE" IS NULL)
					)
				OR (T2."MAKE" = ' ')
				)
			THEN (
					(
						CASE 
							WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
								THEN ('OP')
							WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
								THEN ('PE')
							ELSE ('00')
							END
						)
					)
		ELSE (T2."MAKE")
		END + '-' + (
		CASE 
			WHEN (
					(((rtrim(T1."ACCT_NR"))) LIKE '2%')
					AND (T2."SITE" IS NULL)
					)
				THEN ('01')
			ELSE ((right('00' + (left(T2."SITE", 2)), 2)))
			END
		) + '-' + ((rtrim(T1."ACCT_NR"))) + '-' + (
		CASE 
			WHEN (
					(T2."DEPARTMENT" IS NULL)
					OR ((rtrim(T2."DEPARTMENT")) = '')
					)
				THEN ('00')
			ELSE ((rtrim(T2."DEPARTMENT")))
			END
		) + '-' + (
		CASE 
			WHEN (
					(T2."DESTINATION" IS NULL)
					OR ((rtrim(T2."DESTINATION")) = '')
					)
				THEN ('00')
			ELSE ((right('00' + (rtrim(T2."DESTINATION")), 2)))
			END
		) + '-' + (
		(
			rtrim(CASE 
					WHEN (
							(T7."MODEL_LINE" IS NOT NULL)
							AND (T7."MODEL_LINE" <> '')
							)
						THEN (T7."MODEL_LINE")
					WHEN (
							(T2."PRODUCT_GROUP" IS NOT NULL)
							AND (T2."PRODUCT_GROUP" <> '')
							)
						THEN (T2."PRODUCT_GROUP")
					WHEN (
							(T2."REPAIR_GROUP" IS NOT NULL)
							AND (T2."REPAIR_GROUP" <> '')
							)
						THEN (T2."REPAIR_GROUP")
					ELSE ('00')
					END)
			)
		) + '_STK' AS "Acct Nr",
	CASE 
		WHEN (
				(
					CASE 
						WHEN (
								(
									(NOT T2."MAKE" IN ('OP', 'PE'))
									OR (T2."MAKE" IS NULL)
									)
								OR (T2."MAKE" = ' ')
								)
							THEN (
									(
										CASE 
											WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
												THEN ('OP')
											WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
												THEN ('PE')
											ELSE ('00')
											END
										)
									)
						ELSE (T2."MAKE")
						END
					) IN ('OP')
				)
			THEN ('OP')
		ELSE NULL
		END AS "Marke f�r Kostentr�ger",
	CASE 
		WHEN (
				(
					CASE 
						WHEN (
								(
									(NOT T2."MAKE" IN ('OP', 'PE'))
									OR (T2."MAKE" IS NULL)
									)
								OR (T2."MAKE" = ' ')
								)
							THEN (
									(
										CASE 
											WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
												THEN ('OP')
											WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
												THEN ('PE')
											ELSE ('00')
											END
										)
									)
						ELSE (T2."MAKE")
						END
					) IN ('OP')
				)
			THEN (
					(
						CASE 
							WHEN (
									(
										CASE 
											WHEN (
													(
														(NOT T2."MAKE" IN ('OP', 'PE'))
														OR (T2."MAKE" IS NULL)
														)
													OR (T2."MAKE" = ' ')
													)
												THEN (
														(
															CASE 
																WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
																	THEN ('OP')
																WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
																	THEN ('PE')
																ELSE ('00')
																END
															)
														)
											ELSE (T2."MAKE")
											END
										) IN ('OP')
									)
								THEN ('OP')
							ELSE NULL
							END
						) + (
						CASE 
							WHEN (T7."MODEL_LINE" IS NOT NULL)
								THEN (T7."MODEL_LINE" + ' - ' + T7."MOD_LIN_SPECIFY")
							ELSE ('00 - ohne')
							END
						)
					)
		WHEN (
				(
					CASE 
						WHEN (
								(
									(NOT T2."MAKE" IN ('OP', 'PE'))
									OR (T2."MAKE" IS NULL)
									)
								OR (T2."MAKE" = ' ')
								)
							THEN (
									(
										CASE 
											WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
												THEN ('OP')
											WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
												THEN ('PE')
											ELSE ('00')
											END
										)
									)
						ELSE (T2."MAKE")
						END
					) IN ('VW')
				)
			THEN (
					(
						CASE 
							WHEN (
									(
										CASE 
											WHEN (
													(
														(NOT T2."MAKE" IN ('OP', 'PE'))
														OR (T2."MAKE" IS NULL)
														)
													OR (T2."MAKE" = ' ')
													)
												THEN (
														(
															CASE 
																WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
																	THEN ('OP')
																WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
																	THEN ('PE')
																ELSE ('00')
																END
															)
														)
											ELSE (T2."MAKE")
											END
										) IN ('OP')
									)
								THEN ('OP')
							ELSE NULL
							END
						) + (
						CASE 
							WHEN (T7."MODEL_LINE" IS NOT NULL)
								THEN (T7."MODEL_LINE" + ' - ' + T7."MOD_LIN_SPECIFY")
							ELSE ('00 - ohne')
							END
						)
					)
		ELSE (
				(
					CASE 
						WHEN (T7."MODEL_LINE" IS NOT NULL)
							THEN (T7."MODEL_LINE" + ' - ' + T7."MOD_LIN_SPECIFY")
						ELSE ('00 - ohne')
						END
					)
				)
		END AS "Kostentr�ger_mit_Bez",
	(
		substring((
				CASE 
					WHEN (
							(
								(NOT T2."MAKE" IN ('OP', 'PE'))
								OR (T2."MAKE" IS NULL)
								)
							OR (T2."MAKE" = ' ')
							)
						THEN (
								(
									CASE 
										WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
											THEN ('OP')
										WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
											THEN ('PE')
										ELSE ('00')
										END
									)
								)
					ELSE (T2."MAKE")
					END + '-' + (
					CASE 
						WHEN (
								(((rtrim(T1."ACCT_NR"))) LIKE '2%')
								AND (T2."SITE" IS NULL)
								)
							THEN ('01')
						ELSE ((right('00' + (left(T2."SITE", 2)), 2)))
						END
					) + '-' + ((rtrim(T1."ACCT_NR"))) + '-' + (
					CASE 
						WHEN (
								(T2."DEPARTMENT" IS NULL)
								OR ((rtrim(T2."DEPARTMENT")) = '')
								)
							THEN ('00')
						ELSE ((rtrim(T2."DEPARTMENT")))
						END
					) + '-' + (
					CASE 
						WHEN (
								(T2."DESTINATION" IS NULL)
								OR ((rtrim(T2."DESTINATION")) = '')
								)
							THEN ('00')
						ELSE ((right('00' + (rtrim(T2."DESTINATION")), 2)))
						END
					) + '-' + (
					(
						rtrim(CASE 
								WHEN (
										(T7."MODEL_LINE" IS NOT NULL)
										AND (T7."MODEL_LINE" <> '')
										)
									THEN (T7."MODEL_LINE")
								WHEN (
										(T2."PRODUCT_GROUP" IS NOT NULL)
										AND (T2."PRODUCT_GROUP" <> '')
										)
									THEN (T2."PRODUCT_GROUP")
								WHEN (
										(T2."REPAIR_GROUP" IS NOT NULL)
										AND (T2."REPAIR_GROUP" <> '')
										)
									THEN (T2."REPAIR_GROUP")
								ELSE ('00')
								END)
						)
					) + '_STK'
				), 1, 8)
		) + '-' + (
		CASE 
			WHEN (
					(
						(NOT T2."MAKE" IN ('OP', 'PE'))
						OR (T2."MAKE" IS NULL)
						)
					OR (T2."MAKE" = ' ')
					)
				THEN (
						(
							CASE 
								WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
									THEN ('OP')
								WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
									THEN ('PE')
								ELSE ('00')
								END
							)
						)
			ELSE (T2."MAKE")
			END
		) + (left(T2."SITE", 2)) + (
		substring((
				CASE 
					WHEN (T2."DEPARTMENT" = '    ')
						THEN ('00')
					ELSE (T2."DEPARTMENT")
					END
				), 1, 2)
		) + (
		CASE 
			WHEN (
					(T2."DESTINATION" = '00')
					AND (T2."PRICE_CODE" <> '')
					)
				THEN (T2."PRICE_CODE")
			WHEN (
					(
						(T2."DESTINATION" = '00')
						AND (T2."PRICE_CODE" = '')
						)
					AND (T9."CUSTOMER_GROUP" <> '')
					)
				THEN (T9."CUSTOMER_GROUP")
			WHEN ((rtrim(T2."DESTINATION")) = '')
				THEN ('00')
			ELSE (T2."DESTINATION")
			END
		) + (
		(
			substring((
					CASE 
						WHEN (T7."MODEL_LINE" IS NOT NULL)
							THEN (T7."MODEL_LINE" + ' - ' + T7."MOD_LIN_SPECIFY")
						ELSE ('00 - ohne')
						END
					), 1, 2)
			)
		) AS "ACCT_Detail",
	CASE 
		WHEN (
				(
					CASE 
						WHEN (
								(
									(NOT T2."MAKE" IN ('OP', 'PE'))
									OR (T2."MAKE" IS NULL)
									)
								OR (T2."MAKE" = ' ')
								)
							THEN (
									(
										CASE 
											WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
												THEN ('OP')
											WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
												THEN ('PE')
											ELSE ('00')
											END
										)
									)
						ELSE (T2."MAKE")
						END
					) = '00'
				)
			THEN ('ohne Marke')
		ELSE ('mit Marke')
		END AS "Buchungen ohne Marke",
	CASE 
		WHEN (
				(
					CASE 
						WHEN (T2."DEPARTMENT" = '    ')
							THEN ('00')
						ELSE (T2."DEPARTMENT")
						END
					) = '00'
				)
			THEN ('ohne KST')
		ELSE ('mit KST')
		END AS "Buchungen ohne KST",
	CASE 
		WHEN (
				(
					CASE 
						WHEN (
								(T2."DESTINATION" = '00')
								AND (T2."PRICE_CODE" <> '')
								)
							THEN (T2."PRICE_CODE")
						WHEN (
								(
									(T2."DESTINATION" = '00')
									AND (T2."PRICE_CODE" = '')
									)
								AND (T9."CUSTOMER_GROUP" <> '')
								)
							THEN (T9."CUSTOMER_GROUP")
						WHEN ((rtrim(T2."DESTINATION")) = '')
							THEN ('00')
						ELSE (T2."DESTINATION")
						END
					) = '00'
				)
			THEN (('ohne Absatzkanal'))
		ELSE ('mit Absatzkanal')
		END AS "Buchungen ohne Absatzkanal",
	T2."DESTINATION" AS "Destination",
	CASE 
		WHEN (
				(
					CASE 
						WHEN (
								(
									(NOT T2."MAKE" IN ('OP', 'PE'))
									OR (T2."MAKE" IS NULL)
									)
								OR (T2."MAKE" = ' ')
								)
							THEN (
									(
										CASE 
											WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
												THEN ('OP')
											WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
												THEN ('PE')
											ELSE ('00')
											END
										)
									)
						ELSE (T2."MAKE")
						END
					) = 'OP'
				)
			THEN ('OP - Opel')
		WHEN (
				(
					CASE 
						WHEN (
								(
									(NOT T2."MAKE" IN ('OP', 'PE'))
									OR (T2."MAKE" IS NULL)
									)
								OR (T2."MAKE" = ' ')
								)
							THEN (
									(
										CASE 
											WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
												THEN ('OP')
											WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
												THEN ('PE')
											ELSE ('00')
											END
										)
									)
						ELSE (T2."MAKE")
						END
					) = 'PE'
				)
			THEN ('PE - Peugeot')
		WHEN (
				(
					CASE 
						WHEN (
								(
									(NOT T2."MAKE" IN ('OP', 'PE'))
									OR (T2."MAKE" IS NULL)
									)
								OR (T2."MAKE" = ' ')
								)
							THEN (
									(
										CASE 
											WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
												THEN ('OP')
											WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
												THEN ('PE')
											ELSE ('00')
											END
										)
									)
						ELSE (T2."MAKE")
						END
					) = 'AU'
				)
			THEN ('00 - ohne Marke')
		ELSE ('Marke fehlt')
		END AS "Marke_mit_Bez",
	T10."Hauptbetrieb_ID" AS "Hauptbetrieb Id",
	T10."Hauptbetrieb_Name" AS "Hauptbetrieb Name",
	T10."Standort_ID" AS "Standort Id",
	T10."Standort_Name" AS "Standort Name",
	CASE 
		WHEN (T2."STRATEGIC_AREA" IN ('AUTO      ', 'Opel      ', 'OPEL      '))
			THEN ('OP')
		WHEN (T2."STRATEGIC_AREA" IN ('PEUGEOT   '))
			THEN ('PE')
		ELSE ('00')
		END AS "Marke_Strategic_Area",
	T2."PRICE_CODE" AS "Price Code"
FROM "OPTIMA"."import"."ACCOUNT_INFO" T1,
	(
		(
			(
				(
					"OPTIMA"."import"."ACCT_DOC_KEY" T2 LEFT JOIN "OPTIMA"."import"."DEPARTMENT_TYPE" T4 ON T2."DEPARTMENT" = T4."DEPARTMENT_TYPE_ID"
					) LEFT JOIN "OPTIMA"."import"."AA_TRTYPE" T5 ON T2."AA_TRTYPE" = T5."AA_TRTYPE_ID"
				) LEFT JOIN "OPTIMA"."import"."vPP5Q" T7 ON (T2."MODEL_LINE" = T7."MODEL_LINE")
				AND (T2."MAKE" = T7."MAKE_CD")
			) LEFT JOIN "OPTIMA"."data"."GC_Department" T10 ON (T2."CLIENT_DB" = T10."Hauptbetrieb")
			AND (T2."SITE" = T10."Site")
		),
	(
		(
			(
				"OPTIMA"."import"."ACCT_DOC_DATA" T3 LEFT JOIN "OPTIMA"."import"."ACCT_DOC_SALESCLAS" T8 ON T3."REFERENCE_IDENT" = T8."REFERENCE_IDENT"
				) LEFT JOIN "OPTIMA"."import"."ORDER_LINE" T6 ON (T6."ORDER_NUMBER" = T8."ORDER_NUMBER")
				AND (T6."LINE_NUMBER" = T8."ORDER_LINE_NUMBER")
			) LEFT JOIN "OPTIMA"."import"."CUSTOMER" T9 ON T9."CUSTOMER_NUMBER" = T8."CUSTOMER_NUMBER"
		)
WHERE (T1."ACCT_NR" = T2."ACCT_NO")
	AND (T2."UNIQUE_IDENT" = T3."REFERENCE_IDENT")
	AND (
		(
			(
				(T1."TYPE_ACCTT" = '2')
				AND (T2."BOOKKEEP_DATE" >= convert(DATETIME, '2019-09-01 00:00:00.000'))
				)
			AND (T1."ACCT_NR" IN ('8000', '8005', '8006', '8010', '8015', '8016', '8040', '8041', '8100', '8105', '8110', '8115', '8116', '8400', '8410', '8411', '5701', '8420', '8924', '8928'))
			)
		AND (((T2."DEBIT_QUANTITY" + T2."CREDIT_QUANTITY")) <> 0)
		)
