wholesales.lzx

<canvas bgcolor="#C1C1C1" debug="false" proxied="true" dataloadtimeout="600000" oninit="changepwddialog.close();" title="WholesalesTool">

        <splash>
                <view x="50" y="150" width="${parent.width}" height="100">
                        <text width="220" height="33" fontsize="18">Loading ...</text>
                </view>
        </splash>

	<script> 
		var sid;
		var oldvat;
	</script>


        <include href="wholesales/datasets.lzx"/>
        <include href="wholesales/methods.lzx"/>

	<script>
	</script>

	<script>
		Debug.write("WeePee Wholesales Tool Version 6");
		canvas.getWeePee();
                canvas.reload_delegate = new lz.Delegate(canvas, "weepeeReload");
		lz.Timer.addTimer(canvas.reload_delegate, 120 * 60000);
	</script>

	<whitestyle name="whitecolors"/>


        <view name="loading" width="${parent.width}" initstage="defer">
                <view width="${parent.width}" height="100" y="160">
                        <view x="40">
                                <text multiline="true" width="550" fontsize="15" fontstyle="bold">
                                        Loading:
                                </text>
                                <text multiline="true" width="${parent.width}" fontsize="10" fontstyle="bold" id="loadinginfo"/>
                                <simplelayout axis="y" spacing="5"/>
                        </view>
                        <simplelayout axis="y" spacing="120"/>
                </view>
        </view>

	<view name="weepeeinit" x="20" y="20" initstage="defer">
	</view>
	
        <modaldialog title="SIP" name="searchingsip" width="250" height="75" allowdrag="false">
                <view x="0" y="0">
                        <text fontsize="12" fontstyle="bold">One moment please....</text>
                </view>
        </modaldialog>
        
	<modaldialog title="Numbers" name="searchingnumbers" width="250" height="75" allowdrag="false">
                <view x="0" y="0">
                        <text fontsize="12" fontstyle="bold">One moment please....</text>
                </view>
        </modaldialog>
	
	<modaldialog title="ServiceNumbers" name="searchingservicenumbers" width="250" height="75" allowdrag="false">
                <view x="0" y="0">
                        <text fontsize="12" fontstyle="bold">One moment please....</text>
                </view>
        </modaldialog>
	
	
	<modaldialog title="FAX" name="searchingfax" width="250" height="75" allowdrag="false">
                <view x="0" y="0">
                        <text fontsize="12" fontstyle="bold">One moment please....</text>
                </view>
        </modaldialog>
	
	<modaldialog title="FWD" name="searchingfwd" width="250" height="75" allowdrag="false">
                <view x="0" y="0">
                        <text fontsize="12" fontstyle="bold">One moment please....</text>
                </view>
        </modaldialog>
	
	<view name="failedlogin" width="1180" height="300" initstage="defer">
		<text fontsize="25" fontstyle="bold">Login Failure ....</text>
	</view>	

	<modaldialog title="Wholesales Login" name="logindialog" width="300" height="350">
		<view layout="axis:y; spacing:15" x="10" y="10" width="220">
			<view x="10" resource="weepeelogo.png" width="170" height="120"/>
			<view layout="axis:x" align="right">
				<text valign="middle"><br/><br/></text>
			</view>
			<view layout="axis:x" align="right">
				<text valign="middle">wholesales id:</text>
				<edittext id="username" width="150"/>
			</view>
			<view layout="axis:x" align="right">
				<text valign="middle">password:</text>
				<edittext id="password" width="150" password="true"/>
			</view>
			<view layout="axis:x" align="center">
				<button isdefault="true">Login
					<handler name="onclick">
						canvas.resellerLogin(username.getText(),password.getText());
					</handler>
				</button>
			</view>
		</view>
	</modaldialog>

	<window title="Wholesales Password Change" name="changepwddialog" width="300" height="380" resizable="false" closeable="true" x="300" y="150">
		<view width="230" align="center" y="15">
			<view resource="weepeelogo.png" align="center" width="170" height="120"/>
			<view layout="axis:x" align="right">
				<text valign="middle"><br/><br/></text>
			</view>
			<view layout="axis:x" align="left">
				<text width="200" height="25" id="changepwddata"/>
			</view>
			<view layout="axis:x" align="right">
				<text valign="middle">old password:</text>
				<edittext id="oldpassword" width="150" password="true"/>
			</view>
			<view layout="axis:x" align="right">
				<text valign="middle">new password:</text>
				<edittext id="newpassword" width="150" password="true"/>
			</view>
			<view layout="axis:x" align="center">
				<button isdefault="true">Change Password
					<handler name="onclick">
						canvas.resellerChangePwd(oldpassword.getText(),newpassword.getText());
					</handler>
				</button>
			</view>
			<simplelayout axis="y" spacing="15"/>
		</view>
	</window>

	<view name="resellermenu" visible="false" width="${parent.width}" height="${parent.height-25}">
		<view width="${parent.width}">
			<view align="left">
				<text fontstyle="bold">Wholesales Tool</text>
			</view>
			<view align="right">
				<text>rev.2019030702
				</text>
			</view>
		</view>
		<view width="${parent.width}" height="${parent.height}">
			<tabs x="5" style="whitecolors" id="mytabs" width="${parent.width-10}" height="${parent.height-5}">
				<tabpane bgcolor="#FFFFFF" width="${parent.width}" height="${parent.height}">Wholesales 
					<view x="5" y="5" height="${immediateparent.height-10}" width="${immediateparent.width-10}">
						<view>
							<text fontstyle="bold">Wholesales ID:</text>
							<text datapath="loginDS:/dbdata/data/reseller_id/text()"/>
							<simplelayout axis="x"/>
						</view>
						<view>
							<text datapath="loginDS:/dbdata/data/company/text()" width="350"/>
							<text datapath="loginDS:/dbdata/data/fullname/text()" width="350"/>
							<text datapath="loginDS:/dbdata/data/street/text()" width="350"/>
							<text datapath="loginDS:/dbdata/data/postalcity/text()" width="350"/>
							<text datapath="loginDS:/dbdata/data/country/text()" width="350"/>
							<text datapath="loginDS:/dbdata/data/email/text()" width="350"/>
							<text datapath="loginDS:/dbdata/data/vat/text()" width="350"/>
							<simplelayout axis="y"/>
						</view>
						<view>
							<button isdefault="true">Change Password
								<handler name="onclick">
									canvas.changepwddialog.completeInstantiation();
									canvas.changepwddialog.open();
								</handler>
							</button>
						</view>
						<simplelayout axis="y" spacing="15"/>
						<view resource="weepeelogo.png" width="170" height="120" x="${resellermenu.width-300}" y="${resellermenu.height-300}"/>
					</view>
				</tabpane>
				<tabpane bgcolor="#FFFFFF" width="${parent.width}" height="${parent.height}">Information
					<tabslider width="${parent.width-20}" height="${parent.height-45}">
						<tabelement text="Unused Numbers" selected="true">
							<view height="${immediateparent.height}" width="${immediateparent.width}" clip="true">
								<text multiline="true" width="${parent.width-25}">
									<u><b>Unused Numbers</b></u><br/>

									-<font color="#0000FF"><b><a target="_blank" href="https://ssl.weepee.org/api/numbers/nomadic.csv">Nomadic Numbers</a></b>-</font><br/>
									<br/><br/>
								</text>
								<vscrollbar/>
							</view>
						</tabelement>
						<tabelement text="Important Numbers">
							<view height="${immediateparent.height}" width="${immediateparent.width}" clip="true">
								<text multiline="true" width="${parent.width}">
									<font color="#FF0000"><b>TIJDENS KANTOOR UREN</b></font><br/>0800 26 1 26<br/><br/>
								</text>
								<vscrollbar/>
							</view>
						</tabelement>
						<tabelement text="Codecs and Bandwidth">

							<grid id="codecbw" width="${parent.width-20}" height="${parent.height-45}" bgcolor0="$once{whitecolors.basecolor}" datapath="codecbwDS:/dbdata" sizetoheader="false">
								<gridtext width="${parent.width/5}" datapath="codec/text()" text="Codec"/>
								<gridtext width="${parent.width/5}" datapath="calls/text()" datatype="number" text="Concurent Calls"/>
								<gridtext width="${parent.width/5}" datapath="kbps/text()" text="Upstream (kbps)"/>
								<gridtext width="${parent.width/5}" datapath="kbps/text()" text="Downstream (kbps)"/>
								<gridtext width="${parent.width/5}" datapath="total/text()" text="Total Bandwith (kbps)"/>
							</grid>

						</tabelement>
					</tabslider>
				</tabpane>
				<tabpane bgcolor="#FFFFFF" width="${parent.width}" height="${parent.height}">Administration
					<tabslider width="${parent.width-20}" height="${parent.height-45}">
						<tabelement text="Create Account" selected="true">
							<view valign="top">
								<view>
									<view width="500">
										<text multiline="true" width="400">
											<b>Type:</b>
										</text>
										<radiogroup id="accounttype">
											<radiobutton id="SIP" text="SIP"/>
											<radiobutton id="SIPTRUNK" text="SIPTRUNK"/>
											<radiobutton id="FAX" text="FAX"/>
											<radiobutton id="FWD" text="FWD"/>
										</radiogroup>
										<text multiline="true" width="500">
											<font color="#FF0000">FWD</font> FWD only accounts<br/>
											<font color="#FF0000">SIPTRUNK</font> trunks are used for devices that are capable of routing calls by number (mostly used by pbx`s)<br/>
										</text>
										<simplelayout axis="y" spacing="15"/>		                    
									</view>
									<view width="300">
										<text multiline="true" width="150">
											<b>Account Details:</b><br/>
										</text>
										<view layout="axis:x" align="right">
											<text valign="middle">first name:</text>
											<edittext id="surname" width="250"/>
										</view>             
										<view layout="axis:x" align="right">
											<text valign="middle"> last name:</text>
											<edittext id="lastname" width="250"/>
										</view>
										<view layout="axis:x" align="right">
											<text valign="middle">street:</text>
											<edittext id="street" width="250"/>
										</view>
										<view layout="axis:x" align="right">
											<text valign="middle">search city or postalcode:</text>
											<edittext id="searchpostalcode" width="250">
												<handler name="onkeyup">
													canvas.searchPostalcodes(searchpostalcode.getValue());
												</handler>
											</edittext>
										</view>
											<view layout="axis:x" align="right">
											<text valign="middle">city:</text>
											<datacombobox id="city" width="250" shownitems="5" itemdatapath="postalcodesDS:/dbdata/data" textdatapath="codecitytext/text()" valuedatapath="codecity/text()">
											</datacombobox>
										</view>
										<view layout="axis:x" align="right">
											<text valign="middle">email:</text>
											<edittext id="email" width="250"/>
										</view>
										<view layout="axis:x" align="right">
											<button isdefault="false">Create Account
												<handler name="onclick">
													canvas.createAccount(
														accounttype.getValue(),
														lastname.getValue(),
														surname.getValue(),
														street.getValue(),
														city.getValue(),
														email.getValue()
													);
												</handler>
											</button>
											<simplelayout axis="x" spacing="5"/>		                    
										</view>
										<simplelayout axis="y" spacing="5"/>		                    
									</view>
									<simplelayout axis="x" spacing="50"/>		                    
								</view>
								<text multiline="true" enabled="true" width="900" height="190" id="accountdata" selectable="true"/>
								<simplelayout axis="y" spacing="25"/>
							</view>
						</tabelement>
						<tabelement text="Add Number Screened">
							<view valign="top">
								<view width="500">
									<text multiline="true" width="400">
										<b>Add a number to an account !</b><br/><br/>
									</text>
									<text multiline="true" width="400" height="230" id="addnumberscreeneddata"/>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<view align="left" width="300">
									<text multiline="true" width="150">
										<b>Number Details:</b><br/><br/>
									</text>
									<view layout="axis:x" align="right">
										<text valign="middle">Account Id:</text>
										<edittext id="scaccountid" width="250"/>
									</view>
									<view layout="axis:x" align="right">
										<text valign="middle">Number: </text>
										<edittext id="scnumber" width="250"/>
									</view>
									<text multiline="true">
										<br/>
									</text>
									<text multiline="true">
										<br/>
									</text>
									<view layout="axis:x" align="left">
										<button isdefault="true">Add number screened
											<handler name="onclick">
												canvas.addNumberScreened(
												scnumber.getValue(),
												scaccountid.getValue()
												);
											</handler>
										</button>
									</view>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<simplelayout axis="x" spacing="50"/>
							</view>
						</tabelement>
						<tabelement text="Add Number">
							<view valign="top">
								<view width="500">
									<text multiline="true" width="400">
										<b>Add a number to an account !</b><br/><br/>
									</text>
									<text multiline="true" width="400" height="230" id="addnumberdata"/>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<view align="left" width="300">
									<text multiline="true" width="150">
										<b>Number Details:</b><br/><br/>
									</text>
									<view layout="axis:x" align="right">
										<text valign="middle">Account Id:</text>
										<edittext id="accountid" width="250"/>
									</view>
									<view layout="axis:x" align="right">
										<text valign="middle">Number: </text>
										<edittext id="number" width="250"/>
									</view>
									<text multiline="true">
										<br/>
									</text>
									<text multiline="true">
										<br/>
									</text>
									<view layout="axis:x" align="left">
										<button isdefault="true">Add number
											<handler name="onclick">
												canvas.addNumber(
												number.getValue(),
												accountid.getValue()
												);
											</handler>
										</button>
									</view>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<simplelayout axis="x" spacing="50"/>
							</view>
						</tabelement>
						<tabelement text="Delete Number">
							<view valign="top">
								<view width="500">
									<text multiline="true" width="400">
										<b>Delete a number from an account !</b><br/><br/>
									</text>
									<text multiline="true" width="400" height="230" id="delnumberdata"/>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<view align="left" width="300">
									<text multiline="true" width="150">
										<b>Number Details:</b><br/><br/>
									</text>
									<view layout="axis:x" align="right">
										<text valign="middle">Account Id:</text>
										<edittext id="delaccountid" width="250"/>
									</view>
									<view layout="axis:x" align="right">
										<text valign="middle">Number: </text>
										<edittext id="delnumber" width="250"/>
									</view>
									<text multiline="true">
										<br/>
									</text>
									<text multiline="true">
										<br/>
									</text>
									<view layout="axis:x" align="left">
										<button isdefault="true">Delete number
											<handler name="onclick">
												canvas.delNumber(
												delnumber.getValue(),
												delaccountid.getValue()
												);
											</handler>
										</button>
									</view>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<simplelayout axis="x" spacing="50"/>
							</view>
						</tabelement>
						<tabelement text="Deactivate Account">
							<view valign="top">
								<view width="500">
									<text multiline="true" width="400">
										<b>De-activate an account !</b><br/><br/>
									</text>
									<text multiline="true" width="400" height="230" id="delaccountdata"/>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<view align="left" width="300">
									<text multiline="true" width="150">
										<b>Account Details:</b><br/><br/>
									</text>
									<view layout="axis:x" align="right">
										<text valign="middle">Account Id:</text>
										<edittext id="delaccid" width="250"/>
									</view>
									<text multiline="true">
										<br/>
									</text>
									<text multiline="true">
										<br/>
									</text>
									<view layout="axis:x" align="left">
										<button isdefault="true">Deactivate
											<handler name="onclick">
												canvas.delAccount(
												delaccid.getValue()
												);
											</handler>
										</button>
									</view>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<simplelayout axis="x" spacing="50"/>
							</view>
						</tabelement>
						<tabelement text="Reactivate Account">
							<view valign="top">
								<view width="500">
									<text multiline="true" width="400">
										<b>De-activate an account !</b><br/><br/>
									</text>
									<text multiline="true" width="400" height="230" id="undelaccountdata"/>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<view align="left" width="300">
									<text multiline="true" width="150">
										<b>Account Details:</b><br/><br/>
									</text>
									<view layout="axis:x" align="right">
										<text valign="middle">Account Id:</text>
										<edittext id="undelaccid" width="250"/>
									</view>
									<text multiline="true">
										<br/>
									</text>
									<text multiline="true">
										<br/>
									</text>
									<view layout="axis:x" align="left">
										<button isdefault="true">Re-Activate account
											<handler name="onclick">
												canvas.undelAccount(
													undelaccid.getValue()
												);
											</handler>
										</button>
									</view>
									<simplelayout axis="y" spacing="5"/>		                    
								</view>
								<simplelayout axis="x" spacing="50"/>
							</view>
						</tabelement>
					</tabslider>
				</tabpane>
				<tabpane bgcolor="#FFFFFF" width="${parent.width}" height="${parent.height}">SIP
					<simplelayout axis="y" spacing="5"/>
					<view width="${parent.width-20}">	
						<view layout="axis:x" align="left">
							<text fontstyle="bold"><font color="#FF0000">RED</font> = credit warning</text>
						</view>
						<view layout="axis:x" align="center">
							<text fontstyle="bold"><font color="#0000FF">- sip accounts -</font></text>
						</view>
						<view layout="axis:x" align="right">
							<edittext id="sipsearch" width="150"/>
							<button isdefault="true">Search
								<handler name="onclick">
									canvas.searchSip(sipsearch.getValue());
								</handler>
							</button> 
							<simplelayout axis="x" spacing="5"/>
						</view>
					</view>
					<grid id="sipaccounts" width="${parent.width-20}" height="${parent.height-80}" bgcolor0="$once{whitecolors.basecolor}" datapath="sipaccountsDS:/dbdata" sizetoheader="false">
                                                <handler name="ondata">
                                                        canvas.gridsip=1;
							canvas.checkGridData();
                                                </handler>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Id" datapath="id/text()" datatype="number"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Type" datapath="type/text()"/>
						<gridtext width="${parent.width/9}" editable="true" sortable="false" text="Webpwd" datapath="webpasswd/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Switch" datapath="prefered/text()" datatype="number"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Backup" datapath="backup/text()" datatype="number"/>
						<gridtext width="${parent.width/9}" editable="true" sortable="false" text="Pwd" datapath="sip_password/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Name" datapath="fullname/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="false" text="E-Mail" datapath="email/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="false" text="IP Address" datapath="ipaddr/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Id" datapath="id/text()" datatype="number"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Last Seen" datapath="lastseen/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Last Call OUT" datapath="lastcall/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Last Call IN" datapath="lastcalled/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="User Agent" datapath="useragent/text()"/>
					</grid>
				</tabpane>
				<tabpane bgcolor="#FFFFFF" width="${parent.width}" height="${parent.height}">FAX
					<simplelayout axis="y" spacing="5"/>
					<view width="100%">	
						<simplelayout axis="x" spacing="5"/>
						<view layout="axis:x" align="left">
							<text fontstyle="bold"><font color="#FF0000">RED</font> = credit warning</text>
						</view>
						<view layout="axis:x" align="center">
							<text fontstyle="bold"><font color="#0000FF">- hylafax and fax2email enabled fax accounts -</font></text>
						</view>
						<view layout="axis:x" align="right">
							<edittext id="faxsearch" width="150"/>
							<button isdefault="true">Search
								<handler name="onclick">
									canvas.searchFax(faxsearch.getValue());
								</handler>
							</button> 
							<simplelayout axis="x" spacing="5"/>
						</view>
					</view>
					<grid id="faxaccounts" width="${parent.width-20}" height="${parent.height-80}" bgcolor0="$once{whitecolors.basecolor}" datapath="faxaccountsDS:/dbdata" sizetoheader="false">
                                                <handler name="ondata">
                                                        canvas.gridfax=1;
							canvas.checkGridData();
                                                </handler>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Id" datapath="id/text()" datatype="number"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Type" datapath="type/text()"/>
						<gridtext width="${parent.width/9}" editable="true" sortable="false" text="Webpwd" datapath="webpasswd/text()"/>
						<gridtext width="${parent.width/9}" editable="true" text="Pwd" datapath="sip_password/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Name" datapath="fullname/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="false" text="E-Mail" datapath="email/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Last Fax OUT" datapath="lastcall/text()"/>
						<gridtext width="${parent.width/9}" editable="false" sortable="true" text="Last Fax IN" datapath="lastcalled/text()"/>
					</grid>
				</tabpane>
				<tabpane bgcolor="#FFFFFF" width="${parent.width}" height="${parent.height}">FWD
					<simplelayout axis="y" spacing="5"/>
					<view width="100%">	
						<simplelayout axis="x" spacing="5"/>
						<view layout="axis:x" align="left">
							<text fontstyle="bold"><font color="#FF0000">RED</font> = credit warning</text>
						</view>
						<view layout="axis:x" align="center">
							<text fontstyle="bold"><font color="#0000FF">- forwarding accounts -</font></text>
						</view>
						<view layout="axis:x" align="right">
							<edittext id="fwdsearch" width="150"/>
							<button isdefault="true">Search
								<handler name="onclick">
									canvas.searchFwd(fwdsearch.getValue());
								</handler>
							</button> 
							<simplelayout axis="x" spacing="5"/>
						</view>
					</view>
					<grid id="accounts" width="${parent.width-20}" height="${parent.height-80}" bgcolor0="$once{whitecolors.basecolor}" datapath="fwdaccountsDS:/dbdata" sizetoheader="false">
                                                <handler name="ondata">
                                                        canvas.gridfwd=1;
                                                        canvas.checkGridData();
                                                        Debug.write("fwd");
                                                </handler>
						<gridtext width="${parent.width/8}" editable="false" sortable="true" text="Id" datapath="id/text()" datatype="number"/>
						<gridtext width="${parent.width/8}" editable="false" sortable="true" text="Type" datapath="type/text()"/>
						<gridtext width="${parent.width/8}" editable="true" sortable="false" text="Webpwd" datapath="webpasswd/text()"/>
						<gridtext width="${parent.width/8}" editable="false" sortable="false" text="Eur" datapath="credit/text()" datatype="number"/>
						<gridtext width="${parent.width/8}" editable="false" sortable="true" text="Pro Account" datapath="company/text()"/>
						<gridtext width="${parent.width/8}" editable="false" sortable="false" text="Contract" datapath="contract/text()"/>
						<gridtext width="${parent.width/8}" editable="false" sortable="true" text="Name" datapath="fullname/text()"/>
						<gridtext width="${parent.width/8}" editable="true" sortable="false" text="E-Mail" datapath="email/text()"/>
					</grid>
				</tabpane>
				<tabpane bgcolor="#FFFFFF" width="${parent.width}" height="${parent.height}">Phone Numbers
					<simplelayout axis="y" spacing="5"/>
					<view width="100%">	
						<simplelayout axis="x" spacing="5"/>
						<view layout="axis:x" align="left">
							<text fontstyle="bold">Phone Numbers</text>
						</view>
						<view layout="axis:x" align="right">
							<edittext id="numbersearch" width="150"/>
							<button isdefault="true">Search
								<handler name="onclick">
									canvas.searchNumbers(numbersearch.getValue());
								</handler>
							</button> 
							<simplelayout axis="x" spacing="5"/>
						</view>
					</view>
					<grid id="numbers" width="${parent.width-20}" height="${parent.height-80}" bgcolor0="$once{whitecolors.basecolor}" datapath="numbersDS:/dbdata" sizetoheader="false">
                                                <handler name="ondata">
                                                        canvas.gridnumbers=1;
							canvas.checkGridData();
                                                </handler>
						<gridtext width="${parent.width/5}" editable="false" sortable="true" text="Id" datapath="account_id/text()" datatype="number"/>
						<gridtext width="${parent.width/5}" editable="false" sortable="true" text="Number" datapath="caller_id/text()" datatype="number"/>
						<gridtext width="${parent.width/5}" editable="false" sortable="true" text="Send Number" datapath="send_callerid/text()"/>
						<gridtext width="${parent.width/5}" editable="false" sortable="false" text="ClipName" datapath="caller_name/text()"/>
						<gridtext width="${parent.width/5}" editable="false" sortable="true" text="Type" datapath="numbertype/text()"/>
					</grid>
				</tabpane>
				<tabpane bgcolor="#FFFFFF" width="${parent.width}" height="${parent.height}">Service Numbers
					<simplelayout axis="y" spacing="5"/>
					<view width="100%">	
						<simplelayout axis="x" spacing="5"/>
						<view layout="axis:x" align="left">
							<text fontstyle="bold">Phone Numbers</text>
						</view>
						<view layout="axis:x" align="right">
							<edittext id="servicenumbersearch" width="150"/>
							<button isdefault="true">Search
								<handler name="onclick">
									canvas.searchserviceNumbers(servicenumbersearch.getValue());
								</handler>
							</button> 
							<simplelayout axis="x" spacing="5"/>
						</view>
					</view>
					<grid id="servicenumbers" width="${parent.width-20}" height="${parent.height-80}" bgcolor0="$once{whitecolors.basecolor}" datapath="servicenumbersDS:/dbdata" sizetoheader="false">
                                                <handler name="ondata">
							canvas.gridservicenumbers=1;
							canvas.checkGridData();
                                                </handler>
						<gridtext width="${parent.width/3}" editable="false" sortable="true" text="Id" datapath="account_id/text()" datatype="number"/>
						<gridtext width="${parent.width/3}" editable="false" sortable="true" text="Number" datapath="servicenr/text()" datatype="number"/>
						<gridtext width="${parent.width/3}" editable="false" sortable="true" text="Mapped To Number" datapath="callerid/text()" datatype="number"/>
					</grid>
				</tabpane>
			</tabs>
		</view>
		<simplelayout axis="y" spacing="5"/>
	</view>
</canvas>

Cross References

Includes

Named Instances