<?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'] . " - Εντύπου κίνησης αποβλήτων - intnumber"); } else { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmi_titl'] . " - Εντύπου κίνησης αποβλήτων - intnumber"); } ?></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->path_prod; ?>/third/jquery_plugin/calculator/jquery.calculator.js"></SCRIPT>
 <link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/calculator/jquery.calculator.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]['form_wastetransactions']['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" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_progressbar.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_progressbar<?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("form_wastetransactions_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 nm_field_disabled(Fields, Opt) {
  opcao = "<?php if ($GLOBALS["erro_incl"] == 1) {echo "novo";} else {echo $this->nmgp_opcao;} ?>";
  if (opcao == "novo" && Opt == "U") {
      return;
  }
  if (opcao != "novo" && Opt == "I") {
      return;
  }
  Field = Fields.split(";");
  for (i=0; i < Field.length; i++)
  {
     F_temp = Field[i].split("=");
     F_name = F_temp[0];
     F_opc  = (F_temp[1] && ("disabled" == F_temp[1] || "true" == F_temp[1])) ? true : false;
     if (F_name == "wttransportersign")
     {
        $('input[name="wttransportersign"]').prop("disabled", F_opc);
        $('input[name="wttransportersign[]"]').prop("disabled", F_opc);
        $('input[name="wttransportersign_limpa"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('input[name="wttransportersign"]').addClass("scFormInputDisabled");
            $('input[name="wttransportersign_limpa"]').addClass("scFormInputDisabled");
        }
        else {
            $('input[name="wttransportersign"]').removeClass("scFormInputDisabled");
            $('input[name="wttransportersign_limpa"]').removeClass("scFormInputDisabled");
        }
     }
     if (F_name == "wtfdestsign")
     {
        $('input[name="wtfdestsign"]').prop("disabled", F_opc);
        $('input[name="wtfdestsign[]"]').prop("disabled", F_opc);
        $('input[name="wtfdestsign_limpa"]').prop("disabled", F_opc);
        if (F_opc == "disabled" || F_opc == true) {
            $('input[name="wtfdestsign"]').addClass("scFormInputDisabled");
            $('input[name="wtfdestsign_limpa"]').addClass("scFormInputDisabled");
        }
        else {
            $('input[name="wtfdestsign"]').removeClass("scFormInputDisabled");
            $('input[name="wtfdestsign_limpa"]').removeClass("scFormInputDisabled");
        }
     }
  }
 } // nm_field_disabled
<?php

include_once('form_wastetransactions_jquery.php');

?>

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

  scJQElementsAdd('');

  scJQGeneralAdd();

  sc_form_onload();

  $(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() {
   });
 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]['form_wastetransactions']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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]['form_wastetransactions']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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("form_wastetransactions_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" enctype="multipart/form-data" 
               action="./" 
               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]['form_wastetransactions']['insert_validation'] = md5(time() . rand(1, 99999));
?>
<input type="hidden" name="nmgp_ins_valid" value="<?php echo $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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="upload_file_flag" value="">
<input type="hidden" name="upload_file_check" value="">
<input type="hidden" name="upload_file_name" value="">
<input type="hidden" name="upload_file_temp" value="">
<input type="hidden" name="upload_file_libs" value="">
<input type="hidden" name="upload_file_height" value="">
<input type="hidden" name="upload_file_width" value="">
<input type="hidden" name="upload_file_aspect" value="">
<input type="hidden" name="upload_file_type" value="">
<input type="hidden" name="_sc_force_mobile" id="sc-id-mobile-control" value="" />
<?php
$_SESSION['scriptcase']['error_span_title']['form_wastetransactions'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['form_wastetransactions'] = '' != $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  width="50%%">
 <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]['form_wastetransactions']['mostra_cab']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['mostra_cab'] != "N"))
  {
?>
<tr><td>
<style>
#lin1_col1 { padding-left:9px; padding-top:7px;  height:27px; overflow:hidden; text-align:left;}			 
#lin1_col2 { padding-right:9px; padding-top:7px; height:27px; text-align:right; overflow:hidden;   font-size:12px; font-weight:normal;}
</style>

<div style="width: 100%">
 <div class="scFormHeader" style="height:11px; display: block; border-width:0px; "></div>
 <div style="height:37px; border-width:0px 0px 1px 0px;  border-style: dashed; border-color:#ddd; display: block">
 	<table style="width:100%; border-collapse:collapse; padding:0;">
    	<tr>
        	<td id="lin1_col1" class="scFormHeaderFont"><span><?php echo "Αριθμός εντύπου κίνησης αποβλήτων ( $this->intnumber )" ?></span></td>
            <td id="lin1_col2" class="scFormHeaderFont"><span><IMG SRC="<?php echo $this->Ini->path_imag_cab ?>/scriptcase__NM__ico__NM__contract_32.png" BORDER="0"/></span></td>
        </tr>
    </table>		 
 </div>
</div>
</td></tr>
<?php
  }
?>
<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]['form_wastetransactions']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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]['form_wastetransactions']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['run_iframe'] != "R")
{
    $NM_btn = false;
?> 
     </td> 
     <td nowrap align="center" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    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_t", "", "", "" . $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_t", "", "", "" . $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_t", "", "", "" . $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_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['sc_btn_0'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "sc_btn_0", "sc_btn_sc_btn_0()", "sc_btn_sc_btn_0()", "sc_sc_btn_0_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
?> 
     </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]['form_wastetransactions']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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_t", "", "", "" . $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]['form_wastetransactions']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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_t", "", "", "" . $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]['form_wastetransactions']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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_t", "", "", "" . $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]['form_wastetransactions']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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, 't');</script><?php } ?>
</td></tr> 
<tr><td>
<?php
  if ($this->nmgp_form_empty)
  {
       if (!empty($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['where_filter']))
       {
           $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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>
<?php
?>
<script type="text/javascript">
function sc_change_tabs(bTabDisp, sTabId, sTabParts)
{
  if (document.getElementById(sTabId)) {
    if (bTabDisp) {
      document.getElementById("div_" + sTabId).style.width = "";
      document.getElementById("div_" + sTabId).style.height = "";
      document.getElementById("div_" + sTabId).style.display = "";
      document.getElementById("div_" + sTabId).style.overflow = "visible";
      document.getElementById(sTabParts).className = "scTabActive";
    }
    else {
      document.getElementById("div_" + sTabId).style.width = "1px";
      document.getElementById("div_" + sTabId).style.height = "0px";
      document.getElementById("div_" + sTabId).style.display = "none";
      document.getElementById("div_" + sTabId).style.overflow = "scroll";
      document.getElementById(sTabParts).className = "scTabInactive";
    }
  }
}
</script>
<input type="hidden" name="wttransportersign_ul_name" id="id_sc_field_wttransportersign_ul_name" value="<?php echo NM_encode_input($this->wttransportersign_ul_name);?>">
<input type="hidden" name="wttransportersign_ul_type" id="id_sc_field_wttransportersign_ul_type" value="<?php echo NM_encode_input($this->wttransportersign_ul_type);?>">
<input type="hidden" name="wtproducersign_ul_name" id="id_sc_field_wtproducersign_ul_name" value="<?php echo NM_encode_input($this->wtproducersign_ul_name);?>">
<input type="hidden" name="wtproducersign_ul_type" id="id_sc_field_wtproducersign_ul_type" value="<?php echo NM_encode_input($this->wtproducersign_ul_type);?>">
<input type="hidden" name="wtfdestsign_ul_name" id="id_sc_field_wtfdestsign_ul_name" value="<?php echo NM_encode_input($this->wtfdestsign_ul_name);?>">
<input type="hidden" name="wtfdestsign_ul_type" id="id_sc_field_wtfdestsign_ul_type" value="<?php echo NM_encode_input($this->wtfdestsign_ul_type);?>">
<script type="text/javascript">
function sc_control_tabs_0(iTabIndex)
{
  sc_change_tabs(iTabIndex == 0, 'hidden_bloco_0', 'id_tabs_0_0');
  sc_change_tabs(iTabIndex == 1, 'hidden_bloco_1', 'id_tabs_0_1');
  sc_change_tabs(iTabIndex == 2, 'hidden_bloco_2', 'id_tabs_0_2');
  sc_change_tabs(iTabIndex == 3, 'hidden_bloco_3', 'id_tabs_0_3');
}
</script>
<ul class="scTabLine">
<li id="id_tabs_0_0" class="scTabActive"><a href="javascript: sc_control_tabs_0(0)">Παραγωγός ή κάτοχος</a></li>
<li id="id_tabs_0_1" class="scTabInactive"><a href="javascript: sc_control_tabs_0(1)">Μεταφορέας</a></li>
<li id="id_tabs_0_2" class="scTabInactive"><a href="javascript: sc_control_tabs_0(2)">Τελικός αποδέκτης</a></li>
<li id="id_tabs_0_3" class="scTabInactive"><a href="javascript: sc_control_tabs_0(3)">Παρατηρήσεις</a></li>
</ul>
<div style='clear:both'></div>
<div id="div_hidden_bloco_0"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_0" class="scFormTable" cellpadding="0" cellspacing="0" border="0" 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['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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtrequestdate" style="<?php echo $sStyleHidden_wtrequestdate; ?>width:100px;"><span id="id_label_wtrequestdate"><?php echo $this->nm_new_label['wtrequestdate']; ?></span></TD>
    <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">
<?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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtproducerbranchid" style="<?php echo $sStyleHidden_wtproducerbranchid; ?>;"><span id="id_label_wtproducerbranchid"><?php echo $this->nm_new_label['wtproducerbranchid']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['php_cmp_required']['wtproducerbranchid']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['php_cmp_required']['wtproducerbranchid'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <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">
<?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]['form_wastetransactions']['Lookup_wtproducerbranchid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT PrBID, PrBranchName 
FROM producerbranch 
where ProfilID = " . $_SESSION['ProfilID'] . "
ORDER BY PrBranchName";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerbranchid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerbranchid'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT PrBID, PrBranchName 
FROM producerbranch 
where ProfilID = " . $_SESSION['ProfilID'] . "
ORDER BY PrBranchName";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerbranchid'][] = 'null'; 
   echo "  <option value=\"null\">---Επιλογή εγκατάστασης---</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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtproducerperiferia" style="<?php echo $sStyleHidden_wtproducerperiferia; ?>;"><span id="id_label_wtproducerperiferia"><?php echo $this->nm_new_label['wtproducerperiferia']; ?></span></TD>
    <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">
<?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]['form_wastetransactions']['Lookup_wtproducerperiferia']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerperiferia']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

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

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerperiferia']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerperiferia']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

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

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['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" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerperiferia'][] = ''; 
   echo "  <option value=\"\">---Περιφέρεια εγκατάστασης---</option>" ; 
   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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['producerb_address']))
    {
        $this->nm_new_label['producerb_address'] = "Διεύθυνση εγκατάστασης";
    }
?>
<?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);
   $producerb_address = $this->producerb_address;
   $sStyleHidden_producerb_address = '';
   if (isset($this->nmgp_cmp_hidden['producerb_address']) && $this->nmgp_cmp_hidden['producerb_address'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['producerb_address']);
       $sStyleHidden_producerb_address = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_producerb_address = 'display: none;';
   $sStyleReadInp_producerb_address = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['producerb_address']) && $this->nmgp_cmp_readonly['producerb_address'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['producerb_address']);
       $sStyleReadLab_producerb_address = '';
       $sStyleReadInp_producerb_address = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['producerb_address']) && $this->nmgp_cmp_hidden['producerb_address'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="producerb_address" value="<?php echo NM_encode_input($producerb_address) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_producerb_address" style="<?php echo $sStyleHidden_producerb_address; ?>vertical-align:text-top;"><span id="id_label_producerb_address"><?php echo $this->nm_new_label['producerb_address']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_producerb_address" style="<?php echo $sStyleHidden_producerb_address; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="producerb_address" value="<?php echo NM_encode_input($producerb_address); ?>"><span id="id_ajax_label_producerb_address"><?php echo nl2br($producerb_address); ?></span>

<?php
$producerb_address_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($producerb_address));

?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_producerb_address_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_producerb_address_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['prbrresponse']))
    {
        $this->nm_new_label['prbrresponse'] = "Υπεύθυνος";
    }
?>
<?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);
   $prbrresponse = $this->prbrresponse;
   $sStyleHidden_prbrresponse = '';
   if (isset($this->nmgp_cmp_hidden['prbrresponse']) && $this->nmgp_cmp_hidden['prbrresponse'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['prbrresponse']);
       $sStyleHidden_prbrresponse = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_prbrresponse = 'display: none;';
   $sStyleReadInp_prbrresponse = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['prbrresponse']) && $this->nmgp_cmp_readonly['prbrresponse'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['prbrresponse']);
       $sStyleReadLab_prbrresponse = '';
       $sStyleReadInp_prbrresponse = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['prbrresponse']) && $this->nmgp_cmp_hidden['prbrresponse'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="prbrresponse" value="<?php echo NM_encode_input($prbrresponse) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_prbrresponse" style="<?php echo $sStyleHidden_prbrresponse; ?>vertical-align:text-top;"><span id="id_label_prbrresponse"><?php echo $this->nm_new_label['prbrresponse']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_prbrresponse" style="<?php echo $sStyleHidden_prbrresponse; ?>width:60px;height:60px;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="width:60px;height:60px;;vertical-align: top;padding: 0px"><input type="hidden" name="prbrresponse" value="<?php echo NM_encode_input($prbrresponse); ?>"><span id="id_ajax_label_prbrresponse"><?php echo nl2br($prbrresponse); ?></span>

<?php
$prbrresponse_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($prbrresponse));

?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_prbrresponse_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_prbrresponse_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['pphone']))
    {
        $this->nm_new_label['pphone'] = "Τηλέφωνο υπευθύνου";
    }
?>
<?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);
   $pphone = $this->pphone;
   $sStyleHidden_pphone = '';
   if (isset($this->nmgp_cmp_hidden['pphone']) && $this->nmgp_cmp_hidden['pphone'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['pphone']);
       $sStyleHidden_pphone = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_pphone = 'display: none;';
   $sStyleReadInp_pphone = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['pphone']) && $this->nmgp_cmp_readonly['pphone'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['pphone']);
       $sStyleReadLab_pphone = '';
       $sStyleReadInp_pphone = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['pphone']) && $this->nmgp_cmp_hidden['pphone'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="pphone" value="<?php echo NM_encode_input($pphone) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_pphone" style="<?php echo $sStyleHidden_pphone; ?>;"><span id="id_label_pphone"><?php echo $this->nm_new_label['pphone']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_pphone" style="<?php echo $sStyleHidden_pphone; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="pphone" value="<?php echo NM_encode_input($pphone); ?>"><span id="id_ajax_label_pphone"><?php echo nl2br($pphone); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_pphone_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_pphone_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['premail']))
    {
        $this->nm_new_label['premail'] = "Email υπευθύνου";
    }
?>
<?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);
   $premail = $this->premail;
   $sStyleHidden_premail = '';
   if (isset($this->nmgp_cmp_hidden['premail']) && $this->nmgp_cmp_hidden['premail'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['premail']);
       $sStyleHidden_premail = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_premail = 'display: none;';
   $sStyleReadInp_premail = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['premail']) && $this->nmgp_cmp_readonly['premail'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['premail']);
       $sStyleReadLab_premail = '';
       $sStyleReadInp_premail = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['premail']) && $this->nmgp_cmp_hidden['premail'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="premail" value="<?php echo NM_encode_input($premail) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_premail" style="<?php echo $sStyleHidden_premail; ?>;"><span id="id_label_premail"><?php echo $this->nm_new_label['premail']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_premail" style="<?php echo $sStyleHidden_premail; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="premail" value="<?php echo NM_encode_input($premail); ?>"><span id="id_ajax_label_premail"><?php echo nl2br($premail); ?></span>
&nbsp;<?php if ($this->nmgp_opcao != "novo"){ ?><?php echo nmButtonOutput($this->arr_buttons, "bemail", "if (document.F1.premail.value != '') {window.open('mailto:' + document.F1.premail.value); }", "if (document.F1.premail.value != '') {window.open('mailto:' + document.F1.premail.value); }", "premail_mail", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
<?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_premail_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_premail_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtproducerewc" style="<?php echo $sStyleHidden_wtproducerewc; ?>;"><span id="id_label_wtproducerewc"><?php echo $this->nm_new_label['wtproducerewc']; ?></span></TD>
    <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">
<?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]['form_wastetransactions']['Lookup_wtproducerewc']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerewc']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

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

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerewc']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerewc']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtproducerewc'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

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

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wtproducerewc'][] = 'null'; 
   echo "  <option value=\"null\">---Επιλογή αποβλήτου---</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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['ewctitle']))
    {
        $this->nm_new_label['ewctitle'] = "Περιγραφή αποβλήτου";
    }
?>
<?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);
   $ewctitle = $this->ewctitle;
   $sStyleHidden_ewctitle = '';
   if (isset($this->nmgp_cmp_hidden['ewctitle']) && $this->nmgp_cmp_hidden['ewctitle'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['ewctitle']);
       $sStyleHidden_ewctitle = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_ewctitle = 'display: none;';
   $sStyleReadInp_ewctitle = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['ewctitle']) && $this->nmgp_cmp_readonly['ewctitle'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['ewctitle']);
       $sStyleReadLab_ewctitle = '';
       $sStyleReadInp_ewctitle = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['ewctitle']) && $this->nmgp_cmp_hidden['ewctitle'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="ewctitle" value="<?php echo NM_encode_input($ewctitle) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_ewctitle" style="<?php echo $sStyleHidden_ewctitle; ?>;"><span id="id_label_ewctitle"><?php echo $this->nm_new_label['ewctitle']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['php_cmp_required']['ewctitle']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['php_cmp_required']['ewctitle'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_ewctitle" style="<?php echo $sStyleHidden_ewctitle; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="ewctitle" value="<?php echo NM_encode_input($ewctitle); ?>"><span id="id_ajax_label_ewctitle"><?php echo nl2br($ewctitle); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_ewctitle_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_ewctitle_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtproducerqty" style="<?php echo $sStyleHidden_wtproducerqty; ?>;"><span id="id_label_wtproducerqty"><?php echo $this->nm_new_label['wtproducerqty']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerqty" style="<?php echo $sStyleHidden_wtproducerqty; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?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=";<?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:right;" id="id_sc_field_wtproducerqty" type=text name="wtproducerqty" value="<?php echo NM_encode_input($wtproducerqty) ?>"
 size=8 alt="{datatype: 'decimal', maxLength: 8, precision: 3, decimalSep: '<?php echo str_replace("'", "\'", $this->field_config['wtproducerqty']['symbol_dec']); ?>', thousandsSep: '', thousandsFormat: <?php echo $this->field_config['wtproducerqty']['symbol_fmt']; ?>, manualDecimals: true, allowNegative: true, onlyNegative: false, enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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'] = "Κυβικά";
    }
?>
<?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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtprducerm3" style="<?php echo $sStyleHidden_wtprducerm3; ?>;"><span id="id_label_wtprducerm3"><?php echo $this->nm_new_label['wtprducerm3']; ?></span></TD>
    <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">
<?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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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(); 
          $this->wtproduceracceptweigth= "";
      } 
      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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtproduceracceptweigth" style="<?php echo $sStyleHidden_wtproduceracceptweigth; ?>;"><span id="id_label_wtproduceracceptweigth"><?php echo $this->nm_new_label['wtproduceracceptweigth']; ?></span></TD>
    <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">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtproduceracceptweigth"]) &&  $this->nmgp_cmp_readonly["wtproduceracceptweigth"] == "on") { 

$wtproduceracceptweigth_look = "";
 if ($this->wtproduceracceptweigth == "1") { $wtproduceracceptweigth_look .= "Αποδέχομαι το βάρος του παραλήτη " ;} 
?>
<input type="hidden" name="wtproduceracceptweigth" value="<?php echo NM_encode_input($wtproduceracceptweigth) . "\">" . $wtproduceracceptweigth_look . ""; ?>
<?php } else { ?>

<?php

$wtproduceracceptweigth_look = "";
 if ($this->wtproduceracceptweigth == "1") { $wtproduceracceptweigth_look .= "Αποδέχομαι το βάρος του παραλήτη " ;} 
?>
<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]['form_wastetransactions']['Lookup_wtproduceracceptweigth'][] = '1'; ?>
<?php  if (in_array("1", $this->wtproduceracceptweigth_1))  { echo " checked" ;} ?> onClick="" >Αποδέχομαι το βάρος του παραλήτη </TD>
</TR></TABLE>
<?php echo "</div>\r\n"; ?></span><?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wtproducersign']))
    {
        $this->nm_new_label['wtproducersign'] = "Ψηφιακή υπογραφή παραγωγού";
    }
?>
<?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);
   $wtproducersign = $this->wtproducersign;
   $sStyleHidden_wtproducersign = '';
   if (isset($this->nmgp_cmp_hidden['wtproducersign']) && $this->nmgp_cmp_hidden['wtproducersign'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtproducersign']);
       $sStyleHidden_wtproducersign = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtproducersign = 'display: none;';
   $sStyleReadInp_wtproducersign = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtproducersign']) && $this->nmgp_cmp_readonly['wtproducersign'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtproducersign']);
       $sStyleReadLab_wtproducersign = '';
       $sStyleReadInp_wtproducersign = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtproducersign']) && $this->nmgp_cmp_hidden['wtproducersign'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtproducersign" value="<?php echo NM_encode_input($wtproducersign) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtproducersign" style="<?php echo $sStyleHidden_wtproducersign; ?>;"><span id="id_label_wtproducersign"><?php echo $this->nm_new_label['wtproducersign']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtproducersign" style="<?php echo $sStyleHidden_wtproducersign; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
 <script>var var_ajax_img_wtproducersign = '<?php echo $out_wtproducersign; ?>';</script><?php if (!empty($out_wtproducersign)) {  echo "<img id=\"id_ajax_img_wtproducersign\" border=\"0\" src=\"$out_wtproducersign\">"; } else {  echo "<img id=\"id_ajax_img_wtproducersign\" border=\"0\" style=\"display: none\">"; } ?><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtproducersign"]) &&  $this->nmgp_cmp_readonly["wtproducersign"] == "on") { 

 ?>
<img id=\"wtproducersign_img_uploading\" style=\"display: none\" border=\"0\" src=\"" . $this->Ini->path_icones . "/scriptcase__NM__ajax_load.gif\" align=\"absmiddle\" /><input type="hidden" name="wtproducersign" value="<?php echo NM_encode_input($wtproducersign) . "\">" . $wtproducersign . ""; ?>
<?php } else { ?>
<span id="id_read_off_wtproducersign" style="white-space: nowrap;<?php echo $sStyleReadInp_wtproducersign; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" type="file" name="wtproducersign[]" id="id_sc_field_wtproducersign" onchange="<?php if ($this->nmgp_opcao == "novo") {echo "if (document.F1.elements['sc_check_vert[" . $sc_seq_vert . "]']) { document.F1.elements['sc_check_vert[" . $sc_seq_vert . "]'].checked = true }"; }?>" alt="{enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><span id="chk_ajax_img_wtproducersign"<?php if ($this->nmgp_opcao == "novo" || empty($wtproducersign)) { echo " style=\"display: none\""; } ?>> <input type=checkbox name="wtproducersign_limpa" value="<?php echo $wtproducersign_limpa . '" '; if ($wtproducersign_limpa == "S"){echo "checked ";} ?> onclick="this.value = ''; if (this.checked){ this.value = 'S'};"><?php echo $this->Ini->Nm_lang['lang_btns_dele_hint']; ?> &nbsp;</span><img id="wtproducersign_img_uploading" style="display: none" border="0" src="<?php echo $this->Ini->path_icones; ?>/scriptcase__NM__ajax_load.gif" align="absmiddle" /><div id="id_img_loader_wtproducersign" class="progress progress-success progress-striped active scProgressBarStart" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" style="display: none"><div class="bar scProgressBarLoading">&nbsp;</div></div><img id="id_ajax_loader_wtproducersign" src="<?php echo $this->Ini->path_icones ?>/scriptcase__NM__ajax_load.gif" style="display: none" /></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtproducersign_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtproducersign_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wttransporterid" style="<?php echo $sStyleHidden_wttransporterid; ?>background-color:#CC0033;"><span id="id_label_wttransporterid"><?php echo $this->nm_new_label['wttransporterid']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['php_cmp_required']['wttransporterid']) || $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['php_cmp_required']['wttransporterid'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wttransporterid" style="<?php echo $sStyleHidden_wttransporterid; ?>background-color:#CC0033;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="background-color:#CC0033;;vertical-align: top;padding: 0px">
<?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]['form_wastetransactions']['Lookup_wttransporterid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT TransporterID, Trans_Title 
FROM transporter 
WHERE ProfilID= " . $_SESSION['ProfilID'] . "
ORDER BY Trans_Title";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['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]['form_wastetransactions']['Lookup_wttransporterid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT TransporterID, Trans_Title 
FROM transporter 
WHERE ProfilID= " . $_SESSION['ProfilID'] . "
ORDER BY Trans_Title";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['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=\"background-color:#CC0033;" .  $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=\";\" id=\"id_sc_field_wttransporterid\" name=\"wttransporterid\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wttransporterid'][] = 'null'; 
   echo "  <option value=\"null\">---Επιλογή μεταφορέα---</option>" ; 
   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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 


   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_1"></a>
<div id="div_hidden_bloco_1" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- 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['wttransportdate']))
    {
        $this->nm_new_label['wttransportdate'] = "Ημερομηνία μεταφοράς";
    }
?>
<?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);
   $wttransportdate = $this->wttransportdate;
   $sStyleHidden_wttransportdate = '';
   if (isset($this->nmgp_cmp_hidden['wttransportdate']) && $this->nmgp_cmp_hidden['wttransportdate'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wttransportdate']);
       $sStyleHidden_wttransportdate = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wttransportdate = 'display: none;';
   $sStyleReadInp_wttransportdate = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wttransportdate']) && $this->nmgp_cmp_readonly['wttransportdate'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wttransportdate']);
       $sStyleReadLab_wttransportdate = '';
       $sStyleReadInp_wttransportdate = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wttransportdate']) && $this->nmgp_cmp_hidden['wttransportdate'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wttransportdate" value="<?php echo NM_encode_input($wttransportdate) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wttransportdate" style="<?php echo $sStyleHidden_wttransportdate; ?>width:100px;"><span id="id_label_wttransportdate"><?php echo $this->nm_new_label['wttransportdate']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wttransportdate" style="<?php echo $sStyleHidden_wttransportdate; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wttransportdate"]) &&  $this->nmgp_cmp_readonly["wttransportdate"] == "on") { 

 ?>
<input type="hidden" name="wttransportdate" value="<?php echo NM_encode_input($wttransportdate) . "\">" . $wttransportdate . ""; ?>
<?php } else { ?>
<span id="id_read_on_wttransportdate" class="sc-ui-readonly-wttransportdate" style=";<?php echo $sStyleReadLab_wttransportdate; ?>"><?php echo NM_encode_input($wttransportdate); ?></span><span id="id_read_off_wttransportdate" style="white-space: nowrap;<?php echo $sStyleReadInp_wttransportdate; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_wttransportdate" type=text name="wttransportdate" value="<?php echo NM_encode_input($wttransportdate) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['wttransportdate']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['wttransportdate']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['wttransportdate']['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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wttransportdate_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wttransportdate_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wttransportervechicle']))
    {
        $this->nm_new_label['wttransportervechicle'] = "Οχημα μεταφοράς";
    }
?>
<?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);
   $wttransportervechicle = $this->wttransportervechicle;
   $sStyleHidden_wttransportervechicle = '';
   if (isset($this->nmgp_cmp_hidden['wttransportervechicle']) && $this->nmgp_cmp_hidden['wttransportervechicle'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wttransportervechicle']);
       $sStyleHidden_wttransportervechicle = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wttransportervechicle = 'display: none;';
   $sStyleReadInp_wttransportervechicle = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wttransportervechicle']) && $this->nmgp_cmp_readonly['wttransportervechicle'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wttransportervechicle']);
       $sStyleReadLab_wttransportervechicle = '';
       $sStyleReadInp_wttransportervechicle = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wttransportervechicle']) && $this->nmgp_cmp_hidden['wttransportervechicle'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wttransportervechicle" value="<?php echo NM_encode_input($wttransportervechicle) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wttransportervechicle" style="<?php echo $sStyleHidden_wttransportervechicle; ?>;"><span id="id_label_wttransportervechicle"><?php echo $this->nm_new_label['wttransportervechicle']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wttransportervechicle" style="<?php echo $sStyleHidden_wttransportervechicle; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wttransportervechicle"]) &&  $this->nmgp_cmp_readonly["wttransportervechicle"] == "on") { 

 ?>
<input type="hidden" name="wttransportervechicle" value="<?php echo NM_encode_input($wttransportervechicle) . "\">" . $wttransportervechicle . ""; ?>
<?php } else { ?>
<span id="id_read_on_wttransportervechicle" class="sc-ui-readonly-wttransportervechicle" style=";<?php echo $sStyleReadLab_wttransportervechicle; ?>"><?php echo NM_encode_input($this->wttransportervechicle); ?></span><span id="id_read_off_wttransportervechicle" style="white-space: nowrap;<?php echo $sStyleReadInp_wttransportervechicle; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_wttransportervechicle" type=text name="wttransportervechicle" value="<?php echo NM_encode_input($wttransportervechicle) ?>"
 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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wttransportervechicle_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wttransportervechicle_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['envregistrationno_transporter']))
           {
               $this->nmgp_cmp_readonly['envregistrationno_transporter'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['wttransporternumberid']))
    {
        $this->nm_new_label['wttransporternumberid'] = "Αρ.Εντύπου αναγνώρισης";
    }
?>
<?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);
   $wttransporternumberid = $this->wttransporternumberid;
   $sStyleHidden_wttransporternumberid = '';
   if (isset($this->nmgp_cmp_hidden['wttransporternumberid']) && $this->nmgp_cmp_hidden['wttransporternumberid'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wttransporternumberid']);
       $sStyleHidden_wttransporternumberid = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wttransporternumberid = 'display: none;';
   $sStyleReadInp_wttransporternumberid = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wttransporternumberid']) && $this->nmgp_cmp_readonly['wttransporternumberid'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wttransporternumberid']);
       $sStyleReadLab_wttransporternumberid = '';
       $sStyleReadInp_wttransporternumberid = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wttransporternumberid']) && $this->nmgp_cmp_hidden['wttransporternumberid'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wttransporternumberid" value="<?php echo NM_encode_input($wttransporternumberid) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wttransporternumberid" style="<?php echo $sStyleHidden_wttransporternumberid; ?>;"><span id="id_label_wttransporternumberid"><?php echo $this->nm_new_label['wttransporternumberid']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wttransporternumberid" style="<?php echo $sStyleHidden_wttransporternumberid; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wttransporternumberid"]) &&  $this->nmgp_cmp_readonly["wttransporternumberid"] == "on") { 

 ?>
<input type="hidden" name="wttransporternumberid" value="<?php echo NM_encode_input($wttransporternumberid) . "\">" . $wttransporternumberid . ""; ?>
<?php } else { ?>
<span id="id_read_on_wttransporternumberid" class="sc-ui-readonly-wttransporternumberid" style=";<?php echo $sStyleReadLab_wttransporternumberid; ?>"><?php echo NM_encode_input($this->wttransporternumberid); ?></span><span id="id_read_off_wttransporternumberid" style="white-space: nowrap;<?php echo $sStyleReadInp_wttransporternumberid; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_wttransporternumberid" type=text name="wttransporternumberid" value="<?php echo NM_encode_input($wttransporternumberid) ?>"
 size=10 maxlength=10 alt="{datatype: 'text', maxLength: 10, allowedChars: '<?php echo $this->allowedCharsCharset("0123456789") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wttransporternumberid_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wttransporternumberid_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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'] = "Αρ. Μητρώου";
    }
?>
<?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" && $this->nmgp_opc_ant != "incluir") || */(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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_envregistrationno_transporter" style="<?php echo $sStyleHidden_envregistrationno_transporter; ?>;"><span id="id_label_envregistrationno_transporter"><?php echo $this->nm_new_label['envregistrationno_transporter']; ?></span></TD>
    <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">
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (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) . "\"><span id=\"id_ajax_label_envregistrationno_transporter\">" . $envregistrationno_transporter . "</span>"; ?>
<?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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['transporterresponse']))
    {
        $this->nm_new_label['transporterresponse'] = "Υπεύθυνος μεταφοράς";
    }
?>
<?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);
   $transporterresponse = $this->transporterresponse;
   $sStyleHidden_transporterresponse = '';
   if (isset($this->nmgp_cmp_hidden['transporterresponse']) && $this->nmgp_cmp_hidden['transporterresponse'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['transporterresponse']);
       $sStyleHidden_transporterresponse = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_transporterresponse = 'display: none;';
   $sStyleReadInp_transporterresponse = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['transporterresponse']) && $this->nmgp_cmp_readonly['transporterresponse'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['transporterresponse']);
       $sStyleReadLab_transporterresponse = '';
       $sStyleReadInp_transporterresponse = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['transporterresponse']) && $this->nmgp_cmp_hidden['transporterresponse'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="transporterresponse" value="<?php echo NM_encode_input($transporterresponse) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_transporterresponse" style="<?php echo $sStyleHidden_transporterresponse; ?>;"><span id="id_label_transporterresponse"><?php echo $this->nm_new_label['transporterresponse']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_transporterresponse" style="<?php echo $sStyleHidden_transporterresponse; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="transporterresponse" value="<?php echo NM_encode_input($transporterresponse); ?>"><span id="id_ajax_label_transporterresponse"><?php echo nl2br($transporterresponse); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_transporterresponse_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_transporterresponse_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['transporteremail']))
    {
        $this->nm_new_label['transporteremail'] = "Email";
    }
?>
<?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);
   $transporteremail = $this->transporteremail;
   $sStyleHidden_transporteremail = '';
   if (isset($this->nmgp_cmp_hidden['transporteremail']) && $this->nmgp_cmp_hidden['transporteremail'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['transporteremail']);
       $sStyleHidden_transporteremail = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_transporteremail = 'display: none;';
   $sStyleReadInp_transporteremail = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['transporteremail']) && $this->nmgp_cmp_readonly['transporteremail'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['transporteremail']);
       $sStyleReadLab_transporteremail = '';
       $sStyleReadInp_transporteremail = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['transporteremail']) && $this->nmgp_cmp_hidden['transporteremail'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="transporteremail" value="<?php echo NM_encode_input($transporteremail) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_transporteremail" style="<?php echo $sStyleHidden_transporteremail; ?>;"><span id="id_label_transporteremail"><?php echo $this->nm_new_label['transporteremail']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_transporteremail" style="<?php echo $sStyleHidden_transporteremail; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="transporteremail" value="<?php echo NM_encode_input($transporteremail); ?>"><span id="id_ajax_label_transporteremail"><?php echo nl2br($transporteremail); ?></span>
&nbsp;<?php if ($this->nmgp_opcao != "novo"){ ?><?php echo nmButtonOutput($this->arr_buttons, "bemail", "if (document.F1.transporteremail.value != '') {window.open('mailto:' + document.F1.transporteremail.value); }", "if (document.F1.transporteremail.value != '') {window.open('mailto:' + document.F1.transporteremail.value); }", "transporteremail_mail", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
<?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_transporteremail_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_transporteremail_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['transporterphone']))
    {
        $this->nm_new_label['transporterphone'] = "Τηλέφωνο υπευθύνου";
    }
?>
<?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);
   $transporterphone = $this->transporterphone;
   $sStyleHidden_transporterphone = '';
   if (isset($this->nmgp_cmp_hidden['transporterphone']) && $this->nmgp_cmp_hidden['transporterphone'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['transporterphone']);
       $sStyleHidden_transporterphone = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_transporterphone = 'display: none;';
   $sStyleReadInp_transporterphone = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['transporterphone']) && $this->nmgp_cmp_readonly['transporterphone'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['transporterphone']);
       $sStyleReadLab_transporterphone = '';
       $sStyleReadInp_transporterphone = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['transporterphone']) && $this->nmgp_cmp_hidden['transporterphone'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="transporterphone" value="<?php echo NM_encode_input($transporterphone) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_transporterphone" style="<?php echo $sStyleHidden_transporterphone; ?>;"><span id="id_label_transporterphone"><?php echo $this->nm_new_label['transporterphone']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_transporterphone" style="<?php echo $sStyleHidden_transporterphone; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="transporterphone" value="<?php echo NM_encode_input($transporterphone); ?>"><span id="id_ajax_label_transporterphone"><?php echo nl2br($transporterphone); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_transporterphone_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_transporterphone_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['transporterfax']))
    {
        $this->nm_new_label['transporterfax'] = "Fax υπευθύνου";
    }
?>
<?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);
   $transporterfax = $this->transporterfax;
   $sStyleHidden_transporterfax = '';
   if (isset($this->nmgp_cmp_hidden['transporterfax']) && $this->nmgp_cmp_hidden['transporterfax'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['transporterfax']);
       $sStyleHidden_transporterfax = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_transporterfax = 'display: none;';
   $sStyleReadInp_transporterfax = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['transporterfax']) && $this->nmgp_cmp_readonly['transporterfax'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['transporterfax']);
       $sStyleReadLab_transporterfax = '';
       $sStyleReadInp_transporterfax = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['transporterfax']) && $this->nmgp_cmp_hidden['transporterfax'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="transporterfax" value="<?php echo NM_encode_input($transporterfax) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_transporterfax" style="<?php echo $sStyleHidden_transporterfax; ?>;"><span id="id_label_transporterfax"><?php echo $this->nm_new_label['transporterfax']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_transporterfax" style="<?php echo $sStyleHidden_transporterfax; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="transporterfax" value="<?php echo NM_encode_input($transporterfax); ?>"><span id="id_ajax_label_transporterfax"><?php echo nl2br($transporterfax); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_transporterfax_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_transporterfax_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['checktransvsproducer']))
    {
        $this->nm_new_label['checktransvsproducer'] = "Ελενχος μεταφοράς απο παραγωγό";
    }
?>
<?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);
   $checktransvsproducer = $this->checktransvsproducer;
   $sStyleHidden_checktransvsproducer = '';
   if (isset($this->nmgp_cmp_hidden['checktransvsproducer']) && $this->nmgp_cmp_hidden['checktransvsproducer'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['checktransvsproducer']);
       $sStyleHidden_checktransvsproducer = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_checktransvsproducer = 'display: none;';
   $sStyleReadInp_checktransvsproducer = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['checktransvsproducer']) && $this->nmgp_cmp_readonly['checktransvsproducer'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['checktransvsproducer']);
       $sStyleReadLab_checktransvsproducer = '';
       $sStyleReadInp_checktransvsproducer = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['checktransvsproducer']) && $this->nmgp_cmp_hidden['checktransvsproducer'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="checktransvsproducer" value="<?php echo NM_encode_input($checktransvsproducer) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_checktransvsproducer" style="<?php echo $sStyleHidden_checktransvsproducer; ?>;"><span id="id_label_checktransvsproducer"><?php echo $this->nm_new_label['checktransvsproducer']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_checktransvsproducer" style="<?php echo $sStyleHidden_checktransvsproducer; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="checktransvsproducer" value="<?php echo NM_encode_input($checktransvsproducer); ?>"><span id="id_ajax_label_checktransvsproducer"><?php echo nl2br($checktransvsproducer); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_checktransvsproducer_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_checktransvsproducer_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['checktransportervsfdest']))
    {
        $this->nm_new_label['checktransportervsfdest'] = "Ελενχος μεταφοράς προς Αποδέκτη";
    }
?>
<?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);
   $checktransportervsfdest = $this->checktransportervsfdest;
   $sStyleHidden_checktransportervsfdest = '';
   if (isset($this->nmgp_cmp_hidden['checktransportervsfdest']) && $this->nmgp_cmp_hidden['checktransportervsfdest'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['checktransportervsfdest']);
       $sStyleHidden_checktransportervsfdest = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_checktransportervsfdest = 'display: none;';
   $sStyleReadInp_checktransportervsfdest = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['checktransportervsfdest']) && $this->nmgp_cmp_readonly['checktransportervsfdest'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['checktransportervsfdest']);
       $sStyleReadLab_checktransportervsfdest = '';
       $sStyleReadInp_checktransportervsfdest = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['checktransportervsfdest']) && $this->nmgp_cmp_hidden['checktransportervsfdest'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="checktransportervsfdest" value="<?php echo NM_encode_input($checktransportervsfdest) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_checktransportervsfdest" style="<?php echo $sStyleHidden_checktransportervsfdest; ?>;"><span id="id_label_checktransportervsfdest"><?php echo $this->nm_new_label['checktransportervsfdest']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_checktransportervsfdest" style="<?php echo $sStyleHidden_checktransportervsfdest; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="checktransportervsfdest" value="<?php echo NM_encode_input($checktransportervsfdest); ?>"><span id="id_ajax_label_checktransportervsfdest"><?php echo nl2br($checktransportervsfdest); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_checktransportervsfdest_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_checktransportervsfdest_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtwasteid']))
   {
       $this->nm_new_label['wtwasteid'] = "Κατάσταση φορτίου";
   }
   $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);
   $wtwasteid = $this->wtwasteid;
   $sStyleHidden_wtwasteid = '';
   if (isset($this->nmgp_cmp_hidden['wtwasteid']) && $this->nmgp_cmp_hidden['wtwasteid'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtwasteid']);
       $sStyleHidden_wtwasteid = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtwasteid = 'display: none;';
   $sStyleReadInp_wtwasteid = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtwasteid']) && $this->nmgp_cmp_readonly['wtwasteid'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtwasteid']);
       $sStyleReadLab_wtwasteid = '';
       $sStyleReadInp_wtwasteid = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtwasteid']) && $this->nmgp_cmp_hidden['wtwasteid'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtwasteid" value="<?php echo NM_encode_input($this->wtwasteid) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtwasteid" style="<?php echo $sStyleHidden_wtwasteid; ?>;"><span id="id_label_wtwasteid"><?php echo $this->nm_new_label['wtwasteid']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtwasteid" style="<?php echo $sStyleHidden_wtwasteid; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtwasteid"]) &&  $this->nmgp_cmp_readonly["wtwasteid"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT WasteID, WasteTitle 
FROM wasteliq 
ORDER BY WasteTitle";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtwasteid'][] = $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; 
   $wtwasteid_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->wtwasteid_1))
          {
              foreach ($this->wtwasteid_1 as $tmp_wtwasteid)
              {
                  if (trim($tmp_wtwasteid) === trim($cadaselect[1])) { $wtwasteid_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtwasteid) === trim($cadaselect[1])) { $wtwasteid_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="wtwasteid" value="<?php echo NM_encode_input($wtwasteid) . "\">" . $wtwasteid_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT WasteID, WasteTitle 
FROM wasteliq 
ORDER BY WasteTitle";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtwasteid'][] = $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; 
   $wtwasteid_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->wtwasteid_1))
          {
              foreach ($this->wtwasteid_1 as $tmp_wtwasteid)
              {
                  if (trim($tmp_wtwasteid) === trim($cadaselect[1])) { $wtwasteid_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtwasteid) === trim($cadaselect[1])) { $wtwasteid_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtwasteid\" style=\";" .  $sStyleReadLab_wtwasteid . "\">" . NM_encode_input($wtwasteid_look) . "</span><span id=\"id_read_off_wtwasteid\" style=\"" . $sStyleReadInp_wtwasteid . "\">";
   echo " <span id=\"idAjaxSelect_wtwasteid\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_wtwasteid\" name=\"wtwasteid\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtwasteid'][] = 'null'; 
   echo "  <option value=\"null\">--- Κατάσταση φορτίου---</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wtwasteid) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtwasteid)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtwasteid_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtwasteid_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtequipment']))
   {
       $this->nm_new_label['wtequipment'] = "Τύπος εξοπλισμού";
   }
   $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);
   $wtequipment = $this->wtequipment;
   $sStyleHidden_wtequipment = '';
   if (isset($this->nmgp_cmp_hidden['wtequipment']) && $this->nmgp_cmp_hidden['wtequipment'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtequipment']);
       $sStyleHidden_wtequipment = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtequipment = 'display: none;';
   $sStyleReadInp_wtequipment = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtequipment']) && $this->nmgp_cmp_readonly['wtequipment'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtequipment']);
       $sStyleReadLab_wtequipment = '';
       $sStyleReadInp_wtequipment = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtequipment']) && $this->nmgp_cmp_hidden['wtequipment'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtequipment" value="<?php echo NM_encode_input($this->wtequipment) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtequipment" style="<?php echo $sStyleHidden_wtequipment; ?>;"><span id="id_label_wtequipment"><?php echo $this->nm_new_label['wtequipment']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtequipment" style="<?php echo $sStyleHidden_wtequipment; ?>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">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtequipment"]) &&  $this->nmgp_cmp_readonly["wtequipment"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT eqid, eqtitle 
FROM equipment 
ORDER BY eqtitle";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtequipment'][] = $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; 
   $wtequipment_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->wtequipment_1))
          {
              foreach ($this->wtequipment_1 as $tmp_wtequipment)
              {
                  if (trim($tmp_wtequipment) === trim($cadaselect[1])) { $wtequipment_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtequipment) === trim($cadaselect[1])) { $wtequipment_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="wtequipment" value="<?php echo NM_encode_input($wtequipment) . "\">" . $wtequipment_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT eqid, eqtitle 
FROM equipment 
ORDER BY eqtitle";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtequipment'][] = $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; 
   $wtequipment_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->wtequipment_1))
          {
              foreach ($this->wtequipment_1 as $tmp_wtequipment)
              {
                  if (trim($tmp_wtequipment) === trim($cadaselect[1])) { $wtequipment_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtequipment) === trim($cadaselect[1])) { $wtequipment_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtequipment\" style=\"text-align:left;" .  $sStyleReadLab_wtequipment . "\">" . NM_encode_input($wtequipment_look) . "</span><span id=\"id_read_off_wtequipment\" style=\"" . $sStyleReadInp_wtequipment . "\">";
   echo " <span id=\"idAjaxSelect_wtequipment\"><select class=\"sc-js-input scFormObjectOdd\" style=\"text-align:left;\" id=\"id_sc_field_wtequipment\" name=\"wtequipment\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtequipment'][] = 'null'; 
   echo "  <option value=\"null\">--- Επιλέξτε τύπο εξοπλισμού ---</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wtequipment) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtequipment)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtequipment_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtequipment_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wttransportersign']))
    {
        $this->nm_new_label['wttransportersign'] = "Ψηφιακή υπογραφή μεταφορέα";
    }
?>
<?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);
   $wttransportersign = $this->wttransportersign;
   $sStyleHidden_wttransportersign = '';
   if (isset($this->nmgp_cmp_hidden['wttransportersign']) && $this->nmgp_cmp_hidden['wttransportersign'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wttransportersign']);
       $sStyleHidden_wttransportersign = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wttransportersign = 'display: none;';
   $sStyleReadInp_wttransportersign = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wttransportersign']) && $this->nmgp_cmp_readonly['wttransportersign'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wttransportersign']);
       $sStyleReadLab_wttransportersign = '';
       $sStyleReadInp_wttransportersign = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wttransportersign']) && $this->nmgp_cmp_hidden['wttransportersign'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wttransportersign" value="<?php echo NM_encode_input($wttransportersign) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wttransportersign" style="<?php echo $sStyleHidden_wttransportersign; ?>;"><span id="id_label_wttransportersign"><?php echo $this->nm_new_label['wttransportersign']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wttransportersign" style="<?php echo $sStyleHidden_wttransportersign; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
 <script>var var_ajax_img_wttransportersign = '<?php echo $out1_wttransportersign; ?>';</script><input type="hidden" name="temp_out_wttransportersign" value="<?php echo NM_encode_input($out_wttransportersign); ?>" /><input type="hidden" name="temp_out1_wttransportersign" value="<?php echo NM_encode_input($out1_wttransportersign); ?>" /><?php if (!empty($out_wttransportersign)) {  echo "<a  href=\"javascript:nm_mostra_img(var_ajax_img_wttransportersign, '" . $this->nmgp_return_img['wttransportersign'][0] . "', '" . $this->nmgp_return_img['wttransportersign'][1] . "')\"><img id=\"id_ajax_img_wttransportersign\" border=\"0\" src=\"$out_wttransportersign\"></a>"; } else {  echo "<img id=\"id_ajax_img_wttransportersign\" border=\"0\" style=\"display: none\">"; } ?><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wttransportersign"]) &&  $this->nmgp_cmp_readonly["wttransportersign"] == "on") { 

 ?>
<img id=\"wttransportersign_img_uploading\" style=\"display: none\" border=\"0\" src=\"" . $this->Ini->path_icones . "/scriptcase__NM__ajax_load.gif\" align=\"absmiddle\" /><input type="hidden" name="wttransportersign" value="<?php echo NM_encode_input($wttransportersign) . "\">" . $wttransportersign . ""; ?>
<?php } else { ?>
<span id="id_read_off_wttransportersign" style="white-space: nowrap;<?php echo $sStyleReadInp_wttransportersign; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" type="file" name="wttransportersign[]" id="id_sc_field_wttransportersign" onchange="<?php if ($this->nmgp_opcao == "novo") {echo "if (document.F1.elements['sc_check_vert[" . $sc_seq_vert . "]']) { document.F1.elements['sc_check_vert[" . $sc_seq_vert . "]'].checked = true }"; }?>" alt="{enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><span id="chk_ajax_img_wttransportersign"<?php if ($this->nmgp_opcao == "novo" || empty($wttransportersign)) { echo " style=\"display: none\""; } ?>> <input type=checkbox name="wttransportersign_limpa" value="<?php echo $wttransportersign_limpa . '" '; if ($wttransportersign_limpa == "S"){echo "checked ";} ?> onclick="this.value = ''; if (this.checked){ this.value = 'S'};"><?php echo $this->Ini->Nm_lang['lang_btns_dele_hint']; ?> &nbsp;</span><img id="wttransportersign_img_uploading" style="display: none" border="0" src="<?php echo $this->Ini->path_icones; ?>/scriptcase__NM__ajax_load.gif" align="absmiddle" /><div id="id_img_loader_wttransportersign" class="progress progress-success progress-striped active scProgressBarStart" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" style="display: none"><div class="bar scProgressBarLoading">&nbsp;</div></div><img id="id_ajax_loader_wttransportersign" src="<?php echo $this->Ini->path_icones ?>/scriptcase__NM__ajax_load.gif" style="display: none" /></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wttransportersign_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wttransportersign_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtfdestid']))
   {
       $this->nm_new_label['wtfdestid'] = "Εγκατάσταση αποδέκτη";
   }
   $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);
   $wtfdestid = $this->wtfdestid;
   $sStyleHidden_wtfdestid = '';
   if (isset($this->nmgp_cmp_hidden['wtfdestid']) && $this->nmgp_cmp_hidden['wtfdestid'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtfdestid']);
       $sStyleHidden_wtfdestid = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtfdestid = 'display: none;';
   $sStyleReadInp_wtfdestid = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtfdestid']) && $this->nmgp_cmp_readonly['wtfdestid'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtfdestid']);
       $sStyleReadLab_wtfdestid = '';
       $sStyleReadInp_wtfdestid = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtfdestid']) && $this->nmgp_cmp_hidden['wtfdestid'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtfdestid" value="<?php echo NM_encode_input($this->wtfdestid) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtfdestid" style="<?php echo $sStyleHidden_wtfdestid; ?>background-color:#336600;"><span id="id_label_wtfdestid"><?php echo $this->nm_new_label['wtfdestid']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtfdestid" style="<?php echo $sStyleHidden_wtfdestid; ?>background-color:#336600;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="background-color:#336600;;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtfdestid"]) &&  $this->nmgp_cmp_readonly["wtfdestid"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT PrBID, PrBranchName 
FROM fdestbranch
where ProfilID = " . $_SESSION['ProfilID'] . "
ORDER BY PrBranchName";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtfdestid'][] = $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; 
   $wtfdestid_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->wtfdestid_1))
          {
              foreach ($this->wtfdestid_1 as $tmp_wtfdestid)
              {
                  if (trim($tmp_wtfdestid) === trim($cadaselect[1])) { $wtfdestid_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtfdestid) === trim($cadaselect[1])) { $wtfdestid_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="wtfdestid" value="<?php echo NM_encode_input($wtfdestid) . "\">" . $wtfdestid_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT PrBID, PrBranchName 
FROM fdestbranch
where ProfilID = " . $_SESSION['ProfilID'] . "
ORDER BY PrBranchName";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtfdestid'][] = $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; 
   $wtfdestid_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->wtfdestid_1))
          {
              foreach ($this->wtfdestid_1 as $tmp_wtfdestid)
              {
                  if (trim($tmp_wtfdestid) === trim($cadaselect[1])) { $wtfdestid_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtfdestid) === trim($cadaselect[1])) { $wtfdestid_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtfdestid\" style=\"background-color:#336600;" .  $sStyleReadLab_wtfdestid . "\">" . NM_encode_input($wtfdestid_look) . "</span><span id=\"id_read_off_wtfdestid\" style=\"" . $sStyleReadInp_wtfdestid . "\">";
   echo " <span id=\"idAjaxSelect_wtfdestid\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_wtfdestid\" name=\"wtfdestid\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestid'][] = 'null'; 
   echo "  <option value=\"null\">---Επιλογή τελικού αποδέκτη---</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wtfdestid) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtfdestid)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtfdestid_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtfdestid_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 


   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_2"></a>
<div id="div_hidden_bloco_2" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_2" 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['wtfdestdate']))
    {
        $this->nm_new_label['wtfdestdate'] = "Ημερομηνία παραλαβής";
    }
?>
<?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);
   $wtfdestdate = $this->wtfdestdate;
   $sStyleHidden_wtfdestdate = '';
   if (isset($this->nmgp_cmp_hidden['wtfdestdate']) && $this->nmgp_cmp_hidden['wtfdestdate'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtfdestdate']);
       $sStyleHidden_wtfdestdate = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtfdestdate = 'display: none;';
   $sStyleReadInp_wtfdestdate = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtfdestdate']) && $this->nmgp_cmp_readonly['wtfdestdate'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtfdestdate']);
       $sStyleReadLab_wtfdestdate = '';
       $sStyleReadInp_wtfdestdate = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtfdestdate']) && $this->nmgp_cmp_hidden['wtfdestdate'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtfdestdate" value="<?php echo NM_encode_input($wtfdestdate) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtfdestdate" style="<?php echo $sStyleHidden_wtfdestdate; ?>width:100px;"><span id="id_label_wtfdestdate"><?php echo $this->nm_new_label['wtfdestdate']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtfdestdate" style="<?php echo $sStyleHidden_wtfdestdate; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtfdestdate"]) &&  $this->nmgp_cmp_readonly["wtfdestdate"] == "on") { 

 ?>
<input type="hidden" name="wtfdestdate" value="<?php echo NM_encode_input($wtfdestdate) . "\">" . $wtfdestdate . ""; ?>
<?php } else { ?>
<span id="id_read_on_wtfdestdate" class="sc-ui-readonly-wtfdestdate" style=";<?php echo $sStyleReadLab_wtfdestdate; ?>"><?php echo NM_encode_input($wtfdestdate); ?></span><span id="id_read_off_wtfdestdate" style="white-space: nowrap;<?php echo $sStyleReadInp_wtfdestdate; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_wtfdestdate" type=text name="wtfdestdate" value="<?php echo NM_encode_input($wtfdestdate) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['wtfdestdate']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['wtfdestdate']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['wtfdestdate']['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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtfdestdate_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtfdestdate_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['envregistrationno_fdest']))
           {
               $this->nmgp_cmp_readonly['envregistrationno_fdest'] = 'on';
           }
?>


   <?php
   if (!isset($this->nm_new_label['wtfdestperiferia']))
   {
       $this->nm_new_label['wtfdestperiferia'] = "Περιφέρεια εγκατάστασης";
   }
   $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);
   $wtfdestperiferia = $this->wtfdestperiferia;
   $sStyleHidden_wtfdestperiferia = '';
   if (isset($this->nmgp_cmp_hidden['wtfdestperiferia']) && $this->nmgp_cmp_hidden['wtfdestperiferia'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtfdestperiferia']);
       $sStyleHidden_wtfdestperiferia = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtfdestperiferia = 'display: none;';
   $sStyleReadInp_wtfdestperiferia = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtfdestperiferia']) && $this->nmgp_cmp_readonly['wtfdestperiferia'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtfdestperiferia']);
       $sStyleReadLab_wtfdestperiferia = '';
       $sStyleReadInp_wtfdestperiferia = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtfdestperiferia']) && $this->nmgp_cmp_hidden['wtfdestperiferia'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtfdestperiferia" value="<?php echo NM_encode_input($this->wtfdestperiferia) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtfdestperiferia" style="<?php echo $sStyleHidden_wtfdestperiferia; ?>;"><span id="id_label_wtfdestperiferia"><?php echo $this->nm_new_label['wtfdestperiferia']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtfdestperiferia" style="<?php echo $sStyleHidden_wtfdestperiferia; ?>width:120px;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="width:120px;;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtfdestperiferia"]) &&  $this->nmgp_cmp_readonly["wtfdestperiferia"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestperiferia']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestperiferia']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestperiferia'] = array(); 
}
if ($this->wtfdestperiferia != "")
{ 
   $this->nm_clear_val("wtfdestperiferia");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestperiferia']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestperiferia'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestperiferia']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestperiferia'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

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

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtfdestperiferia'][] = $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; 
   $wtfdestperiferia_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->wtfdestperiferia_1))
          {
              foreach ($this->wtfdestperiferia_1 as $tmp_wtfdestperiferia)
              {
                  if (trim($tmp_wtfdestperiferia) === trim($cadaselect[1])) { $wtfdestperiferia_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtfdestperiferia) === trim($cadaselect[1])) { $wtfdestperiferia_look .= $cadaselect[0]; } 
          $x++; 
   }

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

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

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

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtfdestperiferia'][] = $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; 
   $wtfdestperiferia_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->wtfdestperiferia_1))
          {
              foreach ($this->wtfdestperiferia_1 as $tmp_wtfdestperiferia)
              {
                  if (trim($tmp_wtfdestperiferia) === trim($cadaselect[1])) { $wtfdestperiferia_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtfdestperiferia) === trim($cadaselect[1])) { $wtfdestperiferia_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtfdestperiferia\" style=\"width:120px;" .  $sStyleReadLab_wtfdestperiferia . "\">" . NM_encode_input($wtfdestperiferia_look) . "</span><span id=\"id_read_off_wtfdestperiferia\" style=\"" . $sStyleReadInp_wtfdestperiferia . "\">";
   echo " <span id=\"idAjaxSelect_wtfdestperiferia\"><select class=\"sc-js-input scFormObjectOdd\" style=\"width:120px;\" id=\"id_sc_field_wtfdestperiferia\" name=\"wtfdestperiferia\" 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->wtfdestperiferia) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtfdestperiferia)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtfdestperiferia_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtfdestperiferia_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?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'] = "Αρ.Μητρώου ΥΠΕΚΑ";
    }
?>
<?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" && $this->nmgp_opc_ant != "incluir") || */(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="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_envregistrationno_fdest" style="<?php echo $sStyleHidden_envregistrationno_fdest; ?>;"><span id="id_label_envregistrationno_fdest"><?php echo $this->nm_new_label['envregistrationno_fdest']; ?></span></TD>
    <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">
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (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) . "\"><span id=\"id_ajax_label_envregistrationno_fdest\">" . $envregistrationno_fdest . "</span>"; ?>
<?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></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" 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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['fdestaddress']))
    {
        $this->nm_new_label['fdestaddress'] = "Διεύθυνση εγκατάστασης";
    }
?>
<?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);
   $fdestaddress = $this->fdestaddress;
   $sStyleHidden_fdestaddress = '';
   if (isset($this->nmgp_cmp_hidden['fdestaddress']) && $this->nmgp_cmp_hidden['fdestaddress'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['fdestaddress']);
       $sStyleHidden_fdestaddress = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_fdestaddress = 'display: none;';
   $sStyleReadInp_fdestaddress = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['fdestaddress']) && $this->nmgp_cmp_readonly['fdestaddress'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['fdestaddress']);
       $sStyleReadLab_fdestaddress = '';
       $sStyleReadInp_fdestaddress = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['fdestaddress']) && $this->nmgp_cmp_hidden['fdestaddress'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="fdestaddress" value="<?php echo NM_encode_input($fdestaddress) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_fdestaddress" style="<?php echo $sStyleHidden_fdestaddress; ?>;"><span id="id_label_fdestaddress"><?php echo $this->nm_new_label['fdestaddress']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_fdestaddress" style="<?php echo $sStyleHidden_fdestaddress; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="fdestaddress" value="<?php echo NM_encode_input($fdestaddress); ?>"><span id="id_ajax_label_fdestaddress"><?php echo nl2br($fdestaddress); ?></span>

<?php
$fdestaddress_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($fdestaddress));

?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_fdestaddress_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_fdestaddress_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['fdestrespone']))
    {
        $this->nm_new_label['fdestrespone'] = "Στοχεία υπευθύνου";
    }
?>
<?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);
   $fdestrespone = $this->fdestrespone;
   $sStyleHidden_fdestrespone = '';
   if (isset($this->nmgp_cmp_hidden['fdestrespone']) && $this->nmgp_cmp_hidden['fdestrespone'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['fdestrespone']);
       $sStyleHidden_fdestrespone = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_fdestrespone = 'display: none;';
   $sStyleReadInp_fdestrespone = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['fdestrespone']) && $this->nmgp_cmp_readonly['fdestrespone'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['fdestrespone']);
       $sStyleReadLab_fdestrespone = '';
       $sStyleReadInp_fdestrespone = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['fdestrespone']) && $this->nmgp_cmp_hidden['fdestrespone'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="fdestrespone" value="<?php echo NM_encode_input($fdestrespone) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_fdestrespone" style="<?php echo $sStyleHidden_fdestrespone; ?>;"><span id="id_label_fdestrespone"><?php echo $this->nm_new_label['fdestrespone']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_fdestrespone" style="<?php echo $sStyleHidden_fdestrespone; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="fdestrespone" value="<?php echo NM_encode_input($fdestrespone); ?>"><span id="id_ajax_label_fdestrespone"><?php echo nl2br($fdestrespone); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_fdestrespone_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_fdestrespone_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['fdestphone']))
    {
        $this->nm_new_label['fdestphone'] = "Τηλέφωνο υπευθύνου";
    }
?>
<?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);
   $fdestphone = $this->fdestphone;
   $sStyleHidden_fdestphone = '';
   if (isset($this->nmgp_cmp_hidden['fdestphone']) && $this->nmgp_cmp_hidden['fdestphone'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['fdestphone']);
       $sStyleHidden_fdestphone = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_fdestphone = 'display: none;';
   $sStyleReadInp_fdestphone = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['fdestphone']) && $this->nmgp_cmp_readonly['fdestphone'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['fdestphone']);
       $sStyleReadLab_fdestphone = '';
       $sStyleReadInp_fdestphone = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['fdestphone']) && $this->nmgp_cmp_hidden['fdestphone'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="fdestphone" value="<?php echo NM_encode_input($fdestphone) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_fdestphone" style="<?php echo $sStyleHidden_fdestphone; ?>;"><span id="id_label_fdestphone"><?php echo $this->nm_new_label['fdestphone']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_fdestphone" style="<?php echo $sStyleHidden_fdestphone; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="fdestphone" value="<?php echo NM_encode_input($fdestphone); ?>"><span id="id_ajax_label_fdestphone"><?php echo nl2br($fdestphone); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_fdestphone_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_fdestphone_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['fdestresponseemail']))
    {
        $this->nm_new_label['fdestresponseemail'] = "Email υπευθύνου";
    }
?>
<?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);
   $fdestresponseemail = $this->fdestresponseemail;
   $sStyleHidden_fdestresponseemail = '';
   if (isset($this->nmgp_cmp_hidden['fdestresponseemail']) && $this->nmgp_cmp_hidden['fdestresponseemail'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['fdestresponseemail']);
       $sStyleHidden_fdestresponseemail = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_fdestresponseemail = 'display: none;';
   $sStyleReadInp_fdestresponseemail = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['fdestresponseemail']) && $this->nmgp_cmp_readonly['fdestresponseemail'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['fdestresponseemail']);
       $sStyleReadLab_fdestresponseemail = '';
       $sStyleReadInp_fdestresponseemail = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['fdestresponseemail']) && $this->nmgp_cmp_hidden['fdestresponseemail'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="fdestresponseemail" value="<?php echo NM_encode_input($fdestresponseemail) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_fdestresponseemail" style="<?php echo $sStyleHidden_fdestresponseemail; ?>;"><span id="id_label_fdestresponseemail"><?php echo $this->nm_new_label['fdestresponseemail']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_fdestresponseemail" style="<?php echo $sStyleHidden_fdestresponseemail; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="fdestresponseemail" value="<?php echo NM_encode_input($fdestresponseemail); ?>"><span id="id_ajax_label_fdestresponseemail"><?php echo nl2br($fdestresponseemail); ?></span>
&nbsp;<?php if ($this->nmgp_opcao != "novo"){ ?><?php echo nmButtonOutput($this->arr_buttons, "bemail", "if (document.F1.fdestresponseemail.value != '') {window.open('mailto:' + document.F1.fdestresponseemail.value); }", "if (document.F1.fdestresponseemail.value != '') {window.open('mailto:' + document.F1.fdestresponseemail.value); }", "fdestresponseemail_mail", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "", "");?>
<?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_fdestresponseemail_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_fdestresponseemail_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtfdestewc']))
   {
       $this->nm_new_label['wtfdestewc'] = "Κωδικός αποβλήτου";
   }
   $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);
   $wtfdestewc = $this->wtfdestewc;
   $sStyleHidden_wtfdestewc = '';
   if (isset($this->nmgp_cmp_hidden['wtfdestewc']) && $this->nmgp_cmp_hidden['wtfdestewc'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtfdestewc']);
       $sStyleHidden_wtfdestewc = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtfdestewc = 'display: none;';
   $sStyleReadInp_wtfdestewc = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtfdestewc']) && $this->nmgp_cmp_readonly['wtfdestewc'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtfdestewc']);
       $sStyleReadLab_wtfdestewc = '';
       $sStyleReadInp_wtfdestewc = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtfdestewc']) && $this->nmgp_cmp_hidden['wtfdestewc'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtfdestewc" value="<?php echo NM_encode_input($this->wtfdestewc) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtfdestewc" style="<?php echo $sStyleHidden_wtfdestewc; ?>;"><span id="id_label_wtfdestewc"><?php echo $this->nm_new_label['wtfdestewc']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtfdestewc" style="<?php echo $sStyleHidden_wtfdestewc; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtfdestewc"]) &&  $this->nmgp_cmp_readonly["wtfdestewc"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc'] = array(); 
}
if ($this->wtfdestid != "")
{ 
   $this->nm_clear_val("wtfdestid");
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

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

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtfdestewc'][] = $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; 
   $wtfdestewc_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->wtfdestewc_1))
          {
              foreach ($this->wtfdestewc_1 as $tmp_wtfdestewc)
              {
                  if (trim($tmp_wtfdestewc) === trim($cadaselect[1])) { $wtfdestewc_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtfdestewc) === trim($cadaselect[1])) { $wtfdestewc_look .= $cadaselect[0]; } 
          $x++; 
   }

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

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

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

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtfdestewc'][] = $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; 
   $wtfdestewc_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->wtfdestewc_1))
          {
              foreach ($this->wtfdestewc_1 as $tmp_wtfdestewc)
              {
                  if (trim($tmp_wtfdestewc) === trim($cadaselect[1])) { $wtfdestewc_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtfdestewc) === trim($cadaselect[1])) { $wtfdestewc_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtfdestewc\" style=\";" .  $sStyleReadLab_wtfdestewc . "\">" . NM_encode_input($wtfdestewc_look) . "</span><span id=\"id_read_off_wtfdestewc\" style=\"" . $sStyleReadInp_wtfdestewc . "\">";
   echo " <span id=\"idAjaxSelect_wtfdestewc\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_wtfdestewc\" name=\"wtfdestewc\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestewc'][] = ''; 
   echo "  <option value=\"\">---Επιλογή αποβλήτου---</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wtfdestewc) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtfdestewc)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtfdestewc_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtfdestewc_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['fdewctitle']))
    {
        $this->nm_new_label['fdewctitle'] = "Περιγραφή αποβλήτου";
    }
?>
<?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);
   $fdewctitle = $this->fdewctitle;
   $sStyleHidden_fdewctitle = '';
   if (isset($this->nmgp_cmp_hidden['fdewctitle']) && $this->nmgp_cmp_hidden['fdewctitle'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['fdewctitle']);
       $sStyleHidden_fdewctitle = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_fdewctitle = 'display: none;';
   $sStyleReadInp_fdewctitle = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['fdewctitle']) && $this->nmgp_cmp_readonly['fdewctitle'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['fdewctitle']);
       $sStyleReadLab_fdewctitle = '';
       $sStyleReadInp_fdewctitle = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['fdewctitle']) && $this->nmgp_cmp_hidden['fdewctitle'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="fdewctitle" value="<?php echo NM_encode_input($fdewctitle) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_fdewctitle" style="<?php echo $sStyleHidden_fdewctitle; ?>;"><span id="id_label_fdewctitle"><?php echo $this->nm_new_label['fdewctitle']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_fdewctitle" style="<?php echo $sStyleHidden_fdewctitle; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px"><input type="hidden" name="fdewctitle" value="<?php echo NM_encode_input($fdewctitle); ?>"><span id="id_ajax_label_fdewctitle"><?php echo nl2br($fdewctitle); ?></span>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_fdewctitle_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_fdewctitle_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['wtfdestrd']))
   {
       $this->nm_new_label['wtfdestrd'] = "Κωδικός επεξεργασίας";
   }
   $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);
   $wtfdestrd = $this->wtfdestrd;
   $sStyleHidden_wtfdestrd = '';
   if (isset($this->nmgp_cmp_hidden['wtfdestrd']) && $this->nmgp_cmp_hidden['wtfdestrd'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtfdestrd']);
       $sStyleHidden_wtfdestrd = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtfdestrd = 'display: none;';
   $sStyleReadInp_wtfdestrd = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtfdestrd']) && $this->nmgp_cmp_readonly['wtfdestrd'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtfdestrd']);
       $sStyleReadLab_wtfdestrd = '';
       $sStyleReadInp_wtfdestrd = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtfdestrd']) && $this->nmgp_cmp_hidden['wtfdestrd'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="wtfdestrd" value="<?php echo NM_encode_input($this->wtfdestrd) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtfdestrd" style="<?php echo $sStyleHidden_wtfdestrd; ?>;"><span id="id_label_wtfdestrd"><?php echo $this->nm_new_label['wtfdestrd']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtfdestrd" style="<?php echo $sStyleHidden_wtfdestrd; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtfdestrd"]) &&  $this->nmgp_cmp_readonly["wtfdestrd"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT RDCode 
FROM rdcodes 
ORDER BY RDCode";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtfdestrd'][] = $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; 
   $wtfdestrd_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->wtfdestrd_1))
          {
              foreach ($this->wtfdestrd_1 as $tmp_wtfdestrd)
              {
                  if (trim($tmp_wtfdestrd) === trim($cadaselect[1])) { $wtfdestrd_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtfdestrd) === trim($cadaselect[1])) { $wtfdestrd_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type="hidden" name="wtfdestrd" value="<?php echo NM_encode_input($wtfdestrd) . "\">" . $wtfdestrd_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'] = array(); 
}
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'] = array(); 
    }

   $old_value_wtrequestdate = $this->wtrequestdate;
   $old_value_wtproducerqty = $this->wtproducerqty;
   $old_value_wtprducerm3 = $this->wtprducerm3;
   $old_value_wttransportdate = $this->wttransportdate;
   $old_value_wtfdestdate = $this->wtfdestdate;
   $old_value_wtfdestqty = $this->wtfdestqty;
   $old_value_wtfdestm3 = $this->wtfdestm3;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_wtrequestdate = $this->wtrequestdate;
   $unformatted_value_wtproducerqty = $this->wtproducerqty;
   $unformatted_value_wtprducerm3 = $this->wtprducerm3;
   $unformatted_value_wttransportdate = $this->wttransportdate;
   $unformatted_value_wtfdestdate = $this->wtfdestdate;
   $unformatted_value_wtfdestqty = $this->wtfdestqty;
   $unformatted_value_wtfdestm3 = $this->wtfdestm3;

   $nm_comando = "SELECT RDCode 
FROM rdcodes 
ORDER BY RDCode";

   $this->wtrequestdate = $old_value_wtrequestdate;
   $this->wtproducerqty = $old_value_wtproducerqty;
   $this->wtprducerm3 = $old_value_wtprducerm3;
   $this->wttransportdate = $old_value_wttransportdate;
   $this->wtfdestdate = $old_value_wtfdestdate;
   $this->wtfdestqty = $old_value_wtfdestqty;
   $this->wtfdestm3 = $old_value_wtfdestm3;

   $_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]['form_wastetransactions']['Lookup_wtfdestrd'][] = $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; 
   $wtfdestrd_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->wtfdestrd_1))
          {
              foreach ($this->wtfdestrd_1 as $tmp_wtfdestrd)
              {
                  if (trim($tmp_wtfdestrd) === trim($cadaselect[1])) { $wtfdestrd_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->wtfdestrd) === trim($cadaselect[1])) { $wtfdestrd_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_wtfdestrd\" style=\";" .  $sStyleReadLab_wtfdestrd . "\">" . NM_encode_input($wtfdestrd_look) . "</span><span id=\"id_read_off_wtfdestrd\" style=\"" . $sStyleReadInp_wtfdestrd . "\">";
   echo " <span id=\"idAjaxSelect_wtfdestrd\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_wtfdestrd\" name=\"wtfdestrd\" size=\"1\" alt=\"{type: 'select', enterTab: false}\">" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['Lookup_wtfdestrd'][] = ''; 
   echo "  <option value=\"\">---Επιλογή κωδικού διαχείρησης---</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->wtfdestrd) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->wtfdestrd)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</span>";
?> 
<?php  }?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtfdestrd_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtfdestrd_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wtfdestqty']))
    {
        $this->nm_new_label['wtfdestqty'] = "Ποσότητα";
    }
?>
<?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);
   $wtfdestqty = $this->wtfdestqty;
   $sStyleHidden_wtfdestqty = '';
   if (isset($this->nmgp_cmp_hidden['wtfdestqty']) && $this->nmgp_cmp_hidden['wtfdestqty'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtfdestqty']);
       $sStyleHidden_wtfdestqty = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtfdestqty = 'display: none;';
   $sStyleReadInp_wtfdestqty = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtfdestqty']) && $this->nmgp_cmp_readonly['wtfdestqty'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtfdestqty']);
       $sStyleReadLab_wtfdestqty = '';
       $sStyleReadInp_wtfdestqty = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtfdestqty']) && $this->nmgp_cmp_hidden['wtfdestqty'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtfdestqty" value="<?php echo NM_encode_input($wtfdestqty) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtfdestqty" style="<?php echo $sStyleHidden_wtfdestqty; ?>;"><span id="id_label_wtfdestqty"><?php echo $this->nm_new_label['wtfdestqty']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtfdestqty" style="<?php echo $sStyleHidden_wtfdestqty; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtfdestqty"]) &&  $this->nmgp_cmp_readonly["wtfdestqty"] == "on") { 

 ?>
<input type="hidden" name="wtfdestqty" value="<?php echo NM_encode_input($wtfdestqty) . "\">" . $wtfdestqty . ""; ?>
<?php } else { ?>
<span id="id_read_on_wtfdestqty" class="sc-ui-readonly-wtfdestqty" style=";<?php echo $sStyleReadLab_wtfdestqty; ?>"><?php echo NM_encode_input($this->wtfdestqty); ?></span><span id="id_read_off_wtfdestqty" style="white-space: nowrap;<?php echo $sStyleReadInp_wtfdestqty; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:right;" id="id_sc_field_wtfdestqty" type=text name="wtfdestqty" value="<?php echo NM_encode_input($wtfdestqty) ?>"
 size=10 alt="{datatype: 'decimal', maxLength: 10, precision: 3, decimalSep: '<?php echo str_replace("'", "\'", $this->field_config['wtfdestqty']['symbol_dec']); ?>', thousandsSep: '', thousandsFormat: <?php echo $this->field_config['wtfdestqty']['symbol_fmt']; ?>, manualDecimals: true, allowNegative: false, onlyNegative: false, enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtfdestqty_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtfdestqty_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wtfdestm3']))
    {
        $this->nm_new_label['wtfdestm3'] = "M3";
    }
?>
<?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);
   $wtfdestm3 = $this->wtfdestm3;
   $sStyleHidden_wtfdestm3 = '';
   if (isset($this->nmgp_cmp_hidden['wtfdestm3']) && $this->nmgp_cmp_hidden['wtfdestm3'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtfdestm3']);
       $sStyleHidden_wtfdestm3 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtfdestm3 = 'display: none;';
   $sStyleReadInp_wtfdestm3 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtfdestm3']) && $this->nmgp_cmp_readonly['wtfdestm3'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtfdestm3']);
       $sStyleReadLab_wtfdestm3 = '';
       $sStyleReadInp_wtfdestm3 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtfdestm3']) && $this->nmgp_cmp_hidden['wtfdestm3'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtfdestm3" value="<?php echo NM_encode_input($wtfdestm3) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtfdestm3" style="<?php echo $sStyleHidden_wtfdestm3; ?>;"><span id="id_label_wtfdestm3"><?php echo $this->nm_new_label['wtfdestm3']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtfdestm3" style="<?php echo $sStyleHidden_wtfdestm3; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtfdestm3"]) &&  $this->nmgp_cmp_readonly["wtfdestm3"] == "on") { 

 ?>
<input type="hidden" name="wtfdestm3" value="<?php echo NM_encode_input($wtfdestm3) . "\">" . $wtfdestm3 . ""; ?>
<?php } else { ?>
<span id="id_read_on_wtfdestm3" class="sc-ui-readonly-wtfdestm3" style=";<?php echo $sStyleReadLab_wtfdestm3; ?>"><?php echo NM_encode_input($this->wtfdestm3); ?></span><span id="id_read_off_wtfdestm3" style="white-space: nowrap;<?php echo $sStyleReadInp_wtfdestm3; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_wtfdestm3" type=text name="wtfdestm3" value="<?php echo NM_encode_input($wtfdestm3) ?>"
 size=11 alt="{datatype: 'integer', maxLength: 11, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['wtfdestm3']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['wtfdestm3']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtfdestm3_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtfdestm3_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['wtfdestsign']))
    {
        $this->nm_new_label['wtfdestsign'] = "Ψηφιακή υπογραφή Τελικού αποδέκτη";
    }
?>
<?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);
   $wtfdestsign = $this->wtfdestsign;
   $sStyleHidden_wtfdestsign = '';
   if (isset($this->nmgp_cmp_hidden['wtfdestsign']) && $this->nmgp_cmp_hidden['wtfdestsign'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtfdestsign']);
       $sStyleHidden_wtfdestsign = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtfdestsign = 'display: none;';
   $sStyleReadInp_wtfdestsign = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtfdestsign']) && $this->nmgp_cmp_readonly['wtfdestsign'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtfdestsign']);
       $sStyleReadLab_wtfdestsign = '';
       $sStyleReadInp_wtfdestsign = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtfdestsign']) && $this->nmgp_cmp_hidden['wtfdestsign'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtfdestsign" value="<?php echo NM_encode_input($wtfdestsign) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_wtfdestsign" style="<?php echo $sStyleHidden_wtfdestsign; ?>;"><span id="id_label_wtfdestsign"><?php echo $this->nm_new_label['wtfdestsign']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_wtfdestsign" style="<?php echo $sStyleHidden_wtfdestsign; ?>;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
 <script>var var_ajax_img_wtfdestsign = '<?php echo $out1_wtfdestsign; ?>';</script><input type="hidden" name="temp_out_wtfdestsign" value="<?php echo NM_encode_input($out_wtfdestsign); ?>" /><input type="hidden" name="temp_out1_wtfdestsign" value="<?php echo NM_encode_input($out1_wtfdestsign); ?>" /><?php if (!empty($out_wtfdestsign)) {  echo "<a  href=\"javascript:nm_mostra_img(var_ajax_img_wtfdestsign, '" . $this->nmgp_return_img['wtfdestsign'][0] . "', '" . $this->nmgp_return_img['wtfdestsign'][1] . "')\"><img id=\"id_ajax_img_wtfdestsign\" border=\"0\" src=\"$out_wtfdestsign\"></a>"; } else {  echo "<img id=\"id_ajax_img_wtfdestsign\" border=\"0\" style=\"display: none\">"; } ?><br>
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtfdestsign"]) &&  $this->nmgp_cmp_readonly["wtfdestsign"] == "on") { 

 ?>
<img id=\"wtfdestsign_img_uploading\" style=\"display: none\" border=\"0\" src=\"" . $this->Ini->path_icones . "/scriptcase__NM__ajax_load.gif\" align=\"absmiddle\" /><input type="hidden" name="wtfdestsign" value="<?php echo NM_encode_input($wtfdestsign) . "\">" . $wtfdestsign . ""; ?>
<?php } else { ?>
<span id="id_read_off_wtfdestsign" style="white-space: nowrap;<?php echo $sStyleReadInp_wtfdestsign; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" type="file" name="wtfdestsign[]" id="id_sc_field_wtfdestsign" onchange="<?php if ($this->nmgp_opcao == "novo") {echo "if (document.F1.elements['sc_check_vert[" . $sc_seq_vert . "]']) { document.F1.elements['sc_check_vert[" . $sc_seq_vert . "]'].checked = true }"; }?>" alt="{enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><span id="chk_ajax_img_wtfdestsign"<?php if ($this->nmgp_opcao == "novo" || empty($wtfdestsign)) { echo " style=\"display: none\""; } ?>> <input type=checkbox name="wtfdestsign_limpa" value="<?php echo $wtfdestsign_limpa . '" '; if ($wtfdestsign_limpa == "S"){echo "checked ";} ?> onclick="this.value = ''; if (this.checked){ this.value = 'S'};"><?php echo $this->Ini->Nm_lang['lang_btns_dele_hint']; ?> &nbsp;</span><img id="wtfdestsign_img_uploading" style="display: none" border="0" src="<?php echo $this->Ini->path_icones; ?>/scriptcase__NM__ajax_load.gif" align="absmiddle" /><div id="id_img_loader_wtfdestsign" class="progress progress-success progress-striped active scProgressBarStart" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" style="display: none"><div class="bar scProgressBarLoading">&nbsp;</div></div><img id="id_ajax_loader_wtfdestsign" src="<?php echo $this->Ini->path_icones ?>/scriptcase__NM__ajax_load.gif" style="display: none" /></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtfdestsign_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtfdestsign_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 * 2; ?>" >&nbsp;</TD>

<?php } 
?> 


   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   <a name="bloco_3"></a>
<div id="div_hidden_bloco_3" style="display: none; width: 1px; height: 0px; overflow: scroll"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_3" 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['wtproducerremarks']))
    {
        $this->nm_new_label['wtproducerremarks'] = "Σχόλια";
    }
?>
<?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);
   $wtproducerremarks = $this->wtproducerremarks;
   $sStyleHidden_wtproducerremarks = '';
   if (isset($this->nmgp_cmp_hidden['wtproducerremarks']) && $this->nmgp_cmp_hidden['wtproducerremarks'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['wtproducerremarks']);
       $sStyleHidden_wtproducerremarks = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_wtproducerremarks = 'display: none;';
   $sStyleReadInp_wtproducerremarks = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['wtproducerremarks']) && $this->nmgp_cmp_readonly['wtproducerremarks'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['wtproducerremarks']);
       $sStyleReadLab_wtproducerremarks = '';
       $sStyleReadInp_wtproducerremarks = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['wtproducerremarks']) && $this->nmgp_cmp_hidden['wtproducerremarks'] == 'off') { $sc_hidden_yes++;  ?>
<input type="hidden" name="wtproducerremarks" value="<?php echo NM_encode_input($wtproducerremarks) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOdd" id="hidden_field_data_wtproducerremarks" style="<?php echo $sStyleHidden_wtproducerremarks; ?>width:700px;height:500px;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style="width:700px;height:500px;;vertical-align: top;padding: 0px">
<?php
$wtproducerremarks_val = str_replace('<br />', '__SC_BREAK_LINE__', nl2br($wtproducerremarks));

?>

<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["wtproducerremarks"]) &&  $this->nmgp_cmp_readonly["wtproducerremarks"] == "on") { 

 ?>
<input type="hidden" name="wtproducerremarks" value="<?php echo NM_encode_input($wtproducerremarks) . "\">" . $wtproducerremarks_val . ""; ?>
<?php } else { ?>
<span id="id_read_on_wtproducerremarks" class="sc-ui-readonly-wtproducerremarks" style="width:700px;height:500px;<?php echo $sStyleReadLab_wtproducerremarks; ?>"><?php echo NM_encode_input($wtproducerremarks_val); ?></span><span id="id_read_off_wtproducerremarks" style="white-space: nowrap;<?php echo $sStyleReadInp_wtproducerremarks; ?>">
 <textarea  class="sc-js-input scFormObjectOdd" style="white-space: pre-wrap;width:700px;height:500px;" name="wtproducerremarks" id="id_sc_field_wtproducerremarks" rows="2" cols="50"
 alt="{datatype: 'text', maxLength: 50, allowedChars: '<?php echo $this->allowedCharsCharset("") ?>', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}">
<?php echo $wtproducerremarks; ?>
</textarea>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_wtproducerremarks_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_wtproducerremarks_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 } 
?> 






</TABLE></div><!-- bloco_f -->
</td></tr>
<tr><td class="scFormPageText">
<span class="scFormRequiredOddColor">* <?php echo $this->Ini->Nm_lang['lang_othr_reqr']; ?></span>
</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,2,3);
  $nm_sc_blocos_aba    = array(0 => 0,1 => 0,2 => 0,3 => 0);
  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("form_wastetransactions");
 parent.scAjaxDetailHeight("form_wastetransactions", <?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("form_wastetransactions", <?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]['form_wastetransactions']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['form_wastetransactions']['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-in"><?php echo $this->Ini->Nm_lang['lang_version_mobile']; ?></span>
<?php
       }
?>
</body> 
</html> 
