-- división enre cero
-- corrección apartir de
This commit is contained in:
@@ -2488,9 +2488,6 @@ Partial Class OC_OC
|
||||
SubProyecto = DdlSubProyectoGral.SelectedItem.Text
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
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))
|
||||
@@ -2509,8 +2506,6 @@ Partial Class OC_OC
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
AddPS(TxtCant.Text.ToDecimal, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS,
|
||||
CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto,
|
||||
CveSubProyectoVal, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer,
|
||||
@@ -4147,7 +4142,7 @@ Partial Class OC_OC
|
||||
e.Row.FCLiteral("LtlSubProyecto").Text = Str
|
||||
End If
|
||||
End If
|
||||
If e.Row.DBCampo("Descuento").ToDecimal > 0 Then
|
||||
If e.Row.DBCampo("Descuento").ToDecimal > 0 AndAlso e.Row.DBCampo("Cantidad").ToDecimal <> 0 AndAlso e.Row.DBCampo("Importe").ToDecimal <> 0 Then
|
||||
Dim Desc As Decimal = e.Row.DBCampo("Descuento").ToDecimal
|
||||
e.Row.FCLiteral("LtlDescuento").Text = String.Format("{0}<br/><p style ='font-style: italic; font-size: 10px;'>{1}%</p>", Desc.FormatoNumero, (Desc / (e.Row.DBCampo("Cantidad").ToDecimal * e.Row.DBCampo("Importe").ToDecimal) * 100.0).FormatoNumero)
|
||||
End If
|
||||
@@ -7180,7 +7175,6 @@ Partial Class OC_OC
|
||||
'CboE.SelectedIndex = 0
|
||||
CboE_SelectedIndexChanged(CboE, EventArgs.Empty)
|
||||
|
||||
|
||||
GvD.Columns(12).Visible = True 'Permitir la edicion
|
||||
lblTipoPadreHijo.Visible = False
|
||||
GvD.Columns(13).Visible = False
|
||||
@@ -7328,6 +7322,15 @@ Partial Class OC_OC
|
||||
DdlSAUsuario.DataSource = GlobalDTUsuarios(-1, CveEmpresaActual)
|
||||
DdlSAUsuario.DataBind()
|
||||
|
||||
'desasigna datos previos
|
||||
For Each dr As DataRow In DtDetalle.Rows
|
||||
dr("CantidadNoEditable") = 0
|
||||
dr("CveCompra") = DBNull.Value
|
||||
dr("NumComprasVinculadas") = 0
|
||||
|
||||
Next
|
||||
CargaDatosDetalles()
|
||||
|
||||
Dim CveProveedorPrevio As String = DdlProveedores.SelectedValue
|
||||
Dim CveProveedorSucursalPrevio As String = DdlProveedorSucursal.SelectedValue
|
||||
CargaProveedores()
|
||||
@@ -7346,12 +7349,6 @@ Partial Class OC_OC
|
||||
CargaEstatusUsuarios()
|
||||
CargaEstatusOC()
|
||||
|
||||
'Estatus Default 66
|
||||
If CveEmpresaActual = 66 Then
|
||||
CboE.SelectedValueExist(18)
|
||||
End If
|
||||
|
||||
|
||||
TxtFecha.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
lblNombreUsuario.Text = UsuarioActual.Nombre
|
||||
ViewState("CveOrdenCompra") = 0
|
||||
@@ -9539,6 +9536,11 @@ Partial Class OC_OC
|
||||
DdlSubProyectoEntrega.SelectedValueExist(DdlSubProyectoGral.SelectedValue)
|
||||
UPPLugarEntrega.Update()
|
||||
UPPDetalle.Update()
|
||||
'recorre las partidas, para asignarle el nuevo subproyecto-- asignado a una compra
|
||||
For Each dr As DataRow In DtDetalle.Rows
|
||||
dr("CveSubProyecto") = DdlSubProyectoGral.SelectedValue
|
||||
dr("SubProyecto") = DdlSubProyectoGral.SelectedItem.Text
|
||||
Next
|
||||
CargaFolios()
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user