Correciones en punto de venta
This commit is contained in:
@@ -205,6 +205,14 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Set(value As Integer)
|
||||
ViewState("CveRemisionRecibida") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property EsDistribuidor As Boolean
|
||||
Get
|
||||
Return CBool(IfNull(ViewState("EsDistribuidor"), False, CBool(ViewState("EsDistribuidor"))))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsDistribuidor") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
@@ -1048,19 +1056,21 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
|
||||
If RBLOpcion.SelectedValue.ToEntero <> 3 Then
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
|
||||
|
||||
'CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
'CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String
|
||||
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
If EsDistribuidor Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
|
||||
|
||||
'CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
'CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String
|
||||
|
||||
Mensaje = "Error al guardar Movimientos de distribuidor"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -1981,11 +1991,28 @@ Partial Class Inventarios_RecepcionUsados
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
Protected Sub BtnRecibir_Click(sender As Object, e As EventArgs)
|
||||
DtMovimientos.Rows.Clear()
|
||||
|
||||
Me.CveRemisionRecibida = -1
|
||||
Me.CveRemisionRecibida = CType(CType(sender, LinkButton).NamingContainer, GridViewRow).DataKey("CveVenta").ToEntero()
|
||||
|
||||
|
||||
Dim DtUsados As DataTable = Nothing
|
||||
Dim CveCliente As Integer = -1
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveRemisionRecibida, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
EsDistribuidor = CBool(ObjVentas.DtResultados.Rows(0)("EsDistribuidor").ToString())
|
||||
CveCliente = ObjVentas.DtResultados.Rows(0)("CveCliente").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
If EsDistribuidor Then
|
||||
DivCliente.Visible = True
|
||||
Else
|
||||
DivCliente.Visible = False
|
||||
End If
|
||||
DdlClientes.SelectedValueExist(CveCliente)
|
||||
|
||||
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
|
||||
DtUsados = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
@@ -2004,11 +2031,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Dim Cantidad As Double = RowUsado("Cantidad").ToString().ToEntero()
|
||||
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
|
||||
|
||||
AddNew(CvePS, PS, CveUM, UM, Cantidad, PU,
|
||||
"", "-1", "-1", "-1", "", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño)
|
||||
AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño)
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user