This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-05-14 12:04:59 -07:00
65 changed files with 8296 additions and 27476 deletions

View File

@@ -3744,8 +3744,10 @@ Partial Class Clientes
End Sub
Private Sub GenerarRepCrystal(Formato As String)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim params As New List(Of ReportParameter)
If Imagen.Exists Then

View File

@@ -945,7 +945,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Lote" HeaderText="Lote" />
<asp:BoundField DataField="Batch" HeaderText="Batch" />
<asp:BoundField DataField="FechaCaducidad" HeaderText="FechaCaducidad" />
</Columns>
</asp:GridView>
</div>

View File

@@ -1789,7 +1789,7 @@ Partial Class PV
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
If Not OcurrioError Then
Dim index As Integer = 0
For Each Row As DataRow In TmpDT.Rows
For Each Row As DataRow In TmpDT.FiltraParametros("EliminarDB = False").Rows
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero()
If CveVentaDetalle > 0 Then
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then
@@ -1847,19 +1847,45 @@ Partial Class PV
End If
'RECARGA LOS DATOS
If ObjVentas.GetVentaDetalle(CveVenta) Then
TmpDT = ObjVentas.DtResultados.Copy()
ObjFactura.DtDetalle = TmpDT
Else
ObjFactura.Dispose()
ObjFactura = Nothing
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
If ObjFactura Is Nothing Then
OcurrioError = True
Else
TmpDT = ObjFactura.DtDetalle
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
Dim NumRowsPS As Integer = 0
Dim CantidadPS As Decimal = 0
For Each GvRow As GridViewRow In GvPS.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
NumRowsPS += 1
CantidadPS += GvRow.DataKey("Cantidad").ToDecimal()
End If
Next
'VALIDA NUMERO DE REGISTROS
If TmpDT.Rows.Count <> NumRowsPS Then
OcurrioError = True
End If
'VALIDA CANTIDAD DE REGISTROS
If TmpDT.SUM("Cantidad") <> CantidadPS Then
OcurrioError = True
End If
End If
'GUARDA USADOS
If Not ObjVentas.EliminarUsados(CveVenta) Then
If Not OcurrioError AndAlso Not ObjVentas.EliminarUsados(CveVenta) Then
OcurrioError = True
End If
If TmpDTRecepcionUsados IsNot Nothing Then
If Not OcurrioError AndAlso TmpDTRecepcionUsados IsNot Nothing Then
For Each drow As DataRow In TmpDTRecepcionUsados.Rows
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
OcurrioError = True
@@ -1869,11 +1895,11 @@ Partial Class PV
End If
'GUARDAR AJUSTES'
If Not ObjAcum.EliminarGarantiasDetalle(CveVenta) Then
If Not OcurrioError AndAlso Not ObjAcum.EliminarGarantiasDetalle(CveVenta) Then
OcurrioError = True
End If
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
If Not OcurrioError AndAlso TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
For Each Dr As DataRow In TmpDTAjustes.Rows
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
@@ -1884,11 +1910,11 @@ Partial Class PV
End If
'GUARDAR POLIZA VIRTUAL
If Not ObjAcum.EliminarPolizaVirtual(CveVenta) Then
If Not OcurrioError AndAlso Not ObjAcum.EliminarPolizaVirtual(CveVenta) Then
OcurrioError = True
End If
If TmpDTPolizaVirtual IsNot Nothing Then
If Not OcurrioError AndAlso TmpDTPolizaVirtual IsNot Nothing Then
For Each drow As DataRow In TmpDTPolizaVirtual.Rows
If ObjAcum.AddPolizaVirtual(CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
@@ -2758,13 +2784,18 @@ Partial Class PV
#Region "GVPS"
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting
Dim DbRow As DataRow = Nothing
DbRow = TmpDT.Rows(e.RowIndex)
EliminarUsados(DbRow("Consec").ToString().ToEntero())
Me.CveVentaDetalle = DbRow("CveVentaDetalle").ToString().ToEntero()
TmpDT.Rows.Remove(DbRow)
If Me.CveVentaDetalle <= 0 Then
EliminarUsados(DbRow("Consec").ToString().ToEntero())
TmpDT.Rows.Remove(DbRow)
Else
EliminarUsados()
DbRow("EliminarDB") = True
End If
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
@@ -2774,6 +2805,9 @@ Partial Class PV
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
Me.CveVentaDetalle = -1
UpContado.Update()
End Sub
Protected Sub GvPS_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvPS.RowDataBound
@@ -2920,13 +2954,13 @@ Partial Class PV
DtTemporal.Columns.Add("Lote", Type.GetType("System.String"))
End If
If Not DtTemporal.Columns.Contains("Batch") Then
DtTemporal.Columns.Add("Batch", Type.GetType("System.String"))
If Not DtTemporal.Columns.Contains("FechaCaducidad") Then
DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
End If
GvInv.Columns(4).Visible = DtTemporal.MAX("SerieLote", "SerieLote <> ''") <> "" Or CveVenta <= 0
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
GvInv.Columns(6).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad", "FechaCaducidad <> ''") <> ""
GvInv.DataSource = DtTemporal.FiltraParametros("EliminarDB = False")
GvInv.DataBind()

View File

@@ -2545,7 +2545,7 @@ Partial Class ProductosyServicios
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
DdlAlmacen.DataBind()
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
DdlSeccionAlmacen.DataBind()

View File

@@ -1614,7 +1614,7 @@
Almacén:
<asp:DropDownList ID="ddlAlmacen" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="select2me" Width="200px"></asp:DropDownList>
</div>
<div class=" col-sm-8">
<div class=" col-sm-10">
<div class="Widthall" style="overflow-x: auto;">
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Origen" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None">
<Columns>
@@ -1655,7 +1655,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Lote" HeaderText="Lote" />
<asp:BoundField DataField="Batch" HeaderText="Batch" />
<asp:BoundField DataField="FechaCaducidad" HeaderText="FechaCaducidad" />
</Columns>
</asp:GridView>
</div>