Exemplo n.º 1
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_socio
     // id_montos
     // id_usuario
     // fecha
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id_socio
         if (strval($this->id_socio->CurrentValue) != "") {
             $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `socio_nro`, `socio_nro` AS `DispFld`, `propietario` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $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 = "";
         // id_montos
         if (strval($this->id_montos->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_montos->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `descripcion` AS `DispFld`, `importe` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `montos`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_montos, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_montos->ViewValue = $rswrk->fields('DispFld');
                 $this->id_montos->ViewValue .= ew_ValueSeparator(1, $this->id_montos) . ew_FormatCurrency($rswrk->fields('Disp2Fld'), 0, -2, -2, -2);
                 $rswrk->Close();
             } else {
                 $this->id_montos->ViewValue = $this->id_montos->CurrentValue;
             }
         } else {
             $this->id_montos->ViewValue = NULL;
         }
         $this->id_montos->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // id_socio
         $this->id_socio->LinkCustomAttributes = "";
         $this->id_socio->HrefValue = "";
         $this->id_socio->TooltipValue = "";
         // id_montos
         $this->id_montos->LinkCustomAttributes = "";
         $this->id_montos->HrefValue = "";
         $this->id_montos->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_SEARCH) {
         // Search row
         // id_socio
         $this->id_socio->EditAttrs["class"] = "form-control";
         $this->id_socio->EditCustomAttributes = "";
         if (trim(strval($this->id_socio->AdvancedSearch->SearchValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->AdvancedSearch->SearchValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `socio_nro`, `socio_nro` AS `DispFld`, `propietario` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `socios`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         if (!$GLOBALS["socios_cuotas"]->UserIDAllow("search")) {
             $sWhereWrk = $GLOBALS["socios"]->AddUserIDFilter($sWhereWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_socio, $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_socio->EditValue = $arwrk;
         // id_montos
         $this->id_montos->EditAttrs["class"] = "form-control";
         $this->id_montos->EditCustomAttributes = "";
         if (trim(strval($this->id_montos->AdvancedSearch->SearchValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_montos->AdvancedSearch->SearchValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `id`, `descripcion` AS `DispFld`, `importe` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `montos`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         if (!$GLOBALS["socios_cuotas"]->UserIDAllow("search")) {
             $sWhereWrk = $GLOBALS["montos"]->AddUserIDFilter($sWhereWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_montos, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $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], 0, -2, -2, -2);
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_montos->EditValue = $arwrk;
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->fecha->AdvancedSearch->SearchValue, 7), 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
     }
     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();
     }
 }
Exemplo n.º 2
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();
     }
 }
Exemplo n.º 3
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     $this->SetupOtherOptions();
     // 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 = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // 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 = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 4
0
 function RenderRow()
 {
     global $conn, $Security, $Orders;
     // Call Row_Rendering event
     $Orders->Row_Rendering();
     // Common render codes for all row types
     // CustomerID
     $Orders->CustomerID->CellCssStyle = "";
     $Orders->CustomerID->CellCssClass = "";
     // TransactionNumber
     $Orders->TransactionNumber->CellCssStyle = "";
     $Orders->TransactionNumber->CellCssClass = "";
     // DateOrdered
     $Orders->DateOrdered->CellCssStyle = "";
     $Orders->DateOrdered->CellCssClass = "";
     // Total
     $Orders->Total->CellCssStyle = "";
     $Orders->Total->CellCssClass = "";
     // DeliveryDate
     $Orders->DeliveryDate->CellCssStyle = "";
     $Orders->DeliveryDate->CellCssClass = "";
     // PromoCodeID
     $Orders->PromoCodeID->CellCssStyle = "";
     $Orders->PromoCodeID->CellCssClass = "";
     // Timestamp
     $Orders->Timestamp->CellCssStyle = "";
     $Orders->Timestamp->CellCssClass = "";
     // Sequence
     $Orders->Sequence->CellCssStyle = "";
     $Orders->Sequence->CellCssClass = "";
     if ($Orders->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderID
         $Orders->OrderID->ViewValue = $Orders->OrderID->CurrentValue;
         $Orders->OrderID->CssStyle = "";
         $Orders->OrderID->CssClass = "";
         $Orders->OrderID->ViewCustomAttributes = "";
         // CustomerID
         if (strval($Orders->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Orders->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $Orders->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $Orders->CustomerID->ViewValue = $Orders->CustomerID->CurrentValue;
             }
         } else {
             $Orders->CustomerID->ViewValue = NULL;
         }
         $Orders->CustomerID->CssStyle = "";
         $Orders->CustomerID->CssClass = "";
         $Orders->CustomerID->ViewCustomAttributes = "";
         // TransactionNumber
         $Orders->TransactionNumber->ViewValue = $Orders->TransactionNumber->CurrentValue;
         $Orders->TransactionNumber->CssStyle = "";
         $Orders->TransactionNumber->CssClass = "";
         $Orders->TransactionNumber->ViewCustomAttributes = "";
         // DateOrdered
         $Orders->DateOrdered->ViewValue = $Orders->DateOrdered->CurrentValue;
         $Orders->DateOrdered->ViewValue = ew_FormatDateTime($Orders->DateOrdered->ViewValue, 6);
         $Orders->DateOrdered->CssStyle = "";
         $Orders->DateOrdered->CssClass = "";
         $Orders->DateOrdered->ViewCustomAttributes = "";
         // Total
         $Orders->Total->ViewValue = $Orders->Total->CurrentValue;
         $Orders->Total->ViewValue = ew_FormatCurrency($Orders->Total->ViewValue, 2, -2, 0, -2);
         $Orders->Total->CssStyle = "";
         $Orders->Total->CssClass = "";
         $Orders->Total->ViewCustomAttributes = "";
         // DeliveryDate
         $Orders->DeliveryDate->ViewValue = $Orders->DeliveryDate->CurrentValue;
         $Orders->DeliveryDate->ViewValue = ew_FormatDateTime($Orders->DeliveryDate->ViewValue, 6);
         $Orders->DeliveryDate->CssStyle = "";
         $Orders->DeliveryDate->CssClass = "";
         $Orders->DeliveryDate->ViewCustomAttributes = "";
         // PromoCodeID
         if (strval($Orders->PromoCodeID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `PromoCodeName` FROM `PromoCodes` WHERE `PromoCodeID` = " . ew_AdjustSql($Orders->PromoCodeID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->PromoCodeID->ViewValue = $rswrk->fields('PromoCodeName');
                 $rswrk->Close();
             } else {
                 $Orders->PromoCodeID->ViewValue = $Orders->PromoCodeID->CurrentValue;
             }
         } else {
             $Orders->PromoCodeID->ViewValue = NULL;
         }
         $Orders->PromoCodeID->CssStyle = "";
         $Orders->PromoCodeID->CssClass = "";
         $Orders->PromoCodeID->ViewCustomAttributes = "";
         // Timestamp
         $Orders->Timestamp->ViewValue = $Orders->Timestamp->CurrentValue;
         $Orders->Timestamp->ViewValue = ew_FormatDateTime($Orders->Timestamp->ViewValue, 6);
         $Orders->Timestamp->CssStyle = "";
         $Orders->Timestamp->CssClass = "";
         $Orders->Timestamp->ViewCustomAttributes = "";
         // Sequence
         $Orders->Sequence->ViewValue = $Orders->Sequence->CurrentValue;
         $Orders->Sequence->CssStyle = "";
         $Orders->Sequence->CssClass = "";
         $Orders->Sequence->ViewCustomAttributes = "";
         // CustomerID
         $Orders->CustomerID->HrefValue = "";
         // TransactionNumber
         $Orders->TransactionNumber->HrefValue = "";
         // DateOrdered
         $Orders->DateOrdered->HrefValue = "";
         // Total
         $Orders->Total->HrefValue = "";
         // DeliveryDate
         $Orders->DeliveryDate->HrefValue = "";
         // PromoCodeID
         $Orders->PromoCodeID->HrefValue = "";
         // Timestamp
         $Orders->Timestamp->HrefValue = "";
         // Sequence
         $Orders->Sequence->HrefValue = "";
     } elseif ($Orders->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // CustomerID
         $Orders->CustomerID->EditCustomAttributes = "";
         if ($Orders->CustomerID->getSessionValue() != "") {
             $Orders->CustomerID->CurrentValue = $Orders->CustomerID->getSessionValue();
             if (strval($Orders->CustomerID->CurrentValue) != "") {
                 $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Orders->CustomerID->CurrentValue) . "";
                 $sSqlWrk .= " ORDER BY `LastName` Asc";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup value(s) found
                     $Orders->CustomerID->ViewValue = $rswrk->fields('LastName');
                     $Orders->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                     $rswrk->Close();
                 } else {
                     $Orders->CustomerID->ViewValue = $Orders->CustomerID->CurrentValue;
                 }
             } else {
                 $Orders->CustomerID->ViewValue = NULL;
             }
             $Orders->CustomerID->CssStyle = "";
             $Orders->CustomerID->CssClass = "";
             $Orders->CustomerID->ViewCustomAttributes = "";
         } else {
             $sSqlWrk = "SELECT `CustomerID`, `LastName`, `FirstName`, '' AS SelectFilterFld FROM `Customers`";
             $sWhereWrk = "";
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE {$sWhereWrk}";
             }
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", "Please Select", ""));
             $Orders->CustomerID->EditValue = $arwrk;
         }
         // TransactionNumber
         $Orders->TransactionNumber->EditCustomAttributes = "";
         $Orders->TransactionNumber->EditValue = ew_HtmlEncode($Orders->TransactionNumber->CurrentValue);
         // DateOrdered
         $Orders->DateOrdered->EditCustomAttributes = "";
         $Orders->DateOrdered->EditValue = ew_HtmlEncode(ew_FormatDateTime($Orders->DateOrdered->CurrentValue, 6));
         // Total
         $Orders->Total->EditCustomAttributes = "";
         $Orders->Total->EditValue = ew_HtmlEncode($Orders->Total->CurrentValue);
         // DeliveryDate
         $Orders->DeliveryDate->EditCustomAttributes = "";
         if ($Orders->DeliveryDate->getSessionValue() != "") {
             $Orders->DeliveryDate->CurrentValue = $Orders->DeliveryDate->getSessionValue();
             $Orders->DeliveryDate->ViewValue = $Orders->DeliveryDate->CurrentValue;
             $Orders->DeliveryDate->ViewValue = ew_FormatDateTime($Orders->DeliveryDate->ViewValue, 6);
             $Orders->DeliveryDate->CssStyle = "";
             $Orders->DeliveryDate->CssClass = "";
             $Orders->DeliveryDate->ViewCustomAttributes = "";
         } else {
             $Orders->DeliveryDate->EditValue = ew_HtmlEncode(ew_FormatDateTime($Orders->DeliveryDate->CurrentValue, 6));
         }
         // PromoCodeID
         $Orders->PromoCodeID->EditCustomAttributes = "";
         $sSqlWrk = "SELECT `PromoCodeID`, `PromoCodeName`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `PromoCodes`";
         $sWhereWrk = "";
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE {$sWhereWrk}";
         }
         $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", "Please Select"));
         $Orders->PromoCodeID->EditValue = $arwrk;
         // Timestamp
         $Orders->Timestamp->EditCustomAttributes = "";
         $Orders->Timestamp->EditValue = ew_HtmlEncode(ew_FormatDateTime($Orders->Timestamp->CurrentValue, 6));
         // Sequence
         $Orders->Sequence->EditCustomAttributes = "";
         $Orders->Sequence->EditValue = ew_HtmlEncode($Orders->Sequence->CurrentValue);
     }
     // Call Row Rendered event
     $Orders->Row_Rendered();
 }
Exemplo n.º 5
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();
 }
Exemplo n.º 6
0
 function RenderListRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // codigo
     // fecha
     // detalles
     // Importe
     // id_tipo_gasto
     // id_hoja_ruta
     // id_usuario
     $this->id_usuario->CellCssStyle = "white-space: nowrap;";
     // 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 = "";
     // id_usuario
     $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
     $this->id_usuario->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 = "";
     // 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 = "";
     // id_usuario
     $this->id_usuario->LinkCustomAttributes = "";
     $this->id_usuario->HrefValue = "";
     $this->id_usuario->TooltipValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 7
0
 function RenderRow()
 {
     global $conn, $Security, $OrderDetails;
     // Call Row_Rendering event
     $OrderDetails->Row_Rendering();
     // Common render codes for all row types
     // OrderDetailsID
     $OrderDetails->OrderDetailsID->CellCssStyle = "";
     $OrderDetails->OrderDetailsID->CellCssClass = "";
     // OrderID
     $OrderDetails->OrderID->CellCssStyle = "";
     $OrderDetails->OrderID->CellCssClass = "";
     // CustomerID
     $OrderDetails->CustomerID->CellCssStyle = "";
     $OrderDetails->CustomerID->CellCssClass = "";
     // ItemID
     $OrderDetails->ItemID->CellCssStyle = "";
     $OrderDetails->ItemID->CellCssClass = "";
     // Count
     $OrderDetails->Count->CellCssStyle = "";
     $OrderDetails->Count->CellCssClass = "";
     // VegCount
     $OrderDetails->VegCount->CellCssStyle = "";
     $OrderDetails->VegCount->CellCssClass = "";
     // Chefs_Tasting
     $OrderDetails->Chefs_Tasting->CellCssStyle = "";
     $OrderDetails->Chefs_Tasting->CellCssClass = "";
     if ($OrderDetails->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderDetailsID
         $OrderDetails->OrderDetailsID->ViewValue = $OrderDetails->OrderDetailsID->CurrentValue;
         $OrderDetails->OrderDetailsID->CssStyle = "";
         $OrderDetails->OrderDetailsID->CssClass = "";
         $OrderDetails->OrderDetailsID->ViewCustomAttributes = "";
         // OrderID
         $OrderDetails->OrderID->ViewValue = $OrderDetails->OrderID->CurrentValue;
         $OrderDetails->OrderID->CssStyle = "";
         $OrderDetails->OrderID->CssClass = "";
         $OrderDetails->OrderID->ViewCustomAttributes = "";
         // CustomerID
         if (strval($OrderDetails->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($OrderDetails->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $OrderDetails->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $OrderDetails->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $OrderDetails->CustomerID->ViewValue = $OrderDetails->CustomerID->CurrentValue;
             }
         } else {
             $OrderDetails->CustomerID->ViewValue = NULL;
         }
         $OrderDetails->CustomerID->CssStyle = "";
         $OrderDetails->CustomerID->CssClass = "";
         $OrderDetails->CustomerID->ViewCustomAttributes = "";
         // ItemID
         if (strval($OrderDetails->ItemID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE `ItemID` = " . ew_AdjustSql($OrderDetails->ItemID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $OrderDetails->ItemID->ViewValue = $rswrk->fields('ItemName');
                 $rswrk->Close();
             } else {
                 $OrderDetails->ItemID->ViewValue = $OrderDetails->ItemID->CurrentValue;
             }
         } else {
             $OrderDetails->ItemID->ViewValue = NULL;
         }
         $OrderDetails->ItemID->CssStyle = "";
         $OrderDetails->ItemID->CssClass = "";
         $OrderDetails->ItemID->ViewCustomAttributes = "";
         // Count
         $OrderDetails->Count->ViewValue = $OrderDetails->Count->CurrentValue;
         $OrderDetails->Count->CssStyle = "";
         $OrderDetails->Count->CssClass = "";
         $OrderDetails->Count->ViewCustomAttributes = "";
         // VegCount
         $OrderDetails->VegCount->ViewValue = $OrderDetails->VegCount->CurrentValue;
         $OrderDetails->VegCount->CssStyle = "";
         $OrderDetails->VegCount->CssClass = "";
         $OrderDetails->VegCount->ViewCustomAttributes = "";
         // Amount
         $OrderDetails->Amount->ViewValue = $OrderDetails->Amount->CurrentValue;
         $OrderDetails->Amount->ViewValue = ew_FormatCurrency($OrderDetails->Amount->ViewValue, 2, -2, 0, -2);
         $OrderDetails->Amount->CssStyle = "";
         $OrderDetails->Amount->CssClass = "";
         $OrderDetails->Amount->ViewCustomAttributes = "";
         // Chefs_Tasting
         if (strval($OrderDetails->Chefs_Tasting->CurrentValue) != "") {
             switch ($OrderDetails->Chefs_Tasting->CurrentValue) {
                 case "0":
                     $OrderDetails->Chefs_Tasting->ViewValue = "No";
                     break;
                 case "1":
                     $OrderDetails->Chefs_Tasting->ViewValue = "Yes";
                     break;
                 default:
                     $OrderDetails->Chefs_Tasting->ViewValue = $OrderDetails->Chefs_Tasting->CurrentValue;
             }
         } else {
             $OrderDetails->Chefs_Tasting->ViewValue = NULL;
         }
         $OrderDetails->Chefs_Tasting->CssStyle = "";
         $OrderDetails->Chefs_Tasting->CssClass = "";
         $OrderDetails->Chefs_Tasting->ViewCustomAttributes = "";
         // OrderDetailsID
         $OrderDetails->OrderDetailsID->HrefValue = "";
         // OrderID
         $OrderDetails->OrderID->HrefValue = "";
         // CustomerID
         $OrderDetails->CustomerID->HrefValue = "";
         // ItemID
         $OrderDetails->ItemID->HrefValue = "";
         // Count
         $OrderDetails->Count->HrefValue = "";
         // VegCount
         $OrderDetails->VegCount->HrefValue = "";
         // Chefs_Tasting
         $OrderDetails->Chefs_Tasting->HrefValue = "";
     }
     // Call Row Rendered event
     $OrderDetails->Row_Rendered();
 }
Exemplo n.º 8
0
 function RenderRow()
 {
     global $conn, $Security, $Items;
     // Call Row_Rendering event
     $Items->Row_Rendering();
     // Common render codes for all row types
     // ItemID
     $Items->ItemID->CellCssStyle = "";
     $Items->ItemID->CellCssClass = "";
     // MenuID
     $Items->MenuID->CellCssStyle = "";
     $Items->MenuID->CellCssClass = "";
     // ItemName
     $Items->ItemName->CellCssStyle = "";
     $Items->ItemName->CellCssClass = "";
     // Description
     $Items->Description->CellCssStyle = "";
     $Items->Description->CellCssClass = "";
     // Price
     $Items->Price->CellCssStyle = "";
     $Items->Price->CellCssClass = "";
     // Image
     $Items->Image->CellCssStyle = "";
     $Items->Image->CellCssClass = "";
     // Vegetarian
     $Items->Vegetarian->CellCssStyle = "";
     $Items->Vegetarian->CellCssClass = "";
     // Vegetarian_Price
     $Items->Vegetarian_Price->CellCssStyle = "";
     $Items->Vegetarian_Price->CellCssClass = "";
     // Color
     $Items->Color->CellCssStyle = "";
     $Items->Color->CellCssClass = "";
     // Sequence
     $Items->Sequence->CellCssStyle = "";
     $Items->Sequence->CellCssClass = "";
     // PDF
     $Items->PDF->CellCssStyle = "";
     $Items->PDF->CellCssClass = "";
     // Active
     $Items->Active->CellCssStyle = "";
     $Items->Active->CellCssClass = "";
     if ($Items->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // ItemID
         $Items->ItemID->ViewValue = $Items->ItemID->CurrentValue;
         $Items->ItemID->CssStyle = "";
         $Items->ItemID->CssClass = "";
         $Items->ItemID->ViewCustomAttributes = "";
         // MenuID
         if (strval($Items->MenuID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `MenuName` FROM `Menus` WHERE `MenuID` = " . ew_AdjustSql($Items->MenuID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `MenuName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Items->MenuID->ViewValue = $rswrk->fields('MenuName');
                 $rswrk->Close();
             } else {
                 $Items->MenuID->ViewValue = $Items->MenuID->CurrentValue;
             }
         } else {
             $Items->MenuID->ViewValue = NULL;
         }
         $Items->MenuID->CssStyle = "";
         $Items->MenuID->CssClass = "";
         $Items->MenuID->ViewCustomAttributes = "";
         // ItemName
         $Items->ItemName->ViewValue = $Items->ItemName->CurrentValue;
         $Items->ItemName->CssStyle = "";
         $Items->ItemName->CssClass = "";
         $Items->ItemName->ViewCustomAttributes = "";
         // Description
         $Items->Description->ViewValue = $Items->Description->CurrentValue;
         if (!is_null($Items->Description->ViewValue)) {
             $Items->Description->ViewValue = str_replace("\n", "<br>", $Items->Description->ViewValue);
         }
         $Items->Description->CssStyle = "";
         $Items->Description->CssClass = "";
         $Items->Description->ViewCustomAttributes = "";
         // Price
         $Items->Price->ViewValue = $Items->Price->CurrentValue;
         $Items->Price->ViewValue = ew_FormatCurrency($Items->Price->ViewValue, 2, -2, 0, -2);
         $Items->Price->CssStyle = "";
         $Items->Price->CssClass = "";
         $Items->Price->ViewCustomAttributes = "";
         // Image
         if (!is_null($Items->Image->Upload->DbValue)) {
             $Items->Image->ViewValue = $Items->Image->Upload->DbValue;
             $Items->Image->ImageAlt = "";
         } else {
             $Items->Image->ViewValue = "";
         }
         $Items->Image->CssStyle = "";
         $Items->Image->CssClass = "";
         $Items->Image->ViewCustomAttributes = "";
         // Vegetarian
         if (strval($Items->Vegetarian->CurrentValue) != "") {
             switch ($Items->Vegetarian->CurrentValue) {
                 case "0":
                     $Items->Vegetarian->ViewValue = "No";
                     break;
                 case "1":
                     $Items->Vegetarian->ViewValue = "Yes";
                     break;
                 default:
                     $Items->Vegetarian->ViewValue = $Items->Vegetarian->CurrentValue;
             }
         } else {
             $Items->Vegetarian->ViewValue = NULL;
         }
         $Items->Vegetarian->CssStyle = "";
         $Items->Vegetarian->CssClass = "";
         $Items->Vegetarian->ViewCustomAttributes = "";
         // Vegetarian_Price
         $Items->Vegetarian_Price->ViewValue = $Items->Vegetarian_Price->CurrentValue;
         $Items->Vegetarian_Price->ViewValue = ew_FormatCurrency($Items->Vegetarian_Price->ViewValue, 2, -2, 0, -2);
         $Items->Vegetarian_Price->CssStyle = "";
         $Items->Vegetarian_Price->CssClass = "";
         $Items->Vegetarian_Price->ViewCustomAttributes = "";
         // Color
         $Items->Color->ViewValue = $Items->Color->CurrentValue;
         $Items->Color->CssStyle = "";
         $Items->Color->CssClass = "";
         $Items->Color->ViewCustomAttributes = "";
         // Sequence
         $Items->Sequence->ViewValue = $Items->Sequence->CurrentValue;
         $Items->Sequence->CssStyle = "";
         $Items->Sequence->CssClass = "";
         $Items->Sequence->ViewCustomAttributes = "";
         // PDF
         if (!is_null($Items->PDF->Upload->DbValue)) {
             $Items->PDF->ViewValue = $Items->PDF->Upload->DbValue;
         } else {
             $Items->PDF->ViewValue = "";
         }
         $Items->PDF->CssStyle = "";
         $Items->PDF->CssClass = "";
         $Items->PDF->ViewCustomAttributes = "";
         // Active
         if (strval($Items->Active->CurrentValue) != "") {
             switch ($Items->Active->CurrentValue) {
                 case "0":
                     $Items->Active->ViewValue = "No";
                     break;
                 case "1":
                     $Items->Active->ViewValue = "Yes";
                     break;
                 default:
                     $Items->Active->ViewValue = $Items->Active->CurrentValue;
             }
         } else {
             $Items->Active->ViewValue = NULL;
         }
         $Items->Active->CssStyle = "";
         $Items->Active->CssClass = "";
         $Items->Active->ViewCustomAttributes = "";
         // ItemID
         $Items->ItemID->HrefValue = "";
         // MenuID
         $Items->MenuID->HrefValue = "";
         // ItemName
         $Items->ItemName->HrefValue = "";
         // Description
         $Items->Description->HrefValue = "";
         // Price
         $Items->Price->HrefValue = "";
         // Image
         $Items->Image->HrefValue = "";
         // Vegetarian
         $Items->Vegetarian->HrefValue = "";
         // Vegetarian_Price
         $Items->Vegetarian_Price->HrefValue = "";
         // Color
         $Items->Color->HrefValue = "";
         // Sequence
         $Items->Sequence->HrefValue = "";
         // PDF
         if (!is_null($Items->PDF->Upload->DbValue)) {
             $Items->PDF->HrefValue = ew_UploadPathEx(FALSE, "../recipes/") . (!empty($Items->PDF->ViewValue) ? $Items->PDF->ViewValue : $Items->PDF->CurrentValue);
             if ($Items->Export != "") {
                 $Items->PDF->HrefValue = ew_ConvertFullUrl($Items->PDF->HrefValue);
             }
         } else {
             $Items->PDF->HrefValue = "";
         }
         // Active
         $Items->Active->HrefValue = "";
     } elseif ($Items->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // ItemID
         $Items->ItemID->EditCustomAttributes = "";
         $Items->ItemID->EditValue = $Items->ItemID->CurrentValue;
         $Items->ItemID->CssStyle = "";
         $Items->ItemID->CssClass = "";
         $Items->ItemID->ViewCustomAttributes = "";
         // MenuID
         $Items->MenuID->EditCustomAttributes = "";
         if ($Items->MenuID->getSessionValue() != "") {
             $Items->MenuID->CurrentValue = $Items->MenuID->getSessionValue();
             if (strval($Items->MenuID->CurrentValue) != "") {
                 $sSqlWrk = "SELECT `MenuName` FROM `Menus` WHERE `MenuID` = " . ew_AdjustSql($Items->MenuID->CurrentValue) . "";
                 $sSqlWrk .= " ORDER BY `MenuName` Asc";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup value(s) found
                     $Items->MenuID->ViewValue = $rswrk->fields('MenuName');
                     $rswrk->Close();
                 } else {
                     $Items->MenuID->ViewValue = $Items->MenuID->CurrentValue;
                 }
             } else {
                 $Items->MenuID->ViewValue = NULL;
             }
             $Items->MenuID->CssStyle = "";
             $Items->MenuID->CssClass = "";
             $Items->MenuID->ViewCustomAttributes = "";
         } else {
             $sSqlWrk = "SELECT `MenuID`, `MenuName`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `Menus`";
             $sWhereWrk = "";
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE {$sWhereWrk}";
             }
             $sSqlWrk .= " ORDER BY `MenuName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", "Please Select"));
             $Items->MenuID->EditValue = $arwrk;
         }
         // ItemName
         $Items->ItemName->EditCustomAttributes = "";
         $Items->ItemName->EditValue = ew_HtmlEncode($Items->ItemName->CurrentValue);
         // Description
         $Items->Description->EditCustomAttributes = "";
         $Items->Description->EditValue = ew_HtmlEncode($Items->Description->CurrentValue);
         // Price
         $Items->Price->EditCustomAttributes = "";
         $Items->Price->EditValue = ew_HtmlEncode($Items->Price->CurrentValue);
         // Image
         $Items->Image->EditCustomAttributes = "";
         if (!is_null($Items->Image->Upload->DbValue)) {
             $Items->Image->EditValue = $Items->Image->Upload->DbValue;
             $Items->Image->ImageAlt = "";
         } else {
             $Items->Image->EditValue = "";
         }
         // Vegetarian
         $Items->Vegetarian->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array("0", "No");
         $arwrk[] = array("1", "Yes");
         $Items->Vegetarian->EditValue = $arwrk;
         // Vegetarian_Price
         $Items->Vegetarian_Price->EditCustomAttributes = "";
         $Items->Vegetarian_Price->EditValue = ew_HtmlEncode($Items->Vegetarian_Price->CurrentValue);
         // Color
         $Items->Color->EditCustomAttributes = "";
         $Items->Color->EditValue = ew_HtmlEncode($Items->Color->CurrentValue);
         // Sequence
         $Items->Sequence->EditCustomAttributes = "";
         $Items->Sequence->EditValue = ew_HtmlEncode($Items->Sequence->CurrentValue);
         // PDF
         $Items->PDF->EditCustomAttributes = "";
         if (!is_null($Items->PDF->Upload->DbValue)) {
             $Items->PDF->EditValue = $Items->PDF->Upload->DbValue;
         } else {
             $Items->PDF->EditValue = "";
         }
         // Active
         $Items->Active->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array("0", "No");
         $arwrk[] = array("1", "Yes");
         $Items->Active->EditValue = $arwrk;
         // Edit refer script
         // ItemID
         $Items->ItemID->HrefValue = "";
         // MenuID
         $Items->MenuID->HrefValue = "";
         // ItemName
         $Items->ItemName->HrefValue = "";
         // Description
         $Items->Description->HrefValue = "";
         // Price
         $Items->Price->HrefValue = "";
         // Image
         $Items->Image->HrefValue = "";
         // Vegetarian
         $Items->Vegetarian->HrefValue = "";
         // Vegetarian_Price
         $Items->Vegetarian_Price->HrefValue = "";
         // Color
         $Items->Color->HrefValue = "";
         // Sequence
         $Items->Sequence->HrefValue = "";
         // PDF
         if (!is_null($Items->PDF->Upload->DbValue)) {
             $Items->PDF->HrefValue = ew_UploadPathEx(FALSE, "../recipes/") . (!empty($Items->PDF->EditValue) ? $Items->PDF->EditValue : $Items->PDF->CurrentValue);
             if ($Items->Export != "") {
                 $Items->PDF->HrefValue = ew_ConvertFullUrl($Items->PDF->HrefValue);
             }
         } else {
             $Items->PDF->HrefValue = "";
         }
         // Active
         $Items->Active->HrefValue = "";
     }
     // Call Row Rendered event
     $Items->Row_Rendered();
 }
Exemplo n.º 9
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
     // id_deuda
     // fecha
     // monto
     // id_usuario
     $this->id_usuario->CellCssStyle = "white-space: nowrap;";
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // id_deuda
         if (strval($this->id_deuda->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
                 $rswrk->Close();
             } else {
                 $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
             }
         } else {
             $this->id_deuda->ViewValue = NULL;
         }
         $this->id_deuda->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
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // id_deuda
         $this->id_deuda->LinkCustomAttributes = "";
         $this->id_deuda->HrefValue = "";
         $this->id_deuda->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // monto
         $this->monto->LinkCustomAttributes = "";
         $this->monto->HrefValue = "";
         $this->monto->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 10
0
 function RenderListRow()
 {
     global $conn, $Security;
     // Call Row Rendering event
     $this->Row_Rendering();
     // OrderID
     $this->OrderID->ViewValue = $this->OrderID->CurrentValue;
     $this->OrderID->CssStyle = "";
     $this->OrderID->CssClass = "";
     $this->OrderID->ViewCustomAttributes = "";
     // CustomerID
     if (strval($this->CustomerID->CurrentValue) != "") {
         $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($this->CustomerID->CurrentValue) . "";
         $sSqlWrk .= " ORDER BY `LastName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup value(s) found
             $this->CustomerID->ViewValue = $rswrk->fields('LastName');
             $this->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
             $rswrk->Close();
         } else {
             $this->CustomerID->ViewValue = $this->CustomerID->CurrentValue;
         }
     } else {
         $this->CustomerID->ViewValue = NULL;
     }
     $this->CustomerID->CssStyle = "";
     $this->CustomerID->CssClass = "";
     $this->CustomerID->ViewCustomAttributes = "";
     // TransactionNumber
     $this->TransactionNumber->ViewValue = $this->TransactionNumber->CurrentValue;
     $this->TransactionNumber->CssStyle = "";
     $this->TransactionNumber->CssClass = "";
     $this->TransactionNumber->ViewCustomAttributes = "";
     // DateOrdered
     $this->DateOrdered->ViewValue = $this->DateOrdered->CurrentValue;
     $this->DateOrdered->ViewValue = ew_FormatDateTime($this->DateOrdered->ViewValue, 6);
     $this->DateOrdered->CssStyle = "";
     $this->DateOrdered->CssClass = "";
     $this->DateOrdered->ViewCustomAttributes = "";
     // Total
     $this->Total->ViewValue = $this->Total->CurrentValue;
     $this->Total->ViewValue = ew_FormatCurrency($this->Total->ViewValue, 2, -2, 0, -2);
     $this->Total->CssStyle = "";
     $this->Total->CssClass = "";
     $this->Total->ViewCustomAttributes = "";
     // DeliveryDate
     $this->DeliveryDate->ViewValue = $this->DeliveryDate->CurrentValue;
     $this->DeliveryDate->ViewValue = ew_FormatDateTime($this->DeliveryDate->ViewValue, 6);
     $this->DeliveryDate->CssStyle = "";
     $this->DeliveryDate->CssClass = "";
     $this->DeliveryDate->ViewCustomAttributes = "";
     // PromoCodeID
     if (strval($this->PromoCodeID->CurrentValue) != "") {
         $sSqlWrk = "SELECT `PromoCodeName` FROM `PromoCodes` WHERE `PromoCodeID` = " . ew_AdjustSql($this->PromoCodeID->CurrentValue) . "";
         $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup value(s) found
             $this->PromoCodeID->ViewValue = $rswrk->fields('PromoCodeName');
             $rswrk->Close();
         } else {
             $this->PromoCodeID->ViewValue = $this->PromoCodeID->CurrentValue;
         }
     } else {
         $this->PromoCodeID->ViewValue = NULL;
     }
     $this->PromoCodeID->CssStyle = "";
     $this->PromoCodeID->CssClass = "";
     $this->PromoCodeID->ViewCustomAttributes = "";
     // Sequence
     $this->Sequence->ViewValue = $this->Sequence->CurrentValue;
     $this->Sequence->CssStyle = "";
     $this->Sequence->CssClass = "";
     $this->Sequence->ViewCustomAttributes = "";
     // OrderID
     $this->OrderID->HrefValue = "";
     // CustomerID
     $this->CustomerID->HrefValue = "";
     // TransactionNumber
     $this->TransactionNumber->HrefValue = "";
     // DateOrdered
     $this->DateOrdered->HrefValue = "";
     // Total
     $this->Total->HrefValue = "";
     // DeliveryDate
     $this->DeliveryDate->HrefValue = "";
     // PromoCodeID
     $this->PromoCodeID->HrefValue = "";
     // Sequence
     $this->Sequence->HrefValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
 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_deuda
     // detalle
     // importe
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id_deuda
         if (strval($this->id_deuda->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
                 $rswrk->Close();
             } else {
                 $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
             }
         } else {
             $this->id_deuda->ViewValue = NULL;
         }
         $this->id_deuda->ViewCustomAttributes = "";
         // detalle
         $this->detalle->ViewValue = $this->detalle->CurrentValue;
         $this->detalle->ViewCustomAttributes = "";
         // importe
         $this->importe->ViewValue = $this->importe->CurrentValue;
         $this->importe->ViewValue = ew_FormatCurrency($this->importe->ViewValue, 2, -2, -2, -2);
         $this->importe->ViewCustomAttributes = "";
         // id_deuda
         $this->id_deuda->LinkCustomAttributes = "";
         $this->id_deuda->HrefValue = "";
         $this->id_deuda->TooltipValue = "";
         // detalle
         $this->detalle->LinkCustomAttributes = "";
         $this->detalle->HrefValue = "";
         $this->detalle->TooltipValue = "";
         // importe
         $this->importe->LinkCustomAttributes = "";
         $this->importe->HrefValue = "";
         $this->importe->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // id_deuda
         $this->id_deuda->EditAttrs["class"] = "form-control";
         $this->id_deuda->EditCustomAttributes = "";
         if ($this->id_deuda->getSessionValue() != "") {
             $this->id_deuda->CurrentValue = $this->id_deuda->getSessionValue();
             $this->id_deuda->OldValue = $this->id_deuda->CurrentValue;
             if (strval($this->id_deuda->CurrentValue) != "") {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                     $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                     $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
                     $rswrk->Close();
                 } else {
                     $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
                 }
             } else {
                 $this->id_deuda->ViewValue = NULL;
             }
             $this->id_deuda->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_deuda->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if (!$GLOBALS["detalle_deudas"]->UserIDAllow("gridcls")) {
                 $sWhereWrk = $GLOBALS["deudas"]->AddUserIDFilter($sWhereWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             $rowswrk = count($arwrk);
             for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
                 $arwrk[$rowcntwrk][3] = ew_FormatCurrency($arwrk[$rowcntwrk][3], 0, -2, -2, -2);
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_deuda->EditValue = $arwrk;
         }
         // detalle
         $this->detalle->EditAttrs["class"] = "form-control";
         $this->detalle->EditCustomAttributes = "";
         $this->detalle->EditValue = ew_HtmlEncode($this->detalle->CurrentValue);
         $this->detalle->PlaceHolder = ew_RemoveHtml($this->detalle->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);
             $this->importe->OldValue = $this->importe->EditValue;
         }
         // Edit refer script
         // id_deuda
         $this->id_deuda->HrefValue = "";
         // detalle
         $this->detalle->HrefValue = "";
         // importe
         $this->importe->HrefValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // id_deuda
         $this->id_deuda->EditAttrs["class"] = "form-control";
         $this->id_deuda->EditCustomAttributes = "";
         if ($this->id_deuda->getSessionValue() != "") {
             $this->id_deuda->CurrentValue = $this->id_deuda->getSessionValue();
             $this->id_deuda->OldValue = $this->id_deuda->CurrentValue;
             if (strval($this->id_deuda->CurrentValue) != "") {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                     $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                     $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
                     $rswrk->Close();
                 } else {
                     $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
                 }
             } else {
                 $this->id_deuda->ViewValue = NULL;
             }
             $this->id_deuda->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_deuda->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if (!$GLOBALS["detalle_deudas"]->UserIDAllow("gridcls")) {
                 $sWhereWrk = $GLOBALS["deudas"]->AddUserIDFilter($sWhereWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             $rowswrk = count($arwrk);
             for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
                 $arwrk[$rowcntwrk][3] = ew_FormatCurrency($arwrk[$rowcntwrk][3], 0, -2, -2, -2);
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_deuda->EditValue = $arwrk;
         }
         // detalle
         $this->detalle->EditAttrs["class"] = "form-control";
         $this->detalle->EditCustomAttributes = "";
         $this->detalle->EditValue = ew_HtmlEncode($this->detalle->CurrentValue);
         $this->detalle->PlaceHolder = ew_RemoveHtml($this->detalle->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);
             $this->importe->OldValue = $this->importe->EditValue;
         }
         // Edit refer script
         // id_deuda
         $this->id_deuda->HrefValue = "";
         // detalle
         $this->detalle->HrefValue = "";
         // importe
         $this->importe->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();
     }
 }
Exemplo n.º 12
0
 function RenderListRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // 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
     $this->id_usuario->CellCssStyle = "white-space: nowrap;";
     // codigo
     $this->codigo->ViewValue = $this->codigo->CurrentValue;
     $this->codigo->ViewCustomAttributes = "";
     // 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 = "";
     // id_usuario
     $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
     $this->id_usuario->ViewCustomAttributes = "";
     // codigo
     $this->codigo->LinkCustomAttributes = "";
     $this->codigo->HrefValue = "";
     $this->codigo->TooltipValue = "";
     // 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 = "";
     // id_usuario
     $this->id_usuario->LinkCustomAttributes = "";
     $this->id_usuario->HrefValue = "";
     $this->id_usuario->TooltipValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 13
0
 function RenderRow()
 {
     global $conn, $Security, $OrderDetails;
     // Call Row_Rendering event
     $OrderDetails->Row_Rendering();
     // Common render codes for all row types
     // OrderID
     $OrderDetails->OrderID->CellCssStyle = "";
     $OrderDetails->OrderID->CellCssClass = "";
     // CustomerID
     $OrderDetails->CustomerID->CellCssStyle = "";
     $OrderDetails->CustomerID->CellCssClass = "";
     // ItemID
     $OrderDetails->ItemID->CellCssStyle = "";
     $OrderDetails->ItemID->CellCssClass = "";
     // Count
     $OrderDetails->Count->CellCssStyle = "";
     $OrderDetails->Count->CellCssClass = "";
     // VegCount
     $OrderDetails->VegCount->CellCssStyle = "";
     $OrderDetails->VegCount->CellCssClass = "";
     // Amount
     $OrderDetails->Amount->CellCssStyle = "";
     $OrderDetails->Amount->CellCssClass = "";
     // Chefs_Tasting
     $OrderDetails->Chefs_Tasting->CellCssStyle = "";
     $OrderDetails->Chefs_Tasting->CellCssClass = "";
     if ($OrderDetails->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderDetailsID
         $OrderDetails->OrderDetailsID->ViewValue = $OrderDetails->OrderDetailsID->CurrentValue;
         $OrderDetails->OrderDetailsID->CssStyle = "";
         $OrderDetails->OrderDetailsID->CssClass = "";
         $OrderDetails->OrderDetailsID->ViewCustomAttributes = "";
         // OrderID
         $OrderDetails->OrderID->ViewValue = $OrderDetails->OrderID->CurrentValue;
         $OrderDetails->OrderID->CssStyle = "";
         $OrderDetails->OrderID->CssClass = "";
         $OrderDetails->OrderID->ViewCustomAttributes = "";
         // CustomerID
         if (strval($OrderDetails->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($OrderDetails->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $OrderDetails->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $OrderDetails->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $OrderDetails->CustomerID->ViewValue = $OrderDetails->CustomerID->CurrentValue;
             }
         } else {
             $OrderDetails->CustomerID->ViewValue = NULL;
         }
         $OrderDetails->CustomerID->CssStyle = "";
         $OrderDetails->CustomerID->CssClass = "";
         $OrderDetails->CustomerID->ViewCustomAttributes = "";
         // ItemID
         if (strval($OrderDetails->ItemID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE `ItemID` = " . ew_AdjustSql($OrderDetails->ItemID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $OrderDetails->ItemID->ViewValue = $rswrk->fields('ItemName');
                 $rswrk->Close();
             } else {
                 $OrderDetails->ItemID->ViewValue = $OrderDetails->ItemID->CurrentValue;
             }
         } else {
             $OrderDetails->ItemID->ViewValue = NULL;
         }
         $OrderDetails->ItemID->CssStyle = "";
         $OrderDetails->ItemID->CssClass = "";
         $OrderDetails->ItemID->ViewCustomAttributes = "";
         // Count
         $OrderDetails->Count->ViewValue = $OrderDetails->Count->CurrentValue;
         $OrderDetails->Count->CssStyle = "";
         $OrderDetails->Count->CssClass = "";
         $OrderDetails->Count->ViewCustomAttributes = "";
         // VegCount
         $OrderDetails->VegCount->ViewValue = $OrderDetails->VegCount->CurrentValue;
         $OrderDetails->VegCount->CssStyle = "";
         $OrderDetails->VegCount->CssClass = "";
         $OrderDetails->VegCount->ViewCustomAttributes = "";
         // Amount
         $OrderDetails->Amount->ViewValue = $OrderDetails->Amount->CurrentValue;
         $OrderDetails->Amount->ViewValue = ew_FormatCurrency($OrderDetails->Amount->ViewValue, 2, -2, 0, -2);
         $OrderDetails->Amount->CssStyle = "";
         $OrderDetails->Amount->CssClass = "";
         $OrderDetails->Amount->ViewCustomAttributes = "";
         // Chefs_Tasting
         if (strval($OrderDetails->Chefs_Tasting->CurrentValue) != "") {
             switch ($OrderDetails->Chefs_Tasting->CurrentValue) {
                 case "0":
                     $OrderDetails->Chefs_Tasting->ViewValue = "No";
                     break;
                 case "1":
                     $OrderDetails->Chefs_Tasting->ViewValue = "Yes";
                     break;
                 default:
                     $OrderDetails->Chefs_Tasting->ViewValue = $OrderDetails->Chefs_Tasting->CurrentValue;
             }
         } else {
             $OrderDetails->Chefs_Tasting->ViewValue = NULL;
         }
         $OrderDetails->Chefs_Tasting->CssStyle = "";
         $OrderDetails->Chefs_Tasting->CssClass = "";
         $OrderDetails->Chefs_Tasting->ViewCustomAttributes = "";
         // OrderID
         $OrderDetails->OrderID->HrefValue = "";
         // CustomerID
         $OrderDetails->CustomerID->HrefValue = "";
         // ItemID
         $OrderDetails->ItemID->HrefValue = "";
         // Count
         $OrderDetails->Count->HrefValue = "";
         // VegCount
         $OrderDetails->VegCount->HrefValue = "";
         // Amount
         $OrderDetails->Amount->HrefValue = "";
         // Chefs_Tasting
         $OrderDetails->Chefs_Tasting->HrefValue = "";
     } elseif ($OrderDetails->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // OrderID
         $OrderDetails->OrderID->EditCustomAttributes = "";
         if ($OrderDetails->OrderID->getSessionValue() != "") {
             $OrderDetails->OrderID->CurrentValue = $OrderDetails->OrderID->getSessionValue();
             $OrderDetails->OrderID->ViewValue = $OrderDetails->OrderID->CurrentValue;
             $OrderDetails->OrderID->CssStyle = "";
             $OrderDetails->OrderID->CssClass = "";
             $OrderDetails->OrderID->ViewCustomAttributes = "";
         } else {
             $OrderDetails->OrderID->EditValue = ew_HtmlEncode($OrderDetails->OrderID->CurrentValue);
         }
         // CustomerID
         $OrderDetails->CustomerID->EditCustomAttributes = "";
         if ($OrderDetails->CustomerID->getSessionValue() != "") {
             $OrderDetails->CustomerID->CurrentValue = $OrderDetails->CustomerID->getSessionValue();
             if (strval($OrderDetails->CustomerID->CurrentValue) != "") {
                 $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($OrderDetails->CustomerID->CurrentValue) . "";
                 $sSqlWrk .= " ORDER BY `LastName` Asc";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup value(s) found
                     $OrderDetails->CustomerID->ViewValue = $rswrk->fields('LastName');
                     $OrderDetails->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                     $rswrk->Close();
                 } else {
                     $OrderDetails->CustomerID->ViewValue = $OrderDetails->CustomerID->CurrentValue;
                 }
             } else {
                 $OrderDetails->CustomerID->ViewValue = NULL;
             }
             $OrderDetails->CustomerID->CssStyle = "";
             $OrderDetails->CustomerID->CssClass = "";
             $OrderDetails->CustomerID->ViewCustomAttributes = "";
         } else {
             $sSqlWrk = "SELECT `CustomerID`, `LastName`, `FirstName`, '' AS SelectFilterFld FROM `Customers`";
             $sWhereWrk = "";
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE {$sWhereWrk}";
             }
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", "Please Select", ""));
             $OrderDetails->CustomerID->EditValue = $arwrk;
         }
         // ItemID
         $OrderDetails->ItemID->EditCustomAttributes = "";
         if ($OrderDetails->ItemID->getSessionValue() != "") {
             $OrderDetails->ItemID->CurrentValue = $OrderDetails->ItemID->getSessionValue();
             if (strval($OrderDetails->ItemID->CurrentValue) != "") {
                 $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE `ItemID` = " . ew_AdjustSql($OrderDetails->ItemID->CurrentValue) . "";
                 $sSqlWrk .= " ORDER BY `ItemName` Asc";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup value(s) found
                     $OrderDetails->ItemID->ViewValue = $rswrk->fields('ItemName');
                     $rswrk->Close();
                 } else {
                     $OrderDetails->ItemID->ViewValue = $OrderDetails->ItemID->CurrentValue;
                 }
             } else {
                 $OrderDetails->ItemID->ViewValue = NULL;
             }
             $OrderDetails->ItemID->CssStyle = "";
             $OrderDetails->ItemID->CssClass = "";
             $OrderDetails->ItemID->ViewCustomAttributes = "";
         } else {
             $sSqlWrk = "SELECT `ItemID`, `ItemName`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `Items`";
             $sWhereWrk = "";
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE {$sWhereWrk}";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", "Please Select"));
             $OrderDetails->ItemID->EditValue = $arwrk;
         }
         // Count
         $OrderDetails->Count->EditCustomAttributes = "";
         $OrderDetails->Count->EditValue = ew_HtmlEncode($OrderDetails->Count->CurrentValue);
         // VegCount
         $OrderDetails->VegCount->EditCustomAttributes = "";
         $OrderDetails->VegCount->EditValue = ew_HtmlEncode($OrderDetails->VegCount->CurrentValue);
         // Amount
         $OrderDetails->Amount->EditCustomAttributes = "";
         $OrderDetails->Amount->EditValue = ew_HtmlEncode($OrderDetails->Amount->CurrentValue);
         // Chefs_Tasting
         $OrderDetails->Chefs_Tasting->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array("0", "No");
         $arwrk[] = array("1", "Yes");
         $OrderDetails->Chefs_Tasting->EditValue = $arwrk;
     }
     // Call Row Rendered event
     $OrderDetails->Row_Rendered();
 }
Exemplo n.º 14
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     $this->SetupOtherOptions();
     // 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 = "";
         // 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 = "";
         // 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 = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 15
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
     $this->id_usuario->CellCssStyle = "white-space: nowrap;";
     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 = "";
         // id_usuario
         $this->id_usuario->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // 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 = "";
         // id_usuario
         $this->id_usuario->LinkCustomAttributes = "";
         $this->id_usuario->HrefValue = "";
         $this->id_usuario->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 16
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();
     }
 }
Exemplo n.º 17
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();
     }
 }
Exemplo n.º 18
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();
     }
 }
Exemplo n.º 19
0
 function RenderRow()
 {
     global $conn, $Security, $Orders;
     // Call Row_Rendering event
     $Orders->Row_Rendering();
     // Common render codes for all row types
     // OrderID
     $Orders->OrderID->CellCssStyle = "";
     $Orders->OrderID->CellCssClass = "";
     // CustomerID
     $Orders->CustomerID->CellCssStyle = "";
     $Orders->CustomerID->CellCssClass = "";
     // TransactionNumber
     $Orders->TransactionNumber->CellCssStyle = "";
     $Orders->TransactionNumber->CellCssClass = "";
     // DateOrdered
     $Orders->DateOrdered->CellCssStyle = "";
     $Orders->DateOrdered->CellCssClass = "";
     // Total
     $Orders->Total->CellCssStyle = "";
     $Orders->Total->CellCssClass = "";
     // DeliveryDate
     $Orders->DeliveryDate->CellCssStyle = "";
     $Orders->DeliveryDate->CellCssClass = "";
     // PromoCodeID
     $Orders->PromoCodeID->CellCssStyle = "";
     $Orders->PromoCodeID->CellCssClass = "";
     // Sequence
     $Orders->Sequence->CellCssStyle = "";
     $Orders->Sequence->CellCssClass = "";
     if ($Orders->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderID
         $Orders->OrderID->ViewValue = $Orders->OrderID->CurrentValue;
         $Orders->OrderID->CssStyle = "";
         $Orders->OrderID->CssClass = "";
         $Orders->OrderID->ViewCustomAttributes = "";
         // CustomerID
         if (strval($Orders->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Orders->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $Orders->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $Orders->CustomerID->ViewValue = $Orders->CustomerID->CurrentValue;
             }
         } else {
             $Orders->CustomerID->ViewValue = NULL;
         }
         $Orders->CustomerID->CssStyle = "";
         $Orders->CustomerID->CssClass = "";
         $Orders->CustomerID->ViewCustomAttributes = "";
         // TransactionNumber
         $Orders->TransactionNumber->ViewValue = $Orders->TransactionNumber->CurrentValue;
         $Orders->TransactionNumber->CssStyle = "";
         $Orders->TransactionNumber->CssClass = "";
         $Orders->TransactionNumber->ViewCustomAttributes = "";
         // DateOrdered
         $Orders->DateOrdered->ViewValue = $Orders->DateOrdered->CurrentValue;
         $Orders->DateOrdered->ViewValue = ew_FormatDateTime($Orders->DateOrdered->ViewValue, 6);
         $Orders->DateOrdered->CssStyle = "";
         $Orders->DateOrdered->CssClass = "";
         $Orders->DateOrdered->ViewCustomAttributes = "";
         // Total
         $Orders->Total->ViewValue = $Orders->Total->CurrentValue;
         $Orders->Total->ViewValue = ew_FormatCurrency($Orders->Total->ViewValue, 2, -2, 0, -2);
         $Orders->Total->CssStyle = "";
         $Orders->Total->CssClass = "";
         $Orders->Total->ViewCustomAttributes = "";
         // DeliveryDate
         $Orders->DeliveryDate->ViewValue = $Orders->DeliveryDate->CurrentValue;
         $Orders->DeliveryDate->ViewValue = ew_FormatDateTime($Orders->DeliveryDate->ViewValue, 6);
         $Orders->DeliveryDate->CssStyle = "";
         $Orders->DeliveryDate->CssClass = "";
         $Orders->DeliveryDate->ViewCustomAttributes = "";
         // PromoCodeID
         if (strval($Orders->PromoCodeID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `PromoCodeName` FROM `PromoCodes` WHERE `PromoCodeID` = " . ew_AdjustSql($Orders->PromoCodeID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->PromoCodeID->ViewValue = $rswrk->fields('PromoCodeName');
                 $rswrk->Close();
             } else {
                 $Orders->PromoCodeID->ViewValue = $Orders->PromoCodeID->CurrentValue;
             }
         } else {
             $Orders->PromoCodeID->ViewValue = NULL;
         }
         $Orders->PromoCodeID->CssStyle = "";
         $Orders->PromoCodeID->CssClass = "";
         $Orders->PromoCodeID->ViewCustomAttributes = "";
         // Sequence
         $Orders->Sequence->ViewValue = $Orders->Sequence->CurrentValue;
         $Orders->Sequence->CssStyle = "";
         $Orders->Sequence->CssClass = "";
         $Orders->Sequence->ViewCustomAttributes = "";
         // OrderID
         $Orders->OrderID->HrefValue = "";
         // CustomerID
         $Orders->CustomerID->HrefValue = "";
         // TransactionNumber
         $Orders->TransactionNumber->HrefValue = "";
         // DateOrdered
         $Orders->DateOrdered->HrefValue = "";
         // Total
         $Orders->Total->HrefValue = "";
         // DeliveryDate
         $Orders->DeliveryDate->HrefValue = "";
         // PromoCodeID
         $Orders->PromoCodeID->HrefValue = "";
         // Sequence
         $Orders->Sequence->HrefValue = "";
     } elseif ($Orders->RowType == EW_ROWTYPE_SEARCH) {
         // Search row
         // OrderID
         $Orders->OrderID->EditCustomAttributes = "";
         $Orders->OrderID->EditValue = ew_HtmlEncode($Orders->OrderID->AdvancedSearch->SearchValue);
         // CustomerID
         $Orders->CustomerID->EditCustomAttributes = "";
         $Orders->CustomerID->EditCustomAttributes = "";
         // TransactionNumber
         $Orders->TransactionNumber->EditCustomAttributes = "";
         $Orders->TransactionNumber->EditValue = ew_HtmlEncode($Orders->TransactionNumber->AdvancedSearch->SearchValue);
         $Orders->TransactionNumber->EditCustomAttributes = "";
         $Orders->TransactionNumber->EditValue2 = ew_HtmlEncode($Orders->TransactionNumber->AdvancedSearch->SearchValue2);
         // DateOrdered
         $Orders->DateOrdered->EditCustomAttributes = "";
         $Orders->DateOrdered->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DateOrdered->AdvancedSearch->SearchValue, 6), 6));
         $Orders->DateOrdered->EditCustomAttributes = "";
         $Orders->DateOrdered->EditValue2 = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DateOrdered->AdvancedSearch->SearchValue2, 6), 6));
         // Total
         $Orders->Total->EditCustomAttributes = "";
         $Orders->Total->EditValue = ew_HtmlEncode($Orders->Total->AdvancedSearch->SearchValue);
         // DeliveryDate
         $Orders->DeliveryDate->EditCustomAttributes = "";
         $Orders->DeliveryDate->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DeliveryDate->AdvancedSearch->SearchValue, 6), 6));
         // PromoCodeID
         $Orders->PromoCodeID->EditCustomAttributes = "";
         // Sequence
         $Orders->Sequence->EditCustomAttributes = "";
         $Orders->Sequence->EditValue = ew_HtmlEncode($Orders->Sequence->AdvancedSearch->SearchValue);
     }
     // Call Row Rendered event
     $Orders->Row_Rendered();
 }
Exemplo n.º 20
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();
     // Convert decimal values if posted back
     if ($this->total_gasto->FormValue == $this->total_gasto->CurrentValue && is_numeric(ew_StrToFloat($this->total_gasto->CurrentValue))) {
         $this->total_gasto->CurrentValue = ew_StrToFloat($this->total_gasto->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // responsable
     // cuit_cuil
     // razon_social
     // Patente
     // marca
     // Tipo_carga
     // Origen
     // prov_desde
     // loc_desde
     // cp_desde
     // Destino
     // prov_hasta
     // loc_hasta
     // cp_hasta
     // fecha_ini
     // Km_ini
     // fecha_fin
     // km_fin
     // estado
     // nom_chofer
     // nom_guarda
     // total_gasto
     // Accumulate aggregate value
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT && $this->RowType != EW_ROWTYPE_AGGREGATE) {
         if (is_numeric($this->total_gasto->CurrentValue)) {
             $this->total_gasto->Total += $this->total_gasto->CurrentValue;
         }
         // Accumulate total
     }
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // responsable
         $this->responsable->ViewValue = $this->responsable->CurrentValue;
         $this->responsable->ViewCustomAttributes = "";
         // cuit_cuil
         $this->cuit_cuil->ViewValue = $this->cuit_cuil->CurrentValue;
         $this->cuit_cuil->ViewCustomAttributes = "";
         // razon_social
         $this->razon_social->ViewValue = $this->razon_social->CurrentValue;
         $this->razon_social->ViewCustomAttributes = "";
         // Patente
         $this->Patente->ViewValue = $this->Patente->CurrentValue;
         $this->Patente->ViewCustomAttributes = "";
         // marca
         $this->marca->ViewValue = $this->marca->CurrentValue;
         $this->marca->ViewCustomAttributes = "";
         // Tipo_carga
         $this->Tipo_carga->ViewValue = $this->Tipo_carga->CurrentValue;
         $this->Tipo_carga->ViewCustomAttributes = "";
         // Origen
         $this->Origen->ViewValue = $this->Origen->CurrentValue;
         $this->Origen->ViewCustomAttributes = "";
         // prov_desde
         $this->prov_desde->ViewValue = $this->prov_desde->CurrentValue;
         $this->prov_desde->ViewCustomAttributes = "";
         // loc_desde
         $this->loc_desde->ViewValue = $this->loc_desde->CurrentValue;
         $this->loc_desde->ViewCustomAttributes = "";
         // cp_desde
         $this->cp_desde->ViewValue = $this->cp_desde->CurrentValue;
         $this->cp_desde->ViewCustomAttributes = "";
         // Destino
         $this->Destino->ViewValue = $this->Destino->CurrentValue;
         $this->Destino->ViewCustomAttributes = "";
         // prov_hasta
         $this->prov_hasta->ViewValue = $this->prov_hasta->CurrentValue;
         $this->prov_hasta->ViewCustomAttributes = "";
         // loc_hasta
         $this->loc_hasta->ViewValue = $this->loc_hasta->CurrentValue;
         $this->loc_hasta->ViewCustomAttributes = "";
         // cp_hasta
         $this->cp_hasta->ViewValue = $this->cp_hasta->CurrentValue;
         $this->cp_hasta->ViewCustomAttributes = "";
         // 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 = "";
         // Km_ini
         $this->Km_ini->ViewValue = $this->Km_ini->CurrentValue;
         $this->Km_ini->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 = "";
         // km_fin
         $this->km_fin->ViewValue = $this->km_fin->CurrentValue;
         $this->km_fin->ViewCustomAttributes = "";
         // estado
         $this->estado->ViewValue = $this->estado->CurrentValue;
         $this->estado->ViewCustomAttributes = "";
         // nom_chofer
         $this->nom_chofer->ViewValue = $this->nom_chofer->CurrentValue;
         $this->nom_chofer->ViewCustomAttributes = "";
         // nom_guarda
         $this->nom_guarda->ViewValue = $this->nom_guarda->CurrentValue;
         $this->nom_guarda->ViewCustomAttributes = "";
         // total_gasto
         $this->total_gasto->ViewValue = $this->total_gasto->CurrentValue;
         $this->total_gasto->ViewValue = ew_FormatCurrency($this->total_gasto->ViewValue, 0, -2, -2, -2);
         $this->total_gasto->ViewCustomAttributes = "";
         // responsable
         $this->responsable->LinkCustomAttributes = "";
         $this->responsable->HrefValue = "";
         $this->responsable->TooltipValue = "";
         // cuit_cuil
         $this->cuit_cuil->LinkCustomAttributes = "";
         $this->cuit_cuil->HrefValue = "";
         $this->cuit_cuil->TooltipValue = "";
         // razon_social
         $this->razon_social->LinkCustomAttributes = "";
         $this->razon_social->HrefValue = "";
         $this->razon_social->TooltipValue = "";
         // Patente
         $this->Patente->LinkCustomAttributes = "";
         $this->Patente->HrefValue = "";
         $this->Patente->TooltipValue = "";
         // marca
         $this->marca->LinkCustomAttributes = "";
         $this->marca->HrefValue = "";
         $this->marca->TooltipValue = "";
         // Tipo_carga
         $this->Tipo_carga->LinkCustomAttributes = "";
         $this->Tipo_carga->HrefValue = "";
         $this->Tipo_carga->TooltipValue = "";
         // Origen
         $this->Origen->LinkCustomAttributes = "";
         $this->Origen->HrefValue = "";
         $this->Origen->TooltipValue = "";
         // prov_desde
         $this->prov_desde->LinkCustomAttributes = "";
         $this->prov_desde->HrefValue = "";
         $this->prov_desde->TooltipValue = "";
         // loc_desde
         $this->loc_desde->LinkCustomAttributes = "";
         $this->loc_desde->HrefValue = "";
         $this->loc_desde->TooltipValue = "";
         // cp_desde
         $this->cp_desde->LinkCustomAttributes = "";
         $this->cp_desde->HrefValue = "";
         $this->cp_desde->TooltipValue = "";
         // Destino
         $this->Destino->LinkCustomAttributes = "";
         $this->Destino->HrefValue = "";
         $this->Destino->TooltipValue = "";
         // prov_hasta
         $this->prov_hasta->LinkCustomAttributes = "";
         $this->prov_hasta->HrefValue = "";
         $this->prov_hasta->TooltipValue = "";
         // loc_hasta
         $this->loc_hasta->LinkCustomAttributes = "";
         $this->loc_hasta->HrefValue = "";
         $this->loc_hasta->TooltipValue = "";
         // cp_hasta
         $this->cp_hasta->LinkCustomAttributes = "";
         $this->cp_hasta->HrefValue = "";
         $this->cp_hasta->TooltipValue = "";
         // fecha_ini
         $this->fecha_ini->LinkCustomAttributes = "";
         $this->fecha_ini->HrefValue = "";
         $this->fecha_ini->TooltipValue = "";
         // Km_ini
         $this->Km_ini->LinkCustomAttributes = "";
         $this->Km_ini->HrefValue = "";
         $this->Km_ini->TooltipValue = "";
         // fecha_fin
         $this->fecha_fin->LinkCustomAttributes = "";
         $this->fecha_fin->HrefValue = "";
         $this->fecha_fin->TooltipValue = "";
         // km_fin
         $this->km_fin->LinkCustomAttributes = "";
         $this->km_fin->HrefValue = "";
         $this->km_fin->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
         // nom_chofer
         $this->nom_chofer->LinkCustomAttributes = "";
         $this->nom_chofer->HrefValue = "";
         $this->nom_chofer->TooltipValue = "";
         // nom_guarda
         $this->nom_guarda->LinkCustomAttributes = "";
         $this->nom_guarda->HrefValue = "";
         $this->nom_guarda->TooltipValue = "";
         // total_gasto
         $this->total_gasto->LinkCustomAttributes = "";
         $this->total_gasto->HrefValue = "";
         $this->total_gasto->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_AGGREGATEINIT) {
         // Initialize aggregate row
         $this->total_gasto->Total = 0;
         // Initialize total
     } elseif ($this->RowType == EW_ROWTYPE_AGGREGATE) {
         // Aggregate row
         $this->total_gasto->CurrentValue = $this->total_gasto->Total;
         $this->total_gasto->ViewValue = $this->total_gasto->CurrentValue;
         $this->total_gasto->ViewValue = ew_FormatCurrency($this->total_gasto->ViewValue, 0, -2, -2, -2);
         $this->total_gasto->ViewCustomAttributes = "";
         $this->total_gasto->HrefValue = "";
         // Clear href value
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 21
0
 function RenderRow()
 {
     global $conn, $Security, $Items;
     // Call Row_Rendering event
     $Items->Row_Rendering();
     // Common render codes for all row types
     // ItemID
     $Items->ItemID->CellCssStyle = "";
     $Items->ItemID->CellCssClass = "";
     // MenuID
     $Items->MenuID->CellCssStyle = "";
     $Items->MenuID->CellCssClass = "";
     // ItemName
     $Items->ItemName->CellCssStyle = "";
     $Items->ItemName->CellCssClass = "";
     // Description
     $Items->Description->CellCssStyle = "";
     $Items->Description->CellCssClass = "";
     // Price
     $Items->Price->CellCssStyle = "";
     $Items->Price->CellCssClass = "";
     // Image
     $Items->Image->CellCssStyle = "";
     $Items->Image->CellCssClass = "";
     // Vegetarian
     $Items->Vegetarian->CellCssStyle = "";
     $Items->Vegetarian->CellCssClass = "";
     // Vegetarian_Price
     $Items->Vegetarian_Price->CellCssStyle = "";
     $Items->Vegetarian_Price->CellCssClass = "";
     // Color
     $Items->Color->CellCssStyle = "";
     $Items->Color->CellCssClass = "";
     // Sequence
     $Items->Sequence->CellCssStyle = "";
     $Items->Sequence->CellCssClass = "";
     // PDF
     $Items->PDF->CellCssStyle = "";
     $Items->PDF->CellCssClass = "";
     // Active
     $Items->Active->CellCssStyle = "";
     $Items->Active->CellCssClass = "";
     if ($Items->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // ItemID
         $Items->ItemID->ViewValue = $Items->ItemID->CurrentValue;
         $Items->ItemID->CssStyle = "";
         $Items->ItemID->CssClass = "";
         $Items->ItemID->ViewCustomAttributes = "";
         // MenuID
         if (strval($Items->MenuID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `MenuName` FROM `Menus` WHERE `MenuID` = " . ew_AdjustSql($Items->MenuID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `MenuName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Items->MenuID->ViewValue = $rswrk->fields('MenuName');
                 $rswrk->Close();
             } else {
                 $Items->MenuID->ViewValue = $Items->MenuID->CurrentValue;
             }
         } else {
             $Items->MenuID->ViewValue = NULL;
         }
         $Items->MenuID->CssStyle = "";
         $Items->MenuID->CssClass = "";
         $Items->MenuID->ViewCustomAttributes = "";
         // ItemName
         $Items->ItemName->ViewValue = $Items->ItemName->CurrentValue;
         $Items->ItemName->CssStyle = "";
         $Items->ItemName->CssClass = "";
         $Items->ItemName->ViewCustomAttributes = "";
         // Description
         $Items->Description->ViewValue = ew_TruncateMemo($Items->Description->CurrentValue, 5);
         if (!is_null($Items->Description->ViewValue)) {
             $Items->Description->ViewValue = str_replace("\n", "<br>", $Items->Description->ViewValue);
         }
         $Items->Description->CssStyle = "";
         $Items->Description->CssClass = "";
         $Items->Description->ViewCustomAttributes = "";
         // Price
         $Items->Price->ViewValue = $Items->Price->CurrentValue;
         $Items->Price->ViewValue = ew_FormatCurrency($Items->Price->ViewValue, 2, -2, 0, -2);
         $Items->Price->CssStyle = "";
         $Items->Price->CssClass = "";
         $Items->Price->ViewCustomAttributes = "";
         // Image
         if (!is_null($Items->Image->Upload->DbValue)) {
             $Items->Image->ViewValue = $Items->Image->Upload->DbValue;
             $Items->Image->ImageAlt = "";
         } else {
             $Items->Image->ViewValue = "";
         }
         $Items->Image->CssStyle = "";
         $Items->Image->CssClass = "";
         $Items->Image->ViewCustomAttributes = "";
         // Vegetarian
         if (strval($Items->Vegetarian->CurrentValue) != "") {
             switch ($Items->Vegetarian->CurrentValue) {
                 case "0":
                     $Items->Vegetarian->ViewValue = "No";
                     break;
                 case "1":
                     $Items->Vegetarian->ViewValue = "Yes";
                     break;
                 default:
                     $Items->Vegetarian->ViewValue = $Items->Vegetarian->CurrentValue;
             }
         } else {
             $Items->Vegetarian->ViewValue = NULL;
         }
         $Items->Vegetarian->CssStyle = "";
         $Items->Vegetarian->CssClass = "";
         $Items->Vegetarian->ViewCustomAttributes = "";
         // Vegetarian_Price
         $Items->Vegetarian_Price->ViewValue = $Items->Vegetarian_Price->CurrentValue;
         $Items->Vegetarian_Price->ViewValue = ew_FormatCurrency($Items->Vegetarian_Price->ViewValue, 2, -2, 0, -2);
         $Items->Vegetarian_Price->CssStyle = "";
         $Items->Vegetarian_Price->CssClass = "";
         $Items->Vegetarian_Price->ViewCustomAttributes = "";
         // Color
         $Items->Color->ViewValue = $Items->Color->CurrentValue;
         $Items->Color->CssStyle = "";
         $Items->Color->CssClass = "";
         $Items->Color->ViewCustomAttributes = "";
         // Sequence
         $Items->Sequence->ViewValue = $Items->Sequence->CurrentValue;
         $Items->Sequence->CssStyle = "";
         $Items->Sequence->CssClass = "";
         $Items->Sequence->ViewCustomAttributes = "";
         // PDF
         if (!is_null($Items->PDF->Upload->DbValue)) {
             $Items->PDF->ViewValue = $Items->PDF->Upload->DbValue;
         } else {
             $Items->PDF->ViewValue = "";
         }
         $Items->PDF->CssStyle = "";
         $Items->PDF->CssClass = "";
         $Items->PDF->ViewCustomAttributes = "";
         // Active
         if (strval($Items->Active->CurrentValue) != "") {
             switch ($Items->Active->CurrentValue) {
                 case "0":
                     $Items->Active->ViewValue = "No";
                     break;
                 case "1":
                     $Items->Active->ViewValue = "Yes";
                     break;
                 default:
                     $Items->Active->ViewValue = $Items->Active->CurrentValue;
             }
         } else {
             $Items->Active->ViewValue = NULL;
         }
         $Items->Active->CssStyle = "";
         $Items->Active->CssClass = "";
         $Items->Active->ViewCustomAttributes = "";
         // ItemID
         $Items->ItemID->HrefValue = "";
         // MenuID
         $Items->MenuID->HrefValue = "";
         // ItemName
         $Items->ItemName->HrefValue = "";
         // Description
         $Items->Description->HrefValue = "";
         // Price
         $Items->Price->HrefValue = "";
         // Image
         $Items->Image->HrefValue = "";
         // Vegetarian
         $Items->Vegetarian->HrefValue = "";
         // Vegetarian_Price
         $Items->Vegetarian_Price->HrefValue = "";
         // Color
         $Items->Color->HrefValue = "";
         // Sequence
         $Items->Sequence->HrefValue = "";
         // PDF
         if (!is_null($Items->PDF->Upload->DbValue)) {
             $Items->PDF->HrefValue = ew_UploadPathEx(FALSE, "../recipes/") . (!empty($Items->PDF->ViewValue) ? $Items->PDF->ViewValue : $Items->PDF->CurrentValue);
             if ($Items->Export != "") {
                 $Items->PDF->HrefValue = ew_ConvertFullUrl($Items->PDF->HrefValue);
             }
         } else {
             $Items->PDF->HrefValue = "";
         }
         // Active
         $Items->Active->HrefValue = "";
     }
     // Call Row Rendered event
     $Items->Row_Rendered();
 }
 function AggregateListRow()
 {
     $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
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 23
0
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // 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`, `socio_nro` AS `DispFld`, `propietario` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $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 {
     }
     // id_montos
     $this->id_montos->EditAttrs["class"] = "form-control";
     $this->id_montos->EditCustomAttributes = "";
     if ($this->id_montos->getSessionValue() != "") {
         $this->id_montos->CurrentValue = $this->id_montos->getSessionValue();
         if (strval($this->id_montos->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_montos->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `descripcion` AS `DispFld`, `importe` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `montos`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_montos, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_montos->ViewValue = $rswrk->fields('DispFld');
                 $this->id_montos->ViewValue .= ew_ValueSeparator(1, $this->id_montos) . ew_FormatCurrency($rswrk->fields('Disp2Fld'), 0, -2, -2, -2);
                 $rswrk->Close();
             } else {
                 $this->id_montos->ViewValue = $this->id_montos->CurrentValue;
             }
         } else {
             $this->id_montos->ViewValue = NULL;
         }
         $this->id_montos->ViewCustomAttributes = "";
     } else {
     }
     // id_usuario
     // 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());
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 24
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 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();
     }
 }
Exemplo n.º 26
0
 function AggregateListRow()
 {
     $this->precio->CurrentValue = $this->precio->Total;
     $this->precio->ViewValue = $this->precio->CurrentValue;
     $this->precio->ViewValue = ew_FormatCurrency($this->precio->ViewValue, 2, -2, -2, -2);
     $this->precio->ViewCustomAttributes = "";
     $this->precio->HrefValue = "";
     // Clear href value
     $this->entrega->CurrentValue = $this->entrega->Total;
     $this->entrega->ViewValue = $this->entrega->CurrentValue;
     $this->entrega->ViewValue = ew_FormatCurrency($this->entrega->ViewValue, 2, -2, -2, -2);
     $this->entrega->ViewCustomAttributes = "";
     $this->entrega->HrefValue = "";
     // Clear href value
     $this->saldo->CurrentValue = $this->saldo->Total;
     $this->saldo->ViewValue = $this->saldo->CurrentValue;
     $this->saldo->ViewValue = ew_FormatCurrency($this->saldo->ViewValue, 2, -2, -2, -2);
     $this->saldo->ViewCustomAttributes = "";
     $this->saldo->HrefValue = "";
     // Clear href value
 }
Exemplo n.º 27
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();
     }
 }
Exemplo n.º 28
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();
     // 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 = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // 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 = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 29
0
 function RenderRow()
 {
     global $conn, $Security, $ZipCode;
     // Call Row_Rendering event
     $ZipCode->Row_Rendering();
     // Common render codes for all row types
     // ZipCode
     $ZipCode->ZipCode->CellCssStyle = "";
     $ZipCode->ZipCode->CellCssClass = "";
     // Status
     $ZipCode->Status->CellCssStyle = "";
     $ZipCode->Status->CellCssClass = "";
     // MonthlyRequest
     $ZipCode->MonthlyRequest->CellCssStyle = "";
     $ZipCode->MonthlyRequest->CellCssClass = "";
     // MinOrder
     $ZipCode->MinOrder->CellCssStyle = "";
     $ZipCode->MinOrder->CellCssClass = "";
     // Delivery
     $ZipCode->Delivery->CellCssStyle = "";
     $ZipCode->Delivery->CellCssClass = "";
     // Message
     $ZipCode->Message->CellCssStyle = "";
     $ZipCode->Message->CellCssClass = "";
     if ($ZipCode->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // ZipCode
         $ZipCode->ZipCode->ViewValue = $ZipCode->ZipCode->CurrentValue;
         $ZipCode->ZipCode->CssStyle = "";
         $ZipCode->ZipCode->CssClass = "";
         $ZipCode->ZipCode->ViewCustomAttributes = "";
         // Status
         if (strval($ZipCode->Status->CurrentValue) != "") {
             switch ($ZipCode->Status->CurrentValue) {
                 case "1":
                     $ZipCode->Status->ViewValue = "Green";
                     break;
                 case "2":
                     $ZipCode->Status->ViewValue = "Yellow";
                     break;
                 default:
                     $ZipCode->Status->ViewValue = $ZipCode->Status->CurrentValue;
             }
         } else {
             $ZipCode->Status->ViewValue = NULL;
         }
         $ZipCode->Status->CssStyle = "";
         $ZipCode->Status->CssClass = "";
         $ZipCode->Status->ViewCustomAttributes = "";
         // MonthlyRequest
         $ZipCode->MonthlyRequest->ViewValue = $ZipCode->MonthlyRequest->CurrentValue;
         $ZipCode->MonthlyRequest->CssStyle = "";
         $ZipCode->MonthlyRequest->CssClass = "";
         $ZipCode->MonthlyRequest->ViewCustomAttributes = "";
         // MinOrder
         $ZipCode->MinOrder->ViewValue = $ZipCode->MinOrder->CurrentValue;
         $ZipCode->MinOrder->ViewValue = ew_FormatCurrency($ZipCode->MinOrder->ViewValue, 2, -2, 0, -2);
         $ZipCode->MinOrder->CssStyle = "";
         $ZipCode->MinOrder->CssClass = "";
         $ZipCode->MinOrder->ViewCustomAttributes = "";
         // Delivery
         $ZipCode->Delivery->ViewValue = $ZipCode->Delivery->CurrentValue;
         $ZipCode->Delivery->ViewValue = ew_FormatCurrency($ZipCode->Delivery->ViewValue, 2, -2, 0, -2);
         $ZipCode->Delivery->CssStyle = "";
         $ZipCode->Delivery->CssClass = "";
         $ZipCode->Delivery->ViewCustomAttributes = "";
         // Message
         $ZipCode->Message->ViewValue = $ZipCode->Message->CurrentValue;
         $ZipCode->Message->CssStyle = "";
         $ZipCode->Message->CssClass = "";
         $ZipCode->Message->ViewCustomAttributes = "";
         // ZipCode
         $ZipCode->ZipCode->HrefValue = "";
         // Status
         $ZipCode->Status->HrefValue = "";
         // MonthlyRequest
         $ZipCode->MonthlyRequest->HrefValue = "";
         // MinOrder
         $ZipCode->MinOrder->HrefValue = "";
         // Delivery
         $ZipCode->Delivery->HrefValue = "";
         // Message
         $ZipCode->Message->HrefValue = "";
     }
     // Call Row Rendered event
     $ZipCode->Row_Rendered();
 }
Exemplo n.º 30
0
 function AggregateListRow()
 {
     $this->total_gasto->CurrentValue = $this->total_gasto->Total;
     $this->total_gasto->ViewValue = $this->total_gasto->CurrentValue;
     $this->total_gasto->ViewValue = ew_FormatCurrency($this->total_gasto->ViewValue, 0, -2, -2, -2);
     $this->total_gasto->ViewCustomAttributes = "";
     $this->total_gasto->HrefValue = "";
     // Clear href value
     // Call Row Rendered event
     $this->Row_Rendered();
 }