|
|
|
|
@ -83,7 +83,7 @@
|
|
|
|
|
array("type"=>"hidden","name"=>"txt_childspassenger"),
|
|
|
|
|
array("type"=>"hidden","name"=>"txt_modifcount"),
|
|
|
|
|
array("type"=>"combo","name"=>"cbo_idship","label"=>"Ship Name","required"=>"true","info"=>"true","inputWidth"=>"280","value"=>"0",
|
|
|
|
|
"tooltip"=>"Pilih Ship Name first. Thank You","validate"=>"NotEmpty","maxLength"=>"11","className"=>"txtleft"),
|
|
|
|
|
"tooltip"=>"Choice Ship Name first. Thank You","validate"=>"NotEmpty","maxLength"=>"11","className"=>"txtleft"),
|
|
|
|
|
array("type"=>"input","name"=>"txt_tiketnumber","label"=>"Ticket Number","required"=>"true","info"=>"true","inputWidth"=>"280","value"=>"","readonly"=>"true",
|
|
|
|
|
"tooltip"=>"Insert Ticket Number first. Thank You","validate"=>"NotEmpty","maxLength"=>"40","className"=>"txtcenter txttiketnumber"),
|
|
|
|
|
array("type"=>"input","name"=>"txt_voynumber","label"=>"Voyage Number","required"=>"true","info"=>"true","inputWidth"=>"280","value"=>"",
|
|
|
|
|
@ -105,13 +105,15 @@
|
|
|
|
|
"tooltip"=>"Insert Years Of Birthdate . Thank You","validate"=>"NotEmpty","maxLength"=>"4","className"=>"txtcenter","note"=>array("text"=>"ex : 1987")),
|
|
|
|
|
array("type"=>"newcolumn"),
|
|
|
|
|
array("type"=>"combo","name"=>"cbo_bodmonth","label"=>"","required"=>"true","info"=>"true","inputWidth"=>"90","value"=>"",
|
|
|
|
|
"tooltip"=>"Pilih ID Card first. Thank You","validate"=>"NotEmpty","maxLength"=>"","className"=>"besidetxtyears txtcenter","note"=>array("text"=>"ex : January")),
|
|
|
|
|
"tooltip"=>"Choice Month Of Birthdate. Thank You","validate"=>"NotEmpty","maxLength"=>"","className"=>"besidetxtyears txtcenter","note"=>array("text"=>"ex : January")),
|
|
|
|
|
array("type"=>"newcolumn"),
|
|
|
|
|
array("type"=>"combo","name"=>"cbo_bodday","label"=>"","required"=>"true","info"=>"true","inputWidth"=>"60","value"=>"",
|
|
|
|
|
"tooltip"=>"Pilih ID Card first. Thank You","validate"=>"NotEmpty","maxLength"=>"","className"=>"besidecbobodmonth txtcenter","note"=>array("text"=>"ex : 31")),
|
|
|
|
|
"tooltip"=>"Choice Day of Birthdate. Thank You","validate"=>"NotEmpty","maxLength"=>"","className"=>"besidecbobodmonth txtcenter","note"=>array("text"=>"ex : 31")),
|
|
|
|
|
|
|
|
|
|
array("type"=>"combo","name"=>"cbo_passengertype","label"=>"Passenger Type","required"=>"true","info"=>"true","inputWidth"=>"90","value"=>"0",
|
|
|
|
|
"tooltip"=>"Choice Passenger Type. Thank You","validate"=>"NotEmpty","maxLength"=>"11","className"=>"txtleft"),
|
|
|
|
|
array("type"=>"combo","name"=>"cbo_idcardtype","label"=>"ID Card","required"=>"true","info"=>"true","inputWidth"=>"90","value"=>"0",
|
|
|
|
|
"tooltip"=>"Pilih ID Card first. Thank You","validate"=>"NotEmpty","maxLength"=>"11","className"=>"txtleft"),
|
|
|
|
|
"tooltip"=>"Choice ID Card first. Thank You","validate"=>"NotEmpty","maxLength"=>"11","className"=>"txtleft"),
|
|
|
|
|
array("type"=>"newColumn"),
|
|
|
|
|
array("type"=>"input","name"=>"txt_cardnumber","label"=>"","required"=>"true","info"=>"true","inputWidth"=>"160","value"=>"",
|
|
|
|
|
"tooltip"=>"Insert Picture first. Thank You","validate"=>"NotEmpty","maxLength"=>"100","className"=>"txtleft besidecboidcard",
|
|
|
|
|
@ -125,11 +127,11 @@
|
|
|
|
|
array("type"=>"calendar","name"=>"txt_dates","label"=>"Dates","required"=>"true","info"=>"true","inputWidth"=>"90","readonly"=>"true","value"=>date("Y-m-d"),
|
|
|
|
|
"tooltip"=>"Insert Dates first. Thank You","validate"=>"NotEmpty","maxLength"=>"","className"=>"txtcenter","dateFormat"=>"%Y-%m-%d"),
|
|
|
|
|
array("type"=>"combo","name"=>"cbo_idroutestart","label"=>"From","required"=>"true","info"=>"true","inputWidth"=>"90","value"=>"0",
|
|
|
|
|
"tooltip"=>"Pilih From first. Thank You","validate"=>"NotEmpty","maxLength"=>"6","className"=>"txtcenter"),
|
|
|
|
|
"tooltip"=>"Choice From first. Thank You","validate"=>"NotEmpty","maxLength"=>"6","className"=>"txtcenter"),
|
|
|
|
|
array("type"=>"newColumn"),
|
|
|
|
|
array("type"=>"label","name"=>"lblmeter","label"=>"to","className"=>"besidelabel"),
|
|
|
|
|
array("type"=>"combo","name"=>"cbo_idrouteend","label"=>"","required"=>"true","info"=>"true","inputWidth"=>"90","value"=>"0",
|
|
|
|
|
"tooltip"=>"Pilih To first. Thank You","validate"=>"NotEmpty","maxLength"=>"6","className"=>"txtcenter besidecbofrom"),
|
|
|
|
|
"tooltip"=>"Choice To first. Thank You","validate"=>"NotEmpty","maxLength"=>"6","className"=>"txtcenter besidecbofrom"),
|
|
|
|
|
// array("type"=>"input","name"=>"txt_seatnumber","label"=>"Seat Number","required"=>"true","info"=>"true","inputWidth"=>"90","value"=>"","readonly"=>"true",
|
|
|
|
|
// "tooltip"=>"Insert Seat Number first. Thank You","validate"=>"NotEmpty","maxLength"=>"30","className"=>"txtcenter txtseatnumber"),
|
|
|
|
|
// array("type"=>"newColumn"),
|
|
|
|
|
@ -198,6 +200,11 @@
|
|
|
|
|
}
|
|
|
|
|
$this->FN_COMBOVALIDATIONVALUEARRAY("myForm","cbo_bodday",$arrval);
|
|
|
|
|
|
|
|
|
|
$arrval=array();
|
|
|
|
|
array_push($arrval,array("value"=>"General","text"=>"General"),
|
|
|
|
|
array("value"=>"VIP","text"=>"VIP")
|
|
|
|
|
);
|
|
|
|
|
$this->FN_COMBOVALIDATIONVALUEARRAY("myForm","cbo_passengertype",$arrval);
|
|
|
|
|
$mycontainerpic="var divpicture=document.createElement('DIV');";
|
|
|
|
|
$mycontainerpic.="divpicture.id='divpicture';divpicture.style.height='100%';";
|
|
|
|
|
$mycontainerpic.="var divpicturecontent='<table id=\"tbfindinvoice\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"margin-top:0px;margin-left:-5px;\">';";
|
|
|
|
|
@ -572,6 +579,7 @@
|
|
|
|
|
}
|
|
|
|
|
// alert(sepnumber);
|
|
|
|
|
var url='?ajax=1&sec=1&option=".$this->enc("obj_tra")."&obj=".$this->enc("tra_newticket")."&task=".$this->enc("printtra")."&idtransaction='+idtransaction+'&tiketnumber='+tiketnumber;
|
|
|
|
|
console.log(url);
|
|
|
|
|
dwins=new dhtmlXWindows();
|
|
|
|
|
dwins.createWindow(\"winchild\",0,0,screen.width-400,screen.height-350);
|
|
|
|
|
dwins.window('winchild').progressOn();
|
|
|
|
|
@ -994,26 +1002,31 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function fn_printtra($idtransaction=''){
|
|
|
|
|
// echo "test";
|
|
|
|
|
date_default_timezone_set("Asia/Bangkok");
|
|
|
|
|
include("lib/mpdf/mpdf.php");
|
|
|
|
|
$top=10;
|
|
|
|
|
// $mpdf = new mPDF('c', 'A4', '', '', 5, 5, $top, 10, 3, 3, 'P');
|
|
|
|
|
$mpdf = new mPDF('utf-8', array(200,100) ,'', '', 2, 2, 2);
|
|
|
|
|
|
|
|
|
|
echo $mpdf;
|
|
|
|
|
$mpdf->SetDisplayMode('fullpage');
|
|
|
|
|
$tiketnumber=$_REQUEST['tiketnumber'];
|
|
|
|
|
$idtransaction=$_REQUEST['idtransaction'];
|
|
|
|
|
|
|
|
|
|
// // LOAD a stylesheet
|
|
|
|
|
// $stylesheet = file_get_contents('lib/mpdf/css/mpdfstyleA4.css');
|
|
|
|
|
$qry="select * from ".DB_APORTIL.".tbl_passenger_tiket where id='".$idtransaction."' and isdeleted=0";
|
|
|
|
|
// echo $qry;return false;
|
|
|
|
|
$rs=$this->selectquery($qry);
|
|
|
|
|
$rw=$this->data_row_array($rs);
|
|
|
|
|
|
|
|
|
|
// LOAD a stylesheet
|
|
|
|
|
$stylesheet = file_get_contents('lib/mpdf/css/mpdfstyleA4.css');
|
|
|
|
|
|
|
|
|
|
$html="<div style=\"position: fixed; left: 0mm; middle: -100mm; rotate: -90;\">";
|
|
|
|
|
// $html.=" <div style=\"font-size:12pt;font-weight:bold\">".str_repeat(" ",6)."$tiketnumber</div>";
|
|
|
|
|
// $html.=" <div><barcode code=\"$tiketnumber\" type=\"C39\" class=\"barcode\" size=\"1.2\"/></div>";
|
|
|
|
|
$html.=" TICKET ".$rw['shipname'];
|
|
|
|
|
$html.="</div>";
|
|
|
|
|
|
|
|
|
|
$qry="select * from ".DB_APORTIL.".tbl_passenger_tiket where id='".$_REQUEST['idtransaction']."' and isdeleted=0";
|
|
|
|
|
$rs=$this->selectquery($qry);
|
|
|
|
|
$rw=$this->data_row_array($rs);
|
|
|
|
|
// echo $html;return false;
|
|
|
|
|
$html.="<table width=\"80%\" style=\"margin-left:30px;padding-top:6px\" align=\"center\" border=\"0\">";
|
|
|
|
|
$html.="<tr><td colspan=\"6\">";
|
|
|
|
|
$html.=" <div style=\"font-size:12pt;font-weight:bold\">".str_repeat(" ",6)."$tiketnumber</div>";
|
|
|
|
|
|