Pendientes BDH
This commit is contained in:
@@ -2077,6 +2077,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Me.ObjRemisionNC.TipoDocumento = "Remisión"
|
||||
'NUM 1- CARGO 2- BONIFICACION
|
||||
Me.ObjRemisionNC.Num1 = 1
|
||||
'NUM 0- USADO 1- AJUSTE/GARANTIA
|
||||
Me.ObjRemisionNC.Num2 = RblUsadosAjuste.SelectedValue.ToEntero()
|
||||
Me.ObjRemisionNC.Alfa1 = ""
|
||||
Me.ObjRemisionNC.Alfa2 = ""
|
||||
Me.ObjRemisionNC.Alfa3 = ""
|
||||
@@ -2093,8 +2095,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Me.ObjRemisionNC.SetCliente()
|
||||
Me.ObjRemisionNC.CveAlmacen = -1
|
||||
|
||||
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
@@ -2133,6 +2133,9 @@ Partial Class Inventarios_RecepcionUsados
|
||||
'DETALLES
|
||||
Me.ObjRemisionNC.DtDetalle = CreaDTDetalleRNC()
|
||||
|
||||
'GUARDAR AJUSTES
|
||||
Me.ObjRemisionNC.DtAjustes = TmpDTAjustes
|
||||
|
||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, Me.ObjRemisionNC.CveCliente, Me.ObjRemisionNC.CveVendedor, UsuarioActual.CveEmpresa) Then
|
||||
@@ -2517,37 +2520,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDTAjustes.Columns.Add("PUFactura", GetType(Double))
|
||||
End Sub
|
||||
Private Sub CargaAjusteDetalle()
|
||||
Dim Dr As DataRow = Nothing
|
||||
IndexAjuste = 0
|
||||
For Each Dr2 As DataRow In TmpDTAjustes.Rows
|
||||
If Dr2("ConsecutivoVenta").ToString.ToEntero = ConsecutivoVenta Then
|
||||
Dr = Dr2
|
||||
Exit For
|
||||
End If
|
||||
IndexAjuste += 1
|
||||
Next
|
||||
If Dr IsNot Nothing Then
|
||||
IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr)
|
||||
DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString)
|
||||
TxtConsecutivoAjuste.Text = Dr("Consecutivo").ToString
|
||||
TxtCodEnsamble.Text = Dr("CodigoEnsamble").ToString
|
||||
DdlTipoUso.SelectedValueExist(Dr("CveTipoUso").ToString)
|
||||
TxtCodLinea.Text = Dr("CodigoLinea").ToString
|
||||
TxtCodInspeccion.Text = Dr("CodigoInspeccion").ToString
|
||||
TxtMesesUso.Text = Dr("Meses").ToString
|
||||
DdlTipoDefecto.SelectedValueExist(Dr("CveTipoDefecto").ToString)
|
||||
TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString
|
||||
TxtPoliza.Text = Dr("NumPoliza").ToString
|
||||
TxtImporteAjuste.Text = Dr("Importe").ToString
|
||||
'DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString)
|
||||
CargaPSAjuste()
|
||||
DdlPSAjuste.SelectedValue = (Dr("CvePS").ToString)
|
||||
TxtFechaAjuste.Text = Dr("FechaAjuste").ToString.ToDate.ToShortDateString
|
||||
txtPrecio.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
|
||||
txtPrecio.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaPSAjuste()
|
||||
DdlPSAjuste.setEsWebService(True)
|
||||
End Sub
|
||||
@@ -2561,7 +2533,14 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
|
||||
If drPS IsNot Nothing Then
|
||||
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||
Dim CvePrecioListaPS As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=DdlClientes.SelectedValue.ToEntero).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
Dim PS As String = drPS("PS").ToString
|
||||
CveMarca = drPS("CveMarca").ToString.ToEntero
|
||||
CveClasificacion = drPS("CveClasificacion").ToString.ToEntero
|
||||
@@ -2720,7 +2699,45 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
Private Sub GuardaAjuste()
|
||||
|
||||
Dim CargoAnterior As Double = 0
|
||||
Dim CargoActual As Double = 0
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = TmpDTAjustes.NewRow
|
||||
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||
Row("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||
Row("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||
Row("CodigoLinea") = TxtCodLinea.Text
|
||||
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||
Row("Consecutivo") = TxtConsecutivoAjuste.Text
|
||||
Row("FechaAjuste") = TxtFechaAjuste.Text.ToDate
|
||||
Row("Meses") = TxtMesesUso.Text.ToEntero
|
||||
Row("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDouble
|
||||
Row("NumPoliza") = TxtPoliza.Text
|
||||
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||
Row("ConsecutivoVenta") = TxtConsecutivoAjuste.Text.ToEntero()
|
||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||
Row("PS") = DdlPSAjuste.SelectedText
|
||||
Row("CveVenta") = -1
|
||||
Row("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||
Row("Cantidad") = 1
|
||||
Dim CveUM As Integer = -1
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
CveUM = Dr("CveUnidadMedida").ToString.ToEntero
|
||||
CargoAnterior = Dr("Cargo").ToString.ToDouble
|
||||
End If
|
||||
End If
|
||||
Row("CveUM") = CveUM
|
||||
Row("CveVentaDetalle") = -1
|
||||
TmpDTAjustes.Rows.Add(Row)
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
||||
CalculaMesesUso()
|
||||
End Sub
|
||||
@@ -2774,6 +2791,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Alert("No se pudo cargar el producto", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
GuardaAjuste()
|
||||
End Sub
|
||||
|
||||
Protected Sub CargarDescuento()
|
||||
|
||||
Reference in New Issue
Block a user