se agrego la opción de Almacen para Saldos iniciales
This commit is contained in:
@@ -43,11 +43,12 @@
|
|||||||
<asp:ListItem Value="4" Text="Factura - Cliente"></asp:ListItem>
|
<asp:ListItem Value="4" Text="Factura - Cliente"></asp:ListItem>
|
||||||
<asp:ListItem Value="5" Text="Productos y Sevicios" ></asp:ListItem>
|
<asp:ListItem Value="5" Text="Productos y Sevicios" ></asp:ListItem>
|
||||||
<asp:ListItem Value="6" Text="RH - Personal"></asp:ListItem>
|
<asp:ListItem Value="6" Text="RH - Personal"></asp:ListItem>
|
||||||
<asp:ListItem Value="7" Text="AF - Activos Fijos" Enabled="false"></asp:ListItem>
|
<asp:ListItem Value="7" Text="AF - Activos Fijos" Enabled="false"></asp:ListItem>
|
||||||
<asp:ListItem Value="8" Text="Contabilidad - Cuentas Contables" Enabled="True"></asp:ListItem>
|
<asp:ListItem Value="8" Text="Contabilidad - Cuentas Contables" Enabled="True"></asp:ListItem>
|
||||||
<asp:ListItem Value="9" Text="ContaSIG - Cuentas Contables" Enabled="True"></asp:ListItem>
|
<asp:ListItem Value="9" Text="ContaSIG - Cuentas Contables" Enabled="True"></asp:ListItem>
|
||||||
<asp:ListItem Value="10" Text="Cont - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
<asp:ListItem Value="10" Text="Cont - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
||||||
<asp:ListItem Value="11" Text="ContaSIG - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
<asp:ListItem Value="11" Text="ContaSIG - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="12" Text="Almacen" Enabled="True"></asp:ListItem>
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -449,7 +449,26 @@ Partial Class General_SaldosIniciales
|
|||||||
Alert("El nombre de la diescisieteava columna debe ser 'Clave Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la diescisieteava columna debe ser 'Clave Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
ElseIf RblFormato.SelectedValue = "12" Then
|
||||||
|
If Not dt.Columns(0).ColumnName = "CodigoPS" Then
|
||||||
|
Alert("El nombre de la primera columna debe ser 'CodigoPS'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(1).ColumnName = "Almacen" Then
|
||||||
|
Alert("El nombre de la segunda columna debe ser 'Almacen'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(2).ColumnName = "Existencia" Then
|
||||||
|
Alert("El nombre de la tercera columna debe ser 'Existencia'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(3).ColumnName = "Valor" Then
|
||||||
|
Alert("El nombre de la cuarta columna debe ser 'Valor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -606,10 +625,10 @@ Partial Class General_SaldosIniciales
|
|||||||
'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
||||||
' CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) Then
|
' CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) Then
|
||||||
ErrorPS = True
|
ErrorPS = True
|
||||||
Codigo.GuardaLog
|
Codigo.GuardaLog
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
Contador += 1
|
Contador += 1
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||||
@@ -927,7 +946,7 @@ Partial Class General_SaldosIniciales
|
|||||||
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorVentas = True
|
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorVentas = True
|
||||||
' If Not CveSucursal > 0 Then Alert("No se encontró la sucursal.", TipoMensaje.MsgError) : ErrorVentas = True
|
' If Not CveSucursal > 0 Then Alert("No se encontró la sucursal.", TipoMensaje.MsgError) : ErrorVentas = True
|
||||||
If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorVentas = True
|
If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorVentas = True
|
||||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||||
@@ -953,7 +972,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
|
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
|
||||||
Dim CveClienteSucursal As Integer = Row("CveClienteSucursal").ToString.ToEntero
|
Dim CveClienteSucursal As Integer = Row("CveClienteSucursal").ToString.ToEntero
|
||||||
|
|
||||||
GuardaLog(Sucursal + "-" + Row("Sucursal").ToString)
|
GuardaLog(Sucursal + "-" + Row("Sucursal").ToString)
|
||||||
'Temporalmente SE BORRARA
|
'Temporalmente SE BORRARA
|
||||||
Dim Transaccion As String = "" ' Row("Transaccion2").ToString
|
Dim Transaccion As String = "" ' Row("Transaccion2").ToString
|
||||||
Dim Folio2 As String = "" ' Row("Folio2").ToString
|
Dim Folio2 As String = "" ' Row("Folio2").ToString
|
||||||
@@ -1501,7 +1520,29 @@ Partial Class General_SaldosIniciales
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
ElseIf RblFormato.SelectedValue = "12" Then
|
||||||
|
Dim ObjMovimientos As New ClsInventarios
|
||||||
|
ObjMovimientos.IniciaTransacSQL()
|
||||||
|
Try
|
||||||
|
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("", DistinctColumns:={"Almacen"}).Rows
|
||||||
|
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString
|
||||||
|
Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveAlmacen", $"Almacen = {almacenActual}").ToEntero
|
||||||
|
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = {almacenActual}").Rows
|
||||||
|
Dim CvePS As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CvePS", $"PSCodigo = {nuevaEntrada("CodigoPS")}").ToEntero
|
||||||
|
If CvePS > 0 Then
|
||||||
|
Dim Cantidad As Double = nuevaEntrada("Existencia").ToString.ToDouble
|
||||||
|
Dim Valor As Double = nuevaEntrada("Valor").ToString.ToDouble
|
||||||
|
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, 1, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||||
|
If ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, -1, CvePS, (Valor / Cantidad), -1, -1) Then
|
||||||
|
Alert("Movimiento terminado con exito")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
ObjMovimientos.Dispose()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1528,6 +1569,8 @@ Partial Class General_SaldosIniciales
|
|||||||
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
|
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
|
||||||
ElseIf RblFormato.SelectedValue = "9" Then
|
ElseIf RblFormato.SelectedValue = "9" Then
|
||||||
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
|
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
|
||||||
|
ElseIf RblFormato.SelectedValue = "12" Then
|
||||||
|
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoAlmacen.xlsx"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Archivo As New IO.FileInfo(Directorio)
|
Dim Archivo As New IO.FileInfo(Directorio)
|
||||||
|
|||||||
Reference in New Issue
Block a user