Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1040,28 +1040,28 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
'Reporte Conceptos Acumulados
|
''Reporte Conceptos Acumulados
|
||||||
Public Function GetRepConceptosAcumulados(CveConcepto As Integer, Ejercicio As Integer, CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
'Public Function GetRepConceptosAcumulados(CveConcepto As Integer, Ejercicio As Integer, CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Nom_ConceptosAcumuladosGetRep")
|
' DataAdapter("PA_Nom_ConceptosAcumuladosGetRep")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
' .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||||
.Add("@CveTipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
|
' .Add("@CveTipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
|
||||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
' .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
' .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener el Reporte Conceptos Acumulados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al obtener el Reporte Conceptos Acumulados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
Public Function UpdateNom_NominasDetallesMasivoSueldo(CvePeriodo As Integer, CveConcepto As Integer, Salario As Double, Importe As Double, ImporteExento As Double, ImporteGravado As Double, CveEmpresa As Integer) As Boolean
|
Public Function UpdateNom_NominasDetallesMasivoSueldo(CvePeriodo As Integer, CveConcepto As Integer, Salario As Double, Importe As Double, ImporteExento As Double, ImporteGravado As Double, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -4727,8 +4727,6 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Nomina/ListaAsistencias.aspx".ToUpper(), 91)
|
PaginaDict.Add("/Nomina/ListaAsistencias.aspx".ToUpper(), 91)
|
||||||
PaginaDict.Add("/Nomina/CatConceptos.aspx".ToUpper(), 172)
|
PaginaDict.Add("/Nomina/CatConceptos.aspx".ToUpper(), 172)
|
||||||
PaginaDict.Add("/Nomina/ConceptoNomina.aspx".ToUpper(), 172)
|
PaginaDict.Add("/Nomina/ConceptoNomina.aspx".ToUpper(), 172)
|
||||||
PaginaDict.Add("/Nomina/RegistroNomina.aspx".ToUpper(), 173)
|
|
||||||
PaginaDict.Add("/Nomina/RepConceptosAcumulados.aspx".ToUpper(), 174)
|
|
||||||
PaginaDict.Add("/Nomina/CatPeriodos.aspx".ToUpper(), 177)
|
PaginaDict.Add("/Nomina/CatPeriodos.aspx".ToUpper(), 177)
|
||||||
PaginaDict.Add("/Nomina/Finiquito.aspx".ToUpper(), 197)
|
PaginaDict.Add("/Nomina/Finiquito.aspx".ToUpper(), 197)
|
||||||
PaginaDict.Add("/Nomina/CatSatBancos.aspx".ToUpper(), 255)
|
PaginaDict.Add("/Nomina/CatSatBancos.aspx".ToUpper(), 255)
|
||||||
|
|||||||
@@ -2924,12 +2924,22 @@ Public Class Timbrado
|
|||||||
OnError("Ocurrió un error al obtener los resultados", ex)
|
OnError("Ocurrió un error al obtener los resultados", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
sw.Stop()
|
||||||
|
swTiempo.AppendFormat("Timbrado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
|
swmili = sw.ElapsedMilliseconds
|
||||||
|
sw.Start()
|
||||||
|
|
||||||
If result IsNot Nothing Then
|
If result IsNot Nothing Then
|
||||||
If result.timbradoOk Then
|
If result.timbradoOk Then
|
||||||
Dim FolioFiscal As String = result.UUID
|
Dim FolioFiscal As String = result.UUID
|
||||||
'GUARDA EL XML RETORNADO POR EL PAC
|
'GUARDA EL XML RETORNADO POR EL PAC
|
||||||
cfdi.EscribirXML(result.xmlBase64.ToBase64Decode(), RutaArchivo, NombreArchivoXML)
|
cfdi.EscribirXML(result.xmlBase64.ToBase64Decode(), RutaArchivo, NombreArchivoXML)
|
||||||
|
|
||||||
|
sw.Stop()
|
||||||
|
swTiempo.AppendFormat("Guardado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
|
swmili = sw.ElapsedMilliseconds
|
||||||
|
sw.Start()
|
||||||
|
|
||||||
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
|
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
|
||||||
|
|
||||||
'Actualiza Estatus Factura
|
'Actualiza Estatus Factura
|
||||||
@@ -2989,6 +2999,10 @@ Public Class Timbrado
|
|||||||
OnError("Ocurrió un error al generar el QR", ex)
|
OnError("Ocurrió un error al generar el QR", ex)
|
||||||
End Try
|
End Try
|
||||||
Retorno = ""
|
Retorno = ""
|
||||||
|
sw.Stop()
|
||||||
|
swTiempo.AppendFormat("Actualizado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
|
swmili = sw.ElapsedMilliseconds
|
||||||
|
sw.Start()
|
||||||
Else
|
Else
|
||||||
If String.IsNullOrEmpty(result.mensaje) Then
|
If String.IsNullOrEmpty(result.mensaje) Then
|
||||||
Retorno = Respuesta + msgErrorGeneracion
|
Retorno = Respuesta + msgErrorGeneracion
|
||||||
|
|||||||
@@ -582,9 +582,10 @@ Namespace Extensiones
|
|||||||
<Runtime.CompilerServices.Extension()>
|
<Runtime.CompilerServices.Extension()>
|
||||||
Public Function ToEntero(Obj As Object) As Integer
|
Public Function ToEntero(Obj As Object) As Integer
|
||||||
|
|
||||||
If Obj IsNot Nothing AndAlso Obj.ToString.Trim <> "" AndAlso Obj.ToString.TrimStart("0"c).Length < 10 Then ' restriccion menor a 10, se quitan ceros a la izquiera primero, porque provoca desbordamiento si pasa mas de una cantidad,Holds signed 32-bit (4-byte) integers that range in value from -2,147,483,648 through 2,147,483,647.
|
If Obj IsNot Nothing AndAlso Obj.ToString.Trim <> "" Then ' porque provoca desbordamiento si pasa mas de una cantidad,Holds signed 32-bit (4-byte) integers that range in value from -2,147,483,648 through 2,147,483,647.
|
||||||
Dim Str As String = HttpUtility.HtmlDecode(Obj.ToString.Trim).Replace(","c, "")
|
Dim Str As String = HttpUtility.HtmlDecode(Obj.ToString.Trim).Replace(","c, "")
|
||||||
Return If(IsNumeric(Str), CInt(Str), 0)
|
'si es numerico, si no excede a 10 caracteres, convierte el valor a entero, si excede de 10 digitos, verifica la cantidad permitida. si es menor a su dato, se valida
|
||||||
|
Return If(IsNumeric(Str), If(Str.Length < 10, CInt(Str), If(CDec(Str) < Int32.MaxValue, CInt(Str), 0)), 0)
|
||||||
Else
|
Else
|
||||||
Return 0
|
Return 0
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
<label for="<%= TxtPorcentajeIVA.ClientID.ToString()%>">PorcentajeIVA:</label>
|
<label for="<%= TxtPorcentajeIVA.ClientID.ToString()%>">PorcentajeIVA:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" id="divConceptoNomina" runat="server" visible="false">
|
<div class="form-group form-md-line-input input-iconright" id="divConceptoNomina" runat="server" visible="false">
|
||||||
<asp:DropDownList ID="DdlConceptoNomina" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlConceptoNomina" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Width="240px" ValidationGroup="GrpModulo" ></asp:DropDownList>
|
||||||
<label for="<%= DdlConceptoNomina.ClientID.ToString()%>">Concepto nómina: </label>
|
<label for="<%= DdlConceptoNomina.ClientID.ToString()%>">Concepto nómina: </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" id="divActivoFijo" runat="server" visible="false">
|
<div class="form-group form-md-line-input input-iconright" id="divActivoFijo" runat="server" visible="false">
|
||||||
|
|||||||
@@ -161,6 +161,9 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
divActivoFijo.Visible = True
|
divActivoFijo.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Dr("AplicaNomina").ToString = "True" Then
|
||||||
|
divConceptoNomina.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
LbAgregar.Text = "Actualizar"
|
LbAgregar.Text = "Actualizar"
|
||||||
UpModalModulos.Update()
|
UpModalModulos.Update()
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
|||||||
'Mostrar Sección
|
'Mostrar Sección
|
||||||
GvD.Columns(11).Visible = ChkMostrarSeccion.Checked
|
GvD.Columns(11).Visible = ChkMostrarSeccion.Checked
|
||||||
GvD.Columns(12).Visible = ChkMostrarSeccion.Checked
|
GvD.Columns(12).Visible = ChkMostrarSeccion.Checked
|
||||||
CargaDatos()
|
'CargaDatos()
|
||||||
UppD.Update()
|
UppD.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -973,8 +973,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").readonly = True
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
||||||
CType(e.row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||||
|
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||||
@@ -1891,8 +1891,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If Not CveMovimientoSalida > 0 Then
|
If Not CveMovimientoSalida > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC1")
|
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC1")
|
||||||
FolioSalida = ObjInventario.Folio
|
FolioSalida = ObjInventario.Folio
|
||||||
@@ -1931,58 +1929,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If ErrorMovInv Then Exit For
|
If ErrorMovInv Then Exit For
|
||||||
Next
|
Next
|
||||||
|
|
||||||
ElseIf CBool(Dr("AplicaLote")) Then
|
|
||||||
|
|
||||||
DtDetalle = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
|
||||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
|
||||||
If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString().ToEntero(), Dr1("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Dr1("Lote").ToString(), CveTipoAlmacen:=26, CveSubProyecto:=CveSubProyecto, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
|
||||||
|
|
||||||
CantidadSaldoSinCosto = Dr("CantidadGV").ToString().ToDecimal
|
|
||||||
|
|
||||||
For Each Dr2 As DataRow In ObjInventario.DtResultados.FiltraParametros("CveAlmacen > 0 AND ExistenciaFinal > 0").Rows
|
|
||||||
|
|
||||||
'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO
|
|
||||||
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr2("CveAlmacen")}").ToEntero()
|
|
||||||
|
|
||||||
If Not CveMovimientoSalida > 0 Then
|
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim,
|
|
||||||
Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC2")
|
|
||||||
FolioSalida = ObjInventario.Folio
|
|
||||||
|
|
||||||
If Not CveMovimientoSalida > 0 Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError.AppendFormat("Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar.")
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
|
||||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
|
||||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
|
||||||
DrMovto("FolioSalida") = FolioSalida
|
|
||||||
DrMovto("CveTipoAlmacen") = 26
|
|
||||||
DrMovto("CveConceptoMovimientoSalida") = CveConceptoSalidaSinCosto
|
|
||||||
DtTraspasos.Rows.Add(DrMovto)
|
|
||||||
End If
|
|
||||||
|
|
||||||
CantidadPendienteSinCosto = If(Dr1("Cantidad").ToString().ToDecimal > CantidadSaldoSinCosto, CantidadSaldoSinCosto, Dr1("Cantidad").ToString().ToDecimal)
|
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendienteSinCosto.ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), 0, Lote:=Dr1("Lote").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
DtDatosDetalle.Select($"Consec = {Dr1("Consec")}")(0)("FueTraspaso") = 1
|
|
||||||
DtDatosDetalle.Select($"Consec = {Dr1("Consec")}")(0)("CveVentaDetalle") = Dr("CveVentaDetalle")
|
|
||||||
|
|
||||||
CantidadSaldoSinCosto -= CantidadPendienteSinCosto
|
|
||||||
Dr("CantidadTraspaso") = Dr("CantidadTraspaso").ToString().ToDecimal + CantidadPendienteSinCosto
|
|
||||||
If CantidadSaldoSinCosto <= 0 Then Exit For
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString().ToEntero(), Dr("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=26, CveSubProyecto:=CveSubProyecto, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString().ToEntero(), Dr("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=26, CveSubProyecto:=CveSubProyecto, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
||||||
@@ -3276,7 +3222,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
ConceptoMovimiento = If(ChkTransitorio.Checked, 2, 27)
|
ConceptoMovimiento = If(ChkTransitorio.Checked, 2, 27)
|
||||||
Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero(), CveAlmacenTraspasoDestino)
|
Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero(), CveAlmacenTraspasoDestino)
|
||||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(Almacen2, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim,
|
CveMovimientoEntrada = ObjInventario.AddMovimiento(Almacen2, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim,
|
||||||
Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenTraspasoDestino,
|
Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenTraspasoDestino,
|
||||||
Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT1", CveOP:=CveOP)
|
Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT1", CveOP:=CveOP)
|
||||||
FolioEntrada = ObjInventario.Folio
|
FolioEntrada = ObjInventario.Folio
|
||||||
|
|||||||
@@ -232,27 +232,15 @@
|
|||||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<table class="Widthall ScrollAD">
|
|
||||||
<tr style="width: 100%">
|
|
||||||
<td style="padding: 0px;">
|
|
||||||
<table class="table Widthall">
|
|
||||||
<tr>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="padding: 0px">
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server">
|
<asp:UpdatePanel ID="UpDatos" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True"
|
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True" data-heighterror="275"
|
||||||
ShowFooter="True" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Texto" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
ShowFooter="True" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Texto" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Código
|
Código
|
||||||
|
|
||||||
|
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<div class='truncate' style='width: 200px;'>
|
<div class='truncate' style='width: 200px;'>
|
||||||
@@ -276,9 +264,6 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div id="DivProyeccion" class="modal ADS fade" role="dialog">
|
<div id="DivProyeccion" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog" style="width: 450px;">
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -3107,7 +3107,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If CveTipoCompra = 8 Then 'entrada almacen con costo indirecto cargado en la misma compra
|
If CveTipoCompra = 8 Then 'entrada almacen con costo indirecto cargado en la misma compra
|
||||||
tTotalInsertado = dtt.SUMD("Total") + ImporteIngresoAdicional ' está incluido el costo indirecto en la factura
|
tTotalInsertado = dtt.SUMD("Total") + ImporteIngresoAdicional ' está incluido el costo indirecto en la factura
|
||||||
End If
|
End If
|
||||||
If Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) <> Math.Round(tTotalInsertado, 2) Then
|
If (TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)).RoundSQL <> tTotalInsertado.RoundSQL Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Alert("La Entrada no coincide con el valor del documento." & Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) & " -" & tTotalInsertado.RoundSQL.ToString, TipoMensaje.MsgError)
|
Alert("La Entrada no coincide con el valor del documento." & Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) & " -" & tTotalInsertado.RoundSQL.ToString, TipoMensaje.MsgError)
|
||||||
GuardaLog("La Entrada no coincide con el valor del documento." & Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) & " -" & tTotalInsertado.RoundSQL.ToString)
|
GuardaLog("La Entrada no coincide con el valor del documento." & Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) & " -" & tTotalInsertado.RoundSQL.ToString)
|
||||||
|
|||||||
@@ -204,7 +204,7 @@
|
|||||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
|
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
|
||||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
|
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen"/>
|
||||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||||
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Existencia" DataField="CantidadAlmacen" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Inv. Físico" DataField="CantidadInventarioFisico" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
<asp:BoundField HeaderText="Diferencia" DataField="Diferencia" DataFormatString="{0:#,###.##}" ItemStyle-Font-Bold="true" />
|
||||||
|
|||||||
@@ -148,6 +148,10 @@ Partial Class Inventarios_RepAnomalias
|
|||||||
End If
|
End If
|
||||||
Inventario.Dispose()
|
Inventario.Dispose()
|
||||||
|
|
||||||
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(7).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(7).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
|
||||||
|
|
||||||
GvS.DataSource = dt.FiltraParametros("Diferencia < 0")
|
GvS.DataSource = dt.FiltraParametros("Diferencia < 0")
|
||||||
Dim DtS As DataTable = dt.FiltraParametros("Diferencia < 0")
|
Dim DtS As DataTable = dt.FiltraParametros("Diferencia < 0")
|
||||||
GvS.DataBind()
|
GvS.DataBind()
|
||||||
@@ -171,6 +175,7 @@ Partial Class Inventarios_RepAnomalias
|
|||||||
Script += "OrdenarGVS();"
|
Script += "OrdenarGVS();"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
RegistraScript(Script)
|
RegistraScript(Script)
|
||||||
|
|
||||||
UPAnomalias.Update()
|
UPAnomalias.Update()
|
||||||
|
|||||||
@@ -537,13 +537,19 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'codigo provisional.
|
'codigo provisional.
|
||||||
Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.selectedvalue.toentero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||||
|
|
||||||
|
If DrPS("AplicaCaducidad").ToString = "True" AndAlso CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||||
|
If Not ChkSugiereFechaCaducidad.Checked AndAlso (TxtnFechaCaducidad.Text = "" OrElse TxtnLote.Text = "") Then
|
||||||
|
Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If DrPS("AplicaCaducidad").ToString = "True" AndAlso ChkSugiereFechaCaducidad.checked And CveSubP.Contiene(10276) Then
|
If DrPS("AplicaCaducidad").ToString = "True" AndAlso ChkSugiereFechaCaducidad.Checked And CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
If ObjInventarios.GetExistenciasCaducidad(CveProducto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.selectedvalue) Then
|
If ObjInventarios.GetExistenciasCaducidad(CveProducto, DdlAlmacenOrigen.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue) Then
|
||||||
Dim dtt As DataTable = ObjInventarios.DtResultados
|
Dim dtt As DataTable = ObjInventarios.DtResultados
|
||||||
|
|
||||||
If Cantidad > dtt.SUMD("Cantidad") Then
|
If Cantidad > dtt.SUMD("Cantidad") Then
|
||||||
@@ -577,22 +583,20 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
tLote = If(TxtnLote.Visible, TxtnLote.Text, "-1")
|
tLote = If(TxtnLote.Visible, TxtnLote.Text, "-1")
|
||||||
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
||||||
|
|
||||||
If CveSubP <> 10276 Then
|
If Not CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||||
tLote = "-1"
|
tLote = "-1"
|
||||||
tCaducidad = MinFecha
|
tCaducidad = MinFecha
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1"), tLote, tCaducidad)
|
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1"), tLote, tCaducidad)
|
||||||
|
|
||||||
If Valido Then
|
If Valido Then
|
||||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
|
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -601,21 +605,29 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Dim ExistenciaEspecificada As Decimal
|
Dim ExistenciaEspecificada As Decimal
|
||||||
Dim CantidadEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(Serie <> "-1", $" AND Serie = '{Serie}'", "")}")
|
Dim CantidadEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(Serie <> "-1", $" AND Serie = '{Serie}'", "")}")
|
||||||
|
Dim Existencia As Decimal
|
||||||
|
|
||||||
Dim Inv As New ClsInventarios
|
Dim Inv As New ClsInventarios
|
||||||
Dim Existencia As Decimal = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
|
If Inv.GetExistenciasProducto(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm")) Then
|
||||||
|
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||||
|
Existencia = Inv.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||||
|
End If
|
||||||
|
'Existencia= Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
|
||||||
|
|
||||||
If Existencia > 0 Then
|
If Existencia > 0 Then
|
||||||
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
||||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||||
If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then
|
If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then
|
||||||
ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
If Inv.GetExistenciasProducto(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||||
Dim StrB As New stringbuilder
|
ExistenciaEspecificada = Inv.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||||
StrB.appendformat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida)
|
End If
|
||||||
If Not Serie.Contiene("", "-1") Then StrB.appendformat(" AND Serie = '{0}' ", Serie)
|
'ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||||
If Not Lote.Contiene("", "-1") Then StrB.appendformat(" AND Lote = '{0}' ", Lote)
|
Dim StrB As New StringBuilder
|
||||||
If FechaCaducidad.ToDate > MinFecha Then StrB.appendformat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString)
|
StrB.AppendFormat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida)
|
||||||
Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.tostring)
|
If Not Serie.Contiene("", "-1") Then StrB.AppendFormat(" AND Serie = '{0}' ", Serie)
|
||||||
|
If Not Lote.Contiene("", "-1") Then StrB.AppendFormat(" AND Lote = '{0}' ", Lote)
|
||||||
|
If FechaCaducidad.ToDate > MinFecha Then StrB.AppendFormat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString)
|
||||||
|
Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.ToString)
|
||||||
|
|
||||||
If ExistenciaEspecificada - Cantidad - CantidadEspecificaEnGrid < 0 Then
|
If ExistenciaEspecificada - Cantidad - CantidadEspecificaEnGrid < 0 Then
|
||||||
Alert(String.Format("Solo hay en existencia: {0:#,###.##}", ExistenciaEspecificada), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("Solo hay en existencia: {0:#,###.##}", ExistenciaEspecificada), TipoMensaje.MsgAdvertencia)
|
||||||
@@ -837,13 +849,22 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Dim ExistenciaEspecificada As Decimal = 0
|
Dim ExistenciaEspecificada As Decimal = 0
|
||||||
CantidadenGrid = DtMovimientos.SUMD("Cantidad", String.Format("CvePS = {0} AND CveUM = {1} {2} {3} {4} ", dr("CvePS"), dr("CveUM"), If(Not dr("Serie").ToString.Contiene("-1", ""), $" AND Serie = '{dr("Serie")}'", ""), tLote, tFechaCaducidad))
|
CantidadenGrid = DtMovimientos.SUMD("Cantidad", String.Format("CvePS = {0} AND CveUM = {1} {2} {3} {4} ", dr("CvePS"), dr("CveUM"), If(Not dr("Serie").ToString.Contiene("-1", ""), $" AND Serie = '{dr("Serie")}'", ""), tLote, tFechaCaducidad))
|
||||||
Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||||
|
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||||
|
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||||
Existencia -= CantidadenGrid
|
Existencia -= CantidadenGrid
|
||||||
'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero))
|
'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero))
|
||||||
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
||||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||||
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") Then
|
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") Then
|
||||||
ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||||
|
ExistenciaEspecificada = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
|
'ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||||
Existencia = ExistenciaEspecificada - CantidadenGrid
|
Existencia = ExistenciaEspecificada - CantidadenGrid
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -865,7 +886,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
||||||
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
||||||
|
|
||||||
Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||||
|
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||||
|
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||||
|
End If
|
||||||
|
'Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||||
Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero
|
Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero
|
||||||
If Existencia < 0 Then
|
If Existencia < 0 Then
|
||||||
ErrorExistencia = True
|
ErrorExistencia = True
|
||||||
@@ -1551,8 +1576,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Protected Sub ChkSugiereFechaCaducidad_CheckedChanged(sender As Object, e As EventArgs)
|
Protected Sub ChkSugiereFechaCaducidad_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
TxtnFechaCaducidad.visible = Not ChkSugiereFechaCaducidad.checked
|
TxtnFechaCaducidad.Visible = Not ChkSugiereFechaCaducidad.Checked
|
||||||
TxtnLote.visible = Not ChkSugiereFechaCaducidad.checked
|
TxtnLote.Visible = Not ChkSugiereFechaCaducidad.Checked
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1685,11 +1710,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("AplicaLote").ToString.Trim = "1" Then
|
If e.Row.DBCampo("AplicaLote").ToString.Trim = "1" Then
|
||||||
e.Row.FCTextBox("TxtLote").visible = True
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("AplicaCaducidad").ToString.Trim = "1" Then
|
If e.Row.DBCampo("AplicaCaducidad").ToString.Trim = "1" Then
|
||||||
e.Row.FCTextBox("TxtCaducidad").visible = True
|
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -1702,10 +1727,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnCancelarTraspaso_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCancelarTraspaso_Click(sender As Object, e As EventArgs)
|
||||||
@@ -1987,9 +2012,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim tLote As String = gvr.DataKey("Lote").ToString
|
Dim tLote As String = gvr.DataKey("Lote").ToString
|
||||||
Dim tFechaCaducidad As Date = gvr.DataKey("FechaCaducidad").ToDate
|
Dim tFechaCaducidad As Date = gvr.DataKey("FechaCaducidad").ToDate
|
||||||
|
|
||||||
If CveSubProyectoRecibe = 10276 Then
|
If CveSubProyectoRecibe.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||||
tLote = gvr.FCTextBox("TxtLote").text
|
tLote = gvr.FCTextBox("TxtLote").Text
|
||||||
tFechaCaducidad = gvr.FCTextBox("TxtCaducidad").text.todate
|
tFechaCaducidad = gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=tLote, FechaCaducidad:=tFechaCaducidad, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=tLote, FechaCaducidad:=tFechaCaducidad, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
|
||||||
@@ -2972,7 +2997,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
|
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||||
|
|
||||||
Dim unnamed As Integer = 0
|
Dim unnamed As Integer = 0
|
||||||
Dim cols As Integer
|
Dim cols As Integer
|
||||||
|
|||||||
Reference in New Issue
Block a user