| Server IP : 27.254.152.13 / Your IP : 216.73.217.38 Web Server : Apache/2 System : Linux ns1-252017.dragonhispeed.com 5.2.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64 User : coloflew ( 1072) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/coloflew/.trash/files/fulltion.co.th/public_html/parcel/administrator/js/ |
Upload File : |
function checkpageposition(){
var PositionName = $('#PositionName').val();
PositionName = trimAllSpace(PositionName);
if(!PositionName.length){
alert("โปรดกรอก ชื่อตำแหน่ง");
$('#PositionName').focus();
return false;
}
}
function checkpagedepartment(){
var DepartmentName = $('#DepartmentName').val();
DepartmentName = trimAllSpace(DepartmentName);
if(!DepartmentName.length){
alert("โปรดกรอก ชื่อแผนก");
$('#DepartmentName').focus();
return false;
}
}
function checkpagegeo(){
var GEO_NAME = $('#GEO_NAME').val();
GEO_NAME = trimAllSpace(GEO_NAME);
if(!GEO_NAME.length){
alert("โปรดกรอก ชื่อภาค");
$('#GEO_NAME').focus();
return false;
}
}
function checkpageprovince(){
var PROVINCE_CODE = $('#PROVINCE_CODE').val();
PROVINCE_CODE = trimAllSpace(PROVINCE_CODE);
if(!PROVINCE_CODE.length){
alert("โปรดกรอก รหัสจังหวัด");
$('#PROVINCE_CODE').focus();
return false;
}
var PROVINCE_NAME = $('#PROVINCE_NAME').val();
PROVINCE_NAME = trimAllSpace(PROVINCE_NAME);
if(!PROVINCE_NAME.length){
alert("โปรดกรอก ชื่อจังหวัด");
$('#PROVINCE_NAME').focus();
return false;
}
}
function checkpagedistrict(){
var AMPHUR_CODE = $('#AMPHUR_CODE').val();
AMPHUR_CODE = trimAllSpace(AMPHUR_CODE);
if(!AMPHUR_CODE.length){
alert("โปรดกรอก รหัสอำเภอ");
$('#AMPHUR_CODE').focus();
return false;
}
var AMPHUR_NAME = $('#AMPHUR_NAME').val();
AMPHUR_NAME = trimAllSpace(AMPHUR_NAME);
if(!AMPHUR_NAME.length){
alert("โปรดกรอก ชื่ออำเภอ");
$('#AMPHUR_NAME').focus();
return false;
}
}
function checkpagedeliverypoint(){
var DeliveryPointCode = $('#DeliveryPointCode').val();
DeliveryPointCode = trimAllSpace(DeliveryPointCode);
if(!DeliveryPointCode.length){
alert("โปรดกรอก รหัสสาขา");
$('#DeliveryPointCode').focus();
return false;
}
var DeliveryPointName = $('#DeliveryPointName').val();
DeliveryPointName = trimAllSpace(DeliveryPointName);
if(!DeliveryPointName.length){
alert("โปรดกรอก ชื่อสาขา");
$('#DeliveryPointName').focus();
return false;
}
var DeliveryPointPostCode = $('#DeliveryPointPostCode').val();
DeliveryPointPostCode = trimAllSpace(DeliveryPointPostCode);
if(!DeliveryPointPostCode.length){
alert("โปรดกรอก รหัสไปรษณีย์");
$('#DeliveryPointPostCode').focus();
return false;
}
var DeliveryPointPhone = $('#DeliveryPointPhone').val();
DeliveryPointPhone = trimAllSpace(DeliveryPointPhone);
if(!DeliveryPointPhone.length){
alert("โปรดกรอก เบอร์โทรศัพท์");
$('#DeliveryPointPhone').focus();
return false;
}
}
function checkpagebusinesstype(){
var BusinessTypeName = $('#BusinessTypeName').val();
BusinessTypeName = trimAllSpace(BusinessTypeName);
if(!BusinessTypeName.length){
alert("โปรดกรอก ประเภทธุรกิจ");
$('#BusinessTypeName').focus();
return false;
}
}
function checkpagecustomertype(){
var CustomerTypeName = $('#CustomerTypeName').val();
CustomerTypeName = trimAllSpace(CustomerTypeName);
if(!CustomerTypeName.length){
alert("โปรดกรอก ประเภทลูกค้า");
$('#CustomerTypeName').focus();
return false;
}
var CustomerTypeDiscount = $('#CustomerTypeDiscount').val();
if(!IsNumeric(CustomerTypeDiscount)){
alert("โปรดกรอก ส่วนลด เป็นตัวเลข");
$('#CustomerTypeDiscount').focus();
return false;
}
CustomerTypeDiscount = trimAllSpace(CustomerTypeDiscount);
if(!CustomerTypeDiscount.length){
alert("โปรดกรอก ส่วนลด");
$('#CustomerTypeDiscount').focus();
return false;
}
}
function checkpageproducttype(){
var ProductTypeName = $('#ProductTypeName').val();
ProductTypeName = trimAllSpace(ProductTypeName);
if(!ProductTypeName.length){
alert("โปรดกรอก ประเภทสินค้า");
$('#ProductTypeName').focus();
return false;
}
}
function checkpagebustype(){
var BusTypeName = $('#BusTypeName').val();
BusTypeName = trimAllSpace(BusTypeName);
if(!BusTypeName.length){
alert("โปรดกรอก ประเภทรถ");
$('#BusTypeName').focus();
return false;
}
}
function checkpageroute(){
var RouteCode = $('#RouteCode').val();
RouteCode = trimAllSpace(RouteCode);
if(!RouteCode.length){
alert("โปรดกรอก รหัสเส้นทาง");
$('#RouteCode').focus();
return false;
}
var RouteName = $('#RouteName').val();
RouteName = trimAllSpace(RouteName);
if(!RouteName.length){
alert("โปรดกรอก ชื่อเส้นทาง");
$('#RouteName').focus();
return false;
}
}
function checkpagepoint(){
var PointSequence = $('#PointSequence').val();
if(!IsNumeric(PointSequence)){
alert("โปรดกรอก ลำดับ เป็นตัวเลข");
$('#PointSequence').focus();
return false;
}
PointSequence = trimAllSpace(PointSequence);
if(!PointSequence.length){
alert("โปรดกรอก ลำดับ");
$('#PointSequence').focus();
return false;
}
var PointPeriodic = $('#PointPeriodic').val();
if(!IsNumeric(PointPeriodic)){
alert("โปรดกรอก ระยะทาง เป็นตัวเลข");
$('#PointPeriodic').focus();
return false;
}
PointPeriodic = trimAllSpace(PointPeriodic);
if(!PointPeriodic.length){
alert("โปรดกรอก ระยะทาง");
$('#PointPeriodic').focus();
return false;
}
}
function checkpagecommission(){
var CommissionName = $('#CommissionName').val();
CommissionName = trimAllSpace(CommissionName);
if(!CommissionName.length){
alert("โปรดกรอก ชื่อค่าคอมมิชชั่น");
$('#CommissionName').focus();
return false;
}
}
function checkpagesutupsize(){
var SetupSizeMin = $('#SetupSizeMin').val();
if(!IsNumeric(SetupSizeMin)){
alert("โปรดกรอก ปริมาณต่ำสุด เป็นตัวเลข" );
$('#SetupSizeMin').focus();
return false;
}
SetupSizeMin = trimAllSpace(SetupSizeMin);
if(!SetupSizeMin.length){
alert("โปรดกรอก ปริมาณต่ำสุด");
$('#SetupSizeMin').focus();
return false;
}
var SetupSizeMax = $('#SetupSizeMax').val();
if(!IsNumeric(SetupSizeMax)){
alert("โปรดกรอก ปริมาณสูงสุด เป็นตัวเลข");
$('#SetupSizeMax').focus();
return false;
}
SetupSizeMax = trimAllSpace(SetupSizeMax);
if(!SetupSizeMax.length){
alert("โปรดกรอก ปริมาณสูงสุด");
$('#SetupSizeMax').focus();
return false;
}
var SetupSizeSize = $('#SetupSizeSize').val();
SetupSizeSize = trimAllSpace(SetupSizeSize);
if(!SetupSizeSize.length){
alert("โปรดกรอก ชื่อขนาด");
$('#SetupSizeSize').focus();
return false;
}
var SetupSizePrice = $('#SetupSizePrice').val();
if(!IsNumeric(SetupSizePrice)){
alert("โปรดกรอก ราคา เป็นตัวเลข");
$('#SetupSizePrice').focus();
return false;
}
SetupSizePrice = trimAllSpace(SetupSizePrice);
if(!SetupSizePrice.length){
alert("โปรดกรอก ราคา");
$('#SetupSizePrice').focus();
return false;
}
}
function checkpagebus(){
var BusPlate = $('#BusPlate').val();
BusPlate = trimAllSpace(BusPlate);
if(!BusPlate.length){
alert("โปรดกรอก ทะเบียนรถ");
$('#BusPlate').focus();
return false;
}
var BusName = $('#BusName').val();
BusName = trimAllSpace(BusName);
if(!BusName.length){
alert("โปรดกรอก หมายเลขรถ");
$('#BusName').focus();
return false;
}
var BusBrand = $('#BusBrand').val();
BusBrand = trimAllSpace(BusBrand);
if(!BusBrand.length){
alert("โปรดกรอก รุ่นรถ");
$('#BusBrand').focus();
return false;
}
var BusModel = $('#BusModel').val();
BusModel = trimAllSpace(BusModel);
if(!BusModel.length){
alert("โปรดกรอก พรบ.");
$('#BusModel').focus();
return false;
}
var BusContract = $('#BusContract').val();
BusContract = trimAllSpace(BusContract);
if(!BusContract.length){
alert("โปรดกรอก ประกัน");
$('#BusContract').focus();
return false;
}
var BusSeat = $('#BusSeat').val();
if(!IsNumeric(BusSeat)){
alert("โปรดกรอก ปริมาตร เป็นตัวเลข");
$('#BusSeat').focus();
return false;
}
BusSeat = trimAllSpace(BusSeat);
if(!BusSeat.length){
alert("โปรดกรอก ปริมาตร");
$('#BusSeat').focus();
return false;
}
}
function checkpagelanguage_value(){
var name = $('#name').val();
name = trimAllSpace(name);
if(!name.length){
alert("โปรดกรอก ชื่อ");
$('#name').focus();
return false;
}
var value = $('#value').val();
value = trimAllSpace(value);
if(!value.length){
alert("โปรดกรอก ข้อความ");
$('#value').focus();
return false;
}
}
function checkpagelanguage(){
var name = $('#name').val();
name = trimAllSpace(name);
if(!name.length){
alert("โปรดกรอก ชื่อ");
$('#name').focus();
return false;
}
var lang_code = $('#lang_code').val();
lang_code = trimAllSpace(lang_code);
if(!lang_code.length){
alert("โปรดกรอก รหัสภาษา");
$('#lang_code').focus();
return false;
}
}
function checkpageusergroup(){
var menu_group = $('#menu_group').val();
menu_group = trimAllSpace(menu_group);
if(!menu_group.length){
alert("โปรดกรอก ชื่อกลุ่ม");
$('#menu_group').focus();
return false;
}
}
function checkpageemployee(){
var EmpName = $('#EmpName').val();
EmpName = trimAllSpace(EmpName);
if(!EmpName.length){
alert("โปรดกรอก ชื่อพนักงาน");
$('#EmpName').focus();
return false;
}
var EmpCode = $('#EmpCode').val();
EmpCode = trimAllSpace(EmpCode);
if(!EmpCode.length){
alert("โปรดกรอก รหัสพนักงาน");
$('#EmpCode').focus();
return false;
}
var EmpIdentification = $('#EmpIdentification').val();
if(!IsNumeric(EmpIdentification)){
alert("โปรดกรอก รหัสบัตรประชาชนพนักงาน");
$('#EmpIdentification').focus();
return false;
}
EmpIdentification = trimAllSpace(EmpIdentification);
if(!EmpIdentification.length){
alert("โปรดกรอก รหัสบัตรประชาชน");
$('#EmpIdentification').focus();
return false;
}
if(EmpIdentification.length != 13){
alert("โปรดกรอก รหัสบัตรประชาชน ให้ครบ 13 หลัก");
$('#EmpIdentification').focus();
return false;
}
for(i=0,sum=0;i<12;i++)
{
sum += parseFloat(EmpIdentification.charAt(i))*(13-i);
}
if((11-sum%11)%10 != parseFloat(EmpIdentification.charAt(12)))
{
alert("โปรดกรอก รหัสบัตรประชาชน ให้ถูกต้อง");
$('#EmpIdentification').focus();
return false;
}
var BusTypeID = $('#BusTypeID').val();
if(BusTypeID != 0){
var EmpDriverLicense = $('#EmpDriverLicense').val();
EmpDriverLicense = trimAllSpace(EmpDriverLicense);
if(!EmpDriverLicense.length){
alert("โปรดกรอก รหัสใบขับขี่");
$('#EmpDriverLicense').focus();
return false;
}
}
}
function checkpagecustomer(){
/*var CustomerIdentification = $('#CustomerIdentification').val();
if(!IsNumeric(CustomerIdentification)){
alert("โปรดกรอก รหัสบัตรประชาชน เป็นตัวเลข");
$('#CustomerIdentification').focus();
return false;
}
CustomerIdentification = trimAllSpace(CustomerIdentification);
if(!CustomerIdentification.length){
alert("โปรดกรอก รหัสบัตรประชาชน");
$('#CustomerIdentification').focus();
return false;
}
if(CustomerIdentification.length != 13){
alert("โปรดกรอก รหัสบัตรประชาชน ให้ครบ 13 หลัก");
$('#CustomerIdentification').focus();
return false;
}
for(i=0,sum=0;i<12;i++)
{
sum += parseFloat(CustomerIdentification.charAt(i))*(13-i);
}
if((11-sum%11)%10 != parseFloat(CustomerIdentification.charAt(12)))
{
alert("โปรดกรอก รหัสบัตรประชาชน ให้ถูกต้อง");
$('#CustomerIdentification').focus();
return false;
}*/
var CustomerName = $('#CustomerName').val();
CustomerName = trimAllSpace(CustomerName);
if(!CustomerName.length){
alert("โปรดกรอก ชื่อลูกค้า");
$('#CustomerName').focus();
return false;
}
/*var CustomerSurName = $('#CustomerSurName').val();
CustomerSurName = trimAllSpace(CustomerSurName);
if(!CustomerSurName.length){
alert("โปรดกรอก นามสกุลลูกค้า");
$('#CustomerSurName').focus();
return false;
}*/
var CustomerPhon = $('#CustomerPhon').val();
if(!IsNumeric(CustomerPhon)){
alert("โปรดกรอก เบอร์โทรศัพท์");
$('#CustomerPhon').focus();
return false;
}
if(CustomerPhon.length != 10){
alert("โปรดกรอก เบอร์โทรศัพท์ 10 หลัก");
$('#CustomerPhon').focus();
return false;
}
}
function checkpagesupplyinstepone(setpoint){
var SendName = $('#SendName').val();
SendName = trimAllSpace(SendName);
if(!SendName.length){
alert("โปรดกรอก ชื่อผู้ส่ง");
$('#SendName').focus();
return false;
}
/*var SendSurName = $('#SendSurName').val();
SendSurName = trimAllSpace(SendSurName);
if(!SendSurName.length){
alert("โปรดกรอก นามสกุลผู้ส่ง");
$('#SendSurName').focus();
return false;
}*/
/*var SendIdentification = $('#SendIdentification').val();
if(!IsNumeric(SendIdentification)){
alert("โปรดกรอก รหัสบัตรประชาชนผู้ส่ง เป็นตัวเลข");
$('#SendIdentification').focus();
return false;
}
SendIdentification = trimAllSpace(SendIdentification);
if(!SendIdentification.length){
alert("โปรดกรอก รหัสบัตรประชาชนผู้ส่ง");
$('#SendIdentification').focus();
return false;
}
if(SendIdentification.length != 13){
alert("โปรดกรอก รหัสบัตรประชาชน ให้ครบ 13 หลัก");
$('#SendIdentification').focus();
return false;
}
for(i=0,sum=0;i<12;i++)
{
sum += parseFloat(SendIdentification.charAt(i))*(13-i);
}
if((11-sum%11)%10 != parseFloat(SendIdentification.charAt(12)))
{
alert("โปรดกรอก รหัสบัตรประชาชนให้ถูกต้อง");
$('#SendIdentification').focus();
return false;
}*/
var SendTel = $('#SendTel').val();
if(!IsNumeric(SendTel)){
alert("โปรดกรอก เบอร์โทรศัพท์ผู้ส่ง");
$('#SendTel').focus();
return false;
}
if(SendTel.length != 10){
alert("โปรดกรอก เบอร์โทรศัพท์ผู้ส่ง 10 หลัก");
$('#SendTel').focus();
return false;
}
var mybrowser=navigator.userAgent;
if(mybrowser.indexOf('MSIE')>0)
{ var l = 1; }
else if(mybrowser.indexOf('Firefox')>0)
{ var l = 1; }
else if(mybrowser.indexOf('Presto')>0)
{ }
else if(mybrowser.indexOf('Chrome')>0)
{ var l = 0; }
var startPoint = $("#StartPoint").val();
if(startPoint==0){
alert("กรุณาเลือกต้นทางที่ต้องการส่งพัสดุ");
$('#StartPoint').focus();
return false;
}
//check start match end point
/*var endpointtotle = document.forms["formss"].elements["EndPoint[]"];
for(k=0;k<=endpointtotle.length-1;k++){
var endpointtotlecheck = endpointtotle[k+l].value;
if(endpointtotlecheck){
if(endpointtotlecheck == 0){
alert("กรุณาเลือกเส้นทางให้ถูกต้อง");
return false;
}
if(endpointtotlecheck == setpoint){
alert("ปลายทางไม่สามารถเป็นที่เดียวกับต้นทางได้");
return false;
}
}
}*/
var endpointProvinceRoute = document.forms["formss"].elements["ProvinceRoute[]"];
for(k=0;k<=endpointProvinceRoute.length-1;k++){
var endpointProvinceRoutecheck = endpointProvinceRoute[k+l].value;
if(endpointProvinceRoutecheck){
if(endpointProvinceRoutecheck == 0){
alert("กรุณาเลือกเส้นทางให้ถูกต้อง");
return false;
}
}
}
}
function checkpagesupplyinstepend(i){
for(var j = 1 ; j<=i ; j++){
var ReceiveName = $('#ReceiveName_'+j).val();
ReceiveName = trimAllSpace(ReceiveName);
if(!ReceiveName.length){
alert("โปรดกรอกชื่อผู้รับให้ครบ");
$('#ReceiveName_'+j).focus();
return false;
}
/*var ReceiveSurName = $('#ReceiveSurName_'+j).val();
ReceiveSurName = trimAllSpace(ReceiveSurName);
if(!ReceiveSurName.length){
alert("โปรดกรอกนามสกุลผู้รับให้ครบ");
$('#ReceiveSurName_'+j).focus();
return false;
}*/
/*var ReceiveIdentification = $('#ReceiveIdentification_'+j).val();
if(!IsNumeric(ReceiveIdentification)){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับ เป็นตัวเลข");
$('#ReceiveIdentification_'+j).focus();
return false;
}
ReceiveIdentification = trimAllSpace(ReceiveIdentification);
if(!ReceiveIdentification.length){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับ");
$('#ReceiveIdentification_'+j).focus();
return false;
}
if(ReceiveIdentification.length != 13){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับ ให้ครบ 13 หลัก");
$('#ReceiveIdentification_'+j).focus();
return false;
}*/
var ReceiveTel = $('#ReceiveTel_'+j).val();
if(!IsNumeric(ReceiveTel)){
alert("โปรดกรอก เบอร์โทรศัพท์ เป็นตัวเลข");
$('#ReceiveTel_'+j).focus();
return false;
}
if(ReceiveTel.length != 10){
alert("โปรดกรอก เบอร์โทรศัพท์ 10 หลัก");
$('#ReceiveTel_'+j).focus();
return false;
}
var CheckDalivary = $('#CheckDalivary_'+j).val();
if(CheckDalivary == 1){
var Villa = $('#Villa_'+j).val();
Villa = trimAllSpace(Villa);
if(!Villa.length){
alert("โปรดกรอก ชื่อหมู่บ้าน");
$('#Villa_'+j).focus();
return false;
}
var Room = $('#Room_'+j).val();
Room = trimAllSpace(Room);
if(!Room.length){
alert("โปรดกรอก ชื่อห้อง");
$('#Room_'+j).focus();
return false;
}
var Floor = $('#Floor_'+j).val();
Floor = trimAllSpace(Floor);
if(!Floor.length){
alert("โปรดกรอก ชั้น");
$('#Floor_'+j).focus();
return false;
}
var Home = $('#Home_'+j).val();
Home = trimAllSpace(Home);
if(!Home.length){
alert("โปรดกรอก บ้านเลขที่");
$('#Home_'+j).focus();
return false;
}
var Muu = $('#Muu_'+j).val();
Muu = trimAllSpace(Muu);
if(!Muu.length){
alert("โปรดกรอก หมู่");
$('#Muu_'+j).focus();
return false;
}
var Zoy = $('#Zoy_'+j).val();
Zoy = trimAllSpace(Zoy);
if(!Zoy.length){
alert("โปรดกรอก ซอย");
$('#Zoy_'+j).focus();
return false;
}
var Rode = $('#Rode_'+j).val();
Rode = trimAllSpace(Rode);
if(!Rode.length){
alert("โปรดกรอก ถนน");
$('#Rode_'+j).focus();
return false;
}
var ReceiveTambon = $('#ReceiveTambon_'+j).val();
ReceiveTambon = trimAllSpace(ReceiveTambon);
if(!ReceiveTambon.length){
alert("โปรดกรอก ตำบล");
$('#ReceiveTambon_'+j).focus();
return false;
}
var ReceivePostCode = $('#ReceivePostCode_'+j).val();
if(!IsNumeric(ReceivePostCode)){
alert("โปรดกรอก รหัสไปรษณีย์");
$('#ReceivePostCode_'+j).focus();
return false;
}
if(ReceivePostCode.length != 5){
alert("โปรดกรอก รหัสไปรษณีย์ 5 หลัก");
$('#ReceivePostCode_'+j).focus();
return false;
}
}
/*for(k=0,sum=0;k<12;k++)
{
sum += parseFloat(ReceiveIdentification.charAt(k))*(13-k);
}
if((11-sum%11)%10 != parseFloat(ReceiveIdentification.charAt(12)))
{
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับ ให้ถูกต้อง");
$('#ReceiveIdentification_'+j).focus();
return false;
}*/
/*for(k=1;k<=Saleper.length-1;k++){
Salepercheck = Saleper[k].value;
Salepercheck = trimAllSpace(Salepercheck);
if(parseInt(Salepercheck) > 100){
alert("โปรดกรอก ส่วนลดต่ำกว่า 100%");
Saleper[k].focus();
return false;
}
}*/
var Saleper = document.forms["fromend"].elements["Saleper_"+j+"[]"];
for(k=1;k<=Saleper.length-1;k++){
Salepercheck = Saleper[k].value;
Salepercheck = trimAllSpace(Salepercheck);
if(parseInt(Salepercheck) > 100){
alert("โปรดกรอก ส่วนลดต่ำกว่า 100%");
Saleper[k].focus();
return false;
}
}
var totalmoney = document.forms["fromend"].elements["totalmoney_"+j+"[]"];
for(k=1;k<=totalmoney.length-1;k++){
totalmoneycheck = totalmoney[k].value;
totalmoneycheck = trimAllSpace(totalmoneycheck);
if(!totalmoneycheck.length){
alert("โปรดกรอก จำนวนเงินเป็นตัวเลข");
totalmoney[k].focus();
return false;
}
}
}
}
function checkpagesupplyout(){
var CheckAgent = $('#CheckAgent').val();
var ReceiveName = $('#ReceiveName').val();
ReceiveName = trimAllSpace(ReceiveName);
if(!ReceiveName.length){
alert("โปรดกรอก ชื่อผู้รับ");
$('#ReceiveName').focus();
return false;
}
/*var ReceiveSurName = $('#ReceiveSurName').val();
ReceiveSurName = trimAllSpace(ReceiveSurName);
if(!ReceiveSurName.length){
alert("โปรดกรอก นามสกุลผู้รับ");
$('#ReceiveSurName').focus();
return false;
}*/
/*var ReceiveIdentification = $('#ReceiveIdentification').val();
if(!IsNumeric(ReceiveIdentification)){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับ เป็นตัวเลข");
$('#ReceiveIdentification').focus();
return false;
}
ReceiveIdentification = trimAllSpace(ReceiveIdentification);
if(!ReceiveIdentification.length){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับ ");
$('#ReceiveIdentification').focus();
return false;
}
if(ReceiveIdentification.length != 13){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับ ให้ครบ 13 หลัก");
$('#ReceiveIdentification').focus();
return false;
}
for(i=0,sum=0;i<12;i++)
{
sum += parseFloat(ReceiveIdentification.charAt(i))*(13-i);
}
if((11-sum%11)%10 != parseFloat(ReceiveIdentification.charAt(12)))
{
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับ ให้ถูกต้อง");
$('#ReceiveIdentification').focus();
return false;
}*/
if(CheckAgent == 1){
var ReceiveAgentName = $('#ReceiveAgentName').val();
ReceiveAgentName = trimAllSpace(ReceiveAgentName);
if(!ReceiveAgentName.length){
alert("โปรดกรอก ชื่อผู้รับแทน");
$('#ReceiveAgentName').focus();
return false;
}
var ReceiveAgentSurName = $('#ReceiveAgentSurName').val();
ReceiveAgentSurName = trimAllSpace(ReceiveAgentSurName);
if(!ReceiveAgentSurName.length){
alert("โปรดกรอก นามสกุลผู้รับแทน");
$('#ReceiveAgentSurName').focus();
return false;
}
/*var ReceiveAgentIdentification = $('#ReceiveAgentIdentification').val();
if(!IsNumeric(ReceiveAgentIdentification)){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับแทน เป็นตัวเลข");
$('#ReceiveAgentIdentification').focus();
return false;
}
ReceiveAgentIdentification = trimAllSpace(ReceiveAgentIdentification);
if(!ReceiveAgentIdentification.length){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับแทน");
$('#ReceiveAgentIdentification').focus();
return false;
}
if(ReceiveIdentification.length != 13){
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับแทน ให้ครบ 13 หลัก");
$('#ReceiveAgentIdentification').focus();
return false;
}
for(i=0,sum=0;i<12;i++)
{
sum += parseFloat(ReceiveAgentIdentification.charAt(i))*(13-i);
}
if((11-sum%11)%10 != parseFloat(ReceiveAgentIdentification.charAt(12)))
{
alert("โปรดกรอก รหัสบัตรประชาชนผู้รับแทน ให้ถูกต้อง");
$('#ReceiveAgentIdentification').focus();
return false;
}*/
}
}