UPDATE TBDD_BASECONFIG SET DB_VERSION = '2.1';
GO


DELETE FROM TBDD_ZUGFERD_VIEW_RECEIPT_TEMPLATE;
Insert INTO TBDD_ZUGFERD_VIEW_RECEIPT_TEMPLATE 
(SPECNAME,				Row_Caption,							Area,		xPosition,	SequenceItem,	Y_eq_lastrow,	Display) values 
('INVOICE_TYPE',		'',										'TYPE',		10,			1,				0,				0),
('INVOICE_CURRENCY',	'',										'TYPE',		10,			2,				0,				0),
('INVOICE_NUMBER',		'Rechnungsnummer/Invoice-No:',			'HEAD',		10,			3,				0,				1),
('INVOICE_DATE',		'Datum/Date:',							'HEAD',		10,			4,				0,				1),
('INVOICE_SERVICE_DATE','Leistungsdatum/Service date:',			'HEAD',		10,			5,				0,				1),
('INVOICE_SELLER_NAME',	'',										'SELLER',	10,			6,				0,				1),
('INVOICE_SELLER_ADDRESS',		'',								'SELLER',	10,			7,				0,				1),
('INVOICE_SELLER_POSTALCODE',	'',								'SELLER',	10,			8,				0,				1),
('INVOICE_SELLER_CITY',			'',								'SELLER',	35,			9,				1,				1),
('INVOICE_SELLER_TAX_ID',	'USt-ID/Seller tax ID:',			'SELLER',	10,			10,				0,				1),
('INVOICE_SELLER_ID',		'Lieferant-Nr/Seller ID:',			'SELLER',	10,			11,				0,				1),
('INVOICE_BUYER_NAME',			'',								'BUYER',	10,			12,				0,				1),
('INVOICE_BUYER_ADRESS2',		'',								'BUYER',	10,			13,				0,				1),
('INVOICE_BUYER_ADRESS',		'',								'BUYER',	10,			14,				0,				1),
('INVOICE_BUYER_POSTALCODE',	'',								'BUYER',	10,			15,				0,				1),
('INVOICE_BUYER_CITY',			'',								'BUYER',	35,			16,				1,				1),
--('STATIC_Y_SWITCH',				'271',							'INTERNAL',	35,			15,				0,				0),
('INVOICE_POSITION_AMOUNT',		'',								'POSITION',	10,			17,				0,				0),
('INVOICE_POSITION_UNIT_TYPE',	'',								'POSITION',	10,			18,				0,				0),
('INVOICE_POSITION_ARTICLE',	'',								'POSITION',	10,			19,				0,				0),
('INVOICE_POSITION_ARTICLE_DESCRIPTION',	'',					'POSITION',	10,			20,				0,				0),
('INVOICE_POSITION_NOTE',	'',									'POSITION',	10,			21,				0,				0),
('INVOICE_TAXPOS_TAX_RATE',		'',								'POSITION',	10,			22,				0,				0),
('INVOICE_POSITION_TAX_AMOUNT',	'',								'POSITION',	10,			23,				0,				1),
('RECEIPT_ALLOWANCE_REASON',	'Grund/Reason:',				'ALLOWANCE',10,			300,			0,				1),
('RECEIPT_ALLOWANCE_ACTUAL_AMOUNT',	'Betrag/Amount:',			'ALLOWANCE',10,			301,			0,				1),
('RECEIPT_ALLOWANCE_CALCULATION_PERCENT', 'Steuer/Tax:',		'ALLOWANCE',10,			302,			0,				1),
('INVOICE_TOTAL_NET',	'Nettobetrag/Net amount:',				'AMOUNT',	10,			400,			0,				1),
('INVOICE_TOTAL_TAX',	'Steuerbetrag/Tax amount:',				'AMOUNT',	10,			401,			0,				1),
('INVOICE_TOTAL_GROSS',	'Bruttobetrag/Gross amount:',			'AMOUNT',	10,			402,			0,				1),
('INVOICE_TAXPOS_RATE',			'',								'TAXPOS',	10,			403,			1,				0),
('INVOICE_TAXPOS_AMOUNT',		'',								'TAXPOS',	10,			404,			0,				0),
('INVOICE_TAXPOS_TYPE',			'',								'TAXPOS',	10,			405,			1,				1),
('INVOICE_TAXPOS_EXEMPTION_REASON',			'',					'EXEMPTION',	10,			406,			0,				1),
('INVOICE_TAXPOS_EXEMPTION_REASON_CODE',	'',					'EXEMPTION',	10,			407,			0,				1),
('INVOICE_PAYMENT_TERMS','',									'PAYMENT',	10,			500,			0,				1),
('INVOICE_PAYMENT_IBAN','IBAN:',								'PAYMENT',	10,			501,			0,				1),
('INVOICE_PAYMENT_BIC','BIC:',									'PAYMENT',	10,			502,			0,				1);
GO
