Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -41,11 +41,23 @@ Partial Class Acumuladores_RepRecolecciones
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
Private Property DTPSDefinidos As DataTable
|
||||
Get
|
||||
If ViewState("DTPSDefinidos") Is Nothing Then
|
||||
ViewState("DTPSDefinidos") = New DataTable()
|
||||
End If
|
||||
Return CType(ViewState("DTPSDefinidos"), DataTable)
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DTPSDefinidos") = CType(value, DataTable)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
@@ -128,14 +140,16 @@ Partial Class Acumuladores_RepRecolecciones
|
||||
Dim Str As New StringBuilder
|
||||
Str.Append("Productos Definidos <br/>")
|
||||
If ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen) Then
|
||||
For Each dr As DataRow In ObjGenerales.DtResultados.Rows
|
||||
Str.AppendFormat(" {0} - {1}<br/>", dr("Cantidad"), dr("CodigoPS"))
|
||||
HdnPSRecoleccion.Value = dr("CvePS").ToString
|
||||
HdnCantidadRecoleccion.Value = dr("Cantidad").ToString
|
||||
Next
|
||||
LblProductosCargados.Text = Str.ToString
|
||||
DTPSDefinidos = ObjGenerales.DtResultados.Copy()
|
||||
End If
|
||||
ObjGenerales.Dispose()
|
||||
ObjGenerales.Dispose()
|
||||
|
||||
For Each dr As DataRow In DTPSDefinidos.Rows
|
||||
Str.AppendFormat(" {0} - {1}<br/>", dr("Cantidad"), dr("CodigoPS"))
|
||||
'HdnPSRecoleccion.Value = dr("CvePS").ToString
|
||||
'HdnCantidadRecoleccion.Value = dr("Cantidad").ToString
|
||||
Next
|
||||
LblProductosCargados.Text = Str.ToString
|
||||
|
||||
GvModalPSRecoleccion.DataSource = DTRecoleccion
|
||||
GvModalPSRecoleccion.DataBind()
|
||||
@@ -204,11 +218,12 @@ Partial Class Acumuladores_RepRecolecciones
|
||||
|
||||
Private Sub BtnModalRecoleccionGuardar_Click(sender As Object, e As EventArgs) Handles BtnModalRecoleccionGuardar.Click
|
||||
|
||||
Dim Cantidad As Decimal = HdnCantidadRecoleccion.Value.ToDecimal
|
||||
Dim Cantidad As Decimal = DTPSDefinidos.SUMD("Cantidad")
|
||||
Dim CantidadDefinido As Decimal = 0
|
||||
For Each gvr As GridViewRow In GvModalPSRecoleccion.Rows
|
||||
CantidadDefinido += gvr.DataKey("Cantidad").ToDecimal
|
||||
Next
|
||||
|
||||
If CantidadDefinido <> Cantidad Then
|
||||
Alert("La cantidad definida no es la correcta", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -219,15 +234,21 @@ Partial Class Acumuladores_RepRecolecciones
|
||||
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim Fecha As DateTime = NowADS()
|
||||
Dim Concepto As String = "Traspaso Recolección"
|
||||
Dim Concepto As String = "Traspaso Recolección"
|
||||
|
||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 45, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados")
|
||||
Dim FolioSalida As Integer = ObjInventario.Folio
|
||||
Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 42, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados")
|
||||
Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=HdnPSRecoleccion.Value.ToEntero).FiltroPrimeroValor("CveUnidadMedida", "").ToEntero
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, HdnCantidadRecoleccion.Value.ToDecimal, CveUM, HdnPSRecoleccion.Value.ToEntero, 0) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
'HdnPSRecoleccion
|
||||
Dim FolioSalida As Integer = ObjInventario.Folio
|
||||
|
||||
For Each Row As DataRow In DTPSDefinidos.Rows
|
||||
Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=Row("CvePS").ToString().ToEntero()).FiltroPrimeroValor("CveUnidadMedida", "").ToEntero
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Row("Cantidad").ToString().ToDecimal, CveUM, Row("CvePS").ToString().ToEntero(), 0) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 42, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados")
|
||||
|
||||
'HdnPSRecoleccion
|
||||
For Each gvr As GridViewRow In GvModalPSRecoleccion.Rows
|
||||
Dim CveMovtoDetalle As Integer
|
||||
If ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, gvr.DataKey("Cantidad").ToDecimal, gvr.DataKey("CveUnidadMedida").ToEntero, gvr.DataKey("CvePS").ToEntero, 0) Then
|
||||
|
||||
@@ -227,7 +227,7 @@ Partial Class Bancos_RepCortes
|
||||
GvP.DataSource = DtCortesVentasResumen
|
||||
|
||||
'RESUMEN - IVA
|
||||
If UsuarioActual.CveEmpresa.Contiene(190, 192) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(190, 192) AndAlso DsDatos.Tables.Count > 2 Then
|
||||
DivIVA.Visible = True
|
||||
GvPorIVA.DataSource = DsDatos.Tables(2)
|
||||
Dim tsum As Decimal = DsDatos.Tables(2).SUMD("IVA16") + DsDatos.Tables(2).SUMD("IVA0")
|
||||
|
||||
@@ -152,7 +152,6 @@ Partial Class Ventas_FacturacionGlobal
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim CveCliente As Integer = -1 'UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
Dim CveMoneda As Integer = 1
|
||||
|
||||
Dim SbRemisiones As New StringBuilder()
|
||||
@@ -178,17 +177,18 @@ Partial Class Ventas_FacturacionGlobal
|
||||
Dim DtPagosFacturaGlobal As New DataTable()
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetVentasRemisionesTotales(CveCliente, SbRemisiones.ToString(), 1) Then
|
||||
If ObjClientes.GetVentasRemisionesTotales(-1, SbRemisiones.ToString(), 1) Then
|
||||
DtRemisionesPS = ObjClientes.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If ObjClientes.GetVentasRemisionesPagos(CveCliente, SbRemisiones.ToString()) Then
|
||||
If ObjClientes.GetVentasRemisionesPagos(-1, SbRemisiones.ToString()) Then
|
||||
DtPagosFacturaGlobal = ObjClientes.DtResultados.Copy()
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
|
||||
If DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0 Then
|
||||
Alert("No se pudieron cargar las remsiones para facturar", TipoMensaje.MsgError)
|
||||
Alert("No se pudieron cargar las remisiones para facturar", TipoMensaje.MsgError)
|
||||
GuardaLog("Remisiones: " + SbRemisiones.ToString())
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -202,7 +202,7 @@ Partial Class Ventas_FacturacionGlobal
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
CveCliente = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
Dim CveCliente As Integer = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
If CveCliente <= 0 Then
|
||||
Alert("No se pudo cargar el cliente", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
|
||||
@@ -17998,7 +17998,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPSEdit_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If GvPS.EditIndex >= 0 Then
|
||||
Dim ddlPSEdit = DirectCast(sender, ADServerControl.Dropdownlost)
|
||||
Dim GvRow = DirectCast(ddlPSEdit.NamingContainer, GridViewRow)
|
||||
|
||||
Reference in New Issue
Block a user