-- cambio en TC de anticipos

-- no actualizar os con cveventa, agenerarlo desde pedido
This commit is contained in:
2024-01-17 10:05:37 -07:00
parent 2e62a05a7b
commit b3f0688022
2 changed files with 12 additions and 14 deletions

View File

@@ -4370,7 +4370,7 @@
<label class="col-md-2">Fecha:</label></b>
<div class="col-md-4">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80% !important; padding: 0px;">
<asp:TextBox ID="TxtFechaAnticipoCliente" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<asp:TextBox ID="TxtFechaAnticipoCliente" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10" AutoPostBack="true" OnTextChanged="TxtFechaAnticipoCliente_TextChanged"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaAnticipoCliente" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>

View File

@@ -13644,19 +13644,12 @@ Partial Class Ventas
GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList, CveVentaOS:=factura.CveVenta, SerieFolioOS:=factura.SerieFolio)
If ErrorList.Count = 0 Then
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOSVentaMedica) Then
ErrorList.Add("Ocurrió un error al guardar la venta en Ordenes de Servicio")
End If
End If
If Not ObjVentas.SincronizacionProcedimientoProducto(DdlProcedimiento.SelectedValue.ToEntero, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ErrorList.Add("Ocurrió un error al guardar los productos al procedimiento")
End If
End If
'Si viene de OS, Se guarda CveVenta en OS
If CveOS > 0 Then
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOS) Then
@@ -15849,16 +15842,17 @@ Partial Class Ventas
'Else
' tipoCambio = GlobalTipoCambio(e.Row.DataKey("Fecha").ToString().ToDate).ToDecimal
'End If
tipoCambio = e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal
If TxtFechaAnticipoCliente.Text = "" Then TxtFechaAnticipoCliente.Text = Now.ToShortDateString
tipoCambio = GlobalTipoCambio(TxtFechaAnticipoCliente.Text.ToDate).ToDecimal 'e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal
e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).Text = tipoCambio.FormatoNumero(4)
If DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 1 Then
If DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToEntero() = 1 Then
saldo = e.Row.DataKey("Saldo").ToDecimal
ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 1 And tipoCambio > 0 Then
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal / tipoCambio)
ElseIf DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 2 Then
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal * tipoCambio)
ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 And e.Row.DBCampo("CveMoneda").ToEntero() = 1 And tipoCambio > 0 Then
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal / tipoCambio).TruncateDecimal
ElseIf DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToEntero() = 2 Then
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal * tipoCambio).TruncateDecimal
Else
saldo = e.Row.DataKey("Saldo").ToDecimal
End If
@@ -36499,5 +36493,9 @@ Partial Class Ventas
End If
End Sub
Protected Sub TxtFechaAnticipoCliente_TextChanged(sender As Object, e As EventArgs)
CargaAnticipos(CveCliente)
End Sub
End Class