/**
 * Copyright Intermesh
 *
 * This file is part of Group-Office. You should have received a copy of the
 * Group-Office license along with Group-Office. See the file /LICENSE.TXT
 *
 * If you have questions write an e-mail to info@intermesh.nl
 *
 * @version $Id: InvoiceDialog.js 19557 2014-08-21 09:14:20Z wvbeusekom $
 * @copyright Copyright Intermesh
 * @author Michael de Hart <mdhart@intermesh.nl>
 */
GO.projects2.InvoiceDialog = Ext.extend(GO.Window,{

	initComponent : function(){
		
		this.invoiceablePanel = new GO.projects2.InvoiceablePanel({
			id:"pr2_invoicable"
		});
		
		
		this.incomePanel = new GO.projects2.AllIncomePanel();

		this.tabPanel = new Ext.TabPanel({
			activeTab:0,
			doLayoutOnTabChange:true,
			items:[
				this.incomePanel,
				this.invoiceablePanel				
			]
		});
			
		Ext.apply(this,{
			title:GO.projects2.lang['invoice'],
			height: 650,
			width: 1000,
			layout:'fit',
			items : [this.tabPanel],
			maximizable: true,
			listeners:{
				show:function(){
					this.tabPanel.setActiveTab(0);
				},
				scope:this
			}
		});
		
		GO.projects2.InvoiceDialog.superclass.initComponent.call(this);		
		
		this.on('show',function(){
			this.maximize();
		}, this);
		
	}
});