Validar importes, recepcion de usados cuando es garantia
This commit is contained in:
@@ -2803,11 +2803,20 @@ Partial Class Inventarios_RecepcionUsados
|
||||
PS = Dr("PSCodigo").ToString
|
||||
UnidadMedida = Dr("UnidadMedida").ToString
|
||||
Clasificacion = Dr("Clasificacion").ToString
|
||||
|
||||
End If
|
||||
PorcentajeIVA = 0.16D
|
||||
IVA = SubTotal * PorcentajeIVA
|
||||
Dim Descuento As Decimal = 0
|
||||
|
||||
AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "", PU, 0, -1, "",
|
||||
Dim ImporteCargo As Decimal = GlobalDTAcumTamaños().FiltroPrimeroValor("Cargo", String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)).ToDecimal()
|
||||
|
||||
'SI ES AJUSTE O GARANTIA SOLO DEBE SUMAR EL IMPORTE DE LA GARANTIA SI NO RECIBIO USADO
|
||||
If RblUsadosAjuste.SelectedValue = "1" AndAlso ImporteCargo <= 0 Then
|
||||
Descuento = (Cantidad * PU).RoundSQL(6)
|
||||
End If
|
||||
|
||||
AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "", PU, Descuento, -1, "",
|
||||
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA, CveTamaño:=CveTamaño)
|
||||
Else
|
||||
Alert("No se pudo cargar el producto", TipoMensaje.MsgError)
|
||||
@@ -2863,14 +2872,14 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Dim ImporteRetIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetIVA").ToDecimal()
|
||||
Dim ImporteRetISR As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetISR").ToDecimal()
|
||||
Dim ImporteIEPS As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIEPS").ToDecimal()
|
||||
Dim Descuento As Decimal = ObjRemisionNC.DtDetalle.SUM("Descuento").ToDecimal()
|
||||
Dim DescuentoTotal As Decimal = ObjRemisionNC.DtDetalle.SUM("Descuento").ToDecimal()
|
||||
Dim Amortizacion As Decimal = 0
|
||||
|
||||
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
|
||||
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + DescuentoTotal + Amortizacion)
|
||||
|
||||
'DETALLES
|
||||
ObjRemisionNC.SubTotal = TotalImporte
|
||||
ObjRemisionNC.Descuento = Descuento
|
||||
ObjRemisionNC.Descuento = DescuentoTotal
|
||||
ObjRemisionNC.Amortizacion = Amortizacion
|
||||
ObjRemisionNC.IVA = ImporteIVA
|
||||
ObjRemisionNC.RetIVA = ImporteRetIVA
|
||||
|
||||
Reference in New Issue
Block a user