--SMS - 2024.01.24
--En la opción de venta directa: no importa el cliente/hospital que se seleccione, la lista de precios predeterminada debe de ser la de venta directa --Al cancelar una cirugía se debe de ver reflejado en almacén y en ordenes de servicio
This commit is contained in:
@@ -8637,16 +8637,20 @@
|
||||
}
|
||||
|
||||
//FUNCIONES PARA COMERCIO EXTERIOR
|
||||
function CalculaTotalUSD(TotalUSD, ValorUnitario, TxtCantidad) {
|
||||
TotalUSD.innerText = FormatoNumero(ToDouble(ValorUnitario.value) * ToDouble(TxtCantidad.value), 2);
|
||||
}
|
||||
|
||||
function CalculaPU_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
|
||||
TxtValorUnitario.value = FormatoNumero(ToDouble(TotalUSD) / ToDouble(TxtCantidad.value), 6);
|
||||
if(ToDouble(TxtCantidad.value) > 0){
|
||||
TxtValorUnitario.value = ((ToDouble(TotalUSD) / ToDouble(TxtCantidad.value)).toFixed(6)).toString();
|
||||
}else{
|
||||
TxtValorUnitario.value = "0";
|
||||
}
|
||||
}
|
||||
|
||||
function CalculaCantidad_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
|
||||
TxtCantidad.value = FormatoNumero(ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value), 6);
|
||||
if (ToDouble(TxtValorUnitario.value) > 0) {
|
||||
TxtCantidad.value = ((ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value)).toFixed(6)).toString();
|
||||
}else{
|
||||
TxtCantidad.value = "0";
|
||||
}
|
||||
}
|
||||
|
||||
function LimitaCantidadAplicaDev(Cantidad, TxtCantidadAplicaDevolucion) {
|
||||
|
||||
@@ -16931,6 +16931,21 @@ Partial Class Ventas
|
||||
CvePrecioListaPS = CvePrecioListaSugerido
|
||||
End If
|
||||
|
||||
Dim CvePrecioListaPredeterminada = -1
|
||||
Dim AplicaPredeterminado As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso RBLTipoVenta.SelectedValue = "2" Then
|
||||
AplicaPredeterminado = True
|
||||
CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero()
|
||||
If CvePrecioListaPredeterminada > 0 Then
|
||||
CvePrecioListaPS = CvePrecioListaPredeterminada
|
||||
End If
|
||||
End If
|
||||
|
||||
If AplicaPredeterminado AndAlso CvePrecioListaPredeterminada <= 0 Then
|
||||
Alert("No hay una lista de precios predeterminada", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
@@ -16940,6 +16955,10 @@ Partial Class Ventas
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If AplicaPredeterminado AndAlso PrecioSugerido <= 0 Then
|
||||
Alert("El producto y/o servicio no tiene asignado un valor en la lista de precios predeterminada", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
@@ -24453,8 +24472,9 @@ Partial Class Ventas
|
||||
ChkDevAlm.Checked = True
|
||||
End If
|
||||
|
||||
'LOS PEDIDOS SE DEBE CANCELAR EN UN PROCESO DISTINTO
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Ped" Then
|
||||
ChkDevAlm.Checked = True
|
||||
ChkDevAlm.Checked = False
|
||||
End If
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||
|
||||
Reference in New Issue
Block a user