registro de productos, el iva que tome el de lasucursal, enlugar de cero

This commit is contained in:
2021-08-17 20:55:22 -07:00
parent 99155f449f
commit 95f3a17545

View File

@@ -4580,7 +4580,7 @@ Partial Class Contratos_ContratoObra
CveUnidadMedida = GlobalDTUnidadesMedida(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveUnidadMedida").ToString.ToEntero
End If
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, 0, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, -1, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=2, CveSATPS:=-1, CveMarca:=-1, CveTamaño:=-1, CveMedida:=-1, CveRinTamaño:=-1, CveModelo:=-1, Litraje:=-1, IEPSPorcentaje:=-1, CveClasificacion2:=-1, CveClasificacionDetalle:=-1) > 0 Then
CvePS = ObjPS.CvePS
Else
@@ -4656,17 +4656,12 @@ Partial Class Contratos_ContratoObra
End If
If Not DTCargaPresupuestoManoObra Is Nothing And Not ErrorProceso Then
For Each DrowPS As DataRow In DTCargaPresupuestoManoObra.Rows
Dim CveActividad As Integer = 0
Dim Actividad As String
If DrowPS("Actividad").ToString.Trim.Length > 0 Then
GlobalDTRHActividades(UsuarioActual.CveEmpresa) = Nothing
CveActividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActividad", $" Actividad = '{ DrowPS("Actividad").ToString.Trim }'").ToEntero
@@ -4691,14 +4686,11 @@ Partial Class Contratos_ContratoObra
End If
ObjRH.Dispose()
End If
If CveActividad > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 And Not ErrorProceso Then
Actividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Actividad", $" CveActividad = {CveActividad}")
Dim Row As DataRow = DTPS.NewRow()
Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble
Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble
@@ -4717,7 +4709,6 @@ Partial Class Contratos_ContratoObra
Row("CveActividad") = CveActividad
Row("CveSubTipoActivoFijo") = -1
Row("Dias") = DrowPS("Dias").ToString.ToEntero
Row("NoIdentificacion") = ""
Row("OCInterna") = ""
Row("LimitarCantidad") = 0
@@ -4905,7 +4896,6 @@ Partial Class Contratos_ContratoObra
Dim NrowTmpDT As DataRow = TmpDT.NewRow
NrowTmpDT("Cantidad") = Row("Cantidad")
NrowTmpDT("CantidadContratada") = Row("CantidadContratada")
NrowTmpDT("CveUM") = Row("CveUM")
@@ -4933,7 +4923,6 @@ Partial Class Contratos_ContratoObra
NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo")
NrowTmpDT("Dias") = Row("Dias")
NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
TmpDT.Rows.Add(NrowTmpDT)
@@ -4946,7 +4935,6 @@ Partial Class Contratos_ContratoObra
End If
Next
If ErrorProceso Then
ObjContratos.RollBack()
Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError)