Commit del IE
This commit is contained in:
@@ -228,9 +228,9 @@ Public Class ClsContabilidad
|
||||
|
||||
|
||||
|
||||
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Boolean
|
||||
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Integer
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Conta_PrePolizasNegativaAdd")
|
||||
|
||||
@@ -240,11 +240,12 @@ Public Class ClsContabilidad
|
||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CvePrePolizaNueva", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePolizaNueva").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
@@ -4225,6 +4225,12 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
CveConceptoContableAlmacen = 225
|
||||
End If
|
||||
|
||||
'Condiciones para los casos de facturas que son en 0 pero que se utiliza el almacen
|
||||
ElseIf OCVinculada AndAlso Not (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
||||
ElseIf (CveImportacion > 0 Or CveFlete > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
CveConceptoContableAlmacen = CveConceptoContableAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -6228,7 +6234,6 @@ Partial Class Compras_Compras
|
||||
If ContienePSNeteoBonif Then
|
||||
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 ").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
If importeMovimiento <> 0 Then
|
||||
Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
@@ -6238,7 +6243,6 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -390,23 +390,37 @@ Partial Class PopUpAuxiliar
|
||||
Dim TieneError As Boolean = False
|
||||
ObjContabilidad.IniciaTransacSQL()
|
||||
|
||||
If ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) Then
|
||||
Alert("Se agrego polzia negativa correctamente.")
|
||||
Else
|
||||
Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate)
|
||||
|
||||
If Not CvePrePolizaNueva > 0 Then
|
||||
|
||||
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
ObjContabilidad.RollBack()
|
||||
Else
|
||||
If Not TieneError Then
|
||||
|
||||
ObjContabilidad.Commit()
|
||||
Dim Str As New StringBuilder
|
||||
Str.Append("Se agrego la póliza de cancelación correctamente.<br/>")
|
||||
RegistraScript(" $('#DivCancelar').modal('hide'); ")
|
||||
CargaDatos()
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", ObjContabilidad.ContaIdPoliza)
|
||||
|
||||
End If
|
||||
End If
|
||||
Alert(Str.ToString)
|
||||
Else
|
||||
ObjContabilidad.RollBack()
|
||||
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -694,7 +694,7 @@ Partial Class RepCxC
|
||||
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlResponsable.SelectedItem.Text}")
|
||||
Dim EstatusCob = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $" <b>Estatus Cobranza:</b> {DdlCobranzaEstatus.SelectedItem.Text}")
|
||||
'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim EstatusCli = If(DdlEstatusCliente.SelectedValue = "-1", "", $" <b>Clientes:</b> {DdlEstatusCliente.SelectedItem.Text}")
|
||||
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" <b>Clasificación Cliente:</b> {DdlClienteClasificacion.SelectedItem.Text}")
|
||||
|
||||
@@ -725,7 +725,7 @@ Partial Class RepCxC
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{EstatusCli}{ClasificacionCli}"))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{EstatusCli}{ClasificacionCli}{CorteA}"))
|
||||
params.Add(New ReportParameter("TituloReporte", TituloReporte))
|
||||
params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString))
|
||||
|
||||
|
||||
@@ -833,7 +833,7 @@ Partial Class RepCxCDetalle
|
||||
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlResponsable.SelectedItem.Text}")
|
||||
Dim EstatusCob = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $" <b>Estatus Cobranza:</b> {DdlCobranzaEstatusFiltro.SelectedItem.Text}")
|
||||
'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" <b>Clasificación Cliente:</b> {DdlClienteClasificacion.SelectedItem.Text}")
|
||||
|
||||
Dim TituloReporte As String = "REPORTE DE CUENTAS POR COBRAR DEL CLIENTE CON DETALLE"
|
||||
@@ -850,7 +850,7 @@ Partial Class RepCxCDetalle
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}"))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}{CorteA}"))
|
||||
params.Add(New ReportParameter("TituloReporte", TituloReporte))
|
||||
|
||||
If Imagen.Exists Then
|
||||
|
||||
@@ -1419,7 +1419,7 @@
|
||||
</td>
|
||||
<td><b>T.C.:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static" Readonly ="true"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="CVTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" ID="LblTCValuacion" ToolTip="Última Valuación" Text="" Visible="false"></asp:Label>
|
||||
|
||||
@@ -20758,13 +20758,19 @@ Partial Class Ventas
|
||||
CalculaTotalesVenta(True)
|
||||
|
||||
|
||||
|
||||
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
|
||||
If Not AplicaNCMasiva Then
|
||||
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
|
||||
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
||||
CargaNCDT(CveVenta, TT)
|
||||
End If
|
||||
|
||||
End If
|
||||
'verifica el tipo de cambio que se actualice
|
||||
If DdlMoneda.SelectedValue <> "1" Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString
|
||||
End If
|
||||
LblTCValuacion.Visible = False
|
||||
UpPS.Update()
|
||||
|
||||
LBNotaCredito.Visible = False
|
||||
|
||||
Reference in New Issue
Block a user