 <div class="ui-layout-content ui-widget-content-panel" style="margin-top:10px"> 
					Finish dokumen? data akan masuk ke dalam laporan pemasukan dokumen <br /><br />
			<?php if($bc_prefix == '40') {   ?>		
 			 	<label class="lbfield110">Receive No</label><label class="lbcolon">:</label>
					<input id="ms_bc_in<?php echo $bc_prefix;  ?>_receive_no" name="ms_bc_in<?php echo $bc_prefix;  ?>_receive_no"  style="width:185px"   type="text" value="<?php if (array_key_exists("gn",$kurs_info)){ echo $kurs_info['gn']; } ;  ?>" /><br \>
				<label class="lbfield110">Receive Date</label><label class="lbcolon">:</label>
					<input id="ms_bc_in<?php echo $bc_prefix;  ?>_receive_date" name="ms_bc_in<?php echo $bc_prefix;  ?>_receive_date"   style="width:90px"  type="text" value="<?php if (array_key_exists("gt",$kurs_info)){ echo $kurs_info['gt']; } ;  ?>"/><br \>
			<?php } else { ?>	 
				<label class="lbfield110">Receive No</label><label class="lbcolon">:</label>
					<input id="ms_bc_in<?php echo $bc_prefix;  ?>_receive_no" name="ms_bc_in<?php echo $bc_prefix;  ?>_receive_no"  style="width:185px"   type="text" /><br \>
				 <label class="lbfield110">Receive Date</label><label class="lbcolon">:</label>
					<input id="ms_bc_in<?php echo $bc_prefix;  ?>_receive_date" name="ms_bc_in<?php echo $bc_prefix;  ?>_receive_date"   style="width:90px"  type="text" /><br \>
			<?php } ?>		
				 <label class="lbfield110">Finish Entry Date</label><label class="lbcolon">:</label>
					<input    name="ms_bc_in<?php echo $bc_prefix; ?>_finish_date" id="ms_bc_in<?php echo $bc_prefix; ?>_finish_date" style="width:90px;"  />
					Time :  <input    name="ms_bc_in<?php echo $bc_prefix; ?>_finish_time" id="ms_bc_in<?php echo $bc_prefix; ?>_finish_time" type="text" style="width:50px;text-align:right" />
					<br \>
 			 	 <label class="lbfield110">Receive NDPBM USD</label><label class="lbcolon">:</label>
					<input id="ms_bc_in<?php echo $bc_prefix;  ?>_receive_ndpbm_usd" name="ms_bc_in<?php echo $bc_prefix;  ?>_receive_ndpbm_usd"  style="text-align:right;width:90px" class="numeric"  type="text" />
 			 	 <div id="ms_bc_in<?php echo $bc_prefix;  ?>_receive_ndpbm_hdr_panel">
					<label class="lbfield110">Receive NDPBM <?php echo $kurs_info['rk'];  ?></label><label class="lbcolon">:</label>
					<input id="ms_bc_in<?php echo $bc_prefix;  ?>_receive_ndpbm_hdr" name="ms_bc_in<?php echo $bc_prefix;  ?>_receive_ndpbm_hdr"  style="text-align:right;width:90px"  class="numeric"  type="text" /><br \>
				 </div> 
</div> 
<script type="text/javascript">

    $(document).ready(function(){ 
	
		  $("input.numeric").numeric();
	 
		  $( "#ms_bc_in<?php echo $bc_prefix;  ?>_receive_date" ).datepicker({
			changeMonth: true
			,changeYear: true
			,showButtonPanel: true
			,dateFormat: 'dd/mm/yy'
			,onClose: function(dateText, inst){
					var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
					var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
					var day = $("#ui-datepicker-div .ui-datepicker-day :selected").val();
					}
			, onSelect: function (){
				$(this).focus();
			}
			}).keyup(function(e) {
				if(e.keyCode == 8 || e.keyCode == 46) {
					$.datepicker._clearDate(this);
				}
			}).on("input change", function (e) {
				 if ($( "#ms_bc_in<?php echo $bc_prefix; ?>_hdr_valuta_code" ).val()!=''){ 
					$.ajax({    
					url:'<?php echo base_url() . 'ms_master/ct_ms_find/find_valuta_value'; ?>',
					type : 'POST',
					data : {
						 ID_HEADER		:'<?php echo $id_header; ?>' 
						,DATE_KURS	:getValueDate($("#ms_bc_in<?php echo $bc_prefix; ?>_receive_date"),'yymmdd')
					},
					dataType: 'json',
					success: function(msg){
							if (msg.valid){   
								$('#ms_bc_in<?php echo $bc_prefix; ?>_receive_ndpbm_usd').val(msg.detail.rv_u);
								$('#ms_bc_in<?php echo $bc_prefix; ?>_receive_ndpbm_hdr').val(msg.detail.rv_h);
							} else {  
							}
						} 
					}).always(function() { 
					});  
				} 
				
				if ($( "#ms_bc_in<?php echo $bc_prefix; ?>_finish_date" ).val()=='')
						$( "#ms_bc_in<?php echo $bc_prefix; ?>_finish_date" ).val($( "#ms_bc_in<?php echo $bc_prefix; ?>_receive_date" ).val());
					
		}); 
		  
		  $( "#ms_bc_in<?php echo $bc_prefix; ?>_finish_date" ).datepicker({
			changeMonth: true
			,changeYear: true
			,showButtonPanel: true
			,dateFormat: 'dd/mm/yy'
			,onClose: function(dateText, inst){
					var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
					var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
					var day = $("#ui-datepicker-div .ui-datepicker-day :selected").val();
					}
			, onSelect: function (){
				$(this).focus();
			}
			}).keyup(function(e) {
				if(e.keyCode == 8 || e.keyCode == 46) {
					$.datepicker._clearDate(this);
				}
			});
						 
	});
	
	$( "#ms_bc_in<?php echo $bc_prefix; ?>_finish_time" ).timepicker();
	
    if ('<?php echo $kurs_info['rk'];  ?>'=='USD' || '<?php echo $kurs_info['rk'];  ?>'=='IDR'){
		$('#ms_bc_in<?php echo $bc_prefix;  ?>_receive_ndpbm_hdr_panel').hide(); 
	}
	$('#ms_bc_in<?php echo $bc_prefix;  ?>_receive_ndpbm_usd').val('<?php echo $kurs_info['rv_u'];  ?>');
	$('#ms_bc_in<?php echo $bc_prefix;  ?>_receive_ndpbm_hdr').val('<?php echo $kurs_info['rv_h'];  ?>');
	
	$('#ms_bc_in<?php echo $bc_prefix;  ?>_receive_no').focus();
		
</script>

	
	