This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-07-06 20:28:01 -07:00
41 changed files with 808 additions and 619 deletions

View File

@@ -300,7 +300,7 @@
</asp:BoundField>--%> </asp:BoundField>--%>
<asp:TemplateField HeaderText="Por Pagar"> <asp:TemplateField HeaderText="Por Pagar">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblXPagar" runat="server" Text='<%# (CDbl(Eval("Ejercido").ToString) - CDbl(Eval("Pagado").ToString)).ToString("N2")%>'></asp:Label> <asp:Label ID="lblXPagar" runat="server" Text='<%# (CDbl(Eval("Devengado").ToString) - CDbl(Eval("Pagado").ToString)).ToString("N2")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="120px" /> <ItemStyle HorizontalAlign="Right" Width="120px" />
</asp:TemplateField> </asp:TemplateField>

View File

@@ -829,11 +829,12 @@ Public Class ClsBancos
Return Retorno Return Retorno
End Function End Function
Public Function GetPrePolizasDetalle(CvePrePoliza As Integer, Optional CveIE As Integer = -1, Optional CveOC As Integer = -1) As Boolean Public Function GetPrePolizasDetalle(CvePrePoliza As Integer, CveEmpresa As Integer, Optional CveIE As Integer = -1, Optional CveOC As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizasDetalleGet") DataAdapter("PA_Conta_PrePolizasDetalleGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveIE", SqlDbType.Int).Value = CveIE .Add("@CveIE", SqlDbType.Int).Value = CveIE
.Add("@CveOC", SqlDbType.Int).Value = CveOC .Add("@CveOC", SqlDbType.Int).Value = CveOC
End With End With

View File

@@ -77,13 +77,6 @@ Public Class ClsClientes
Public Property IdCtaContRetIVA As Integer Public Property IdCtaContRetIVA As Integer
Public Property IdCtaContRetISR As Integer Public Property IdCtaContRetISR As Integer
Public Property IdCtaContFondoGarantia As Integer Public Property IdCtaContFondoGarantia As Integer
Public Property CveCuentaClientes As Integer
Public Property CveCuentaMonedaExtranjera As Integer
Public Property CveCuentaComplementaria As Integer
Public Property CveCuentaAnticipos As Integer
Public Property CveCuentaRetIVA As Integer
Public Property CveCuentaRetISR As Integer
Public Property CveCuentaFondoGarantia As Integer
Public Property Codigo As String Public Property Codigo As String
Public Property LimiteCredito As Double Public Property LimiteCredito As Double
'Public Property NumCtaPago As String 'Public Property NumCtaPago As String
@@ -335,13 +328,7 @@ Public Class ClsClientes
_IdCtaContRetIVA = Data.Rows(0)("IdCtaContRetIVA").ToString.ToEntero _IdCtaContRetIVA = Data.Rows(0)("IdCtaContRetIVA").ToString.ToEntero
_IdCtaContRetISR = Data.Rows(0)("IdCtaContRetISR").ToString.ToEntero _IdCtaContRetISR = Data.Rows(0)("IdCtaContRetISR").ToString.ToEntero
_IdCtaContFondoGarantia = Data.Rows(0)("IdCtaContFondoGarantia").ToString.ToEntero _IdCtaContFondoGarantia = Data.Rows(0)("IdCtaContFondoGarantia").ToString.ToEntero
_CveCuentaClientes = Data.Rows(0)("IdCtaContClientesSIG").ToString.ToEntero
_CveCuentaMonedaExtranjera = Data.Rows(0)("IdCtaContMonedaExtranjeraSIG").ToString.ToEntero
_CveCuentaComplementaria = Data.Rows(0)("IdCtaContComplementariaSIG").ToString.ToEntero
_CveCuentaAnticipos = Data.Rows(0)("IdCtaContAnticiposSIG").ToString.ToEntero
_CveCuentaRetIVA = Data.Rows(0)("IdCtaContRetIVASIG").ToString.ToEntero
_CveCuentaRetISR = Data.Rows(0)("IdCtaContRetISRSIG").ToString.ToEntero
_CveCuentaFondoGarantia = Data.Rows(0)("IdCtaContFondoGarantiaSIG").ToString.ToEntero
'_ConvenioCIE = Data.Rows(0)("ConvenioCIE").ToString '_ConvenioCIE = Data.Rows(0)("ConvenioCIE").ToString
_FormaFacturacion = Data(0)("FormaFacturacion").ToString _FormaFacturacion = Data(0)("FormaFacturacion").ToString
_LimiteCredito = Data(0)("LimiteCredito").ToString.ToDouble _LimiteCredito = Data(0)("LimiteCredito").ToString.ToDouble

View File

@@ -286,8 +286,18 @@ Public Class ClsContabilidad
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al Actualizar la Prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) If ex.Message.Contains("CuentasResultados_SubProyectos") Then
OnError("El concepto requiere que se le especifique centro de costo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
If ex.Message.Contains("concepto de bancos con un importe diferente") Then
OnError("No se puede editar el valor del bancos con un valor diferente a movimiento registrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
OnError("Ocurrió un error al Actualizar la Prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If
End If
End Try End Try
Return Retorno Return Retorno
@@ -1080,12 +1090,13 @@ Public Class ClsContabilidad
Return Concepto Return Concepto
End Function End Function
Public Function GetPrePolizasDetalle(CvePrePoliza As Integer, Optional CveIE As Integer = -1) As Boolean Public Function GetPrePolizasDetalle(CvePrePoliza As Integer, CveEmpresa As Integer, Optional CveIE As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizasDetalleGet") DataAdapter("PA_Conta_PrePolizasDetalleGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@CveIE", SqlDbType.Int).Value = CveIE .Add("@CveIE", SqlDbType.Int).Value = CveIE
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try

View File

@@ -5020,7 +5020,41 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetRNCRelacionadas(CveVenta As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RNCRelacionadasGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las ventas con usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function RemoveRNCFacturada(CveVentaNC As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RNCRelacionadasRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVentaNC", SqlDbType.Int).Value = CveVentaNC
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar las RNC Relacionadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region #End Region

View File

@@ -2962,6 +2962,85 @@ Namespace Modelos
End If End If
Next Next
End If End If
If UsuarioActual.Empresa.Funcionalidad(344) = "1" AndAlso ObjFactura.TipoDocto = "Egs" Then
Dim ListaNC As List(Of Modelos.Factura) = New List(Of Factura)
Dim DtRNCRelacionas As DataTable = Nothing
If ObjVentas.GetRNCRelacionadas(CveVenta) Then
DtRNCRelacionas = ObjVentas.DtResultados.Copy
End If
If DtRNCRelacionas IsNot Nothing Then
For Each RowRNC As DataRow In DtRNCRelacionas.Rows
ListaNC.Add(New Modelos.Factura(UsuarioActual, RowRNC("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa) With {.TotalRemNCAplicado = RowRNC("ImporteAplicado").ToString().ToDecimal()})
Next
End If
If ListaNC IsNot Nothing Then
For Each ObjRNC As Modelos.Factura In ListaNC
If ObjRNC.TipoDocto = "RNC" Then
importeMovimiento = ObjRNC.TotalRemNCAplicado
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
CveSubProyectoContabilizar = CveSubProyectoVenta
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
If tipoCambio = 1 Then
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
Else
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
End If
IdCtaContableCliente = IdCtaContable
Dim CveMovimiento As Integer = -1
Dim CveAlmacen As Integer = -1
If ObjInventario IsNot Nothing AndAlso ObjInventario.GetInv_Mov(ObjRNC.CveVenta, UsuarioActual.CveEmpresa) Then
CveMovimiento = ObjInventario.DtResultados.FiltroPrimeroValor("CveMovimiento", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
CveAlmacen = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen", "CvePS IS NULL AND CveConcepto = 42").ToEntero()
End If
'VERIFICA SI TIENE MOVIMIENTO DE ENTRADA DE USADO
If CveMovimiento > 0 AndAlso CveAlmacen > 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjRNC.CveVenta, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
End If
Dim SubTotalCalculado As Decimal = (importeMovimiento / (1D + ObjRNC.PorcentajeIVA)).ToDecimal
Dim Importe318 As Decimal = (SubTotalCalculado * ObjRNC.PorcentajeIVA).RoundSQL(2).ToDecimal()
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjRNC.CveVenta, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, SubTotalCalculado, Referencia, 150, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjRNC.CveVenta, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=ObjRNC.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjRNC.CveSubProyecto, ImporteMX:=SubTotalCalculado, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, Contabilizable:=False) Then
ErrorPrepoliza = True
End If
Else
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjRNC.CveVenta, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjRNC.CveVenta, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True
End If
Else
ErrorPrepoliza = True
End If
End If
importeMovimiento = 0
End If
Next
If Not ObjVentas.RemoveRNCFacturada(CveVenta) Then
ErrorPrepoliza = True
End If
End If
End If
Else Else
If ObjFactura.DtAnticipos IsNot Nothing Then If ObjFactura.DtAnticipos IsNot Nothing Then
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
@@ -4910,7 +4989,7 @@ Namespace Modelos
'CANCELA PREPOLIZA 'CANCELA PREPOLIZA
If Not ErrorCancelar Then If Not ErrorCancelar Then
ErrorCancelar = ProcesoPrepolizas(ObjFactura, ObjConta, -1, ObjFactura.DtDetalle, ObjAC, -1, ObjBancos, ObjVentas, ObjEventos, DtRemisionesRelacionadas:=DtRemisionesRelacionadas, SeCancelaRemisionProceso:=SeCancelaRemisionProceso, ErrorCancelar = ProcesoPrepolizas(ObjFactura, ObjConta, -1, ObjFactura.DtDetalle, ObjAC, -1, ObjBancos, ObjVentas, ObjEventos, DtRemisionesRelacionadas:=DtRemisionesRelacionadas, SeCancelaRemisionProceso:=SeCancelaRemisionProceso,
CancelarRemisiones:=CancelarRemisiones, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveEstatusRefacturacion:=CveEstatusRefacturacion) CancelarRemisiones:=CancelarRemisiones, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveEstatusRefacturacion:=CveEstatusRefacturacion, ObjInventario:=ObjInventario)
MensajeError = "Ocurrió un error al generar la prepoliza de cancelación." MensajeError = "Ocurrió un error al generar la prepoliza de cancelación."
End If End If

View File

@@ -813,10 +813,15 @@ Public Class Timbrado
'validación especial. 'validación especial.
If Ventas.TipoDocto.Contiene("Ing", "Dev") Then If Ventas.TipoDocto.Contiene("Ing", "Dev") Then
Dim CodigoIncorrecto As Integer = (From c In Ventas.Timbre.Conceptos Where (c.ClaveProdServ = "84111506" Or c.ClaveProdServ = "01010101") Dim CodigoIncorrecto = (From c In Ventas.Timbre.Conceptos Where (c.ClaveProdServ = "01010101") OrElse (c.ClaveProdServ = "84111506" AndAlso Not UsuarioActual.CveEmpresa.Contiene(2, 70))
Select c.ClaveProdServ).Count() Select c.ClaveProdServ, c.Descripcion)
If CodigoIncorrecto > 0 Then Dim Str As New StringBuilder
MensajeErrorCFDI = "SAT - Hay un concepto con Codigo no permitido." Str.Append("Los siguentes productos tienen especificado un código no permitido por el SAT: <br/>")
For Each dr In CodigoIncorrecto
Str.AppendFormat(" - {0} <br/>", dr.Descripcion)
Next
If CodigoIncorrecto.Count > 0 Then
MensajeErrorCFDI = Str.ToString
Return False Return False
End If End If

View File

@@ -1777,7 +1777,7 @@ Namespace Extensiones
'Dim UsuarioResponsable As String = "" 'Dim UsuarioResponsable As String = ""
Dim PreP As New ClsContabilidad Dim PreP As New ClsContabilidad
If PreP.GetPrePolizasDetalle(-1, pCveIE) Then If PreP.GetPrePolizasDetalle(-1, tCveEmpresa, CveIE:=pCveIE) Then
If PreP.DtResultados.Rows.Count > 0 Then If PreP.DtResultados.Rows.Count > 0 Then
CveProveedor = PreP.DtResultados.Rows(0)("CveProveedor").ToString.ToEntero CveProveedor = PreP.DtResultados.Rows(0)("CveProveedor").ToString.ToEntero
CvePersonal = PreP.DtResultados.Rows(0)("CvePersonal").ToString.ToEntero CvePersonal = PreP.DtResultados.Rows(0)("CvePersonal").ToString.ToEntero

View File

@@ -25,48 +25,80 @@ Public Class E72 : Implements IHttpHandler, IRequiresSessionState
End Try End Try
End Sub End Sub
Private Function contratoexistencia(ByVal context As HttpContext) As String Private Function contratoexistencia(ByVal context As HttpContext) As String
Dim retorno As String = "" Dim retorno As String = ""
Dim ObjInv As New ClsInventarios Dim ObjInv As New ClsInventarios
Try Try
Dim DtMovimientos As DataTable = CreaDT() Dim DtPS As DataTable = CreaDT()
ObjInv.GetRepEntradasSalidasXContrato(72, -1, MinFecha, Date.Now, -1, -1, 17, -1, -1, 3, -1, 1158) ObjInv.GetRepEntradasSalidasXContrato(72, -1, MinFecha, Date.Now, -1, -1, 17, -1, -1, 3, -1, 1158)
Dim DtRepEntradasSalidasXContrato As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0") Dim DtRepEntradasSalidasXContrato As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0")
ObjInv.ApartadosRep(-1, 70437, 259, 72, -1, MinFecha, Date.Now) ObjInv.ApartadosRep(-1, 70437, 259, 72, -1, MinFecha, Date.Now)
Dim DtApartados As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0", "", {"CvePS", "Cantidad"}) Dim DtApartados As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0", "", {"CvePS", "Codigo", "Cantidad"})
Dim asd As Integer = DtApartados.Rows.Count Dim asd As Integer = DtApartados.Rows.Count
For Each tempApartados As DataRow In DtApartados.Rows 'For Each tempApartados As DataRow In DtApartados.Rows
For Each tempEntradasSalidas As DataRow In DtRepEntradasSalidasXContrato.Rows ' For Each tempEntradasSalidas As DataRow In DtRepEntradasSalidasXContrato.Rows
Dim dr As DataRow = DtMovimientos.NewRow ' Dim dr As DataRow = DtMovimientos.NewRow
If tempEntradasSalidas("CvePS").ToString.ToEntero = tempApartados("CvePS").ToString.ToEntero Then ' If tempEntradasSalidas("CvePS").ToString.ToEntero = tempApartados("CvePS").ToString.ToEntero Then
dr("Codigo") = tempEntradasSalidas("Codigo") ' dr("Codigo") = tempEntradasSalidas("Codigo")
dr("Existencia") = tempEntradasSalidas("SaldoFCant") ' dr("Existencia") = tempEntradasSalidas("SaldoFCant")
dr("Cantidad") = tempApartados("Cantidad") ' dr("Cantidad") = tempApartados("Cantidad")
dr("Precio") = tempEntradasSalidas("PrecioVenta") ' dr("Precio") = tempEntradasSalidas("PrecioVenta")
Else ' Else
dr("Codigo") = tempEntradasSalidas("Codigo") ' dr("Codigo") = tempEntradasSalidas("Codigo")
dr("Existencia") = tempEntradasSalidas("SaldoFCant") ' dr("Existencia") = tempEntradasSalidas("SaldoFCant")
dr("Cantidad") = 0 ' dr("Cantidad") = 0
dr("Precio") = tempEntradasSalidas("PrecioVenta") ' dr("Precio") = tempEntradasSalidas("PrecioVenta")
End If ' End If
DtMovimientos.Rows.Add(dr) ' DtMovimientos.Rows.Add(dr)
' Next
'Next
For Each tempEntradasSalidas As DataRow In DtRepEntradasSalidasXContrato.Rows
Dim dr As DataRow = DtPS.NewRow
dr("Codigo") = tempEntradasSalidas("Codigo")
DtPS.Rows.Add(dr)
DtPS.AcceptChanges()
Next
Next Next
Dim dtExistencias = From row In DtMovimientos.FiltraParametros("", "", {"Codigo", "Existencia", "Cantidad", "Precio"}) For Each tempApartados As DataRow In DtApartados.Rows
Group row By Codigo = row.Field(Of String)("Codigo"), Existencia = row.Field(Of Double)("Existencia"), Precio = row.Field(Of Double)("Precio") Into CodigoGroup = Group Dim dr As DataRow = DtPS.NewRow
Select New With { dr("Codigo") = tempApartados("Codigo")
.Codigo = Codigo, DtPS.Rows.Add(dr)
.Existencia = Existencia, DtPS.AcceptChanges()
.Cantidad = CodigoGroup.Sum(Function(r) r.Field(Of Double)("Cantidad")),
.Precio = Precio} Next
Dim DTtemp As DataTable = DtPS.FiltraParametros("", "", {"Codigo", "Existencia", "Cantidad", "Precio"})
For Each Movs As DataRow In DTtemp.Rows
For Each tempEntradasSalidas As DataRow In DtRepEntradasSalidasXContrato.Rows
If tempEntradasSalidas("Codigo").ToString = Movs("Codigo").ToString Then
Movs("Existencia") = tempEntradasSalidas("SaldoFCant").ToString.ToDouble
Movs("Cantidad") = 0
Movs("Precio") = tempEntradasSalidas("PrecioVenta").ToString.ToDouble
End If
Next
For Each tempApartados As DataRow In DtApartados.Rows
If tempApartados("Codigo").ToString = Movs("Codigo").ToString Then
Movs("Existencia") = IIf(Movs("Existencia").ToString.ToEntero > 0, Movs("Existencia"), 0)
Movs("Cantidad") = tempApartados("Cantidad").ToString.ToDouble
Movs("Precio") = IIf(Movs("Precio").ToString.ToEntero > 0, Movs("Existencia"), 0)
End If
Next
DtPS.AcceptChanges()
Next
'Dim dtExistencias = From row In DtMovimientos.FiltraParametros("", "", {"Codigo", "Existencia", "Cantidad", "Precio"})
' Group row By Codigo = row.Field(Of String)("Codigo"), Existencia = row.Field(Of Double)("Existencia"), Precio = row.Field(Of Double)("Precio") Into CodigoGroup = Group
' Select New With {
' .Codigo = Codigo,
' .Existencia = Existencia,
' .Cantidad = CodigoGroup.Sum(Function(r) r.Field(Of Double)("Cantidad")),
' .Precio = Precio}
'Dim LINQEntradasSalidas = From row In DtRepEntradasSalidasXContrato.AsEnumerable 'Dim LINQEntradasSalidas = From row In DtRepEntradasSalidasXContrato.AsEnumerable
' Select New With { ' Select New With {
@@ -89,11 +121,11 @@ Public Class E72 : Implements IHttpHandler, IRequiresSessionState
'Dim Dtnum As Integer = DtMovimientos.su 'Dim Dtnum As Integer = DtMovimientos.su
retorno = JsonConvert.SerializeObject(dtExistencias).ToString retorno = JsonConvert.SerializeObject(DTtemp).ToString
context.Response.Write(retorno) context.Response.Write(retorno)
Catch ex As Exception Catch ex As Exception
context.Response.Write(String.Format("{0}", ex))
End Try End Try
ObjInv.Dispose() ObjInv.Dispose()
Return retorno Return retorno

View File

@@ -422,7 +422,7 @@ Partial Class Bancos_Creditos
HLSaldoPrePoliza.NavigateUrl = $"/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={ObjCreditos.CvePrePoliza}" HLSaldoPrePoliza.NavigateUrl = $"/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={ObjCreditos.CvePrePoliza}"
LbSaldo.Text = $"Saldo <b>Acreedor</b> " LbSaldo.Text = $"Saldo <b>Acreedor</b> "
If ObjPrepoliza.GetPrePolizasDetalle(ObjCreditos.CvePrePoliza) AndAlso ObjPrepoliza.DtResultados.Rows.Count > 0 Then If ObjPrepoliza.GetPrePolizasDetalle(ObjCreditos.CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjPrepoliza.DtResultados.Rows.Count > 0 Then
LbSaldoAcreedor.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 42").Rows(0)("Importe").ToString.FormatoNumero LbSaldoAcreedor.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 42").Rows(0)("Importe").ToString.FormatoNumero
LbSaldoDocxPagar.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 50").Rows(0)("Importe").ToString.FormatoNumero LbSaldoDocxPagar.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 50").Rows(0)("Importe").ToString.FormatoNumero
End If End If
@@ -469,7 +469,7 @@ Partial Class Bancos_Creditos
End If End If
'CARGA ANTICIPOS 'CARGA ANTICIPOS
If dr("CveIE").ToString.ToEntero > 0 AndAlso ObjPrepoliza.GetPrePolizasDetalle(-1, dr("CveIE").ToString.ToEntero) Then If dr("CveIE").ToString.ToEntero > 0 AndAlso ObjPrepoliza.GetPrePolizasDetalle(-1, UsuarioActual.CveEmpresa, CveIE:=dr("CveIE").ToString.ToEntero) Then
If ObjPrepoliza.DtResultados.Rows.Count > 0 Then If ObjPrepoliza.DtResultados.Rows.Count > 0 Then
TxtVehiculoAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 53").Rows(0)("Importe").ToString.FormatoNumero TxtVehiculoAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 53").Rows(0)("Importe").ToString.FormatoNumero
TxtComisionAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 54").Rows(0)("Importe").ToString.FormatoNumero TxtComisionAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 54").Rows(0)("Importe").ToString.FormatoNumero

View File

@@ -278,12 +278,6 @@ Partial Class Bancos_DepositoTerminal
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
ViewState("CveCuentaCliente") = ObjCliente.CveCuentaClientes
ViewState("CveCuentaMonedaExtranjera") = ObjCliente.CveCuentaMonedaExtranjera
ViewState("CveCuentaComplementaria") = ObjCliente.CveCuentaComplementaria
ViewState("CveCuentaRetIVA") = ObjCliente.CveCuentaRetIVA
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
IdCuentaBancaria = 0 IdCuentaBancaria = 0
CveCuentaBancaria = 0 CveCuentaBancaria = 0
End If End If

View File

@@ -137,7 +137,7 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpParametros" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row" style="margin-bottom:5px"> <div class="row" style="margin-bottom:5px">
@@ -166,13 +166,17 @@
</div> </div>
<div class="col-md-3" style="text-align: right; font-size:1.2em;" runat="server" id="divLabelTotal" visible="false"> <div class="col-md-3" style="text-align: right; font-size:1.2em;" runat="server" id="divLabelTotal" visible="true">
<asp:label runat="server">Seleccionado: $</asp:label> <asp:label runat="server">Seleccionado: $</asp:label>
<asp:label runat="server" ID="lblValorTotal">0.00</asp:label> <asp:label runat="server" ID="lblValorTotal">0.00</asp:label>
<asp:label runat="server" ID="lblValorTotalSeleccionado" Visible="false"></asp:label> <asp:label runat="server" ID="lblValorTotalSeleccionado" Visible="false"></asp:label>
</div> </div>
</div> </div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpComisiones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row rowcheck truncate" id="DivComisioncheck" > <div class="row rowcheck truncate" id="DivComisioncheck" >
<div class="col-md-1 truncate" runat="server" id="DivFaltante" style ="width: 155px;" > <div class="col-md-1 truncate" runat="server" id="DivFaltante" style ="width: 155px;" >
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" CssClass="checkbox"/> <asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" CssClass="checkbox"/>
@@ -266,6 +270,11 @@
</div> </div>
</div> </div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<br /> <br />
<div style="height:450px;overflow-x:scroll"> <div style="height:450px;overflow-x:scroll">
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None"> <asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None">
@@ -614,6 +623,26 @@
debugger; debugger;
} }
function Depositar() {
LimppiarVariables();
}
function Consultar() {
LimppiarVariables();
}
function LimppiarVariables() {
ValorTotalSeleccionado = 0;
comision = 0;
descuento = 0;
saldo = 0;
IVA = 0;
ComisionIntermediario = 0;
}
</script> </script>

View File

@@ -31,7 +31,8 @@ Partial Class Bancos_DepositosCaja
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);") ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);") ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);")
ChkIntermediario.Attributes.Add("onclick", "CheckIntermediario(this);") ChkIntermediario.Attributes.Add("onclick", "CheckIntermediario(this);")
BtnConsultar.Attributes.Add("onclick", "Consultar(this);")
BtnDepositar.Attributes.Add("onclick", "Depositar(this);")
End If End If
End Sub End Sub
@@ -98,11 +99,24 @@ Partial Class Bancos_DepositosCaja
GvFacturas.DataSource = ObjBancos.DtResultados GvFacturas.DataSource = ObjBancos.DtResultados
ObjBancos.Dispose() ObjBancos.Dispose()
UpGvFacturas.Update()
GvFacturas.DataBind() GvFacturas.DataBind()
lblValorTotal.Text = "0.00" ChkFaltante.Checked = False
ChkDescuento.Checked = False
ChkIntermediario.Checked = False
TxtComision.Text = "" TxtComision.Text = ""
TxtDescuento.Text = ""
TxtIVA.Text = ""
TxtComisionIntermediario.Text = ""
lblValorTotal.Text = "0.0"
lblValorTotalSeleccionado.Text = "0.0"
divLabelTotal.Visible = True divLabelTotal.Visible = True
DdlSubProyectoDeposito.SelectedValueExist(DdlSubProyectos.SelectedValue.ToEntero)
DdlSubProyectoDescuento.SelectedValueExist(DdlSubProyectos.SelectedValue.ToEntero)
DdlSubProyectoIntermediario.SelectedValueExist(DdlSubProyectos.SelectedValue.ToEntero)
UpGvFacturas.Update()
UpParametros.Update()
UpComisiones.Update()
End Sub End Sub
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
@@ -165,14 +179,19 @@ Partial Class Bancos_DepositosCaja
Dim CveCuentaBancariaDestino As Integer = 0 Dim CveCuentaBancariaDestino As Integer = 0
Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim CveSubProyecto As Integer = -1 Dim CveSubProyecto As Integer = DdlSubProyectos.SelectedValue.ToEntero
Dim CveSubProyectoDescuento As Integer = -1
Dim CveClasificacion As Integer = -1 Dim CveClasificacion As Integer = -1
Dim CveClasificacionDescuento As Integer = -1
Dim CveSubProyectoComision As Integer
Dim CveClasificacionComision As Integer
Dim CveSubProyectoDescuento As Integer
Dim CveClasificacionDescuento As Integer
Dim documentos As String = "Los Depósitos se realizaron exitosamente<br/><br/>" Dim documentos As String = "Los Depósitos se realizaron exitosamente<br/><br/>"
Dim imprimirFolios As String = "" Dim imprimirFolios As String = ""
Dim CveSubProyectoIntermediario As Integer = -1 Dim CveSubProyectoIntermediario As Integer
Dim CveClasificacionIntermediario As Integer = -1 Dim CveClasificacionIntermediario As Integer
Dim CveProveedorIntermediario As Integer = -1 Dim CveProveedorIntermediario As Integer = -1
If drOrigen IsNot Nothing Then If drOrigen IsNot Nothing Then
@@ -231,10 +250,10 @@ Partial Class Bancos_DepositosCaja
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then
If ChkFaltante.Checked Then If ChkFaltante.Checked Then
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
If Comision <> 0 Then If Comision <> 0 Then
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio) Then If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then
OcurrioError = True OcurrioError = True
End If End If
End If End If
@@ -314,8 +333,9 @@ Partial Class Bancos_DepositosCaja
TxtDescuento.Text = "" TxtDescuento.Text = ""
TxtIVA.Text = "" TxtIVA.Text = ""
TxtComisionIntermediario.Text = "" TxtComisionIntermediario.Text = ""
lblValorTotal.Text = "" lblValorTotal.Text = "0.0"
lblValorTotalSeleccionado.Text = "" lblValorTotalSeleccionado.Text = "0.0"
CargaDatos()
ObjContabilidad.Dispose() ObjContabilidad.Dispose()
End Sub End Sub
@@ -329,6 +349,8 @@ Partial Class Bancos_DepositosCaja
Next Next
lblValorTotal.Text = Total.ToString("N") lblValorTotal.Text = Total.ToString("N")
UpGvFacturas.Update() UpGvFacturas.Update()
UpParametros.Update()
End Sub End Sub
Public Sub ChkFactura_Click(sender As Object, e As EventArgs) Public Sub ChkFactura_Click(sender As Object, e As EventArgs)

View File

@@ -1183,7 +1183,7 @@
<asp:CompareValidator ID="CVFechaCancelacionMin" runat="server" ControlToCompare="TxtFechaDocumento" ControlToValidate="TxtFechaCancelacion" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="GrpCancelarIE" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator> <asp:CompareValidator ID="CVFechaCancelacionMin" runat="server" ControlToCompare="TxtFechaDocumento" ControlToValidate="TxtFechaCancelacion" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="GrpCancelarIE" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacionMin" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacionMin" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaCancelacion" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha de cancelacion debe ser apartir del dia 1 del siguiente mes" MaximumValue="9999/12/31" MinimumValue="1900/01/01" ControlToValidate="TxtFechaCancelacion" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator> <asp:RangeValidator ID="RVTxtFechaCancelacion" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha de cancelacion debe ser apartir del dia 1 del siguiente mes" MaximumValue="9999/12/31" MinimumValue="1900/01/01" ControlToValidate="TxtFechaCancelacion" Type="Date" ValidationGroup="GrpCancelarIE"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaCancelacion" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaCancelacion" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>

View File

@@ -895,7 +895,7 @@ Partial Class Bancos_IE
End If End If
'Detectamos a quien se le hizo el cobro (Cliente, proveedor, Funcionario/Empleado, etc.) 'Detectamos a quien se le hizo el cobro (Cliente, proveedor, Funcionario/Empleado, etc.)
If ObjIE2.GetPrePolizasDetalle(-1, CveIE) Then If ObjIE2.GetPrePolizasDetalle(-1, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
If ObjIE2.DtResultados.Rows.Count > 0 Then If ObjIE2.DtResultados.Rows.Count > 0 Then
Dim CveConceptoContable As Integer = ObjIE2.DtResultados.FiltroPrimeroValor("CveConceptoContable", "CveConceptoContable <> 30 and CveConceptoContable <> 61").ToEntero Dim CveConceptoContable As Integer = ObjIE2.DtResultados.FiltroPrimeroValor("CveConceptoContable", "CveConceptoContable <> 30 and CveConceptoContable <> 61").ToEntero
@@ -2845,7 +2845,7 @@ Partial Class Bancos_IE
'Agregamos el IVA 'Agregamos el IVA
If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, 61, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, 61, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso." MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If End If
End If End If
@@ -2853,7 +2853,7 @@ Partial Class Bancos_IE
'Agregamos complementaria 'Agregamos complementaria
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 226, Concepto, FechaMovimiento, IDCtaBeneficiarioComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=0) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 226, Concepto, FechaMovimiento, IDCtaBeneficiarioComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso." MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If End If
@@ -2869,7 +2869,7 @@ Partial Class Bancos_IE
'Agregamos complementaria 'Agregamos complementaria
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso." MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If End If
Else Else
@@ -2958,7 +2958,7 @@ Partial Class Bancos_IE
End If End If
'IMPUESTOS 'IMPUESTOS
If ObjMov.GetPrePolizasDetalle(CvePrePolizaDevDin) Then If ObjMov.GetPrePolizasDetalle(CvePrePolizaDevDin, UsuarioActual.CveEmpresa) Then
Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6) Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
Dim CveConceptoContableAplciar = -1 Dim CveConceptoContableAplciar = -1
Dim TipoMovtoAplicar = False Dim TipoMovtoAplicar = False
@@ -3561,7 +3561,7 @@ Partial Class Bancos_IE
'Agregamos complementaria 'Agregamos complementaria
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso." MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If End If
End If End If
@@ -4339,8 +4339,15 @@ Partial Class Bancos_IE
Protected Sub BtnCancelarIE_Click(sender As Object, e As EventArgs) Protected Sub BtnCancelarIE_Click(sender As Object, e As EventArgs)
RegistraScript("$('#DivCancelarIE').modal('hide');") RegistraScript("$('#DivCancelarIE').modal('hide');")
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
If Not ExistenComplementosVigentes Then
CancelarIE()
Else
Alert("No se puede cancelar documento con complementos de pago vigentes", TipoMensaje.MsgError)
End If
CancelarIE()
End Sub End Sub
Private Sub CancelarIE(Optional CancelarComplemento As Boolean = False) Private Sub CancelarIE(Optional CancelarComplemento As Boolean = False)
@@ -4350,8 +4357,8 @@ Partial Class Bancos_IE
Exit Sub Exit Sub
End If End If
If ChkConciliado.Checked Then If ChkConciliado.Checked AndAlso TxtFechaCancelacion.Text.ToDate < TxtFechaAplicado.Text.ToDate.FirstDayOfMonth.AddMonths(1) Then
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError) Alert("El documento conciliado, no se puede cancelar con la fecha especificada.", TipoMensaje.MsgError)
Exit Sub Exit Sub
End If End If
@@ -5973,7 +5980,7 @@ Partial Class Bancos_IE
'TxtFechaDesconciliado.Text = Now.ToShortDateString 'TxtFechaDesconciliado.Text = Now.ToShortDateString
'UpDesconciliar.Update() 'UpDesconciliar.Update()
'RegistraScript("$('#DModalDesconciliar').modal()") 'RegistraScript("$('#DModalDesconciliar').modal()")
Dim fechaCancelacion As String = DateTime.Now.AddMonths(1).FirstDayOfMonth.ToShortDateString Dim fechaCancelacion As String = TxtFechaAplicado.Text.ToDate.AddMonths(1).FirstDayOfMonth.ToShortDateString
RVTxtFechaCancelacion.MinimumValue = fechaCancelacion RVTxtFechaCancelacion.MinimumValue = fechaCancelacion
CalendarioCancelacion.StartDate = fechaCancelacion.ToDate CalendarioCancelacion.StartDate = fechaCancelacion.ToDate
UpEliminarCotizacion.Update() UpEliminarCotizacion.Update()
@@ -6451,13 +6458,12 @@ Partial Class Bancos_IE
Protected Sub LnkCancelarComplemetno_Click(sender As Object, e As EventArgs) Protected Sub LnkCancelarComplemetno_Click(sender As Object, e As EventArgs)
If ChkConciliado.Checked Then If ChkConciliado.Checked Then
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgAdvertencia) Alert("El documento se encuentra conciliado, no se puede cancelar.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
CveComplementoPagoCancelar = GvRow.DataKey("CveComplementoPago").ToEntero CveComplementoPagoCancelar = GvRow.DataKey("CveComplementoPago").ToEntero
FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString
'' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC '' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
@@ -6467,8 +6473,6 @@ Partial Class Bancos_IE
Dim ObjCancelacion As New Timbrado Dim ObjCancelacion As New Timbrado
Dim ObjBanco As New ClsBancos Dim ObjBanco As New ClsBancos
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then

View File

@@ -1538,7 +1538,6 @@ Partial Class Bancos_PopIECompras
Dim ImporteMovimientoNoDeducible As Decimal = 0 Dim ImporteMovimientoNoDeducible As Decimal = 0
Dim ImporteMXNoDeducible As Decimal = 0 Dim ImporteMXNoDeducible As Decimal = 0
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim ConceptoMovimiento = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, TxtObservaciones.Text, TxtFolio.Text.Trim) Dim ConceptoMovimiento = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, TxtObservaciones.Text, TxtFolio.Text.Trim)
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
Dim TimpocambioGeneral As Decimal = 1 Dim TimpocambioGeneral As Decimal = 1
@@ -1899,8 +1898,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -1932,8 +1931,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra ImporteMX = ImporteMovimiento * tipoCambioCompra
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = tipoCambioCompra TimpocambioGeneral = tipoCambioCompra
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -1966,8 +1965,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2000,8 +1999,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2034,8 +2033,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2069,8 +2068,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2103,8 +2102,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2156,17 +2155,7 @@ Partial Class Bancos_PopIECompras
' End If ' End If
' End If ' End If
' 'Conta SIG
' If CveCuentaRetISR <> 0 Then
' CveCuenta = CveCuentaRetISR
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' End If
'Case 23 'Ret ISR Acreditable 'Case 23 'Ret ISR Acreditable
' If MovimientoPagar.ConceptoRetISR = 1 Then ' If MovimientoPagar.ConceptoRetISR = 1 Then
' If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then ' If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
@@ -2201,16 +2190,6 @@ Partial Class Bancos_PopIECompras
' End If ' End If
' End If ' End If
' 'Conta SIG
' If CveCuentaRetISR <> 0 Then
' CveCuenta = CveCuentaRetISR
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' End If ' End If
'Case 243 'Ret ISR X Acreditar Terceros y Arrendamiento 'Case 243 'Ret ISR X Acreditar Terceros y Arrendamiento
' If MovimientoPagar.ConceptoRetISR = 2 Then ' If MovimientoPagar.ConceptoRetISR = 2 Then
@@ -2246,16 +2225,7 @@ Partial Class Bancos_PopIECompras
' End If ' End If
' End If ' End If
' 'Conta SIG
' If CveCuentaRetISR <> 0 Then
' CveCuenta = CveCuentaRetISR
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' End If ' End If
'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento 'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento
' If MovimientoPagar.ConceptoRetISR = 2 Then ' If MovimientoPagar.ConceptoRetISR = 2 Then
@@ -2291,16 +2261,7 @@ Partial Class Bancos_PopIECompras
' End If ' End If
' End If ' End If
' 'Conta SIG
' If CveCuentaRetISR <> 0 Then
' CveCuenta = CveCuentaRetISR
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' End If ' End If
Case 14 'Iva por Acreditar Case 14 'Iva por Acreditar
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
@@ -2331,8 +2292,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = MovimientoPagar.IVA ImporteMovimiento = MovimientoPagar.IVA
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = tipoCambioCompra TimpocambioGeneral = tipoCambioCompra
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2343,20 +2304,20 @@ Partial Class Bancos_PopIECompras
Else Else
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
'ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago 'ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
ImporteMovimiento = MovimientoPagar.IVAPorPagar * PorcentajePago ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.IVAPorPagar * PorcentajePago) ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra ImporteMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
ImporteMovimiento = (MovimientoPagar.IVAPorPagar * PorcentajePago) ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra ImporteMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.IVAPorPagar * PorcentajePago) ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra ImporteMX = ImporteMovimiento * tipoCambioCompra
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2409,8 +2370,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.IVADeducible) ImporteMovimiento = (MovimientoPagar.IVADeducible)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2433,8 +2394,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago) ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago)
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2517,7 +2478,6 @@ Partial Class Bancos_PopIECompras
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
End If End If
End If End If
@@ -2559,8 +2519,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = MovimientoPagar.IVA ImporteMovimiento = MovimientoPagar.IVA
ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = tipoCambioCompra TimpocambioGeneral = tipoCambioCompra
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2582,8 +2542,8 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago) ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra ImporteMX = ImporteMovimiento * tipoCambioCompra
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMovimiento = ImporteMovimiento.RoundSQL
ImporteMX = Math.Round(ImporteMX, 2) ImporteMX = ImporteMX.RoundSQL
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
@@ -2603,7 +2563,6 @@ Partial Class Bancos_PopIECompras
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If End If
End If End If
@@ -2745,7 +2704,6 @@ Partial Class Bancos_PopIECompras
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If End If
End If End If
@@ -2828,7 +2786,6 @@ Partial Class Bancos_PopIECompras
' If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then ' If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
' If ObjMov.DtResultados.Rows.Count > 0 Then ' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
' End If ' End If
' End If ' End If
Case 25 'IEPS por Acreditar Case 25 'IEPS por Acreditar
@@ -2888,7 +2845,6 @@ Partial Class Bancos_PopIECompras
If CveMoneda <> 1 OrElse CveMonedaCompra <> 1 Then If CveMoneda <> 1 OrElse CveMonedaCompra <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
TimpocambioGeneral = TCImpuestos TimpocambioGeneral = TCImpuestos
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra '' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
@@ -2914,7 +2870,6 @@ Partial Class Bancos_PopIECompras
If CveMoneda <> 1 OrElse CveMonedaCompra <> 1 Then If CveMoneda <> 1 OrElse CveMonedaCompra <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra '' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
If tipoCambioPago > tipoCambioCompra AndAlso CveMonedaCompra = 2 Then If tipoCambioPago > tipoCambioCompra AndAlso CveMonedaCompra = 2 Then

View File

@@ -828,14 +828,6 @@ Partial Class Bancos_PopIEVentas
ViewState("IdCtaContMonedaExtranjeraAnticipo") = ObjCliente.IdCtaMonedaExtranjeraAnticipos ViewState("IdCtaContMonedaExtranjeraAnticipo") = ObjCliente.IdCtaMonedaExtranjeraAnticipos
ViewState("IdCtaContMonedaComplementariaAnticipo") = ObjCliente.IdCtaContCompAnticipos ViewState("IdCtaContMonedaComplementariaAnticipo") = ObjCliente.IdCtaContCompAnticipos
'Conta SIG
CveCuentaCliente = ObjCliente.CveCuentaClientes
ViewState("CveCuentaMonedaExtranjera") = ObjCliente.CveCuentaMonedaExtranjera
ViewState("CveCuentaComplementaria") = ObjCliente.CveCuentaComplementaria
ViewState("CveCuentaRetIVA") = ObjCliente.CveCuentaRetIVA
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
ViewState("CveCuentaAnticipo") = ObjCliente.CveCuentaAnticipos
Else Else
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia) Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
End If End If
@@ -1587,7 +1579,6 @@ Partial Class Bancos_PopIEVentas
Dim ImporteMX As Decimal = 0 Dim ImporteMX As Decimal = 0
Dim ImporteCliente As Decimal = 0 Dim ImporteCliente As Decimal = 0
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim Referencia As String = TxtObservaciones.Text Dim Referencia As String = TxtObservaciones.Text
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
Dim TimpocambioGeneral As Decimal = 1 Dim TimpocambioGeneral As Decimal = 1
@@ -1625,26 +1616,23 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
Else Else
IdCtaContable = IdCuentaCliente IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
End If End If
TotalPagarCliente = ImporteMovimiento TotalPagarCliente = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
If CveMonedaVenta = 2 Then If CveMonedaVenta = 2 Then
IdCtaContable = IdCtaContComplementaria IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If End If
End If End If
@@ -1677,25 +1665,22 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
Else Else
IdCtaContable = IdCuentaCliente IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
End If End If
TotalPagarCliente = ImporteMovimiento TotalPagarCliente = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMX, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
If CveMonedaVenta = 2 Then If CveMonedaVenta = 2 Then
IdCtaContable = IdCtaContComplementaria IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If End If
End If End If
End If End If
@@ -1726,25 +1711,22 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
Else Else
IdCtaContable = IdCuentaCliente IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
End If End If
TotalPagarCliente = ImporteMovimiento TotalPagarCliente = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, rw.DataKey("CveCompra").ToEntero, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, rw.DataKey("CveCompra").ToEntero, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMX, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
If CveMonedaVenta = 2 Then If CveMonedaVenta = 2 Then
IdCtaContable = IdCtaContComplementaria IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, rw.FCLiteral("LtlFolio").Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, rw.DataKey("CveCompra").ToEntero, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, rw.FCLiteral("LtlFolio").Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, rw.DataKey("CveCompra").ToEntero, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If End If
End If End If
@@ -1775,19 +1757,16 @@ Partial Class Bancos_PopIEVentas
If CveMonedaVenta = 1 Then If CveMonedaVenta = 1 Then
IdCtaContable = IdCuentaCliente IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
Else Else
IdCtaContable = IdCtaContComplementaria IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If End If
End If End If
Case 8 'Ret IVA Case 8 'Ret IVA
@@ -1824,17 +1803,6 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
Case 9 'Ret ISR Case 9 'Ret ISR
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago
@@ -1869,17 +1837,6 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
Case 13 'Iva por Trasladar Case 13 'Iva por Trasladar
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
@@ -1906,15 +1863,12 @@ Partial Class Bancos_PopIEVentas
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVAXTrasladar As Integer = 0 Dim IdCtaIVAXTrasladar As Integer = 0
Dim CveCuentaIVAxTrasladar As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString.ToEntero
End If End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
Case 61 'Iva Trasladado Case 61 'Iva Trasladado
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -1941,15 +1895,12 @@ Partial Class Bancos_PopIEVentas
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVATrasladado As Integer = 0 Dim IdCtaIVATrasladado As Integer = 0
Dim CveCuentaIVATrasladado As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString.ToEntero
End If End If
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
Case 38 'IEPS por trasladar Case 38 'IEPS por trasladar
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -1975,7 +1926,6 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ImporteMovimiento > 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxTrasladarSIG").ToString.ToEntero
End If End If
End If End If
@@ -2004,7 +1954,6 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ImporteMovimiento > 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSTrasladadoSIG").ToString.ToEntero
End If End If
End If End If
@@ -2043,17 +1992,6 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
Case 63 'Ret ISR Trasladado Case 63 'Ret ISR Trasladado
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago
@@ -2089,21 +2027,9 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
Case 64 'Ganancia Case 64 'Ganancia
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
Dim tImporteVenta, tImportePago, Diferencia As Decimal Dim tImporteVenta, tImportePago, Diferencia As Decimal
ImporteMovimiento = 0 ImporteMovimiento = 0
@@ -2210,17 +2136,14 @@ Partial Class Bancos_PopIEVentas
If CveMoneda = 1 Then If CveMoneda = 1 Then
IdCtaContable = IdCuentaBancaria IdCtaContable = IdCuentaBancaria
CveCuenta = CveCuentaCliente
Else Else
IdCtaContable = IdCuentaBancariaComplementaria IdCtaContable = IdCuentaBancariaComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ObjIE.Folio, 204, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, -1, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago, CveCuenta:=CveCuenta) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ObjIE.Folio, 204, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, -1, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
IdCtaContable = IdCuentaBancaria IdCtaContable = IdCuentaBancaria
CveCuenta = CveCuentaMonedaExtranjera
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioPago - ImporteMovimiento, 2) TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioPago - ImporteMovimiento, 2)
End If End If
End If End If
@@ -2255,10 +2178,8 @@ Partial Class Bancos_PopIEVentas
If CveMoneda = 2 Then If CveMoneda = 2 Then
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaContMonedaExtranjeraAnticipo IdCtaContable = IdCtaContMonedaExtranjeraAnticipo
CveCuenta = CveCuentaMonedaExtranjera
Else Else
IdCtaContable = IdCtaAnticipo IdCtaContable = IdCtaAnticipo
CveCuenta = CveCuentaAnticipo
End If End If
TotalPagarCliente = ImporteMovimiento TotalPagarCliente = ImporteMovimiento
@@ -2354,7 +2275,7 @@ Partial Class Bancos_PopIEVentas
CveIE = rw.DataKey("CveIE").ToString.ToEntero CveIE = rw.DataKey("CveIE").ToString.ToEntero
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, rw.DataKey("IdCtaContDeudor").ToString.ToEntero, -1, CveIE, CveVenta:=CveVenta, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, rw.DataKey("IdCtaContDeudor").ToString.ToEntero, -1, CveIE, CveVenta:=CveVenta, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveSubProyecto:=CveSubProyectoContabilizar) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2440,24 +2361,21 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = IdCtaContComplementariaProveedor IdCtaContable = IdCtaContComplementariaProveedor
Else Else
IdCtaContable = CtaProveedor IdCtaContable = CtaProveedor
CveCuenta = CveCuentaProveedor
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, 275, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioPago) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, 275, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
If rw.DataKey("CveMoneda").ToEntero = 2 Then If rw.DataKey("CveMoneda").ToEntero = 2 Then
IdCtaContable = IdCtaProveedorExtranjera IdCtaContable = IdCtaProveedorExtranjera
CveCuenta = CveCuentaProveedorExtranjera
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, rw.FCLiteral("LtlFolio").Text, 206, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago, CveCuenta:=CveCuenta) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, rw.FCLiteral("LtlFolio").Text, 206, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
ImporteMX = ImporteMovimiento ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If End If
End If End If
@@ -2502,19 +2420,8 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVAProveedor <> 0 Then
CveCuenta = CveCuentaRetIVAProveedor
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2564,7 +2471,7 @@ Partial Class Bancos_PopIEVentas
End If End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2612,19 +2519,8 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVAProveedor <> 0 Then
CveCuenta = CveCuentaRetIVAProveedor
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2673,7 +2569,7 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2721,20 +2617,8 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
'Conta SIG
If CveCuentaRetIVAProveedor <> 0 Then
CveCuenta = CveCuentaRetIVAProveedor
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2782,9 +2666,8 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2833,7 +2716,7 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2882,7 +2765,7 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -2942,7 +2825,7 @@ Partial Class Bancos_PopIEVentas
' End If ' End If
' If ImporteMovimiento > 0 Then ' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' MsgError = "No se pudo insertar la póliza" ' MsgError = "No se pudo insertar la póliza"
' End If ' End If
' End If ' End If
@@ -2990,20 +2873,10 @@ Partial Class Bancos_PopIEVentas
' End If ' End If
' End If ' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then ' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' MsgError = "No se pudo insertar la póliza" ' MsgError = "No se pudo insertar la póliza"
' End If ' End If
' End If ' End If
@@ -3050,19 +2923,9 @@ Partial Class Bancos_PopIEVentas
' End If ' End If
' End If ' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then ' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' MsgError = "No se pudo insertar la póliza" ' MsgError = "No se pudo insertar la póliza"
' End If ' End If
' End If ' End If
@@ -3110,20 +2973,8 @@ Partial Class Bancos_PopIEVentas
' End If ' End If
' End If ' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then ' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' MsgError = "No se pudo insertar la póliza" ' MsgError = "No se pudo insertar la póliza"
' End If ' End If
' End If ' End If
@@ -3206,13 +3057,12 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
End If End If
End If End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal, PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -3294,12 +3144,11 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
End If End If
End If End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -3380,12 +3229,11 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
End If End If
End If End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -3419,12 +3267,11 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
End If End If
End If End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -3458,12 +3305,11 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
End If End If
End If End If
If ImporteMovimiento > 0 Then If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -3483,7 +3329,7 @@ Partial Class Bancos_PopIEVentas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, CvePersonal:=CvePersonal, TipoCambio:=TimpocambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, CvePersonal:=CvePersonal, TipoCambio:=TimpocambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
Exit For Exit For
End If End If

View File

@@ -1011,8 +1011,8 @@
<i class="fa fa-download" ></i> <i class="fa fa-download" ></i>
</asp:LinkButton> </asp:LinkButton>
</div> </div>
<div class="col-md-2 col-xs-2" style="padding-left: 0px; padding-top: 0px;"> <div class="col-md-2 col-xs-2" style="padding-left: 0px; padding-top: 4px;">
<asp:LinkButton ID="LinkDelete" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnClick="EliminarFile" /> <asp:LinkButton ID="LinkDelete" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-xs red " Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnClick="EliminarFile" />
</div> </div>
</div> </div>

View File

@@ -8343,9 +8343,9 @@ Partial Class Compras_Compras
'ACTUALIZA CVEFACTURA 'ACTUALIZA CVEFACTURA
If Request("CveFactura") IsNot Nothing Then If Request("CveFactura") IsNot Nothing Then
If Not ObjCompras.UpdateCompraFactura(CveCompra, Request("CveFactura").ToEntero, TxtSerie.Text.Trim, TxtFolio.Text.Trim) Then 'If Not ObjCompras.UpdateCompraFactura(CveCompra, Request("CveFactura").ToEntero, TxtSerie.Text.Trim, TxtFolio.Text.Trim) Then
TieneError = True ' TieneError = True
End If 'End If
If UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.UsaAC Then
MsgAccionAceptar = String.Format("window.opener.location.href = window.opener.location.href; window.open(""/Contabilidad/RegPoliza.aspx?IdPoliza={0}""); window.close();", IdPoliza) MsgAccionAceptar = String.Format("window.opener.location.href = window.opener.location.href; window.open(""/Contabilidad/RegPoliza.aspx?IdPoliza={0}""); window.close();", IdPoliza)
@@ -10357,7 +10357,7 @@ Partial Class Compras_Compras
Dim CveProveedorConcepto As Integer = 0, CveIE As Integer = 0, CveCreditoDetalle As Integer = 0 Dim CveProveedorConcepto As Integer = 0, CveIE As Integer = 0, CveCreditoDetalle As Integer = 0
Dim ConceptoPersonal As String = "", Concepto As String = "" Dim ConceptoPersonal As String = "", Concepto As String = ""
If Not ObjConta.GetPrePolizasDetalle(CvePrePoliza) Then If Not ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
If ObjConta.DtResultados.FiltraParametros("CveConceptoContable IN (6,68,49,205,176)").Rows.Count > 0 Then If ObjConta.DtResultados.FiltraParametros("CveConceptoContable IN (6,68,49,205,176)").Rows.Count > 0 Then
@@ -15010,7 +15010,7 @@ Partial Class Compras_Compras
End If End If
Else Else
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza) Then If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
dt = ObjContabilidad.DtResultados dt = ObjContabilidad.DtResultados
CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
@@ -15062,11 +15062,11 @@ Partial Class Compras_Compras
'LIMPIA PRE-POLIZA PONIENDO IMPORTE EN CEROS 'LIMPIA PRE-POLIZA PONIENDO IMPORTE EN CEROS
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza) Then If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
dt = ObjContabilidad.DtResultados dt = ObjContabilidad.DtResultados
For Each dr As DataRow In dt.Rows For Each dr As DataRow In dt.Rows
If Not ObjContabilidad.UpdatePrepolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjContabilidad.UpdatePrePolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorCancelar = True : Exit For ErrorCancelar = True : Exit For
End If End If
Next Next
@@ -18689,7 +18689,7 @@ Partial Class Compras_Compras
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Clasificacion") = HdnPSAliasClasificacion.Value TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Clasificacion") = HdnPSAliasClasificacion.Value
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Obs") = TxtPSAlias.Text.Trim TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Obs") = TxtPSAlias.Text.Trim
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSATPS") = HdnPSAliasCveSATPS.Value TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSATPS") = HdnPSAliasCveSATPS.Value.ToEntero
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value TmpDT.Rows(HdnAliasInd.Value.ToEntero)("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value
'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE 'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE
@@ -18701,7 +18701,7 @@ Partial Class Compras_Compras
drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
drt("Clasificacion") = HdnPSAliasClasificacion.Value drt("Clasificacion") = HdnPSAliasClasificacion.Value
drt("Obs") = TxtPSAlias.Text.Trim drt("Obs") = TxtPSAlias.Text.Trim
drt("CveSATPS") = HdnPSAliasCveSATPS.Value drt("CveSATPS") = HdnPSAliasCveSATPS.Value.ToEntero
drt("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value drt("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value
Next Next
@@ -18710,14 +18710,12 @@ Partial Class Compras_Compras
GvPS.DataBind() GvPS.DataBind()
UpPS.Update() UpPS.Update()
Alert("Registro actualizado con exito.", TipoMensaje.MsgInformacion) Alert("Registro actualizado con éxito.", TipoMensaje.MsgInformacion)
RegistraScript("$('#ModalPSAlias').modal('hide');", "ModalPSAliasHide") RegistraScript("$('#ModalPSAlias').modal('hide');", "ModalPSAliasHide")
End If End If
PS.Dispose() PS.Dispose()
End Sub End Sub
Private Sub RecargaGlobalEquivalencias() Private Sub RecargaGlobalEquivalencias()

View File

@@ -2311,15 +2311,15 @@ Partial Class PopUpVerFactura
Dim Archivo As New System.IO.FileInfo(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta)) Dim Archivo As New System.IO.FileInfo(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta))
If Archivo.Exists Then If Archivo.Exists Then
If UsuarioActual.CveEmpresa = 140 Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri)) params.Add(New ReportParameter("LogoPath", logouri))
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If End If
If UsuarioActual.CveEmpresa = 140 Then
params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Origen", Almacen))
params.Add(New ReportParameter("Destino", AlmacenDestino)) params.Add(New ReportParameter("Destino", AlmacenDestino))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
@@ -2329,6 +2329,18 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString())) params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
ElseIf UsuarioActual.CveEmpresa = 153 Then
params.Add(New ReportParameter("Origen", Almacen))
params.Add(New ReportParameter("Destino", AlmacenDestino))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text
params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString))
params.Add(New ReportParameter("CveTipoAlmacenDestino", DtMovimientos(0)("CveTipoAlmacenDestino").ToString))
params.Add(New ReportParameter("CveVentaDetalle", DtMovimientos(0)("CveVentaDetalle").ToString))
params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
params.Add(New ReportParameter("Factura", DtMovimientos(0)("SerieFolio").ToString))
Else Else
params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text
params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString)) params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString))
@@ -2415,6 +2427,20 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
ElseIf UsuarioActual.CveEmpresa = 153 Then
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
params.Add(New ReportParameter("Origen", AlmacenDestino)) ' se invierte
params.Add(New ReportParameter("Destino", Almacen))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
End If End If
@@ -3975,7 +4001,7 @@ Partial Class PopUpVerFactura
End If End If
ElseIf UsuarioActual.CveEmpresa.Contiene(119, 141) Then ElseIf UsuarioActual.CveEmpresa.Contiene(119, 141) Then
Dim PreP As New ClsContabilidad Dim PreP As New ClsContabilidad
If PreP.GetPrePolizasDetalle(-1, CveIE) Then If PreP.GetPrePolizasDetalle(-1, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
DtMovimientosPoliza = New DataTable DtMovimientosPoliza = New DataTable
DtMovimientosPoliza.Columns.Add("CODIGO", GetType(String)) DtMovimientosPoliza.Columns.Add("CODIGO", GetType(String))
DtMovimientosPoliza.Columns.Add("Cuenta", GetType(String)) DtMovimientosPoliza.Columns.Add("Cuenta", GetType(String))
@@ -4055,7 +4081,7 @@ Partial Class PopUpVerFactura
tIdPoliza = ObjIE.IDPoliza tIdPoliza = ObjIE.IDPoliza
Dim PreP As New ClsContabilidad Dim PreP As New ClsContabilidad
If PreP.GetPrePolizasDetalle(-1, CveIE) Then If PreP.GetPrePolizasDetalle(-1, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
If PreP.DtResultados.Rows.Count > 0 Then If PreP.DtResultados.Rows.Count > 0 Then
CveProveedor = PreP.DtResultados.Rows(0)("CveProveedor").ToString.ToEntero CveProveedor = PreP.DtResultados.Rows(0)("CveProveedor").ToString.ToEntero
CvePersonal = PreP.DtResultados.Rows(0)("CvePersonal").ToString.ToEntero CvePersonal = PreP.DtResultados.Rows(0)("CvePersonal").ToString.ToEntero
@@ -4256,7 +4282,7 @@ Partial Class PopUpVerFactura
Dim dtMovs As New DataTable Dim dtMovs As New DataTable
Dim Mov As New ClsContabilidad Dim Mov As New ClsContabilidad
If Mov.GetPrePolizasDetalle(-1, CveIE) Then If Mov.GetPrePolizasDetalle(-1, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,308,309,312)") dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,308,309,312)")

View File

@@ -243,7 +243,7 @@ Partial Class Compras_ReembolsosComprobaciones
Private Sub CargaCuentas() Private Sub CargaCuentas()
DdlCuenta.Items.Clear() DdlCuenta.Items.Clear()
DdlCuenta.SelectedIndex = -1 DdlCuenta.SelectedIndex = -1
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=2) 'solo cuentas "bancarias"
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
@@ -799,7 +799,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
Else Else
'Agrego el IVA 'Agrego el IVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVA").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle" MsgError = "Detalle"
End If End If
'Agrego el IVA 'Agrego el IVA
@@ -1129,7 +1129,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
Else Else
'Agrego el IVA 'Agrego el IVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVA").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle" MsgError = "Detalle"
End If End If

View File

@@ -386,11 +386,11 @@ Partial Class RepCxPDetalle
TMP_DTDatos = ObjMovtos.DtResultados TMP_DTDatos = ObjMovtos.DtResultados
TMP_DTDatos.Columns.Add("Cuenta") TMP_DTDatos.Columns.Add("Cuenta")
If DdlGrupo.SelectedValue.ToEntero = 5 And UsuarioActual.Empresa.UsaContabilidad Then If DdlGrupo.SelectedValue.ToEntero = 5 And UsuarioActual.Empresa.UsaContabilidad Then 'cuando es grupo por proveedor, se muestra la cuneta contable
TMP_DTDatos = CargaCuentasContables(TMP_DTDatos) TMP_DTDatos = CargaCuentasContables(TMP_DTDatos)
GvDatos.Columns(7).Visible = True GvDatos.Columns(11).Visible = True
Else Else
GvDatos.Columns(7).Visible = False GvDatos.Columns(11).Visible = False
End If End If
DtDatos = TMP_DTDatos DtDatos = TMP_DTDatos

View File

@@ -175,21 +175,18 @@ Partial Class Compras_RepNotasCredito
Dim CveConceptoFluctua As Integer = 64 '64.ganacia, 65.perdida Dim CveConceptoFluctua As Integer = 64 '64.ganacia, 65.perdida
Dim TipoMovtoFluctua As Boolean = True Dim TipoMovtoFluctua As Boolean = True
Dim IdCtaContableFluctua As Integer Dim IdCtaContableFluctua As Integer
Dim CveCuenta As Integer = 0
If difFluctuacion < 0 Then If difFluctuacion < 0 Then
CveConceptoFluctua = 65 CveConceptoFluctua = 65
TipoMovtoFluctua = False TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
Else Else
CveConceptoFluctua = 64 CveConceptoFluctua = 64
TipoMovtoFluctua = True TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
End If End If
Dim ImporteFluctuacion As Decimal = Math.Abs((Importe * difFluctuacion).RoundSQL) Dim ImporteFluctuacion As Decimal = Math.Abs((Importe * difFluctuacion).RoundSQL)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, "", CveConceptoFluctua, Concepto, Now, IdCtaContableFluctua, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, TipoCambio:=TCCompra, TipoCambioPago:=TC, CveCuenta:=CveCuenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, "", CveConceptoFluctua, Concepto, Now, IdCtaContableFluctua, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, TipoCambio:=TCCompra, TipoCambioPago:=TC) Then
MsgError = "Ocurrio un Error al saldar el movimiento" MsgError = "Ocurrio un Error al saldar el movimiento"
End If End If
End If End If

View File

@@ -379,7 +379,7 @@ Partial Class Contabilidad_FiltraPolizas
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then 'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dtVC As DataTable Dim dtVC As DataTable
Dim dr As DataRow Dim dr As DataRow
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden") dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")

View File

@@ -317,7 +317,9 @@
</table> </table>
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;"> <div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,TC,CveOC,PorcentajeImpuesto,CveCuenta, Cuenta, CveSubProyecto" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None"> <asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente, CveVenta,TC,CveOC,PorcentajeImpuesto,CveCuenta, Cuenta, CveSubProyecto,
ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>Cuenta</HeaderTemplate> <HeaderTemplate>Cuenta</HeaderTemplate>

View File

@@ -133,6 +133,14 @@ Partial Class ContabilidadC_RegPrePoliza
ViewState("Actualizar") = value ViewState("Actualizar") = value
End Set End Set
End Property End Property
Public Property IDMovEditar As Integer
Get
Return CType(ViewState("IDMovEditar"), Integer)
End Get
Set(value As Integer)
ViewState("IDMovEditar") = value
End Set
End Property
Private ReadOnly Property CvePeriodo As Integer Private ReadOnly Property CvePeriodo As Integer
Get Get
@@ -357,6 +365,12 @@ Partial Class ContabilidadC_RegPrePoliza
.Add("TC", Type.GetType("System.Decimal")) .Add("TC", Type.GetType("System.Decimal"))
.Add("PorcentajeImpuesto", Type.GetType("System.Decimal")) .Add("PorcentajeImpuesto", Type.GetType("System.Decimal"))
.Add("CveCuenta", Type.GetType("System.Int32")) .Add("CveCuenta", Type.GetType("System.Int32"))
.Add("ContadoTipoTransaccion", Type.GetType("System.Int32"))
.Add("ContadoCuenta", Type.GetType("System.Int32"))
.Add("ContadoNumeroFolio", Type.GetType("System.String"))
.Add("ContadoImporte", Type.GetType("System.Double"))
.Add("ContadoBeneficiario", Type.GetType("System.String"))
.Add("ContadoObservaciones", Type.GetType("System.String"))
End With End With
End Sub End Sub
@@ -518,7 +532,7 @@ Partial Class ContabilidadC_RegPrePoliza
'Asignamos los Subproyectos 'Asignamos los Subproyectos
e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlSubProyecto").DataBind() e.Row.FCDropDownList("DdlSubProyecto").DataBind()
'e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1")) e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1"))
e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DataKey("CveSubProyecto")) e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DataKey("CveSubProyecto"))
'Asignamos los Tipos de Gasto 'Asignamos los Tipos de Gasto
@@ -931,9 +945,13 @@ Partial Class ContabilidadC_RegPrePoliza
If e.Row.DataKey("CveConcepto").ToEntero().Contiene(30) Then If e.Row.DataKey("CveConcepto").ToEntero().Contiene(30) Then
e.Row.FCLinkButton("ImgBancos").Visible = True e.Row.FCLinkButton("ImgBancos").Visible = True
If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
e.Row.DataKey("ContadoImporte").ToDecimal > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
End If End If
'If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then
' e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
'End If
End If End If
If e.Row.DataKey("CveConcepto").ToEntero().Contiene(17) Then If e.Row.DataKey("CveConcepto").ToEntero().Contiene(17) Then
@@ -971,10 +989,6 @@ Partial Class ContabilidadC_RegPrePoliza
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
'Nuevo Modulo Charlie 'Nuevo Modulo Charlie
ActualizarPrePoliza() ActualizarPrePoliza()
Else Else
Dim MensajeAlert = New StringBuilder Dim MensajeAlert = New StringBuilder
Dim ObjIE As New ClsBancos() Dim ObjIE As New ClsBancos()
@@ -999,10 +1013,6 @@ Partial Class ContabilidadC_RegPrePoliza
Dim TipoMovto As Boolean = False Dim TipoMovto As Boolean = False
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim PorcentajeImpuesto As Decimal = 0 Dim PorcentajeImpuesto As Decimal = 0
Dim CveProveedor As Integer = -1 Dim CveProveedor As Integer = -1
Dim CveCompra As Integer = -1 Dim CveCompra As Integer = -1
@@ -1035,7 +1045,11 @@ Partial Class ContabilidadC_RegPrePoliza
If CveConcepto = 30 AndAlso Importe <> 0 Then If CveConcepto = 30 AndAlso Importe <> 0 Then
'Registra movimieno bancario 'Registra movimieno bancario
If CveConcepto = 30 Then If CveConcepto = 30 Then
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario" If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
CveIEInsertado = CveIE CveIEInsertado = CveIE
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
@@ -1069,6 +1083,9 @@ Partial Class ContabilidadC_RegPrePoliza
Exit For Exit For
End If End If
End If End If
If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
End If
Next Next
@@ -1144,7 +1161,6 @@ Partial Class ContabilidadC_RegPrePoliza
If Conta IsNot Nothing Then Conta.Dispose() If Conta IsNot Nothing Then Conta.Dispose()
End If End If
End Sub End Sub
Private Sub ActualizarPrePoliza() Private Sub ActualizarPrePoliza()
Dim contador As Integer = 0 Dim contador As Integer = 0
'Dim diferencia As String = "" 'Dim diferencia As String = ""
@@ -1483,6 +1499,18 @@ Partial Class ContabilidadC_RegPrePoliza
CargaTipoTransaccion("Egs") CargaTipoTransaccion("Egs")
End If End If
Dim IdMov As Integer = GvRow.DataKey("IdMov").ToString.ToEntero
Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IdMov)
IDMovEditar = IdMov
If Rows.Count > 0 Then
Dim dr As DataRow = Rows(0)
DdlTipoTransaccion.SelectedValueExist(dr("ContadoTipoTransaccion").ToString.ToEntero)
DdlCuenta.SelectedValueExist(dr("ContadoCuenta").ToString.ToEntero)
TxtDocumentoFolio.Text = dr("ContadoNumeroFolio").ToString
TxtDocumentoObservaciones.Text = dr("ContadoObservaciones").ToString
TxtDocumentoBeneficiario.Text = dr("ContadoBeneficiario").ToString
End If
TxtDocumentoImporte.Text = If(GvRow.FCTextBox("TxtAbono").Text = "", GvRow.FCTextBox("TxtCargo").Text.FormatoNumero, GvRow.FCTextBox("TxtAbono").Text.FormatoNumero) TxtDocumentoImporte.Text = If(GvRow.FCTextBox("TxtAbono").Text = "", GvRow.FCTextBox("TxtCargo").Text.FormatoNumero, GvRow.FCTextBox("TxtAbono").Text.FormatoNumero)
UpBancos.Update() UpBancos.Update()
@@ -1501,13 +1529,30 @@ Partial Class ContabilidadC_RegPrePoliza
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub End Sub
Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click
CveConcepto = 30 Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IDMovEditar)
CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero()
CveCuenta = DdlCuenta.SelectedValue.ToEntero() If Rows.Count > 0 Then
Folio = TxtDocumentoFolio.Text Dim dr As DataRow = Rows(0)
ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal()
Observaciones = TxtDocumentoObservaciones.Text
Beneficiario = TxtDocumentoBeneficiario.Text dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero
dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero
dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text
dr("ContadoImporte") = TxtDocumentoImporte.Text.ToDecimal
dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text
dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text
End If
DtMovimientos.AcceptChanges()
GvMov.DataSource = DtMovimientos
GvMov.DataBind()
'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
'CveCuenta = DdlCuenta.SelectedValue.ToEntero
'Folio = TxtDocumentoFolio.Text
'ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal
'Observaciones = TxtDocumentoObservaciones.Text
'Beneficiario = TxtDocumentoBeneficiario.Text
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal")) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
GvMov.Rows(RowIndex).FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" GvMov.Rows(RowIndex).FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
UPMovs.Update() UPMovs.Update()
@@ -1900,7 +1945,7 @@ Partial Class ContabilidadC_RegPrePoliza
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then 'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dtVC As DataTable Dim dtVC As DataTable
Dim dr As DataRow Dim dr As DataRow
dtVC = ObjConta.DtResultados dtVC = ObjConta.DtResultados

View File

@@ -206,7 +206,7 @@
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList> <asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
</th> </th>
<th> <th>
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px"> <asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
</asp:DropDownList><br /> </asp:DropDownList><br />
</th> </th>
<th> <th>
@@ -519,8 +519,6 @@
<HeaderTemplate>Cuenta</HeaderTemplate> <HeaderTemplate>Cuenta</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="DdlCtaContable" runat="server" Text='<%# Eval("CodigoNombreCuenta") %>'></asp:Literal><br /> <asp:Literal ID="DdlCtaContable" runat="server" Text='<%# Eval("CodigoNombreCuenta") %>'></asp:Literal><br />
<%--<asp:HiddenField ID="HdnCtaContable" runat="server" Value='<%# Eval("IdCtaContable") %>' />--%>
<%--<asp:DropDownList ID="DdlCtaContable" runat="server" Width="200px" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />--%>
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="300px" /> <ItemStyle HorizontalAlign="Left" Width="300px" />
</asp:TemplateField> </asp:TemplateField>
@@ -740,7 +738,7 @@
Cuenta: Cuenta:
</div> </div>
<div class="col-xs-4"> <div class="col-xs-4">
<asp:DropDownList ID="DdlCtaContableE" runat="server" Width="405px" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br /> <asp:DropDownList ID="DdlCuentaContableE" runat="server" Width="405px" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br />
</div> </div>
</div> </div>
<br /> <br />

View File

@@ -1,5 +1,4 @@
 
Imports System.Data Imports System.Data
Imports Extensiones Imports Extensiones
Imports System.Linq Imports System.Linq
@@ -625,12 +624,15 @@ Partial Class ContabilidadC_RegPrePolizaS
Private Sub CargaCuentasContables() Private Sub CargaCuentasContables()
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
DdlCtaContable.DataSource = ObjConta.DtResultados DdlCuentaContableE.DataSource = ObjConta.DtResultados
DdlCuentaContable.DataSource = ObjConta.DtResultados
DtCuentasContables = ObjConta.DtResultados DtCuentasContables = ObjConta.DtResultados
End If End If
ObjConta.Dispose() ObjConta.Dispose()
DdlCtaContable.DataBind() DdlCuentaContable.DataBind()
DdlCtaContable.Items.Insert(0, New ListItem("Sin Asignar", "0")) DdlCuentaContable.Items.Insert(0, New ListItem("Seleccione", "0"))
DdlCuentaContableE.DataBind()
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub End Sub
Private Sub CargaTiposGasto() Private Sub CargaTiposGasto()
@@ -729,20 +731,20 @@ Partial Class ContabilidadC_RegPrePolizaS
IdCuenta = 0 IdCuenta = 0
CodigoCuenta = "" CodigoCuenta = ""
NombreCuenta = "" NombreCuenta = ""
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables 'If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString)) ' Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
If drr IsNot Nothing Then ' If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero ' IdCuenta = drt("IdCtaContable").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString() ' CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString() ' NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString() ' 'Cuenta = drr("Nombre").ToString()
End If ' End If
EsComodin = 0 ' EsComodin = 0
End If 'End If
Dim dr As DataRow = DtMovimientos.NewRow Dim dr As DataRow = DtMovimientos.NewRow
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta dr("CodigoCuenta") = drt("Codigo").ToString & "<br>" & drt("Nombre").ToString
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial")) dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
dr("Concepto") = TxtObservaciones.Text dr("Concepto") = TxtObservaciones.Text
@@ -838,7 +840,7 @@ Partial Class ContabilidadC_RegPrePolizaS
e.Row.FCLinkButton("ImgBancos").Visible = True e.Row.FCLinkButton("ImgBancos").Visible = True
If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
e.Row.DataKey("ContadoImporte").ToEntero > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then e.Row.DataKey("ContadoImporte").ToDecimal > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
End If End If
End If End If
@@ -902,10 +904,13 @@ Partial Class ContabilidadC_RegPrePolizaS
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString, CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "", gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario" If CveIE < 0 Then
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then MsgError = "No se pudo registrar movimiento bancario"
FolioIE = ObjIE.Folio Exit For
End If End If
'If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
' FolioIE = ObjIE.Folio
'End If
End If End If
@@ -1045,7 +1050,7 @@ Partial Class ContabilidadC_RegPrePolizaS
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
CvePersonal:=row.DataKey("CvePersonal").ToEntero) Then CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero) Then
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
@@ -1123,7 +1128,7 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaTipoGastoE() CargaTipoGastoE()
DdlTipoGastoE.SelectedValueExist(CveTipoGasto) DdlTipoGastoE.SelectedValueExist(CveTipoGasto)
CargaCtaContableE() CargaCtaContableE()
DdlCtaContableE.SelectedValueExist(CveCuenta) DdlCuentaContableE.SelectedValueExist(CveCuenta)
If Cargo <> 0 Then If Cargo <> 0 Then
TxtCargoE.Text = Cargo TxtCargoE.Text = Cargo
@@ -1160,12 +1165,12 @@ Partial Class ContabilidadC_RegPrePolizaS
Private Sub CargaCtaContableE() Private Sub CargaCtaContableE()
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
DdlCtaContableE.DataSource = ObjConta.DtResultados DdlCuentaContableE.DataSource = ObjConta.DtResultados
End If End If
ObjConta.Dispose() ObjConta.Dispose()
DdlCtaContableE.DataBind() DdlCuentaContableE.DataBind()
DdlCtaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
End Sub End Sub
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
@@ -1266,7 +1271,8 @@ Partial Class ContabilidadC_RegPrePolizaS
If DtMovimientos Is Nothing Then CreaDT() If DtMovimientos Is Nothing Then CreaDT()
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
Dim dr As DataRow = DtMovimientos.NewRow Dim dr As DataRow = DtMovimientos.NewRow
dr("IdCtaContable") = DdlCtaContableE.SelectedValue dr("IdCtaContable") = DdlCuentaContableE.SelectedValue
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
dr("Concepto") = TxtConceptoE.Text dr("Concepto") = TxtConceptoE.Text
@@ -1351,7 +1357,9 @@ Partial Class ContabilidadC_RegPrePolizaS
If Rows.Count > 0 Then If Rows.Count > 0 Then
Dim dr As DataRow = Rows(0) Dim dr As DataRow = Rows(0)
dr("IdCtaContable") = DdlCtaContableE.SelectedValue dr("IdCtaContable") = DdlCuentaContableE.SelectedValue
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
dr("Concepto") = TxtConceptoE.Text dr("Concepto") = TxtConceptoE.Text
@@ -1366,8 +1374,6 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, "")) dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
dr("CveCuenta") = DdlCtaContableE.SelectedValue.ToEntero
dr("CodigoNombreCuenta") = DdlCtaContableE.SelectedItem.Text
dr("Modificado") = True dr("Modificado") = True
@@ -1445,10 +1451,10 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim dr As DataRow = Rows(0) Dim dr As DataRow = Rows(0)
Dim CodigoCuenta As String = "" Dim CodigoCuenta As String = ""
Dim NombreCuenta As String = "" Dim NombreCuenta As String = ""
dr("CveCuenta") = DdlCtaContable.SelectedValue dr("CveCuenta") = DdlCuentaContable.SelectedValue
If DdlCtaContable.SelectedValue.ToEntero > 0 Then If DdlCuentaContable.SelectedValue.ToEntero > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue)) Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCuentaContable.SelectedValue))
If drr IsNot Nothing Then If drr IsNot Nothing Then
CodigoCuenta = drr("CuentaFormato").ToString() CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString() NombreCuenta = drr("Nombre").ToString()
@@ -1472,7 +1478,6 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CveClasificacion") = -1 dr("CveClasificacion") = -1
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
dr("CveCuenta") = DdlCtaContable.SelectedValue.ToEntero
End If End If
GvMov.DataSource = DtMovimientos GvMov.DataSource = DtMovimientos
GvMov.DataBind() GvMov.DataBind()
@@ -1485,6 +1490,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
Dim dr As DataRow = DtMovimientos.NewRow Dim dr As DataRow = DtMovimientos.NewRow
dr("IdCtaContable") = -1 'DdlCtaContable.SelectedValue dr("IdCtaContable") = -1 'DdlCtaContable.SelectedValue
dr("CveCuenta") = DdlCuentaContable.SelectedValue
dr("ConceptoContable") = DdlConceptosContables.SelectedItem.Text dr("ConceptoContable") = DdlConceptosContables.SelectedItem.Text
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
dr("Concepto") = TxtDescripcion.Text dr("Concepto") = TxtDescripcion.Text
@@ -1517,10 +1523,10 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CodigoCuenta As String = "" Dim CodigoCuenta As String = ""
Dim NombreCuenta As String = "" Dim NombreCuenta As String = ""
dr("CveCuenta") = DdlCtaContable.SelectedValue dr("CveCuenta") = DdlCuentaContable.SelectedValue
If DdlCtaContable.SelectedValue.ToEntero > 0 Then If DdlCuentaContable.SelectedValue.ToEntero > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue)) Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCuentaContable.SelectedValue))
If drr IsNot Nothing Then If drr IsNot Nothing Then
CodigoCuenta = drr("CuentaFormato").ToString() CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString() NombreCuenta = drr("Nombre").ToString()
@@ -1716,7 +1722,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If DrM IsNot Nothing Then If DrM IsNot Nothing Then
HdnCve.Value = idMov.ToString HdnCve.Value = idMov.ToString
DdlCtaContable.SelectedValue = DrM("CveCuenta") DdlCuentaContable.SelectedValue = DrM("CveCuenta")
TxtReferencia.Text = DrM("Referencia") TxtReferencia.Text = DrM("Referencia")
TxtObservaciones.Text = DrM("Concepto") TxtObservaciones.Text = DrM("Concepto")
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto") ' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
@@ -2024,7 +2030,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CveClasificacion As Integer = -1 Dim CveClasificacion As Integer = -1
Dim CveCuentaExcel As Integer = -1 Dim CveCuentaExcel As Integer = -1
Dim ObjConta2 As New ClsContabilidad Dim ObjConta2 As New ClsContabilidad
Dim FolioExcel As Integer = -1 Dim FolioExcel As Long = -1
Dim TipoMov As Integer = -1 Dim TipoMov As Integer = -1
Dim CveBancoCuenta As Integer = -1 Dim CveBancoCuenta As Integer = -1
If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then
@@ -2039,20 +2045,37 @@ Partial Class ContabilidadC_RegPrePolizaS
Exit For Exit For
End If End If
If CveConceptoContable = 30 Then If CveConceptoContable = 30 AndAlso Row("TipoTransferencia").ToString <> "" Then
Dim objconta3 As New ClsContabilidad Dim objconta3 As New ClsContabilidad
objconta3.GetConta_CuentasDataContabilidad(CveCuentaExcel, UsuarioActual.CveEmpresa) objconta3.GetConta_CuentasDataContabilidad(CveCuentaExcel, UsuarioActual.CveEmpresa)
If objconta3.DtResultados.Rows.Count > 0 Then If objconta3.DtResultados.Rows.Count > 0 Then
Dim rowcc As DataRow = objconta3.DtResultados.Rows(0) Dim rowcc As DataRow = objconta3.DtResultados.Rows(0)
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero() CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
DdlCuenta.SelectedValue = CveBancoCuenta DdlCuenta.SelectedValue = CveBancoCuenta
Else
CveBancoCuenta = 0
End If End If
objconta3.Dispose()
If CveBancoCuenta = 0 Then
Alert(String.Format("La cuenta <b>{0}</b> no está vinculada a una cuenta bancaria administrativa favor de verificar el archivo.", Row("Cuenta").ToString), TipoMensaje.MsgAdvertencia)
DtMovimientos.Clear()
Exit For
End If
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
FolioExcel = Row("Folio").ToString FolioExcel = Row("Folio").ToString.ToEntero
CveTipoTransaccion = TipoMov CveTipoTransaccion = TipoMov
CveCuenta = CveBancoCuenta CveCuenta = CveBancoCuenta
'carga el consecutivo
If FolioExcel = 0 Then
FolioExcel = SiguienteFolioBancos(CveBancoCuenta, TipoMov)
End If
Folio = FolioExcel Folio = FolioExcel
ImporteDocumento = IIf(Row("Abono").ToString.ToEntero > 0, Row("Abono").ToString, Row("Cargo").ToString) ImporteDocumento = IIf(Row("Abono").ToString.ToDecimal > 0, Row("Abono").ToString.ToDecimal, Row("Cargo").ToString.ToDecimal)
Observaciones = Row("Referencia").ToString Observaciones = Row("Referencia").ToString
Beneficiario = Row("Concepto").ToString Beneficiario = Row("Concepto").ToString
If Not TipoMov > 0 Then If Not TipoMov > 0 Then
@@ -2062,7 +2085,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
'sino viene el cveconcepto, busca por le nombre del concepto 'sino viene el cveconcepto, busca por le nombre del concepto
If CveConceptoContable = 0 Then If CveConceptoContable = 0 Then
Alert(String.Format("El concepto <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo"))) Alert(String.Format("El concepto <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo")))
@@ -2110,8 +2132,8 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CveCuenta") = CveCuentaExcel dr("CveCuenta") = CveCuentaExcel
dr("ContadoTipoTransaccion") = CveTipoTransaccion dr("ContadoTipoTransaccion") = CveTipoTransaccion
dr("ContadoCuenta") = CveCuenta dr("ContadoCuenta") = CveBancoCuenta
dr("ContadoNumeroFolio") = Folio dr("ContadoNumeroFolio") = FolioExcel
dr("ContadoImporte") = ImporteDocumento dr("ContadoImporte") = ImporteDocumento
dr("ContadoBeneficiario") = Beneficiario dr("ContadoBeneficiario") = Beneficiario
dr("ContadoObservaciones") = Observaciones dr("ContadoObservaciones") = Observaciones
@@ -2128,13 +2150,71 @@ Partial Class ContabilidadC_RegPrePolizaS
UPMovs.Update() UPMovs.Update()
Catch ex As Exception Catch ex As Exception
Alert("No se pudo cargar el excel") Alert("No se pudo cargar el excel", TipoMensaje.MsgAdvertencia)
End Try End Try
ArregloCuentasFolios = Nothing
End If End If
End Sub End Sub
#End Region #End Region
#Region "Siguiente Folio"
Public Property ArregloCuentasFolios As DataTable
Get
If ViewState("ArregloCuentasFolios") Is Nothing Then
Dim dt = New DataTable("CuentasBancos")
With dt.Columns
.Add("CveCuenta", Type.GetType("System.Int32"))
.Add("CveTipoTransaccion", Type.GetType("System.Int32"))
.Add("Folio", Type.GetType("System.Double"))
End With
ViewState("ArregloCuentasFolios") = dt
End If
Return CType(ViewState("ArregloCuentasFolios"), DataTable)
End Get
Set(value As DataTable)
ViewState("ArregloCuentasFolios") = value
End Set
End Property
Public Function SiguienteFolioBancos(CveCuentaBancos As Integer, CveTipoTransaccionBancos As Integer) As String
Dim Retorno As String = "0"
Dim Folio As Long = ArregloCuentasFolios.FiltroPrimeroValor("Folio", String.Format("CveCuenta = {0} and CveTipoTransaccion = {1}", CveCuentaBancos, CveTipoTransaccionBancos)).ToLong
If Folio = 0 Then
Dim Banco As New ClsBancos
Folio = Banco.GetNextFolio(CveCuentaBancos, CveTipoTransaccionBancos)
Banco.Dispose()
End If
Folio += 1
Dim a As DataRow() = ArregloCuentasFolios.Select(String.Format("CveCuenta = {0} and CveTipoTransaccion = {1}", CveCuentaBancos, CveTipoTransaccionBancos))
If a.Count = 0 Then
Dim dr As DataRow = ArregloCuentasFolios.NewRow
dr("Folio") = Folio
dr("CveCuenta") = CveCuentaBancos
dr("CveTipoTransaccion") = CveTipoTransaccionBancos
ArregloCuentasFolios.Rows.Add(dr)
Else
a(0)("Folio") = Folio 'actualizo el folio
End If
ArregloCuentasFolios.AcceptChanges()
Return Folio
End Function
#End Region
#Region "Paquete Egresos" #Region "Paquete Egresos"
Protected Sub LnkImprimirPDF_Click(sender As Object, e As EventArgs) Protected Sub LnkImprimirPDF_Click(sender As Object, e As EventArgs)
ImprimirPolizaPDF(IdPoliza) ImprimirPolizaPDF(IdPoliza)
@@ -2149,7 +2229,7 @@ Partial Class ContabilidadC_RegPrePolizaS
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then 'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dtVC As DataTable Dim dtVC As DataTable
Dim dr As DataRow Dim dr As DataRow
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden") dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")

View File

@@ -225,6 +225,15 @@
<asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% ) <asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% )
</div> </div>
</asp:Panel> </asp:Panel>
<asp:Panel runat="server" ID="pnlOpcion8" Visible="false" CssClass="form-line">
<div class="catcuentas left">
<asp:Label runat="server" Text="Personal"></asp:Label></div>
<div class="catcuentas right">
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione el personal (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</asp:Panel>
<br /> <br />

View File

@@ -278,6 +278,7 @@ Partial Class Contabilidad2_CatCuentas
CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero() CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero()
DdlAlmacen.SelectedValue = -1 DdlAlmacen.SelectedValue = -1
DdlAlmacen.SelectedValueExist(CveAlmacen) DdlAlmacen.SelectedValueExist(CveAlmacen)
DdlPersonal.SelectedValueExist(rowcc("CvePersonal").ToString().ToEntero())
End If End If
End Using End Using
@@ -686,6 +687,10 @@ Partial Class Contabilidad2_CatCuentas
Case 6 Case 6
pnlOpcion6.Visible = True pnlOpcion6.Visible = True
Case 8
pnlOpcion8.Visible = True
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
DdlPersonal.DataBind()
End Select End Select
End If End If

View File

@@ -39,7 +39,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlCconceptosContables.DataSource = ObjConta.DtResultados DdlCconceptosContables.DataSource = ObjConta.DtResultados
End If End If
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
DdlCuenta.DataSource = ObjConta.DtResultados DdlCuenta.DataSource = ObjConta.DtResultados
End If End If
ObjConta.Dispose() ObjConta.Dispose()

View File

@@ -56,10 +56,10 @@
</div> </div>
</div> </div>
<label class="col-md-1 truncate">Cuenta:</label> <label class="col-md-1 truncate">Cuentas:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px"> <asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px">
<asp:ListItem Text="Todas" Value="-1" /> <asp:ListItem Text="Todas" Value="1" />
<asp:ListItem Text="Con Movimientos" Value="2" /> <asp:ListItem Text="Con Movimientos" Value="2" />
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" /> <asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
<asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" /> <asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" />

View File

@@ -433,11 +433,12 @@ Partial Class Contratos_FacturacionMasiva
ObjFactura.Folio = -1 ObjFactura.Folio = -1
ObjFactura.Serie = "-1" ObjFactura.Serie = "-1"
ObjFactura.CveMesa = -1 ObjFactura.CveMesa = -1
ObjFactura.Fecha = DR("FechaVenc").ToString.ToDate 'If(DR("FechaVenc").ToString.ToDate > Now, Now, DR("FechaVenc").ToString.ToDate) ObjFactura.Fecha = If(DR("FechaVenc").ToString.ToDate > Now, Now, DR("FechaVenc").ToString.ToDate)
ObjFactura.CvePrePoliza = -1 ObjFactura.CvePrePoliza = -1
ObjFactura.CveMetodoPago = 1 ObjFactura.CveMetodoPago = 1
ObjFactura.MetodoPago = "Efectivo" ObjFactura.MetodoPago = "Efectivo"
ObjFactura.FechaPago = DateTime.Today
ObjFactura.MotivoDescuento = "" ObjFactura.MotivoDescuento = ""
ObjFactura.Observaciones = If(String.IsNullOrEmpty(TxtObservaciones.Text), "", TxtObservaciones.Text + " ") + DR("Observaciones").ToString ObjFactura.Observaciones = If(String.IsNullOrEmpty(TxtObservaciones.Text), "", TxtObservaciones.Text + " ") + DR("Observaciones").ToString
ObjFactura.FechaEjecucion = DateTime.Today ObjFactura.FechaEjecucion = DateTime.Today
@@ -567,6 +568,13 @@ Partial Class Contratos_FacturacionMasiva
ViewState("CveCuentaRetIVA") = ObjCliente.CveCuentaRetIVA ViewState("CveCuentaRetIVA") = ObjCliente.CveCuentaRetIVA
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
'AGREGAR LOS PLAZOS PARA EL PAGO DEL CLIENTE
Dim FechaPago As DateTime = ObjFactura.Fecha.AddDays(ObjCliente.PlazoCobranza)
ObjFactura.FechaVencimiento = FechaPago
ObjFactura.Vigencia = FechaPago
ObjFactura.FechaPago = FechaPago
End If End If
End If End If
ObjCliente.Dispose() ObjCliente.Dispose()

View File

@@ -530,7 +530,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -542,9 +541,9 @@
<rd:DefaultName>Textbox15</rd:DefaultName> <rd:DefaultName>Textbox15</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#3a4173</BackgroundColor> <BackgroundColor>White</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -566,7 +565,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -578,9 +576,9 @@
<rd:DefaultName>Textbox16</rd:DefaultName> <rd:DefaultName>Textbox16</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#3a4173</BackgroundColor> <BackgroundColor>White</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -602,7 +600,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -614,9 +611,9 @@
<rd:DefaultName>Textbox28</rd:DefaultName> <rd:DefaultName>Textbox28</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#3a4173</BackgroundColor> <BackgroundColor>White</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -642,7 +639,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -654,9 +650,9 @@
<rd:DefaultName>Textbox46</rd:DefaultName> <rd:DefaultName>Textbox46</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#3a4173</BackgroundColor> <BackgroundColor>White</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -678,7 +674,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -690,9 +685,9 @@
<rd:DefaultName>Textbox52</rd:DefaultName> <rd:DefaultName>Textbox52</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#3a4173</BackgroundColor> <BackgroundColor>White</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -714,7 +709,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -726,9 +720,9 @@
<rd:DefaultName>Textbox66</rd:DefaultName> <rd:DefaultName>Textbox66</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#3a4173</BackgroundColor> <BackgroundColor>White</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -1618,7 +1612,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>16pt</FontSize> <FontSize>16pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -1633,7 +1626,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>12pt</FontSize> <FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -1648,7 +1640,6 @@
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>12pt</FontSize> <FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -1659,9 +1650,8 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName> <rd:DefaultName>Textbox4</rd:DefaultName>
<Top>0.19844cm</Top> <Top>0.19844cm</Top>
<Left>2.10635in</Left>
<Height>1.6616cm</Height> <Height>1.6616cm</Height>
<Width>9.94376cm</Width> <Width>19.38791cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1670,20 +1660,6 @@
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
</Style> </Style>
</Textbox> </Textbox>
<Image Name="Image5">
<Source>Embedded</Source>
<Value>Logo</Value>
<Sizing>FitProportional</Sizing>
<Left>0.00896cm</Left>
<Height>2.5433cm</Height>
<Width>4.13cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Image>
</ReportItems> </ReportItems>
<Style> <Style>
<Border> <Border>
@@ -1905,7 +1881,6 @@
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
</ReportParameters> </ReportParameters>
<Code> <Code>
REM Reset Page Number: REM Reset Page Number:
Shared offset As Integer Shared offset As Integer

View File

@@ -62,7 +62,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal
e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0 e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0
If ExistenciasAux > 0 Then If ExistenciasAux > 0 Then
e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux.ToString("N3")
Else Else
e.Row.FCCheckBox("Chk").Visible = False e.Row.FCCheckBox("Chk").Visible = False
e.Row.FCRangeValidator("RVR").MaximumValue = 0 e.Row.FCRangeValidator("RVR").MaximumValue = 0

View File

@@ -4095,7 +4095,8 @@ Partial Class Inventarios_EntradasSalidas
Dim ImporteConcepto As Decimal = 0 Dim ImporteConcepto As Decimal = 0
Dim tConcepto As String = TxtIFDescripcion.Text.Trim Dim tConcepto As String = TxtIFDescripcion.Text.Trim
Dim Fecha = TxtFechaInvFisico.Text.ToDate.ToString("yyyy/MM/dd").ToDate Dim Fecha = TxtFechaInvFisico.Text.ToDate.ToString("yyyy/MM/dd").ToDate
Dim tCveSubProyecto As Integer = -1 Dim tCveSubProyectoEntrada As Integer = -1
Dim tCveSubProyectoSalida As Integer = -1
Dim TipoMovto As Boolean = False Dim TipoMovto As Boolean = False
Dim idCtaContableEntrada As Integer = 0 Dim idCtaContableEntrada As Integer = 0
Dim idCtaContableSalida As Integer = 0 Dim idCtaContableSalida As Integer = 0
@@ -4179,7 +4180,7 @@ Partial Class Inventarios_EntradasSalidas
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacenInventarioFisico.SelectedValue)) Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacenInventarioFisico.SelectedValue))
If drA2 IsNot Nothing Then If drA2 IsNot Nothing Then
idCtaContableEntrada = drA2("IdCtaContable").ToString.ToEntero idCtaContableEntrada = drA2("IdCtaContable").ToString.ToEntero
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero tCveSubProyectoEntrada = drA2("CveSubProyecto").ToString.ToEntero
End If End If
Else Else
ErrorMovInv = True ErrorMovInv = True
@@ -4195,7 +4196,7 @@ Partial Class Inventarios_EntradasSalidas
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacenInventarioFisico.SelectedValue)) Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacenInventarioFisico.SelectedValue))
If drA2 IsNot Nothing Then If drA2 IsNot Nothing Then
idCtaContableSalida = drA2("IdCtaContable").ToString.ToEntero idCtaContableSalida = drA2("IdCtaContable").ToString.ToEntero
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero tCveSubProyectoSalida = drA2("CveSubProyecto").ToString.ToEntero
End If End If
Else Else
ErrorMovInv = True ErrorMovInv = True
@@ -4214,7 +4215,7 @@ Partial Class Inventarios_EntradasSalidas
If ValorEntrada <= ValorSalida Then If ValorEntrada <= ValorSalida Then
TipoMovto = True : ValorEntrada = -ValorEntrada ' invierto su naturaleza TipoMovto = True : ValorEntrada = -ValorEntrada ' invierto su naturaleza
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, ValorEntrada, "", 68, tConcepto, Fecha, idCtaContableEntrada, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ValorEntrada, Contabilizable:=EsContabilizable) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, ValorEntrada, "", 68, tConcepto, Fecha, idCtaContableEntrada, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ValorEntrada, CveSubProyecto:=tCveSubProyectoEntrada, Contabilizable:=EsContabilizable) Then
ErrorMovInv = True ErrorMovInv = True
Mensaje = "Ocurrió un error al guardar los movimientos contables de entrada" Mensaje = "Ocurrió un error al guardar los movimientos contables de entrada"
End If End If
@@ -4226,14 +4227,14 @@ Partial Class Inventarios_EntradasSalidas
If ValorSalida < ValorEntrada Then If ValorSalida < ValorEntrada Then
TipoMovto = False : ValorSalida = -ValorSalida ' invierto su naturaleza TipoMovto = False : ValorSalida = -ValorSalida ' invierto su naturaleza
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, ValorSalida, "", 68, tConcepto, Fecha, idCtaContableSalida, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ValorSalida, Contabilizable:=EsContabilizable) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, ValorSalida, "", 68, tConcepto, Fecha, idCtaContableSalida, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ValorSalida, CveSubProyecto:=tCveSubProyectoSalida, Contabilizable:=EsContabilizable) Then
ErrorMovInv = True ErrorMovInv = True
Mensaje = "Ocurrió un error al guardar los movimientos contables de salida" Mensaje = "Ocurrió un error al guardar los movimientos contables de salida"
End If End If
End If End If
If ValorEntrada >= ValorSalida Then If ValorEntrada >= ValorSalida Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorEntrada + ValorSalida, "", 260, tConcepto, Fecha, IdCuentaOtrosIngresos, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveSubProyecto:=tCveSubProyecto, ImporteMX:=ValorEntrada + ValorSalida, Contabilizable:=EsContabilizable) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorEntrada + ValorSalida, "", 260, tConcepto, Fecha, IdCuentaOtrosIngresos, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveSubProyecto:=tCveSubProyectoSalida, ImporteMX:=ValorEntrada + ValorSalida, Contabilizable:=EsContabilizable) Then
ErrorMovInv = True ErrorMovInv = True
Mensaje = "Ocurrió un error al guardar los movimientos contables de ajuste de ingreso" Mensaje = "Ocurrió un error al guardar los movimientos contables de ajuste de ingreso"
End If End If
@@ -4253,7 +4254,7 @@ Partial Class Inventarios_EntradasSalidas
tIdCtaGasto = 1321 tIdCtaGasto = 1321
End Select End Select
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorSalida + ValorEntrada, "", 51, tConcepto, Fecha, tIdCtaGasto, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=tCveClasificacion, CveSubProyecto:=tCveSubProyecto, ImporteMX:=ValorSalida + ValorEntrada, Contabilizable:=EsContabilizable) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorSalida + ValorEntrada, "", 51, tConcepto, Fecha, tIdCtaGasto, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=tCveClasificacion, CveSubProyecto:=tCveSubProyectoSalida, ImporteMX:=ValorSalida + ValorEntrada, Contabilizable:=EsContabilizable) Then
ErrorMovInv = True ErrorMovInv = True
Mensaje = "Ocurrió un error al guardar los movimientos contables de ajuste de salida" Mensaje = "Ocurrió un error al guardar los movimientos contables de ajuste de salida"
End If End If
@@ -4264,7 +4265,7 @@ Partial Class Inventarios_EntradasSalidas
If Not ErrorMovInv Then If Not ErrorMovInv Then
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
ObjConta.GetPrePolizasDetalle(CvePrePoliza) ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre > 0 Then
ErrorMovInv = True ErrorMovInv = True
Mensaje = "Ocurrió un error al validar los movimientos contables" Mensaje = "Ocurrió un error al validar los movimientos contables"

View File

@@ -2497,12 +2497,12 @@ Partial Class Inventarios_EntregaAlmacen
If DtDetalle.Rows.Count > 0 Then If DtDetalle.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalle.Rows For Each Dr1 As DataRow In DtDetalle.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"ISNULL(CveTipoAlmacenDevolucion,0) <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero 'CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"ISNULL(CveTipoAlmacenDevolucion,0) <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For Exit For
@@ -2511,11 +2511,11 @@ Partial Class Inventarios_EntregaAlmacen
ElseIf DtDetalleLote.Rows.Count > 0 Then ElseIf DtDetalleLote.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalleLote.Rows For Each Dr1 As DataRow In DtDetalleLote.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero 'CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
ErrorMovInv = True ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.") TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For Exit For

View File

@@ -845,27 +845,27 @@ Partial Class OC
'Nuevo Proceso que permite modificar detalles 'Nuevo Proceso que permite modificar detalles
'If Not UsuarioActual.TienePermisoProceso(131) Then 'If Not UsuarioActual.TienePermisoProceso(131) Then
If GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus)).Rows.Count > 0 Then If GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus)).Rows.Count > 0 Then
Dim Dr As DataRow Dim Dr As DataRow
Dr = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus))(0) Dr = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus))(0)
If UsuarioActual.TienePermisoProceso(203) And Dr("TipoTermino").ToString.ToEntero = 3 And Dr("Tipo").ToString = "OC" Then If (UsuarioActual.TienePermisoProceso(203)) AndAlso Dr("TipoTermino").ToString.ToEntero = 3 AndAlso Dr("Tipo").ToString = "OC" Then
CargaClasificaciones() CargaClasificaciones()
DesHabilitar() If Not UsuarioActual.TienePermisoProceso(131) Then DesHabilitar()
GvD.Columns(9).Visible = True GvD.Columns(9).Visible = True
LbAgregar.Enabled = True LbAgregar.Enabled = True
txtPrecioUnitario.Enabled = True txtPrecioUnitario.Enabled = True
DdlProyecto.Enabled = True DdlProyecto.Enabled = True
DdlSubProyecto.Enabled = True DdlSubProyecto.Enabled = True
TxtObsPS.Enabled = True TxtObsPS.Enabled = True
CboUnidadMedida.Enabled = True CboUnidadMedida.Enabled = True
DdlClasificacion.Enabled = True DdlClasificacion.Enabled = True
DdlP2.Enabled = True DdlP2.Enabled = True
TxtCant.Enabled = True TxtCant.Enabled = True
BtnGuardar.Enabled = True BtnGuardar.Enabled = True
BtnCancelar.Enabled = True BtnCancelar.Enabled = True
ElseIf Dr("TipoTermino").ToString.ToEntero = 3 And Dr("Tipo").ToString = "OC" Then ElseIf Dr("TipoTermino").ToString.ToEntero = 3 And Dr("Tipo").ToString = "OC" AndAlso Not UsuarioActual.TienePermisoProceso(131) Then
DesHabilitar() DesHabilitar()
End If
End If End If
End If
'End If 'End If
'NO PERMITE REGISTRAR PS 'NO PERMITE REGISTRAR PS
@@ -3594,9 +3594,6 @@ Partial Class OC
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
If e.Row.RowState = DataControlRowState.Normal Or e.Row.RowState = DataControlRowState.Alternate Then If e.Row.RowState = DataControlRowState.Normal Or e.Row.RowState = DataControlRowState.Alternate Then
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
Dim Str As String = e.Row.DBCampo("SubProyecto") Dim Str As String = e.Row.DBCampo("SubProyecto")
@@ -3609,7 +3606,6 @@ Partial Class OC
'comente esta linea, RMF: 2015.04.20 'comente esta linea, RMF: 2015.04.20
'If DtEstatusUsuarios.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto"))).Rows.Count = 0 Then e.Row.FCImageButton("ImgEdit").Visible = False : e.Row.FCImageButton("ImgDelete").Visible = False 'If DtEstatusUsuarios.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto"))).Rows.Count = 0 Then e.Row.FCImageButton("ImgEdit").Visible = False : e.Row.FCImageButton("ImgDelete").Visible = False
If TipoOC = "OC" AndAlso Not IsDBNull(e.Row.DBCampo("CveOrdenCompraPadre")) AndAlso IsNumeric(e.Row.DBCampo("CveOrdenCompraPadre")) Then If TipoOC = "OC" AndAlso Not IsDBNull(e.Row.DBCampo("CveOrdenCompraPadre")) AndAlso IsNumeric(e.Row.DBCampo("CveOrdenCompraPadre")) Then
GvD.Columns(10).Visible = True GvD.Columns(10).Visible = True
lblTipoPadreHijo.Visible = True lblTipoPadreHijo.Visible = True
@@ -3623,10 +3619,6 @@ Partial Class OC
'CveAFVinculado 'CveAFVinculado
e.Row.FCLiteral("LitMaq").Text = String.Format("<a class='Texto' href='../AF/AF.aspx?CveActivoFijo={0}'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("CodigoAF")) e.Row.FCLiteral("LitMaq").Text = String.Format("<a class='Texto' href='../AF/AF.aspx?CveActivoFijo={0}'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("CodigoAF"))
'CveCompraDetalle Vinculada 'CveCompraDetalle Vinculada
Dim ObjOC As New ClsOC Dim ObjOC As New ClsOC
If ObjOC.GetOCVinculadasPendientes(e.Row.DBCampo("CveOrdenCompraDetalle").ToEntero) Then If ObjOC.GetOCVinculadasPendientes(e.Row.DBCampo("CveOrdenCompraDetalle").ToEntero) Then
@@ -3680,8 +3672,6 @@ Partial Class OC
If e.Row.DBCampo("CveClasificacionOG").ToString.ToEntero > 0 Then e.Row.FCDropDownList("DdlAC5").SelectedValue = e.Row.DBCampo("CveClasificacionOG") If e.Row.DBCampo("CveClasificacionOG").ToString.ToEntero > 0 Then e.Row.FCDropDownList("DdlAC5").SelectedValue = e.Row.DBCampo("CveClasificacionOG")
End If End If
'CLASIFICACION 'CLASIFICACION
If isWithFamily() Then If isWithFamily() Then
e.Row.FCLabel("LblClasificacion").Text = e.Row.DBCampo("SubFamilia") e.Row.FCLabel("LblClasificacion").Text = e.Row.DBCampo("SubFamilia")
@@ -3693,7 +3683,7 @@ Partial Class OC
Drr = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus))(0) Drr = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus))(0)
If Drr IsNot Nothing AndAlso UsuarioActual.TienePermisoProceso(203) AndAlso Drr("TipoTermino").ToString.ToEntero = 3 AndAlso Drr("Tipo").ToString = "OC" Then If Drr IsNot Nothing AndAlso UsuarioActual.TienePermisoProceso(203) AndAlso Drr("TipoTermino").ToString.ToEntero = 3 AndAlso Drr("Tipo").ToString = "OC" Then
If e.Row.DataKey("CveCompra").ToEntero > 0 Then If e.Row.DataKey("CveCompra").ToEntero > 0 Then
If Not UsuarioActual.CveUsuario = 100 Then '[IPP] PARA PODER EDITAR If e.Row.DBCampo("CantidadNoEditable").ToDouble >= e.Row.DBCampo("Cantidad").ToDouble Then '[IPP] PARA PODER EDITAR
e.Row.FCLinkButton("imgE").Enabled = False e.Row.FCLinkButton("imgE").Enabled = False
e.Row.FCLinkButton("imgE").ToolTip = "El concepto no se puede editar porque ya esta asignado a una compra" e.Row.FCLinkButton("imgE").ToolTip = "El concepto no se puede editar porque ya esta asignado a una compra"
e.Row.FCLinkButton("imgD").Enabled = False e.Row.FCLinkButton("imgD").Enabled = False
@@ -3709,7 +3699,6 @@ Partial Class OC
e.Row.FCLinkButton("imgD").Attributes.Remove("Data-toggle") e.Row.FCLinkButton("imgD").Attributes.Remove("Data-toggle")
e.Row.FCLinkButton("imgD").Attributes.Add("Data-toggle", "tooltip") e.Row.FCLinkButton("imgD").Attributes.Add("Data-toggle", "tooltip")
End If End If
End If End If
@@ -3729,6 +3718,14 @@ Partial Class OC
FiltroClasificacion = String.Format("CveClasificacion = {0}", e.Row.DBCampo("CveClasificacion")) FiltroClasificacion = String.Format("CveClasificacion = {0}", e.Row.DBCampo("CveClasificacion"))
End If End If
If CveOrdenCompra > 0 AndAlso (e.Row.DBCampo("CantidadVinculadaCompra").ToDouble > 0 OrElse e.Row.DBCampo("CantidadSurtidaAlmacen").ToDouble > 0 OrElse e.Row.DBCampo("CantidadVinculada").ToDouble > 0) Then
e.Row.FCDropDownList("DdlPS").Enabled = False
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
e.Row.FCDropDownList("CboUnidadMedidaEdit").Enabled = False
e.Row.FCTextBox("TxtImporteEdit").Enabled = False
e.Row.FCTextBox("TxtDescuentoEdit").Enabled = False
End If
'DDL PS 'DDL PS
If e.Row.DBCampo("CveClasificacion").ToString() <> "" Then If e.Row.DBCampo("CveClasificacion").ToString() <> "" Then
e.Row.FCDropDownList("DdlPS").DataSource = GlobalDTPS(CveEmpresaActual).FiltraParametros(FiltroClasificacion, "PS") e.Row.FCDropDownList("DdlPS").DataSource = GlobalDTPS(CveEmpresaActual).FiltraParametros(FiltroClasificacion, "PS")
@@ -3781,8 +3778,6 @@ Partial Class OC
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then 'empresa agricola If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then 'empresa agricola
e.Row.FCDropDownList("DdlCultivosCuadroEdit").Visible = True e.Row.FCDropDownList("DdlCultivosCuadroEdit").Visible = True
e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto").ToEntero}") e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto").ToEntero}")

View File

@@ -254,7 +254,7 @@
<div class="row"> <div class="row">
<label class="col-md-3 truncate">Tipo Promoción:</label> <label class="col-md-3 truncate">Tipo Promoción:</label>
<div class="col-md-9"> <div class="col-md-9">
<asp:DropDownList ID="DdlTipoPromocion" DataTextField="TipoPromocion" DataValueField="CveTipoPromocion" Width="100%" CssClass="select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoPromocion_SelectedIndexChanged"> <asp:DropDownList ID="DdlTipoPromocion" DataTextField="TipoPromocion" DataValueField="CveTipoPromocion" Width="100%" CssClass="select2me" runat="server" AutoPostBack="true" >
<asp:ListItem Text="Seleccione" Value="-1" Selected="True" /> <asp:ListItem Text="Seleccione" Value="-1" Selected="True" />
<asp:ListItem Text="Importe $" Value="1" /> <asp:ListItem Text="Importe $" Value="1" />
<asp:ListItem Text="Descuento %" Value="2" /> <asp:ListItem Text="Descuento %" Value="2" />
@@ -272,7 +272,7 @@
</div> </div>
</div> </div>
<div class="row" id="DivCantMinima" visible="false" runat="server"> <div class="row" id="DivCantMinima" runat="server">
<label class="col-md-3 truncate">Cantidad Mínima:</label> <label class="col-md-3 truncate">Cantidad Mínima:</label>
<div class="col-md-9"> <div class="col-md-9">
<asp:TextBox ID="TxtCantMinima" Text="" runat="server" /> <asp:TextBox ID="TxtCantMinima" Text="" runat="server" />
@@ -287,9 +287,9 @@
<div class="row" runat="server" id="DivRin" visible="false"> <div class="row" runat="server" id="DivRin" visible="false">
<label class="col-md-3 truncate">Rin:</label> <label class="col-md-3 truncate">Rin:</label>
<div class="col-md-9"> <div class="col-md-9">
<asp:DropDownList ID="DdlRin" DataTextField="RinTamaño" DataValueField="CveRinTamaño" Width="100%" CssClass="select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoPromocion_SelectedIndexChanged"> <asp:DropDownList ID="DdlRin" DataTextField="RinTamaño" DataValueField="CveRinTamaño" Width="100%" CssClass="select2me" runat="server" >
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" InitialValue="-1" ControlToValidate="DdlTipoPromocion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Promoción''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" InitialValue="-1" ControlToValidate="DdlRin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Rin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPromocion" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPromocion" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>

View File

@@ -104,7 +104,7 @@ Partial Class Ventas_Promociones
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
GvDatos.Columns(7).Visible = True GvDatos.Columns(8).Visible = True
DivRin.Visible = True DivRin.Visible = True
Dim ObjGral As New ClsGenerales Dim ObjGral As New ClsGenerales
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
@@ -235,7 +235,7 @@ Partial Class Ventas_Promociones
LbPUActual.Text = "" LbPUActual.Text = ""
DdlTipoPromocion.SelectedValue = "-1" DdlTipoPromocion.SelectedValue = "-1"
TxtPromocionConcepto.Text = "" TxtPromocionConcepto.Text = ""
TxtCantMinima.Text = "" TxtCantMinima.Text = "1"
ChkRestricciones.Checked = False ChkRestricciones.Checked = False
'DivRestricciones.Visible = False 'DivRestricciones.Visible = False
@@ -259,6 +259,11 @@ Partial Class Ventas_Promociones
Exit Sub Exit Sub
End If End If
If TxtCantMinima.Text.ToEntero <= 0 Then
Alert("La cantidad minima debe ser de 1", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Dr As DataRow = Nothing Dim Dr As DataRow = Nothing
If CveConsecutivo >= 0 Then If CveConsecutivo >= 0 Then
@@ -291,11 +296,7 @@ Partial Class Ventas_Promociones
Dr("PUPromocion") = LbPUActual.Text.ToDecimal - (LbPUActual.Text.ToDecimal * TxtPromocionConcepto.Text.ToDecimal / 100) Dr("PUPromocion") = LbPUActual.Text.ToDecimal - (LbPUActual.Text.ToDecimal * TxtPromocionConcepto.Text.ToDecimal / 100)
End If End If
If DdlTipoPromocion.SelectedValue.ToEntero = 3 Then Dr("CantidadMinima") = TxtCantMinima.Text.ToEntero
Dr("CantidadMinima") = TxtCantMinima.Text.ToEntero
Else
Dr("CantidadMinima") = 1
End If
If ChkRestricciones.Checked Then If ChkRestricciones.Checked Then
Dr("AplicaRestriccionTexto") = "Si" Dr("AplicaRestriccionTexto") = "Si"
@@ -369,7 +370,7 @@ Partial Class Ventas_Promociones
LbPUActual.Text = Gvr.DataKey("PUAnterior").FormatoNumero LbPUActual.Text = Gvr.DataKey("PUAnterior").FormatoNumero
DdlTipoPromocion.SelectedValue = Gvr.DataKey("CveTipoPromocion") DdlTipoPromocion.SelectedValue = Gvr.DataKey("CveTipoPromocion")
DdlTipoPromocion_SelectedIndexChanged(sender, Nothing) 'DdlTipoPromocion_SelectedIndexChanged(sender, Nothing)
TxtPromocionConcepto.Text = Gvr.DataKey("Promocion").FormatoNumero(4) TxtPromocionConcepto.Text = Gvr.DataKey("Promocion").FormatoNumero(4)
TxtCantMinima.Text = Gvr.DataKey("CantidadMinima") TxtCantMinima.Text = Gvr.DataKey("CantidadMinima")
@@ -533,11 +534,11 @@ Partial Class Ventas_Promociones
End Sub End Sub
#End Region #End Region
Protected Sub DdlTipoPromocion_SelectedIndexChanged(sender As Object, e As EventArgs) 'Protected Sub DdlTipoPromocion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoPromocion.SelectedIndexChanged
If DdlTipoPromocion.SelectedValue = "3" Then ' If DdlTipoPromocion.SelectedValue = "3" Then
DivCantMinima.Visible = True ' DivCantMinima.Visible = True
Else ' Else
DivCantMinima.Visible = False ' DivCantMinima.Visible = False
End If ' End If
End Sub 'End Sub
End Class End Class

View File

@@ -4911,11 +4911,11 @@ Partial Class Ventas
'ACTIVA CONVERSION DE MONEDA 'ACTIVA CONVERSION DE MONEDA
If DdlMoneda.SelectedValue.ToEntero() = 1 Then If DdlMoneda.SelectedValue.ToEntero() = 1 Then
TrConversionDolares.Visible = True TrConversionDolares.Visible = True
ChkConvertirDolares.Enabled = True ChkConvertirDolares.Enabled = Not UsuarioActual.TienePermisoProceso(324)
TxtTipoCambioDlls.Enabled = True TxtTipoCambioDlls.Enabled = True
Else Else
TrConversionTipoCambio.Visible = True TrConversionTipoCambio.Visible = True
ChkConvertirDoctoPesos.Enabled = True ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
TxtTipoCambio.Enabled = True TxtTipoCambio.Enabled = True
End If End If
End If End If
@@ -5308,9 +5308,15 @@ Partial Class Ventas
'FACTURACION 3.3 'FACTURACION 3.3
DdlMetodoPago33.DataSource = GlobalDTVtaMetodoPago 'No puede asignar PUE como método de pago
If UsuarioActual.TienePermisoProceso(326) Then
DdlMetodoPago33.DataSource = GlobalDTVtaMetodoPago.FiltraParametros("CveMetodoPago <> 1")
Else
DdlMetodoPago33.DataSource = GlobalDTVtaMetodoPago
End If
DdlMetodoPago33.DataBind() DdlMetodoPago33.DataBind()
DdlMetodoPago33.SelectedValue = "3" DdlMetodoPago33.SelectedValueExist("3")
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero()) CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
@@ -6151,6 +6157,23 @@ Partial Class Ventas
End Sub End Sub
Private Sub CargaRestriccionesCreditoCliente(Optional Alertas As Boolean = False, Optional CveVenta As Integer = -1) Private Sub CargaRestriccionesCreditoCliente(Optional Alertas As Boolean = False, Optional CveVenta As Integer = -1)
'RMF. validacion temporal
'verifica si tiene autorizaciones de Nota de crédito autorizadas
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then ' si es empresa de acumuladores
Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, CveEstatus:=1) Then
Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="TipoAutorizacion")
If RowAutorizacion IsNot Nothing Then
DdlTipoComprobante.SelectedValueExistInsert("Egs", "Egresos")
End If
End If
ObjVentas.Dispose()
End If
If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso Me.PermiteCredito = False AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1 Then If UsuarioActual.Empresa.Funcionalidad(570) = "1" AndAlso Me.PermiteCredito = False AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1 Then
RBLPago.SelectedValue = "2" RBLPago.SelectedValue = "2"
RBLPago.Items(0).Enabled = False RBLPago.Items(0).Enabled = False
@@ -6163,7 +6186,9 @@ Partial Class Ventas
'si llegó por la opción de cotización no debe de restringuir 'si llegó por la opción de cotización no debe de restringuir
If IfNull(Request("Op"), "").ToString() = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot" If IfNull(Request("Op"), "").ToString() = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot"
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant")) If Not UsuarioActual.TienePermisoProceso(325) Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
End If
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
LnkPedido2SinFacturar.Visible = False LnkPedido2SinFacturar.Visible = False
LnkCotizaciones.Visible = False LnkCotizaciones.Visible = False
@@ -6182,7 +6207,6 @@ Partial Class Ventas
If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%" If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%"
If UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then If UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
'If LblRFC.Text.Trim <> "XAXX010101000" Then
Dim Vta As New ClsVentas Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa) Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
@@ -6202,7 +6226,9 @@ Partial Class Ventas
If IfNull(Request("Op"), "").ToString() = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot" If IfNull(Request("Op"), "").ToString() = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot"
'quito remisión y factura 'quito remisión y factura
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant")) If Not UsuarioActual.TienePermisoProceso(325) Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
End If
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
If Opcion = 1 Then If Opcion = 1 Then
BtnEmitirImprimir.Visible = False BtnEmitirImprimir.Visible = False
@@ -6261,7 +6287,9 @@ Partial Class Ventas
'si llegó por la opción de cotización no debe de restringuir 'si llegó por la opción de cotización no debe de restringuir
If IfNull(Request("Op"), "").ToString() = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot" If IfNull(Request("Op"), "").ToString() = "Cot" Then DdlTipoComprobante.SelectedValue = "Cot"
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant")) If Not UsuarioActual.TienePermisoProceso(325) Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
End If
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
BtnsFacturar.Visible = False BtnsFacturar.Visible = False
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274) LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
@@ -6271,7 +6299,25 @@ Partial Class Ventas
LnkOCs.Visible = False LnkOCs.Visible = False
Else Else
If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia) 'RMF. codigo temporal para pruebas
If Alertas AndAlso UsuarioActual.CveEmpresa = 140 AndAlso UsuarioActual.CveUsuario.Contiene(100, 1937, 2275) AndAlso Now.Hour > 5 AndAlso Now.Hour < 9 Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
Vta.Dispose()
If Opcion > 0 Then
LnkSolicitarCredito.Visible = True
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
End If
Else
'este codigo no es temporal
If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
If UsuarioActual.CveEmpresa = 140 Then
LnkSolicitarCredito.Visible = True
DdlTipoAutorizacion.SelectedValueExist("1")
End If
End If
End If End If
End If End If
UPPCreditoDisponible.Update() UPPCreditoDisponible.Update()
@@ -6298,7 +6344,9 @@ Partial Class Ventas
Exit Sub Exit Sub
ElseIf DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso EsCreaApartirDe Then ElseIf DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso EsCreaApartirDe Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant")) If Not UsuarioActual.TienePermisoProceso(325) Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
End If
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Egs")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Egs"))
@@ -8240,7 +8288,7 @@ Partial Class Ventas
Dim GeneroDescuentoProntoPago As Boolean = False Dim GeneroDescuentoProntoPago As Boolean = False
'SOLO GENERAR NC POR DESCUENTO PRONTO PAGO SI EL PAGO ES DE CONTADO 'SOLO GENERAR NC POR DESCUENTO PRONTO PAGO SI EL PAGO ES DE CONTADO
If RBLPago.SelectedValue = "2" AndAlso ObjFactura.DescuentoProntoPago > 0 Then If ErrorList.Count = 0 AndAlso RBLPago.SelectedValue = "2" AndAlso ObjFactura.DescuentoProntoPago > 0 Then
Dim ImportePagado = DtPagos.SUM("Importe").ToString().ToDecimal Dim ImportePagado = DtPagos.SUM("Importe").ToString().ToDecimal
Dim ImporteRNC As Decimal = LblDescuentosRNC.Text.ToDecimal() Dim ImporteRNC As Decimal = LblDescuentosRNC.Text.ToDecimal()
@@ -16695,11 +16743,11 @@ Partial Class Ventas
Dim dr As DataRow = Nothing Dim dr As DataRow = Nothing
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
dr = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL) AND (TipoPromocion <> 3 OR (TipoPromocion = 3 AND CantidadMinima <= {3} ))", CvePS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, TxtCantidad.Text), Orderby:="CantidadMinima desc ") dr = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {2} OR CveRinTamaño IS NULL) AND ((TipoPromocion <> 3 AND (CantidadMinima <= {3} OR CantidadMinima IS NULL)) OR (TipoPromocion = 3 AND CantidadMinima <= {3} ))", CvePS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, TxtCantidad.Text), Orderby:="CantidadMinima desc ")
If dr Is Nothing Then If dr Is Nothing Then
'verifica marca, si tiene asignada la promocion 'verifica marca, si tiene asignada la promocion
dr = DtPromociones.FiltroPrimero(String.Format("CvePS IS NULL AND CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {3} OR CveRinTamaño IS NULL) AND (TipoPromocion <> 3 OR (TipoPromocion = 3 AND CantidadMinima <= {4} )) ", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, TxtCantidad.Text), Orderby:="CantidadMinima desc") dr = DtPromociones.FiltroPrimero(String.Format("CvePS IS NULL AND CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL) AND (CveSubProyecto = {2} OR CveSubProyecto IS NULL) AND (CveRinTamaño = {3} OR CveRinTamaño IS NULL) AND ((TipoPromocion <> 3 AND (CantidadMinima <= {4} OR CantidadMinima IS NULL)) OR (TipoPromocion = 3 AND CantidadMinima <= {4} )) ", CveClasifPS, CveMarcaPS, DdlSubProyectoDatos.SelectedValue, CveRinTamañoPS, TxtCantidad.Text), Orderby:="CantidadMinima desc")
End If End If
End If End If
@@ -20442,10 +20490,12 @@ Partial Class Ventas
TxtTipoCambio.Text = "1" TxtTipoCambio.Text = "1"
TxtTipoCambioDlls.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString() TxtTipoCambioDlls.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
TrConversionDolares.Visible = True TrConversionDolares.Visible = True
ChkConvertirDolares.Enabled = Not UsuarioActual.TienePermisoProceso(324)
Case "2" Case "2"
TxtTipoCambioDlls.Text = "1" TxtTipoCambioDlls.Text = "1"
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString() TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
TrConversionTipoCambio.Visible = True TrConversionTipoCambio.Visible = True
ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
Case Else Case Else
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString() TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
TrConversionTipoCambio.Visible = True TrConversionTipoCambio.Visible = True
@@ -27588,7 +27638,7 @@ Partial Class Ventas
If DdlMoneda.SelectedValue = "2" Then If DdlMoneda.SelectedValue = "2" Then
TrConversionTipoCambio.Visible = True TrConversionTipoCambio.Visible = True
End If End If
ChkConvertirDoctoPesos.Enabled = True ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
TxtTipoCambio.Enabled = True TxtTipoCambio.Enabled = True
TxtTotal.ReadOnly = False TxtTotal.ReadOnly = False
TxtTotal.Attributes("readonly") = "readonly" TxtTotal.Attributes("readonly") = "readonly"
@@ -28778,11 +28828,11 @@ Partial Class Ventas
If DdlMoneda.SelectedValue.ToEntero() = 1 Then If DdlMoneda.SelectedValue.ToEntero() = 1 Then
TrConversionDolares.Visible = True TrConversionDolares.Visible = True
ChkConvertirDolares.Enabled = True ChkConvertirDolares.Enabled = Not UsuarioActual.TienePermisoProceso(324)
TxtTipoCambioDlls.Enabled = True TxtTipoCambioDlls.Enabled = True
Else Else
TrConversionTipoCambio.Visible = True TrConversionTipoCambio.Visible = True
ChkConvertirDoctoPesos.Enabled = True ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
TxtTipoCambio.Enabled = True TxtTipoCambio.Enabled = True
End If End If
@@ -29287,7 +29337,7 @@ Partial Class Ventas
'Sección Detalle 'Sección Detalle
DdlMoneda.Enabled = True DdlMoneda.Enabled = True
ChkConvertirDoctoPesos.Enabled = True ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
TxtTipoCambio.Enabled = True TxtTipoCambio.Enabled = True
TxtFechaEjecucion.ReadOnly = False TxtFechaEjecucion.ReadOnly = False
TxtFechaEjecucion.Text = Now.ToShortDateString TxtFechaEjecucion.Text = Now.ToShortDateString