SELECT "No" AS "No",
	"Name" AS "Name",
	"Account Type" AS "Account Type",
	"Department Code_2" AS "Department Code_2",
	"Make Code_2" AS "Make Code_2",
	"Income Balance" AS "Income Balance",
	"Entry No" AS "Entry No",
	"G L Account No" AS "G L Account No",
	"Posting Date" AS "Posting Date",
	"Document Type" AS "Document Type",
	"Document No" AS "Document No",
	"Description" AS "Description",
	"Amount" AS "Amount",
	"Bal Account No" AS "Bal Account No",
	"Department Code" AS "Department Code",
	"Make Code" AS "Make Code",
	"User Id" AS "User Id",
	"Source Code" AS "Source Code",
	"Quantity" AS "Quantity",
	"Debit Amount" AS "Debit Amount",
	"Credit Amount" AS "Credit Amount",
	"Document Date" AS "Document Date",
	"Source Type" AS "Source Type",
	"Source No" AS "Source No",
	"No Series" AS "No Series",
	"Branch Code" AS "Branch Code",
	"Main Area" AS "Main Area",
	"Vin" AS "Vin",
	"Book No" AS "Book No",
	"Veh Source Code" AS "Veh Source Code",
	"Betrag" AS "Betrag",
	"Vin_Vehicle" AS "Vin_Vehicle",
	"Vehicle Status" AS "Vehicle Status",
	"Model_ori" AS "Model_ori",
	"Type" AS "Type",
	"Class" AS "Class",
	"Model No" AS "Model No",
	"Hauptbetrieb" AS "Hauptbetrieb",
	"Standort_FIBU" AS "Standort_FIBU",
	"Make Code_Vehicle" AS "Make Code_Vehicle",
	"Fabrikat_ori" AS "Fabrikat_ori",
	"Model_alt" AS "Model_alt",
	"Market Segment Code" AS "Market Segment Code",
	"Modellbez" AS "Modellbez",
	"Fahrzeugart" AS "Fahrzeugart",
	"Vat Prod Posting Group" AS "Vat Prod Posting Group",
	"Fahrzeugtyp_ori" AS "Fahrzeugtyp_ori",
	"FZG" AS "FZG",
	"Location Code" AS "Location Code",
	"VB_Einkauf" AS "VB_Einkauf",
	"Purchase Receipt Date" AS "Purchase Receipt Date",
	"Standtage_ori" AS "Standtage_ori",
	"Standtagestaffel_ori" AS "Standtagestaffel_ori",
	"Initial Registration_2" AS "Initial Registration_2",
	"EZ/Eingang" AS "EZ/Eingang",
	"Option Type_Polster" AS "Option Type_Polster",
	"Polster" AS "Polster",
	"Option Type_Farbe" AS "Option Type_Farbe",
	"Farbe" AS "Farbe",
	"Einsatz" AS "Einsatz",
	"Heute" AS "Heute",
	"Fahrzeugstatus" AS "Fahrzeugstatus",
	"FZG-Liste" AS "FZG-Liste",
	"Anzahl" AS "Anzahl",
	"Standtage" AS "Standtage",
	"Summe Standtage" AS "Summe Standtage",
	"Menge_FZG" AS "Menge_FZG",
	"Inventory Posting Group" AS "Inventory Posting Group",
	"Summe Betrag" AS "Summe Betrag",
	"Fzg_Typ_Herkunft" AS "Fzg_Typ_Herkunft",
	"Current Price Sticker" AS "Current Price Sticker",
	"Manual Price Calculation" AS "Manual Price Calculation",
	"Total Quote Amount" AS "Total Quote Amount",
	"Price Sticker Date" AS "Price Sticker Date",
	"gepl. VK" AS "gepl. VK",
	"Datum letzte �nderung" AS "Datum letzte �nderung",
	"FZG-Kosten" AS "FZG-Kosten",
	"EK FZG" AS "EK FZG",
	"Text 3" AS "Text 3",
	"Bestand/reserviert" AS "Bestand/reserviert",
	"Ort_B_R_Dat_�nd" AS "Ort_B_R_Dat_�nd",
	"Date Of Sale" AS "Date Of Sale",
	"Summe EK" AS "Summe EK",
	"Standort" AS "Standort",
	"Dealer Status_ori" AS "Dealer Status_ori",
	"Transmission Type Code" AS "Transmission Type Code",
	"Key No" AS "Key No",
	"Mileage" AS "Mileage",
	"License No" AS "License No",
	"H�ndlerstatus_Text" AS "H�ndlerstatus_Text",
	"H�ndlerstatus" AS "H�ndlerstatus",
	"H�ndlerstatus Gruppe" AS "H�ndlerstatus Gruppe",
	"Dealer Status" AS "Dealer Status",
	"Extra Code 1" AS "Extra Code 1",
	"Text 1_Vorbesitzer" AS "Text 1_Vorbesitzer",
	"Initial Registration" AS "Initial Registration",
	"Deregistration Date" AS "Deregistration Date",
	"VFW zugel./abgem" AS "VFW zugel./abgem",
	"EK erh. Pos." AS "EK erh. Pos.",
	"Name_Vorbesitzer" AS "Name_Vorbesitzer",
	"EZ_Zeichen" AS "EZ_Zeichen",
	"Abmeldung_Zeichen" AS "Abmeldung_Zeichen",
	"Dat_letzte_�nderung_Zeichen" AS "Dat_letzte_�nderung_Zeichen",
	"Bemerkung" AS "Bemerkung",
	"UPE" AS "UPE",
	"Fahrzeugtyp_alt" AS "Fahrzeugtyp_alt",
	"Model_alt_1" AS "Model_alt_1",
	"kundenbelegt ja/nein" AS "kundenbelegt ja/nein",
	"Standtagestaffel" AS "Standtagestaffel",
	"No_Item" AS "No_Item",
	"Description_Item" AS "Description_Item",
	"Vehicle Type Code_Item" AS "Vehicle Type Code_Item",
	"Vehicle Category Code_Item" AS "Vehicle Category Code_Item",
	"Modell_zwischen" AS "Modell_zwischen",
	"Fabrikat" AS "Fabrikat",
	"Modell_final" AS "Modell_final",
	"Model" AS "Model",
	"Fahrzeugtyp" AS "Fahrzeugtyp",
	"Tage letzte Preis�nderung_ori" AS "Tage letzte Preis�nderung_ori",
	"Tage letzte Preis�nderung" AS "Tage letzte Preis�nderung",
	"Description_Dealer_Status" AS "Description_Dealer_Status",
	"Code_Dealer_Status" AS "Code_Dealer_Status",
	"Tage seit Erstzul." AS "Tage seit Erstzul."
FROM (
	SELECT "No" AS "No",
		"Name" AS "Name",
		"Account Type" AS "Account Type",
		"Department Code_2" AS "Department Code_2",
		"Make Code_2" AS "Make Code_2",
		"Income Balance" AS "Income Balance",
		"Entry No" AS "Entry No",
		"G L Account No" AS "G L Account No",
		"Posting Date" AS "Posting Date",
		"Document Type" AS "Document Type",
		"Document No" AS "Document No",
		"Description" AS "Description",
		"Amount" AS "Amount",
		"Bal Account No" AS "Bal Account No",
		"Department Code" AS "Department Code",
		"Make Code" AS "Make Code",
		"User Id" AS "User Id",
		"Source Code" AS "Source Code",
		"Quantity" AS "Quantity",
		"Debit Amount" AS "Debit Amount",
		"Credit Amount" AS "Credit Amount",
		"Document Date" AS "Document Date",
		"Source Type" AS "Source Type",
		"Source No" AS "Source No",
		"No Series" AS "No Series",
		"Branch Code" AS "Branch Code",
		"Main Area" AS "Main Area",
		"Vin" AS "Vin",
		"Book No" AS "Book No",
		"Veh Source Code" AS "Veh Source Code",
		"Betrag" AS "Betrag",
		"Vin_Vehicle" AS "Vin_Vehicle",
		"Vehicle Status" AS "Vehicle Status",
		"Model_ori" AS "Model_ori",
		"Type" AS "Type",
		"Class" AS "Class",
		"Model No" AS "Model No",
		"Hauptbetrieb" AS "Hauptbetrieb",
		"Standort_FIBU" AS "Standort_FIBU",
		"Make Code_Vehicle" AS "Make Code_Vehicle",
		"Fabrikat_ori" AS "Fabrikat_ori",
		"Model_alt" AS "Model_alt",
		"Market Segment Code" AS "Market Segment Code",
		"Modellbez" AS "Modellbez",
		"Fahrzeugart" AS "Fahrzeugart",
		"Vat Prod Posting Group" AS "Vat Prod Posting Group",
		"Fahrzeugtyp_ori" AS "Fahrzeugtyp_ori",
		"FZG" AS "FZG",
		"Location Code" AS "Location Code",
		"VB_Einkauf" AS "VB_Einkauf",
		"Purchase Receipt Date" AS "Purchase Receipt Date",
		"Standtage_ori" AS "Standtage_ori",
		"Standtagestaffel_ori" AS "Standtagestaffel_ori",
		"Initial Registration_2" AS "Initial Registration_2",
		"EZ/Eingang" AS "EZ/Eingang",
		"Option Type_Polster" AS "Option Type_Polster",
		"Polster" AS "Polster",
		"Option Type_Farbe" AS "Option Type_Farbe",
		"Farbe" AS "Farbe",
		"Einsatz" AS "Einsatz",
		"Heute" AS "Heute",
		"Fahrzeugstatus" AS "Fahrzeugstatus",
		"FZG-Liste" AS "FZG-Liste",
		"Anzahl" AS "Anzahl",
		"Standtage" AS "Standtage",
		SUM("Standtage") OVER (PARTITION BY "Vin") AS "Summe Standtage",
		"Menge_FZG" AS "Menge_FZG",
		"Inventory Posting Group" AS "Inventory Posting Group",
		"Summe Betrag" AS "Summe Betrag",
		"Fzg_Typ_Herkunft" AS "Fzg_Typ_Herkunft",
		"Current Price Sticker" AS "Current Price Sticker",
		"Manual Price Calculation" AS "Manual Price Calculation",
		"Total Quote Amount" AS "Total Quote Amount",
		"Price Sticker Date" AS "Price Sticker Date",
		"gepl. VK" AS "gepl. VK",
		"Datum letzte �nderung" AS "Datum letzte �nderung",
		"FZG-Kosten" AS "FZG-Kosten",
		"EK FZG" AS "EK FZG",
		"Text 3" AS "Text 3",
		"Bestand/reserviert" AS "Bestand/reserviert",
		"Ort_B_R_Dat_�nd" AS "Ort_B_R_Dat_�nd",
		"Date Of Sale" AS "Date Of Sale",
		"Summe EK" AS "Summe EK",
		"Standort" AS "Standort",
		"Dealer Status_ori" AS "Dealer Status_ori",
		"Transmission Type Code" AS "Transmission Type Code",
		"Key No" AS "Key No",
		"Mileage" AS "Mileage",
		"License No" AS "License No",
		"H�ndlerstatus_Text" AS "H�ndlerstatus_Text",
		"H�ndlerstatus" AS "H�ndlerstatus",
		"H�ndlerstatus Gruppe" AS "H�ndlerstatus Gruppe",
		"Dealer Status" AS "Dealer Status",
		"Extra Code 1" AS "Extra Code 1",
		"Text 1_Vorbesitzer" AS "Text 1_Vorbesitzer",
		"Initial Registration" AS "Initial Registration",
		"Deregistration Date" AS "Deregistration Date",
		"VFW zugel./abgem" AS "VFW zugel./abgem",
		"EK erh. Pos." AS "EK erh. Pos.",
		"Name_Vorbesitzer" AS "Name_Vorbesitzer",
		"EZ_Zeichen" AS "EZ_Zeichen",
		"Abmeldung_Zeichen" AS "Abmeldung_Zeichen",
		"Dat_letzte_�nderung_Zeichen" AS "Dat_letzte_�nderung_Zeichen",
		"Bemerkung" AS "Bemerkung",
		"UPE" AS "UPE",
		"Fahrzeugtyp_alt" AS "Fahrzeugtyp_alt",
		"Model_alt_1" AS "Model_alt_1",
		"kundenbelegt ja/nein" AS "kundenbelegt ja/nein",
		"Standtagestaffel" AS "Standtagestaffel",
		"No_Item" AS "No_Item",
		"Description_Item" AS "Description_Item",
		"Vehicle Type Code_Item" AS "Vehicle Type Code_Item",
		"Vehicle Category Code_Item" AS "Vehicle Category Code_Item",
		"Modell_zwischen" AS "Modell_zwischen",
		"Fabrikat" AS "Fabrikat",
		"Modell_final" AS "Modell_final",
		"Model" AS "Model",
		"Fahrzeugtyp" AS "Fahrzeugtyp",
		"Tage letzte Preis�nderung_ori" AS "Tage letzte Preis�nderung_ori",
		"Tage letzte Preis�nderung" AS "Tage letzte Preis�nderung",
		"Description_Dealer_Status" AS "Description_Dealer_Status",
		"Code_Dealer_Status" AS "Code_Dealer_Status",
		"Tage seit Erstzul." AS "Tage seit Erstzul."
	FROM (
		SELECT "No",
			"Name",
			"Account Type",
			"Department Code_2",
			"Make Code_2",
			"Income Balance",
			"Entry No",
			"G L Account No",
			"Posting Date",
			"Document Type",
			"Document No",
			"Description",
			"Amount",
			"Bal Account No",
			"Department Code",
			"Make Code",
			"User Id",
			"Source Code",
			"Quantity",
			"Debit Amount",
			"Credit Amount",
			"Document Date",
			"Source Type",
			"Source No",
			"No Series",
			"Branch Code",
			"Main Area",
			"Vin",
			"Book No",
			"Veh Source Code",
			"Betrag",
			"Vin_Vehicle",
			"Vehicle Status",
			"Model_ori",
			"Type",
			"Class",
			"Model No",
			'1' AS "Hauptbetrieb",
			"Standort_FIBU",
			"Make Code_Vehicle",
			"Make Code_Vehicle" AS "Fabrikat_ori",
			"Model_alt",
			"Model_alt" AS "Market Segment Code",
			"Model_ori" AS "Modellbez",
			"Fahrzeugart",
			"Vat Prod Posting Group",
			"Fahrzeugtyp_ori",
			"FZG",
			"Location Code",
			'' AS "VB_Einkauf",
			"Purchase Receipt Date",
			"Standtage_ori",
			"Standtagestaffel_ori",
			"Initial Registration_2",
			"EZ/Eingang",
			"Option Type_Polster",
			"Polster",
			"Option Type_Farbe",
			"Farbe",
			"Betrag" AS "Einsatz",
			(getdate()) AS "Heute",
			'Bestand' AS "Fahrzeugstatus",
			"FZG-Liste",
			COUNT("Standtage_ori") OVER (PARTITION BY "Vin") AS "Anzahl",
			("Standtage_ori") / (COUNT("Standtage_ori") OVER (PARTITION BY "Vin")) AS "Standtage",
			1 / (COUNT("Standtage_ori") OVER (PARTITION BY "Vin")) AS "Menge_FZG",
			"Inventory Posting Group",
			SUM("Betrag") OVER (PARTITION BY "Vin") AS "Summe Betrag",
			"Fzg_Typ_Herkunft",
			"Current Price Sticker",
			"Manual Price Calculation",
			"Total Quote Amount",
			"Price Sticker Date",
			(c174) / (COUNT("Standtage_ori") OVER (PARTITION BY "Vin")) AS "gepl. VK",
			"Price Sticker Date" AS "Datum letzte �nderung",
			"FZG-Kosten",
			"EK FZG",
			"Text 3",
			"Bestand/reserviert",
			"Ort_B_R_Dat_�nd",
			"Date Of Sale",
			SUM("EK FZG") OVER (PARTITION BY "Vin") AS "Summe EK",
			"Standort",
			"Dealer Status_ori",
			"Transmission Type Code",
			"Key No",
			"Mileage",
			"License No",
			"H�ndlerstatus_Text",
			"H�ndlerstatus",
			"H�ndlerstatus Gruppe",
			"Dealer Status",
			"Extra Code 1",
			"Text 1_Vorbesitzer",
			"Initial Registration_2" AS "Initial Registration",
			"Deregistration Date",
			"VFW zugel./abgem",
			"EK erh. Pos.",
			"Name_Vorbesitzer",
			"EZ_Zeichen",
			"Abmeldung_Zeichen",
			"Dat_letzte_�nderung_Zeichen",
			"Text 3" AS "Bemerkung",
			(c146) / (COUNT("Standtage_ori") OVER (PARTITION BY "Vin")) AS "UPE",
			"Fahrzeugtyp_alt",
			"Model_alt_1",
			"kundenbelegt ja/nein",
			"Standtagestaffel",
			"No_Item",
			"Description_Item",
			"Vehicle Type Code_Item",
			"Vehicle Category Code_Item",
			"Modell_zwischen",
			"Fabrikat",
			"Modell_final",
			"Modell_final" AS "Model",
			"Fahrzeugtyp",
			"Tage letzte Preis�nderung_ori",
			("Tage letzte Preis�nderung_ori") / (COUNT("Standtage_ori") OVER (PARTITION BY "Vin")) AS "Tage letzte Preis�nderung",
			"Description_Dealer_Status",
			"Code_Dealer_Status",
			"Tage seit Erstzul."
		FROM (
			SELECT T2."VIN" AS "Vin",
				CASE 
					WHEN (T3."Initial Registration" <> convert(DATETIME, '1753-01-01 00:00:00.000'))
						THEN ((- 1 * datediff(day, (getdate()), T3."Initial Registration")))
					ELSE (0)
					END AS "Tage seit Erstzul.",
				T7."Code" AS "Code_Dealer_Status",
				T7."Description" AS "Description_Dealer_Status",
				(- 1 * datediff(day, (getdate()), T6."Price Sticker Date")) AS "Tage letzte Preis�nderung_ori",
				CASE 
					WHEN (
							(
								CASE 
									WHEN (T3."Vehicle Status" = 1)
										THEN ('GA')
									WHEN (T3."Vehicle Status" IN (0, 2))
										THEN ('NA')
									ELSE NULL
									END
								) = 'GA'
							)
						THEN (T3."Inventory Posting Group")
					ELSE (
							(
								CASE 
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (T3."Inventory Posting Group" IN ('GW_DW_PKW'))
											)
										THEN ('BMW JGA')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (T3."Inventory Posting Group" IN ('GW_MN_JGA'))
											)
										THEN ('MINI JGA')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (NOT T3."Inventory Posting Group" IN ('GW_DW_PKW', 'GW_MN_JGA'))
											)
										THEN ('restl. GA-Bestand')
									WHEN (
											(
												(
													CASE 
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																)
															THEN ('GA - diff.best.')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																)
															THEN ('GA - regelbest.')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Vehicle Status" = 0)
																)
															THEN ('NA')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Vehicle Status" = 2)
																)
															THEN ('VFW')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Make Code" IN ('BMW', 'BMW-C1', 'BMW-MOT', 'BMWI'))
											)
										THEN ('NA BMW')
									WHEN (
											(
												(
													CASE 
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																)
															THEN ('GA - diff.best.')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																)
															THEN ('GA - regelbest.')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Vehicle Status" = 0)
																)
															THEN ('NA')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Vehicle Status" = 2)
																)
															THEN ('VFW')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Make Code" IN ('BMW-MINI'))
											)
										THEN ('NA MINI')
									WHEN (
											(
												(
													CASE 
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																)
															THEN ('GA - diff.best.')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																)
															THEN ('GA - regelbest.')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Vehicle Status" = 0)
																)
															THEN ('NA')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Vehicle Status" = 2)
																)
															THEN ('VFW')
														ELSE NULL
														END
													) = 'VFW'
												)
											AND (T3."Make Code" IN ('BMW', 'BMW-C1', 'BMW-MOT', 'BMWI'))
											)
										THEN ('VFW BMW')
									WHEN (
											(
												(
													CASE 
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																)
															THEN ('GA - diff.best.')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																)
															THEN ('GA - regelbest.')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Vehicle Status" = 0)
																)
															THEN ('NA')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Vehicle Status" = 2)
																)
															THEN ('VFW')
														ELSE NULL
														END
													) = 'VFW'
												)
											AND (T3."Make Code" IN ('BMW-MINI'))
											)
										THEN ('VFW MINI')
									ELSE (
											(
												CASE 
													WHEN (
															(
																(
																	CASE 
																		WHEN (T3."Vehicle Status" = 1)
																			THEN ('GA')
																		WHEN (T3."Vehicle Status" IN (0, 2))
																			THEN ('NA')
																		ELSE NULL
																		END
																	) = 'GA'
																)
															AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
															)
														THEN ('GA - diff.best.')
													WHEN (
															(
																(
																	CASE 
																		WHEN (T3."Vehicle Status" = 1)
																			THEN ('GA')
																		WHEN (T3."Vehicle Status" IN (0, 2))
																			THEN ('NA')
																		ELSE NULL
																		END
																	) = 'GA'
																)
															AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
															)
														THEN ('GA - regelbest.')
													WHEN (
															(
																(
																	CASE 
																		WHEN (T3."Vehicle Status" = 1)
																			THEN ('GA')
																		WHEN (T3."Vehicle Status" IN (0, 2))
																			THEN ('NA')
																		ELSE NULL
																		END
																	) = 'NA'
																)
															AND (T3."Vehicle Status" = 0)
															)
														THEN ('NA')
													WHEN (
															(
																(
																	CASE 
																		WHEN (T3."Vehicle Status" = 1)
																			THEN ('GA')
																		WHEN (T3."Vehicle Status" IN (0, 2))
																			THEN ('NA')
																		ELSE NULL
																		END
																	) = 'NA'
																)
															AND (T3."Vehicle Status" = 2)
															)
														THEN ('VFW')
													ELSE NULL
													END
												)
											)
									END
								)
							)
					END AS "Fahrzeugtyp",
				(
					CASE 
						WHEN (
								NOT (
									CASE 
										WHEN (T3."Make Code" IN ('BMW', 'BMW I', 'BMWI', 'BMW-MINI', 'BMW-MOT'))
											THEN (T3."Make Code")
										ELSE ('Fremdfabrikat')
										END
									) IN ('Fremdfabrikat')
								)
							THEN (
									(
										CASE 
											WHEN (
													(T3."Make Code" = 'BMW')
													AND ((left(T9."Description", 1)) BETWEEN '1' AND '9')
													)
												THEN ((left(T9."Description", 1)) + 'er')
											WHEN (
													(T3."Make Code" = 'BMW')
													AND ((left(T9."Description", 1)) BETWEEN 'A' AND 'Z')
													)
												THEN ((left(T9."Description", 2)))
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%3-T%')
														OR (T3."Model" LIKE '%3-T%')
														)
													)
												THEN ('3-T�rer')
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%5-T%')
														OR (T3."Model" LIKE '%5-T%')
														)
													)
												THEN ('5-T�rer')
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%Club%')
														OR (T3."Model" LIKE '%Club%')
														)
													)
												THEN ('Clubman')
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%Count%')
														OR (T3."Model" LIKE '%Count%')
														)
													)
												THEN ('Countryman')
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%Cou%')
														OR (T3."Model" LIKE '%Cou%')
														)
													)
												THEN ('Coupe')
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%Hatch%')
														OR (T3."Model" LIKE '%Hatch%')
														)
													)
												THEN ('Hatch')
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%Pace%')
														OR (T3."Model" LIKE '%Pace%')
														)
													)
												THEN ('Paceman')
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%Road%')
														OR (T3."Model" LIKE '%Road%')
														)
													)
												THEN ('Roadster')
											WHEN (
													(T3."Make Code" = 'BMW-MINI')
													AND (
														(T9."Description" LIKE '%Cab%')
														OR (T3."Model" LIKE '%Cab%')
														)
													)
												THEN ('Cabrio')
											ELSE (T9."Description")
											END
										)
									)
						ELSE ('Fremd')
						END
					) AS "Modell_final",
				CASE 
					WHEN (T3."Make Code" IN ('BMW', 'BMW I', 'BMWI', 'BMW-MINI', 'BMW-MOT'))
						THEN (T3."Make Code")
					ELSE ('Fremdfabrikat')
					END AS "Fabrikat",
				CASE 
					WHEN (
							(T3."Make Code" = 'BMW')
							AND ((left(T9."Description", 1)) BETWEEN '1' AND '9')
							)
						THEN ((left(T9."Description", 1)) + 'er')
					WHEN (
							(T3."Make Code" = 'BMW')
							AND ((left(T9."Description", 1)) BETWEEN 'A' AND 'Z')
							)
						THEN ((left(T9."Description", 2)))
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%3-T%')
								OR (T3."Model" LIKE '%3-T%')
								)
							)
						THEN ('3-T�rer')
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%5-T%')
								OR (T3."Model" LIKE '%5-T%')
								)
							)
						THEN ('5-T�rer')
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%Club%')
								OR (T3."Model" LIKE '%Club%')
								)
							)
						THEN ('Clubman')
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%Count%')
								OR (T3."Model" LIKE '%Count%')
								)
							)
						THEN ('Countryman')
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%Cou%')
								OR (T3."Model" LIKE '%Cou%')
								)
							)
						THEN ('Coupe')
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%Hatch%')
								OR (T3."Model" LIKE '%Hatch%')
								)
							)
						THEN ('Hatch')
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%Pace%')
								OR (T3."Model" LIKE '%Pace%')
								)
							)
						THEN ('Paceman')
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%Road%')
								OR (T3."Model" LIKE '%Road%')
								)
							)
						THEN ('Roadster')
					WHEN (
							(T3."Make Code" = 'BMW-MINI')
							AND (
								(T9."Description" LIKE '%Cab%')
								OR (T3."Model" LIKE '%Cab%')
								)
							)
						THEN ('Cabrio')
					ELSE (T9."Description")
					END AS "Modell_zwischen",
				T9."Vehicle Category Code" AS "Vehicle Category Code_Item",
				T9."Vehicle Type Code" AS "Vehicle Type Code_Item",
				T9."Description" AS "Description_Item",
				T9."No_" AS "No_Item",
				CASE 
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 0 AND 90)
							)
						THEN ('0 - 90 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 91 AND 120)
							)
						THEN ('91 - 120 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 121 AND 180)
							)
						THEN ('121 - 180 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 181 AND 240)
							)
						THEN ('181 - 240 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 241 AND 300)
							)
						THEN ('241 - 300 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 301 AND 360)
							)
						THEN ('301 - 360 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) > 360)
							)
						THEN ('> 360 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 0 AND 90)
							)
						THEN ('0 - 90 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 91 AND 120)
							)
						THEN ('91 - 120 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 121 AND 180)
							)
						THEN ('121 - 180 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 181 AND 240)
							)
						THEN ('181 - 240 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 241 AND 300)
							)
						THEN ('241 - 300 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 301 AND 360)
							)
						THEN ('301 - 360 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) > 360)
							)
						THEN ('> 360 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 0 AND 30)
							)
						THEN ('0 - 30 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 31 AND 60)
							)
						THEN ('31 - 60 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 61 AND 90)
							)
						THEN ('61 - 90 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 91 AND 120)
							)
						THEN ('91 - 120 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 121 AND 180)
							)
						THEN ('121 - 180 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 181 AND 240)
							)
						THEN ('181 - 240 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 241 AND 300)
							)
						THEN ('241 - 300 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 301 AND 360)
							)
						THEN ('301 - 360 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) > 360)
							)
						THEN ('> 360 Tage')
					ELSE NULL
					END AS "Standtagestaffel",
				CASE 
					WHEN (T3."Vehicle Status" = 3)
						THEN ('kundenbelegt')
					ELSE ('nicht kundenbelegt')
					END AS "kundenbelegt ja/nein",
				CASE 
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (
								(T3."Model" LIKE '1%')
								OR (T3."Model" LIKE 'BMW 1%')
								)
							)
						THEN ('1ER-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (
								(
									(T3."Model" LIKE '2%')
									OR (T3."Model" LIKE 'BMW 2%')
									)
								OR (T3."Model" LIKE 'M2%')
								)
							)
						THEN ('2ER-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (
								(
									(T3."Model" LIKE '3%')
									OR (T3."Model" LIKE 'BMW 3%')
									)
								OR (T3."Model" LIKE 'M3%')
								)
							)
						THEN ('3ER-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (
								(T3."Model" LIKE '4%')
								OR (T3."Model" LIKE 'BMW 4%')
								)
							)
						THEN ('4ER-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (
								(
									(T3."Model" LIKE '5%')
									OR (T3."Model" LIKE 'BMW 5%')
									)
								OR (T3."Model" LIKE 'M5%')
								)
							)
						THEN ('5ER-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (
								(
									(T3."Model" LIKE '6%')
									OR (T3."Model" LIKE 'BMW 6%')
									)
								OR (T3."Model" LIKE 'M6%')
								)
							)
						THEN ('6ER-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (T3."Model" LIKE '7%')
							)
						THEN ('7ER-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (T3."Model" LIKE '8%')
							)
						THEN ('8ER-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (
								(T3."Model" LIKE 'X%')
								OR (T3."Model" LIKE 'BMW X%')
								)
							)
						THEN ('X-REIHE')
					WHEN (
							(
								(
									(T3."Make Code" = 'BMW')
									AND (
										(
											CASE 
												WHEN (T3."Vehicle Status" = 1)
													THEN ('GA')
												WHEN (T3."Vehicle Status" IN (0, 2))
													THEN ('NA')
												ELSE NULL
												END
											) = 'NA'
										)
									)
								AND (T3."Market Segment Code" = '')
								)
							AND (T3."Model" LIKE 'Z%')
							)
						THEN ('Z-REIHE')
					ELSE (T3."Market Segment Code")
					END AS "Model_alt_1",
				CASE 
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (T3."Inventory Posting Group" IN ('GW_DW_PKW'))
							)
						THEN ('BMW JGA')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (T3."Inventory Posting Group" IN ('GW_MN_JGA'))
							)
						THEN ('MINI JGA')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (NOT T3."Inventory Posting Group" IN ('GW_DW_PKW', 'GW_MN_JGA'))
							)
						THEN ('restl. GA-Bestand')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (T3."Make Code" IN ('BMW', 'BMW-C1', 'BMW-MOT', 'BMWI'))
							)
						THEN ('NA BMW')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (T3."Make Code" IN ('BMW-MINI'))
							)
						THEN ('NA MINI')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (T3."Make Code" IN ('BMW', 'BMW-C1', 'BMW-MOT', 'BMWI'))
							)
						THEN ('VFW BMW')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (T3."Make Code" IN ('BMW-MINI'))
							)
						THEN ('VFW MINI')
					ELSE (
							(
								CASE 
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - diff.best.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - regelbest.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 0)
											)
										THEN ('NA')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 2)
											)
										THEN ('VFW')
									ELSE NULL
									END
								)
							)
					END AS "Fahrzeugtyp_alt",
				convert(FLOAT, T6."List Price Incl_ VAT") AS c146,
				T3."Text 3" AS "Text 3",
				(convert(VARCHAR(50), year(T6."Price Sticker Date")) + '-' + convert(VARCHAR(50), month(T6."Price Sticker Date")) + '-' + convert(VARCHAR(50), day(T6."Price Sticker Date"))) AS "Dat_letzte_�nderung_Zeichen",
				(convert(VARCHAR(50), year(T3."Deregistration Date")) + '-' + convert(VARCHAR(50), month(T3."Deregistration Date")) + '-' + convert(VARCHAR(50), day(T3."Deregistration Date"))) AS "Abmeldung_Zeichen",
				(convert(VARCHAR(50), year(T3."Initial Registration")) + '-' + convert(VARCHAR(50), month(T3."Initial Registration")) + '-' + convert(VARCHAR(50), day(T3."Initial Registration"))) AS "EZ_Zeichen",
				T8."Name" AS "Name_Vorbesitzer",
				CASE 
					WHEN (
							(
								(
									(T1."No_" LIKE '3%')
									AND (NOT T2."Document No_" LIKE 'E%')
									)
								AND (NOT T2."Document No_" LIKE 'V%')
								)
							AND (NOT T2."Document No_" LIKE 'FB%')
							)
						THEN (((convert(FLOAT, T2."Amount"))))
					ELSE (0)
					END AS "EK erh. Pos.",
				CASE 
					WHEN (
							(
								(
									(
										CASE 
											WHEN (
													(
														(
															CASE 
																WHEN (T3."Vehicle Status" = 1)
																	THEN ('GA')
																WHEN (T3."Vehicle Status" IN (0, 2))
																	THEN ('NA')
																ELSE NULL
																END
															) = 'GA'
														)
													AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
													)
												THEN ('GA - diff.best.')
											WHEN (
													(
														(
															CASE 
																WHEN (T3."Vehicle Status" = 1)
																	THEN ('GA')
																WHEN (T3."Vehicle Status" IN (0, 2))
																	THEN ('NA')
																ELSE NULL
																END
															) = 'GA'
														)
													AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
													)
												THEN ('GA - regelbest.')
											WHEN (
													(
														(
															CASE 
																WHEN (T3."Vehicle Status" = 1)
																	THEN ('GA')
																WHEN (T3."Vehicle Status" IN (0, 2))
																	THEN ('NA')
																ELSE NULL
																END
															) = 'NA'
														)
													AND (T3."Vehicle Status" = 0)
													)
												THEN ('NA')
											WHEN (
													(
														(
															CASE 
																WHEN (T3."Vehicle Status" = 1)
																	THEN ('GA')
																WHEN (T3."Vehicle Status" IN (0, 2))
																	THEN ('NA')
																ELSE NULL
																END
															) = 'NA'
														)
													AND (T3."Vehicle Status" = 2)
													)
												THEN ('VFW')
											ELSE NULL
											END
										) = 'VFW'
									)
								AND (T3."Initial Registration" <> convert(DATETIME, '1753-01-01 00:00:00.000'))
								)
							AND (T3."Initial Registration" > T3."Deregistration Date")
							)
						THEN ('zugelassen')
					WHEN (
							(
								(
									(
										CASE 
											WHEN (
													(
														(
															CASE 
																WHEN (T3."Vehicle Status" = 1)
																	THEN ('GA')
																WHEN (T3."Vehicle Status" IN (0, 2))
																	THEN ('NA')
																ELSE NULL
																END
															) = 'GA'
														)
													AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
													)
												THEN ('GA - diff.best.')
											WHEN (
													(
														(
															CASE 
																WHEN (T3."Vehicle Status" = 1)
																	THEN ('GA')
																WHEN (T3."Vehicle Status" IN (0, 2))
																	THEN ('NA')
																ELSE NULL
																END
															) = 'GA'
														)
													AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
													)
												THEN ('GA - regelbest.')
											WHEN (
													(
														(
															CASE 
																WHEN (T3."Vehicle Status" = 1)
																	THEN ('GA')
																WHEN (T3."Vehicle Status" IN (0, 2))
																	THEN ('NA')
																ELSE NULL
																END
															) = 'NA'
														)
													AND (T3."Vehicle Status" = 0)
													)
												THEN ('NA')
											WHEN (
													(
														(
															CASE 
																WHEN (T3."Vehicle Status" = 1)
																	THEN ('GA')
																WHEN (T3."Vehicle Status" IN (0, 2))
																	THEN ('NA')
																ELSE NULL
																END
															) = 'NA'
														)
													AND (T3."Vehicle Status" = 2)
													)
												THEN ('VFW')
											ELSE NULL
											END
										) = 'VFW'
									)
								AND (T3."Initial Registration" <> convert(DATETIME, '1753-01-01 00:00:00.000'))
								)
							AND (T3."Initial Registration" < T3."Deregistration Date")
							)
						THEN ('abgemeldet')
					ELSE NULL
					END AS "VFW zugel./abgem",
				T3."Deregistration Date" AS "Deregistration Date",
				T3."Initial Registration" AS "Initial Registration_2",
				T3."Text 1" AS "Text 1_Vorbesitzer",
				T3."Extra Code 1" AS "Extra Code 1",
				CASE 
					WHEN (T3."Dealer Status" IN ('000', ''))
						THEN ('005')
					ELSE (T3."Dealer Status")
					END AS "Dealer Status",
				CASE 
					WHEN (
							(
								CASE 
									WHEN (T3."Dealer Status" IN ('000', ''))
										THEN ('005')
									ELSE (T3."Dealer Status")
									END
								) IN ('000', '005', '019', '015')
							)
						THEN ('Status 0 - 19')
					WHEN (
							(
								CASE 
									WHEN (T3."Dealer Status" IN ('000', ''))
										THEN ('005')
									ELSE (T3."Dealer Status")
									END
								) IN ('022', '030', '021', '099', '020')
							)
						THEN ('Status > 19')
					ELSE ('Status fehlt')
					END AS "H�ndlerstatus Gruppe",
				T7."Code" + ' - ' + T7."Description" AS "H�ndlerstatus",
				CASE 
					WHEN (T3."Dealer Status" IN ('005', '000', ''))
						THEN ('Fahrzeug auf Lager')
					WHEN (T3."Dealer Status" = '015')
						THEN ('Fahrzeug wird repariert')
					WHEN (T3."Dealer Status" = '019')
						THEN ('�bernahme durch Halter')
					WHEN (T3."Dealer Status" = '020')
						THEN ('Fahrzeug ist reserviert')
					WHEN (T3."Dealer Status" = '021')
						THEN ('Pool-Fahrzeug')
					WHEN (T3."Dealer Status" = '022')
						THEN ('FZG f�r Wiederverk�ufer')
					WHEN (T3."Dealer Status" = '030')
						THEN ('Fahrzeug ist verkauft')
					WHEN (T3."Dealer Status" = '099')
						THEN ('FZG nicht verkaufsrelevant')
					ELSE ('H�ndlerstatus fehlt')
					END AS "H�ndlerstatus_Text",
				T3."License No_" AS "License No",
				(convert(FLOAT, T3."Mileage")) AS "Mileage",
				T3."Key No_" AS "Key No",
				T3."Transmission Type Code" AS "Transmission Type Code",
				T3."Dealer Status" AS "Dealer Status_ori",
				CASE 
					WHEN (T3."Location Code" IN ('01BSPKW'))
						THEN ('10')
					WHEN (T3."Location Code" IN ('02BSMOT'))
						THEN ('20')
					WHEN (T3."Location Code" IN ('03RHF'))
						THEN ('30')
					WHEN (T3."Location Code" IN ('04SFH'))
						THEN ('40')
					WHEN (T3."Location Code" IN ('05WT'))
						THEN ('50')
					WHEN (T3."Location Code" IN ('06BI'))
						THEN ('60')
					WHEN (T3."Location Code" IN ('07TR'))
						THEN ('70')
					ELSE NULL
					END AS "Standort",
				T3."Date of Sale" AS "Date Of Sale",
				T3."Location Code" + ' - ' + (
					CASE 
						WHEN ((T7."Code" + ' - ' + T7."Description") IN ('020 - Fahrzeug ist reserviert'))
							THEN ('reserv.')
						WHEN ((T7."Code" + ' - ' + T7."Description") IN ('030 - Fahrzeug ist verkauft'))
							THEN ('verkauft')
						ELSE ('Bestand')
						END
					) + ' / ' + (convert(VARCHAR(50), year(T6."Price Sticker Date")) + '-' + convert(VARCHAR(50), month(T6."Price Sticker Date")) + '-' + convert(VARCHAR(50), day(T6."Price Sticker Date"))) AS "Ort_B_R_Dat_�nd",
				CASE 
					WHEN ((T7."Code" + ' - ' + T7."Description") IN ('020 - Fahrzeug ist reserviert'))
						THEN ('reserv.')
					WHEN ((T7."Code" + ' - ' + T7."Description") IN ('030 - Fahrzeug ist verkauft'))
						THEN ('verkauft')
					ELSE ('Bestand')
					END AS "Bestand/reserviert",
				CASE 
					WHEN (
							(T1."No_" LIKE '3%')
							AND (
								(
									(T2."Document No_" LIKE 'E%')
									OR (T2."Document No_" LIKE 'V%')
									)
								OR (T2."Document No_" LIKE 'FB%')
								)
							)
						THEN (((convert(FLOAT, T2."Amount"))))
					ELSE (0)
					END AS "EK FZG",
				CASE 
					WHEN (T1."No_" LIKE '4%')
						THEN (((convert(FLOAT, T2."Amount"))))
					ELSE (0)
					END AS "FZG-Kosten",
				T6."Price Sticker Date" AS "Price Sticker Date",
				convert(FLOAT, T6."Total Quote Amount") AS c174,
				T6."Total Quote Amount" AS "Total Quote Amount",
				T3."Manual Price Calculation" AS "Manual Price Calculation",
				T3."Current Price Sticker" AS "Current Price Sticker",
				(
					CASE 
						WHEN (
								(
									(
										CASE 
											WHEN (T3."Vehicle Status" = 1)
												THEN ('GA')
											WHEN (T3."Vehicle Status" IN (0, 2))
												THEN ('NA')
											ELSE NULL
											END
										) = 'GA'
									)
								AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
								)
							THEN ('GA - diff.best.')
						WHEN (
								(
									(
										CASE 
											WHEN (T3."Vehicle Status" = 1)
												THEN ('GA')
											WHEN (T3."Vehicle Status" IN (0, 2))
												THEN ('NA')
											ELSE NULL
											END
										) = 'GA'
									)
								AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
								)
							THEN ('GA - regelbest.')
						WHEN (
								(
									(
										CASE 
											WHEN (T3."Vehicle Status" = 1)
												THEN ('GA')
											WHEN (T3."Vehicle Status" IN (0, 2))
												THEN ('NA')
											ELSE NULL
											END
										) = 'NA'
									)
								AND (T3."Vehicle Status" = 0)
								)
							THEN ('NA')
						WHEN (
								(
									(
										CASE 
											WHEN (T3."Vehicle Status" = 1)
												THEN ('GA')
											WHEN (T3."Vehicle Status" IN (0, 2))
												THEN ('NA')
											ELSE NULL
											END
										) = 'NA'
									)
								AND (T3."Vehicle Status" = 2)
								)
							THEN ('VFW')
						ELSE NULL
						END
					) + ' / ' + T3."Inventory Posting Group" AS "Fzg_Typ_Herkunft",
				T3."Inventory Posting Group" AS "Inventory Posting Group",
				(- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date")) AS "Standtage_ori",
				CASE 
					WHEN (
							(
								CASE 
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - diff.best.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - regelbest.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 0)
											)
										THEN ('NA')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 2)
											)
										THEN ('VFW')
									ELSE NULL
									END
								) = 'NA'
							)
						THEN ((right(T2."VIN", 7)))
					WHEN (
							(
								CASE 
									WHEN (T3."Vehicle Status" = 1)
										THEN ('GA')
									WHEN (T3."Vehicle Status" IN (0, 2))
										THEN ('NA')
									ELSE NULL
									END
								) = 'GA'
							)
						THEN ((right(T2."VIN", 7)) + ' / ' + T3."Text 1")
					WHEN (
							(
								CASE 
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - diff.best.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - regelbest.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 0)
											)
										THEN ('NA')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 2)
											)
										THEN ('VFW')
									ELSE NULL
									END
								) = 'VFW'
							)
						THEN (
								(right(T2."VIN", 7)) + ' / ' + (
									CASE 
										WHEN (
												(
													(
														(
															CASE 
																WHEN (
																		(
																			(
																				CASE 
																					WHEN (T3."Vehicle Status" = 1)
																						THEN ('GA')
																					WHEN (T3."Vehicle Status" IN (0, 2))
																						THEN ('NA')
																					ELSE NULL
																					END
																				) = 'GA'
																			)
																		AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																		)
																	THEN ('GA - diff.best.')
																WHEN (
																		(
																			(
																				CASE 
																					WHEN (T3."Vehicle Status" = 1)
																						THEN ('GA')
																					WHEN (T3."Vehicle Status" IN (0, 2))
																						THEN ('NA')
																					ELSE NULL
																					END
																				) = 'GA'
																			)
																		AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																		)
																	THEN ('GA - regelbest.')
																WHEN (
																		(
																			(
																				CASE 
																					WHEN (T3."Vehicle Status" = 1)
																						THEN ('GA')
																					WHEN (T3."Vehicle Status" IN (0, 2))
																						THEN ('NA')
																					ELSE NULL
																					END
																				) = 'NA'
																			)
																		AND (T3."Vehicle Status" = 0)
																		)
																	THEN ('NA')
																WHEN (
																		(
																			(
																				CASE 
																					WHEN (T3."Vehicle Status" = 1)
																						THEN ('GA')
																					WHEN (T3."Vehicle Status" IN (0, 2))
																						THEN ('NA')
																					ELSE NULL
																					END
																				) = 'NA'
																			)
																		AND (T3."Vehicle Status" = 2)
																		)
																	THEN ('VFW')
																ELSE NULL
																END
															) = 'VFW'
														)
													AND (T3."Initial Registration" <> convert(DATETIME, '1753-01-01 00:00:00.000'))
													)
												AND (T3."Initial Registration" > T3."Deregistration Date")
												)
											THEN ('zugelassen')
										WHEN (
												(
													(
														(
															CASE 
																WHEN (
																		(
																			(
																				CASE 
																					WHEN (T3."Vehicle Status" = 1)
																						THEN ('GA')
																					WHEN (T3."Vehicle Status" IN (0, 2))
																						THEN ('NA')
																					ELSE NULL
																					END
																				) = 'GA'
																			)
																		AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																		)
																	THEN ('GA - diff.best.')
																WHEN (
																		(
																			(
																				CASE 
																					WHEN (T3."Vehicle Status" = 1)
																						THEN ('GA')
																					WHEN (T3."Vehicle Status" IN (0, 2))
																						THEN ('NA')
																					ELSE NULL
																					END
																				) = 'GA'
																			)
																		AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																		)
																	THEN ('GA - regelbest.')
																WHEN (
																		(
																			(
																				CASE 
																					WHEN (T3."Vehicle Status" = 1)
																						THEN ('GA')
																					WHEN (T3."Vehicle Status" IN (0, 2))
																						THEN ('NA')
																					ELSE NULL
																					END
																				) = 'NA'
																			)
																		AND (T3."Vehicle Status" = 0)
																		)
																	THEN ('NA')
																WHEN (
																		(
																			(
																				CASE 
																					WHEN (T3."Vehicle Status" = 1)
																						THEN ('GA')
																					WHEN (T3."Vehicle Status" IN (0, 2))
																						THEN ('NA')
																					ELSE NULL
																					END
																				) = 'NA'
																			)
																		AND (T3."Vehicle Status" = 2)
																		)
																	THEN ('VFW')
																ELSE NULL
																END
															) = 'VFW'
														)
													AND (T3."Initial Registration" <> convert(DATETIME, '1753-01-01 00:00:00.000'))
													)
												AND (T3."Initial Registration" < T3."Deregistration Date")
												)
											THEN ('abgemeldet')
										ELSE NULL
										END
									)
								)
					ELSE NULL
					END AS "FZG-Liste",
				((convert(FLOAT, T2."Amount"))) AS "Betrag",
				T5."Description" AS "Farbe",
				T5."Option Type" AS "Option Type_Farbe",
				T4."Description" AS "Polster",
				T4."Option Type" AS "Option Type_Polster",
				CASE 
					WHEN (
							(
								CASE 
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - diff.best.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - regelbest.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 0)
											)
										THEN ('NA')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 2)
											)
										THEN ('VFW')
									ELSE NULL
									END
								) = 'VFW'
							)
						THEN ((convert(VARCHAR(50), year(T3."Initial Registration")) + '-' + convert(VARCHAR(50), month(T3."Initial Registration")) + '-' + convert(VARCHAR(50), day(T3."Initial Registration"))))
					WHEN (
							(
								CASE 
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - diff.best.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
											)
										THEN ('GA - regelbest.')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 0)
											)
										THEN ('NA')
									WHEN (
											(
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'NA'
												)
											AND (T3."Vehicle Status" = 2)
											)
										THEN ('VFW')
									ELSE NULL
									END
								) = 'NA'
							)
						THEN ((convert(VARCHAR(50), year(T3."Purchase Receipt Date")) + '-' + convert(VARCHAR(50), month(T3."Purchase Receipt Date")) + '-' + convert(VARCHAR(50), day(T3."Purchase Receipt Date"))))
					WHEN (
							(
								CASE 
									WHEN (T3."Vehicle Status" = 1)
										THEN ('GA')
									WHEN (T3."Vehicle Status" IN (0))
										THEN ('NA')
									ELSE NULL
									END
								) = 'GA'
							)
						THEN ((convert(VARCHAR(50), year(T3."Purchase Receipt Date")) + '-' + convert(VARCHAR(50), month(T3."Purchase Receipt Date")) + '-' + convert(VARCHAR(50), day(T3."Purchase Receipt Date"))))
					ELSE NULL
					END AS "EZ/Eingang",
				CASE 
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 0 AND 90)
							)
						THEN ('0 - 90 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 91 AND 120)
							)
						THEN ('91 - 120 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 121 AND 180)
							)
						THEN ('121 - 180 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) > 180)
							)
						THEN ('> 180 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 0 AND 90)
							)
						THEN ('0 - 90 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 91 AND 120)
							)
						THEN ('91 - 120 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 121 AND 180)
							)
						THEN ('121 - 180 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - diff.best.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'GA'
													)
												AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
												)
											THEN ('GA - regelbest.')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 0)
												)
											THEN ('NA')
										WHEN (
												(
													(
														CASE 
															WHEN (T3."Vehicle Status" = 1)
																THEN ('GA')
															WHEN (T3."Vehicle Status" IN (0, 2))
																THEN ('NA')
															ELSE NULL
															END
														) = 'NA'
													)
												AND (T3."Vehicle Status" = 2)
												)
											THEN ('VFW')
										ELSE NULL
										END
									) = 'VFW'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) > 180)
							)
						THEN ('> 180 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 0 AND 30)
							)
						THEN ('0 - 30 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 31 AND 60)
							)
						THEN ('31 - 60 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 61 AND 90)
							)
						THEN ('61 - 90 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 91 AND 120)
							)
						THEN ('91 - 120 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) BETWEEN 121 AND 180)
							)
						THEN ('121 - 180 Tage')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (((- 1 * datediff(day, (getdate()), T3."Purchase Receipt Date"))) > 180)
							)
						THEN ('> 180 Tage')
					ELSE NULL
					END AS "Standtagestaffel_ori",
				T3."Purchase Receipt Date" AS "Purchase Receipt Date",
				T3."Location Code" AS "Location Code",
				CASE 
					WHEN (
							(
								CASE 
									WHEN (T3."Vehicle Status" = 1)
										THEN ('GA')
									WHEN (T3."Vehicle Status" IN (0, 2))
										THEN ('NA')
									ELSE NULL
									END
								) = 'NA'
							)
						THEN (
								(right(T2."VIN", 7)) + ' / ' + T3."Model" + ' / ' + (
									CASE 
										WHEN (
												(
													CASE 
														WHEN (T3."Vehicle Status" = 1)
															THEN ('GA')
														WHEN (T3."Vehicle Status" IN (0, 2))
															THEN ('NA')
														ELSE NULL
														END
													) = 'GA'
												)
											THEN (T3."Inventory Posting Group")
										ELSE (
												(
													CASE 
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (T3."Inventory Posting Group" IN ('GW_DW_PKW'))
																)
															THEN ('BMW JGA')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (T3."Inventory Posting Group" IN ('GW_MN_JGA'))
																)
															THEN ('MINI JGA')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (T3."Vehicle Status" = 1)
																				THEN ('GA')
																			WHEN (T3."Vehicle Status" IN (0, 2))
																				THEN ('NA')
																			ELSE NULL
																			END
																		) = 'GA'
																	)
																AND (NOT T3."Inventory Posting Group" IN ('GW_DW_PKW', 'GW_MN_JGA'))
																)
															THEN ('restl. GA-Bestand')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'GA'
																						)
																					AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																					)
																				THEN ('GA - diff.best.')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'GA'
																						)
																					AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																					)
																				THEN ('GA - regelbest.')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'NA'
																						)
																					AND (T3."Vehicle Status" = 0)
																					)
																				THEN ('NA')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'NA'
																						)
																					AND (T3."Vehicle Status" = 2)
																					)
																				THEN ('VFW')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Make Code" IN ('BMW', 'BMW-C1', 'BMW-MOT', 'BMWI'))
																)
															THEN ('NA BMW')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'GA'
																						)
																					AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																					)
																				THEN ('GA - diff.best.')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'GA'
																						)
																					AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																					)
																				THEN ('GA - regelbest.')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'NA'
																						)
																					AND (T3."Vehicle Status" = 0)
																					)
																				THEN ('NA')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'NA'
																						)
																					AND (T3."Vehicle Status" = 2)
																					)
																				THEN ('VFW')
																			ELSE NULL
																			END
																		) = 'NA'
																	)
																AND (T3."Make Code" IN ('BMW-MINI'))
																)
															THEN ('NA MINI')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'GA'
																						)
																					AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																					)
																				THEN ('GA - diff.best.')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'GA'
																						)
																					AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																					)
																				THEN ('GA - regelbest.')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'NA'
																						)
																					AND (T3."Vehicle Status" = 0)
																					)
																				THEN ('NA')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'NA'
																						)
																					AND (T3."Vehicle Status" = 2)
																					)
																				THEN ('VFW')
																			ELSE NULL
																			END
																		) = 'VFW'
																	)
																AND (T3."Make Code" IN ('BMW', 'BMW-C1', 'BMW-MOT', 'BMWI'))
																)
															THEN ('VFW BMW')
														WHEN (
																(
																	(
																		CASE 
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'GA'
																						)
																					AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																					)
																				THEN ('GA - diff.best.')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'GA'
																						)
																					AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																					)
																				THEN ('GA - regelbest.')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'NA'
																						)
																					AND (T3."Vehicle Status" = 0)
																					)
																				THEN ('NA')
																			WHEN (
																					(
																						(
																							CASE 
																								WHEN (T3."Vehicle Status" = 1)
																									THEN ('GA')
																								WHEN (T3."Vehicle Status" IN (0, 2))
																									THEN ('NA')
																								ELSE NULL
																								END
																							) = 'NA'
																						)
																					AND (T3."Vehicle Status" = 2)
																					)
																				THEN ('VFW')
																			ELSE NULL
																			END
																		) = 'VFW'
																	)
																AND (T3."Make Code" IN ('BMW-MINI'))
																)
															THEN ('VFW MINI')
														ELSE (
																(
																	CASE 
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - diff.best.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - regelbest.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 0)
																				)
																			THEN ('NA')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 2)
																				)
																			THEN ('VFW')
																		ELSE NULL
																		END
																	)
																)
														END
													)
												)
										END
									) + ' / ' + T3."Location Code" + ' / ' + T3."Dealer Status"
								)
					ELSE (
							(right(T2."VIN", 7)) + ' / ' + T3."Model" + ' / ' + (
								CASE 
									WHEN (
											(
												CASE 
													WHEN (T3."Vehicle Status" = 1)
														THEN ('GA')
													WHEN (T3."Vehicle Status" IN (0, 2))
														THEN ('NA')
													ELSE NULL
													END
												) = 'GA'
											)
										THEN (T3."Inventory Posting Group")
									ELSE (
											(
												CASE 
													WHEN (
															(
																(
																	CASE 
																		WHEN (T3."Vehicle Status" = 1)
																			THEN ('GA')
																		WHEN (T3."Vehicle Status" IN (0, 2))
																			THEN ('NA')
																		ELSE NULL
																		END
																	) = 'GA'
																)
															AND (T3."Inventory Posting Group" IN ('GW_DW_PKW'))
															)
														THEN ('BMW JGA')
													WHEN (
															(
																(
																	CASE 
																		WHEN (T3."Vehicle Status" = 1)
																			THEN ('GA')
																		WHEN (T3."Vehicle Status" IN (0, 2))
																			THEN ('NA')
																		ELSE NULL
																		END
																	) = 'GA'
																)
															AND (T3."Inventory Posting Group" IN ('GW_MN_JGA'))
															)
														THEN ('MINI JGA')
													WHEN (
															(
																(
																	CASE 
																		WHEN (T3."Vehicle Status" = 1)
																			THEN ('GA')
																		WHEN (T3."Vehicle Status" IN (0, 2))
																			THEN ('NA')
																		ELSE NULL
																		END
																	) = 'GA'
																)
															AND (NOT T3."Inventory Posting Group" IN ('GW_DW_PKW', 'GW_MN_JGA'))
															)
														THEN ('restl. GA-Bestand')
													WHEN (
															(
																(
																	CASE 
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - diff.best.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - regelbest.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 0)
																				)
																			THEN ('NA')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 2)
																				)
																			THEN ('VFW')
																		ELSE NULL
																		END
																	) = 'NA'
																)
															AND (T3."Make Code" IN ('BMW', 'BMW-C1', 'BMW-MOT', 'BMWI'))
															)
														THEN ('NA BMW')
													WHEN (
															(
																(
																	CASE 
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - diff.best.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - regelbest.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 0)
																				)
																			THEN ('NA')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 2)
																				)
																			THEN ('VFW')
																		ELSE NULL
																		END
																	) = 'NA'
																)
															AND (T3."Make Code" IN ('BMW-MINI'))
															)
														THEN ('NA MINI')
													WHEN (
															(
																(
																	CASE 
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - diff.best.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - regelbest.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 0)
																				)
																			THEN ('NA')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 2)
																				)
																			THEN ('VFW')
																		ELSE NULL
																		END
																	) = 'VFW'
																)
															AND (T3."Make Code" IN ('BMW', 'BMW-C1', 'BMW-MOT', 'BMWI'))
															)
														THEN ('VFW BMW')
													WHEN (
															(
																(
																	CASE 
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - diff.best.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'GA'
																					)
																				AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																				)
																			THEN ('GA - regelbest.')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 0)
																				)
																			THEN ('NA')
																		WHEN (
																				(
																					(
																						CASE 
																							WHEN (T3."Vehicle Status" = 1)
																								THEN ('GA')
																							WHEN (T3."Vehicle Status" IN (0, 2))
																								THEN ('NA')
																							ELSE NULL
																							END
																						) = 'NA'
																					)
																				AND (T3."Vehicle Status" = 2)
																				)
																			THEN ('VFW')
																		ELSE NULL
																		END
																	) = 'VFW'
																)
															AND (T3."Make Code" IN ('BMW-MINI'))
															)
														THEN ('VFW MINI')
													ELSE (
															(
																CASE 
																	WHEN (
																			(
																				(
																					CASE 
																						WHEN (T3."Vehicle Status" = 1)
																							THEN ('GA')
																						WHEN (T3."Vehicle Status" IN (0, 2))
																							THEN ('NA')
																						ELSE NULL
																						END
																					) = 'GA'
																				)
																			AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																			)
																		THEN ('GA - diff.best.')
																	WHEN (
																			(
																				(
																					CASE 
																						WHEN (T3."Vehicle Status" = 1)
																							THEN ('GA')
																						WHEN (T3."Vehicle Status" IN (0, 2))
																							THEN ('NA')
																						ELSE NULL
																						END
																					) = 'GA'
																				)
																			AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
																			)
																		THEN ('GA - regelbest.')
																	WHEN (
																			(
																				(
																					CASE 
																						WHEN (T3."Vehicle Status" = 1)
																							THEN ('GA')
																						WHEN (T3."Vehicle Status" IN (0, 2))
																							THEN ('NA')
																						ELSE NULL
																						END
																					) = 'NA'
																				)
																			AND (T3."Vehicle Status" = 0)
																			)
																		THEN ('NA')
																	WHEN (
																			(
																				(
																					CASE 
																						WHEN (T3."Vehicle Status" = 1)
																							THEN ('GA')
																						WHEN (T3."Vehicle Status" IN (0, 2))
																							THEN ('NA')
																						ELSE NULL
																						END
																					) = 'NA'
																				)
																			AND (T3."Vehicle Status" = 2)
																			)
																		THEN ('VFW')
																	ELSE NULL
																	END
																)
															)
													END
												)
											)
									END
								) + ' / ' + T3."Location Code" + ' / ' + T3."Dealer Status"
							)
					END AS "FZG",
				CASE 
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
							)
						THEN ('GA - diff.best.')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'GA'
								)
							AND (NOT T3."VAT Prod_ Posting Group" LIKE 'DIFF%')
							)
						THEN ('GA - regelbest.')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (T3."Vehicle Status" = 0)
							)
						THEN ('NA')
					WHEN (
							(
								(
									CASE 
										WHEN (T3."Vehicle Status" = 1)
											THEN ('GA')
										WHEN (T3."Vehicle Status" IN (0, 2))
											THEN ('NA')
										ELSE NULL
										END
									) = 'NA'
								)
							AND (T3."Vehicle Status" = 2)
							)
						THEN ('VFW')
					ELSE NULL
					END AS "Fahrzeugtyp_ori",
				T3."VAT Prod_ Posting Group" AS "Vat Prod Posting Group",
				CASE 
					WHEN (T3."Vehicle Status" = 1)
						THEN ('GA')
					WHEN (T3."Vehicle Status" IN (0, 2))
						THEN ('NA')
					ELSE NULL
					END AS "Fahrzeugart",
				T3."Model" AS "Model_ori",
				T3."Market Segment Code" AS "Model_alt",
				T3."Make Code" AS "Make Code_Vehicle",
				CASE 
					WHEN (
							(T2."Branch Code" = 'FIL1')
							OR (T2."Branch Code" = '')
							)
						THEN ('10')
					WHEN (T2."Branch Code" = 'FIL2')
						THEN ('20')
					ELSE ((left(T1."Global Dimension 1 Code", 2)))
					END AS "Standort_FIBU",
				T3."Model No_" AS "Model No",
				T3."Class" AS "Class",
				T3."Type" AS "Type",
				T3."Vehicle Status" AS "Vehicle Status",
				T3."VIN" AS "Vin_Vehicle",
				T2."Veh_ Source Code" AS "Veh Source Code",
				T2."Book No_" AS "Book No",
				T2."Main Area" AS "Main Area",
				T2."Branch Code" AS "Branch Code",
				T2."No_ Series" AS "No Series",
				T2."Source No_" AS "Source No",
				T2."Source Type" AS "Source Type",
				T2."Document Date" AS "Document Date",
				T2."Credit Amount" AS "Credit Amount",
				T2."Debit Amount" AS "Debit Amount",
				T2."Quantity" AS "Quantity",
				T2."Source Code" AS "Source Code",
				T2."User ID" AS "User Id",
				T2."Global Dimension 2 Code" AS "Make Code",
				T2."Global Dimension 1 Code" AS "Department Code",
				T2."Bal_ Account No_" AS "Bal Account No",
				T2."Amount" AS "Amount",
				T2."Description" AS "Description",
				T2."Document No_" AS "Document No",
				T2."Document Type" AS "Document Type",
				T2."Posting Date" AS "Posting Date",
				T2."G_L Account No_" AS "G L Account No",
				T2."Entry No_" AS "Entry No",
				T1."Income_Balance" AS "Income Balance",
				T1."Global Dimension 2 Code" AS "Make Code_2",
				T1."Global Dimension 1 Code" AS "Department Code_2",
				T1."Account Type" AS "Account Type",
				T1."Name" AS "Name",
				T1."No_" AS "No"
			FROM "Gottstein7x"."dbo"."AH Gottstein$G_L Account" T1,
				(
					(
						(
							(
								(
									(
										(
											"Gottstein7x"."dbo"."AH Gottstein$G_L Entry" T2 LEFT JOIN "Gottstein7x"."dbo"."AH Gottstein$Vehicle" T3 ON T3."VIN" = T2."VIN"
											) LEFT JOIN "Gottstein7x"."dbo"."AH Gottstein$Vehicle Option" T4 ON (
												(T3."VIN" = T4."VIN")
												AND (T4."Option Type" = 2)
												)
											AND (T4."Built-in Date" <> convert(DATETIME, '1753-01-01 00:00:00.000'))
										) LEFT JOIN "Gottstein7x"."dbo"."AH Gottstein$Vehicle Option" T5 ON (
											(T3."VIN" = T5."VIN")
											AND (T5."Option Type" = 1)
											)
										AND (T5."Built-in Date" <> convert(DATETIME, '1753-01-01 00:00:00.000'))
									) LEFT JOIN "Gottstein7x"."dbo"."AH Gottstein$Veh_ Price Sticker Header" T6 ON (
										(T3."VIN" = T6."VIN")
										AND (T3."Current Price Sticker" = T6."Line No_")
										)
									AND (T3."Current Book No_" = T6."Vehicle Book No_")
								) LEFT JOIN "Gottstein7x"."dbo"."AH Gottstein$Dealer Status" T7 ON T7."Code" = T3."Dealer Status"
							) LEFT JOIN "Gottstein7x"."dbo"."AH Gottstein$Customer" T8 ON T8."No_" = T3."Old Customer No_"
						) LEFT JOIN "Gottstein7x"."dbo"."AH Gottstein$Item" T9 ON T9."No_" = T3."Model No_"
					)
			WHERE (T1."No_" = T2."G_L Account No_")
				AND (
					(
						(
							(T1."No_" BETWEEN '31000' AND '32990')
							OR (
								(
									(T1."No_" LIKE '4%')
									AND (T2."Book No_" <> ' ')
									)
								AND (T2."Posting Date" >= T3."Purchase Receipt Date")
								)
							)
						AND (T3."Vehicle Status" <> 3)
						)
					AND (T3."Inventory Posting Group" <> 'GROSSKD')
					)
			) D3
		) D2
	) D1
WHERE (
		("Summe Betrag" >= 0)
		AND ("Summe EK" > 0)
		)
	-- order by "Summe Standtage" desc,"Vin" asc
