-- personalizar kilometraje
This commit is contained in:
@@ -573,7 +573,12 @@
|
|||||||
<asp:Literal ID="LtlUsoCFDI" runat="server" Text='<%# Eval("UsoCFDI") %>'></asp:Literal>
|
<asp:Literal ID="LtlUsoCFDI" runat="server" Text='<%# Eval("UsoCFDI") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%-- 39--%>
|
||||||
|
<asp:TemplateField HeaderText="Km" Visible="false">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlKm" runat="server" Text='<%# Eval("Kilometraje") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
@@ -716,6 +721,11 @@
|
|||||||
<td style="text-align: left;"><asp:CheckBox ID="ChkUsoCFDI" runat="server" Text=" Uso CFDI" Checked="false" /></td>
|
<td style="text-align: left;"><asp:CheckBox ID="ChkUsoCFDI" runat="server" Text=" Uso CFDI" Checked="false" /></td>
|
||||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text=" Se envió Mail" /></td>
|
<td style="text-align: left;"><asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text=" Se envió Mail" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: left;"></td>
|
||||||
|
<td style="text-align: left;"> </td>
|
||||||
|
<td style="text-align: left;"><asp:CheckBox ID="ChkKilometraje" runat="server" Visible="False" Text=" Kilometraje" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ Partial Class RepVentaDetalle
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaClientes()
|
Private Sub CargaClientes()
|
||||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
If EsWS Then
|
If EsWS Then
|
||||||
DdlClientes.setEsWebService(True)
|
DdlClientes.setEsWebService(True)
|
||||||
Else
|
Else
|
||||||
@@ -384,14 +384,14 @@ Partial Class RepVentaDetalle
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
Dim AnioMes = "-1" ' If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
|
Dim AnioMes As String = "-1" ' If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
|
||||||
Dim Fecha = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString
|
Dim Fecha As String = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString
|
||||||
Dim IVA = If(Request("IVA") IsNot Nothing, Request("IVA").ToString, "-1").ToString
|
Dim IVA As String = If(Request("IVA") IsNot Nothing, Request("IVA").ToString, "-1").ToString
|
||||||
|
|
||||||
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date
|
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date
|
||||||
Dim Anio = If(Request("Anio") IsNot Nothing, Request("Anio").ToString, "-1").ToString
|
Dim Anio As String = If(Request("Anio") IsNot Nothing, Request("Anio").ToString, "-1").ToString
|
||||||
Dim Mes = If(Request("Mes") IsNot Nothing, Request("Mes").ToString, "-1").ToString
|
Dim Mes As String = If(Request("Mes") IsNot Nothing, Request("Mes").ToString, "-1").ToString
|
||||||
Dim CveCorte = If(Request("CveCorte") IsNot Nothing AndAlso Request("CveCorte").ToEntero() > 0, Request("CveCorte").ToEntero(), -1).ToString
|
Dim CveCorte As String = If(Request("CveCorte") IsNot Nothing AndAlso Request("CveCorte").ToEntero() > 0, Request("CveCorte").ToEntero(), -1).ToString
|
||||||
|
|
||||||
'PARAMETROS DE LOS LISTBOXS
|
'PARAMETROS DE LOS LISTBOXS
|
||||||
Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM)
|
Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM)
|
||||||
@@ -488,6 +488,7 @@ Partial Class RepVentaDetalle
|
|||||||
|
|
||||||
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
||||||
GvDatos.Columns(9).Visible = ChkIEPS.Checked
|
GvDatos.Columns(9).Visible = ChkIEPS.Checked
|
||||||
|
ChkKilometraje.Visible = UsuarioActual.Empresa.Funcionalidad(558) = "1" 'empresa llantera
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
@@ -774,9 +775,10 @@ Partial Class RepVentaDetalle
|
|||||||
ListPersonalizada.Add("FormaPago")
|
ListPersonalizada.Add("FormaPago")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ChkUsoCFDI.Checked Then
|
If ChkUsoCFDI.Checked Then ListPersonalizada.Add("UsoCFDI")
|
||||||
ListPersonalizada.Add("UsoCFDI")
|
|
||||||
End If
|
If ChkKilometraje.Checked Then ListPersonalizada.Add("Kilometraje")
|
||||||
|
|
||||||
|
|
||||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
||||||
'Alert("Personalizacion guardada")
|
'Alert("Personalizacion guardada")
|
||||||
@@ -947,7 +949,6 @@ Partial Class RepVentaDetalle
|
|||||||
Case "Saldo"
|
Case "Saldo"
|
||||||
ChkSaldo.Checked = True
|
ChkSaldo.Checked = True
|
||||||
Exit Select
|
Exit Select
|
||||||
|
|
||||||
Case "MetodoPago"
|
Case "MetodoPago"
|
||||||
ChkMetodoPago.Checked = True
|
ChkMetodoPago.Checked = True
|
||||||
Exit Select
|
Exit Select
|
||||||
@@ -957,7 +958,9 @@ Partial Class RepVentaDetalle
|
|||||||
Case "UsoCFDI"
|
Case "UsoCFDI"
|
||||||
ChkUsoCFDI.Checked = True
|
ChkUsoCFDI.Checked = True
|
||||||
Exit Select
|
Exit Select
|
||||||
|
Case "Kilometraje"
|
||||||
|
ChkKilometraje.Checked = True
|
||||||
|
Exit Select
|
||||||
Case Else
|
Case Else
|
||||||
Exit Select
|
Exit Select
|
||||||
End Select
|
End Select
|
||||||
@@ -1014,6 +1017,7 @@ Partial Class RepVentaDetalle
|
|||||||
GvDatos.Columns(36).Visible = ChkMetodoPago.Checked
|
GvDatos.Columns(36).Visible = ChkMetodoPago.Checked
|
||||||
GvDatos.Columns(37).Visible = ChkFormaPago.Checked
|
GvDatos.Columns(37).Visible = ChkFormaPago.Checked
|
||||||
GvDatos.Columns(38).Visible = ChkUsoCFDI.Checked
|
GvDatos.Columns(38).Visible = ChkUsoCFDI.Checked
|
||||||
|
GvDatos.Columns(39).Visible = ChkKilometraje.Checked
|
||||||
|
|
||||||
Personalizo = 1
|
Personalizo = 1
|
||||||
If Personalizo = 1 Then
|
If Personalizo = 1 Then
|
||||||
@@ -1170,14 +1174,14 @@ Partial Class RepVentaDetalle
|
|||||||
Response.End()
|
Response.End()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer) As Byte()
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer) As Byte()
|
||||||
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "https://sig.adssistemas.mx/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
Dim Url As Uri = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "https://sig.adssistemas.mx/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||||
Dim File As Byte() = Nothing
|
Dim File As Byte() = Nothing
|
||||||
Try
|
Try
|
||||||
Using httpClient = New HttpClient()
|
Using httpClient As New HttpClient()
|
||||||
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||||
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
Using request As New HttpRequestMessage(HttpMethod.Get, Url)
|
||||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO={2}", CveEmpresa, DateTime.UtcNow.Ticks, CveUsuarioCreo)))
|
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO={2}", CveEmpresa, DateTime.UtcNow.Ticks, CveUsuarioCreo)))
|
||||||
Dim response = httpClient.SendAsync(request).Result
|
Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result
|
||||||
If response.StatusCode = Net.HttpStatusCode.OK Then
|
If response.StatusCode = Net.HttpStatusCode.OK Then
|
||||||
File = response.Content.ReadAsByteArrayAsync().Result
|
File = response.Content.ReadAsByteArrayAsync().Result
|
||||||
End If
|
End If
|
||||||
@@ -1217,12 +1221,12 @@ Partial Class RepVentaDetalle
|
|||||||
CondicionesPago = If(DdlCondicionesPago.selectedValue = "-1", "", String.Format(" <b>Condiciones Pago</b>: {0}", DdlCondicionesPago.SelectedItem.Text))
|
CondicionesPago = If(DdlCondicionesPago.selectedValue = "-1", "", String.Format(" <b>Condiciones Pago</b>: {0}", DdlCondicionesPago.SelectedItem.Text))
|
||||||
|
|
||||||
|
|
||||||
Dim RutaFormato = String.Format("{0}Formatos\RepVentaDetalle.rdlc", UsuarioActual.Empresa.Ruta)
|
Dim RutaFormato As String = String.Format("{0}Formatos\RepVentaDetalle.rdlc", UsuarioActual.Empresa.Ruta)
|
||||||
|
|
||||||
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
|
|
||||||
Dim logouri = String.Format("file://{0}", Imagen.FullName)
|
Dim logouri As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
|
||||||
Dim dt As DataTable = DtVentas.FiltraParametros("(GPO IS NULL AND Cantidad IS NOT NULL) OR (GPO IS NOT NULL AND Cantidad IS NOT NULL)")
|
Dim dt As DataTable = DtVentas.FiltraParametros("(GPO IS NULL AND Cantidad IS NOT NULL) OR (GPO IS NOT NULL AND Cantidad IS NOT NULL)")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user