<?php
	require "../commonincludefiles.php";
	$action = $_REQUEST['action'];
	

	
	switch($action)
	{
		case "subgroup":
			$obj = new AccountSubGroupMgmt();		
			$num = $obj->getMaxRecordNumber();			
			echo "{success:true,idno:'".$num."'}";	
			break;
		case "group":
			$obj = new AccountGroupMgmt();
			$num = $obj->getMaxRecordNumber();
			echo "{success:true,idno:'".$num."'}";	
			break;
		case "master":
			$obj = new AccountMasterMgmt();
			$num = $obj->getMaxRecordNumber();
			echo "{success:true,idno:'".$num."'}";	
			break;
		case "voucherreceipt":	
		    $obj = new VoucherMasterMgmt();
			$numV = $obj->getMaxVoucherNumber();
			$numR = $obj->getMaxReceiptNumber();
		
			echo "{success:true,receipt:'".$numR."',voucher:'".$numV."'}";	
			break;
		
	}
?>