{
	"pluginname": "Samaritan",
	"systemplugin": "0",
	"iswebsite":1,
	"version": "1.0",
	"icon": "mif-delicious",
	"table_def": [
		{
			"name": "samaritan_contacts",
			"fields": [
				{
					"name": "projectnumber",
					"type": "int(11)",
					"other": ""
				},{
					"name": "name",
					"type": "varchar(100)",
					"other": "NOT NULL"
				},{
					"name": "address",
					"type": "varchar(300)",
					"other": "NOT NULL"
				},{
					"name": "contactperson",
					"type": "varchar(30)",
					"other": "NOT NULL"
				},{
					"name": "phonenumber",
					"type": "char(10)",
					"other": "NOT NULL"
				},{
					"name": "email",
					"type": "varchar(50)",
					"other": "NOT NULL UNIQUE"
				},{
					"name": "district",
					"type": "varchar(20)",
					"other": "NOT NULL"
				},{
					"name": "state",
					"type": "varchar(15)",
					"other": "NOT NULL"
				},{
					"name": "distributionlocation",
					"type": "varchar(300)",
					"other": "NOT NULL"
				}
			]
		},{
			"name": "samaritan_beneficiaries",
			"fields": [
				{
					"name": "projectnumber",
					"type": "int",
					"other": "NOT NULL"
				},{
					"name": "firstname",
					"type": "varchar(15)",
					"other": "NOT NULL"
				},{
					"name": "lastname",
					"type": "varchar(15)",
					"other": "NOT NULL"
				},{
					"name": "gender",
					"type": "enum('Male','Female')",
					"other": "NOT NULL"
				},{
					"name": "age",
					"type": "tinyint unsigned",
					"other": "NOT NULL"
				},{
					"name": "status",
					"type": "tinyint unsigned",
					"other": "NOT NULL DEFAULT 0"
				}
			]
		}
	],
	"sqlcommands_oninstall": [],
	"form": [
		{
			"name": "samaritan_contact",
			"formtype": "Horizontal",
			"title": "Ministry Partner Form",
			"icon": "mif-delicious",
			"saveButton": "1",
			"savecustomid": "1admn4",
			"getrecordcustomid": "1admn6",
			"cancelButton": "1",
			"flex_row": "true",
			"flex_justify": "start",
			"field": [
				{
					"name": "name",
					"label": "Name of Partner Organization",
					"fieldtype": "s",
					"type": "text",
					"required": "Yes",
					"maxlength": "100"
				},{
					"name": "address",
					"label": "Address",
					"fieldtype": "s",
					"type": "text",
					"required": "Yes",
					"maxlength": "300"
				},{
					"name": "contactperson",
					"label": "Contact Person Name",
					"fieldtype": "s",
					"type": "text",
					"required": "Yes",
					"maxlength": "30"
				},{
					"name": "phonenumber",
					"label": "Phone Number",
					"fieldtype": "s",
					"type": "number",
					"required": "Yes",
					"maxlength": "10"
				},{
					"name": "email",
					"label": "Email",
					"fieldtype": "s",
					"type": "text",
					"required": "Yes",
					"maxlength": "50"
				},{
					"name": "district",
					"label": "District",
					"fieldtype": "s",
					"type": "select",
					"option":"Siliguri,Bankura,West Midnapore,Kolkata",
					"required": "Yes",
					"maxlength": "20"
				},{
					"name": "state",
					"label": "State",
					"fieldtype": "s",
					"type": "select",
					"option":"West Bengal",
					"required": "Yes",
					"maxlength": "15"
				},{
					"name": "distributionlocation",
					"label": "Distribution Location",
					"fieldtype": "s",
					"type": "text",					
					"required": "Yes",
					"maxlength": "300"
				}
			]
		},{
			"name": "samaritan_beneficiary",
			"formtype": "Horizontal",
			"title": "Beneficiary Form",
			"icon": "mif-delicious",
			"saveButton": "1",
			"savecustomid": "2usr5",
			"getrecordcustomid": "2usr6",
			"cancelButton": "1",
			"flex_row": "true",
			"flex_justify": "start",
			"field": [
				{
					"name": "pnumber",
					"label": "PNumber",
					"fieldtype": "n",
					"type": "hidden",
					"default":"||pnumber||",
					"required": "Yes",
					"maxlength": "15"
				},{
					"name": "firstname",
					"label": "First Name",
					"fieldtype": "s",
					"type": "text",
					"required": "Yes",
					"maxlength": "15"
				},{
					"name": "lastname",
					"label": "Last Name",
					"fieldtype": "s",
					"type": "text",
					"required": "Yes",
					"maxlength": "15"
				},{
					"name": "gender",
					"label": "Gender",
					"fieldtype": "s",
					"type": "select",
					"option":"Male,Female",
					"required": "Yes",
					"maxlength": "15"
				},{
					"name": "age",
					"label": "Age",
					"fieldtype": "s",
					"type": "select",
					"option":"2,3,4,5,6,7,8,9,10,11,12,13,14",
					"required": "Yes",
					"maxlength": "15"
				}
			]
		}
	],
	"form_html": "",
	"navbutton": [{
		"customid": "1",
		"caption": "Samaritan",
		"icon": "mif-delicious",
		"btntype": "ribbon-button",
		"btngroup": "Others",
		"btntab": "Developer",
		"btnorder": "1",
		"onclick": "initializePlugin()"

	}],
	"script": "",
	"formbuttons": [{
			"name": "samaritan",
			"caption": "Samaritan",
			"icon": "mif-delicious fg-red",
			"onclick": "Eirene.runStmt('1admn')"
		}
	],
	"sqlstatement": [
		{
			"id":"1admn",
			"name":"Admin Controls",
			"sql":{
				"action":"Return","outputto":"php","output":"res","validate":"none",
				"elem":{
					"outputto":"html",
					"output":"#workareaFilter",
					"elem":[
						{
							"name":"1admnf0",
							"id":"1admnf0",
							"class":"mif-plus fg-red p-1",
							"type":"button",							
							"onclick":"showWindowInDialog('samaritan_contact');"
						},{
							"name":"1admnf1",
							"id":"1admnf1",
							"type":"button",
							"value":"Ministry Partners",
							"onclick":"Eirene.runStmt('1admn1',{pluginid:'||pluginid||'})"
						},{
							"name":"1admnf2",
							"id":"1admnf2",
							"type":"button",
							"value":"Beneficiaries",
							"onclick":"Eirene.runStmt('1admn2',{pluginid:'||pluginid||'})"
						},{
							"name":"1admnf3",
							"id":"1admnf3",
							"type":"button",
							"value":"Ministry Partner Form Link",
							"onclick":"copy('https://cmch.niea.in/cmchapp.php?stmt=2usr1&needlogin=false&pluginid=||pluginid||&pagetitle=OCC West Bengal');showToast('Link Copied','success',5000);"
						},{
							"name":"1admnf4",
							"id":"1admnf4",
							"type":"button",
							"value":"Add Beneficiary Form Link",
							"onclick":"copy('https://cmch.niea.in/cmchapp.php?stmt=2usrA&needlogin=false&pluginid=||pluginid||&pagetitle=OCC West Bengal');showToast('Link Copied','success',5000);"
						}
					]
				},
				"onsuccess":"cmd:dom,fun:show;#workareaFilter"
			}
		},{
			"id":"1admn1",
			"name":"Filter - Ministry Partners",
			"sql":{
				"action":"Return","outputto":"php","output":"res","validate":"none",
				"elem":{
					"outputto":"html",
					"output":"#workareaFilter1",
					"elem":[
						{
							"name":"district",
							"id":"1admn1f1",
							"type":"select",
							"option":"Siliguri,Bankura,West Midnapore,Kolkata",
							"label":"District"
						},{
							"name":"button",
							"id":"1admn1f2",
							"type":"button",
							"value":"Search",
							"onclick":"Eirene.runStmt('1admn3',{district:$('#1admn1f1').val()})"
						},{
							"name":"button",
							"id":"1admn1f3",
							"type":"button",
							"value":"Form 201",
							"onclick":"Eirene.runStmt('1admn3',{district:$('#1admn1f1').val()})"
						}
					]
				},
				"onsuccess":"cmd:dom,fun:show;#workareaFilter1"
			}
		},{
			"id":"1admn2",
			"name":"Filter - Beneficiaries",
			"sql":{
				"action":"Return","outputto":"php","output":"res","validate":"none",
				"elem":{
					"outputto":"html",
					"output":"#workareaFilter1",
					"elem":[
						{
							"name":"ministrypartner",
							"id":"1admn2f1",
							"type":"select",
							"option":",Siliguri,Bankura,West Midnapore,Kolkata",
							"label":"District",							
							"onchange":"Eirene.runStmt('1adm2a',{district:$(this).val()})"
						},{							
							"name":"1admn2div",
							"id":"1admn2f3",
							"type":"span",
							"class":"ml-2"							
						}
					]
				},
				"onsuccess":"cmd:dom,fun:show;#workareaFilter1"
			}
		},{
			"id":"1adm2a",
			"name":"Get list of partners in dropdown",
			"sql":{
				"action":"Return","outputto":"php","output":"res","validate":"none",
				"value":"",
				"elem":{
					"outputto":"html","output":"#1admn2f3","parent":"span","class":"mt-3",
					"elem":[
						{
							"name":"1adm2a1",
							"id":"1adm2a1",
							"label":"Partner",
							"type":"select","class":"mr-2",							
							"option":"select projectnumber,contactperson FROM samaritan_contacts WHERE district='||district||' and recordstatus=1 ORDER BY contactperson"
						},{
							"name":"1adm2a2",
							"id":"1adm2a2",
							"type":"button",
							"value":"Get Beneficiary",
							"onclick":"Eirene.runStmt('1admn7',{pluginid:'||pluginid||',projectnumber:$('#1adm2a1').val()})"
						},{
							"name":"1adm2a3",
							"id":"1adm2a3",
							"type":"button","class":"mr-2",	
							"value":"Get Beneficiary Summary",
							"onclick":"Eirene.runStmt('1admn8',{pluginid:'||pluginid||',district:$('#1admn2f1').val()})"
						}
					]
				}
			}
		},{
			"id":"1admn3",
			"name":"Ministry Partners List",
			"sql":{
				"action":"Get Table","outputto":"html","output":"table","validate":"none",
				"tbl":"samaritan_contacts",
				"fld":"projectnumber,contactperson,name,address,phonenumber,email,district,distributionlocation",
				"header":"Partner No.,Contact Person,Name,Address,Phone,Email,District,Dist. Location",
				"whr":"recordstatus=1 and district='||district||'",
				"functionfield":[
					{
						"type": "icon",
						"class": "icon mif-pencil ml-2",
						"onclick": "edit('samaritan_contact','<id>',true);",
						"title":"Edit"
					},{
						"type": "icon",
						"class": "icon mif-cross fg-red ml-2",
						"onclick": "Eirene.runStmt('1admn5',{ID:'<id>',pluginid:'||pluginid||'})",
						"title":"Delete"
					}
				]
			}
		},{
			"id":"frm201",
			"name":"Ministry Partners List",
			"sql":{
				"action":"MULTISTMT","outputto":"php","output":"res","validate":"none",
				"multistmt":[
					{
						"action":"Get Table","outputto":"php","output":"table1"
						"tbl":"samaritan_contacts a",
						"fld":"'' distributiondate,a.distributionlocation,CONCAT(name,'<br>',address)as nameaddress,a.contactperson,b.cnt",
						"join":"INNER JOIN (select projectnumber,count(*) cnt FROM samaritan_beneficiaries WHERE status=1 GROUP BY district) b ON a.projectnumber=b.projectnumber"
						"header":"Proposed Date of Distribution,Distribution Area,Name/Address of the Partner Organization/Distribution Location Address,Name of the Contact Person,No. of Gift Boxes,"Category of Children (Slum, Juvenile home, Orphanage, School, Physically challenged, Village children, Colony children, etc.)"",
						"whr":"recordstatus=1 and district='||district||'",
						"class":"",
						"style":"width:19cm",
						"serialno":1,
						"tdstyle":"border:1px solid grey",
					}
				]
		},{
			"id":"1admn4",
			"name":"Save Ministry Partner",
			"sql":{
				"action":"MULTISTMT","output":"php","output":"res","validate":"none",
				"multistmt":[
					{
						"action":"Get Value","outputto":"php","output":"rowsum",
						"tbl":"samaritan_contacts","fld":"count(*) + 1"
					},
					{
						"action":"Save Table","outputto":"php","output":"res","validate":"none",
						"tbl":"samaritan_contacts",
						"command":"insertorupdate",
						"fld":"projectnumber,contactperson,name,address,phonenumber,email,district,distributionlocation",
						"fldtype":"n,s,s,s,s,s,s,s",
						"value":"||GET_rowsum||,||contactperson||,||name||,||address||,||phonenumber||,||email||,||district||,||distributionlocation||",
						"whr":"id='||ID||'",
						"onsuccess":"cmd:dom,fun:showtoast;success;Saving Successful",
						"onfailure":"cmd:dom,fun:showtoast;alert;Saving Failed"
					}
				]
			}
		},{
			"id":"1admn5",
			"name":"Delete Ministry Partner",
			"sql":{
				"action":"Delete Row","outputto":"php","output":"res","validate":"none",
				"tbl":"samaritan_contacts",				
				"whr":"id='||ID||'",
				"onsuccess":"cmd:dom,fun:showtoast;success;Saving Successful-cmd:dom,fun:click;#1admn1f2",
				"onfailure":"cmd:dom,fun:showtoast;alert;Saving Failed"
			}
		},{
			"id":"1admn6",
			"name":"Get Ministry Partner",
			"sql":{
				"action":"Get Row","outputto":"html","output":"edit","validate":"none",
				"tbl":"samaritan_contacts",				
				"fld":"id,contactperson,name,address,phonenumber,email,district,distributionlocation",				
				"whr":"id='||ID||'",
				"jsfunction": "edit1"		
			}
		},{
			"id":"1admn7",
			"name":"Beneficiary List",
			"sql":{
				"action":"Get Table","output":"table","validate":"none",
				"tbl":"samaritan_beneficiaries",
				"fld":"firstname,lastname,gender,age",
				"header":"First Name,Last Name,Gender,Age",
				"whr":"recordstatus=1 and status=1 and projectnumber=||projectnumber||"
			}
		},{
			"id":"1admn8",
			"name":"Beneficiary List - Summary",
			"sql":{
				"action":"Get Table","output":"table","validate":"none",
				"tbl":"samaritan_beneficiaries a",
				"join":"INNER JOIN samaritan_contacts b ON a.projectnumber=b.projectnumber",
				"fld":"a.projectnumber,b.name,b.address,count(*)",
				"header":"Project Number,Name,Address,Beneficiary Count",
				"whr":"a.recordstatus=1 and a.status=1 and b.district='||district||'",
				"grp":"a.projectnumber,b.name,b.address"
			}
		},{
			"id":"2usr1",
			"name":"User - Ministry Partner Form",
			"sql":{
				"action":"MULTISTMT","validate":"none","outputto":"php",
				"multistmt":[
					{
						"action":"Return","output":"#workareaFilter",
						"value":"<h3>Ministry Partner Form</h3>"
					},
					{
						"action":"Get Form","output":"#workareaTablebox",
						"formlist":"samaritan_contact"
					}
				]
			}
		},{
			"id":"2usrA",
			"name":"User - Panel",
			"sql":{
				"action":"Return","validate":"none","outputto":"php",
				"elem":{
					"output":"#workareaFilter",
					"elem":[
						{
							"name":"2usr11",
							"id":"2user11",
							"type":"text",
							"placeholder":"Email or Phone"
						},{
							"name":"2user2",
							"id":"2user2",
							"type":"button",
							"value":"Search",
							"onclick":"Eirene.runStmt('2usr2',{pluginid:'||pluginid||',email:$('#2user11').val()})"
						},{
							"name":"2user3",
							"id":"2user3projectnumber",
							"type":"hidden"							
						},{
							"name":"2user4",
							"id":"2user3addBeneficiary",
							"type":"button",
							"style":"display:none",
							"class":"mif-plus fg-red p-1",
							"title":"Add Beneficiary",
							"value":" Add Beneficiary",
							"onclick":"Eirene.runStmt('2usr4',{pluginid:'||pluginid||',pnumber:$('#2user3projectnumber').val()})"
						},{
							"name":"2user5",
							"id":"2user5",
							"type":"button",
							"style":"display:none",
							"title":"Form 501",
							"value":" Form 501",
							"onclick":"Eirene.runStmt('frm501',{pluginid:'||pluginid||',pnumber:$('#2user3projectnumber').val()})"
						}
					]
				}
				
			}			
		},{
			"id":"2usr2",
			"name":"User - Find if user exists",
			"sql":{
				"action":"IF","outputto":"php","validate":"none",
				"tbl":"samaritan_contacts",
				"fld":"count(*)","whr":"email='||email||' or phonenumber='||email||'",
				"value":"1",
				"then":"cmd:dom,fun:jqueryfunction;$('#2user11').attr('disabled'&comma&'disabled')-2usr3",
				"else":"cmd:dom,fun:showtoast;alert;No Partner Found"
			}
		},{
			"id":"2usr3",
			"name":"User - Project Number",
			"sql":{
				"action":"Get Value","outputto":"php","output":"projectnumber","validate":"none",
				"tbl":"samaritan_contacts",
				"fld":"projectnumber","whr":"email='||email||' or phonenumber='||email||'",
				"onsuccess":"cmd:dom,fun:val;#2user3projectnumber;||GET_projectnumber||-cmd:dom,fun:jqueryfunction;$('#2user3addBeneficiary').show();$('#2user5').show()"
			}
		},{
			"id":"2usr4",
			"name":"User - Beneficiary Form",
			"sql":{
				"action":"MULTISTMT","validate":"none","outputto":"php",
				"multistmt":[
					{
						"action":"Return","output":"#workareaFilter",
						"value":"<h3>Beneficiary Form</h3>"
					},{
						"action":"Return","outputto":"php","output":"res",
						"value":"",
						"elem":{
							"output":"#workareaFilter1",
							"elem":[
								{
									"name":"2usr4e0",
									"id":"2usr4e0",
									"type":"button",
									"value":"Beneficiary Form",
									"onclick":"showWindow('samaritan_beneficiary')"
								},{
									"name":"2usr4e1",
									"id":"2usr4e1",
									"type":"button","class":"ml-2",
									"value":"Preview",
									"onclick":"Eirene.runStmt('2usr7',{pluginid:'||pluginid||',pnumber:||pnumber||})"
								},{
									"name":"2usr4e2",
									"id":"2usr4e2",
									"type":"button",
									"class":"ml-2",
									"value":"Submit",
									"onclick":"Eirene.runStmt('2usr10',{pluginid:'||pluginid||',pnumber:||pnumber||,confirmBeforeProcess:'You will not be able to change after Submit. Click Confirm to Proceed.'})"
								},{
									"name":"2usr4e3",
									"id":"2usr4e3",
									"type":"button",
									"class":"ml-2",
									"value":"Submitted List",
									"onclick":"Eirene.runStmt('2usr8',{pluginid:'||pluginid||',pnumber:||pnumber||})"
								}
							]
						}
					},
					{
						"action":"Get Form","output":"form",
						"formlist":"samaritan_beneficiary",
						"jsfunction": "initializePlugin1",
						"onsuccess":"cmd:dom,fun:show;#workareaFilter"
					}
				]
			}
		},{
			"id":"2usr5",
			"name":"User - Save Beneficiary Form",
			"sql":{
				"action":"Save Table","validate":"none","outputto":"php","output":"res",
				"tbl":"samaritan_beneficiaries",
				"fld":"projectnumber,firstname,lastname,gender,age",
				"fldtype":"n,s,s,s,n",
				"value":"||pnumber||,||firstname||,||lastname||,||gender||,||age||",
				"command":"insertorupdate",
				"whr":"id='||ID||'",
				"onsuccess":"cmd:dom,fun:showtoast;success;Saving Successful-cmd:dom,fun:function;clearForm;samaritan_beneficiary",
				"onfailure":"cmd:dom,fun:showtoast;alert;Saving Failed"
				
			}
		},{
			"id":"2usr6",
			"name":"User - Get Beneficiary Form Data",
			"sql":{
				"action":"Get Row","validate":"none","outputto":"html","output":"edit",
				"tbl":"samaritan_beneficiaries",
				"fld":"id,projectnumber as pnumber,firstname,lastname,gender,age",				
				"whr":"id='||ID||'",
				"jsfunction":"edit1"
			}
		},{
			"id":"2usr7",
			"name":"User - Get Beneficiary List (Preview List)",
			"sql":{
				"action":"Get Table","validate":"none","outputto":"html","output":"table",
				"tbl":"samaritan_beneficiaries",
				"fld":"firstname,lastname,gender,age",
				"header":"First Name,Last Name,Gender, Age",
				"whr":"status=0 and projectnumber=||pnumber||",
				"functionfield":[
					{
						"type": "icon",
						"class": "icon mif-pencil ml-2",
						"onclick": "edit('samaritan_beneficiary','<id>',true);",
						"title":"Edit"
					},{
						"type": "icon",
						"class": "icon mif-cross fg-red ml-2",
						"onclick": "Eirene.runStmt('2usr9',{ID:'<id>',pnumber:||pnumber||})",
						"title":"Delete"
					}
				]
			}
		},{
			"id":"2usr8",
			"name":"User - Get Beneficiary List (Submitted List)",
			"sql":{
				"action":"Get Table","validate":"none","outputto":"html","output":"table",
				"tbl":"samaritan_beneficiaries",
				"fld":"firstname,lastname,gender,age",
				"header":"First Name,Last Name,Gender, Age",
				"whr":"status=1 and projectnumber=||pnumber||"							
			}
		},{
			"id":"2usr9",
			"name":"User - Delete Beneficiary Record",
			"sql":{
				"action":"Delete Row Permanently","validate":"none","outputto":"php","output":"res",
				"tbl":"samaritan_beneficiaries",				
				"whr":"id='||ID||'",
				"onsuccess":"cmd:dom,fun:showtoast;success;Delete Successful-cmd:dom,fun:jqueryfunction;$('#2usr4e1').click()",
				"onfailure":"cmd:dom,fun:showtoast;alert;Delete Failed"
			}
		},{
			"id":"2usr10",
			"name":"User - Submit Beneficiary Record",
			"sql":{
				"action":"Save Table","validate":"none","outputto":"php","output":"res",
				"tbl":"samaritan_beneficiaries",
				"command":"update",
				"fld":"status","fldtype":"n","value":"1",
				"whr":"projectnumber=||pnumber||",
				"onsuccess":"cmd:dom,fun:showtoast;success;Submitted Successful-cmd:dom,fun:showMessage;#workareaTablebox;Submission Successful;success;The Submission is Successful. You will not be able to modify the records.",
				"onfailure":"cmd:dom,fun:showtoast;alert;Submission Failed"
			}
		},{
			"id":"frm501",
			"name":"Generate Form 501",
			"sql":{
				"action":"MULTISTMT","output":"res","outputto":"php",
				"multistmt":[
					{
						"action":"Get Row",
						"outputto":"php","output":"partner",
						"tbl":"samaritan_contacts",
						"fld":"name,address,contactperson,phonenumber,email,district,state,distributionlocation",
						"whr":"projectnumber='||pnumber||'"
					},{
						"action":"Return",
						"outputto":"php","output":"tablepartner",
						"value":[
							"<table style='width:19cm;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:13pt'>",
								"<tr>",
									"<td><b>FORM 501</b></td><td><b>KOL-</b></td>",
								"</tr><tr>",
									"<td colspan='2'><center><b>LIST OF RECEPIENTS</b></center></td>",
								"</tr><tr>",
									"<td colspan='2'><center><b>DEVELOPMENT ASSOCIATION FOR INTEGRATED ACTIVITY (DAIA)</b></center></td>",
								"</tr><tr>",
									"<td style='background-color:#EEECE1;width:35%'><b>Name & Address of the Partner Organization</b></td><td><center><b>||GET_partner_name||<br>||GET_partner_address||</b></center></td>",
								"</tr><tr>",
									"<td style='background-color:#EEECE1;width:35%'><b>Name of the Contact Person</b></td><td><center>||GET_partner_contactperson||</center></td>",
								"</tr><tr>",
									"<td style='background-color:#EEECE1;width:35%'><b>Phone number</b></td><td><center>||GET_partner_phonenumber||</center></td>",
								"</tr><tr>",
									"<td style='background-color:#EEECE1;width:35%'><b>Email</b></td><td><center>||GET_partner_email||</center></td>",
								"</tr><tr>",
									"<td style='background-color:#EEECE1;width:35%'><b>District</b></td><td><center>||GET_partner_district||</center></td>",
								"</tr><tr>",
									"<td style='background-color:#EEECE1;width:35%'><b>State</b></td><td><center>West Bengal</center></td>",
								"</tr><tr>",
									"<td style='background-color:#EEECE1;width:35%'><b>Distribution Location<br>(provide full address)</b></td><td><center>||GET_partner_distributionlocation||</center></td>",
								"</tr>",
							"</table>"
						]						
					},{
						"action":"Get Table",
						"outputto":"php","output":"tablebeneficiary",
						"tbl":"samaritan_beneficiaries",
						"fld":"firstname,lastname,gender,age",
						"whr":"status=1 and projectnumber=||pnumber||",
						"serialno":1,
						"tdstyle":"border:1px solid grey",
						"header":"First Name,Last Name,Gender,Age",
						"style":"border:1px solid grey;width:19cm",
						"class":""						
					},{
						"action":"Return",
						"outputto":"html","outputto":"#workareaTablebox",
						"value":"||GET_tablepartner||||GET_tablebeneficiary||"
					}
					
				]
			}
		}
	]
	
}