<?php
			$optionsArray = array( 'list' => array( 'inlineAdd' => false,
'detailsAdd' => true,
'inlineEdit' => false,
'delete' => true,
'updateSelected' => false,
'editInPopup' => null,
'viewInPopup' => null,
'clickSort' => true,
'sortDropdown' => false,
'showHideFields' => false,
'reorderFields' => false ),
'master' => array( 'sale_master' => array( 'preview' => true ) ),
'listSearch' => array( 'alwaysOnPanelFields' => array(  ),
'searchPanel' => true,
'fixedSearchPanel' => false,
'simpleSearchOptions' => false,
'searchSaving' => false ),
'totals' => array( 'id' => array( 'totalsType' => '' ),
'mid' => array( 'totalsType' => '' ),
'product_code' => array( 'totalsType' => 'COUNT' ),
'quantity' => array( 'totalsType' => '' ),
'cost_price' => array( 'totalsType' => '' ),
'selling_price' => array( 'totalsType' => '' ),
'discount' => array( 'totalsType' => '' ),
'tax' => array( 'totalsType' => '' ),
'Sub Total' => array( 'totalsType' => '' ) ),
'fields' => array( 'gridFields' => array( 'discount',
'product_code',
'quantity',
'selling_price',
'tax',
'cost_price' ),
'searchRequiredFields' => array(  ),
'searchPanelFields' => array( 'id',
'Sub Total',
'selling_price',
'quantity',
'product_code',
'mid' ),
'filterFields' => array(  ),
'inlineAddFields' => array( 'discount',
'product_code',
'quantity',
'selling_price',
'tax' ),
'inlineEditFields' => array( 'discount',
'product_code',
'quantity',
'selling_price',
'tax' ),
'fieldItems' => array( 'discount' => array( 'simple_grid_field1',
'simple_grid_field12' ),
'product_code' => array( 'simple_grid_field2',
'simple_grid_field9',
'grid_field_totals1' ),
'quantity' => array( 'simple_grid_field3',
'simple_grid_field14' ),
'selling_price' => array( 'simple_grid_field5',
'simple_grid_field10' ),
'tax' => array( 'simple_grid_field7',
'simple_grid_field13' ),
'cost_price' => array( 'grid_field',
'grid_field_label' ) ),
'hideEmptyFields' => array(  ) ),
'pageLinks' => array( 'edit' => false,
'add' => true,
'view' => false,
'print' => true ),
'layoutHelper' => array( 'formItems' => array( 'formItems' => array( 'supertop' => array( 'logo',
'simple_search',
'list_options' ),
'left' => array( 'search_panel' ),
'top' => array( 'master_info' ),
'above-grid' => array( 'add',
'inline_add',
'delete',
'details_found',
'page_size',
'print_panel' ),
'below-grid' => array( 'pagination' ),
'grid' => array( 'simple_grid_field9',
'simple_grid_field14',
'grid_field_label',
'simple_grid_field2',
'simple_grid_field3',
'grid_field',
'simple_grid_field10',
'simple_grid_field12',
'simple_grid_field13',
'simple_grid_field5',
'simple_grid_field1',
'simple_grid_field7',
'grid_checkbox_head',
'grid_checkbox',
'grid_field_totals1',
'grid_inline_cancel' ) ),
'formXtTags' => array( 'top' => array( 'mastertable_block' ),
'above-grid' => array( 'add_link',
'inlineadd_link',
'deleteselected_link',
'details_found',
'recsPerPage',
'print_friendly' ),
'below-grid' => array( 'pagination' ) ),
'itemForms' => array( 'logo' => 'supertop',
'simple_search' => 'supertop',
'list_options' => 'supertop',
'search_panel' => 'left',
'master_info' => 'top',
'add' => 'above-grid',
'inline_add' => 'above-grid',
'delete' => 'above-grid',
'details_found' => 'above-grid',
'page_size' => 'above-grid',
'print_panel' => 'above-grid',
'pagination' => 'below-grid',
'simple_grid_field9' => 'grid',
'simple_grid_field14' => 'grid',
'grid_field_label' => 'grid',
'simple_grid_field2' => 'grid',
'simple_grid_field3' => 'grid',
'grid_field' => 'grid',
'simple_grid_field10' => 'grid',
'simple_grid_field12' => 'grid',
'simple_grid_field13' => 'grid',
'simple_grid_field5' => 'grid',
'simple_grid_field1' => 'grid',
'simple_grid_field7' => 'grid',
'grid_checkbox_head' => 'grid',
'grid_checkbox' => 'grid',
'grid_field_totals1' => 'grid',
'grid_inline_cancel' => 'grid' ),
'itemLocations' => array( 'simple_grid_field9' => array( 'location' => 'grid',
'cellId' => 'headcell_field1' ),
'simple_grid_field14' => array( 'location' => 'grid',
'cellId' => 'headcell_field1' ),
'grid_field_label' => array( 'location' => 'grid',
'cellId' => 'headcell_field1' ),
'simple_grid_field2' => array( 'location' => 'grid',
'cellId' => 'cell_field1' ),
'simple_grid_field3' => array( 'location' => 'grid',
'cellId' => 'cell_field1' ),
'grid_field' => array( 'location' => 'grid',
'cellId' => 'cell_field1' ),
'simple_grid_field10' => array( 'location' => 'grid',
'cellId' => 'headcell_field2' ),
'simple_grid_field12' => array( 'location' => 'grid',
'cellId' => 'headcell_field2' ),
'simple_grid_field13' => array( 'location' => 'grid',
'cellId' => 'headcell_field2' ),
'simple_grid_field5' => array( 'location' => 'grid',
'cellId' => 'cell_field2' ),
'simple_grid_field1' => array( 'location' => 'grid',
'cellId' => 'cell_field2' ),
'simple_grid_field7' => array( 'location' => 'grid',
'cellId' => 'cell_field2' ),
'grid_checkbox_head' => array( 'location' => 'grid',
'cellId' => 'headcell_checkbox' ),
'grid_checkbox' => array( 'location' => 'grid',
'cellId' => 'cell_checkbox' ),
'grid_field_totals1' => array( 'location' => 'grid',
'cellId' => 'footcell_icons1' ),
'grid_inline_cancel' => array( 'location' => 'grid',
'cellId' => 'cell_icons' ) ),
'itemVisiblity' => array( 'simple_search' => 3,
'list_options' => 3,
'search_panel' => 5,
'print_panel' => 5 ) ),
'itemsByType' => array( 'page_size' => array( 'page_size' ),
'details_found' => array( 'details_found' ),
'logo' => array( 'logo' ),
'simple_search' => array( 'simple_search' ),
'pagination' => array( 'pagination' ),
'grid_field' => array( 'simple_grid_field1',
'simple_grid_field2',
'simple_grid_field3',
'simple_grid_field5',
'simple_grid_field7',
'grid_field' ),
'search_panel' => array( 'search_panel' ),
'list_options' => array( 'list_options' ),
'show_search_panel' => array( 'show_search_panel' ),
'hide_search_panel' => array( 'hide_search_panel' ),
'search_panel_field' => array( 'search_panel_field',
'search_panel_field1',
'search_panel_field2',
'search_panel_field3',
'search_panel_field5',
'search_panel_field6' ),
'delete' => array( 'delete' ),
'delete_selected' => array( 'delete_selected' ),
'-' => array( '-' ),
'grid_checkbox' => array( 'grid_checkbox' ),
'grid_checkbox_head' => array( 'grid_checkbox_head' ),
'master_info' => array( 'master_info' ),
'add' => array( 'add' ),
'print_panel' => array( 'print_panel' ),
'print_scope' => array( 'print_scope' ),
'print_button' => array( 'print_button' ),
'print_records' => array( 'print_records' ),
'grid_field_label' => array( 'simple_grid_field9',
'simple_grid_field10',
'simple_grid_field12',
'simple_grid_field13',
'simple_grid_field14',
'grid_field_label' ),
'grid_field_totals' => array( 'grid_field_totals1' ),
'inline_add' => array( 'inline_add' ),
'grid_inline_cancel' => array( 'grid_inline_cancel' ) ),
'cellMaps' => array( 'grid' => array( 'cells' => array( 'headcell_icons' => array( 'cols' => array( 0 ),
'rows' => array( 0 ),
'tags' => array(  ),
'items' => array(  ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'headcell_checkbox' => array( 'cols' => array( 1 ),
'rows' => array( 0 ),
'tags' => array( 'checkbox_column' ),
'items' => array( 'grid_checkbox_head' ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'headcell_field1' => array( 'cols' => array( 2 ),
'rows' => array( 0 ),
'tags' => array( 'product_code_fieldheadercolumn',
'quantity_fieldheadercolumn',
'cost_price_fieldheadercolumn' ),
'items' => array( 'simple_grid_field9',
'simple_grid_field14',
'grid_field_label' ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'headcell_field2' => array( 'cols' => array( 3 ),
'rows' => array( 0 ),
'tags' => array( 'selling_price_fieldheadercolumn',
'discount_fieldheadercolumn',
'tax_fieldheadercolumn' ),
'items' => array( 'simple_grid_field10',
'simple_grid_field12',
'simple_grid_field13' ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'cell_icons' => array( 'cols' => array( 0 ),
'rows' => array( 1 ),
'tags' => array( 'inline_cancel' ),
'items' => array( 'grid_inline_cancel' ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'cell_checkbox' => array( 'cols' => array( 1 ),
'rows' => array( 1 ),
'tags' => array( 'checkbox_column' ),
'items' => array( 'grid_checkbox' ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'cell_field1' => array( 'cols' => array( 2 ),
'rows' => array( 1 ),
'tags' => array( 'product_code_fieldcolumn',
'quantity_fieldcolumn',
'cost_price_fieldcolumn' ),
'items' => array( 'simple_grid_field2',
'simple_grid_field3',
'grid_field' ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'cell_field2' => array( 'cols' => array( 3 ),
'rows' => array( 1 ),
'tags' => array( 'selling_price_fieldcolumn',
'discount_fieldcolumn',
'tax_fieldcolumn' ),
'items' => array( 'simple_grid_field5',
'simple_grid_field1',
'simple_grid_field7' ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'footcell_icons3' => array( 'cols' => array( 0 ),
'rows' => array( 2 ),
'tags' => array(  ),
'items' => array(  ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'footcell_icons' => array( 'cols' => array( 1 ),
'rows' => array( 2 ),
'tags' => array(  ),
'items' => array(  ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'footcell_icons1' => array( 'cols' => array( 2 ),
'rows' => array( 2 ),
'tags' => array( 'product_code_fieldfootercolumn' ),
'items' => array( 'grid_field_totals1' ),
'fixedAtServer' => false,
'fixedAtClient' => false ),
'footcell_icons2' => array( 'cols' => array( 3 ),
'rows' => array( 2 ),
'tags' => array(  ),
'items' => array(  ),
'fixedAtServer' => false,
'fixedAtClient' => false ) ),
'width' => 4,
'height' => 3 ) ) ),
'page' => array( 'labeledButtons' => array( 'update_records' => array(  ),
'print_pages' => array(  ),
'register_activate_message' => array(  ),
'details_found' => array( 'details_found' => array( 'tag' => 'DISPLAYING',
'type' => 2 ) ) ),
'gridType' => 0,
'recsPerRow' => 1,
'hasCustomButtons' => false,
'customButtons' => array(  ) ),
'misc' => array( 'type' => 'list',
'breadcrumb' => false ),
'events' => array( 'maps' => array(  ),
'mapsData' => array(  ),
'buttons' => array(  ) ),
'dataGrid' => array( 'groupFields' => array(  ) ) );
			$pageArray = array( 'id' => 'list_add',
'type' => 'list',
'layoutId' => 'topbar',
'disabled' => 0,
'default' => 0,
'forms' => array( 'supertop' => array( 'modelId' => 'topbar-menu',
'grid' => array( array( 'cells' => array( array( 'cell' => 'c1' ),
array( 'cell' => 'c2' ) ),
'section' => '' ) ),
'cells' => array( 'c1' => array( 'model' => 'c1',
'items' => array( 'logo' ),
'_t' => 'Map',
'_i' => array(  ),
'_s' => 0 ),
'c2' => array( 'model' => 'c2',
'items' => array( 'simple_search',
'list_options' ),
'_t' => 'Map',
'_i' => array(  ),
'_s' => 0 ) ),
'deferredItems' => array(  ),
'recsPerRow' => 1 ),
'left' => array( 'modelId' => 'list-vbar',
'grid' => array( array( 'cells' => array( array( 'cell' => 'c1' ) ),
'section' => '' ) ),
'cells' => array( 'c1' => array( 'model' => 'c1',
'items' => array( 'search_panel' ),
'_t' => 'Map',
'_i' => array(  ),
'_s' => 0 ) ),
'deferredItems' => array(  ),
'recsPerRow' => 1 ),
'top' => array( 'modelId' => 'list-top',
'grid' => array( array( 'cells' => array( array( 'cell' => 'c1' ) ),
'section' => '' ),
array( 'cells' => array( array( 'cell' => 'c3' ) ),
'section' => '' ) ),
'cells' => array( 'c1' => array( 'model' => 'c1',
'items' => array(  ),
'_t' => 'Map',
'_i' => array(  ),
'_s' => 0 ),
'c3' => array( 'model' => 'c3',
'items' => array( 'master_info' ),
'_t' => 'Map',
'_i' => array(  ),
'_s' => 0 ) ),
'deferredItems' => array(  ),
'recsPerRow' => 1 ),
'above-grid' => array( 'modelId' => 'list-above-grid',
'grid' => array( array( 'cells' => array( array( 'cell' => 'c1',
'colspan' => 1 ) ),
'section' => '' ) ),
'cells' => array( 'c1' => array( 'model' => 'c1',
'items' => array( 'add',
'inline_add',
'delete',
'details_found',
'page_size',
'print_panel' ),
'_t' => 'Map',
'_i' => array(  ),
'_s' => 0 ) ),
'deferredItems' => array(  ),
'recsPerRow' => 1 ),
'below-grid' => array( 'modelId' => 'list-below-grid',
'grid' => array( array( 'cells' => array( array( 'cell' => 'c1' ) ),
'section' => '' ) ),
'cells' => array( 'c1' => array( 'model' => 'c1',
'items' => array( 'pagination' ),
'_t' => 'Map',
'_i' => array(  ),
'_s' => 0 ) ),
'deferredItems' => array(  ),
'recsPerRow' => 1 ),
'grid' => array( 'modelId' => 'horizontal-grid',
'grid' => array( array( 'section' => 'head',
'cells' => array( array( 'cell' => 'headcell_icons' ),
array( 'cell' => 'headcell_checkbox' ),
array( 'cell' => 'headcell_field1' ),
array( 'cell' => 'headcell_field2' ) ) ),
array( 'section' => 'body',
'cells' => array( array( 'cell' => 'cell_icons' ),
array( 'cell' => 'cell_checkbox' ),
array( 'cell' => 'cell_field1' ),
array( 'cell' => 'cell_field2' ) ) ),
array( 'section' => 'foot',
'cells' => array( array( 'cell' => 'footcell_icons3' ),
array( 'cell' => 'footcell_icons' ),
array( 'cell' => 'footcell_icons1' ),
array( 'cell' => 'footcell_icons2' ) ) ) ),
'cells' => array( 'headcell_field1' => array( 'model' => 'headcell_field',
'items' => array( 'simple_grid_field9',
'simple_grid_field14',
'grid_field_label' ),
'field' => 'product_code',
'orientation' => 'vertical',
'align' => 'center',
'border' => array( array( 'side' => '',
'width' => '1px',
'color' => '#000000' ) ),
'columnName' => 'field' ),
'cell_field1' => array( 'model' => 'cell_field',
'items' => array( 'simple_grid_field2',
'simple_grid_field3',
'grid_field' ),
'field' => 'product_code',
'orientation' => 'vertical',
'align' => 'center',
'border' => array( array( 'side' => '',
'width' => '1px',
'color' => '#000000' ) ),
'columnName' => 'field' ),
'headcell_field2' => array( 'model' => 'headcell_field',
'items' => array( 'simple_grid_field10',
'simple_grid_field12',
'simple_grid_field13' ),
'field' => 'selling_price',
'orientation' => 'vertical',
'align' => 'center',
'border' => array( array( 'side' => '',
'width' => '1px',
'color' => '#000000' ) ),
'columnName' => 'field' ),
'cell_field2' => array( 'model' => 'cell_field',
'items' => array( 'simple_grid_field5',
'simple_grid_field1',
'simple_grid_field7' ),
'field' => 'selling_price',
'orientation' => 'vertical',
'align' => 'center',
'border' => array( array( 'side' => '',
'width' => '1px',
'color' => '#000000' ) ),
'columnName' => 'field' ),
'headcell_checkbox' => array( 'model' => 'headcell_checkbox',
'items' => array( 'grid_checkbox_head' ),
'align' => 'center',
'border' => array( array( 'side' => '',
'width' => '1px',
'color' => '#000000' ) ),
'columnName' => 'checkbox' ),
'cell_checkbox' => array( 'model' => 'cell_checkbox',
'items' => array( 'grid_checkbox' ),
'align' => 'center',
'border' => array( array( 'side' => '',
'width' => '1px',
'color' => '#000000' ) ),
'columnName' => 'checkbox' ),
'footcell_icons' => array( 'model' => 'footcell_icons',
'items' => array(  ),
'columnName' => 'checkbox',
'align' => 'right',
'border' => array( array( 'side' => 'right',
'width' => '1px',
'color' => '#000000' ) ) ),
'footcell_icons1' => array( 'model' => 'footcell_icons',
'items' => array( 'grid_field_totals1' ),
'columnName' => 'field',
'field' => 'product_code',
'align' => 'center',
'border' => array( array( 'side' => '',
'width' => '1px',
'color' => '#000000' ) ) ),
'footcell_icons2' => array( 'model' => 'footcell_icons',
'items' => array(  ),
'align' => 'right',
'border' => array( array( 'side' => 'right',
'width' => '1px',
'color' => '#000000' ) ) ),
'headcell_icons' => array( 'model' => 'headcell_icons',
'items' => array(  ) ),
'cell_icons' => array( 'model' => 'cell_icons',
'items' => array( 'grid_inline_cancel' ) ),
'footcell_icons3' => array( 'model' => 'footcell_icons',
'items' => array(  ) ) ),
'deferredItems' => array(  ),
'recsPerRow' => 1 ) ),
'items' => array( 'page_size' => array( 'type' => 'page_size' ),
'details_found' => array( 'type' => 'details_found' ),
'logo' => array( 'type' => 'logo' ),
'simple_search' => array( 'type' => 'simple_search' ),
'pagination' => array( 'type' => 'pagination' ),
'simple_grid_field1' => array( 'field' => 'discount',
'type' => 'grid_field',
'inlineAdd' => true,
'inlineEdit' => true ),
'simple_grid_field2' => array( 'field' => 'product_code',
'type' => 'grid_field',
'clickSort' => true,
'inlineAdd' => true,
'inlineEdit' => true ),
'simple_grid_field3' => array( 'field' => 'quantity',
'type' => 'grid_field',
'clickSort' => true,
'inlineAdd' => true,
'inlineEdit' => true ),
'simple_grid_field5' => array( 'field' => 'selling_price',
'type' => 'grid_field',
'clickSort' => true,
'inlineAdd' => true,
'inlineEdit' => true ),
'search_panel' => array( 'type' => 'search_panel',
'items' => array( 'search_panel_field',
'search_panel_field6',
'search_panel_field5',
'search_panel_field3',
'search_panel_field2',
'search_panel_field1' ),
'_flexiblePanel' => true ),
'list_options' => array( 'type' => 'list_options',
'items' => array( 'delete_selected',
'-',
'show_search_panel',
'hide_search_panel' ) ),
'show_search_panel' => array( 'type' => 'show_search_panel' ),
'hide_search_panel' => array( 'type' => 'hide_search_panel' ),
'search_panel_field' => array( 'field' => 'id',
'type' => 'search_panel_field',
'required' => false ),
'search_panel_field1' => array( 'field' => 'mid',
'type' => 'search_panel_field',
'required' => false ),
'search_panel_field2' => array( 'field' => 'product_code',
'type' => 'search_panel_field',
'required' => false ),
'search_panel_field3' => array( 'field' => 'quantity',
'type' => 'search_panel_field',
'required' => false ),
'search_panel_field5' => array( 'field' => 'selling_price',
'type' => 'search_panel_field',
'required' => false ),
'search_panel_field6' => array( 'field' => 'Sub Total',
'type' => 'search_panel_field',
'required' => false ),
'delete' => array( 'type' => 'delete' ),
'delete_selected' => array( 'type' => 'delete_selected' ),
'-' => array( 'type' => '-' ),
'grid_checkbox' => array( 'type' => 'grid_checkbox' ),
'grid_checkbox_head' => array( 'type' => 'grid_checkbox_head' ),
'master_info' => array( 'type' => 'master_info',
'tables' => array( 'sale_master' => 'true' ) ),
'add' => array( 'type' => 'add' ),
'print_panel' => array( 'type' => 'print_panel',
'items' => array( 'print_scope',
'print_records',
'print_button' ) ),
'print_scope' => array( 'type' => 'print_scope' ),
'print_button' => array( 'type' => 'print_button' ),
'print_records' => array( 'type' => 'print_records' ),
'simple_grid_field7' => array( 'field' => 'tax',
'type' => 'grid_field',
'inlineAdd' => true,
'inlineEdit' => true ),
'simple_grid_field9' => array( 'type' => 'grid_field_label',
'field' => 'product_code',
'clickSort' => true ),
'simple_grid_field10' => array( 'type' => 'grid_field_label',
'field' => 'selling_price',
'clickSort' => true ),
'simple_grid_field12' => array( 'type' => 'grid_field_label',
'field' => 'discount',
'label' => array( 'field' => 'discount',
'table' => 'sale_details',
'type' => 3 ) ),
'simple_grid_field13' => array( 'type' => 'grid_field_label',
'field' => 'tax',
'label' => array( 'field' => 'tax',
'table' => 'sale_details',
'type' => 3 ) ),
'simple_grid_field14' => array( 'type' => 'grid_field_label',
'field' => 'quantity',
'clickSort' => true ),
'grid_field_totals1' => array( 'type' => 'grid_field_totals',
'field' => 'product_code',
'totals' => 'COUNT',
'label' => array( 'type' => 0,
'text' => '' ) ),
'grid_field' => array( 'field' => 'cost_price',
'type' => 'grid_field' ),
'grid_field_label' => array( 'type' => 'grid_field_label',
'field' => 'cost_price' ),
'inline_add' => array( 'type' => 'inline_add',
'buttonStyle' => 'success',
'buttonSize' => 'normal',
'icon' => array( 'glyph' => 'plus' ),
'label' => array( 'type' => 0,
'text' => 'Add' ),
'detailsOnly' => true ),
'grid_inline_cancel' => array( 'type' => 'grid_inline_cancel' ) ),
'dbProps' => array(  ),
'responsiveGrid' => false,
'version' => 4,
'pageWidth' => 'compact',
'pageAlign' => 'center' );
		?>