Ejemplo n.º 1
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->precio_base->FormValue == $this->precio_base->CurrentValue && is_numeric(ew_StrToFloat($this->precio_base->CurrentValue))) {
         $this->precio_base->CurrentValue = ew_StrToFloat($this->precio_base->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->porcentaje_comision->FormValue == $this->porcentaje_comision->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje_comision->CurrentValue))) {
         $this->porcentaje_comision->CurrentValue = ew_StrToFloat($this->porcentaje_comision->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // Tipo_carga
     // precio_base
     // porcentaje_comision
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // Tipo_carga
         $this->Tipo_carga->ViewValue = $this->Tipo_carga->CurrentValue;
         $this->Tipo_carga->ViewCustomAttributes = "";
         // precio_base
         $this->precio_base->ViewValue = $this->precio_base->CurrentValue;
         $this->precio_base->ViewValue = ew_FormatCurrency($this->precio_base->ViewValue, 2, 0, 0, -1);
         $this->precio_base->ViewCustomAttributes = "";
         // porcentaje_comision
         $this->porcentaje_comision->ViewValue = $this->porcentaje_comision->CurrentValue;
         $this->porcentaje_comision->ViewCustomAttributes = "";
         // Tipo_carga
         $this->Tipo_carga->LinkCustomAttributes = "";
         $this->Tipo_carga->HrefValue = "";
         $this->Tipo_carga->TooltipValue = "";
         // precio_base
         $this->precio_base->LinkCustomAttributes = "";
         $this->precio_base->HrefValue = "";
         $this->precio_base->TooltipValue = "";
         // porcentaje_comision
         $this->porcentaje_comision->LinkCustomAttributes = "";
         $this->porcentaje_comision->HrefValue = "";
         $this->porcentaje_comision->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // Tipo_carga
         $this->Tipo_carga->EditAttrs["class"] = "form-control";
         $this->Tipo_carga->EditCustomAttributes = "";
         $this->Tipo_carga->EditValue = $this->Tipo_carga->CurrentValue;
         $this->Tipo_carga->ViewCustomAttributes = "";
         // precio_base
         $this->precio_base->EditAttrs["class"] = "form-control";
         $this->precio_base->EditCustomAttributes = "";
         $this->precio_base->EditValue = $this->precio_base->CurrentValue;
         $this->precio_base->EditValue = ew_FormatCurrency($this->precio_base->EditValue, 2, 0, 0, -1);
         $this->precio_base->ViewCustomAttributes = "";
         // porcentaje_comision
         $this->porcentaje_comision->EditAttrs["class"] = "form-control";
         $this->porcentaje_comision->EditCustomAttributes = "";
         $this->porcentaje_comision->EditValue = ew_HtmlEncode($this->porcentaje_comision->CurrentValue);
         $this->porcentaje_comision->PlaceHolder = ew_RemoveHtml($this->porcentaje_comision->FldCaption());
         if (strval($this->porcentaje_comision->EditValue) != "" && is_numeric($this->porcentaje_comision->EditValue)) {
             $this->porcentaje_comision->EditValue = ew_FormatNumber($this->porcentaje_comision->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // Tipo_carga
         $this->Tipo_carga->HrefValue = "";
         // precio_base
         $this->precio_base->HrefValue = "";
         // porcentaje_comision
         $this->porcentaje_comision->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
        $Kitchen_Report_22D2->DeliveryDate->CurrentValue = $Kitchen_Report_22D2->DeliveryDate->DbValue;
    }
    if ($Kitchen_Report_22D2_report->bLvlBreak[1]) {
        $Kitchen_Report_22D2->PublishedDate->CurrentValue = $Kitchen_Report_22D2_report->vGrps[0];
        // Render row for view
        $Kitchen_Report_22D2->RowType = EW_ROWTYPE_VIEW;
        $Kitchen_Report_22D2_report->RenderRow();
        $Kitchen_Report_22D2->PublishedDate->CurrentValue = $Kitchen_Report_22D2->PublishedDate->DbValue;
    }
}
// Close recordset
$rs->Close();
?>
	<tr><td colspan=12><span class="phpmaker">&nbsp;<br></span></td></tr>
	<tr><td colspan=12 class="ewGrandSummary"><span class="phpmaker">Grand Total (<?php 
echo ew_FormatNumber($Kitchen_Report_22D2_report->nCntRecs[0], 0);
?>
 Detail Records)</span></td></tr>
<?php 
$Kitchen_Report_22D2->TotalServings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][1];
$Kitchen_Report_22D2->TotalOrders->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][2];
$Kitchen_Report_22D2->z1servings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][3];
$Kitchen_Report_22D2->z2servings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][4];
$Kitchen_Report_22D2->z3servings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][5];
$Kitchen_Report_22D2->z4servings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][6];
$Kitchen_Report_22D2->z5servings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][7];
$Kitchen_Report_22D2->z6servings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][8];
$Kitchen_Report_22D2->z7servings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][9];
$Kitchen_Report_22D2->z8servings->CurrentValue = $Kitchen_Report_22D2_report->nTotals[0][10];
// Render row for view
$Kitchen_Report_22D2->RowType = EW_ROWTYPE_VIEW;
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->costo->FormValue == $this->costo->CurrentValue && is_numeric(ew_StrToFloat($this->costo->CurrentValue))) {
         $this->costo->CurrentValue = ew_StrToFloat($this->costo->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idservicio_medico_prestado
     // idcuenta
     // idservicio_medico
     // estado
     // costo
     // fecha_inicio
     // fecha_final
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idservicio_medico_prestado
         $this->idservicio_medico_prestado->ViewValue = $this->idservicio_medico_prestado->CurrentValue;
         $this->idservicio_medico_prestado->ViewCustomAttributes = "";
         // idcuenta
         if (strval($this->idcuenta->CurrentValue) != "") {
             $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `cuenta`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idcuenta, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idcuenta->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idcuenta->ViewValue = $this->idcuenta->CurrentValue;
             }
         } else {
             $this->idcuenta->ViewValue = NULL;
         }
         $this->idcuenta->ViewCustomAttributes = "";
         // idservicio_medico
         if (strval($this->idservicio_medico->CurrentValue) != "") {
             $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `servicio_medico`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idservicio_medico->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idservicio_medico->ViewValue = $this->idservicio_medico->CurrentValue;
             }
         } else {
             $this->idservicio_medico->ViewValue = NULL;
         }
         $this->idservicio_medico->ViewCustomAttributes = "";
         // estado
         if (strval($this->estado->CurrentValue) != "") {
             switch ($this->estado->CurrentValue) {
                 case $this->estado->FldTagValue(1):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(2):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(3):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;
                     break;
                 default:
                     $this->estado->ViewValue = $this->estado->CurrentValue;
             }
         } else {
             $this->estado->ViewValue = NULL;
         }
         $this->estado->ViewCustomAttributes = "";
         // costo
         $this->costo->ViewValue = $this->costo->CurrentValue;
         $this->costo->ViewCustomAttributes = "";
         // fecha_inicio
         $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
         $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 7);
         $this->fecha_inicio->ViewCustomAttributes = "";
         // fecha_final
         $this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;
         $this->fecha_final->ViewValue = ew_FormatDateTime($this->fecha_final->ViewValue, 7);
         $this->fecha_final->ViewCustomAttributes = "";
         // idcuenta
         $this->idcuenta->LinkCustomAttributes = "";
         $this->idcuenta->HrefValue = "";
         $this->idcuenta->TooltipValue = "";
         // idservicio_medico
         $this->idservicio_medico->LinkCustomAttributes = "";
         $this->idservicio_medico->HrefValue = "";
         $this->idservicio_medico->TooltipValue = "";
         // costo
         $this->costo->LinkCustomAttributes = "";
         $this->costo->HrefValue = "";
         $this->costo->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // idcuenta
         $this->idcuenta->EditAttrs["class"] = "form-control";
         $this->idcuenta->EditCustomAttributes = "";
         if ($this->idcuenta->getSessionValue() != "") {
             $this->idcuenta->CurrentValue = $this->idcuenta->getSessionValue();
             if (strval($this->idcuenta->CurrentValue) != "") {
                 $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `cuenta`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idcuenta, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idcuenta->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->idcuenta->ViewValue = $this->idcuenta->CurrentValue;
                 }
             } else {
                 $this->idcuenta->ViewValue = NULL;
             }
             $this->idcuenta->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idcuenta->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `cuenta`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idcuenta, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->idcuenta->EditValue = $arwrk;
         }
         // idservicio_medico
         $this->idservicio_medico->EditAttrs["class"] = "form-control";
         $this->idservicio_medico->EditCustomAttributes = "";
         if ($this->idservicio_medico->getSessionValue() != "") {
             $this->idservicio_medico->CurrentValue = $this->idservicio_medico->getSessionValue();
             if (strval($this->idservicio_medico->CurrentValue) != "") {
                 $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `servicio_medico`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idservicio_medico->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->idservicio_medico->ViewValue = $this->idservicio_medico->CurrentValue;
                 }
             } else {
                 $this->idservicio_medico->ViewValue = NULL;
             }
             $this->idservicio_medico->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idservicio_medico->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `servicio_medico`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->idservicio_medico->EditValue = $arwrk;
         }
         // costo
         $this->costo->EditAttrs["class"] = "form-control";
         $this->costo->EditCustomAttributes = "";
         $this->costo->EditValue = ew_HtmlEncode($this->costo->CurrentValue);
         $this->costo->PlaceHolder = ew_RemoveHtml($this->costo->FldCaption());
         if (strval($this->costo->EditValue) != "" && is_numeric($this->costo->EditValue)) {
             $this->costo->EditValue = ew_FormatNumber($this->costo->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // idcuenta
         $this->idcuenta->HrefValue = "";
         // idservicio_medico
         $this->idservicio_medico->HrefValue = "";
         // costo
         $this->costo->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 4
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->iva->FormValue == $this->iva->CurrentValue && is_numeric(ew_StrToFloat($this->iva->CurrentValue))) {
         $this->iva->CurrentValue = ew_StrToFloat($this->iva->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->Importe->FormValue == $this->Importe->CurrentValue && is_numeric(ew_StrToFloat($this->Importe->CurrentValue))) {
         $this->Importe->CurrentValue = ew_StrToFloat($this->Importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // fecha
     // detalles
     // iva
     // Importe
     // id_tipo_gasto
     // id_hoja_ruta
     $this->id_hoja_ruta->CellCssStyle = "white-space: nowrap;";
     // id_hoja_mantenimiento
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // detalles
         $this->detalles->ViewValue = $this->detalles->CurrentValue;
         $this->detalles->ViewCustomAttributes = "";
         // iva
         $this->iva->ViewValue = $this->iva->CurrentValue;
         $this->iva->ViewCustomAttributes = "";
         // Importe
         $this->Importe->ViewValue = $this->Importe->CurrentValue;
         $this->Importe->ViewCustomAttributes = "";
         // id_tipo_gasto
         if ($this->id_tipo_gasto->VirtualValue != "") {
             $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
         } else {
             $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
             if (strval($this->id_tipo_gasto->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`clase`='M'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
                 }
             } else {
                 $this->id_tipo_gasto->ViewValue = NULL;
             }
         }
         $this->id_tipo_gasto->ViewCustomAttributes = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue;
         $this->id_hoja_mantenimiento->ViewCustomAttributes = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // detalles
         $this->detalles->LinkCustomAttributes = "";
         $this->detalles->HrefValue = "";
         $this->detalles->TooltipValue = "";
         // iva
         $this->iva->LinkCustomAttributes = "";
         $this->iva->HrefValue = "";
         $this->iva->TooltipValue = "";
         // Importe
         $this->Importe->LinkCustomAttributes = "";
         $this->Importe->HrefValue = "";
         $this->Importe->TooltipValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->LinkCustomAttributes = "";
         $this->id_tipo_gasto->HrefValue = "";
         $this->id_tipo_gasto->TooltipValue = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->LinkCustomAttributes = "";
         $this->id_hoja_mantenimiento->HrefValue = "";
         $this->id_hoja_mantenimiento->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // codigo
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // detalles
         $this->detalles->EditAttrs["class"] = "form-control";
         $this->detalles->EditCustomAttributes = "";
         $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue);
         $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption());
         // iva
         $this->iva->EditAttrs["class"] = "form-control";
         $this->iva->EditCustomAttributes = "";
         $this->iva->EditValue = ew_HtmlEncode($this->iva->CurrentValue);
         $this->iva->PlaceHolder = ew_RemoveHtml($this->iva->FldCaption());
         if (strval($this->iva->EditValue) != "" && is_numeric($this->iva->EditValue)) {
             $this->iva->EditValue = ew_FormatNumber($this->iva->EditValue, -2, -1, -2, 0);
             $this->iva->OldValue = $this->iva->EditValue;
         }
         // Importe
         $this->Importe->EditAttrs["class"] = "form-control";
         $this->Importe->EditCustomAttributes = "";
         $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue);
         $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption());
         if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) {
             $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, -1, -2, 0);
             $this->Importe->OldValue = $this->Importe->EditValue;
         }
         // id_tipo_gasto
         $this->id_tipo_gasto->EditAttrs["class"] = "form-control";
         $this->id_tipo_gasto->EditCustomAttributes = "";
         $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue);
         if (strval($this->id_tipo_gasto->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
             $sWhereWrk = "";
             $lookuptblfilter = "`clase`='M'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_tipo_gasto->EditValue = ew_HtmlEncode($rswrk->fields('DispFld'));
                 $rswrk->Close();
             } else {
                 $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue);
             }
         } else {
             $this->id_tipo_gasto->EditValue = NULL;
         }
         $this->id_tipo_gasto->PlaceHolder = ew_RemoveHtml($this->id_tipo_gasto->FldCaption());
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->EditAttrs["class"] = "form-control";
         $this->id_hoja_mantenimiento->EditCustomAttributes = "";
         if ($this->id_hoja_mantenimiento->getSessionValue() != "") {
             $this->id_hoja_mantenimiento->CurrentValue = $this->id_hoja_mantenimiento->getSessionValue();
             $this->id_hoja_mantenimiento->OldValue = $this->id_hoja_mantenimiento->CurrentValue;
             $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue;
             $this->id_hoja_mantenimiento->ViewCustomAttributes = "";
         } else {
             $this->id_hoja_mantenimiento->EditValue = ew_HtmlEncode($this->id_hoja_mantenimiento->CurrentValue);
             $this->id_hoja_mantenimiento->PlaceHolder = ew_RemoveHtml($this->id_hoja_mantenimiento->FldCaption());
         }
         // Edit refer script
         // codigo
         $this->codigo->HrefValue = "";
         // fecha
         $this->fecha->HrefValue = "";
         // detalles
         $this->detalles->HrefValue = "";
         // iva
         $this->iva->HrefValue = "";
         // Importe
         $this->Importe->HrefValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->HrefValue = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->HrefValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // codigo
         $this->codigo->EditAttrs["class"] = "form-control";
         $this->codigo->EditCustomAttributes = "";
         $this->codigo->EditValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // detalles
         $this->detalles->EditAttrs["class"] = "form-control";
         $this->detalles->EditCustomAttributes = "";
         $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue);
         $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption());
         // iva
         $this->iva->EditAttrs["class"] = "form-control";
         $this->iva->EditCustomAttributes = "";
         $this->iva->EditValue = ew_HtmlEncode($this->iva->CurrentValue);
         $this->iva->PlaceHolder = ew_RemoveHtml($this->iva->FldCaption());
         if (strval($this->iva->EditValue) != "" && is_numeric($this->iva->EditValue)) {
             $this->iva->EditValue = ew_FormatNumber($this->iva->EditValue, -2, -1, -2, 0);
             $this->iva->OldValue = $this->iva->EditValue;
         }
         // Importe
         $this->Importe->EditAttrs["class"] = "form-control";
         $this->Importe->EditCustomAttributes = "";
         $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue);
         $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption());
         if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) {
             $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, -1, -2, 0);
             $this->Importe->OldValue = $this->Importe->EditValue;
         }
         // id_tipo_gasto
         $this->id_tipo_gasto->EditAttrs["class"] = "form-control";
         $this->id_tipo_gasto->EditCustomAttributes = "";
         $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue);
         if (strval($this->id_tipo_gasto->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
             $sWhereWrk = "";
             $lookuptblfilter = "`clase`='M'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_tipo_gasto->EditValue = ew_HtmlEncode($rswrk->fields('DispFld'));
                 $rswrk->Close();
             } else {
                 $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue);
             }
         } else {
             $this->id_tipo_gasto->EditValue = NULL;
         }
         $this->id_tipo_gasto->PlaceHolder = ew_RemoveHtml($this->id_tipo_gasto->FldCaption());
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->EditAttrs["class"] = "form-control";
         $this->id_hoja_mantenimiento->EditCustomAttributes = "";
         if ($this->id_hoja_mantenimiento->getSessionValue() != "") {
             $this->id_hoja_mantenimiento->CurrentValue = $this->id_hoja_mantenimiento->getSessionValue();
             $this->id_hoja_mantenimiento->OldValue = $this->id_hoja_mantenimiento->CurrentValue;
             $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue;
             $this->id_hoja_mantenimiento->ViewCustomAttributes = "";
         } else {
             $this->id_hoja_mantenimiento->EditValue = ew_HtmlEncode($this->id_hoja_mantenimiento->CurrentValue);
             $this->id_hoja_mantenimiento->PlaceHolder = ew_RemoveHtml($this->id_hoja_mantenimiento->FldCaption());
         }
         // Edit refer script
         // codigo
         $this->codigo->HrefValue = "";
         // fecha
         $this->fecha->HrefValue = "";
         // detalles
         $this->detalles->HrefValue = "";
         // iva
         $this->iva->HrefValue = "";
         // Importe
         $this->Importe->HrefValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->HrefValue = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 5
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->importe->FormValue == $this->importe->CurrentValue && is_numeric(ew_StrToFloat($this->importe->CurrentValue))) {
         $this->importe->CurrentValue = ew_StrToFloat($this->importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // descripcion
     // importe
     // fecha_creacion
     // activa
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // descripcion
         $this->descripcion->ViewValue = $this->descripcion->CurrentValue;
         $this->descripcion->ViewCustomAttributes = "";
         // importe
         $this->importe->ViewValue = $this->importe->CurrentValue;
         $this->importe->ViewValue = ew_FormatCurrency($this->importe->ViewValue, 0, -2, -2, -2);
         $this->importe->ViewCustomAttributes = "";
         // fecha_creacion
         $this->fecha_creacion->ViewValue = $this->fecha_creacion->CurrentValue;
         $this->fecha_creacion->ViewValue = ew_FormatDateTime($this->fecha_creacion->ViewValue, 7);
         $this->fecha_creacion->ViewCustomAttributes = "";
         // activa
         if (strval($this->activa->CurrentValue) != "") {
             switch ($this->activa->CurrentValue) {
                 case $this->activa->FldTagValue(1):
                     $this->activa->ViewValue = $this->activa->FldTagCaption(1) != "" ? $this->activa->FldTagCaption(1) : $this->activa->CurrentValue;
                     break;
                 case $this->activa->FldTagValue(2):
                     $this->activa->ViewValue = $this->activa->FldTagCaption(2) != "" ? $this->activa->FldTagCaption(2) : $this->activa->CurrentValue;
                     break;
                 default:
                     $this->activa->ViewValue = $this->activa->CurrentValue;
             }
         } else {
             $this->activa->ViewValue = NULL;
         }
         $this->activa->ViewCustomAttributes = "";
         // descripcion
         $this->descripcion->LinkCustomAttributes = "";
         $this->descripcion->HrefValue = "";
         $this->descripcion->TooltipValue = "";
         // importe
         $this->importe->LinkCustomAttributes = "";
         $this->importe->HrefValue = "";
         $this->importe->TooltipValue = "";
         // fecha_creacion
         $this->fecha_creacion->LinkCustomAttributes = "";
         $this->fecha_creacion->HrefValue = "";
         $this->fecha_creacion->TooltipValue = "";
         // activa
         $this->activa->LinkCustomAttributes = "";
         $this->activa->HrefValue = "";
         $this->activa->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // descripcion
         $this->descripcion->EditAttrs["class"] = "form-control";
         $this->descripcion->EditCustomAttributes = "";
         $this->descripcion->EditValue = ew_HtmlEncode($this->descripcion->CurrentValue);
         $this->descripcion->PlaceHolder = ew_RemoveHtml($this->descripcion->FldCaption());
         // importe
         $this->importe->EditAttrs["class"] = "form-control";
         $this->importe->EditCustomAttributes = "";
         $this->importe->EditValue = ew_HtmlEncode($this->importe->CurrentValue);
         $this->importe->PlaceHolder = ew_RemoveHtml($this->importe->FldCaption());
         if (strval($this->importe->EditValue) != "" && is_numeric($this->importe->EditValue)) {
             $this->importe->EditValue = ew_FormatNumber($this->importe->EditValue, -2, -2, -2, -2);
         }
         // fecha_creacion
         $this->fecha_creacion->EditAttrs["class"] = "form-control";
         $this->fecha_creacion->EditCustomAttributes = "";
         $this->fecha_creacion->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_creacion->CurrentValue, 7));
         $this->fecha_creacion->PlaceHolder = ew_RemoveHtml($this->fecha_creacion->FldCaption());
         // activa
         $this->activa->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->activa->FldTagValue(1), $this->activa->FldTagCaption(1) != "" ? $this->activa->FldTagCaption(1) : $this->activa->FldTagValue(1));
         $arwrk[] = array($this->activa->FldTagValue(2), $this->activa->FldTagCaption(2) != "" ? $this->activa->FldTagCaption(2) : $this->activa->FldTagValue(2));
         $this->activa->EditValue = $arwrk;
         // Edit refer script
         // descripcion
         $this->descripcion->HrefValue = "";
         // importe
         $this->importe->HrefValue = "";
         // fecha_creacion
         $this->fecha_creacion->HrefValue = "";
         // activa
         $this->activa->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 6
0
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // codigo
     $this->codigo->EditAttrs["class"] = "form-control";
     $this->codigo->EditCustomAttributes = "";
     $this->codigo->EditValue = $this->codigo->CurrentValue;
     $this->codigo->ViewCustomAttributes = "";
     // Tipo_carga
     $this->Tipo_carga->EditAttrs["class"] = "form-control";
     $this->Tipo_carga->EditCustomAttributes = "";
     $this->Tipo_carga->EditValue = $this->Tipo_carga->CurrentValue;
     $this->Tipo_carga->ViewCustomAttributes = "";
     // precio_base
     $this->precio_base->EditAttrs["class"] = "form-control";
     $this->precio_base->EditCustomAttributes = "";
     $this->precio_base->EditValue = $this->precio_base->CurrentValue;
     $this->precio_base->EditValue = ew_FormatCurrency($this->precio_base->EditValue, 2, 0, 0, -1);
     $this->precio_base->ViewCustomAttributes = "";
     // porcentaje_comision
     $this->porcentaje_comision->EditAttrs["class"] = "form-control";
     $this->porcentaje_comision->EditCustomAttributes = "";
     $this->porcentaje_comision->EditValue = ew_HtmlEncode($this->porcentaje_comision->CurrentValue);
     $this->porcentaje_comision->PlaceHolder = ew_RemoveHtml($this->porcentaje_comision->FldCaption());
     if (strval($this->porcentaje_comision->EditValue) != "" && is_numeric($this->porcentaje_comision->EditValue)) {
         $this->porcentaje_comision->EditValue = ew_FormatNumber($this->porcentaje_comision->EditValue, -2, -1, -2, 0);
     }
     // Call Row Rendered event
     $this->Row_Rendered();
 }
        $Delivery_Report_1->DeliveryDate->CurrentValue = $Delivery_Report_1->DeliveryDate->DbValue;
    }
    if ($Delivery_Report_1_report->bLvlBreak[1]) {
        $Delivery_Report_1->PublishedDate->CurrentValue = $Delivery_Report_1_report->vGrps[0];
        // Render row for view
        $Delivery_Report_1->RowType = EW_ROWTYPE_VIEW;
        $Delivery_Report_1_report->RenderRow();
        $Delivery_Report_1->PublishedDate->CurrentValue = $Delivery_Report_1->PublishedDate->DbValue;
    }
}
// Close recordset
$rs->Close();
?>
	<tr><td colspan=6><span class="phpmaker">&nbsp;<br></span></td></tr>
	<tr><td colspan=6 class="ewGrandSummary"><span class="phpmaker">Grand Total (<?php 
echo ew_FormatNumber($Delivery_Report_1_report->nCntRecs[0], 0);
?>
 Detail Records)</span></td></tr>
	<tr><td colspan=6><span class="phpmaker">&nbsp;<br></span></td></tr>
</table>
</form>
<?php 
if ($Delivery_Report_1->Export == "") {
    ?>
<script language="JavaScript" type="text/javascript">
<!--

// Write your table-specific startup script here
// document.write("page loaded");
//-->
Ejemplo n.º 8
0
 function RenderEditRow()
 {
     global $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // BAGGAGE_ID
     $this->BAGGAGE_ID->EditAttrs["class"] = "form-control";
     $this->BAGGAGE_ID->EditCustomAttributes = "";
     $this->BAGGAGE_ID->EditValue = $this->BAGGAGE_ID->CurrentValue;
     $this->BAGGAGE_ID->ViewCustomAttributes = "";
     // BOARDING_ID
     $this->BOARDING_ID->EditAttrs["class"] = "form-control";
     $this->BOARDING_ID->EditCustomAttributes = "";
     $this->BOARDING_ID->EditValue = $this->BOARDING_ID->CurrentValue;
     $this->BOARDING_ID->PlaceHolder = ew_RemoveHtml($this->BOARDING_ID->FldCaption());
     if (strval($this->BOARDING_ID->EditValue) != "" && is_numeric($this->BOARDING_ID->EditValue)) {
         $this->BOARDING_ID->EditValue = ew_FormatNumber($this->BOARDING_ID->EditValue, -2, -1, -2, 0);
     }
     // PASSANGER_ID
     $this->PASSANGER_ID->EditAttrs["class"] = "form-control";
     $this->PASSANGER_ID->EditCustomAttributes = "";
     $this->PASSANGER_ID->EditValue = $this->PASSANGER_ID->CurrentValue;
     $this->PASSANGER_ID->PlaceHolder = ew_RemoveHtml($this->PASSANGER_ID->FldCaption());
     // WEIGHT
     $this->WEIGHT->EditAttrs["class"] = "form-control";
     $this->WEIGHT->EditCustomAttributes = "";
     $this->WEIGHT->EditValue = $this->WEIGHT->CurrentValue;
     $this->WEIGHT->PlaceHolder = ew_RemoveHtml($this->WEIGHT->FldCaption());
     if (strval($this->WEIGHT->EditValue) != "" && is_numeric($this->WEIGHT->EditValue)) {
         $this->WEIGHT->EditValue = ew_FormatNumber($this->WEIGHT->EditValue, -2, -1, -2, 0);
     }
     // Call Row Rendered event
     $this->Row_Rendered();
 }
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // idreceta
     $this->idreceta->EditAttrs["class"] = "form-control";
     $this->idreceta->EditCustomAttributes = "";
     $this->idreceta->EditValue = $this->idreceta->CurrentValue;
     $this->idreceta->ViewCustomAttributes = "";
     // idempleado
     $this->idempleado->EditAttrs["class"] = "form-control";
     $this->idempleado->EditCustomAttributes = "";
     if ($this->idempleado->getSessionValue() != "") {
         $this->idempleado->CurrentValue = $this->idempleado->getSessionValue();
         if (strval($this->idempleado->CurrentValue) != "") {
             $sFilterWrk = "`idempleado`" . ew_SearchString("=", $this->idempleado->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idempleado`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `empleado`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idempleado, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idempleado->ViewValue = $rswrk->fields('DispFld');
                 $this->idempleado->ViewValue .= ew_ValueSeparator(1, $this->idempleado) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->idempleado->ViewValue = $this->idempleado->CurrentValue;
             }
         } else {
             $this->idempleado->ViewValue = NULL;
         }
         $this->idempleado->ViewCustomAttributes = "";
     } else {
     }
     // idmedicina
     $this->idmedicina->EditAttrs["class"] = "form-control";
     $this->idmedicina->EditCustomAttributes = "";
     if ($this->idmedicina->getSessionValue() != "") {
         $this->idmedicina->CurrentValue = $this->idmedicina->getSessionValue();
         if (strval($this->idmedicina->CurrentValue) != "") {
             $sFilterWrk = "`idmedicina`" . ew_SearchString("=", $this->idmedicina->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idmedicina`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `medicina`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idmedicina, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idmedicina->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idmedicina->ViewValue = $this->idmedicina->CurrentValue;
             }
         } else {
             $this->idmedicina->ViewValue = NULL;
         }
         $this->idmedicina->ViewCustomAttributes = "";
     } else {
     }
     // fecha
     $this->fecha->EditAttrs["class"] = "form-control";
     $this->fecha->EditCustomAttributes = "";
     $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
     $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
     // cantidad
     $this->cantidad->EditAttrs["class"] = "form-control";
     $this->cantidad->EditCustomAttributes = "";
     $this->cantidad->EditValue = ew_HtmlEncode($this->cantidad->CurrentValue);
     $this->cantidad->PlaceHolder = ew_RemoveHtml($this->cantidad->FldCaption());
     // precio_unitario
     $this->precio_unitario->EditAttrs["class"] = "form-control";
     $this->precio_unitario->EditCustomAttributes = "";
     $this->precio_unitario->EditValue = ew_HtmlEncode($this->precio_unitario->CurrentValue);
     $this->precio_unitario->PlaceHolder = ew_RemoveHtml($this->precio_unitario->FldCaption());
     if (strval($this->precio_unitario->EditValue) != "" && is_numeric($this->precio_unitario->EditValue)) {
         $this->precio_unitario->EditValue = ew_FormatNumber($this->precio_unitario->EditValue, -2, -1, -2, 0);
     }
     // idturno
     $this->idturno->EditAttrs["class"] = "form-control";
     $this->idturno->EditCustomAttributes = "";
     if ($this->idturno->getSessionValue() != "") {
         $this->idturno->CurrentValue = $this->idturno->getSessionValue();
         if (strval($this->idturno->CurrentValue) != "") {
             $sFilterWrk = "`idturno`" . ew_SearchString("=", $this->idturno->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idturno`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `turno`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idturno, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idturno->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idturno->ViewValue = $this->idturno->CurrentValue;
             }
         } else {
             $this->idturno->ViewValue = NULL;
         }
         $this->idturno->ViewCustomAttributes = "";
     } else {
     }
     // idcuenta
     $this->idcuenta->EditAttrs["class"] = "form-control";
     $this->idcuenta->EditCustomAttributes = "";
     $this->idcuenta->EditValue = ew_HtmlEncode($this->idcuenta->CurrentValue);
     $this->idcuenta->PlaceHolder = ew_RemoveHtml($this->idcuenta->FldCaption());
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Ejemplo n.º 10
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->precio->FormValue == $this->precio->CurrentValue && is_numeric(ew_StrToFloat($this->precio->CurrentValue))) {
         $this->precio->CurrentValue = ew_StrToFloat($this->precio->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->entrega->FormValue == $this->entrega->CurrentValue && is_numeric(ew_StrToFloat($this->entrega->CurrentValue))) {
         $this->entrega->CurrentValue = ew_StrToFloat($this->entrega->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // nro_orden
     // fecha_recepcion
     // cliente
     // id_tipo_cliente
     // tel
     // cel
     // objetos
     // detalle_a_realizar
     // fecha_entrega
     // observaciones
     // id_estado
     // precio
     // entrega
     // saldo
     // foto1
     // foto2
     // usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // nro_orden
         $this->nro_orden->ViewValue = $this->nro_orden->CurrentValue;
         $this->nro_orden->ViewCustomAttributes = "";
         // fecha_recepcion
         $this->fecha_recepcion->ViewValue = $this->fecha_recepcion->CurrentValue;
         $this->fecha_recepcion->ViewValue = ew_FormatDateTime($this->fecha_recepcion->ViewValue, 7);
         $this->fecha_recepcion->ViewCustomAttributes = "";
         // cliente
         $this->cliente->ViewValue = $this->cliente->CurrentValue;
         $this->cliente->ViewCustomAttributes = "";
         // id_tipo_cliente
         if (strval($this->id_tipo_cliente->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_cliente->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT DISTINCT `codigo`, `tipo_cliente` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_clientes`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tipo_cliente, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `tipo_cliente` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_tipo_cliente->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->id_tipo_cliente->ViewValue = $this->id_tipo_cliente->CurrentValue;
             }
         } else {
             $this->id_tipo_cliente->ViewValue = NULL;
         }
         $this->id_tipo_cliente->ViewCustomAttributes = "";
         // tel
         $this->tel->ViewValue = $this->tel->CurrentValue;
         $this->tel->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewCustomAttributes = "";
         // objetos
         $this->objetos->ViewValue = $this->objetos->CurrentValue;
         $this->objetos->ViewCustomAttributes = "";
         // detalle_a_realizar
         $this->detalle_a_realizar->ViewValue = $this->detalle_a_realizar->CurrentValue;
         $this->detalle_a_realizar->ViewCustomAttributes = "";
         // fecha_entrega
         $this->fecha_entrega->ViewValue = $this->fecha_entrega->CurrentValue;
         $this->fecha_entrega->ViewValue = ew_FormatDateTime($this->fecha_entrega->ViewValue, 7);
         $this->fecha_entrega->ViewCustomAttributes = "";
         // observaciones
         $this->observaciones->ViewValue = $this->observaciones->CurrentValue;
         $this->observaciones->ViewCustomAttributes = "";
         // id_estado
         if (strval($this->id_estado->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_estado->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT DISTINCT `codigo`, `estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estados`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_estado, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `codigo` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_estado->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->id_estado->ViewValue = $this->id_estado->CurrentValue;
             }
         } else {
             $this->id_estado->ViewValue = NULL;
         }
         $this->id_estado->ViewCustomAttributes = "";
         // precio
         $this->precio->ViewValue = $this->precio->CurrentValue;
         $this->precio->ViewValue = ew_FormatCurrency($this->precio->ViewValue, 2, -2, -2, -2);
         $this->precio->ViewCustomAttributes = "";
         // entrega
         $this->entrega->ViewValue = $this->entrega->CurrentValue;
         $this->entrega->ViewValue = ew_FormatCurrency($this->entrega->ViewValue, 2, -2, -2, -2);
         $this->entrega->ViewCustomAttributes = "";
         // saldo
         $this->saldo->ViewValue = $this->saldo->CurrentValue;
         $this->saldo->ViewValue = ew_FormatCurrency($this->saldo->ViewValue, 2, -2, -2, -2);
         $this->saldo->ViewCustomAttributes = "";
         // foto1
         if (!ew_Empty($this->foto1->Upload->DbValue)) {
             $this->foto1->ImageAlt = $this->foto1->FldAlt();
             $this->foto1->ViewValue = ew_UploadPathEx(FALSE, $this->foto1->UploadPath) . $this->foto1->Upload->DbValue;
         } else {
             $this->foto1->ViewValue = "";
         }
         $this->foto1->ViewCustomAttributes = "";
         // foto2
         if (!ew_Empty($this->foto2->Upload->DbValue)) {
             $this->foto2->ImageAlt = $this->foto2->FldAlt();
             $this->foto2->ViewValue = ew_UploadPathEx(FALSE, $this->foto2->UploadPath) . $this->foto2->Upload->DbValue;
         } else {
             $this->foto2->ViewValue = "";
         }
         $this->foto2->ViewCustomAttributes = "";
         // nro_orden
         $this->nro_orden->LinkCustomAttributes = "";
         $this->nro_orden->HrefValue = "";
         $this->nro_orden->TooltipValue = "";
         // fecha_recepcion
         $this->fecha_recepcion->LinkCustomAttributes = "";
         $this->fecha_recepcion->HrefValue = "";
         $this->fecha_recepcion->TooltipValue = "";
         // cliente
         $this->cliente->LinkCustomAttributes = "";
         $this->cliente->HrefValue = "";
         $this->cliente->TooltipValue = "";
         // id_tipo_cliente
         $this->id_tipo_cliente->LinkCustomAttributes = "";
         $this->id_tipo_cliente->HrefValue = "";
         $this->id_tipo_cliente->TooltipValue = "";
         // tel
         $this->tel->LinkCustomAttributes = "";
         $this->tel->HrefValue = "";
         $this->tel->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // objetos
         $this->objetos->LinkCustomAttributes = "";
         $this->objetos->HrefValue = "";
         $this->objetos->TooltipValue = "";
         // detalle_a_realizar
         $this->detalle_a_realizar->LinkCustomAttributes = "";
         $this->detalle_a_realizar->HrefValue = "";
         $this->detalle_a_realizar->TooltipValue = "";
         // fecha_entrega
         $this->fecha_entrega->LinkCustomAttributes = "";
         $this->fecha_entrega->HrefValue = "";
         $this->fecha_entrega->TooltipValue = "";
         // observaciones
         $this->observaciones->LinkCustomAttributes = "";
         $this->observaciones->HrefValue = "";
         $this->observaciones->TooltipValue = "";
         // id_estado
         $this->id_estado->LinkCustomAttributes = "";
         $this->id_estado->HrefValue = "";
         $this->id_estado->TooltipValue = "";
         // precio
         $this->precio->LinkCustomAttributes = "";
         $this->precio->HrefValue = "";
         $this->precio->TooltipValue = "";
         // entrega
         $this->entrega->LinkCustomAttributes = "";
         $this->entrega->HrefValue = "";
         $this->entrega->TooltipValue = "";
         // foto1
         $this->foto1->LinkCustomAttributes = "";
         $this->foto1->HrefValue = "";
         $this->foto1->HrefValue2 = $this->foto1->UploadPath . $this->foto1->Upload->DbValue;
         $this->foto1->TooltipValue = "";
         // foto2
         $this->foto2->LinkCustomAttributes = "";
         $this->foto2->HrefValue = "";
         $this->foto2->HrefValue2 = $this->foto2->UploadPath . $this->foto2->Upload->DbValue;
         $this->foto2->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // nro_orden
         $this->nro_orden->EditCustomAttributes = "";
         $this->nro_orden->EditValue = $this->nro_orden->CurrentValue;
         $this->nro_orden->ViewCustomAttributes = "";
         // fecha_recepcion
         $this->fecha_recepcion->EditCustomAttributes = "";
         $this->fecha_recepcion->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_recepcion->CurrentValue, 7));
         $this->fecha_recepcion->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->fecha_recepcion->FldCaption()));
         // cliente
         $this->cliente->EditCustomAttributes = "";
         $this->cliente->EditValue = ew_HtmlEncode($this->cliente->CurrentValue);
         $this->cliente->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cliente->FldCaption()));
         // id_tipo_cliente
         $this->id_tipo_cliente->EditCustomAttributes = "";
         if (trim(strval($this->id_tipo_cliente->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_cliente->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT DISTINCT `codigo`, `tipo_cliente` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_clientes`";
         $sWhereWrk = "";
         $lookuptblfilter = "`activo`='S'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tipo_cliente, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `tipo_cliente` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_tipo_cliente->EditValue = $arwrk;
         // tel
         $this->tel->EditCustomAttributes = "";
         $this->tel->EditValue = ew_HtmlEncode($this->tel->CurrentValue);
         $this->tel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->tel->FldCaption()));
         // cel
         $this->cel->EditCustomAttributes = "";
         $this->cel->EditValue = ew_HtmlEncode($this->cel->CurrentValue);
         $this->cel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cel->FldCaption()));
         // objetos
         $this->objetos->EditCustomAttributes = "";
         $this->objetos->EditValue = ew_HtmlEncode($this->objetos->CurrentValue);
         $this->objetos->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->objetos->FldCaption()));
         // detalle_a_realizar
         $this->detalle_a_realizar->EditCustomAttributes = "";
         $this->detalle_a_realizar->EditValue = $this->detalle_a_realizar->CurrentValue;
         $this->detalle_a_realizar->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->detalle_a_realizar->FldCaption()));
         // fecha_entrega
         $this->fecha_entrega->EditCustomAttributes = "";
         $this->fecha_entrega->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_entrega->CurrentValue, 7));
         $this->fecha_entrega->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->fecha_entrega->FldCaption()));
         // observaciones
         $this->observaciones->EditCustomAttributes = "";
         $this->observaciones->EditValue = $this->observaciones->CurrentValue;
         $this->observaciones->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->observaciones->FldCaption()));
         // id_estado
         $this->id_estado->EditCustomAttributes = "";
         if (trim(strval($this->id_estado->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_estado->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT DISTINCT `codigo`, `estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `estados`";
         $sWhereWrk = "";
         $lookuptblfilter = "`activo`='S'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_estado, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `codigo` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_estado->EditValue = $arwrk;
         // precio
         $this->precio->EditCustomAttributes = "";
         $this->precio->EditValue = ew_HtmlEncode($this->precio->CurrentValue);
         $this->precio->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->precio->FldCaption()));
         if (strval($this->precio->EditValue) != "" && is_numeric($this->precio->EditValue)) {
             $this->precio->EditValue = ew_FormatNumber($this->precio->EditValue, -2, -2, -2, -2);
         }
         // entrega
         $this->entrega->EditCustomAttributes = "";
         $this->entrega->EditValue = ew_HtmlEncode($this->entrega->CurrentValue);
         $this->entrega->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->entrega->FldCaption()));
         if (strval($this->entrega->EditValue) != "" && is_numeric($this->entrega->EditValue)) {
             $this->entrega->EditValue = ew_FormatNumber($this->entrega->EditValue, -2, -2, -2, -2);
         }
         // foto1
         $this->foto1->EditCustomAttributes = "";
         if (!ew_Empty($this->foto1->Upload->DbValue)) {
             $this->foto1->ImageAlt = $this->foto1->FldAlt();
             $this->foto1->EditValue = ew_UploadPathEx(FALSE, $this->foto1->UploadPath) . $this->foto1->Upload->DbValue;
         } else {
             $this->foto1->EditValue = "";
         }
         if ($this->CurrentAction == "I" && !$this->EventCancelled) {
             ew_RenderUploadField($this->foto1);
         }
         // foto2
         $this->foto2->EditCustomAttributes = "";
         if (!ew_Empty($this->foto2->Upload->DbValue)) {
             $this->foto2->ImageAlt = $this->foto2->FldAlt();
             $this->foto2->EditValue = ew_UploadPathEx(FALSE, $this->foto2->UploadPath) . $this->foto2->Upload->DbValue;
         } else {
             $this->foto2->EditValue = "";
         }
         if ($this->CurrentAction == "I" && !$this->EventCancelled) {
             ew_RenderUploadField($this->foto2);
         }
         // Edit refer script
         // nro_orden
         $this->nro_orden->HrefValue = "";
         // fecha_recepcion
         $this->fecha_recepcion->HrefValue = "";
         // cliente
         $this->cliente->HrefValue = "";
         // id_tipo_cliente
         $this->id_tipo_cliente->HrefValue = "";
         // tel
         $this->tel->HrefValue = "";
         // cel
         $this->cel->HrefValue = "";
         // objetos
         $this->objetos->HrefValue = "";
         // detalle_a_realizar
         $this->detalle_a_realizar->HrefValue = "";
         // fecha_entrega
         $this->fecha_entrega->HrefValue = "";
         // observaciones
         $this->observaciones->HrefValue = "";
         // id_estado
         $this->id_estado->HrefValue = "";
         // precio
         $this->precio->HrefValue = "";
         // entrega
         $this->entrega->HrefValue = "";
         // foto1
         $this->foto1->HrefValue = "";
         $this->foto1->HrefValue2 = $this->foto1->UploadPath . $this->foto1->Upload->DbValue;
         // foto2
         $this->foto2->HrefValue = "";
         $this->foto2->HrefValue2 = $this->foto2->UploadPath . $this->foto2->Upload->DbValue;
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // fecha_ini
     $this->fecha_ini->EditAttrs["class"] = "form-control";
     $this->fecha_ini->EditCustomAttributes = "";
     $this->fecha_ini->EditValue = ew_HtmlEncode($this->fecha_ini->CurrentValue);
     $this->fecha_ini->PlaceHolder = ew_RemoveHtml($this->fecha_ini->FldCaption());
     // fecha_fin
     $this->fecha_fin->EditAttrs["class"] = "form-control";
     $this->fecha_fin->EditCustomAttributes = "";
     $this->fecha_fin->EditValue = ew_HtmlEncode($this->fecha_fin->CurrentValue);
     $this->fecha_fin->PlaceHolder = ew_RemoveHtml($this->fecha_fin->FldCaption());
     // Patente
     $this->Patente->EditAttrs["class"] = "form-control";
     $this->Patente->EditCustomAttributes = "";
     $this->Patente->EditValue = ew_HtmlEncode($this->Patente->CurrentValue);
     $this->Patente->PlaceHolder = ew_RemoveHtml($this->Patente->FldCaption());
     // taller
     $this->taller->EditAttrs["class"] = "form-control";
     $this->taller->EditCustomAttributes = "";
     $this->taller->EditValue = ew_HtmlEncode($this->taller->CurrentValue);
     $this->taller->PlaceHolder = ew_RemoveHtml($this->taller->FldCaption());
     // tipo_mantenimiento
     $this->tipo_mantenimiento->EditAttrs["class"] = "form-control";
     $this->tipo_mantenimiento->EditCustomAttributes = "";
     $this->tipo_mantenimiento->EditValue = ew_HtmlEncode($this->tipo_mantenimiento->CurrentValue);
     $this->tipo_mantenimiento->PlaceHolder = ew_RemoveHtml($this->tipo_mantenimiento->FldCaption());
     // nro_hoja_mantenimiento
     $this->nro_hoja_mantenimiento->EditAttrs["class"] = "form-control";
     $this->nro_hoja_mantenimiento->EditCustomAttributes = "";
     $this->nro_hoja_mantenimiento->EditValue = ew_HtmlEncode($this->nro_hoja_mantenimiento->CurrentValue);
     $this->nro_hoja_mantenimiento->PlaceHolder = ew_RemoveHtml($this->nro_hoja_mantenimiento->FldCaption());
     // total_gasto
     $this->total_gasto->EditAttrs["class"] = "form-control";
     $this->total_gasto->EditCustomAttributes = "";
     $this->total_gasto->EditValue = ew_HtmlEncode($this->total_gasto->CurrentValue);
     $this->total_gasto->PlaceHolder = ew_RemoveHtml($this->total_gasto->FldCaption());
     if (strval($this->total_gasto->EditValue) != "" && is_numeric($this->total_gasto->EditValue)) {
         $this->total_gasto->EditValue = ew_FormatNumber($this->total_gasto->EditValue, -2, -1, -2, 0);
     }
     // Call Row Rendered event
     $this->Row_Rendered();
 }
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // codigo
     $this->codigo->EditAttrs["class"] = "form-control";
     $this->codigo->EditCustomAttributes = "";
     $this->codigo->EditValue = $this->codigo->CurrentValue;
     $this->codigo->ViewCustomAttributes = "";
     // responsable
     $this->responsable->EditAttrs["class"] = "form-control";
     $this->responsable->EditCustomAttributes = "";
     $this->responsable->EditValue = ew_HtmlEncode($this->responsable->CurrentValue);
     $this->responsable->PlaceHolder = ew_RemoveHtml($this->responsable->FldCaption());
     // Patente
     $this->Patente->EditAttrs["class"] = "form-control";
     $this->Patente->EditCustomAttributes = "";
     $this->Patente->EditValue = ew_HtmlEncode($this->Patente->CurrentValue);
     $this->Patente->PlaceHolder = ew_RemoveHtml($this->Patente->FldCaption());
     // kg_carga
     $this->kg_carga->EditAttrs["class"] = "form-control";
     $this->kg_carga->EditCustomAttributes = "";
     $this->kg_carga->EditValue = ew_HtmlEncode($this->kg_carga->CurrentValue);
     $this->kg_carga->PlaceHolder = ew_RemoveHtml($this->kg_carga->FldCaption());
     // tarifa
     $this->tarifa->EditAttrs["class"] = "form-control";
     $this->tarifa->EditCustomAttributes = "";
     $this->tarifa->EditValue = ew_HtmlEncode($this->tarifa->CurrentValue);
     $this->tarifa->PlaceHolder = ew_RemoveHtml($this->tarifa->FldCaption());
     if (strval($this->tarifa->EditValue) != "" && is_numeric($this->tarifa->EditValue)) {
         $this->tarifa->EditValue = ew_FormatNumber($this->tarifa->EditValue, -2, -2, -2, -2);
     }
     // sub_total
     $this->sub_total->EditAttrs["class"] = "form-control";
     $this->sub_total->EditCustomAttributes = "";
     $this->sub_total->EditValue = ew_HtmlEncode($this->sub_total->CurrentValue);
     $this->sub_total->PlaceHolder = ew_RemoveHtml($this->sub_total->FldCaption());
     if (strval($this->sub_total->EditValue) != "" && is_numeric($this->sub_total->EditValue)) {
         $this->sub_total->EditValue = ew_FormatNumber($this->sub_total->EditValue, -2, -2, -2, -2);
     }
     // porcentaje
     $this->porcentaje->EditAttrs["class"] = "form-control";
     $this->porcentaje->EditCustomAttributes = "";
     $this->porcentaje->EditValue = ew_HtmlEncode($this->porcentaje->CurrentValue);
     $this->porcentaje->PlaceHolder = ew_RemoveHtml($this->porcentaje->FldCaption());
     if (strval($this->porcentaje->EditValue) != "" && is_numeric($this->porcentaje->EditValue)) {
         $this->porcentaje->EditValue = ew_FormatNumber($this->porcentaje->EditValue, -2, -1, -2, 0);
     }
     // comision_chofer
     $this->comision_chofer->EditAttrs["class"] = "form-control";
     $this->comision_chofer->EditCustomAttributes = "";
     $this->comision_chofer->EditValue = ew_HtmlEncode($this->comision_chofer->CurrentValue);
     $this->comision_chofer->PlaceHolder = ew_RemoveHtml($this->comision_chofer->FldCaption());
     if (strval($this->comision_chofer->EditValue) != "" && is_numeric($this->comision_chofer->EditValue)) {
         $this->comision_chofer->EditValue = ew_FormatNumber($this->comision_chofer->EditValue, -2, -2, -1, -2);
     }
     // adelanto
     $this->adelanto->EditAttrs["class"] = "form-control";
     $this->adelanto->EditCustomAttributes = "";
     $this->adelanto->EditValue = ew_HtmlEncode($this->adelanto->CurrentValue);
     $this->adelanto->PlaceHolder = ew_RemoveHtml($this->adelanto->FldCaption());
     if (strval($this->adelanto->EditValue) != "" && is_numeric($this->adelanto->EditValue)) {
         $this->adelanto->EditValue = ew_FormatNumber($this->adelanto->EditValue, -2, -2, -2, -2);
     }
     // total
     $this->total->EditAttrs["class"] = "form-control";
     $this->total->EditCustomAttributes = "";
     $this->total->EditValue = ew_HtmlEncode($this->total->CurrentValue);
     $this->total->PlaceHolder = ew_RemoveHtml($this->total->FldCaption());
     if (strval($this->total->EditValue) != "" && is_numeric($this->total->EditValue)) {
         $this->total->EditValue = ew_FormatNumber($this->total->EditValue, -2, -2, -2, -2);
     }
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Ejemplo n.º 13
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // nombre
     // direccion
     // fecha_nacimiento
     // tel
     // cel
     // email
     // fecha_inicio
     // cetegoria
     // datos
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // nombre
         $this->nombre->ViewValue = $this->nombre->CurrentValue;
         $this->nombre->ViewCustomAttributes = "";
         // direccion
         $this->direccion->ViewValue = $this->direccion->CurrentValue;
         $this->direccion->ViewCustomAttributes = "";
         // fecha_nacimiento
         $this->fecha_nacimiento->ViewValue = $this->fecha_nacimiento->CurrentValue;
         $this->fecha_nacimiento->ViewValue = ew_FormatDateTime($this->fecha_nacimiento->ViewValue, 7);
         $this->fecha_nacimiento->ViewCustomAttributes = "";
         // tel
         $this->tel->ViewValue = $this->tel->CurrentValue;
         $this->tel->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewValue = strtolower($this->_email->ViewValue);
         $this->_email->ViewCustomAttributes = "";
         // fecha_inicio
         $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
         $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 7);
         $this->fecha_inicio->ViewCustomAttributes = "";
         // cetegoria
         $this->cetegoria->ViewValue = $this->cetegoria->CurrentValue;
         $this->cetegoria->ViewValue = ew_FormatNumber($this->cetegoria->ViewValue, 0, -2, -2, -2);
         $this->cetegoria->ViewCustomAttributes = "";
         // datos
         $this->datos->ViewValue = $this->datos->CurrentValue;
         $this->datos->ViewCustomAttributes = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // nombre
         $this->nombre->LinkCustomAttributes = "";
         $this->nombre->HrefValue = "";
         $this->nombre->TooltipValue = "";
         // direccion
         $this->direccion->LinkCustomAttributes = "";
         $this->direccion->HrefValue = "";
         $this->direccion->TooltipValue = "";
         // fecha_nacimiento
         $this->fecha_nacimiento->LinkCustomAttributes = "";
         $this->fecha_nacimiento->HrefValue = "";
         $this->fecha_nacimiento->TooltipValue = "";
         // tel
         $this->tel->LinkCustomAttributes = "";
         $this->tel->HrefValue = "";
         $this->tel->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // fecha_inicio
         $this->fecha_inicio->LinkCustomAttributes = "";
         $this->fecha_inicio->HrefValue = "";
         $this->fecha_inicio->TooltipValue = "";
         // cetegoria
         $this->cetegoria->LinkCustomAttributes = "";
         $this->cetegoria->HrefValue = "";
         $this->cetegoria->TooltipValue = "";
         // datos
         $this->datos->LinkCustomAttributes = "";
         $this->datos->HrefValue = "";
         $this->datos->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 14
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->Importe->FormValue == $this->Importe->CurrentValue && is_numeric(ew_StrToFloat($this->Importe->CurrentValue))) {
         $this->Importe->CurrentValue = ew_StrToFloat($this->Importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // fecha
     // detalles
     // Importe
     // id_tipo_gasto
     // id_hoja_ruta
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // detalles
         $this->detalles->ViewValue = $this->detalles->CurrentValue;
         $this->detalles->ViewCustomAttributes = "";
         // Importe
         $this->Importe->ViewValue = $this->Importe->CurrentValue;
         $this->Importe->ViewValue = ew_FormatCurrency($this->Importe->ViewValue, 2, 0, 0, -1);
         $this->Importe->ViewCustomAttributes = "";
         // id_tipo_gasto
         if ($this->id_tipo_gasto->VirtualValue != "") {
             $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
         } else {
             if (strval($this->id_tipo_gasto->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`clase`='R'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
                     $this->id_tipo_gasto->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_gasto) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
                 }
             } else {
                 $this->id_tipo_gasto->ViewValue = NULL;
             }
         }
         $this->id_tipo_gasto->ViewCustomAttributes = "";
         // id_hoja_ruta
         if ($this->id_hoja_ruta->VirtualValue != "") {
             $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->VirtualValue;
         } else {
             $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
             if (strval($this->id_hoja_ruta->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_hoja_ruta->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha_ini` AS `Disp2Fld`, `Origen` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hoja_rutas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_hoja_ruta, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `codigo` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_hoja_ruta->ViewValue = $rswrk->fields('DispFld');
                     $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(1, $this->id_hoja_ruta) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                     $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(2, $this->id_hoja_ruta) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
                 }
             } else {
                 $this->id_hoja_ruta->ViewValue = NULL;
             }
         }
         $this->id_hoja_ruta->ViewCustomAttributes = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // detalles
         $this->detalles->LinkCustomAttributes = "";
         $this->detalles->HrefValue = "";
         $this->detalles->TooltipValue = "";
         // Importe
         $this->Importe->LinkCustomAttributes = "";
         $this->Importe->HrefValue = "";
         $this->Importe->TooltipValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->LinkCustomAttributes = "";
         $this->id_tipo_gasto->HrefValue = "";
         $this->id_tipo_gasto->TooltipValue = "";
         // id_hoja_ruta
         $this->id_hoja_ruta->LinkCustomAttributes = "";
         $this->id_hoja_ruta->HrefValue = "";
         $this->id_hoja_ruta->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // detalles
         $this->detalles->EditAttrs["class"] = "form-control";
         $this->detalles->EditCustomAttributes = "";
         $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue);
         $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption());
         // Importe
         $this->Importe->EditAttrs["class"] = "form-control";
         $this->Importe->EditCustomAttributes = "";
         $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue);
         $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption());
         if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) {
             $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, 0, 0, -1);
         }
         // id_tipo_gasto
         $this->id_tipo_gasto->EditAttrs["class"] = "form-control";
         $this->id_tipo_gasto->EditCustomAttributes = "";
         if ($this->id_tipo_gasto->getSessionValue() != "") {
             $this->id_tipo_gasto->CurrentValue = $this->id_tipo_gasto->getSessionValue();
             if ($this->id_tipo_gasto->VirtualValue != "") {
                 $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
             } else {
                 if (strval($this->id_tipo_gasto->CurrentValue) != "") {
                     $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
                     $sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
                     $sWhereWrk = "";
                     $lookuptblfilter = "`clase`='R'";
                     if (strval($lookuptblfilter) != "") {
                         ew_AddFilter($sWhereWrk, $lookuptblfilter);
                     }
                     if ($sFilterWrk != "") {
                         ew_AddFilter($sWhereWrk, $sFilterWrk);
                     }
                     // Call Lookup selecting
                     $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
                     if ($sWhereWrk != "") {
                         $sSqlWrk .= " WHERE " . $sWhereWrk;
                     }
                     $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
                     $rswrk = $conn->Execute($sSqlWrk);
                     if ($rswrk && !$rswrk->EOF) {
                         // Lookup values found
                         $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
                         $this->id_tipo_gasto->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_gasto) . $rswrk->fields('Disp2Fld');
                         $rswrk->Close();
                     } else {
                         $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
                     }
                 } else {
                     $this->id_tipo_gasto->ViewValue = NULL;
                 }
             }
             $this->id_tipo_gasto->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_tipo_gasto->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_gastos`";
             $sWhereWrk = "";
             $lookuptblfilter = "`clase`='R'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_tipo_gasto->EditValue = $arwrk;
         }
         // id_hoja_ruta
         $this->id_hoja_ruta->EditAttrs["class"] = "form-control";
         $this->id_hoja_ruta->EditCustomAttributes = "";
         if ($this->id_hoja_ruta->getSessionValue() != "") {
             $this->id_hoja_ruta->CurrentValue = $this->id_hoja_ruta->getSessionValue();
             if ($this->id_hoja_ruta->VirtualValue != "") {
                 $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->VirtualValue;
             } else {
                 $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
                 if (strval($this->id_hoja_ruta->CurrentValue) != "") {
                     $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_hoja_ruta->CurrentValue, EW_DATATYPE_NUMBER);
                     $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha_ini` AS `Disp2Fld`, `Origen` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hoja_rutas`";
                     $sWhereWrk = "";
                     if ($sFilterWrk != "") {
                         ew_AddFilter($sWhereWrk, $sFilterWrk);
                     }
                     // Call Lookup selecting
                     $this->Lookup_Selecting($this->id_hoja_ruta, $sWhereWrk);
                     if ($sWhereWrk != "") {
                         $sSqlWrk .= " WHERE " . $sWhereWrk;
                     }
                     $sSqlWrk .= " ORDER BY `codigo` ASC";
                     $rswrk = $conn->Execute($sSqlWrk);
                     if ($rswrk && !$rswrk->EOF) {
                         // Lookup values found
                         $this->id_hoja_ruta->ViewValue = $rswrk->fields('DispFld');
                         $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(1, $this->id_hoja_ruta) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                         $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(2, $this->id_hoja_ruta) . $rswrk->fields('Disp3Fld');
                         $rswrk->Close();
                     } else {
                         $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
                     }
                 } else {
                     $this->id_hoja_ruta->ViewValue = NULL;
                 }
             }
             $this->id_hoja_ruta->ViewCustomAttributes = "";
         } else {
             $this->id_hoja_ruta->EditValue = ew_HtmlEncode($this->id_hoja_ruta->CurrentValue);
             $this->id_hoja_ruta->PlaceHolder = ew_RemoveHtml($this->id_hoja_ruta->FldCaption());
         }
         // Edit refer script
         // fecha
         $this->fecha->HrefValue = "";
         // detalles
         $this->detalles->HrefValue = "";
         // Importe
         $this->Importe->HrefValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->HrefValue = "";
         // id_hoja_ruta
         $this->id_hoja_ruta->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 15
0
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // codigo
     $this->codigo->EditAttrs["class"] = "form-control";
     $this->codigo->EditCustomAttributes = "";
     $this->codigo->EditValue = $this->codigo->CurrentValue;
     $this->codigo->ViewCustomAttributes = "";
     // fecha
     $this->fecha->EditAttrs["class"] = "form-control";
     $this->fecha->EditCustomAttributes = "";
     $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
     $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
     // detalles
     $this->detalles->EditAttrs["class"] = "form-control";
     $this->detalles->EditCustomAttributes = "";
     $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue);
     $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption());
     // Importe
     $this->Importe->EditAttrs["class"] = "form-control";
     $this->Importe->EditCustomAttributes = "";
     $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue);
     $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption());
     if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) {
         $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, 0, 0, -1);
     }
     // id_tipo_gasto
     $this->id_tipo_gasto->EditAttrs["class"] = "form-control";
     $this->id_tipo_gasto->EditCustomAttributes = "";
     if ($this->id_tipo_gasto->getSessionValue() != "") {
         $this->id_tipo_gasto->CurrentValue = $this->id_tipo_gasto->getSessionValue();
         if ($this->id_tipo_gasto->VirtualValue != "") {
             $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
         } else {
             if (strval($this->id_tipo_gasto->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`clase`='R'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
                     $this->id_tipo_gasto->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_gasto) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
                 }
             } else {
                 $this->id_tipo_gasto->ViewValue = NULL;
             }
         }
         $this->id_tipo_gasto->ViewCustomAttributes = "";
     } else {
     }
     // id_hoja_ruta
     $this->id_hoja_ruta->EditAttrs["class"] = "form-control";
     $this->id_hoja_ruta->EditCustomAttributes = "";
     if ($this->id_hoja_ruta->getSessionValue() != "") {
         $this->id_hoja_ruta->CurrentValue = $this->id_hoja_ruta->getSessionValue();
         if ($this->id_hoja_ruta->VirtualValue != "") {
             $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->VirtualValue;
         } else {
             $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
             if (strval($this->id_hoja_ruta->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_hoja_ruta->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha_ini` AS `Disp2Fld`, `Origen` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hoja_rutas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_hoja_ruta, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `codigo` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_hoja_ruta->ViewValue = $rswrk->fields('DispFld');
                     $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(1, $this->id_hoja_ruta) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                     $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(2, $this->id_hoja_ruta) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
                 }
             } else {
                 $this->id_hoja_ruta->ViewValue = NULL;
             }
         }
         $this->id_hoja_ruta->ViewCustomAttributes = "";
     } else {
         $this->id_hoja_ruta->EditValue = ew_HtmlEncode($this->id_hoja_ruta->CurrentValue);
         $this->id_hoja_ruta->PlaceHolder = ew_RemoveHtml($this->id_hoja_ruta->FldCaption());
     }
     // id_usuario
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Ejemplo n.º 16
0
 function RenderListRow()
 {
     global $conn, $Security;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // id
     // usuario
     // contrasenia
     // nombre
     // email
     // cel
     // activo
     // id
     $this->id->ViewValue = $this->id->CurrentValue;
     $this->id->ViewCustomAttributes = "";
     // usuario
     $this->usuario->ViewValue = $this->usuario->CurrentValue;
     $this->usuario->ViewCustomAttributes = "";
     // contrasenia
     $this->contrasenia->ViewValue = "********";
     $this->contrasenia->ViewCustomAttributes = "";
     // nombre
     $this->nombre->ViewValue = $this->nombre->CurrentValue;
     $this->nombre->ViewCustomAttributes = "";
     // email
     $this->_email->ViewValue = $this->_email->CurrentValue;
     $this->_email->ViewValue = strtolower($this->_email->ViewValue);
     $this->_email->ViewCustomAttributes = "";
     // cel
     $this->cel->ViewValue = $this->cel->CurrentValue;
     $this->cel->ViewValue = ew_FormatNumber($this->cel->ViewValue, 0, -2, -2, -2);
     $this->cel->ViewCustomAttributes = "";
     // activo
     if (strval($this->activo->CurrentValue) != "") {
         switch ($this->activo->CurrentValue) {
             case $this->activo->FldTagValue(1):
                 $this->activo->ViewValue = $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->CurrentValue;
                 break;
             case $this->activo->FldTagValue(2):
                 $this->activo->ViewValue = $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->CurrentValue;
                 break;
             default:
                 $this->activo->ViewValue = $this->activo->CurrentValue;
         }
     } else {
         $this->activo->ViewValue = NULL;
     }
     $this->activo->ViewCustomAttributes = "";
     // id
     $this->id->LinkCustomAttributes = "";
     $this->id->HrefValue = "";
     $this->id->TooltipValue = "";
     // usuario
     $this->usuario->LinkCustomAttributes = "";
     $this->usuario->HrefValue = "";
     $this->usuario->TooltipValue = "";
     // contrasenia
     $this->contrasenia->LinkCustomAttributes = "";
     $this->contrasenia->HrefValue = "";
     $this->contrasenia->TooltipValue = "";
     // nombre
     $this->nombre->LinkCustomAttributes = "";
     $this->nombre->HrefValue = "";
     $this->nombre->TooltipValue = "";
     // email
     $this->_email->LinkCustomAttributes = "";
     $this->_email->HrefValue = "";
     $this->_email->TooltipValue = "";
     // cel
     $this->cel->LinkCustomAttributes = "";
     $this->cel->HrefValue = "";
     $this->cel->TooltipValue = "";
     // activo
     $this->activo->LinkCustomAttributes = "";
     $this->activo->HrefValue = "";
     $this->activo->TooltipValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
 function RenderEditRow()
 {
     global $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // UPLOAD_FILE_DETAIL_ID
     $this->UPLOAD_FILE_DETAIL_ID->EditAttrs["class"] = "form-control";
     $this->UPLOAD_FILE_DETAIL_ID->EditCustomAttributes = "";
     $this->UPLOAD_FILE_DETAIL_ID->EditValue = $this->UPLOAD_FILE_DETAIL_ID->CurrentValue;
     $this->UPLOAD_FILE_DETAIL_ID->ViewCustomAttributes = "";
     // CODE
     $this->CODE->EditAttrs["class"] = "form-control";
     $this->CODE->EditCustomAttributes = "";
     $this->CODE->EditValue = $this->CODE->CurrentValue;
     $this->CODE->PlaceHolder = ew_RemoveHtml($this->CODE->FldCaption());
     if (strval($this->CODE->EditValue) != "" && is_numeric($this->CODE->EditValue)) {
         $this->CODE->EditValue = ew_FormatNumber($this->CODE->EditValue, -2, -1, -2, 0);
     }
     // DESCRIPTION
     $this->DESCRIPTION->EditAttrs["class"] = "form-control";
     $this->DESCRIPTION->EditCustomAttributes = "";
     $this->DESCRIPTION->EditValue = $this->DESCRIPTION->CurrentValue;
     $this->DESCRIPTION->PlaceHolder = ew_RemoveHtml($this->DESCRIPTION->FldCaption());
     // DATE
     $this->DATE->EditAttrs["class"] = "form-control";
     $this->DATE->EditCustomAttributes = "";
     $this->DATE->EditValue = ew_FormatDateTime($this->DATE->CurrentValue, 7);
     $this->DATE->PlaceHolder = ew_RemoveHtml($this->DATE->FldCaption());
     // AMOUNT
     $this->AMOUNT->EditAttrs["class"] = "form-control";
     $this->AMOUNT->EditCustomAttributes = "";
     $this->AMOUNT->EditValue = $this->AMOUNT->CurrentValue;
     $this->AMOUNT->PlaceHolder = ew_RemoveHtml($this->AMOUNT->FldCaption());
     if (strval($this->AMOUNT->EditValue) != "" && is_numeric($this->AMOUNT->EditValue)) {
         $this->AMOUNT->EditValue = ew_FormatNumber($this->AMOUNT->EditValue, -2, -1, -2, 0);
     }
     // UPLOAD_FILE_ID
     $this->UPLOAD_FILE_ID->EditAttrs["class"] = "form-control";
     $this->UPLOAD_FILE_ID->EditCustomAttributes = "";
     $this->UPLOAD_FILE_ID->EditValue = $this->UPLOAD_FILE_ID->CurrentValue;
     $this->UPLOAD_FILE_ID->PlaceHolder = ew_RemoveHtml($this->UPLOAD_FILE_ID->FldCaption());
     // UPLOAD_FILE_DETAIL_STATUS_ID
     $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditAttrs["class"] = "form-control";
     $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditCustomAttributes = "";
     $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditValue = $this->UPLOAD_FILE_DETAIL_STATUS_ID->CurrentValue;
     $this->UPLOAD_FILE_DETAIL_STATUS_ID->PlaceHolder = ew_RemoveHtml($this->UPLOAD_FILE_DETAIL_STATUS_ID->FldCaption());
     // Call Row Rendered event
     $this->Row_Rendered();
 }
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->CODE->FormValue == $this->CODE->CurrentValue && is_numeric(ew_StrToFloat($this->CODE->CurrentValue))) {
         $this->CODE->CurrentValue = ew_StrToFloat($this->CODE->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->AMOUNT->FormValue == $this->AMOUNT->CurrentValue && is_numeric(ew_StrToFloat($this->AMOUNT->CurrentValue))) {
         $this->AMOUNT->CurrentValue = ew_StrToFloat($this->AMOUNT->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // UPLOAD_FILE_DETAIL_ID
     // CODE
     // DESCRIPTION
     // DATE
     // AMOUNT
     // UPLOAD_FILE_ID
     // UPLOAD_FILE_DETAIL_STATUS_ID
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // UPLOAD_FILE_DETAIL_ID
         $this->UPLOAD_FILE_DETAIL_ID->ViewValue = $this->UPLOAD_FILE_DETAIL_ID->CurrentValue;
         $this->UPLOAD_FILE_DETAIL_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // DATE
         $this->DATE->ViewValue = $this->DATE->CurrentValue;
         $this->DATE->ViewValue = ew_FormatDateTime($this->DATE->ViewValue, 7);
         $this->DATE->ViewCustomAttributes = "";
         // AMOUNT
         $this->AMOUNT->ViewValue = $this->AMOUNT->CurrentValue;
         $this->AMOUNT->ViewCustomAttributes = "";
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->ViewValue = $this->UPLOAD_FILE_ID->CurrentValue;
         $this->UPLOAD_FILE_ID->ViewCustomAttributes = "";
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->ViewValue = $this->UPLOAD_FILE_DETAIL_STATUS_ID->CurrentValue;
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // DATE
         $this->DATE->LinkCustomAttributes = "";
         $this->DATE->HrefValue = "";
         $this->DATE->TooltipValue = "";
         // AMOUNT
         $this->AMOUNT->LinkCustomAttributes = "";
         $this->AMOUNT->HrefValue = "";
         $this->AMOUNT->TooltipValue = "";
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_ID->HrefValue = "";
         $this->UPLOAD_FILE_ID->TooltipValue = "";
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->HrefValue = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // CODE
         $this->CODE->EditAttrs["class"] = "form-control";
         $this->CODE->EditCustomAttributes = "";
         $this->CODE->EditValue = ew_HtmlEncode($this->CODE->CurrentValue);
         $this->CODE->PlaceHolder = ew_RemoveHtml($this->CODE->FldCaption());
         if (strval($this->CODE->EditValue) != "" && is_numeric($this->CODE->EditValue)) {
             $this->CODE->EditValue = ew_FormatNumber($this->CODE->EditValue, -2, -1, -2, 0);
         }
         // DESCRIPTION
         $this->DESCRIPTION->EditAttrs["class"] = "form-control";
         $this->DESCRIPTION->EditCustomAttributes = "";
         $this->DESCRIPTION->EditValue = ew_HtmlEncode($this->DESCRIPTION->CurrentValue);
         $this->DESCRIPTION->PlaceHolder = ew_RemoveHtml($this->DESCRIPTION->FldCaption());
         // DATE
         $this->DATE->EditAttrs["class"] = "form-control";
         $this->DATE->EditCustomAttributes = "";
         $this->DATE->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->DATE->CurrentValue, 7));
         $this->DATE->PlaceHolder = ew_RemoveHtml($this->DATE->FldCaption());
         // AMOUNT
         $this->AMOUNT->EditAttrs["class"] = "form-control";
         $this->AMOUNT->EditCustomAttributes = "";
         $this->AMOUNT->EditValue = ew_HtmlEncode($this->AMOUNT->CurrentValue);
         $this->AMOUNT->PlaceHolder = ew_RemoveHtml($this->AMOUNT->FldCaption());
         if (strval($this->AMOUNT->EditValue) != "" && is_numeric($this->AMOUNT->EditValue)) {
             $this->AMOUNT->EditValue = ew_FormatNumber($this->AMOUNT->EditValue, -2, -1, -2, 0);
         }
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->EditAttrs["class"] = "form-control";
         $this->UPLOAD_FILE_ID->EditCustomAttributes = "";
         $this->UPLOAD_FILE_ID->EditValue = ew_HtmlEncode($this->UPLOAD_FILE_ID->CurrentValue);
         $this->UPLOAD_FILE_ID->PlaceHolder = ew_RemoveHtml($this->UPLOAD_FILE_ID->FldCaption());
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditAttrs["class"] = "form-control";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditCustomAttributes = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditValue = ew_HtmlEncode($this->UPLOAD_FILE_DETAIL_STATUS_ID->CurrentValue);
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->PlaceHolder = ew_RemoveHtml($this->UPLOAD_FILE_DETAIL_STATUS_ID->FldCaption());
         // Add refer script
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         // DATE
         $this->DATE->LinkCustomAttributes = "";
         $this->DATE->HrefValue = "";
         // AMOUNT
         $this->AMOUNT->LinkCustomAttributes = "";
         $this->AMOUNT->HrefValue = "";
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_ID->HrefValue = "";
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->tarifa->FormValue == $this->tarifa->CurrentValue && is_numeric(ew_StrToFloat($this->tarifa->CurrentValue))) {
         $this->tarifa->CurrentValue = ew_StrToFloat($this->tarifa->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->sub_total->FormValue == $this->sub_total->CurrentValue && is_numeric(ew_StrToFloat($this->sub_total->CurrentValue))) {
         $this->sub_total->CurrentValue = ew_StrToFloat($this->sub_total->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->porcentaje->FormValue == $this->porcentaje->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje->CurrentValue))) {
         $this->porcentaje->CurrentValue = ew_StrToFloat($this->porcentaje->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->comision_chofer->FormValue == $this->comision_chofer->CurrentValue && is_numeric(ew_StrToFloat($this->comision_chofer->CurrentValue))) {
         $this->comision_chofer->CurrentValue = ew_StrToFloat($this->comision_chofer->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->adelanto->FormValue == $this->adelanto->CurrentValue && is_numeric(ew_StrToFloat($this->adelanto->CurrentValue))) {
         $this->adelanto->CurrentValue = ew_StrToFloat($this->adelanto->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->total->FormValue == $this->total->CurrentValue && is_numeric(ew_StrToFloat($this->total->CurrentValue))) {
         $this->total->CurrentValue = ew_StrToFloat($this->total->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // responsable
     // Patente
     // kg_carga
     // tarifa
     // sub_total
     // porcentaje
     // comision_chofer
     // adelanto
     // total
     // Accumulate aggregate value
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT && $this->RowType != EW_ROWTYPE_AGGREGATE) {
         if (is_numeric($this->sub_total->CurrentValue)) {
             $this->sub_total->Total += $this->sub_total->CurrentValue;
         }
         // Accumulate total
         if (is_numeric($this->comision_chofer->CurrentValue)) {
             $this->comision_chofer->Total += $this->comision_chofer->CurrentValue;
         }
         // Accumulate total
         if (is_numeric($this->total->CurrentValue)) {
             $this->total->Total += $this->total->CurrentValue;
         }
         // Accumulate total
     }
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // responsable
         $this->responsable->ViewValue = $this->responsable->CurrentValue;
         $this->responsable->ViewCustomAttributes = "";
         // Patente
         $this->Patente->ViewValue = $this->Patente->CurrentValue;
         $this->Patente->ViewCustomAttributes = "";
         // kg_carga
         $this->kg_carga->ViewValue = $this->kg_carga->CurrentValue;
         $this->kg_carga->ViewValue = ew_FormatNumber($this->kg_carga->ViewValue, 2, -2, -2, -2);
         $this->kg_carga->ViewCustomAttributes = "";
         // tarifa
         $this->tarifa->ViewValue = $this->tarifa->CurrentValue;
         $this->tarifa->ViewValue = ew_FormatCurrency($this->tarifa->ViewValue, 2, -2, -2, -2);
         $this->tarifa->ViewCustomAttributes = "";
         // sub_total
         $this->sub_total->ViewValue = $this->sub_total->CurrentValue;
         $this->sub_total->ViewValue = ew_FormatCurrency($this->sub_total->ViewValue, 2, -2, -2, -2);
         $this->sub_total->ViewCustomAttributes = "";
         // porcentaje
         $this->porcentaje->ViewValue = $this->porcentaje->CurrentValue;
         $this->porcentaje->ViewValue = ew_FormatPercent($this->porcentaje->ViewValue, 2, -2, -2, -2);
         $this->porcentaje->ViewCustomAttributes = "";
         // comision_chofer
         $this->comision_chofer->ViewValue = $this->comision_chofer->CurrentValue;
         $this->comision_chofer->ViewValue = ew_FormatCurrency($this->comision_chofer->ViewValue, 2, -2, -1, -2);
         $this->comision_chofer->ViewCustomAttributes = "";
         // adelanto
         $this->adelanto->ViewValue = $this->adelanto->CurrentValue;
         $this->adelanto->ViewValue = ew_FormatCurrency($this->adelanto->ViewValue, 2, -2, -2, -2);
         $this->adelanto->ViewCustomAttributes = "";
         // total
         $this->total->ViewValue = $this->total->CurrentValue;
         $this->total->ViewValue = ew_FormatCurrency($this->total->ViewValue, 2, -2, -2, -2);
         $this->total->ViewCustomAttributes = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // responsable
         $this->responsable->LinkCustomAttributes = "";
         $this->responsable->HrefValue = "";
         $this->responsable->TooltipValue = "";
         // Patente
         $this->Patente->LinkCustomAttributes = "";
         $this->Patente->HrefValue = "";
         $this->Patente->TooltipValue = "";
         // kg_carga
         $this->kg_carga->LinkCustomAttributes = "";
         $this->kg_carga->HrefValue = "";
         $this->kg_carga->TooltipValue = "";
         // tarifa
         $this->tarifa->LinkCustomAttributes = "";
         $this->tarifa->HrefValue = "";
         $this->tarifa->TooltipValue = "";
         // sub_total
         $this->sub_total->LinkCustomAttributes = "";
         $this->sub_total->HrefValue = "";
         $this->sub_total->TooltipValue = "";
         // porcentaje
         $this->porcentaje->LinkCustomAttributes = "";
         $this->porcentaje->HrefValue = "";
         $this->porcentaje->TooltipValue = "";
         // comision_chofer
         $this->comision_chofer->LinkCustomAttributes = "";
         $this->comision_chofer->HrefValue = "";
         $this->comision_chofer->TooltipValue = "";
         // adelanto
         $this->adelanto->LinkCustomAttributes = "";
         $this->adelanto->HrefValue = "";
         $this->adelanto->TooltipValue = "";
         // total
         $this->total->LinkCustomAttributes = "";
         $this->total->HrefValue = "";
         $this->total->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_SEARCH) {
         // Search row
         // codigo
         $this->codigo->EditAttrs["class"] = "form-control";
         $this->codigo->EditCustomAttributes = "";
         $this->codigo->EditValue = ew_HtmlEncode($this->codigo->AdvancedSearch->SearchValue);
         $this->codigo->PlaceHolder = ew_RemoveHtml($this->codigo->FldCaption());
         // responsable
         $this->responsable->EditAttrs["class"] = "form-control";
         $this->responsable->EditCustomAttributes = "";
         $this->responsable->EditValue = ew_HtmlEncode($this->responsable->AdvancedSearch->SearchValue);
         $this->responsable->PlaceHolder = ew_RemoveHtml($this->responsable->FldCaption());
         // Patente
         $this->Patente->EditAttrs["class"] = "form-control";
         $this->Patente->EditCustomAttributes = "";
         $this->Patente->EditValue = ew_HtmlEncode($this->Patente->AdvancedSearch->SearchValue);
         $this->Patente->PlaceHolder = ew_RemoveHtml($this->Patente->FldCaption());
         // kg_carga
         $this->kg_carga->EditAttrs["class"] = "form-control";
         $this->kg_carga->EditCustomAttributes = "";
         $this->kg_carga->EditValue = ew_HtmlEncode($this->kg_carga->AdvancedSearch->SearchValue);
         $this->kg_carga->PlaceHolder = ew_RemoveHtml($this->kg_carga->FldCaption());
         // tarifa
         $this->tarifa->EditAttrs["class"] = "form-control";
         $this->tarifa->EditCustomAttributes = "";
         $this->tarifa->EditValue = ew_HtmlEncode($this->tarifa->AdvancedSearch->SearchValue);
         $this->tarifa->PlaceHolder = ew_RemoveHtml($this->tarifa->FldCaption());
         // sub_total
         $this->sub_total->EditAttrs["class"] = "form-control";
         $this->sub_total->EditCustomAttributes = "";
         $this->sub_total->EditValue = ew_HtmlEncode($this->sub_total->AdvancedSearch->SearchValue);
         $this->sub_total->PlaceHolder = ew_RemoveHtml($this->sub_total->FldCaption());
         // porcentaje
         $this->porcentaje->EditAttrs["class"] = "form-control";
         $this->porcentaje->EditCustomAttributes = "";
         $this->porcentaje->EditValue = ew_HtmlEncode($this->porcentaje->AdvancedSearch->SearchValue);
         $this->porcentaje->PlaceHolder = ew_RemoveHtml($this->porcentaje->FldCaption());
         // comision_chofer
         $this->comision_chofer->EditAttrs["class"] = "form-control";
         $this->comision_chofer->EditCustomAttributes = "";
         $this->comision_chofer->EditValue = ew_HtmlEncode($this->comision_chofer->AdvancedSearch->SearchValue);
         $this->comision_chofer->PlaceHolder = ew_RemoveHtml($this->comision_chofer->FldCaption());
         // adelanto
         $this->adelanto->EditAttrs["class"] = "form-control";
         $this->adelanto->EditCustomAttributes = "";
         $this->adelanto->EditValue = ew_HtmlEncode($this->adelanto->AdvancedSearch->SearchValue);
         $this->adelanto->PlaceHolder = ew_RemoveHtml($this->adelanto->FldCaption());
         // total
         $this->total->EditAttrs["class"] = "form-control";
         $this->total->EditCustomAttributes = "";
         $this->total->EditValue = ew_HtmlEncode($this->total->AdvancedSearch->SearchValue);
         $this->total->PlaceHolder = ew_RemoveHtml($this->total->FldCaption());
     } elseif ($this->RowType == EW_ROWTYPE_AGGREGATEINIT) {
         // Initialize aggregate row
         $this->sub_total->Total = 0;
         // Initialize total
         $this->comision_chofer->Total = 0;
         // Initialize total
         $this->total->Total = 0;
         // Initialize total
     } elseif ($this->RowType == EW_ROWTYPE_AGGREGATE) {
         // Aggregate row
         $this->sub_total->CurrentValue = $this->sub_total->Total;
         $this->sub_total->ViewValue = $this->sub_total->CurrentValue;
         $this->sub_total->ViewValue = ew_FormatCurrency($this->sub_total->ViewValue, 2, -2, -2, -2);
         $this->sub_total->ViewCustomAttributes = "";
         $this->sub_total->HrefValue = "";
         // Clear href value
         $this->comision_chofer->CurrentValue = $this->comision_chofer->Total;
         $this->comision_chofer->ViewValue = $this->comision_chofer->CurrentValue;
         $this->comision_chofer->ViewValue = ew_FormatCurrency($this->comision_chofer->ViewValue, 2, -2, -1, -2);
         $this->comision_chofer->ViewCustomAttributes = "";
         $this->comision_chofer->HrefValue = "";
         // Clear href value
         $this->total->CurrentValue = $this->total->Total;
         $this->total->ViewValue = $this->total->CurrentValue;
         $this->total->ViewValue = ew_FormatCurrency($this->total->ViewValue, 2, -2, -2, -2);
         $this->total->ViewCustomAttributes = "";
         $this->total->HrefValue = "";
         // Clear href value
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 20
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // usuario
     // contrasenia
     // nombre
     // email
     // cel
     // activo
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // usuario
         $this->usuario->ViewValue = $this->usuario->CurrentValue;
         $this->usuario->ViewCustomAttributes = "";
         // contrasenia
         $this->contrasenia->ViewValue = "********";
         $this->contrasenia->ViewCustomAttributes = "";
         // nombre
         $this->nombre->ViewValue = $this->nombre->CurrentValue;
         $this->nombre->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewValue = strtolower($this->_email->ViewValue);
         $this->_email->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewValue = ew_FormatNumber($this->cel->ViewValue, 0, -2, -2, -2);
         $this->cel->ViewCustomAttributes = "";
         // activo
         if (strval($this->activo->CurrentValue) != "") {
             switch ($this->activo->CurrentValue) {
                 case $this->activo->FldTagValue(1):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->CurrentValue;
                     break;
                 case $this->activo->FldTagValue(2):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->CurrentValue;
                     break;
                 default:
                     $this->activo->ViewValue = $this->activo->CurrentValue;
             }
         } else {
             $this->activo->ViewValue = NULL;
         }
         $this->activo->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // usuario
         $this->usuario->LinkCustomAttributes = "";
         $this->usuario->HrefValue = "";
         $this->usuario->TooltipValue = "";
         // contrasenia
         $this->contrasenia->LinkCustomAttributes = "";
         $this->contrasenia->HrefValue = "";
         $this->contrasenia->TooltipValue = "";
         // nombre
         $this->nombre->LinkCustomAttributes = "";
         $this->nombre->HrefValue = "";
         $this->nombre->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // activo
         $this->activo->LinkCustomAttributes = "";
         $this->activo->HrefValue = "";
         $this->activo->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // id
         $this->id->EditCustomAttributes = "";
         $this->id->EditValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // usuario
         $this->usuario->EditCustomAttributes = "";
         $this->usuario->EditValue = ew_HtmlEncode($this->usuario->CurrentValue);
         $this->usuario->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->usuario->FldCaption()));
         // contrasenia
         $this->contrasenia->EditCustomAttributes = "";
         $this->contrasenia->EditValue = ew_HtmlEncode($this->contrasenia->CurrentValue);
         // nombre
         $this->nombre->EditCustomAttributes = "";
         $this->nombre->EditValue = ew_HtmlEncode($this->nombre->CurrentValue);
         $this->nombre->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->nombre->FldCaption()));
         // email
         $this->_email->EditCustomAttributes = "";
         $this->_email->EditValue = ew_HtmlEncode($this->_email->CurrentValue);
         $this->_email->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->_email->FldCaption()));
         // cel
         $this->cel->EditCustomAttributes = "";
         $this->cel->EditValue = ew_HtmlEncode($this->cel->CurrentValue);
         $this->cel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cel->FldCaption()));
         // activo
         $this->activo->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->activo->FldTagValue(1), $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->FldTagValue(1));
         $arwrk[] = array($this->activo->FldTagValue(2), $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->FldTagValue(2));
         $this->activo->EditValue = $arwrk;
         // Edit refer script
         // id
         $this->id->HrefValue = "";
         // usuario
         $this->usuario->HrefValue = "";
         // contrasenia
         $this->contrasenia->HrefValue = "";
         // nombre
         $this->nombre->HrefValue = "";
         // email
         $this->_email->HrefValue = "";
         // cel
         $this->cel->HrefValue = "";
         // activo
         $this->activo->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 21
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // nombre
     // direccion
     // fecha_nacimiento
     // tel
     // cel
     // email
     // fecha_inicio
     // cetegoria
     // datos
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // nombre
         $this->nombre->ViewValue = $this->nombre->CurrentValue;
         $this->nombre->ViewCustomAttributes = "";
         // direccion
         $this->direccion->ViewValue = $this->direccion->CurrentValue;
         $this->direccion->ViewCustomAttributes = "";
         // fecha_nacimiento
         $this->fecha_nacimiento->ViewValue = $this->fecha_nacimiento->CurrentValue;
         $this->fecha_nacimiento->ViewValue = ew_FormatDateTime($this->fecha_nacimiento->ViewValue, 7);
         $this->fecha_nacimiento->ViewCustomAttributes = "";
         // tel
         $this->tel->ViewValue = $this->tel->CurrentValue;
         $this->tel->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewValue = strtolower($this->_email->ViewValue);
         $this->_email->ViewCustomAttributes = "";
         // fecha_inicio
         $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
         $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 7);
         $this->fecha_inicio->ViewCustomAttributes = "";
         // cetegoria
         $this->cetegoria->ViewValue = $this->cetegoria->CurrentValue;
         $this->cetegoria->ViewValue = ew_FormatNumber($this->cetegoria->ViewValue, 0, -2, -2, -2);
         $this->cetegoria->ViewCustomAttributes = "";
         // datos
         $this->datos->ViewValue = $this->datos->CurrentValue;
         $this->datos->ViewCustomAttributes = "";
         // nombre
         $this->nombre->LinkCustomAttributes = "";
         $this->nombre->HrefValue = "";
         $this->nombre->TooltipValue = "";
         // direccion
         $this->direccion->LinkCustomAttributes = "";
         $this->direccion->HrefValue = "";
         $this->direccion->TooltipValue = "";
         // fecha_nacimiento
         $this->fecha_nacimiento->LinkCustomAttributes = "";
         $this->fecha_nacimiento->HrefValue = "";
         $this->fecha_nacimiento->TooltipValue = "";
         // tel
         $this->tel->LinkCustomAttributes = "";
         $this->tel->HrefValue = "";
         $this->tel->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // fecha_inicio
         $this->fecha_inicio->LinkCustomAttributes = "";
         $this->fecha_inicio->HrefValue = "";
         $this->fecha_inicio->TooltipValue = "";
         // cetegoria
         $this->cetegoria->LinkCustomAttributes = "";
         $this->cetegoria->HrefValue = "";
         $this->cetegoria->TooltipValue = "";
         // datos
         $this->datos->LinkCustomAttributes = "";
         $this->datos->HrefValue = "";
         $this->datos->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // nombre
         $this->nombre->EditAttrs["class"] = "form-control";
         $this->nombre->EditCustomAttributes = "";
         $this->nombre->EditValue = ew_HtmlEncode($this->nombre->CurrentValue);
         $this->nombre->PlaceHolder = ew_RemoveHtml($this->nombre->FldCaption());
         // direccion
         $this->direccion->EditAttrs["class"] = "form-control";
         $this->direccion->EditCustomAttributes = "";
         $this->direccion->EditValue = ew_HtmlEncode($this->direccion->CurrentValue);
         $this->direccion->PlaceHolder = ew_RemoveHtml($this->direccion->FldCaption());
         // fecha_nacimiento
         $this->fecha_nacimiento->EditAttrs["class"] = "form-control";
         $this->fecha_nacimiento->EditCustomAttributes = "";
         $this->fecha_nacimiento->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_nacimiento->CurrentValue, 7));
         $this->fecha_nacimiento->PlaceHolder = ew_RemoveHtml($this->fecha_nacimiento->FldCaption());
         // tel
         $this->tel->EditAttrs["class"] = "form-control";
         $this->tel->EditCustomAttributes = "";
         $this->tel->EditValue = ew_HtmlEncode($this->tel->CurrentValue);
         $this->tel->PlaceHolder = ew_RemoveHtml($this->tel->FldCaption());
         // cel
         $this->cel->EditAttrs["class"] = "form-control";
         $this->cel->EditCustomAttributes = "";
         $this->cel->EditValue = ew_HtmlEncode($this->cel->CurrentValue);
         $this->cel->PlaceHolder = ew_RemoveHtml($this->cel->FldCaption());
         // email
         $this->_email->EditAttrs["class"] = "form-control";
         $this->_email->EditCustomAttributes = "";
         $this->_email->EditValue = ew_HtmlEncode($this->_email->CurrentValue);
         $this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldCaption());
         // fecha_inicio
         $this->fecha_inicio->EditAttrs["class"] = "form-control";
         $this->fecha_inicio->EditCustomAttributes = "";
         $this->fecha_inicio->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_inicio->CurrentValue, 7));
         $this->fecha_inicio->PlaceHolder = ew_RemoveHtml($this->fecha_inicio->FldCaption());
         // cetegoria
         $this->cetegoria->EditAttrs["class"] = "form-control";
         $this->cetegoria->EditCustomAttributes = "";
         $this->cetegoria->EditValue = ew_HtmlEncode($this->cetegoria->CurrentValue);
         $this->cetegoria->PlaceHolder = ew_RemoveHtml($this->cetegoria->FldCaption());
         // datos
         $this->datos->EditAttrs["class"] = "form-control";
         $this->datos->EditCustomAttributes = "";
         $this->datos->EditValue = ew_HtmlEncode($this->datos->CurrentValue);
         $this->datos->PlaceHolder = ew_RemoveHtml($this->datos->FldCaption());
         // Edit refer script
         // nombre
         $this->nombre->HrefValue = "";
         // direccion
         $this->direccion->HrefValue = "";
         // fecha_nacimiento
         $this->fecha_nacimiento->HrefValue = "";
         // tel
         $this->tel->HrefValue = "";
         // cel
         $this->cel->HrefValue = "";
         // email
         $this->_email->HrefValue = "";
         // fecha_inicio
         $this->fecha_inicio->HrefValue = "";
         // cetegoria
         $this->cetegoria->HrefValue = "";
         // datos
         $this->datos->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 22
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->adelanto->FormValue == $this->adelanto->CurrentValue && is_numeric(ew_StrToFloat($this->adelanto->CurrentValue))) {
         $this->adelanto->CurrentValue = ew_StrToFloat($this->adelanto->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->tarifa->FormValue == $this->tarifa->CurrentValue && is_numeric(ew_StrToFloat($this->tarifa->CurrentValue))) {
         $this->tarifa->CurrentValue = ew_StrToFloat($this->tarifa->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->porcentaje->FormValue == $this->porcentaje->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje->CurrentValue))) {
         $this->porcentaje->CurrentValue = ew_StrToFloat($this->porcentaje->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // fecha_ini
     // id_cliente
     // id_localidad_origen
     // Origen
     // id_localidad_destino
     // Destino
     // Km_ini
     // estado
     // id_vehiculo
     // id_tipo_carga
     // km_fin
     // fecha_fin
     // adelanto
     // kg_carga
     // tarifa
     // porcentaje
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // fecha_ini
         $this->fecha_ini->ViewValue = $this->fecha_ini->CurrentValue;
         $this->fecha_ini->ViewValue = ew_FormatDateTime($this->fecha_ini->ViewValue, 7);
         $this->fecha_ini->ViewCustomAttributes = "";
         // id_cliente
         if (strval($this->id_cliente->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_cliente->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `codigo`, `cuit_cuil` AS `DispFld`, `razon_social` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `clientes`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_cliente, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `razon_social` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_cliente->ViewValue = $rswrk->fields('DispFld');
                 $this->id_cliente->ViewValue .= ew_ValueSeparator(1, $this->id_cliente) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_cliente->ViewValue = $this->id_cliente->CurrentValue;
             }
         } else {
             $this->id_cliente->ViewValue = NULL;
         }
         $this->id_cliente->ViewCustomAttributes = "";
         // id_localidad_origen
         if ($this->id_localidad_origen->VirtualValue != "") {
             $this->id_localidad_origen->ViewValue = $this->id_localidad_origen->VirtualValue;
         } else {
             if (strval($this->id_localidad_origen->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_origen->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `v_localidad_provincia`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_localidad_origen, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `localidad` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_localidad_origen->ViewValue = $rswrk->fields('DispFld');
                     $this->id_localidad_origen->ViewValue .= ew_ValueSeparator(1, $this->id_localidad_origen) . $rswrk->fields('Disp2Fld');
                     $this->id_localidad_origen->ViewValue .= ew_ValueSeparator(2, $this->id_localidad_origen) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_localidad_origen->ViewValue = $this->id_localidad_origen->CurrentValue;
                 }
             } else {
                 $this->id_localidad_origen->ViewValue = NULL;
             }
         }
         $this->id_localidad_origen->ViewCustomAttributes = "";
         // Origen
         $this->Origen->ViewValue = $this->Origen->CurrentValue;
         $this->Origen->ViewCustomAttributes = "";
         // id_localidad_destino
         if ($this->id_localidad_destino->VirtualValue != "") {
             $this->id_localidad_destino->ViewValue = $this->id_localidad_destino->VirtualValue;
         } else {
             if (strval($this->id_localidad_destino->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_destino->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `v_localidad_provincia`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_localidad_destino, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `localidad` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_localidad_destino->ViewValue = $rswrk->fields('DispFld');
                     $this->id_localidad_destino->ViewValue .= ew_ValueSeparator(1, $this->id_localidad_destino) . $rswrk->fields('Disp2Fld');
                     $this->id_localidad_destino->ViewValue .= ew_ValueSeparator(2, $this->id_localidad_destino) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_localidad_destino->ViewValue = $this->id_localidad_destino->CurrentValue;
                 }
             } else {
                 $this->id_localidad_destino->ViewValue = NULL;
             }
         }
         $this->id_localidad_destino->ViewCustomAttributes = "";
         // Destino
         $this->Destino->ViewValue = $this->Destino->CurrentValue;
         $this->Destino->ViewCustomAttributes = "";
         // Km_ini
         $this->Km_ini->ViewValue = $this->Km_ini->CurrentValue;
         $this->Km_ini->ViewValue = ew_FormatNumber($this->Km_ini->ViewValue, 0, -2, -2, -2);
         $this->Km_ini->ViewCustomAttributes = "";
         // estado
         $this->estado->ViewValue = $this->estado->CurrentValue;
         $this->estado->ViewCustomAttributes = "";
         // id_vehiculo
         if ($this->id_vehiculo->VirtualValue != "") {
             $this->id_vehiculo->ViewValue = $this->id_vehiculo->VirtualValue;
         } else {
             if (strval($this->id_vehiculo->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_vehiculo->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `Patente` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vehiculos`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_vehiculo, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `nombre` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_vehiculo->ViewValue = $rswrk->fields('DispFld');
                     $this->id_vehiculo->ViewValue .= ew_ValueSeparator(1, $this->id_vehiculo) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_vehiculo->ViewValue = $this->id_vehiculo->CurrentValue;
                 }
             } else {
                 $this->id_vehiculo->ViewValue = NULL;
             }
         }
         $this->id_vehiculo->ViewCustomAttributes = "";
         // id_tipo_carga
         if ($this->id_tipo_carga->VirtualValue != "") {
             $this->id_tipo_carga->ViewValue = $this->id_tipo_carga->VirtualValue;
         } else {
             if (strval($this->id_tipo_carga->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_carga->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `Tipo_carga` AS `DispFld`, `precio_base` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_cargas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_carga, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `Tipo_carga` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_carga->ViewValue = $rswrk->fields('DispFld');
                     $this->id_tipo_carga->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_carga) . ew_FormatCurrency($rswrk->fields('Disp2Fld'), 2, 0, 0, -1);
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_carga->ViewValue = $this->id_tipo_carga->CurrentValue;
                 }
             } else {
                 $this->id_tipo_carga->ViewValue = NULL;
             }
         }
         $this->id_tipo_carga->ViewCustomAttributes = "";
         // km_fin
         $this->km_fin->ViewValue = $this->km_fin->CurrentValue;
         $this->km_fin->ViewValue = ew_FormatNumber($this->km_fin->ViewValue, 0, -2, -2, -2);
         $this->km_fin->ViewCustomAttributes = "";
         // fecha_fin
         $this->fecha_fin->ViewValue = $this->fecha_fin->CurrentValue;
         $this->fecha_fin->ViewValue = ew_FormatDateTime($this->fecha_fin->ViewValue, 7);
         $this->fecha_fin->ViewCustomAttributes = "";
         // adelanto
         $this->adelanto->ViewValue = $this->adelanto->CurrentValue;
         $this->adelanto->ViewValue = ew_FormatCurrency($this->adelanto->ViewValue, 2, -2, -2, -2);
         $this->adelanto->ViewCustomAttributes = "";
         // kg_carga
         $this->kg_carga->ViewValue = $this->kg_carga->CurrentValue;
         $this->kg_carga->ViewValue = ew_FormatNumber($this->kg_carga->ViewValue, 0, -2, -2, -2);
         $this->kg_carga->ViewCustomAttributes = "";
         // tarifa
         $this->tarifa->ViewValue = $this->tarifa->CurrentValue;
         $this->tarifa->ViewValue = ew_FormatCurrency($this->tarifa->ViewValue, 2, -2, -2, -2);
         $this->tarifa->ViewCustomAttributes = "";
         // porcentaje
         $this->porcentaje->ViewValue = $this->porcentaje->CurrentValue;
         $this->porcentaje->ViewCustomAttributes = "";
         // fecha_ini
         $this->fecha_ini->LinkCustomAttributes = "";
         $this->fecha_ini->HrefValue = "";
         $this->fecha_ini->TooltipValue = "";
         // id_cliente
         $this->id_cliente->LinkCustomAttributes = "";
         $this->id_cliente->HrefValue = "";
         $this->id_cliente->TooltipValue = "";
         // id_localidad_origen
         $this->id_localidad_origen->LinkCustomAttributes = "";
         $this->id_localidad_origen->HrefValue = "";
         $this->id_localidad_origen->TooltipValue = "";
         // Origen
         $this->Origen->LinkCustomAttributes = "";
         $this->Origen->HrefValue = "";
         $this->Origen->TooltipValue = "";
         // id_localidad_destino
         $this->id_localidad_destino->LinkCustomAttributes = "";
         $this->id_localidad_destino->HrefValue = "";
         $this->id_localidad_destino->TooltipValue = "";
         // Destino
         $this->Destino->LinkCustomAttributes = "";
         $this->Destino->HrefValue = "";
         $this->Destino->TooltipValue = "";
         // Km_ini
         $this->Km_ini->LinkCustomAttributes = "";
         $this->Km_ini->HrefValue = "";
         $this->Km_ini->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
         // id_vehiculo
         $this->id_vehiculo->LinkCustomAttributes = "";
         $this->id_vehiculo->HrefValue = "";
         $this->id_vehiculo->TooltipValue = "";
         // id_tipo_carga
         $this->id_tipo_carga->LinkCustomAttributes = "";
         $this->id_tipo_carga->HrefValue = "";
         $this->id_tipo_carga->TooltipValue = "";
         // km_fin
         $this->km_fin->LinkCustomAttributes = "";
         $this->km_fin->HrefValue = "";
         $this->km_fin->TooltipValue = "";
         // fecha_fin
         $this->fecha_fin->LinkCustomAttributes = "";
         $this->fecha_fin->HrefValue = "";
         $this->fecha_fin->TooltipValue = "";
         // adelanto
         $this->adelanto->LinkCustomAttributes = "";
         $this->adelanto->HrefValue = "";
         $this->adelanto->TooltipValue = "";
         // kg_carga
         $this->kg_carga->LinkCustomAttributes = "";
         $this->kg_carga->HrefValue = "";
         $this->kg_carga->TooltipValue = "";
         // tarifa
         $this->tarifa->LinkCustomAttributes = "";
         $this->tarifa->HrefValue = "";
         $this->tarifa->TooltipValue = "";
         // porcentaje
         $this->porcentaje->LinkCustomAttributes = "";
         $this->porcentaje->HrefValue = "";
         $this->porcentaje->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // fecha_ini
         $this->fecha_ini->EditAttrs["class"] = "form-control";
         $this->fecha_ini->EditCustomAttributes = "";
         $this->fecha_ini->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_ini->CurrentValue, 7));
         $this->fecha_ini->PlaceHolder = ew_RemoveHtml($this->fecha_ini->FldCaption());
         // id_cliente
         $this->id_cliente->EditAttrs["class"] = "form-control";
         $this->id_cliente->EditCustomAttributes = "";
         if (trim(strval($this->id_cliente->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_cliente->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cuit_cuil` AS `DispFld`, `razon_social` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `clientes`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_cliente, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `razon_social` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_cliente->EditValue = $arwrk;
         // id_localidad_origen
         $this->id_localidad_origen->EditAttrs["class"] = "form-control";
         $this->id_localidad_origen->EditCustomAttributes = "";
         if (trim(strval($this->id_localidad_origen->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_origen->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `v_localidad_provincia`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_localidad_origen, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `localidad` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_localidad_origen->EditValue = $arwrk;
         // Origen
         $this->Origen->EditAttrs["class"] = "form-control";
         $this->Origen->EditCustomAttributes = "";
         $this->Origen->EditValue = ew_HtmlEncode($this->Origen->CurrentValue);
         $this->Origen->PlaceHolder = ew_RemoveHtml($this->Origen->FldCaption());
         // id_localidad_destino
         $this->id_localidad_destino->EditAttrs["class"] = "form-control";
         $this->id_localidad_destino->EditCustomAttributes = "";
         if (trim(strval($this->id_localidad_destino->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_destino->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `v_localidad_provincia`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_localidad_destino, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `localidad` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_localidad_destino->EditValue = $arwrk;
         // Destino
         $this->Destino->EditAttrs["class"] = "form-control";
         $this->Destino->EditCustomAttributes = "";
         $this->Destino->EditValue = ew_HtmlEncode($this->Destino->CurrentValue);
         $this->Destino->PlaceHolder = ew_RemoveHtml($this->Destino->FldCaption());
         // Km_ini
         $this->Km_ini->EditAttrs["class"] = "form-control";
         $this->Km_ini->EditCustomAttributes = "";
         $this->Km_ini->EditValue = ew_HtmlEncode($this->Km_ini->CurrentValue);
         $this->Km_ini->PlaceHolder = ew_RemoveHtml($this->Km_ini->FldCaption());
         // estado
         $this->estado->EditAttrs["class"] = "form-control";
         $this->estado->EditCustomAttributes = "";
         $this->estado->EditValue = ew_HtmlEncode($this->estado->CurrentValue);
         $this->estado->PlaceHolder = ew_RemoveHtml($this->estado->FldCaption());
         // id_vehiculo
         $this->id_vehiculo->EditAttrs["class"] = "form-control";
         $this->id_vehiculo->EditCustomAttributes = "";
         if (trim(strval($this->id_vehiculo->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_vehiculo->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `Patente` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `vehiculos`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_vehiculo, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `nombre` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_vehiculo->EditValue = $arwrk;
         // id_tipo_carga
         $this->id_tipo_carga->EditAttrs["class"] = "form-control";
         $this->id_tipo_carga->EditCustomAttributes = "";
         if (trim(strval($this->id_tipo_carga->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_carga->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `Tipo_carga` AS `DispFld`, `precio_base` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_cargas`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tipo_carga, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `Tipo_carga` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         $rowswrk = count($arwrk);
         for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
             $arwrk[$rowcntwrk][2] = ew_FormatCurrency($arwrk[$rowcntwrk][2], 2, 0, 0, -1);
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_tipo_carga->EditValue = $arwrk;
         // km_fin
         $this->km_fin->EditAttrs["class"] = "form-control";
         $this->km_fin->EditCustomAttributes = "";
         $this->km_fin->EditValue = ew_HtmlEncode($this->km_fin->CurrentValue);
         $this->km_fin->PlaceHolder = ew_RemoveHtml($this->km_fin->FldCaption());
         // fecha_fin
         $this->fecha_fin->EditAttrs["class"] = "form-control";
         $this->fecha_fin->EditCustomAttributes = "";
         $this->fecha_fin->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_fin->CurrentValue, 7));
         $this->fecha_fin->PlaceHolder = ew_RemoveHtml($this->fecha_fin->FldCaption());
         // adelanto
         $this->adelanto->EditAttrs["class"] = "form-control";
         $this->adelanto->EditCustomAttributes = "";
         $this->adelanto->EditValue = ew_HtmlEncode($this->adelanto->CurrentValue);
         $this->adelanto->PlaceHolder = ew_RemoveHtml($this->adelanto->FldCaption());
         if (strval($this->adelanto->EditValue) != "" && is_numeric($this->adelanto->EditValue)) {
             $this->adelanto->EditValue = ew_FormatNumber($this->adelanto->EditValue, -2, -2, -2, -2);
         }
         // kg_carga
         $this->kg_carga->EditAttrs["class"] = "form-control";
         $this->kg_carga->EditCustomAttributes = "";
         $this->kg_carga->EditValue = ew_HtmlEncode($this->kg_carga->CurrentValue);
         $this->kg_carga->PlaceHolder = ew_RemoveHtml($this->kg_carga->FldCaption());
         // tarifa
         $this->tarifa->EditAttrs["class"] = "form-control";
         $this->tarifa->EditCustomAttributes = "";
         $this->tarifa->EditValue = ew_HtmlEncode($this->tarifa->CurrentValue);
         $this->tarifa->PlaceHolder = ew_RemoveHtml($this->tarifa->FldCaption());
         if (strval($this->tarifa->EditValue) != "" && is_numeric($this->tarifa->EditValue)) {
             $this->tarifa->EditValue = ew_FormatNumber($this->tarifa->EditValue, -2, -2, -2, -2);
         }
         // porcentaje
         $this->porcentaje->EditAttrs["class"] = "form-control";
         $this->porcentaje->EditCustomAttributes = "";
         $this->porcentaje->EditValue = ew_HtmlEncode($this->porcentaje->CurrentValue);
         $this->porcentaje->PlaceHolder = ew_RemoveHtml($this->porcentaje->FldCaption());
         if (strval($this->porcentaje->EditValue) != "" && is_numeric($this->porcentaje->EditValue)) {
             $this->porcentaje->EditValue = ew_FormatNumber($this->porcentaje->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // fecha_ini
         $this->fecha_ini->HrefValue = "";
         // id_cliente
         $this->id_cliente->HrefValue = "";
         // id_localidad_origen
         $this->id_localidad_origen->HrefValue = "";
         // Origen
         $this->Origen->HrefValue = "";
         // id_localidad_destino
         $this->id_localidad_destino->HrefValue = "";
         // Destino
         $this->Destino->HrefValue = "";
         // Km_ini
         $this->Km_ini->HrefValue = "";
         // estado
         $this->estado->HrefValue = "";
         // id_vehiculo
         $this->id_vehiculo->HrefValue = "";
         // id_tipo_carga
         $this->id_tipo_carga->HrefValue = "";
         // km_fin
         $this->km_fin->HrefValue = "";
         // fecha_fin
         $this->fecha_fin->HrefValue = "";
         // adelanto
         $this->adelanto->HrefValue = "";
         // kg_carga
         $this->kg_carga->HrefValue = "";
         // tarifa
         $this->tarifa->HrefValue = "";
         // porcentaje
         $this->porcentaje->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 23
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->monto->FormValue == $this->monto->CurrentValue && is_numeric(ew_StrToFloat($this->monto->CurrentValue))) {
         $this->monto->CurrentValue = ew_StrToFloat($this->monto->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // mes
     // anio
     // fecha
     // monto
     // id_usuario
     // id_socio
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewCustomAttributes = "";
         // mes
         $this->mes->ViewValue = $this->mes->CurrentValue;
         $this->mes->ViewCustomAttributes = "";
         // anio
         $this->anio->ViewValue = $this->anio->CurrentValue;
         $this->anio->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // monto
         $this->monto->ViewValue = $this->monto->CurrentValue;
         $this->monto->ViewValue = ew_FormatCurrency($this->monto->ViewValue, 0, -2, -2, -2);
         $this->monto->ViewCustomAttributes = "";
         // id_socio
         if (strval($this->id_socio->CurrentValue) != "") {
             $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `propietario` DESC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_socio->ViewValue = $rswrk->fields('DispFld');
                 $this->id_socio->ViewValue .= ew_ValueSeparator(1, $this->id_socio) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_socio->ViewValue = $this->id_socio->CurrentValue;
             }
         } else {
             $this->id_socio->ViewValue = NULL;
         }
         $this->id_socio->ViewCustomAttributes = "";
         // mes
         $this->mes->LinkCustomAttributes = "";
         $this->mes->HrefValue = "";
         $this->mes->TooltipValue = "";
         // anio
         $this->anio->LinkCustomAttributes = "";
         $this->anio->HrefValue = "";
         $this->anio->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // monto
         $this->monto->LinkCustomAttributes = "";
         $this->monto->HrefValue = "";
         $this->monto->TooltipValue = "";
         // id_socio
         $this->id_socio->LinkCustomAttributes = "";
         $this->id_socio->HrefValue = "";
         $this->id_socio->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // mes
         $this->mes->EditAttrs["class"] = "form-control";
         $this->mes->EditCustomAttributes = "";
         $this->mes->EditValue = ew_HtmlEncode($this->mes->CurrentValue);
         $this->mes->PlaceHolder = ew_RemoveHtml($this->mes->FldCaption());
         // anio
         $this->anio->EditAttrs["class"] = "form-control";
         $this->anio->EditCustomAttributes = "";
         $this->anio->EditValue = ew_HtmlEncode($this->anio->CurrentValue);
         $this->anio->PlaceHolder = ew_RemoveHtml($this->anio->FldCaption());
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // monto
         $this->monto->EditAttrs["class"] = "form-control";
         $this->monto->EditCustomAttributes = "";
         $this->monto->EditValue = ew_HtmlEncode($this->monto->CurrentValue);
         $this->monto->PlaceHolder = ew_RemoveHtml($this->monto->FldCaption());
         if (strval($this->monto->EditValue) != "" && is_numeric($this->monto->EditValue)) {
             $this->monto->EditValue = ew_FormatNumber($this->monto->EditValue, -2, -2, -2, -2);
         }
         // id_socio
         $this->id_socio->EditAttrs["class"] = "form-control";
         $this->id_socio->EditCustomAttributes = "";
         if ($this->id_socio->getSessionValue() != "") {
             $this->id_socio->CurrentValue = $this->id_socio->getSessionValue();
             if (strval($this->id_socio->CurrentValue) != "") {
                 $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`activo`='S'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `propietario` DESC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_socio->ViewValue = $rswrk->fields('DispFld');
                     $this->id_socio->ViewValue .= ew_ValueSeparator(1, $this->id_socio) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_socio->ViewValue = $this->id_socio->CurrentValue;
                 }
             } else {
                 $this->id_socio->ViewValue = NULL;
             }
             $this->id_socio->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_socio->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `socios`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if (!$GLOBALS["deudas"]->UserIDAllow("add")) {
                 $sWhereWrk = $GLOBALS["socios"]->AddUserIDFilter($sWhereWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `propietario` DESC";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_socio->EditValue = $arwrk;
         }
         // Edit refer script
         // mes
         $this->mes->HrefValue = "";
         // anio
         $this->anio->HrefValue = "";
         // fecha
         $this->fecha->HrefValue = "";
         // monto
         $this->monto->HrefValue = "";
         // id_socio
         $this->id_socio->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 24
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->BOARDING_ID->FormValue == $this->BOARDING_ID->CurrentValue && is_numeric(ew_StrToFloat($this->BOARDING_ID->CurrentValue))) {
         $this->BOARDING_ID->CurrentValue = ew_StrToFloat($this->BOARDING_ID->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->WEIGHT->FormValue == $this->WEIGHT->CurrentValue && is_numeric(ew_StrToFloat($this->WEIGHT->CurrentValue))) {
         $this->WEIGHT->CurrentValue = ew_StrToFloat($this->WEIGHT->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // BAGGAGE_ID
     // BOARDING_ID
     // PASSANGER_ID
     // WEIGHT
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // BAGGAGE_ID
         $this->BAGGAGE_ID->ViewValue = $this->BAGGAGE_ID->CurrentValue;
         $this->BAGGAGE_ID->ViewCustomAttributes = "";
         // BOARDING_ID
         $this->BOARDING_ID->ViewValue = $this->BOARDING_ID->CurrentValue;
         $this->BOARDING_ID->ViewCustomAttributes = "";
         // PASSANGER_ID
         $this->PASSANGER_ID->ViewValue = $this->PASSANGER_ID->CurrentValue;
         $this->PASSANGER_ID->ViewCustomAttributes = "";
         // WEIGHT
         $this->WEIGHT->ViewValue = $this->WEIGHT->CurrentValue;
         $this->WEIGHT->ViewCustomAttributes = "";
         // BAGGAGE_ID
         $this->BAGGAGE_ID->LinkCustomAttributes = "";
         $this->BAGGAGE_ID->HrefValue = "";
         $this->BAGGAGE_ID->TooltipValue = "";
         // BOARDING_ID
         $this->BOARDING_ID->LinkCustomAttributes = "";
         $this->BOARDING_ID->HrefValue = "";
         $this->BOARDING_ID->TooltipValue = "";
         // PASSANGER_ID
         $this->PASSANGER_ID->LinkCustomAttributes = "";
         $this->PASSANGER_ID->HrefValue = "";
         $this->PASSANGER_ID->TooltipValue = "";
         // WEIGHT
         $this->WEIGHT->LinkCustomAttributes = "";
         $this->WEIGHT->HrefValue = "";
         $this->WEIGHT->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // BAGGAGE_ID
         $this->BAGGAGE_ID->EditAttrs["class"] = "form-control";
         $this->BAGGAGE_ID->EditCustomAttributes = "";
         $this->BAGGAGE_ID->EditValue = $this->BAGGAGE_ID->CurrentValue;
         $this->BAGGAGE_ID->ViewCustomAttributes = "";
         // BOARDING_ID
         $this->BOARDING_ID->EditAttrs["class"] = "form-control";
         $this->BOARDING_ID->EditCustomAttributes = "";
         $this->BOARDING_ID->EditValue = ew_HtmlEncode($this->BOARDING_ID->CurrentValue);
         $this->BOARDING_ID->PlaceHolder = ew_RemoveHtml($this->BOARDING_ID->FldCaption());
         if (strval($this->BOARDING_ID->EditValue) != "" && is_numeric($this->BOARDING_ID->EditValue)) {
             $this->BOARDING_ID->EditValue = ew_FormatNumber($this->BOARDING_ID->EditValue, -2, -1, -2, 0);
         }
         // PASSANGER_ID
         $this->PASSANGER_ID->EditAttrs["class"] = "form-control";
         $this->PASSANGER_ID->EditCustomAttributes = "";
         $this->PASSANGER_ID->EditValue = ew_HtmlEncode($this->PASSANGER_ID->CurrentValue);
         $this->PASSANGER_ID->PlaceHolder = ew_RemoveHtml($this->PASSANGER_ID->FldCaption());
         // WEIGHT
         $this->WEIGHT->EditAttrs["class"] = "form-control";
         $this->WEIGHT->EditCustomAttributes = "";
         $this->WEIGHT->EditValue = ew_HtmlEncode($this->WEIGHT->CurrentValue);
         $this->WEIGHT->PlaceHolder = ew_RemoveHtml($this->WEIGHT->FldCaption());
         if (strval($this->WEIGHT->EditValue) != "" && is_numeric($this->WEIGHT->EditValue)) {
             $this->WEIGHT->EditValue = ew_FormatNumber($this->WEIGHT->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // BAGGAGE_ID
         $this->BAGGAGE_ID->LinkCustomAttributes = "";
         $this->BAGGAGE_ID->HrefValue = "";
         // BOARDING_ID
         $this->BOARDING_ID->LinkCustomAttributes = "";
         $this->BOARDING_ID->HrefValue = "";
         // PASSANGER_ID
         $this->PASSANGER_ID->LinkCustomAttributes = "";
         $this->PASSANGER_ID->HrefValue = "";
         // WEIGHT
         $this->WEIGHT->LinkCustomAttributes = "";
         $this->WEIGHT->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 25
0
</td>
	</tr>
	<tr><td colspan=2>&nbsp;<br></td></tr>
<?php 
    }
}
// Close recordset
$Report1_report->Recordset->Close();
if ($Report1_report->RecordExists) {
    ?>
	<tr><td colspan=2>&nbsp;<br></td></tr>
	<tr><td colspan=2 class="ewGrandSummary"><?php 
    echo $Language->Phrase("RptGrandTotal");
    ?>
&nbsp;(<?php 
    echo ew_FormatNumber($Report1_report->ReportCounts[0], 0);
    ?>
&nbsp;<?php 
    echo $Language->Phrase("RptDtlRec");
    ?>
)</td></tr>
<?php 
    $Report1->Count28messages_message29->CurrentValue = $Report1_report->ReportTotals[0][0];
    // Render row for view
    $Report1->RowType = EW_ROWTYPE_VIEW;
    $Report1->ResetAttrs();
    $Report1_report->RenderRow();
    ?>
	<tr>
		<td class="ewGroupAggregate"><?php 
    echo $Language->Phrase("RptSum");
Ejemplo n.º 26
0
 function RenderListRow()
 {
     global $conn, $Security;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // socio_nro
     // id_actividad
     $this->id_actividad->CellCssStyle = "white-space: nowrap;";
     // id_usuario
     // propietario
     // comercio
     // direccion_comercio
     // activo
     // mail
     // tel
     // cel
     // cuit_cuil
     // socio_nro
     $this->socio_nro->ViewValue = $this->socio_nro->CurrentValue;
     $this->socio_nro->ViewCustomAttributes = "";
     // id_actividad
     if (strval($this->id_actividad->CurrentValue) != "") {
         $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_actividad->CurrentValue, EW_DATATYPE_NUMBER);
         $sSqlWrk = "SELECT `id`, `actividad` AS `DispFld`, `descripcion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `actividad`";
         $sWhereWrk = "";
         $lookuptblfilter = "`activa`='S'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_actividad, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup values found
             $this->id_actividad->ViewValue = $rswrk->fields('DispFld');
             $this->id_actividad->ViewValue .= ew_ValueSeparator(1, $this->id_actividad) . $rswrk->fields('Disp2Fld');
             $rswrk->Close();
         } else {
             $this->id_actividad->ViewValue = $this->id_actividad->CurrentValue;
         }
     } else {
         $this->id_actividad->ViewValue = NULL;
     }
     $this->id_actividad->ViewCustomAttributes = "";
     // id_usuario
     $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
     $this->id_usuario->ViewCustomAttributes = "";
     // propietario
     $this->propietario->ViewValue = $this->propietario->CurrentValue;
     $this->propietario->ViewCustomAttributes = "";
     // comercio
     $this->comercio->ViewValue = $this->comercio->CurrentValue;
     $this->comercio->ViewCustomAttributes = "";
     // direccion_comercio
     $this->direccion_comercio->ViewValue = $this->direccion_comercio->CurrentValue;
     $this->direccion_comercio->ViewCustomAttributes = "";
     // activo
     if (strval($this->activo->CurrentValue) != "") {
         switch ($this->activo->CurrentValue) {
             case $this->activo->FldTagValue(1):
                 $this->activo->ViewValue = $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->CurrentValue;
                 break;
             case $this->activo->FldTagValue(2):
                 $this->activo->ViewValue = $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->CurrentValue;
                 break;
             default:
                 $this->activo->ViewValue = $this->activo->CurrentValue;
         }
     } else {
         $this->activo->ViewValue = NULL;
     }
     $this->activo->ViewCustomAttributes = "";
     // mail
     $this->mail->ViewValue = $this->mail->CurrentValue;
     $this->mail->ViewValue = strtolower($this->mail->ViewValue);
     $this->mail->ViewCustomAttributes = "";
     // tel
     $this->tel->ViewValue = $this->tel->CurrentValue;
     $this->tel->ViewValue = trim($this->tel->ViewValue);
     $this->tel->ViewCustomAttributes = "";
     // cel
     $this->cel->ViewValue = $this->cel->CurrentValue;
     $this->cel->ViewValue = trim($this->cel->ViewValue);
     $this->cel->ViewCustomAttributes = "";
     // cuit_cuil
     $this->cuit_cuil->ViewValue = $this->cuit_cuil->CurrentValue;
     $this->cuit_cuil->ViewValue = ew_FormatNumber($this->cuit_cuil->ViewValue, 0, -2, -2, -2);
     $this->cuit_cuil->ViewCustomAttributes = "";
     // socio_nro
     $this->socio_nro->LinkCustomAttributes = "";
     $this->socio_nro->HrefValue = "";
     $this->socio_nro->TooltipValue = "";
     // id_actividad
     $this->id_actividad->LinkCustomAttributes = "";
     $this->id_actividad->HrefValue = "";
     $this->id_actividad->TooltipValue = "";
     // id_usuario
     $this->id_usuario->LinkCustomAttributes = "";
     $this->id_usuario->HrefValue = "";
     $this->id_usuario->TooltipValue = "";
     // propietario
     $this->propietario->LinkCustomAttributes = "";
     $this->propietario->HrefValue = "";
     $this->propietario->TooltipValue = "";
     // comercio
     $this->comercio->LinkCustomAttributes = "";
     $this->comercio->HrefValue = "";
     $this->comercio->TooltipValue = "";
     // direccion_comercio
     $this->direccion_comercio->LinkCustomAttributes = "";
     $this->direccion_comercio->HrefValue = "";
     $this->direccion_comercio->TooltipValue = "";
     // activo
     $this->activo->LinkCustomAttributes = "";
     $this->activo->HrefValue = "";
     $this->activo->TooltipValue = "";
     // mail
     $this->mail->LinkCustomAttributes = "";
     $this->mail->HrefValue = "";
     $this->mail->TooltipValue = "";
     // tel
     $this->tel->LinkCustomAttributes = "";
     $this->tel->HrefValue = "";
     $this->tel->TooltipValue = "";
     // cel
     $this->cel->LinkCustomAttributes = "";
     $this->cel->HrefValue = "";
     $this->cel->TooltipValue = "";
     // cuit_cuil
     $this->cuit_cuil->LinkCustomAttributes = "";
     $this->cuit_cuil->HrefValue = "";
     $this->cuit_cuil->TooltipValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Ejemplo n.º 27
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->ACCOUNT_NUMBER->FormValue == $this->ACCOUNT_NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue))) {
         $this->ACCOUNT_NUMBER->CurrentValue = ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // BANK_ACCOUNT_ID
     // CODE
     // DESCRIPTION
     // ACCOUNT_NUMBER
     // BANK_ID
     // ACTIVE
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->ViewValue = $this->ACCOUNT_NUMBER->CurrentValue;
         $this->ACCOUNT_NUMBER->ViewCustomAttributes = "";
         // BANK_ID
         if (strval($this->BANK_ID->CurrentValue) != "") {
             $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
             switch (@$gsLanguage) {
                 case "es":
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
                 default:
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
             }
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue;
             }
         } else {
             $this->BANK_ID->ViewValue = NULL;
         }
         $this->BANK_ID->ViewCustomAttributes = "";
         // ACTIVE
         if (strval($this->ACTIVE->CurrentValue) != "") {
             $this->ACTIVE->ViewValue = $this->ACTIVE->OptionCaption($this->ACTIVE->CurrentValue);
         } else {
             $this->ACTIVE->ViewValue = NULL;
         }
         $this->ACTIVE->ViewCustomAttributes = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->LinkCustomAttributes = "";
         $this->ACCOUNT_NUMBER->HrefValue = "";
         $this->ACCOUNT_NUMBER->TooltipValue = "";
         // BANK_ID
         $this->BANK_ID->LinkCustomAttributes = "";
         $this->BANK_ID->HrefValue = "";
         $this->BANK_ID->TooltipValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
         $this->ACTIVE->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // CODE
         $this->CODE->EditAttrs["class"] = "form-control";
         $this->CODE->EditCustomAttributes = "";
         $this->CODE->EditValue = ew_HtmlEncode($this->CODE->CurrentValue);
         $this->CODE->PlaceHolder = ew_RemoveHtml($this->CODE->FldCaption());
         // DESCRIPTION
         $this->DESCRIPTION->EditAttrs["class"] = "form-control";
         $this->DESCRIPTION->EditCustomAttributes = "";
         $this->DESCRIPTION->EditValue = ew_HtmlEncode($this->DESCRIPTION->CurrentValue);
         $this->DESCRIPTION->PlaceHolder = ew_RemoveHtml($this->DESCRIPTION->FldCaption());
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->EditAttrs["class"] = "form-control";
         $this->ACCOUNT_NUMBER->EditCustomAttributes = "";
         $this->ACCOUNT_NUMBER->EditValue = ew_HtmlEncode($this->ACCOUNT_NUMBER->CurrentValue);
         $this->ACCOUNT_NUMBER->PlaceHolder = ew_RemoveHtml($this->ACCOUNT_NUMBER->FldCaption());
         if (strval($this->ACCOUNT_NUMBER->EditValue) != "" && is_numeric($this->ACCOUNT_NUMBER->EditValue)) {
             $this->ACCOUNT_NUMBER->EditValue = ew_FormatNumber($this->ACCOUNT_NUMBER->EditValue, -2, -1, -2, 0);
         }
         // BANK_ID
         $this->BANK_ID->EditAttrs["class"] = "form-control";
         $this->BANK_ID->EditCustomAttributes = "";
         if (trim(strval($this->BANK_ID->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
         }
         switch (@$gsLanguage) {
             case "es":
                 $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `bank`";
                 $sWhereWrk = "";
                 break;
             default:
                 $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `bank`";
                 $sWhereWrk = "";
                 break;
         }
         ew_AddFilter($sWhereWrk, $sFilterWrk);
         $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
         // Call Lookup selecting
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = Conn()->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->BANK_ID->EditValue = $arwrk;
         // ACTIVE
         $this->ACTIVE->EditAttrs["class"] = "form-control";
         $this->ACTIVE->EditCustomAttributes = "";
         $this->ACTIVE->EditValue = $this->ACTIVE->Options(TRUE);
         // Edit refer script
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->LinkCustomAttributes = "";
         $this->ACCOUNT_NUMBER->HrefValue = "";
         // BANK_ID
         $this->BANK_ID->LinkCustomAttributes = "";
         $this->BANK_ID->HrefValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
        $Ingredients_Report_2->DeliveryDate->CurrentValue = $Ingredients_Report_2->DeliveryDate->DbValue;
    }
    if ($Ingredients_Report_2_report->bLvlBreak[1]) {
        $Ingredients_Report_2->PublishedDate->CurrentValue = $Ingredients_Report_2_report->vGrps[0];
        // Render row for view
        $Ingredients_Report_2->RowType = EW_ROWTYPE_VIEW;
        $Ingredients_Report_2_report->RenderRow();
        $Ingredients_Report_2->PublishedDate->CurrentValue = $Ingredients_Report_2->PublishedDate->DbValue;
    }
}
// Close recordset
$rs->Close();
?>
	<tr><td colspan=3><span class="phpmaker">&nbsp;<br></span></td></tr>
	<tr><td colspan=3 class="ewGrandSummary"><span class="phpmaker">Grand Total (<?php 
echo ew_FormatNumber($Ingredients_Report_2_report->nCntRecs[0], 0);
?>
 Detail Records)</span></td></tr>
	<tr><td colspan=3><span class="phpmaker">&nbsp;<br></span></td></tr>
</table>
</form>
<?php 
if ($Ingredients_Report_2->Export == "") {
    ?>
<script language="JavaScript" type="text/javascript">
<!--

// Write your table-specific startup script here
// document.write("page loaded");
//-->
Ejemplo n.º 29
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // socio_nro
     // id_actividad
     // id_usuario
     // propietario
     // comercio
     // direccion_comercio
     // activo
     // mail
     // tel
     // cel
     // cuit_cuil
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // socio_nro
         $this->socio_nro->ViewValue = $this->socio_nro->CurrentValue;
         $this->socio_nro->ViewCustomAttributes = "";
         // id_actividad
         if (strval($this->id_actividad->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_actividad->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `actividad` AS `DispFld`, `descripcion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `actividad`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activa`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_actividad, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_actividad->ViewValue = $rswrk->fields('DispFld');
                 $this->id_actividad->ViewValue .= ew_ValueSeparator(1, $this->id_actividad) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_actividad->ViewValue = $this->id_actividad->CurrentValue;
             }
         } else {
             $this->id_actividad->ViewValue = NULL;
         }
         $this->id_actividad->ViewCustomAttributes = "";
         // propietario
         $this->propietario->ViewValue = $this->propietario->CurrentValue;
         $this->propietario->ViewCustomAttributes = "";
         // comercio
         $this->comercio->ViewValue = $this->comercio->CurrentValue;
         $this->comercio->ViewCustomAttributes = "";
         // direccion_comercio
         $this->direccion_comercio->ViewValue = $this->direccion_comercio->CurrentValue;
         $this->direccion_comercio->ViewCustomAttributes = "";
         // activo
         if (strval($this->activo->CurrentValue) != "") {
             switch ($this->activo->CurrentValue) {
                 case $this->activo->FldTagValue(1):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->CurrentValue;
                     break;
                 case $this->activo->FldTagValue(2):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->CurrentValue;
                     break;
                 default:
                     $this->activo->ViewValue = $this->activo->CurrentValue;
             }
         } else {
             $this->activo->ViewValue = NULL;
         }
         $this->activo->ViewCustomAttributes = "";
         // mail
         $this->mail->ViewValue = $this->mail->CurrentValue;
         $this->mail->ViewValue = strtolower($this->mail->ViewValue);
         $this->mail->ViewCustomAttributes = "";
         // tel
         $this->tel->ViewValue = $this->tel->CurrentValue;
         $this->tel->ViewValue = trim($this->tel->ViewValue);
         $this->tel->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewValue = trim($this->cel->ViewValue);
         $this->cel->ViewCustomAttributes = "";
         // cuit_cuil
         $this->cuit_cuil->ViewValue = $this->cuit_cuil->CurrentValue;
         $this->cuit_cuil->ViewValue = ew_FormatNumber($this->cuit_cuil->ViewValue, 0, -2, -2, -2);
         $this->cuit_cuil->ViewCustomAttributes = "";
         // id_actividad
         $this->id_actividad->LinkCustomAttributes = "";
         $this->id_actividad->HrefValue = "";
         $this->id_actividad->TooltipValue = "";
         // propietario
         $this->propietario->LinkCustomAttributes = "";
         $this->propietario->HrefValue = "";
         $this->propietario->TooltipValue = "";
         // comercio
         $this->comercio->LinkCustomAttributes = "";
         $this->comercio->HrefValue = "";
         $this->comercio->TooltipValue = "";
         // direccion_comercio
         $this->direccion_comercio->LinkCustomAttributes = "";
         $this->direccion_comercio->HrefValue = "";
         $this->direccion_comercio->TooltipValue = "";
         // activo
         $this->activo->LinkCustomAttributes = "";
         $this->activo->HrefValue = "";
         $this->activo->TooltipValue = "";
         // mail
         $this->mail->LinkCustomAttributes = "";
         $this->mail->HrefValue = "";
         $this->mail->TooltipValue = "";
         // tel
         $this->tel->LinkCustomAttributes = "";
         $this->tel->HrefValue = "";
         $this->tel->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // cuit_cuil
         $this->cuit_cuil->LinkCustomAttributes = "";
         $this->cuit_cuil->HrefValue = "";
         $this->cuit_cuil->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // id_actividad
         $this->id_actividad->EditCustomAttributes = "";
         if (trim(strval($this->id_actividad->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_actividad->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `id`, `actividad` AS `DispFld`, `descripcion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `actividad`";
         $sWhereWrk = "";
         $lookuptblfilter = "`activa`='S'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_actividad, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_actividad->EditValue = $arwrk;
         // propietario
         $this->propietario->EditCustomAttributes = "";
         $this->propietario->EditValue = ew_HtmlEncode($this->propietario->CurrentValue);
         $this->propietario->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->propietario->FldCaption()));
         // comercio
         $this->comercio->EditCustomAttributes = "";
         $this->comercio->EditValue = ew_HtmlEncode($this->comercio->CurrentValue);
         $this->comercio->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->comercio->FldCaption()));
         // direccion_comercio
         $this->direccion_comercio->EditCustomAttributes = "";
         $this->direccion_comercio->EditValue = ew_HtmlEncode($this->direccion_comercio->CurrentValue);
         $this->direccion_comercio->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->direccion_comercio->FldCaption()));
         // activo
         $this->activo->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->activo->FldTagValue(1), $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->FldTagValue(1));
         $arwrk[] = array($this->activo->FldTagValue(2), $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->FldTagValue(2));
         $this->activo->EditValue = $arwrk;
         // mail
         $this->mail->EditCustomAttributes = "";
         $this->mail->EditValue = ew_HtmlEncode($this->mail->CurrentValue);
         $this->mail->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->mail->FldCaption()));
         // tel
         $this->tel->EditCustomAttributes = "";
         $this->tel->EditValue = ew_HtmlEncode($this->tel->CurrentValue);
         $this->tel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->tel->FldCaption()));
         // cel
         $this->cel->EditCustomAttributes = "";
         $this->cel->EditValue = ew_HtmlEncode($this->cel->CurrentValue);
         $this->cel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cel->FldCaption()));
         // cuit_cuil
         $this->cuit_cuil->EditCustomAttributes = "";
         $this->cuit_cuil->EditValue = ew_HtmlEncode($this->cuit_cuil->CurrentValue);
         $this->cuit_cuil->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cuit_cuil->FldCaption()));
         // Edit refer script
         // id_actividad
         $this->id_actividad->HrefValue = "";
         // propietario
         $this->propietario->HrefValue = "";
         // comercio
         $this->comercio->HrefValue = "";
         // direccion_comercio
         $this->direccion_comercio->HrefValue = "";
         // activo
         $this->activo->HrefValue = "";
         // mail
         $this->mail->HrefValue = "";
         // tel
         $this->tel->HrefValue = "";
         // cel
         $this->cel->HrefValue = "";
         // cuit_cuil
         $this->cuit_cuil->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Ejemplo n.º 30
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // socio_nro
     // cuit_cuil
     // id_actividad
     $this->id_actividad->CellCssStyle = "white-space: nowrap;";
     // propietario
     // comercio
     // direccion_comercio
     // mail
     // tel
     // cel
     // activo
     // id_usuario
     $this->id_usuario->CellCssStyle = "white-space: nowrap;";
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // socio_nro
         $this->socio_nro->ViewValue = $this->socio_nro->CurrentValue;
         $this->socio_nro->ViewCustomAttributes = "";
         // cuit_cuil
         $this->cuit_cuil->ViewValue = $this->cuit_cuil->CurrentValue;
         $this->cuit_cuil->ViewValue = ew_FormatNumber($this->cuit_cuil->ViewValue, 0, -2, -2, -2);
         $this->cuit_cuil->ViewCustomAttributes = "";
         // propietario
         $this->propietario->ViewValue = $this->propietario->CurrentValue;
         $this->propietario->ViewCustomAttributes = "";
         // comercio
         $this->comercio->ViewValue = $this->comercio->CurrentValue;
         $this->comercio->ViewCustomAttributes = "";
         // direccion_comercio
         $this->direccion_comercio->ViewValue = $this->direccion_comercio->CurrentValue;
         $this->direccion_comercio->ViewCustomAttributes = "";
         // mail
         $this->mail->ViewValue = $this->mail->CurrentValue;
         $this->mail->ViewValue = strtolower($this->mail->ViewValue);
         $this->mail->ViewCustomAttributes = "";
         // tel
         $this->tel->ViewValue = $this->tel->CurrentValue;
         $this->tel->ViewValue = trim($this->tel->ViewValue);
         $this->tel->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewValue = trim($this->cel->ViewValue);
         $this->cel->ViewCustomAttributes = "";
         // activo
         if (strval($this->activo->CurrentValue) != "") {
             switch ($this->activo->CurrentValue) {
                 case $this->activo->FldTagValue(1):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->CurrentValue;
                     break;
                 case $this->activo->FldTagValue(2):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->CurrentValue;
                     break;
                 default:
                     $this->activo->ViewValue = $this->activo->CurrentValue;
             }
         } else {
             $this->activo->ViewValue = NULL;
         }
         $this->activo->ViewCustomAttributes = "";
         // socio_nro
         $this->socio_nro->LinkCustomAttributes = "";
         $this->socio_nro->HrefValue = "";
         $this->socio_nro->TooltipValue = "";
         // cuit_cuil
         $this->cuit_cuil->LinkCustomAttributes = "";
         $this->cuit_cuil->HrefValue = "";
         $this->cuit_cuil->TooltipValue = "";
         // propietario
         $this->propietario->LinkCustomAttributes = "";
         $this->propietario->HrefValue = "";
         $this->propietario->TooltipValue = "";
         // comercio
         $this->comercio->LinkCustomAttributes = "";
         $this->comercio->HrefValue = "";
         $this->comercio->TooltipValue = "";
         // direccion_comercio
         $this->direccion_comercio->LinkCustomAttributes = "";
         $this->direccion_comercio->HrefValue = "";
         $this->direccion_comercio->TooltipValue = "";
         // mail
         $this->mail->LinkCustomAttributes = "";
         $this->mail->HrefValue = "";
         $this->mail->TooltipValue = "";
         // tel
         $this->tel->LinkCustomAttributes = "";
         $this->tel->HrefValue = "";
         $this->tel->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // activo
         $this->activo->LinkCustomAttributes = "";
         $this->activo->HrefValue = "";
         $this->activo->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }