

Ext.namespace('com.domorewithsage.tabdialog.tree');

com.domorewithsage.tabdialog.tree.FinanceTree = Ext.extend(Ext.tree.TreePanel, {


    initComponent : function()
    {
        Ext.apply(this, {
            iconCls     : 'finance',
            title       : 'Finance',
            // set the following property to "false" if you do
            // not wish to show the rootNode
            rootVisible : false
        });

        this._buildNodes();

        com.domorewithsage.tabdialog.tree.FinanceTree.superclass.initComponent.call(this);
    },

    /**
     * Sets the root property for this TreePanel and appends child nodes
     */
    _buildNodes : function()
    {
        this.root = new Ext.tree.TreeNode({
            text     : 'root',
            expanded : false
        });

        var child1 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'General Ledger and Analysis'
        }));

	        var child1_1 = child1.appendChild(
	            new Ext.tree.TreeNode({
	                text : 'General Ledger',
	        }));
	
		        var child1_1_1 = child1_1.appendChild(
		            new Ext.tree.TreeNode({
		                text : 'Tasks',
		        }));

			        var child1_1_1_1 = child1_1_1.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'N/L Journal Entry',
			                leaf : true
			        }));

			        var child1_1_1_2 = child1_1_1.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'N/L Journal Batch Posting',
			                leaf : true
			        }));

			        var child1_1_1_3 = child1_1_1.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Update Exchange Rates',
			                leaf : true
			        }));

	        var child1_1_2 = child1_1.appendChild(
	            new Ext.tree.TreeNode({
	                text : 'Enquiries',
	        }));
	
			        var child1_1_2_1 = child1_1_2.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'N/L Full Account Enquiry',
			                leaf : true
			        }));

			        var child1_1_2_2 = child1_1_2.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'N/L Transaction Enquiry',
			                leaf : true
			        }));

			        var child1_1_2_3 = child1_1_2.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Transactions (Manager)',
			                leaf : true
			        }));

			        var child1_1_2_4 = child1_1_2.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Archived Transactions',
			                leaf : true
			        }));

	        var child1_1_3 = child1_1.appendChild(
	            new Ext.tree.TreeNode({
	                text : 'Create / Amend Master Files',
	        }));
	
			        var child1_1_3_1 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Cost Centres',
			                leaf : true
			        }));

			        var child1_1_3_2 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Account Codes',
			                leaf : true
			        }));

			        var child1_1_3_3 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Posting Codes',
			                leaf : true
			        }));

			        var child1_1_3_4 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Posting Code Generation',
			                leaf : true
			        }));

			        var child1_1_3_5 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Short Codes',
			                leaf : true
			        }));

			        var child1_1_3_6 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Security Category Update',
			                leaf : true
			        }));

			        var child1_1_3_7 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Plan Maintenance',
			                leaf : true
			        }));

			        var child1_1_3_8 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Create Journal Format',
			                leaf : true
			        }));

			        var child1_1_3_9 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Exchange Difference Account',
			                leaf : true
			        }));

			        var child1_1_3_10 = child1_1_3.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Intercompany Details',
			                leaf : true
			        }));

	        var child1_1_4 = child1_1.appendChild(
	            new Ext.tree.TreeNode({
	                text : 'Special Reports',
	        }));
	
			        var child1_1_4_1 = child1_1_4.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Special Report Definition',
			                leaf : true
			        }));

			        var child1_1_4_2 = child1_1_4.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Special Report Format Print',
			                leaf : true
			        }));

			        var child1_1_4_3 = child1_1_4.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Special Reports',
			                leaf : true
			        }));

	        var child1_1_5 = child1_1.appendChild(
	            new Ext.tree.TreeNode({
	                text : 'Housekeeping',
	        }));

			        var child1_1_5_1 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Period End',
			                leaf : true
			        }));

			        var child1_1_5_2 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Year End Closing Balances',
			                leaf : true
			        }));

			        var child1_1_5_3 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Year End',
			                leaf : true
			        }));

			        var child1_1_5_4 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Revaluation Control',
			                leaf : true
			        }));

			        var child1_1_5_5 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Close Adjustment Period',
			                leaf : true
			        }));

			        var child1_1_5_6 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Transaction Archiving',
			                leaf : true
			        }));

			        var child1_1_5_7 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'History File Cleardown',
			                leaf : true
			        }));

			        var child1_1_5_8 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Audit File Cleardown',
			                leaf : true
			        }));

			        var child1_1_5_9 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Chart of Accounts Renumbering',
			                leaf : true
			        }));

			        var child1_1_5_10 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Document Archive/Deletion',
			                leaf : true
			        }));
			        
			        var child1_1_5_11 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Copy Journal',
			                leaf : true
			        }));
			        
			        var child1_1_5_12 = child1_1_5.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Split Journal',
				        }));
				        
	        var child1_1_6 = child1_1.appendChild(
	            new Ext.tree.TreeNode({
	                text : 'Reports',
	        }));

			        var child1_1_6_1 = child1_1_6.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Detail Trial Balance',
				        }));


			        var child1_1_6_2 = child1_1_6.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Summary Trial Balance',
				        }));

			        var child1_1_6_3 = child1_1_6.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Journal Listing',
				        }));

			        var child1_1_6_4 = child1_1_6.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Journal Audit Trail',
				        }));

			        var child1_1_6_5 = child1_1_6.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Chart of Accounts',
				        }));

			        var child1_1_6_6 = child1_1_6.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Audit File',
				        }));

			        var child1_1_6_7 = child1_1_6.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Plan Report',
				        }));

			        var child1_1_6_8 = child1_1_6.appendChild(
			            new Ext.tree.TreeNode({
			                text : 'Print Spooled Reports',
				        }));
				        
        var child1_2 = child1.appendChild(
            new Ext.tree.TreeNode({
                text : 'Budgets',
        }));

          var child1_2_1 = child1_2.appendChild(
              new Ext.tree.TreeNode({
                  text : 'Tasks',
          }));

            var child1_2_1_1 = child1_2_1.appendChild(
                new Ext.tree.TreeNode({
                    text : 'Budgets',
            }));

            var child1_2_1_2 = child1_2_1.appendChild(
                new Ext.tree.TreeNode({
                    text : 'Import Budgets from Spreadsheet',
            }));
            
          var child1_2_2 = child1_2.appendChild(
              new Ext.tree.TreeNode({
                  text : 'Enquiries',
          }));

            var child1_2_2_1 = child1_2_2.appendChild(
                new Ext.tree.TreeNode({
                    text : 'Budgets',
            }));

          var child1_2_3 = child1_2.appendChild(
              new Ext.tree.TreeNode({
                  text : 'Create / Amend Master Files',
          }));

            var child1_2_3_1 = child1_2_3.appendChild(
                new Ext.tree.TreeNode({
                    text : 'Apportionment Tables',
            }));
  
        var child1_4 = child1.appendChild(
            new Ext.tree.TreeNode({
                text : 'Hierarchies',
        }));

          var child1_4_1 = child1_4.appendChild(
              new Ext.tree.TreeNode({
                  text : 'Tasks',
          }));

            var child1_4_1_1 = child1_4_1.appendChild(
                new Ext.tree.TreeNode({
                    text : 'Hierarchy Balance Update',
            }));

          var child1_4_2 = child1_4.appendChild(
              new Ext.tree.TreeNode({
                  text : 'Enquiries',
          }));

            var child1_4_2_1 = child1_4_2.appendChild(
                new Ext.tree.TreeNode({
                    text : 'Hierarchy Enquiry',
            }));

          var child1_4_3 = child1_4.appendChild(
              new Ext.tree.TreeNode({
                  text : 'Create / Amend Master Files',
          }));

            var child1_4_3_1 = child1_4_3.appendChild(
                new Ext.tree.TreeNode({
                    text : 'Hierarchy Maintenance',
            }));

        var child2 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Budget Management'
        }));

        var child2_1 = child2.appendChild(
            new Ext.tree.TreeNode({
                text : 'Child 1 1',
                leaf : true
        }));

        var child3 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Accounts Receivable'
        }));

        var child3 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Credit Management'
        }));

        var child3 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Accounts Payable'
        }));

        var child3 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Fixed Assets'
        }));

        var child3 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Electronic Payments'
        }));

        var child3 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'BACS'
        }));

        var child3 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Cash Management'
        }));

        var child3 = this.root.appendChild(
            new Ext.tree.TreeNode({
                text : 'Job Costing'
        }));


















        var child1_1 = child1.appendChild(
            new Ext.tree.TreeNode({
                text : 'Child 1 1',
                /**
                 * Set leaf to true if you do not want this node to be
                 * rendered as a node which can contain more childs.
                 * Make sure you do not append childs to this node if
                 * "leaf" is set to "true". Defaults to false.
                 */
                leaf : true
        }));
    }

});