-- cantidad minima

This commit is contained in:
2022-03-07 13:11:57 -07:00
parent 0414862fcd
commit 01ed3748d9

View File

@@ -2193,6 +2193,14 @@ Partial Class OC
Dim TotalPS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0) Dim TotalPS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, (txtPrecioUnitario.Text.ToDouble * TxtCant.Text.ToDouble) - TxtDescuentoAdd.Text.ToDouble, 0)
Dim ImportePS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, txtPrecioUnitario.Text.ToDouble, 0) Dim ImportePS As Double = If(txtPrecioUnitario.Text.ToDouble > 0, txtPrecioUnitario.Text.ToDouble, 0)
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100 Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
Dim CantidadVentaMinima As Decimal = DrPS("VentaMinima").ToString.ToDecimal
If CantidadVentaMinima > 0 AndAlso TxtCant.Text.ToDecimal > 0 Then
If TxtCant.Text.ToDecimal Mod CantidadVentaMinima <> 0 Then
Alert(String.Format("El producto se vende solo en cantidades de <b>{0:####.####}</b>", CantidadVentaMinima))
Exit Sub
End If
End If
'Si es Proveedor Extranjero el IVA es 0% 'Si es Proveedor Extranjero el IVA es 0%
If GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then If GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then