<?php require "_header.php";
require "data/combo_data.php";
?>

<script type="text/javascript" src="js/employeeformitems.js"></script>
<script language="javascript" type="text/javascript">
var labelArray;
labelArray = [
			 	['Section :<span class="comp">*</span>'],
				['Product :<span class="comp">*</span>'],
];
Ext.onReady(function() {
var productstore = new Ext.data.Store({
			url:'data/getproduct.php', 
	        reader: new Ext.data.JsonReader({			
                fields: ['product_id', 'product_name'],
                root: 'product'
            })
        });  
		productstore.load(); 

var productstore = new Ext.data.ArrayStore({
		fields: ['product_name'],
		data: Ext.combo.product
		//data:[['MFS110 L1 1 pcs'],['IRIS Scanner MIS 100V2 1 pcs'],['COMBO_MFS110_IRIS100V2 1 Pack']]
		//Ext.combo.product
  	});  

var courierstore = new Ext.data.ArrayStore({
           fields: ['courier_company'],
	       data: [['Speed Post'],['Nandan Courier'],['Tirupati Courier'],['Delhivery']]
});

		
   var employeeidentity= new Ext.FormPanel({
        id: 'employeeidentity',
        frame: true,
        labelAlign: 'left',
		standardSubmit:true,
        bodyStyle: 'padding:5px',
        url:"report-current-stock-result.php",
	   
		layout:'column',
		items:[
			  
				{columnWidth:.7,
		         labelWidth:100,  
				  layout:'form',
				  items:[
					{
					xtype: 'combo',
					name: 'product_name',
					hiddenName: 'product_hidden',
					id:'product_name',
					labelSeparator:'',	
					fieldLabel :'Product' ,
					forceSelection:true,				
					displayField:'product_name',
					valueField: 'product_name'					
					,allowBlank:true
					,triggerAction:'all'
					,mode:'local'
					,store: productstore
					,width:200
					,selectOnFocus: true
				   },
					{
				     xtype: 'textfield',
					name: 'order_no',
					width:200
					,labelSeparator:''
					,fieldLabel :'Order No'
					,id: 'order_no'
					
					},
					{
					xtype: 'datefield',
					name: 'import_date',
					tabIndex:10,
					labelSeparator:'',	
					fieldLabel :'Date' 
					,width:130
					
					,allowBlank:true
					,id: 'import_date'
					
					 
				  },
				  {
					xtype: 'combo',
					name: 'courier_company',
					hiddenName: 'courier_hidden',
					id:'courier_company',
					labelSeparator:'',	
					fieldLabel :'Courier' ,
					forceSelection:true,				
					displayField:'courier_company',
					valueField: 'courier_company'					
					,allowBlank:true
					,triggerAction:'all'
					,mode:'local'
					,store: courierstore
					,width:200
					,selectOnFocus: true
				   },
					 ]
			   },
			  
			]
    });
	
	
	var EmpReportWindow = new Ext.Window({
        title: "Address Print Report",
		width:500,		
		height:200,		
		border: false,
		modal:true,
		layout: 'fit',
		closeAction:'close',
		collapsible:true,
		
		items: employeeidentity,
		buttonAlign: 'center',
	    buttons: [ {
					text: 'View Delivery Report',
					iconCls:'icon-view',
					handler: function () { 
					
				
							employeeidentity.getForm().getEl().dom.action = 'view-delivery-address-report.php';
							employeeidentity.getForm().submit();  
					}
                   },{
					text: 'View Report',
					iconCls:'icon-view',
					handler: function () { 
						
					
				
							employeeidentity.getForm().getEl().dom.action = 'view-address-report.php';
							employeeidentity.getForm().submit();  
					}
                   },
				    {
					text: 'Reset', 
					iconCls:'icon-reset',
					handler: function () {   
											 employeeidentity.getForm().reset();
				                         }
			        },
   	 	            {
		   		text: 'Close',
				iconCls:'icon-close',
					handler: function () {   
						EmpReportWindow.close();
				                         }
                   }
			     ]

	});
	var varWidth =  (screen.width - EmpReportWindow.width)/2;
	EmpReportWindow.setPosition(varWidth,((screen.height/4)-38));
	EmpReportWindow.show();

});
</script>
<div align="center">
	<div id="main-content" style="width:600px" align="center"></div>
</div>
<?php require "_footer.php";?>