<?php

if (!isset($this->NM_ajax_info['param']['buffer_output']) || !$this->NM_ajax_info['param']['buffer_output'])
{
    $sOBContents = ob_get_contents();
    ob_end_clean();
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

<html<?php echo $_SESSION['scriptcase']['reg_conf']['html_dir'] ?>>
<HEAD>
 <TITLE><?php if ('novo' == $this->nmgp_opcao) { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmi_titl'] . " - Εντολής"); } else { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmu_titl'] . " - Εντολής"); } ?></TITLE>
 <META http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['scriptcase']['charset_html'] ?>" />
 <META http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT"/>
 <META http-equiv="Last-Modified" content="<?php echo gmdate("D, d M Y H:i:s"); ?> GMT"/>
 <META http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate"/>
 <META http-equiv="Cache-Control" content="post-check=0, pre-check=0"/>
 <META http-equiv="Pragma" content="no-cache"/>
<?php
header("X-XSS-Protection: 0");
?>
<?php

if (isset($_SESSION['scriptcase']['device_mobile']) && $_SESSION['scriptcase']['device_mobile'] && $_SESSION['scriptcase']['display_mobile'])
{
?>
 <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<?php
}

?>
 <link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/thickbox/thickbox.css" type="text/css" media="screen" />
 <SCRIPT type="text/javascript">
  var sc_pathToTB = '<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/thickbox/';
  var sc_blockCol = '<?php echo $this->Ini->Block_img_col; ?>';
  var sc_blockExp = '<?php echo $this->Ini->Block_img_exp; ?>';
  var sc_ajaxBg = '<?php echo $this->Ini->Color_bg_ajax; ?>';
  var sc_ajaxBordC = '<?php echo $this->Ini->Border_c_ajax; ?>';
  var sc_ajaxBordS = '<?php echo $this->Ini->Border_s_ajax; ?>';
  var sc_ajaxBordW = '<?php echo $this->Ini->Border_w_ajax; ?>';
  var sc_ajaxMsgTime = 2;
  var sc_img_status_ok = '<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Img_status_ok; ?>';
  var sc_img_status_err = '<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Img_status_err; ?>';
  var sc_css_status = '<?php echo $this->Ini->Css_status; ?>';
 </SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery/js/jquery.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery/js/jquery-ui.js"></SCRIPT>
 <link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery/css/smoothness/jquery-ui.css" type="text/css" media="screen" />
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.iframe-transport.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fileupload.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/malsup-blockui/jquery.blockUI.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/thickbox/thickbox-compressed.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.scInput.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fieldSelection.js"></SCRIPT>
 <?php
 if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['embutida_pdf']))
 {
 ?>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_form.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_form<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_tab.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_tab<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/buttons/<?php echo $this->Ini->Str_btn_form . '/' . $this->Ini->Str_btn_form ?>.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar<?php echo $_SESSION['scriptcase']['reg_conf']['css_dir'] ?>.css" />
<?php
   include_once("../_lib/css/" . $this->Ini->str_schema_all . "_tab.php");
 }
?>

<script>
var scFocusFirstErrorField = true;
var scFocusFirstErrorName  = "<?php echo $this->scFormFocusErrorName; ?>";
</script>

<?php
include_once("calendar_Transporter_wastetransactions_mob_sajax_js.php");
?>
<script type="text/javascript">
if (document.getElementById("id_error_display_fixed"))
{
 scCenterFixedElement("id_error_display_fixed");
}
var posDispLeft = 0;
var posDispTop = 0;
var Nm_Proc_Atualiz = false;
function findPos(obj)
{
 var posCurLeft = posCurTop = 0;
 if (obj.offsetParent)
 {
  posCurLeft = obj.offsetLeft
  posCurTop = obj.offsetTop
  while (obj = obj.offsetParent)
  {
   posCurLeft += obj.offsetLeft
   posCurTop += obj.offsetTop
  }
 }
 posDispLeft = posCurLeft - 10;
 posDispTop = posCurTop + 30;
}
var Nav_permite_ret = "<?php if ($this->Nav_permite_ret) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_permite_ava = "<?php if ($this->Nav_permite_ava) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_binicio     = "<?php echo $this->arr_buttons['binicio']['type']; ?>";
var Nav_binicio_off = "<?php echo $this->arr_buttons['binicio_off']['type']; ?>";
var Nav_bavanca     = "<?php echo $this->arr_buttons['bavanca']['type']; ?>";
var Nav_bavanca_off = "<?php echo $this->arr_buttons['bavanca_off']['type']; ?>";
var Nav_bretorna    = "<?php echo $this->arr_buttons['bretorna']['type']; ?>";
var Nav_bretorna_off = "<?php echo $this->arr_buttons['bretorna_off']['type']; ?>";
var Nav_bfinal      = "<?php echo $this->arr_buttons['bfinal']['type']; ?>";
var Nav_bfinal_off  = "<?php echo $this->arr_buttons['bfinal_off']['type']; ?>";
function nav_atualiza(str_ret, str_ava, str_pos)
{
<?php
 if (isset($this->NM_btn_navega) && 'N' == $this->NM_btn_navega)
 {
     echo " return;";
 }
?>
 if ('S' == str_ret)
 {
<?php
    if ($this->nmgp_botoes['first'] == "on")
    {
?>
       $("#sc_b_ini_" + str_pos).show();
       $("#sc_b_ini_off_" + str_pos).hide().prop("disabled", false);
       $("#gbl_sc_b_ini_" + str_pos).show();
       $("#gbl_sc_b_ini_off_" + str_pos).hide();
<?php
    }
    if ($this->nmgp_botoes['back'] == "on")
    {
?>
       $("#sc_b_ret_" + str_pos).show();
       $("#sc_b_ret_off_" + str_pos).hide().prop("disabled", false);
       $("#gbl_sc_b_ret_" + str_pos).show();
       $("#gbl_sc_b_ret_off_" + str_pos).hide();
<?php
    }
?>
 }
 else
 {
<?php
    if ($this->nmgp_botoes['first'] == "on")
    {
?>
       $("#sc_b_ini_" + str_pos).hide();
       $("#sc_b_ini_off_" + str_pos).prop("disabled", true).show();
       $("#gbl_sc_b_ini_" + str_pos).hide();
       $("#gbl_sc_b_ini_off_" + str_pos).show();
<?php
    }
    if ($this->nmgp_botoes['back'] == "on")
    {
?>
       $("#sc_b_ret_" + str_pos).hide();
       $("#sc_b_ret_off_" + str_pos).prop("disabled", true).show();
       $("#gbl_sc_b_ret_" + str_pos).hide();
       $("#gbl_sc_b_ret_off_" + str_pos).show();
<?php
    }
?>
 }
 if ('S' == str_ava)
 {
<?php
    if ($this->nmgp_botoes['last'] == "on")
    {
?>
       $("#sc_b_fim_" + str_pos).show();
       $("#sc_b_fim_off_" + str_pos).hide().prop("disabled", false);
       $("#gbl_sc_b_fim_" + str_pos).show();
       $("#gbl_sc_b_fim_off_" + str_pos).hide();
<?php
    }
    if ($this->nmgp_botoes['forward'] == "on")
    {
?>
       $("#sc_b_avc_" + str_pos).show();
       $("#sc_b_avc_off_" + str_pos).hide().prop("disabled", false);
       $("#gbl_sc_b_avc_" + str_pos).show();
       $("#gbl_sc_b_avc_off_" + str_pos).hide();
<?php
    }
?>
 }
 else
 {
<?php
    if ($this->nmgp_botoes['last'] == "on")
    {
?>
       $("#sc_b_fim_" + str_pos).hide();
       $("#sc_b_fim_off_" + str_pos).prop("disabled", true).show();
       $("#gbl_sc_b_fim_" + str_pos).hide();
       $("#gbl_sc_b_fim_off_" + str_pos).show();
<?php
    }
    if ($this->nmgp_botoes['forward'] == "on")
    {
?>
       $("#sc_b_avc_" + str_pos).hide();
       $("#sc_b_avc_off_" + str_pos).prop("disabled", true).show();
       $("#gbl_sc_b_avc_" + str_pos).hide();
       $("#gbl_sc_b_avc_off_" + str_pos).show();
<?php
    }
?>
 }
}
function nav_liga_img()
{
 sExt = sImg.substr(sImg.length - 4);
 sImg = sImg.substr(0, sImg.length - 4);
 if ('_off' == sImg.substr(sImg.length - 4))
 {
  sImg = sImg.substr(0, sImg.length - 4);
 }
 sImg += sExt;
}
function nav_desliga_img()
{
 sExt = sImg.substr(sImg.length - 4);
 sImg = sImg.substr(0, sImg.length - 4);
 if ('_off' != sImg.substr(sImg.length - 4))
 {
  sImg += '_off';
 }
 sImg += sExt;
}

 function sc_calendar_all_day_click() {
  if (document.F1.__calend_all_day__) {
     if (document.F1.__calend_all_day__.checked) {
     }
     else {
     }
    }
 } // sc_calendar_all_day_click
<?php

include_once('calendar_Transporter_wastetransactions_mob_jquery.php');

?>

 var scQSInit = true;
 var scQSPos  = {};
 var Dyn_Ini  = true;
 $(function() {

  scJQElementsAdd('');

  scJQGeneralAdd();

  mainForm = document.getElementById('main_table_form');
  formResize();

  sc_calendar_all_day_click();

  $(document).bind('drop dragover', function (e) {
      e.preventDefault();
  });

  var i, iTestWidth, iMaxLabelWidth = 0, $labelList = $(".scUiLabelWidthFix");
  for (i = 0; i < $labelList.length; i++) {
    iTestWidth = $($labelList[i]).width();
    sTestWidth = iTestWidth + "";
    if ("" == iTestWidth) {
      iTestWidth = 0;
    }
    else if ("px" == sTestWidth.substr(sTestWidth.length - 2)) {
      iTestWidth = parseInt(sTestWidth.substr(0, sTestWidth.length - 2));
    }
    iMaxLabelWidth = Math.max(iMaxLabelWidth, iTestWidth);
  }
  if (0 < iMaxLabelWidth) {
    $(".scUiLabelWidthFix").css("width", iMaxLabelWidth + "px");
  }
<?php
if (!$this->NM_ajax_flag && isset($this->NM_non_ajax_info['ajaxJavascript']) && !empty($this->NM_non_ajax_info['ajaxJavascript']))
{
    foreach ($this->NM_non_ajax_info['ajaxJavascript'] as $aFnData)
    {
?>
  <?php echo $aFnData[0]; ?>(<?php echo implode(', ', $aFnData[1]); ?>);

<?php
    }
}
?>
 });

   $(window).load(function() {
   });
 function formResize()
 {
    var W = mainForm.clientWidth,
        H = mainForm.clientHeight;
    if (0 == W || 0 == H)
    {
        setTimeout("formResize()", 50);
    }
    else
    {
        self.parent.tb_resize(H + 50, W + 50);
    }
 }

 if($(".sc-ui-block-control").length) {
  preloadBlock = new Image();
  preloadBlock.src = "<?php echo $this->Ini->path_icones; ?>/" + sc_blockExp;
 }

 var show_block = {
  
 };

 function toggleBlock(e) {
  var block = e.data.block,
      block_id = $(block).attr("id");
      block_img = $("#" + block_id + " .sc-ui-block-control");

  if (1 >= block.rows.length) {
   return;
  }

  show_block[block_id] = !show_block[block_id];

  if (show_block[block_id]) {
    $(block).css("height", "100%");
    if (block_img.length) block_img.attr("src", changeImgName(block_img.attr("src"), sc_blockCol));
  }
  else {
    $(block).css("height", "");
    if (block_img.length) block_img.attr("src", changeImgName(block_img.attr("src"), sc_blockExp));
  }

  for (var i = 1; i < block.rows.length; i++) {
   if (show_block[block_id])
    $(block.rows[i]).show();
   else
    $(block.rows[i]).hide();
  }

  if (show_block[block_id]) {
  }
 }

 function changeImgName(imgOld, imgNew) {
   var aOld = imgOld.split("/");
   aOld.pop();
   aOld.push(imgNew);
   return aOld.join("/");
 }

</script>
</HEAD>
<?php
$str_iframe_body = ('F' == $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe']) ? 'margin: 2px;' : '';
 if (isset($_SESSION['nm_aba_bg_color']))
 {
     $this->Ini->cor_bg_grid = $_SESSION['nm_aba_bg_color'];
     $this->Ini->img_fun_pag = $_SESSION['nm_aba_bg_img'];
 }
if ($GLOBALS["erro_incl"] == 1)
{
    $this->nmgp_opcao = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['recarga'];
}
?>
<body class="scFormPage" style="<?php echo $str_iframe_body; ?>">
<?php

if (!isset($this->NM_ajax_info['param']['buffer_output']) || !$this->NM_ajax_info['param']['buffer_output'])
{
    echo $sOBContents;
}

?>
<div id="idJSSpecChar" style="display: none;"></div>
<script type="text/javascript">
function NM_tp_critica(TP)
{
    if (TP == 0 || TP == 1 || TP == 2)
    {
        nmdg_tipo_crit = TP;
    }
}
</script> 
<?php
 include_once("calendar_Transporter_wastetransactions_mob_js0.php");
?>
<script type="text/javascript" src="<?php echo str_replace("{str_idioma}", $this->Ini->str_lang, "../_lib/js/tab_erro_{str_idioma}.js"); ?>"> 
</script> 
<script type="text/javascript"> 
 function setLocale(oSel)
 {
  var sLocale = "";
  if (-1 < oSel.selectedIndex)
  {
   sLocale = oSel.options[oSel.selectedIndex].value;
  }
  document.F1.nmgp_idioma_novo.value = sLocale;
 }
 function setSchema(oSel)
 {
  var sLocale = "";
  if (-1 < oSel.selectedIndex)
  {
   sLocale = oSel.options[oSel.selectedIndex].value;
  }
  document.F1.nmgp_schema_f.value = sLocale;
 }
 </script>
<form name="F1" method="post" 
               action="calendar_Transporter_wastetransactions_mob.php" 
               target="_self"> 
<input type="hidden" name="nm_form_submit" value="1">
<input type="hidden" name="nmgp_idioma_novo" value="">
<input type="hidden" name="nmgp_schema_f" value="">
<input type="hidden" name="nmgp_url_saida" value="">
<?php
if ('novo' == $this->nmgp_opcao || 'incluir' == $this->nmgp_opcao)
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['insert_validation'] = md5(time() . rand(1, 99999));
?>
<input type="hidden" name="nmgp_ins_valid" value="<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['insert_validation']; ?>">
<?php
}
?>
<input type="hidden" name="nmgp_opcao" value="">
<input type="hidden" name="nmgp_ancora" value="">
<input type="hidden" name="nmgp_num_form" value="<?php  echo NM_encode_input($nmgp_num_form); ?>">
<input type="hidden" name="nmgp_parms" value="">
<input type="hidden" name="script_case_init" value="<?php  echo NM_encode_input($this->Ini->sc_page); ?>"> 
<input type="hidden" name="script_case_session" value="<?php  echo NM_encode_input(session_id()); ?>"> 
<input type="hidden" name="NM_cancel_return_new" value="<?php echo $this->NM_cancel_return_new ?>"> 
<input type="hidden" name="wtid" value="<?php  echo NM_encode_input($this->wtid) ?>">
<input type="hidden" name="_sc_force_mobile" id="sc-id-mobile-control" value="" />
<?php
$_SESSION['scriptcase']['error_span_title']['calendar_Transporter_wastetransactions_mob'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['calendar_Transporter_wastetransactions_mob'] = '' != $this->Ini->Err_ico_title ? $this->Ini->path_icones . '/' . $this->Ini->Err_ico_title : '';
?>
<div style="display: none; position: absolute; z-index: 1000" id="id_error_display_table_frame">
<table class="scFormErrorTable">
<tr><?php if ($this->Ini->Error_icon_span && '' != $this->Ini->Err_ico_title) { ?><td style="padding: 0px" rowspan="2"><img src="<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Err_ico_title; ?>" style="border-width: 0px" align="top"></td><?php } ?><td class="scFormErrorTitle"><table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormErrorTitleFont" style="padding: 0px; vertical-align: top; width: 100%"><?php if (!$this->Ini->Error_icon_span && '' != $this->Ini->Err_ico_title) { ?><img src="<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Err_ico_title; ?>" style="border-width: 0px" align="top">&nbsp;<?php } ?><?php echo $this->Ini->Nm_lang['lang_errm_errt'] ?></td><td style="padding: 0px; vertical-align: top"><?php echo nmButtonOutput($this->arr_buttons, "berrm_clse", "scAjaxHideErrorDisplay('table')", "scAjaxHideErrorDisplay('table')", "", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
</td></tr></table></td></tr>
<tr><td class="scFormErrorMessage"><span id="id_error_display_table_text"></span></td></tr>
</table>
</div>
<div style="display: none; position: absolute; z-index: 1000" id="id_message_display_frame">
 <table class="scFormMessageTable" id="id_message_display_content" style="width: 100%">
  <tr id="id_message_display_title_line">
   <td class="scFormMessageTitle" style="height: 20px"><?php
if ('' != $this->Ini->Msg_ico_title) {
?>
<img src="<?php echo $this->Ini->path_icones . '/' . $this->Ini->Msg_ico_title; ?>" style="border-width: 0px; vertical-align: middle">&nbsp;<?php
}
?>
<?php echo nmButtonOutput($this->arr_buttons, "bmessageclose", "_scAjaxMessageBtnClose()", "_scAjaxMessageBtnClose()", "id_message_display_close_icon", "", "", "float: right", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
<span id="id_message_display_title" style="vertical-align: middle"></span></td>
  </tr>
  <tr>
   <td class="scFormMessageMessage"><?php
if ('' != $this->Ini->Msg_ico_body) {
?>
<img id="id_message_display_body_icon" src="<?php echo $this->Ini->path_icones . '/' . $this->Ini->Msg_ico_body; ?>" style="border-width: 0px; vertical-align: middle">&nbsp;<?php
}
?>
<span id="id_message_display_text"></span><div id="id_message_display_buttond" style="display: none; text-align: center"><br /><input id="id_message_display_buttone" type="button" class="scButton_default" value="Ok" onClick="_scAjaxMessageBtnClick()" ></div></td>
  </tr>
 </table>
</div>
<script type="text/javascript">
var scMsgDefTitle = "<?php echo $this->Ini->Nm_lang['lang_usr_lang_othr_msgs_titl']; ?>";
var scMsgDefButton = "Ok";
var scMsgDefClick = "close";
var scMsgDefScInit = "<?php echo $this->Ini->page; ?>";
</script>
<table id="main_table_form"  align="center" cellpadding=0 cellspacing=0 >
 <tr>
  <td>
  <div class="scFormBorder">
   <table width='100%' cellspacing=0 cellpadding=0>
<?php
  if (!$this->Embutida_call && (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['mostra_cab']) || $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['mostra_cab'] != "N"))
  {
?>
<tr><td>
<style>
#lin1_col1 { font-size:22px; width:500px; color: #FFFFFF; }
#lin1_col2 { font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:right; color: #FFFFFF;  }
#lin2_col1 { font-family:Arial, Helvetica, sans-serif; font-weight:bold; font-size:15px; }
#lin2_col2 { font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:right; color: #FFFFFF;  }

</style>

<table width="100%" height="67px" class="scFormHeader">
        <tr>
                <td width="5px"></td>
        <td width="67px" class="scFormHeaderFont"><IMG SRC="<?php echo $this->Ini->path_imag_cab ?>/scriptcase__NM__scriptcase5_logo_simple.png" BORDER="0"/></td>
               <td class="scFormHeaderFont"><span id="lin1_col1"><?php if ($this->nmgp_opcao == "novo") { echo "" . $this->Ini->Nm_lang['lang_othr_frmi_titl'] . " - Εντολής"; } else { echo "" . $this->Ini->Nm_lang['lang_othr_frmu_titl'] . " - Εντολής"; } ?></span><br /><span id="lin2_col1"></span></td>
               <td align="right" class="scFormHeaderFont"><span  id="lin1_col2"></span><br /><span id="lin2_col2"></span></td>
        <td width="5px"></td>
    </tr>
</table>
</td></tr>
<?php
  }
?>
<tr><td>
<?php
  if ($this->nmgp_form_empty)
  {
       if (!empty($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['where_filter']))
       {
           $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['empty_filter'] = true;
       }
       echo "</td></tr><tr><td align=center>";
       echo "<font face=\"" . $this->Ini->pag_fonte_tipo . "\" color=\"" . $this->Ini->cor_txt_grid . "\" size=\"2\"><b>" . $this->Ini->Nm_lang['lang_errm_empt'] . "</b></font>";
       echo "</td></tr>";
  }
  else
  {
?>
<?php $sc_hidden_no = 1; $sc_hidden_yes = 0; ?>
   <a name="bloco_0"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_0"><!-- bloco_c -->
<?php
?>
<TABLE align="center" id="hidden_bloco_0" class="scFormTable" width="100%" style="height: 100%;"><?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['intnumber']))
    {
        $this->nm_new_label['intnumber'] = "INTNUMBER";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $intnumber = $this->intnumber;
   $sStyleHidden_intnumber = '';
   if (isset($this->nmgp_cmp_hidden['intnumber']) && $this->nmgp_cmp_hidden['intnumber'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['intnumber']);
       $sStyleHidden_intnumber = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_intnumber = 'display: none;';
   $sStyleReadInp_intnumber = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['intnumber']) && $this->nmgp_cmp_readonly['intnumber'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['intnumber']);
       $sStyleReadLab_intnumber = '';
       $sStyleReadInp_intnumber = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['intnumber']) && $this->nmgp_cmp_hidden['intnumber'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="intnumber" value="<?php echo NM_encode_input($intnumber) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_intnumber" style="<?php echo $sStyleHidden_intnumber; ?>text-align:left;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="text-align:left;;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_intnumber"><?php echo $this->nm_new_label['intnumber']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["intnumber"]) &&  $this->nmgp_cmp_readonly["intnumber"] == "on") { 

 ?>
<input type="hidden" name="intnumber" value="<?php echo NM_encode_input($intnumber) . "\">" . $intnumber . ""; ?>
<?php } else { ?>
<span id="id_read_on_intnumber" class="sc-ui-readonly-intnumber" style="text-align:left;<?php echo $sStyleReadLab_intnumber; ?>"><?php echo NM_encode_input($this->intnumber); ?></span><span id="id_read_off_intnumber" style="white-space: nowrap;<?php echo $sStyleReadInp_intnumber; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_intnumber" type=text name="intnumber" value="<?php echo NM_encode_input($intnumber) ?>"
 size=19 alt="{datatype: 'integer', maxLength: 19, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['intnumber']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['intnumber']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_intnumber_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_intnumber_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_intnumber_dumb = ('' == $sStyleHidden_intnumber) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_intnumber_dumb" style="<?php echo $sStyleHidden_intnumber_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wtrequestdate']))
    {
        $this->nm_new_label['wtrequestdate'] = "Ημερομηνία παραλαβής";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $wtrequestdate = $this->wtrequestdate;
   $sStyleHidden_wtrequestdate = '';
   if (isset($this->nmgp_cmp_hidden['wtrequestdate']) && $this->nmgp_cmp_hidden['wtrequestdate'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtrequestdate']);
       $sStyleHidden_wtrequestdate = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtrequestdate = 'display: none;';
   $sStyleReadInp_wtrequestdate = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtrequestdate']) && $this->nmgp_cmp_readonly['wtrequestdate'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtrequestdate']);
       $sStyleReadLab_wtrequestdate = '';
       $sStyleReadInp_wtrequestdate = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtrequestdate']) && $this->nmgp_cmp_hidden['wtrequestdate'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtrequestdate" value="<?php echo NM_encode_input($wtrequestdate) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_wtrequestdate" style="<?php echo $sStyleHidden_wtrequestdate; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_wtrequestdate"><?php echo $this->nm_new_label['wtrequestdate']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['php_cmp_required']['wtrequestdate']) || $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['php_cmp_required']['wtrequestdate'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtrequestdate"]) &&  $this->nmgp_cmp_readonly["wtrequestdate"] == "on") { 

 ?>
<input type="hidden" name="wtrequestdate" value="<?php echo NM_encode_input($wtrequestdate) . "\">" . $wtrequestdate . ""; ?>
<?php } else { ?>
<span id="id_read_on_wtrequestdate" class="sc-ui-readonly-wtrequestdate" style=";<?php echo $sStyleReadLab_wtrequestdate; ?>"><?php echo NM_encode_input($wtrequestdate); ?></span><span id="id_read_off_wtrequestdate" style="white-space: nowrap;<?php echo $sStyleReadInp_wtrequestdate; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_wtrequestdate" type=text name="wtrequestdate" value="<?php echo NM_encode_input($wtrequestdate) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['wtrequestdate']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['wtrequestdate']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['wtrequestdate']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
&nbsp;<?php echo $tmp_form_data; ?></span><?php } ?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_wtrequestdate_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtrequestdate_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_wtrequestdate_dumb = ('' == $sStyleHidden_wtrequestdate) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wtrequestdate_dumb" style="<?php echo $sStyleHidden_wtrequestdate_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtproducerbranchid']))
   {
       $this->nm_new_label['wtproducerbranchid'] = "Εγκατάσταση παραγωγου";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $wtproducerbranchid = $this->wtproducerbranchid;
   $sStyleHidden_wtproducerbranchid = '';
   if (isset($this->nmgp_cmp_hidden['wtproducerbranchid']) && $this->nmgp_cmp_hidden['wtproducerbranchid'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtproducerbranchid']);
       $sStyleHidden_wtproducerbranchid = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtproducerbranchid = 'display: none;';
   $sStyleReadInp_wtproducerbranchid = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtproducerbranchid']) && $this->nmgp_cmp_readonly['wtproducerbranchid'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtproducerbranchid']);
       $sStyleReadLab_wtproducerbranchid = '';
       $sStyleReadInp_wtproducerbranchid = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtproducerbranchid']) && $this->nmgp_cmp_hidden['wtproducerbranchid'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtproducerbranchid" value="<?php echo NM_encode_input($this->wtproducerbranchid) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerbranchid" style="<?php echo $sStyleHidden_wtproducerbranchid; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_wtproducerbranchid"><?php echo $this->nm_new_label['wtproducerbranchid']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['php_cmp_required']['wtproducerbranchid']) || $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['php_cmp_required']['wtproducerbranchid'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtproducerbranchid"]) &&  $this->nmgp_cmp_readonly["wtproducerbranchid"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'] = array(); 
}
if ($this->wtprofilid != "")
{ 
   $this->nm_clear_val("wtprofilid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT PrBID, PrBranchName 
FROM producerbranch 
where ProfilID =$this->wtprofilid
ORDER BY PrBranchName";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0; 
   $wtproducerbranchid_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->wtproducerbranchid_1))
          {
              foreach ($this->wtproducerbranchid_1 as $tmp_wtproducerbranchid)
              {
                  if (trim($tmp_wtproducerbranchid) === trim($cadaselect[1])) { $wtproducerbranchid_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtproducerbranchid) === trim($cadaselect[1])) { $wtproducerbranchid_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="wtproducerbranchid" value="<?php echo NM_encode_input($wtproducerbranchid) . "\">" . $wtproducerbranchid_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'] = array(); 
}
if ($this->wtprofilid != "")
{ 
   $this->nm_clear_val("wtprofilid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT PrBID, PrBranchName 
FROM producerbranch 
where ProfilID =$this->wtprofilid
ORDER BY PrBranchName";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $wtproducerbranchid_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->wtproducerbranchid_1))
          {
              foreach ($this->wtproducerbranchid_1 as $tmp_wtproducerbranchid)
              {
                  if (trim($tmp_wtproducerbranchid) === trim($cadaselect[1])) { $wtproducerbranchid_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtproducerbranchid) === trim($cadaselect[1])) { $wtproducerbranchid_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtproducerbranchid\" style=\";" .  $sStyleReadLab_wtproducerbranchid . "\">" . NM_encode_input($wtproducerbranchid_look) . "</span><span id=\"id_read_off_wtproducerbranchid\" style=\"" . $sStyleReadInp_wtproducerbranchid . "\">";
   echo " <span id=\"idAjaxSelect_wtproducerbranchid\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_wtproducerbranchid\" name=\"wtproducerbranchid\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerbranchid'][] = ''; 
   echo "  <option value=\"\">---Επιλέξτε κωδικό αποβλήτου---</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wtproducerbranchid) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtproducerbranchid)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_wtproducerbranchid_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtproducerbranchid_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_wtproducerbranchid_dumb = ('' == $sStyleHidden_wtproducerbranchid) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerbranchid_dumb" style="<?php echo $sStyleHidden_wtproducerbranchid_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtproducerewc']))
   {
       $this->nm_new_label['wtproducerewc'] = "Κωδικός  αποβλήτου";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $wtproducerewc = $this->wtproducerewc;
   $sStyleHidden_wtproducerewc = '';
   if (isset($this->nmgp_cmp_hidden['wtproducerewc']) && $this->nmgp_cmp_hidden['wtproducerewc'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtproducerewc']);
       $sStyleHidden_wtproducerewc = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtproducerewc = 'display: none;';
   $sStyleReadInp_wtproducerewc = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtproducerewc']) && $this->nmgp_cmp_readonly['wtproducerewc'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtproducerewc']);
       $sStyleReadLab_wtproducerewc = '';
       $sStyleReadInp_wtproducerewc = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtproducerewc']) && $this->nmgp_cmp_hidden['wtproducerewc'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtproducerewc" value="<?php echo NM_encode_input($this->wtproducerewc) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerewc" style="<?php echo $sStyleHidden_wtproducerewc; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_wtproducerewc"><?php echo $this->nm_new_label['wtproducerewc']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['php_cmp_required']['wtproducerewc']) || $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['php_cmp_required']['wtproducerewc'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtproducerewc"]) &&  $this->nmgp_cmp_readonly["wtproducerewc"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'] = array(); 
}
if ($this->wtproducerbranchid != "")
{ 
   $this->nm_clear_val("wtproducerbranchid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT EWC, EWC 
FROM producerewcbranch 
where producerbranchid = '$this->wtproducerbranchid'
ORDER BY EWC";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0; 
   $wtproducerewc_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->wtproducerewc_1))
          {
              foreach ($this->wtproducerewc_1 as $tmp_wtproducerewc)
              {
                  if (trim($tmp_wtproducerewc) === trim($cadaselect[1])) { $wtproducerewc_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtproducerewc) === trim($cadaselect[1])) { $wtproducerewc_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="wtproducerewc" value="<?php echo NM_encode_input($wtproducerewc) . "\">" . $wtproducerewc_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'] = array(); 
}
if ($this->wtproducerbranchid != "")
{ 
   $this->nm_clear_val("wtproducerbranchid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT EWC, EWC 
FROM producerewcbranch 
where producerbranchid = '$this->wtproducerbranchid'
ORDER BY EWC";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $wtproducerewc_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->wtproducerewc_1))
          {
              foreach ($this->wtproducerewc_1 as $tmp_wtproducerewc)
              {
                  if (trim($tmp_wtproducerewc) === trim($cadaselect[1])) { $wtproducerewc_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtproducerewc) === trim($cadaselect[1])) { $wtproducerewc_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtproducerewc\" style=\";" .  $sStyleReadLab_wtproducerewc . "\">" . NM_encode_input($wtproducerewc_look) . "</span><span id=\"id_read_off_wtproducerewc\" style=\"" . $sStyleReadInp_wtproducerewc . "\">";
   echo " <span id=\"idAjaxSelect_wtproducerewc\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_wtproducerewc\" name=\"wtproducerewc\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerewc'][] = ''; 
   echo "  <option value=\"\">--Επιλογή κωδικού---</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wtproducerewc) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtproducerewc)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_wtproducerewc_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtproducerewc_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_wtproducerewc_dumb = ('' == $sStyleHidden_wtproducerewc) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerewc_dumb" style="<?php echo $sStyleHidden_wtproducerewc_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtproducerperiferia']))
   {
       $this->nm_new_label['wtproducerperiferia'] = "Περιφέρεια εγκατάστασης";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $wtproducerperiferia = $this->wtproducerperiferia;
   $sStyleHidden_wtproducerperiferia = '';
   if (isset($this->nmgp_cmp_hidden['wtproducerperiferia']) && $this->nmgp_cmp_hidden['wtproducerperiferia'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtproducerperiferia']);
       $sStyleHidden_wtproducerperiferia = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtproducerperiferia = 'display: none;';
   $sStyleReadInp_wtproducerperiferia = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtproducerperiferia']) && $this->nmgp_cmp_readonly['wtproducerperiferia'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtproducerperiferia']);
       $sStyleReadLab_wtproducerperiferia = '';
       $sStyleReadInp_wtproducerperiferia = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtproducerperiferia']) && $this->nmgp_cmp_hidden['wtproducerperiferia'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtproducerperiferia" value="<?php echo NM_encode_input($this->wtproducerperiferia) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerperiferia" style="<?php echo $sStyleHidden_wtproducerperiferia; ?>text-align:left;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="text-align:left;;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_wtproducerperiferia"><?php echo $this->nm_new_label['wtproducerperiferia']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtproducerperiferia"]) &&  $this->nmgp_cmp_readonly["wtproducerperiferia"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'] = array(); 
}
if ($this->wtproducerperiferia != "")
{ 
   $this->nm_clear_val("wtproducerperiferia");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT PerifID, PerifName 
FROM perif 
WHERE PerifID = '$this->wtproducerperiferia'
ORDER BY PerifName";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0; 
   $wtproducerperiferia_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->wtproducerperiferia_1))
          {
              foreach ($this->wtproducerperiferia_1 as $tmp_wtproducerperiferia)
              {
                  if (trim($tmp_wtproducerperiferia) === trim($cadaselect[1])) { $wtproducerperiferia_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtproducerperiferia) === trim($cadaselect[1])) { $wtproducerperiferia_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="wtproducerperiferia" value="<?php echo NM_encode_input($wtproducerperiferia) . "\">" . $wtproducerperiferia_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'] = array(); 
}
if ($this->wtproducerperiferia != "")
{ 
   $this->nm_clear_val("wtproducerperiferia");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT PerifID, PerifName 
FROM perif 
WHERE PerifID = '$this->wtproducerperiferia'
ORDER BY PerifName";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproducerperiferia'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $wtproducerperiferia_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->wtproducerperiferia_1))
          {
              foreach ($this->wtproducerperiferia_1 as $tmp_wtproducerperiferia)
              {
                  if (trim($tmp_wtproducerperiferia) === trim($cadaselect[1])) { $wtproducerperiferia_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtproducerperiferia) === trim($cadaselect[1])) { $wtproducerperiferia_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtproducerperiferia\" style=\"text-align:left;" .  $sStyleReadLab_wtproducerperiferia . "\">" . NM_encode_input($wtproducerperiferia_look) . "</span><span id=\"id_read_off_wtproducerperiferia\" style=\"" . $sStyleReadInp_wtproducerperiferia . "\">";
   echo " <span id=\"idAjaxSelect_wtproducerperiferia\"><select class=\"sc-js-input scFormObjectOdd\" style=\"text-align:left;\" id=\"id_sc_field_wtproducerperiferia\" name=\"wtproducerperiferia\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wtproducerperiferia) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtproducerperiferia)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_wtproducerperiferia_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtproducerperiferia_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_wtproducerperiferia_dumb = ('' == $sStyleHidden_wtproducerperiferia) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerperiferia_dumb" style="<?php echo $sStyleHidden_wtproducerperiferia_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtproduceracceptweigth']))
   {
       $this->nm_new_label['wtproduceracceptweigth'] = "Αποδοχή βάρους τ.αποδέκτη";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $wtproduceracceptweigth = $this->wtproduceracceptweigth;
   $sStyleHidden_wtproduceracceptweigth = '';
   if (isset($this->nmgp_cmp_hidden['wtproduceracceptweigth']) && $this->nmgp_cmp_hidden['wtproduceracceptweigth'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtproduceracceptweigth']);
       $sStyleHidden_wtproduceracceptweigth = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtproduceracceptweigth = 'display: none;';
   $sStyleReadInp_wtproduceracceptweigth = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtproduceracceptweigth']) && $this->nmgp_cmp_readonly['wtproduceracceptweigth'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtproduceracceptweigth']);
       $sStyleReadLab_wtproduceracceptweigth = '';
       $sStyleReadInp_wtproduceracceptweigth = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtproduceracceptweigth']) && $this->nmgp_cmp_hidden['wtproduceracceptweigth'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtproduceracceptweigth" value="<?php echo NM_encode_input($this->wtproduceracceptweigth) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>
<?php 
  if ($this->nmgp_opcao != "recarga") 
  {
      $this->wtproduceracceptweigth_1 = explode(";", trim($this->wtproduceracceptweigth));
  } 
  else
  {
      if (empty($this->wtproduceracceptweigth))
      {
          $this->wtproduceracceptweigth_1= array(); 
      } 
      else
      {
          $this->wtproduceracceptweigth_1= $this->wtproduceracceptweigth; 
          $this->wtproduceracceptweigth= ""; 
          foreach ($this->wtproduceracceptweigth_1 as $cada_wtproduceracceptweigth)
          {
             if (!empty($wtproduceracceptweigth))
             {
                 $this->wtproduceracceptweigth.= ";"; 
             } 
             $this->wtproduceracceptweigth.= $cada_wtproduceracceptweigth; 
          } 
      } 
  } 
?> 

    <TD class="scFormDataOdd" id="hidden_field_data_wtproduceracceptweigth" style="<?php echo $sStyleHidden_wtproduceracceptweigth; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_wtproduceracceptweigth"><?php echo $this->nm_new_label['wtproduceracceptweigth']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtproduceracceptweigth"]) &&  $this->nmgp_cmp_readonly["wtproduceracceptweigth"] == "on") { 

$wtproduceracceptweigth_look = "";
 if (in_array("1", $this->wtproduceracceptweigth_1))  { $wtproduceracceptweigth_look .= "<br />";} 
 if (in_array("0", $this->wtproduceracceptweigth_1))  { $wtproduceracceptweigth_look .= "<br />";} 
?>
<input type="hidden" name="wtproduceracceptweigth" value="<?php echo NM_encode_input($wtproduceracceptweigth) . "\">" . $wtproduceracceptweigth_look . ""; ?>
<?php } else { ?>

<?php

$wtproduceracceptweigth_look = "";
 if (in_array("1", $this->wtproduceracceptweigth_1))  { $wtproduceracceptweigth_look .= "<br />";} 
 if (in_array("0", $this->wtproduceracceptweigth_1))  { $wtproduceracceptweigth_look .= "<br />";} 
?>
<span id="id_read_on_wtproduceracceptweigth" style=";<?php echo $sStyleReadLab_wtproduceracceptweigth; ?>"><?php echo NM_encode_input($wtproduceracceptweigth_look); ?></span><span id="id_read_off_wtproduceracceptweigth" style="<?php echo $sStyleReadInp_wtproduceracceptweigth; ?>"><?php echo "<div id=\"idAjaxCheckbox_wtproduceracceptweigth\">\r\n"; ?><TABLE><TR>
  <TD class="scFormDataFontOdd" style=";"> <input type=checkbox class="sc-ui-checkbox-wtproduceracceptweigth sc-ui-checkbox-wtproduceracceptweigth" name="wtproduceracceptweigth[]" value="1"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproduceracceptweigth'][] = '1'; ?>
<?php  if (in_array("1", $this->wtproduceracceptweigth_1))  { echo " checked" ;} ?> onClick="" ></TD>
</TR>
<TR>
  <TD class="scFormDataFontOdd" style=";"> <input type=checkbox class="sc-ui-checkbox-wtproduceracceptweigth sc-ui-checkbox-wtproduceracceptweigth" name="wtproduceracceptweigth[]" value="0"
<?php $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wtproduceracceptweigth'][] = '0'; ?>
<?php  if (in_array("0", $this->wtproduceracceptweigth_1))  { echo " checked" ;} ?> onClick="" ></TD>
</TR></TABLE>
<?php echo "</div>\r\n"; ?></span><?php  }?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_wtproduceracceptweigth_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtproduceracceptweigth_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_wtproduceracceptweigth_dumb = ('' == $sStyleHidden_wtproduceracceptweigth) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wtproduceracceptweigth_dumb" style="<?php echo $sStyleHidden_wtproduceracceptweigth_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wtproducerqty']))
    {
        $this->nm_new_label['wtproducerqty'] = "Ποσότητα Παραγωγού";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $wtproducerqty = $this->wtproducerqty;
   $sStyleHidden_wtproducerqty = '';
   if (isset($this->nmgp_cmp_hidden['wtproducerqty']) && $this->nmgp_cmp_hidden['wtproducerqty'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtproducerqty']);
       $sStyleHidden_wtproducerqty = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtproducerqty = 'display: none;';
   $sStyleReadInp_wtproducerqty = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtproducerqty']) && $this->nmgp_cmp_readonly['wtproducerqty'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtproducerqty']);
       $sStyleReadLab_wtproducerqty = '';
       $sStyleReadInp_wtproducerqty = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtproducerqty']) && $this->nmgp_cmp_hidden['wtproducerqty'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtproducerqty" value="<?php echo NM_encode_input($wtproducerqty) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerqty" style="<?php echo $sStyleHidden_wtproducerqty; ?>text-align:left;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="text-align:left;;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_wtproducerqty"><?php echo $this->nm_new_label['wtproducerqty']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtproducerqty"]) &&  $this->nmgp_cmp_readonly["wtproducerqty"] == "on") { 

 ?>
<input type="hidden" name="wtproducerqty" value="<?php echo NM_encode_input($wtproducerqty) . "\">" . $wtproducerqty . ""; ?>
<?php } else { ?>
<span id="id_read_on_wtproducerqty" class="sc-ui-readonly-wtproducerqty" style="text-align:left;<?php echo $sStyleReadLab_wtproducerqty; ?>"><?php echo NM_encode_input($this->wtproducerqty); ?></span><span id="id_read_off_wtproducerqty" style="white-space: nowrap;<?php echo $sStyleReadInp_wtproducerqty; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_wtproducerqty" type=text name="wtproducerqty" value="<?php echo NM_encode_input($wtproducerqty) ?>"
 size=10 alt="{datatype: 'decimal', maxLength: 10, precision: 3, decimalSep: '<?php echo str_replace("'", "\'", $this->field_config['wtproducerqty']['symbol_dec']); ?>', thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['wtproducerqty']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['wtproducerqty']['symbol_fmt']; ?>, manualDecimals: false, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_wtproducerqty_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtproducerqty_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_wtproducerqty_dumb = ('' == $sStyleHidden_wtproducerqty) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerqty_dumb" style="<?php echo $sStyleHidden_wtproducerqty_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wtprducerm3']))
    {
        $this->nm_new_label['wtprducerm3'] = "Μ3";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $wtprducerm3 = $this->wtprducerm3;
   $sStyleHidden_wtprducerm3 = '';
   if (isset($this->nmgp_cmp_hidden['wtprducerm3']) && $this->nmgp_cmp_hidden['wtprducerm3'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtprducerm3']);
       $sStyleHidden_wtprducerm3 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtprducerm3 = 'display: none;';
   $sStyleReadInp_wtprducerm3 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtprducerm3']) && $this->nmgp_cmp_readonly['wtprducerm3'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtprducerm3']);
       $sStyleReadLab_wtprducerm3 = '';
       $sStyleReadInp_wtprducerm3 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtprducerm3']) && $this->nmgp_cmp_hidden['wtprducerm3'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtprducerm3" value="<?php echo NM_encode_input($wtprducerm3) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_wtprducerm3" style="<?php echo $sStyleHidden_wtprducerm3; ?>text-align:left;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="text-align:left;;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_wtprducerm3"><?php echo $this->nm_new_label['wtprducerm3']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtprducerm3"]) &&  $this->nmgp_cmp_readonly["wtprducerm3"] == "on") { 

 ?>
<input type="hidden" name="wtprducerm3" value="<?php echo NM_encode_input($wtprducerm3) . "\">" . $wtprducerm3 . ""; ?>
<?php } else { ?>
<span id="id_read_on_wtprducerm3" class="sc-ui-readonly-wtprducerm3" style="text-align:left;<?php echo $sStyleReadLab_wtprducerm3; ?>"><?php echo NM_encode_input($this->wtprducerm3); ?></span><span id="id_read_off_wtprducerm3" style="white-space: nowrap;<?php echo $sStyleReadInp_wtprducerm3; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_wtprducerm3" type=text name="wtprducerm3" value="<?php echo NM_encode_input($wtprducerm3) ?>"
 size=11 alt="{datatype: 'integer', maxLength: 11, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['wtprducerm3']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['wtprducerm3']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_wtprducerm3_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtprducerm3_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 






<?php $sStyleHidden_wtprducerm3_dumb = ('' == $sStyleHidden_wtprducerm3) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wtprducerm3_dumb" style="<?php echo $sStyleHidden_wtprducerm3_dumb; ?>"></TD>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_1"></a>
   <table width="100%" height="100%" cellpadding="0" cellspacing=0><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_1"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_1" class="scFormTable" width="100%" style="height: 100%;"><?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wttransporterid']))
   {
       $this->nm_new_label['wttransporterid'] = "Επωνυμια Μεταφορέα";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $wttransporterid = $this->wttransporterid;
   $sStyleHidden_wttransporterid = '';
   if (isset($this->nmgp_cmp_hidden['wttransporterid']) && $this->nmgp_cmp_hidden['wttransporterid'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wttransporterid']);
       $sStyleHidden_wttransporterid = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wttransporterid = 'display: none;';
   $sStyleReadInp_wttransporterid = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wttransporterid']) && $this->nmgp_cmp_readonly['wttransporterid'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wttransporterid']);
       $sStyleReadLab_wttransporterid = '';
       $sStyleReadInp_wttransporterid = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wttransporterid']) && $this->nmgp_cmp_hidden['wttransporterid'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wttransporterid" value="<?php echo NM_encode_input($this->wttransporterid) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_wttransporterid" style="<?php echo $sStyleHidden_wttransporterid; ?>text-align:left;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="text-align:left;;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_wttransporterid"><?php echo $this->nm_new_label['wttransporterid']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wttransporterid"]) &&  $this->nmgp_cmp_readonly["wttransporterid"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'] = array(); 
}
if ($this->wtprofilid != "")
{ 
   $this->nm_clear_val("wtprofilid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT TransporterID, Trans_Title , 'ggg'
FROM transporter 
WHERE ProfilID= $this->wtprofilid";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0; 
   $wttransporterid_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->wttransporterid_1))
          {
              foreach ($this->wttransporterid_1 as $tmp_wttransporterid)
              {
                  if (trim($tmp_wttransporterid) === trim($cadaselect[1])) { $wttransporterid_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wttransporterid) === trim($cadaselect[1])) { $wttransporterid_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="wttransporterid" value="<?php echo NM_encode_input($wttransporterid) . "\">" . $wttransporterid_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'] = array(); 
}
if ($this->wtprofilid != "")
{ 
   $this->nm_clear_val("wtprofilid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT TransporterID, Trans_Title , 'ggg'
FROM transporter 
WHERE ProfilID= $this->wtprofilid";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $rs->fields[0] = str_replace(',', '.', $rs->fields[0]);
              $rs->fields[0] = (strpos(strtolower($rs->fields[0]), "e")) ? (float)$rs->fields[0] : $rs->fields[0];
              $rs->fields[0] = (string)$rs->fields[0];
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_wttransporterid'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $wttransporterid_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->wttransporterid_1))
          {
              foreach ($this->wttransporterid_1 as $tmp_wttransporterid)
              {
                  if (trim($tmp_wttransporterid) === trim($cadaselect[1])) { $wttransporterid_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wttransporterid) === trim($cadaselect[1])) { $wttransporterid_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wttransporterid\" style=\"text-align:left;" .  $sStyleReadLab_wttransporterid . "\">" . NM_encode_input($wttransporterid_look) . "</span><span id=\"id_read_off_wttransporterid\" style=\"" . $sStyleReadInp_wttransporterid . "\">";
   echo " <span id=\"idAjaxSelect_wttransporterid\"><select class=\"sc-js-input scFormObjectOdd\" style=\"text-align:left;\" id=\"id_sc_field_wttransporterid\" name=\"wttransporterid\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wttransporterid) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wttransporterid)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_wttransporterid_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wttransporterid_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_wttransporterid_dumb = ('' == $sStyleHidden_wttransporterid) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_wttransporterid_dumb" style="<?php echo $sStyleHidden_wttransporterid_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['envregistrationno_transporter']))
    {
        $this->nm_new_label['envregistrationno_transporter'] = "Env Registration No Transporter";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $envregistrationno_transporter = $this->envregistrationno_transporter;
   $sStyleHidden_envregistrationno_transporter = '';
   if (isset($this->nmgp_cmp_hidden['envregistrationno_transporter']) && $this->nmgp_cmp_hidden['envregistrationno_transporter'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['envregistrationno_transporter']);
       $sStyleHidden_envregistrationno_transporter = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_envregistrationno_transporter = 'display: none;';
   $sStyleReadInp_envregistrationno_transporter = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['envregistrationno_transporter']) && $this->nmgp_cmp_readonly['envregistrationno_transporter'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['envregistrationno_transporter']);
       $sStyleReadLab_envregistrationno_transporter = '';
       $sStyleReadInp_envregistrationno_transporter = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['envregistrationno_transporter']) && $this->nmgp_cmp_hidden['envregistrationno_transporter'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="envregistrationno_transporter" value="<?php echo NM_encode_input($envregistrationno_transporter) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_envregistrationno_transporter" style="<?php echo $sStyleHidden_envregistrationno_transporter; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_envregistrationno_transporter"><?php echo $this->nm_new_label['envregistrationno_transporter']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["envregistrationno_transporter"]) &&  $this->nmgp_cmp_readonly["envregistrationno_transporter"] == "on") { 

 ?>
<input type="hidden" name="envregistrationno_transporter" value="<?php echo NM_encode_input($envregistrationno_transporter) . "\">" . $envregistrationno_transporter . ""; ?>
<?php } else { ?>
<span id="id_read_on_envregistrationno_transporter" class="sc-ui-readonly-envregistrationno_transporter" style=";<?php echo $sStyleReadLab_envregistrationno_transporter; ?>"><?php echo NM_encode_input($this->envregistrationno_transporter); ?></span><span id="id_read_off_envregistrationno_transporter" style="white-space: nowrap;<?php echo $sStyleReadInp_envregistrationno_transporter; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_envregistrationno_transporter" type=text name="envregistrationno_transporter" value="<?php echo NM_encode_input($envregistrationno_transporter) ?>"
 size=15 maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_envregistrationno_transporter_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_envregistrationno_transporter_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_envregistrationno_transporter_dumb = ('' == $sStyleHidden_envregistrationno_transporter) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_envregistrationno_transporter_dumb" style="<?php echo $sStyleHidden_envregistrationno_transporter_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['envregistrationno_fdest']))
    {
        $this->nm_new_label['envregistrationno_fdest'] = "Env Registration No F Dest";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $envregistrationno_fdest = $this->envregistrationno_fdest;
   $sStyleHidden_envregistrationno_fdest = '';
   if (isset($this->nmgp_cmp_hidden['envregistrationno_fdest']) && $this->nmgp_cmp_hidden['envregistrationno_fdest'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['envregistrationno_fdest']);
       $sStyleHidden_envregistrationno_fdest = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_envregistrationno_fdest = 'display: none;';
   $sStyleReadInp_envregistrationno_fdest = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['envregistrationno_fdest']) && $this->nmgp_cmp_readonly['envregistrationno_fdest'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['envregistrationno_fdest']);
       $sStyleReadLab_envregistrationno_fdest = '';
       $sStyleReadInp_envregistrationno_fdest = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['envregistrationno_fdest']) && $this->nmgp_cmp_hidden['envregistrationno_fdest'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="envregistrationno_fdest" value="<?php echo NM_encode_input($envregistrationno_fdest) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_envregistrationno_fdest" style="<?php echo $sStyleHidden_envregistrationno_fdest; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_envregistrationno_fdest"><?php echo $this->nm_new_label['envregistrationno_fdest']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["envregistrationno_fdest"]) &&  $this->nmgp_cmp_readonly["envregistrationno_fdest"] == "on") { 

 ?>
<input type="hidden" name="envregistrationno_fdest" value="<?php echo NM_encode_input($envregistrationno_fdest) . "\">" . $envregistrationno_fdest . ""; ?>
<?php } else { ?>
<span id="id_read_on_envregistrationno_fdest" class="sc-ui-readonly-envregistrationno_fdest" style=";<?php echo $sStyleReadLab_envregistrationno_fdest; ?>"><?php echo NM_encode_input($this->envregistrationno_fdest); ?></span><span id="id_read_off_envregistrationno_fdest" style="white-space: nowrap;<?php echo $sStyleReadInp_envregistrationno_fdest; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_envregistrationno_fdest" type=text name="envregistrationno_fdest" value="<?php echo NM_encode_input($envregistrationno_fdest) ?>"
 size=15 maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_envregistrationno_fdest_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_envregistrationno_fdest_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 
<?php $sStyleHidden_envregistrationno_fdest_dumb = ('' == $sStyleHidden_envregistrationno_fdest) ? 'display: none' : ''; ?>
    <TD class="scFormDataOdd" id="hidden_field_data_envregistrationno_fdest_dumb" style="<?php echo $sStyleHidden_envregistrationno_fdest_dumb; ?>"></TD>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['producerrequest']))
   {
       $this->nm_new_label['producerrequest'] = "ProducerRequest";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
   $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);
   $producerrequest = $this->producerrequest;
   $sStyleHidden_producerrequest = '';
   if (isset($this->nmgp_cmp_hidden['producerrequest']) && $this->nmgp_cmp_hidden['producerrequest'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['producerrequest']);
       $sStyleHidden_producerrequest = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_producerrequest = 'display: none;';
   $sStyleReadInp_producerrequest = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['producerrequest']) && $this->nmgp_cmp_readonly['producerrequest'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['producerrequest']);
       $sStyleReadLab_producerrequest = '';
       $sStyleReadInp_producerrequest = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['producerrequest']) && $this->nmgp_cmp_hidden['producerrequest'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="producerrequest" value="<?php echo NM_encode_input($this->producerrequest) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_producerrequest" style="<?php echo $sStyleHidden_producerrequest; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><span class="scFormLabelOddFormat" style=";" ><span id="id_label_producerrequest"><?php echo $this->nm_new_label['producerrequest']; ?></span></span><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["producerrequest"]) &&  $this->nmgp_cmp_readonly["producerrequest"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'] = array(); 
}
if ($this->wtprofilid != "")
{ 
   $this->nm_clear_val("wtprofilid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT PrBranchName 
FROM producerbranch 
where ProfilID ='$this->wtprofilid'
ORDER BY PrBranchName";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'][] = $rs->fields[0];
              $nmgp_def_dados .= $rs->fields[0] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0; 
   $producerrequest_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->producerrequest_1))
          {
              foreach ($this->producerrequest_1 as $tmp_producerrequest)
              {
                  if (trim($tmp_producerrequest) === trim($cadaselect[1])) { $producerrequest_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->producerrequest) === trim($cadaselect[1])) { $producerrequest_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="producerrequest" value="<?php echo NM_encode_input($producerrequest) . "\">" . $producerrequest_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'] = array(); 
}
if ($this->wtprofilid != "")
{ 
   $this->nm_clear_val("wtprofilid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'] = array(); 
    }

   $old_value_intnumber = $this->intnumber;
   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_intnumber = $this->intnumber;
   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;

   $nm_comando = "SELECT PrBranchName 
FROM producerbranch 
where ProfilID ='$this->wtprofilid'
ORDER BY PrBranchName";

   $this->intnumber = $old_value_intnumber;
   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['Lookup_producerrequest'][] = $rs->fields[0];
              $nmgp_def_dados .= $rs->fields[0] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
} 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $producerrequest_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->producerrequest_1))
          {
              foreach ($this->producerrequest_1 as $tmp_producerrequest)
              {
                  if (trim($tmp_producerrequest) === trim($cadaselect[1])) { $producerrequest_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->producerrequest) === trim($cadaselect[1])) { $producerrequest_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_producerrequest\" style=\";" .  $sStyleReadLab_producerrequest . "\">" . NM_encode_input($producerrequest_look) . "</span><span id=\"id_read_off_producerrequest\" style=\"" . $sStyleReadInp_producerrequest . "\">";
   echo " <span id=\"idAjaxSelect_producerrequest\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_producerrequest\" name=\"producerrequest\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->producerrequest) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->producerrequest)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td><td style="vertical-align: top; padding: 0px 0px 0px 2px"><table class="scFormFieldErrorTable" style="display: none; position: absolute" id="id_error_display_producerrequest_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_producerrequest_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 1; ?>" >&nbsp;</TD>





<?php } 
?> 






   </td></tr></table>
   </tr>
</TABLE></div><!-- bloco_f -->
</td></tr> 
<tr><td>
<?php
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "R")
{
?>
    <table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormToolbar" style="padding: 0px; spacing: 0px">
    <table style="border-collapse: collapse; border-width: 0px; width: 100%">
    <tr> 
     <td nowrap align="left" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "R")
{
    $NM_btn = false;
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['new'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bnovo", "nm_move ('novo');", "nm_move ('novo');", "sc_b_new_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (!$this->Embutida_call || $this->sc_evento == "novo" || $this->sc_evento == "insert" || $this->sc_evento == "incluir")) {
        $sCondStyle = ($this->nmgp_botoes['insert'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bincluir", "nm_atualiza ('incluir');", "nm_atualiza ('incluir');", "sc_b_ins_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['update'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "balterar", "nm_atualiza ('alterar');", "nm_atualiza ('alterar');", "sc_b_upd_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['delete'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bexcluir", "nm_atualiza ('excluir');", "nm_atualiza ('excluir');", "sc_b_del_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
        $sCondStyle = '';
?>
       <?php
if (is_file($this->Ini->root . $this->Ini->path_img_global . $this->Ini->Img_sep_form))
{
    if ($NM_btn)
    {
        $NM_btn = false;
        $NM_ult_sep = "NM_sep_2";
        echo "<img id=\"NM_sep_2\" style=\"vertical-align: middle\" src=\"" . $this->Ini->path_botoes . $this->Ini->Img_sep_form . "\" />";
    }
}
?>
 
<?php
?> 
     </td> 
     <td nowrap align="center" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
?> 
     </td> 
     <td nowrap align="right" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if ('' != $this->url_webhelp) {
        $sCondStyle = '';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bhelp", "window.open('" . $this->url_webhelp. "', '', 'resizable, scrollbars'); ", "window.open('" . $this->url_webhelp. "', '', 'resizable, scrollbars'); ", "", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (!$this->Embutida_call) {
        $sCondStyle = (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && $nm_apl_dependente != 1 && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "R" && (!$this->aba_iframe || $this->is_calendar_app) && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bsair", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (!$this->Embutida_call) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente == 1 && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (!$this->Embutida_call) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente != 1 || $this->nmgp_botoes['exit'] != "on") && (!$this->aba_iframe && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bsair", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['run_iframe'] != "R")
{
?>
   </td></tr> 
   </table> 
   </td></tr></table> 
<?php
}
?>
<?php
if (!$NM_btn && isset($NM_ult_sep))
{
    echo "    <script language=\"javascript\">";
    echo "      document.getElementById('" .  $NM_ult_sep . "').style.display='none';";
    echo "    </script>";
}
unset($NM_ult_sep);
?>
<?php if ('novo' != $this->nmgp_opcao || $this->Embutida_form) { ?><script>nav_atualiza(Nav_permite_ret, Nav_permite_ava, 'b');</script><?php } ?>
</td></tr> 
<?php
  }
?>
</table> 
</div> 
</td> 
</tr> 
</table> 

<div id="id_debug_window" style="display: none; position: absolute; left: 50px; top: 50px"><table class="scFormMessageTable">
<tr><td class="scFormMessageTitle"><?php echo nmButtonOutput($this->arr_buttons, "berrm_clse", "scAjaxHideDebug()", "scAjaxHideDebug()", "", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
&nbsp;&nbsp;Output</td></tr>
<tr><td class="scFormMessageMessage" style="padding: 0px; vertical-align: top"><div style="padding: 2px; height: 200px; width: 350px; overflow: auto" id="id_debug_text"></div></td></tr>
</table></div>

</form> 
<?php
      $Tzone = ini_get('date.timezone');
      if (empty($Tzone))
      {
?>
<script> 
  _scAjaxShowMessage('', "<?php echo $this->Ini->Nm_lang['lang_errm_tz']; ?>", false, 0, false, "Ok", 0, 0, 0, 0, "", "", "", true, false);
</script> 
<?php
      }
?>
<script> 
<?php
  $nm_sc_blocos_da_pag = array(0,1);

  foreach ($this->Ini->nm_hidden_blocos as $bloco => $hidden)
  {
      if ($hidden == "off" && in_array($bloco, $nm_sc_blocos_da_pag))
      {
          echo "document.getElementById('hidden_bloco_" . $bloco . "').style.display = 'none';";
          if (isset($nm_sc_blocos_aba[$bloco]))
          {
               echo "document.getElementById('id_tabs_" . $nm_sc_blocos_aba[$bloco] . "_" . $bloco . "').style.display = 'none';";
          }
      }
  }
?>
</script> 
<script>
function updateHeaderFooter(sFldName, sFldValue)
{
  if (sFldValue[0] && sFldValue[0]["value"])
  {
    sFldValue = sFldValue[0]["value"];
  }
}
</script>
<?php
if (isset($_POST['master_nav']) && 'on' == $_POST['master_nav'])
{
    $sTamanhoIframe = isset($_POST['sc_ifr_height']) && '' != $_POST['sc_ifr_height'] ? '"' . $_POST['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 parent.scAjaxDetailStatus("calendar_Transporter_wastetransactions_mob");
 parent.scAjaxDetailHeight("calendar_Transporter_wastetransactions_mob", <?php echo $sTamanhoIframe; ?>);
</script>
<?php
}
elseif (isset($_GET['script_case_detail']) && 'Y' == $_GET['script_case_detail'])
{
    $sTamanhoIframe = isset($_GET['sc_ifr_height']) && '' != $_GET['sc_ifr_height'] ? '"' . $_GET['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 parent.scAjaxDetailHeight("calendar_Transporter_wastetransactions_mob", <?php echo $sTamanhoIframe; ?>);
</script>
<?php
}
?>
<?php
if (isset($this->NM_ajax_info['displayMsg']) && $this->NM_ajax_info['displayMsg'])
{
?>
<script type="text/javascript">
_scAjaxShowMessage(scMsgDefTitle, "<?php echo $this->NM_ajax_info['displayMsgTxt']; ?>", false, sc_ajaxMsgTime, false, "Ok", 0, 0, 0, 0, "", "", "", false, true);
</script>
<?php
}
?>
<?php
if ('' != $this->scFormFocusErrorName)
{
?>
<script>
scAjaxFocusError();
</script>
<?php
}
?>
<script>
bLigEditLookupCall = <?php if ($this->lig_edit_lookup_call) { ?>true<?php } else { ?>false<?php } ?>;
function scLigEditLookupCall()
{
<?php
if ($this->lig_edit_lookup && isset($_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['calendar_Transporter_wastetransactions_mob']['sc_modal'])
{
?>
  parent.<?php echo $this->lig_edit_lookup_cb; ?>(<?php echo $this->lig_edit_lookup_row; ?>);
<?php
}
elseif ($this->lig_edit_lookup)
{
?>
  opener.<?php echo $this->lig_edit_lookup_cb; ?>(<?php echo $this->lig_edit_lookup_row; ?>);
<?php
}
?>
}
if (bLigEditLookupCall)
{
  scLigEditLookupCall();
}
<?php
if (isset($this->redir_modal) && !empty($this->redir_modal))
{
    echo $this->redir_modal;
}
?>
</script>
<script type="text/javascript">
$(function() {
 $("#sc-id-mobile-in").mouseover(function() {
  $(this).css("cursor", "pointer");
 }).click(function() {
  scMobileDisplayControl("in");
 });
 $("#sc-id-mobile-out").mouseover(function() {
  $(this).css("cursor", "pointer");
 }).click(function() {
  scMobileDisplayControl("out");
 });
});
function scMobileDisplayControl(sOption) {
 $("#sc-id-mobile-control").val(sOption);
 nm_atualiza("recarga");
}
</script>
<?php
       if (isset($_SESSION['scriptcase']['device_mobile']) && $_SESSION['scriptcase']['device_mobile'])
       {
?>
<span id="sc-id-mobile-out"><?php echo $this->Ini->Nm_lang['lang_version_web']; ?></span>
<?php
       }
?>
</body> 
</html> 
