This commit is contained in:
2023-05-29 19:36:30 -07:00
18 changed files with 3772 additions and 1444 deletions

View File

@@ -191,12 +191,12 @@ Public Class ClsCompras
Return Retorno
End Function
Public Function AddCompra(TipoDocto As String, Descripcion As String, Serie As String, Folio As String, FolioSecundario As String, CveProveedor As Integer, SubTotal As Double, Descuentos As Double, Amortizacion As Double, IVA As Double,
RetIVA As Double, RetISR As Double, IEPS As Double, OtrosImpuestos As Double, Redondeo As Double, Total As Double, Fecha As Date, CveMoneda As Integer, TipoCambio As Double, FechaVencimiento As Date,
Public Function AddCompra(TipoDocto As String, Descripcion As String, Serie As String, Folio As String, FolioSecundario As String, CveProveedor As Integer, SubTotal As Decimal, Descuentos As Decimal, Amortizacion As Decimal, IVA As Decimal,
RetIVA As Decimal, RetISR As Decimal, IEPS As Decimal, OtrosImpuestos As Decimal, Redondeo As Decimal, Total As Decimal, Fecha As Date, CveMoneda As Integer, TipoCambio As Decimal, FechaVencimiento As Date,
AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional IdPoliza As Integer = -1,
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Decimal = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Integer = 0, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Decimal = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1, Optional DoctosRelacionados As String = "-1", Optional CveFolioGarantia As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -243,7 +243,7 @@ Public Class ClsCompras
.Add("@CveRetIVAConcepto", SqlDbType.Int).Value = CveRetIVAConcepto
.Add("@CveConceptoContableAlmacen", SqlDbType.Int).Value = CveConceptoContableAlmacen
.Add("@CveRetISRConcepto", SqlDbType.Int).Value = CveRetISRConcepto
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
.Add("@NoDeducible", SqlDbType.TinyInt).Value = NoDeducible
.Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra
.Add("@TotalOriginal", SqlDbType.Money).Value = TotalOriginal
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
@@ -276,15 +276,13 @@ Public Class ClsCompras
Return Retorno
End Function
Public Function UpdateCompra(Descripcion As String, FolioSecundario As String, FechaVencimiento As Date, AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer,
Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer, CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1,
Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0, Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False,
Descuento As Decimal, SubTotal As Decimal, IVA As Decimal, Total As Decimal, CveUsuario As Integer, CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1,
Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Integer = 0,
Optional CveFactura As Integer = -1, Optional CveContrato As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveRetISRConcepto As Integer = -1, Optional CveSubProyecto As Integer = -1,
Optional CveFolioGarantia As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_CompraUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -306,7 +304,7 @@ Public Class ClsCompras
.Add("@PorcentajeIVA", SqlDbType.Float).Value = PorcentajeIVA
.Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
.Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
.Add("@NoDeducible", SqlDbType.Int).Value = NoDeducible
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveRetIVAConcepto", SqlDbType.Int).Value = CveRetIVAConcepto
@@ -515,10 +513,10 @@ Public Class ClsCompras
Return Retorno
End Function
Public Function UpdateCompraDetalle(CvePS As Integer, Cantidad As Double, PU As Double, IVA As Double, Total As Double, Descuento As Double, Observaciones As String, CveSubProyecto As Integer, CvePresupuestoEgreso As Integer, CveActivoFijo As Integer, CveCompraDetalle As Integer, Optional AplicaCostoIndirecto As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveTipoGasto As Integer = -1,
Public Function UpdateCompraDetalle(CvePS As Integer, Cantidad As Decimal, PU As Decimal, IVA As Decimal, Total As Decimal, Descuento As Decimal, Observaciones As String, CveSubProyecto As Integer, CvePresupuestoEgreso As Integer, CveActivoFijo As Integer, CveCompraDetalle As Integer, Optional AplicaCostoIndirecto As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveTipoGasto As Integer = -1,
Optional AF_Medida As Integer = -1, Optional AF_TipoMantenimiento As Integer = -1, Optional Referencia As String = "",
Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0,
Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0, Optional IEPSPSIVAPorcentaje As Double = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1) As Boolean
Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0,
Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0, Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -542,12 +540,12 @@ Public Class ClsCompras
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA
.Add("@RetISR", SqlDbType.Float).Value = RetISR
.Add("@IEPSPS", SqlDbType.Float).Value = IEPSPS
.Add("@IEPSPSIVA", SqlDbType.Float).Value = IEPSPSIVA
.Add("@RetIVA", SqlDbType.Money).Value = RetIVA
.Add("@RetISR", SqlDbType.Money).Value = RetISR
.Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS
.Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA
.Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje
.Add("@IVAPorcentaje", SqlDbType.Money).Value = IVAPorcentaje
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje

View File

@@ -1254,7 +1254,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function ContabilizaDesContabilizaPrePoliza(CvePrePoliza As Integer, Contabilizar As Boolean, CveEmpresa As Integer, Optional Folio As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizasContabilizarDescontabilizar")
@@ -1281,7 +1280,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function ContabilizarPrePoliza(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "",
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
Dim StrLog As New StringBuilder
@@ -1301,8 +1299,6 @@ Public Class ClsContabilidad
Else
If CvePrePoliza <= 0 Then Return False
Dim ContaCompartida As Boolean = False
If ObjConta Is Nothing Then
@@ -1337,11 +1333,6 @@ Public Class ClsContabilidad
CodigoNumeroPoliza = Data.Rows(0)("CodigoNumeroPoliza").ToString
CvePlantillaPoliza = Data.Rows(0)("CvePlantillaPoliza").ToString.ToEntero
'FolioFiscal = Data.Rows(0)("FolioFiscal").ToString
'MetodoPagoSAT = Data.Rows(0)("ClaveSAT").ToString
'CveMoneda = Data.Rows(0)("CveMoneda").ToString.ToEntero
'Total = Data.Rows(0)("Total").ToString.ToDecimal
If FolioFijo > 0 Then CodigoNumeroPoliza = "CHQ"
'tiene prioridad el concepto en parametro
@@ -1359,18 +1350,6 @@ Public Class ClsContabilidad
ContaFolio = ObjConta.Folio.ToString
End If
'If Empresa.Funcionalidad(522).ToString = "1" Then
' GuidPoliza = ObjConta.DtResultados.Rows(0)("Guid").ToString
' Periodo = Data.Rows(0)("Fecha").ToString.ToDate.Month
' Ejercicio = Data.Rows(0)("Fecha").ToString.ToDate.Year
' ObjConta.AddASocCFDIs(False, TipoPol, GuidPoliza, FolioFiscal, 0, "-1", Empresa.BDContPAQi, Ejercicio, Periodo, ContaFolio)
'End If
If tIdPoliza > 0 AndAlso GetContabilizacionDiarioDetalle(CvePrePoliza) Then
Dim tipoMovimiento As Boolean = False
Dim CveConceptoContable As Integer
@@ -1423,9 +1402,6 @@ Public Class ClsContabilidad
StrLog.AppendFormat(" Error 1.2 - ")
Exit For
End If
End If
Else
OcurrioError = True
@@ -1436,7 +1412,6 @@ Public Class ClsContabilidad
Next
'Obtenemos los valores de la causacion y los agregamos
If Not OcurrioError AndAlso ContabilizarCausacion Then
If GetCausacionesValores(CvePrePoliza) AndAlso Data.Rows.Count > 0 Then
@@ -1494,7 +1469,6 @@ Public Class ClsContabilidad
End If
If IdProveedor <= 0 Then
IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "")
If IdProveedor <= 0 Then
@@ -1520,12 +1494,8 @@ Public Class ClsContabilidad
StrLog.AppendFormat(" Error 1.6 - ")
Mensaje.Append("La Poliza o la Cuenta no son válidas ")
End If
End If
Next
End If
End If
@@ -1543,8 +1513,6 @@ Public Class ClsContabilidad
End If
End If
If OcurrioError Then
If Not ContaCompartida Then ObjConta.RollBack()
Else
@@ -1565,8 +1533,6 @@ Public Class ClsContabilidad
StrLog.AppendFormat(" Error 3.1 - ")
End If
Catch ex As Exception
StrLog.AppendFormat(" Error 4.1 - ")
If Not ContaCompartida Then ObjConta.RollBack()
@@ -1577,13 +1543,13 @@ Public Class ClsContabilidad
If Not ContaCompartida Then ObjConta.Dispose()
End If
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1}) ", Retorno, OcurrioError)
StrLog.AppendFormat(" - Fin")
StrLog.ToString.GuardaLogAD("LogContabilizacion")
Return Retorno
End Function
Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -1768,11 +1734,8 @@ Public Class ClsContabilidad
Return Retorno
End Function
#End Region
Public Function GetCuentasConceptos(CveTipoSaldo As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1,
Optional CveProveedor As Integer = -1,
Optional CveClasificacion As Integer = -1,
@@ -1801,8 +1764,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
#Region " C O N T A B I L I D A D - T I P O - P O L I Z A "
Public Function GetConta_TiposPoliza(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -3407,8 +3368,6 @@ Public Class ClsContabilidad
#End Region
#Region " CONTABILIDAD SIG "
@@ -5996,7 +5955,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1,
Public Function AddCuentasAsignaciones(CveConceptoContable As Integer, CveEmpresa As Integer, CveCuenta As Integer,
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1,
@@ -6442,7 +6401,7 @@ Public Class ClsContabilidad
If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
If MensajePolizaDescuadre = "" AndAlso AutoConta Then
If UsuarioActual.Empresa.TipoContabilidad = 2 Then ' eltipocontabilidad deberá activarse en el PA
If UsuarioActual.Empresa.TipoContabilidad = 2 Then ' el tipocontabilidad deberá activarse en el PA
If Not ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
MensajePolizaDescuadre = Mensaje.ToString ' regresa el mensaje de contabilización
End If

View File

@@ -7338,7 +7338,8 @@ Public Class ClsPaginas
ImporteMovimiento = (PorcentajePago * CompraActual.IVANoDeducible).RoundSQL
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 280, CompraActual.SerieFolio, Concepto, Ret.IdCtaContIVANoAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=CompraActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=TCValuacionPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
Dim tConceptoIVA As Integer = If(CompraActual.CompraNoDeducible = 1, 280, 380) '280. iva no deducible en su totalidad
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, tConceptoIVA, CompraActual.SerieFolio, Concepto, Ret.IdCtaContIVANoAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, PorcentajeImpuesto:=CompraActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=TCValuacionPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
End If
End If
'si tiene RET IVA y su proporcion
@@ -7513,6 +7514,7 @@ Public Class ClsPaginas
Public Property EsImportacion As Boolean = False
Public Property TC As Decimal = 1
Public Property Total As Decimal
Public Property CompraNoDeducible As Integer = 0
Public Property IVA As Decimal
Public Property IVADeducible As Decimal
Public Property IVANoDeducible As Decimal = 0
@@ -7538,18 +7540,6 @@ Public Class ClsPaginas
Ret.CveConceptoAcreditable = 19
Ret.CveConceptoxAcreditar = 14
End If
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
' Dim IdCtaIVAXAcreditar, IdCtaIVAAcreditable, IdCtaIVANOAcreditable As Integer
' Dim dt As DataTable = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA)
' If dt.Rows.Count > 0 Then
' IdCtaIVAXAcreditar = dt.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
' IdCtaIVAAcreditable = dt.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
' IdCtaIVANOAcreditable = dt.Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero
' End If
' Ret.IdCtaContableAcreditable = IdCtaIVAAcreditable
' Ret.IdCtaContablexAcreditar = IdCtaIVAXAcreditar
' Ret.IdCtaContIVANoAcreditable = IdCtaIVANOAcreditable
'End If
Return Ret
End Get
End Property
@@ -7894,8 +7884,8 @@ Public Class ClsPaginas
End If
'concepto pago
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then ' A N T I C I P O
Concepto = String.Format("{0} Ant:{1}", VentaActual.ClienteNombre, Pago.Referencia)
Dim Ret As New ConceptosRetenciones
'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1)
If Pago.CveMonedaPago > 1 Then
@@ -7909,6 +7899,7 @@ Public Class ClsPaginas
End If
End If
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
Dim Ret As New ConceptosRetenciones
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 2)
If Pago.CveMonedaPago > 1 Then
@@ -7922,6 +7913,7 @@ Public Class ClsPaginas
End If
End If
If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R
Concepto = String.Format("{0} IxC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
Dim Ret As New ConceptosRetenciones
If VentaActual.UsuarioActual.Empresa.TipoContabilidad = 2 Then
'If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
@@ -7988,6 +7980,7 @@ Public Class ClsPaginas
End If
If Diferencia <> 0 Then
Concepto = String.Format("{0} Ref:{1}", VentaActual.ClienteNombre, Pago.Referencia)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Diferencia, Diferencia, ConceptoContable, Concepto, Concepto, IdCtaContable, CveVenta:=VentaActual.CveVenta, CveSubProyecto:=VentaActual.CveSubProyecto, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE) Then
ErrorMovtos = True
End If

File diff suppressed because it is too large Load Diff

View File

@@ -2610,15 +2610,19 @@ Partial Class Bancos_IE
'Cuando es Egreso sin factura, se registra una compra tipo anticipo
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "EGSCREDITO" Then
CveConceptoCompra = 48 'Anticipo Acreedores
CveConceptoCompra = 10 'Anticipo Acreedores
CveConceptoContable = 30 'Bancos
CveCreditoDetalle = DdlCreditoDetalle.SelectedValue.ToEntero
Dim Estatus As Integer = 2
If HdnCveTipoCredito.Value = "1" Then
Dim tesCrediproveedor As Boolean = False
'falta especificar que deterina esta consideración en SIG
If HdnCveTipoCredito.Value = "1" AndAlso tesCrediproveedor Then
Estatus = 103
'cuando es crediproveedores es, pago a documentos por pagar
CveConceptoCompra = 57
End If
ObjIE.UpdateCreditosDetalle(Estatus, CveCreditoDetalle)
If HdnImporteCredito.Value.ToDouble > 0 AndAlso TxtImporte.Text.ToDouble > HdnImporteCredito.Value.ToDouble Then

View File

@@ -16,7 +16,7 @@
<div class="row">
<div class="col-md-6">
<div class="col-md-7">
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="chequesie">
@@ -98,10 +98,14 @@
<label class="col-md-2">
<asp:Label ID="LblPagueseA" runat="server" Text="Páguese a:"></asp:Label></label>
<div class="col-md-8">
<asp:HiddenField ID="HdnCveProveedor" runat="server" ClientIDMode="Static" Value="-1" />
<%--<asp:HiddenField ID="HdnCveProveedor" runat="server" ClientIDMode="Static" Value="-1" />
<asp:Button ID="BtnBuscarProveedor" runat="server" ClientIDMode="Static" Text="Buscar Proveedor" Style="display: none;" class="btn btn-primary" />
<asp:TextBox ID="TxtPagueseA" CssClass="form-control input-sm" runat="server" MaxLength="70" Width="394px"></asp:TextBox>
<a ID="HplBuscar" class="btn btn-primary" runat="server" onclick="javascript:AbrirVentana('/Compras/PopUpBuscarProveedor.aspx?Opt=Poliza', 800, 547, 'N', 'PopUpBuscar')" ><i class="fa fa-search"></i> Buscar</a>
<a ID="HplBuscar" class="btn btn-primary" runat="server" onclick="javascript:AbrirVentana('/Compras/PopUpBuscarProveedor.aspx?Opt=Poliza', 800, 547, 'N', 'PopUpBuscar')" ><i class="fa fa-search"></i> Buscar</a>--%>
<asp:TextBox ID="TxtPagueseA" CssClass="form-control input-sm" runat="server" MaxLength="70" Width="394px" > </asp:TextBox>
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 394px;" DataTextField="RazonSocial" DataValueField="CveProveedor" Visible="true" Onselectedindexchange="DdlProveedores_selectedindexchange" ></ADS:Dropdownlost>
<asp:DropDownList ID="DdlPersonal" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" CssClass="form-control input-sm input-medium select2me" Visible="false" Width="394px" AutoPostBack="true" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged" ></asp:DropDownList>
</div>
<div class="col-md-2">
@@ -147,7 +151,7 @@
</asp:UpdatePanel>
</div>
<div class="col-md-6">
<div class="col-md-5">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>

View File

@@ -3,12 +3,12 @@ Imports Extensiones
Imports System.IO
Imports System.Linq
Imports System.Web.Services
Imports Stimulsoft.Report.BarCodes
Partial Class Bancos_PolizaCheque
Inherits ClsPaginas
' Private Shared missing As Object = System.Reflection.Missing.Value
Inherits ClsPaginas
#Region "Propiedades"
Private Property NombreArchivo As String
Get
@@ -92,9 +92,9 @@ Partial Class Bancos_PolizaCheque
Get
Return CType(ViewState("CveTurno"), Integer)
End Get
End Property
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
@@ -188,36 +188,24 @@ Partial Class Bancos_PolizaCheque
DdlPlantilla.SelectedValue = "36"
DdlPlantilla.Enabled = False
End If
DdlProveedores.txtText.Value = "Seleccione"
DdlProveedores.txtValue.Value = "-1"
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
CargaDDLPersonal()
End If
End Sub
Protected Sub BtnBuscarProveedor_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnBuscarProveedor.Click
ViewState("CveProveedor") = HdnCveProveedor.Value.ToEntero
CargaProveedor(HdnCveProveedor.Value.ToEntero, "-1")
DdlPlantilla_SelectedIndexChanged(DdlPlantilla, e)
End Sub
Private Sub CargaProveedor(ByVal CveProveedor As Integer, RFC As String)
Dim ObjProveedor As New ClsCompProveedores()
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then
TxtPagueseA.Text = ObjProveedor.RazonSocial
TxtNotificarA.Text = ObjProveedor.NotificarA.Trim
Else
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
End If
End If
ObjProveedor.Dispose()
End Sub
Private Sub CargaPlantillas(TipoPlantilla As Integer)
'GvPlantillas.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
'GvPlantillas.DataBind()
DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla)
DdlPlantilla.DataBind()
DdlPlantilla.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -227,14 +215,6 @@ Partial Class Bancos_PolizaCheque
DdlCuenta.Items.Clear()
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
'If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then
' dt = dt.FiltraParametros("CveTipoCuenta = 7")
'End If
'cuando es layout
If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
@@ -247,9 +227,6 @@ Partial Class Bancos_PolizaCheque
dt = dt.FiltraParametros("UsaLayoutGrupos = 1")
End If
DdlCuenta.DataSource = dt 'GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
DdlCuenta.DataBind()
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -262,31 +239,13 @@ Partial Class Bancos_PolizaCheque
DdlTipoTransaccion.DataBind()
End Sub
'Private Sub CargaProyecto()
' DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa)
' DdlProyecto.DataBind()
'End Sub
'Private Sub CargaSubProyecto()
' DdlSubProyecto.Items.Clear()
' DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
' DdlSubProyecto.DataBind()
' DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
'End Sub
'Protected Sub DdlProyectoAsignado_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
' CargaSubProyecto()
'End Sub
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
'CargaFolio()
CargaCuenta()
End Sub
Private Sub CargaFolio()
If HdnTipoTransaccion.Value = "" Then CargaHdnTipoTransaccion()
'If HdnTipoTransaccion.Value = "Egs" Then
If DdlTipoTransaccion.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(505) <> "1" Then
If UsuarioActual.CveEmpresa = 119 AndAlso IfNull(Request("Tipo"), "") = "Ing" Then
Dim ObjFolios As New ClsGralFolios
@@ -305,10 +264,8 @@ Partial Class Bancos_PolizaCheque
TxtFolio.Text = Folio.ToString
End If
End If
'Else
'TxtFolio.Text = ""
'End If
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue))
If dr IsNot Nothing Then
CveMoneda = dr("CveMoneda").ToString.ToEntero
@@ -335,11 +292,6 @@ Partial Class Bancos_PolizaCheque
<WebMethodAttribute()> <Script.Services.ScriptMethodAttribute()>
Public Shared Function wsGetCuentas(ByVal prefixText As String, ByVal count As Integer) As String()
'Dim dt As DataTable = CType(Session("DtCuentas"), DataTable)
'Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
'dt = Conta.getCuentasCheque(Prefijo)
'Conta.Dispose()
Dim items As New List(Of String)(count)
Dim dbrows As DataRow()
@@ -371,6 +323,21 @@ Partial Class Bancos_PolizaCheque
End Function
Protected Sub DdlPlantilla_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPlantilla.SelectedIndexChanged
DdlPersonal.SelectedValueExist(-1)
DdlProveedores.txtText.Value = "Seleccione"
DdlProveedores.txtValue.Value = "-1"
TxtPagueseA.Text = ""
If DdlPlantilla.SelectedValue.ToEntero = 56 Then
DdlProveedores.Visible = False
DdlPersonal.Visible = True
Else
DdlProveedores.Visible = True
DdlPersonal.Visible = False
End If
Dim IdCtaFondoGarantia As Integer
If ViewState("CveProveedor").ToString.ToEntero > 0 Then
@@ -418,64 +385,62 @@ Partial Class Bancos_PolizaCheque
CodigoCuenta = ""
NombreCuenta = ""
If UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso drt("CveCuenta").ToString.ToEntero > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString))
If UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso drt("CveCuenta").ToString.ToEntero > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString))
If drr IsNot Nothing Then
CveCuenta = drt("CveCuenta").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
End If
EsComodin = 0
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
If drr IsNot Nothing Then
CveCuenta = drt("CveCuenta").ToString.ToEntero
IdCuenta = drt("IdCtaContable").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
End If
EsComodin = 0
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
ElseIf drt("CveConcepto").ToString = "30" Then
'saco la clave de la cuenta bancaria seleccionada
If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
If drr IsNot Nothing Then
IdCuenta = drt("IdCtaContable").ToString.ToEntero
IdCuenta = drr("Id").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
EsComodin = 1
End If
EsComodin = 0
ElseIf drt("CveConcepto").ToString = "30" Then
'saco la clave de la cuenta bancaria seleccionada
If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero)))
If drr IsNot Nothing Then
IdCuenta = drr("Id").ToString.ToEntero
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
' Cuenta = drr("Nombre").ToString()
EsComodin = 1
End If
End If
ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia))
IdCuenta = IdCtaFondoGarantia
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString()
EsComodin = 0
End If
ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia))
IdCuenta = IdCtaFondoGarantia
CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString()
EsComodin = 0
End If
End If
Dim dr As DataRow = DtMovimientos.NewRow
dr("IdCuenta") = IdCuenta
dr("CveCuenta") = CveCuenta
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
dr("Cuenta") = Cuenta
dr("RazonSocial") = drt("RazonSocial")
dr("Concepto") = TxtObservaciones.Text
dr("TipoMovto") = If(drt("TipoMovto").ToString = "False", 0, 1)
@@ -487,7 +452,7 @@ Partial Class Bancos_PolizaCheque
dr("Proyecto") = drt("Proyecto")
dr("Personal") = drt("Personal")
dr("CvePersonal") = drt("CvePersonal")
'dr("CveConcepto") = drt("CveConcepto")
DtMovimientos.Rows.Add(dr)
@@ -582,7 +547,7 @@ Partial Class Bancos_PolizaCheque
GeneraLayout()
End If
End Sub
End Sub
#Region "LAYOUT"
Private Function CreaArchivo() As Boolean
DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta))
@@ -706,72 +671,70 @@ Partial Class Bancos_PolizaCheque
End If
Return UCase(Retorno)
End Function
'Este metodo es el de las altas
'Private Function GeneraLineaLayout(CvePersonal As Integer, ObjPersonal As ClsRH) As String
' Dim Retorno As String = ""
' If ObjPersonal.GetPersonal(CvePersonal, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
' Dim TipoRegistro As String = "02" 'Estatico
' Dim Nombre As String = GeneraCampo(ObjPersonal.DtResultados(0)("Nombres").ToString, 20)
' Dim ApellidoPaterno As String = GeneraCampo(ObjPersonal.DtResultados(0)("APaterno").ToString, 20)
' Dim ApellidoMaterno As String = GeneraCampo(ObjPersonal.DtResultados(0)("AMaterno").ToString, 20)
' Dim FechaNacimiento As String = ObjPersonal.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("yyyy-MM-dd")
' Dim EstadoCivil As String = "S" 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim Curp As String = GeneraCampo(ObjPersonal.DtResultados(0)("CURP").ToString, 18)
' Dim Sexo As String = GeneraCampo(ObjPersonal.DtResultados(0)("Genero").ToString, 1)
' Dim Nacionalidad As String = GeneraCampo("M", 3) 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim PaisOrigen As String = "MEX" 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim Ocupacion As String = "OFI" 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim FechaIngreso As String = ObjPersonal.DtResultados(0)("FechaIngreso").ToString.ToDate.ToString("yyyy-MM-dd")
' Dim Calle As String = GeneraCampo(ObjPersonal.DtResultados(0)("Calle").ToString, 50)
' Dim NumeroExterior As String = GeneraCampo(ObjPersonal.DtResultados(0)("NumExt").ToString, 8)
' Dim NumeroInterior As String = GeneraCampo(ObjPersonal.DtResultados(0)("NumInt").ToString, 8)
' Dim Colonia As String = GeneraCampo(ObjPersonal.DtResultados(0)("Colonia").ToString, 30)
' Dim CP As String = GeneraCampo(ObjPersonal.DtResultados(0)("CP").ToString, 5)
' Dim Poblacion As String = GeneraCampo("MEXICO", 30)
' Dim Estado As String = GeneraCampo(ObjPersonal.DtResultados(0)("Estado").ToString, 25)
' Dim TelefonoParticular As String = GeneraCampo(ObjPersonal.DtResultados(0)("Telefono").ToString, 10)
' Dim TelefonoOficina As String = GeneraCampo(ObjPersonal.DtResultados(0)("Telefono").ToString, 10)
' Dim ExtensionOficina As String = "000000" 'No tenemos este campo
' Dim Celular As String = GeneraCampo(ObjPersonal.DtResultados(0)("Celular").ToString, 10)
' Dim CorreoElectronico As String = GeneraCampo(ObjPersonal.DtResultados(0)("Correo").ToString, 50)
' Dim TipoProducto As String = "A0" 'Estatico
' Dim SubProducto As String = "245" 'Estatico
' Dim CuentaUniversal As String = GeneraCampo("", 2) 'Este valor se captura vacío
' Dim TipoCuenta As String = GeneraCampo("A", 2) 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim NumeroTDD As String = GeneraCampo("0000" + ObjPersonal.DtResultados(0)("Correo").ToString, 20)
' Dim Oficina As String = GeneraCampo(ObjPersonal.DtResultados(0)("Sucursal").ToString, 4)
' Dim MontoDisperciones As String = "000000000000000" 'Estatico
' Dim NumeroDisperciones As String = "0" 'Estatico
' Dim OficinaEntrega As String = "0000" 'Estatico
' Dim Beneficiario As String = GeneraCampo(ObjPersonal.DtResultados(0)("Nombres").ToString, 20)
' Dim ApellidoPaternoBeneficiario As String = GeneraCampo(ObjPersonal.DtResultados(0)("APaterno").ToString, 20)
' Dim ApellidoMaternoBeneficiario As String = GeneraCampo(ObjPersonal.DtResultados(0)("AMaterno").ToString, 20)
' Dim ParentescoBeneficiario As String = "SD" 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim SexoBeneficiario As String = GeneraCampo(ObjPersonal.DtResultados(0)("Genero").ToString, 1)
' Dim FechaNacimientoBeneficiario As String = ObjPersonal.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("yyyy-MM-dd")
' Retorno = TipoRegistro + Nombre + ApellidoPaterno + ApellidoMaterno + FechaNacimiento + EstadoCivil + Curp + Sexo + Nacionalidad + PaisOrigen + Ocupacion + FechaIngreso + Calle + NumeroExterior + NumeroInterior +
' Colonia + CP + Poblacion + Estado + TelefonoParticular + TelefonoOficina + ExtensionOficina + Celular + CorreoElectronico + TipoProducto + SubProducto + CuentaUniversal + TipoCuenta + NumeroTDD + Oficina +
' MontoDisperciones + NumeroDisperciones + OficinaEntrega + Beneficiario + ApellidoPaternoBeneficiario + ApellidoMaternoBeneficiario + ParentescoBeneficiario + SexoBeneficiario + FechaNacimientoBeneficiario
' End If
' Return Retorno
'End Function
End Function
'Este metodo es el de las altas
'Private Function GeneraLineaLayout(CvePersonal As Integer, ObjPersonal As ClsRH) As String
' Dim Retorno As String = ""
' If ObjPersonal.GetPersonal(CvePersonal, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
' Dim TipoRegistro As String = "02" 'Estatico
' Dim Nombre As String = GeneraCampo(ObjPersonal.DtResultados(0)("Nombres").ToString, 20)
' Dim ApellidoPaterno As String = GeneraCampo(ObjPersonal.DtResultados(0)("APaterno").ToString, 20)
' Dim ApellidoMaterno As String = GeneraCampo(ObjPersonal.DtResultados(0)("AMaterno").ToString, 20)
' Dim FechaNacimiento As String = ObjPersonal.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("yyyy-MM-dd")
' Dim EstadoCivil As String = "S" 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim Curp As String = GeneraCampo(ObjPersonal.DtResultados(0)("CURP").ToString, 18)
' Dim Sexo As String = GeneraCampo(ObjPersonal.DtResultados(0)("Genero").ToString, 1)
' Dim Nacionalidad As String = GeneraCampo("M", 3) 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim PaisOrigen As String = "MEX" 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim Ocupacion As String = "OFI" 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim FechaIngreso As String = ObjPersonal.DtResultados(0)("FechaIngreso").ToString.ToDate.ToString("yyyy-MM-dd")
' Dim Calle As String = GeneraCampo(ObjPersonal.DtResultados(0)("Calle").ToString, 50)
' Dim NumeroExterior As String = GeneraCampo(ObjPersonal.DtResultados(0)("NumExt").ToString, 8)
' Dim NumeroInterior As String = GeneraCampo(ObjPersonal.DtResultados(0)("NumInt").ToString, 8)
' Dim Colonia As String = GeneraCampo(ObjPersonal.DtResultados(0)("Colonia").ToString, 30)
' Dim CP As String = GeneraCampo(ObjPersonal.DtResultados(0)("CP").ToString, 5)
' Dim Poblacion As String = GeneraCampo("MEXICO", 30)
' Dim Estado As String = GeneraCampo(ObjPersonal.DtResultados(0)("Estado").ToString, 25)
' Dim TelefonoParticular As String = GeneraCampo(ObjPersonal.DtResultados(0)("Telefono").ToString, 10)
' Dim TelefonoOficina As String = GeneraCampo(ObjPersonal.DtResultados(0)("Telefono").ToString, 10)
' Dim ExtensionOficina As String = "000000" 'No tenemos este campo
' Dim Celular As String = GeneraCampo(ObjPersonal.DtResultados(0)("Celular").ToString, 10)
' Dim CorreoElectronico As String = GeneraCampo(ObjPersonal.DtResultados(0)("Correo").ToString, 50)
' Dim TipoProducto As String = "A0" 'Estatico
' Dim SubProducto As String = "245" 'Estatico
' Dim CuentaUniversal As String = GeneraCampo("", 2) 'Este valor se captura vacío
' Dim TipoCuenta As String = GeneraCampo("A", 2) 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim NumeroTDD As String = GeneraCampo("0000" + ObjPersonal.DtResultados(0)("Correo").ToString, 20)
' Dim Oficina As String = GeneraCampo(ObjPersonal.DtResultados(0)("Sucursal").ToString, 4)
' Dim MontoDisperciones As String = "000000000000000" 'Estatico
' Dim NumeroDisperciones As String = "0" 'Estatico
' Dim OficinaEntrega As String = "0000" 'Estatico
' Dim Beneficiario As String = GeneraCampo(ObjPersonal.DtResultados(0)("Nombres").ToString, 20)
' Dim ApellidoPaternoBeneficiario As String = GeneraCampo(ObjPersonal.DtResultados(0)("APaterno").ToString, 20)
' Dim ApellidoMaternoBeneficiario As String = GeneraCampo(ObjPersonal.DtResultados(0)("AMaterno").ToString, 20)
' Dim ParentescoBeneficiario As String = "SD" 'Requiere cuadre entre nuestra tabla y el catalogo del banco
' Dim SexoBeneficiario As String = GeneraCampo(ObjPersonal.DtResultados(0)("Genero").ToString, 1)
' Dim FechaNacimientoBeneficiario As String = ObjPersonal.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("yyyy-MM-dd")
' Retorno = TipoRegistro + Nombre + ApellidoPaterno + ApellidoMaterno + FechaNacimiento + EstadoCivil + Curp + Sexo + Nacionalidad + PaisOrigen + Ocupacion + FechaIngreso + Calle + NumeroExterior + NumeroInterior +
' Colonia + CP + Poblacion + Estado + TelefonoParticular + TelefonoOficina + ExtensionOficina + Celular + CorreoElectronico + TipoProducto + SubProducto + CuentaUniversal + TipoCuenta + NumeroTDD + Oficina +
' MontoDisperciones + NumeroDisperciones + OficinaEntrega + Beneficiario + ApellidoPaternoBeneficiario + ApellidoMaternoBeneficiario + ParentescoBeneficiario + SexoBeneficiario + FechaNacimientoBeneficiario
' End If
' Return Retorno
'End Function
#End Region
Protected Sub GvMov_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMov.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(110)
e.Row.Cells(1).Width = Unit.Pixel(200)
'e.Row.Cells(2).Width = Unit.Pixel(150)
'e.Row.Cells(3).Width = Unit.Pixel(150)
e.Row.Cells(2).Width = Unit.Pixel(120)
e.Row.Cells(3).Width = Unit.Pixel(303)
e.Row.Cells(4).Width = Unit.Pixel(72)
@@ -806,9 +769,21 @@ Partial Class Bancos_PolizaCheque
Dim TotalCargos, TotalAbonos, ImporteDocumento As Decimal
Dim CvePrePoliza As Integer
Dim ValidaConcepto30 As Boolean = False
Dim PaguesA As String = TxtPagueseA.Text.Trim
Dim CveProveedorSeleccionado As Integer = -1
Dim CvePersonalSeleccionado As Integer = -1
If DdlPlantilla.SelectedValue.ToEntero = 56 Then
CvePersonalSeleccionado = DdlPersonal.SelectedValue.ToEntero
Else
CveProveedorSeleccionado = DdlProveedores.txtValue.Value.ToEntero
End If
Dim ValidaConcepto30 As Boolean = False
If DdlCuenta.SelectedValue.ToEntero <= 0 Then
If UsuarioActual.CveEmpresa <> 126 Then
Alert("Seleccione la Cuenta Bancaria", TipoMensaje.MsgAdvertencia)
@@ -817,6 +792,7 @@ Partial Class Bancos_PolizaCheque
End If
End If
For Each Gvr As GridViewRow In GvMov.Rows
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
@@ -854,23 +830,13 @@ Partial Class Bancos_PolizaCheque
Dim ObjIE As New ClsBancos()
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL)
'Dim Conta As ClsContPAQi = Nothing
Dim IDPoliza As Integer = 0
Dim CveIE As Integer
Dim MsgError As String = ""
Dim idCuentaContabilizacion As Long = 1
'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then
' Conta = New ClsContPAQi(UsuarioActual.Empresa)
' Conta.IniciaTransacSQL()
' IDPoliza = Conta.AddPoliza(2, TxtObservaciones.Text, TotalCargos, TotalAbonos, UsuarioActual.CveUsuario, TxtFechaDocumento.Text.ToDate)
' 'inserto la póliza
' NumPoliza = Conta.Folio
' If IDPoliza = 0 Then
' MsgError = "No se pudo insertar la póliza contable."
' End If
'End If
If MsgError = "" Then
ImporteDocumento = TxtImporte.Text.ToDecimal
@@ -879,7 +845,7 @@ Partial Class Bancos_PolizaCheque
Try
Dim ConceptoPoliza As String = TxtObservaciones.Text
If ConceptoPoliza = "" Then ConceptoPoliza = TxtPagueseA.Text
If ConceptoPoliza = "" Then ConceptoPoliza = PaguesA
Dim CveMoneda As Integer = 1
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue))
If dr IsNot Nothing Then
@@ -889,7 +855,7 @@ Partial Class Bancos_PolizaCheque
Dim TC As Decimal = If(CveMoneda > 1, GlobalTipoCambio(TxtFechaDocumento.Text.ToDate), 1)
Dim CveTipoPoliza As Integer = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla).FiltroPrimeroValor("TipoPoliza", String.Format("CvePlantillaPoliza={0}", DdlPlantilla.SelectedValue)).ToEntero
CvePrePoliza = ObjMov.AddPrePolizas("PolizaCheque/Guardar", DdlPlantilla.SelectedValue.ToEntero, TotalCargos, TotalAbonos, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=CveTipoPoliza)
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImporteDocumento, CveMoneda, If(CveMoneda > 1, TC, 0.0), TxtObservaciones.Text.Trim, TxtNotificarA.Text.Trim, ChkAbonoCuenta.Checked, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, PaguesA, ImporteDocumento, CveMoneda, If(CveMoneda > 1, TC, 0.0), TxtObservaciones.Text.Trim, TxtNotificarA.Text.Trim, ChkAbonoCuenta.Checked, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE > 0 Then
'inserto los movimientos de la conta para abonar al saldo
@@ -901,7 +867,7 @@ Partial Class Bancos_PolizaCheque
Dim Importe As Double = 0
Dim TipoMovto As Boolean = False
Dim IdCtaContable As Integer = 0
Dim CveProveedor As Integer = -1
'Dim CveProveedor As Integer = -1
'inserto las compras que voy a pagar
For Each gvr As GridViewRow In GvMov.Rows
@@ -917,17 +883,18 @@ Partial Class Bancos_PolizaCheque
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
TipoMovto = False
End If
CveProveedor = gvr.DataKey("CveProveedor").ToEntero
If HdnCveProveedor.Value.ToEntero > 0 Then CveProveedor = HdnCveProveedor.Value.ToEntero
If Not CveProveedorSeleccionado > 0 Then
CveProveedorSeleccionado = gvr.DataKey("CveProveedor").ToEntero
End If
If Not CvePersonalSeleccionado > 0 Then
CvePersonalSeleccionado = gvr.DataKey("CvePersonal").ToEntero
End If
If Importe <> 0 Then
'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then
' If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IDCuenta").ToEntero, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.FCTextBox("TxtConcepto").Text, 0, TxtFechaDocumento.Text.ToDate, "") Then
' MsgError = "No se pudo insertar movimiento contable"
' Exit For
' End If
'End If
If MsgError = "" Then
If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
@@ -942,14 +909,14 @@ Partial Class Bancos_PolizaCheque
Importe = Importe * TC
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedorSeleccionado, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=CvePersonalSeleccionado, ImporteMX:=Importe, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
MsgError = "no se pudo insertar el detalle de la póliza2"
End If
If gvr.DataKey("CveConcepto").ToEntero = 30 Then
If CveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
'Agregamos complementaria
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, 0, gvr.FCTextBox("TxtConcepto").Text, 204, TxtObservaciones.Text, Now, dr("IDCtaContableComplementaria").ToString.ToEntero, -1, CveIE:=CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe * TC - Importe, ImporteME:=Importe, TipoCambio:=TC) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, 0, gvr.FCTextBox("TxtConcepto").Text, 204, TxtObservaciones.Text, Now, dr("IDCtaContableComplementaria").ToString.ToEntero, -1, CveIE:=CveIE, CveProveedor:=CveProveedorSeleccionado, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=CvePersonalSeleccionado, ImporteMX:=Importe * TC - Importe, ImporteME:=Importe, TipoCambio:=TC) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
End If
@@ -973,8 +940,6 @@ Partial Class Bancos_PolizaCheque
MsgError = "No se pudo actualizar el periodo de la nómina"
End If
'Generamos el Layout
'GeneraLayout()
End If
Else
@@ -992,7 +957,6 @@ Partial Class Bancos_PolizaCheque
If MsgError = "" Then
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
' MsgError = ObjMov.MensajePolizaDescuadre
GuardaLogAD($"PolizaCheque/Guardar Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If
Else
@@ -1004,7 +968,6 @@ Partial Class Bancos_PolizaCheque
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
IDPoliza = ObjMov.ContaIdPoliza
Else
MsgError = "Error al contabilizar"
@@ -1017,7 +980,6 @@ Partial Class Bancos_PolizaCheque
If MsgError = "" Then
ObjIE.Commit()
'If Conta IsNot Nothing Then Conta.Commit()
If filemove <> "" Then
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
@@ -1046,145 +1008,26 @@ Partial Class Bancos_PolizaCheque
Else
Alert(MsgError.ToString, TipoMensaje.MsgError)
ObjIE.RollBack()
'If Conta IsNot Nothing Then Conta.RollBack()
End If
Else
Alert("Debe de llevar un importe", TipoMensaje.MsgAdvertencia)
'If Conta IsNot Nothing Then Conta.RollBack()
End If
Else
'If Conta IsNot Nothing Then Conta.RollBack()
End If
ObjIE.Dispose()
ObjMov.Dispose()
ObjNom.Dispose()
'If Conta IsNot Nothing Then Conta.Dispose()
Else
Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia)
End If
End Sub
'' -------------------------------------- codigo para generar la poliza del cheque
'If pIDPoliza > 0 Then
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
' If ObjPoliza.GetPoliza(pIDPoliza, -1, -1, -1, -1) Then
' dtMovs = ObjPoliza.DtResultados
' End If
' ObjPoliza.Dispose()
' ''Movimientos Póliza
' If dtMovs IsNot Nothing Then
'Dim TotalAbonos, TotalCargos As Double
' TotalAbonos = 0 : TotalCargos = 0
' For Each Row As DataRow In dtMovs.Rows
''Cantidad
''If Row("AplicaParaConcepto").ToString.ToEntero > 0 Then
' Hoja.Range("B" & CeldaF & ": B" & CeldaF).Value = Row("CuentaFormato").ToString
''Unidad
''If Row("AplicaParaConcepto").ToString.ToEntero > 0 Then
' Hoja.Range("C" & CeldaF & ":C" & CeldaF).Value = Row("Nombre").ToString
''Concepto y Descripción
' Hoja.Range("F" & CeldaF & ":F" & CeldaF).Value = If(Row("Cargo").ToString.ToDouble > 0, Row("Cargo").ToString.ToDouble.FormatoNumero, "")
''P Unitario
''Morro el precio unitario si va a ir?
' Hoja.Range("G" & CeldaF & ":G" & CeldaF).Value = If(Row("Abono").ToString.ToDouble > 0, Row("Abono").ToString.ToDouble.FormatoNumero, "")
' TotalCargos += Row("Cargo").ToString.ToDouble
' TotalAbonos += Row("Abono").ToString.ToDouble
' If dtMovs.Rows.Count > 1 AndAlso CeldaF - CeldaI < dtMovs.Rows.Count - 1 Then
' CeldaF = CeldaF + 1
' Libro.Application.Run("AddRow", (CeldaF - 1).ToString, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing,
' missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing)
' Libro.Save()
' Libro.Application.DisplayAlerts = False
' Libro.Application.ScreenUpdating = False
' End If
' Next
'Dim AddedRow As Integer = CeldaF - CeldaI
' Hoja.Range("F" & (50 + AddedRow).ToString & ":F" & (50 + AddedRow).ToString).Value = TotalCargos.FormatoNumero
' Hoja.Range("G" & (50 + AddedRow).ToString & ":G" & (50 + AddedRow).ToString).Value = TotalAbonos.FormatoNumero
' Hoja.Range("C" & (52 + AddedRow).ToString & ":C" & (52 + AddedRow).ToString).Value = UsuarioRegistro
''Hoja.Range("E" & (13 + AddedRow).ToString & ":E" & (13 + AddedRow).ToString).Value = LblAmortizacion.Text.Trim.ToDouble(TC).FormatoNumero
''Hoja.Range("E" & (14 + AddedRow).ToString & ":E" & (14 + AddedRow).ToString).Value = TxtSubTotal2.Text.Trim.ToDouble(TC).FormatoNumero
''Hoja.Range("E" & (15 + AddedRow).ToString & ":E" & (15 + AddedRow).ToString).Value = TxtIVA.Text.Trim.ToDouble(TC).FormatoNumero
' End If
' End If
'Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs) Handles LnkAgregar.Click
' If HdnCveCuenta.Value.ToEntero = 0 Then
' Alert("Seleccione una cuenta contable")
' Exit Sub
' End If
' If TxtCargoImporte.Text = "" AndAlso TxtAbonoImporte.Text = "" Then
' Alert("Ingrese un importe.")
' Exit Sub
' End If
' If HdnCveCuenta.Value.ToEntero > 0 AndAlso (TxtCargoImporte.Text.ToDouble > 0 Or TxtAbonoImporte.Text.ToDouble > 0) Then
' Dim Cuenta As String = ""
' Dim CodigoCuenta As String = ""
' If DdlCuentaContable.SelectedValue.ToEntero > 0 Then 'DtCuentasContables
' Dim drr As DataRow = DtCuentasContables.FiltroPrimero("Id=" & DdlCuentaContable.SelectedValue)
' If drr IsNot Nothing Then
' CodigoCuenta = drr("CuentaFormato").ToString()
' Cuenta = drr("Nombre").ToString()
' End If
' End If
' Dim dr As DataRow = DtMovimientos.NewRow
' dr("IdCuenta") = HdnCveCuenta.Value.ToEntero
' dr("CodigoCuenta") = CodigoCuenta
' dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
' dr("Referencia") = TxtReferencia.Text
' dr("Concepto") = TxtConceptoContable.Text
' dr("Cargo") = TxtCargoImporte.Text.ToDouble
' dr("Abono") = TxtAbonoImporte.Text.ToDouble
' DtMovimientos.Rows.Add(dr)
' TxtTotalAbonos.Text = DtMovimientos.SUM("Abono").FormatoNumero
' TxtTotalCargos.Text = DtMovimientos.SUM("Cargo").FormatoNumero
' 'ArregloMovs.Add(Mov)
' GvMov.DataSource = DtMovimientos
' GvMov.DataBind()
' 'saco de la póliza el importe del cheque, que coincida la cuenta contable con la bancaria
' If DdlCuenta.SelectedValue.ToEntero > 0 Then
' Dim drr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimero("CveCuenta=" & DdlCuenta.SelectedValue)
' If drr IsNot Nothing Then
' TxtImporte.Text = (DtMovimientos.SUM("Abono", "IdCuenta =" & drr("IdCtaContable").ToString) - DtMovimientos.SUM("Cargo", "IdCuenta =" & drr("IdCtaContable").ToString)).ToString.FormatoNumero
' UPPDocumento.Update()
' End If
' End If
' HdnCveCuenta.Value = "0"
' DdlCuentaContable.SelectedValue = "0"
' TxtReferencia.Text = ""
' TxtConceptoContable.Text = ""
' TxtCargoImporte.Text = ""
' TxtAbonoImporte.Text = ""
' End If
'End Sub
Protected Sub GvMov_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMov.RowDeleting
@@ -1226,9 +1069,28 @@ Partial Class Bancos_PolizaCheque
End If
End If
Return Retorno
End Function
End Function
Protected Sub CargaDDLPersonal()
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
DdlPersonal.DataBind()
DdlPersonal.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs)
TxtPagueseA.Text = DdlPersonal.SelectedItem.Text
UPPDocumento.Update()
End Sub
Protected Sub DdlProveedores_selectedindexchange(sender As Object, e As EventArgs)
TxtPagueseA.Text = DdlProveedores.txtText.Value
UPPDocumento.Update()
End Sub
End Class

View File

@@ -637,6 +637,7 @@ Partial Class Bancos_PopIECompras
CompraActual.IdCtaContableProv = CtaProveedor
CompraActual.IdCtaContableProvComplementaria = IdCtaProveedorExtranjera
CompraActual.EsImportacion = CBool(dr("EsImportacion"))
CompraActual.CompraNoDeducible = dr("NoDeducible").ToString.ToEntero
If Validada Then
TxtFolio.Enabled = True
@@ -1606,23 +1607,10 @@ Partial Class Bancos_PopIECompras
End Select
Dim ObjConta As ClsContPAQi = Nothing
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre
GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
Else
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
ObjConta = New ClsContPAQi(UsuarioActual.Empresa)
ObjConta.IniciaTransacSQL()
End If
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
IdPoliza = ObjMov.ContaIdPoliza
Else
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
End If
End If
End If
End If

View File

@@ -369,7 +369,7 @@
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Total,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio,TipoCambioOriginal, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion"
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Total,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio,TipoCambioOriginal, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion,NoDeducible"
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>

View File

@@ -687,18 +687,15 @@ Partial Class Bancos_ProveedoresAbonar
Validada = False
If Valida.EsValida = 2 Then 'Cancelada
'estatus inventario, no surtida
If gvr.DataKey("EstatusInventario") = "1" Then
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} , relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
Else
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} con movimientos de almacen, relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
End If
Else
MsgValidadas.AppendFormat("Factura No se pudo Validar: {0} - {1}<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
End If
End If
End If
End If
@@ -767,7 +764,6 @@ Partial Class Bancos_ProveedoresAbonar
Dim FolioFijo As Integer = 0
Dim TipoCambio As Decimal = 0
'cheque
If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(13, 83) Then FolioFijo = TxtFolio.Text.ToEntero
@@ -799,7 +795,6 @@ Partial Class Bancos_ProveedoresAbonar
If Not ObjGrales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(DdlCuentaDeposito.SelectedValue.ToEntero, -1, -1, "-1", TxtReferenciaCIE.Text.Trim, TxtConceptoCIE.Text.Trim) Then
MsgError = "Error al actualziar Cuanta Referencia y Concepto Deposito."
End If
End If
End If
@@ -834,6 +829,8 @@ Partial Class Bancos_ProveedoresAbonar
CompraActual.Total = gvr.DataKey("Total").ToDecimal
CompraActual.IVA = gvr.DataKey("IVA").ToDecimal
CompraActual.IVADeducible = gvr.DataKey("IVADeducible").ToDecimal
CompraActual.IVANoDeducible = gvr.DataKey("IVANoDeducible").ToDecimal
CompraActual.CompraNoDeducible = gvr.DataKey("NoDeducible").ToEntero
CompraActual.IEPS = gvr.DataKey("IEPS").ToDecimal
CompraActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal
CompraActual.RetISR = gvr.DataKey("RetISR").ToDecimal
@@ -843,15 +840,15 @@ Partial Class Bancos_ProveedoresAbonar
CompraActual.EsImportacion = gvr.DataKey("EsImportacion") = "1"
CompraActual.UsuarioActual = UsuarioActual
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
CompraActual.IdCtaContableProv = If(CompraActual.CveMoneda >= 2, IdCtaProveedorExtranjera, CtaProveedor)
CompraActual.IdCtaContableProvComplementaria = IdCtaContComplementaria
'Importe de pago
Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
'Tipos de cambio
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
Pago.TCPago = TxtTC.Text.ToDecimal
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
Pago.TCPago = TxtTCDolaresDolares.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
@@ -1107,7 +1104,7 @@ Partial Class Bancos_ProveedoresAbonar
If IDPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then Msg.AppendFormat(" <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a><br/> ", IDPoliza)
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>&nbsp;&nbsp; ", CvePrePoliza)
Msg.AppendFormat("<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>&nbsp;&nbsp; ", CvePrePoliza)
End If
Dim Mensaje As String = String.Format("El Documento se generó correctamente.<br /><br /> {0} ", Msg.ToString)
@@ -1516,7 +1513,6 @@ Partial Class Bancos_ProveedoresAbonar
#Region " NOTIFICACION PAGO "
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
Try
@@ -1555,263 +1551,8 @@ Partial Class Bancos_ProveedoresAbonar
GuardaLog("Error al enviar notificación de pago ProveedoresAbonar --> " & ex.StackTrace.ToString)
End Try
End Sub
'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
' Dim Body As String = GeneraCorreo(CveIE)
' Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto
' Dim File As Byte() = Nothing
' If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
' End If
' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
' Hilo.Start()
' End If
'End Sub
'Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
' 'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
' Dim Mail As New ClsSisMail()
' Para = If(Para IsNot Nothing, Para, "")
' Asunto = If(Asunto IsNot Nothing, Asunto, "")
' Body = If(Body IsNot Nothing, Body, "")
' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
' If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante})
' End If
' If File IsNot Nothing Then
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
' End If
' If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
' Dim objIE As New ClsBancos
' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
' objIE.Dispose()
' End If
'End Sub
'Private Function GeneraCorreo(CveIE As Integer) As String
' Dim strBody As New StringBuilder
' Dim objIE As New ClsBancos
' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
' strBody.Append("<head> ")
' strBody.Append(" <style type=""text/css""> ")
' strBody.Append(" body ")
' strBody.Append(" { ")
' strBody.Append(" margin:0px; ")
' strBody.Append(" padding:0px 0px 0px 0px; ")
' strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
' strBody.Append(" font-size: 10px; ")
' strBody.Append(" background-color:#F0F0F0; ")
' strBody.Append(" } ")
' strBody.Append(" a.Texto ")
' strBody.Append(" { ")
' strBody.Append(" font-size:11px; ")
' strBody.Append(" background-color:#F7F6F3; ")
' strBody.Append(" text-decoration:none; ")
' strBody.Append(" font-weight:bold; ")
' strBody.Append(" } ")
' strBody.Append(" .Texto ")
' strBody.Append(" { ")
' strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
' strBody.Append(" } ")
' strBody.Append(" .TextoAlterno ")
' strBody.Append(" { ")
' strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
' strBody.Append(" vertical-align:middle; height:20px;")
' strBody.Append(" } ")
' strBody.Append(" .BarraIdentidad ")
' strBody.Append(" { ")
' strBody.Append(" color:#FFFFFF; ")
' strBody.Append(" background:#F0F0F0; ")
' strBody.Append(" font-weight:bold; ")
' strBody.Append(" font-size:19px; ")
' strBody.Append(" font-style:oblique; ")
' strBody.Append(" } ")
' strBody.Append(" .Titulos ")
' strBody.Append(" { ")
' strBody.Append(" background-color: Gray;")
' strBody.Append(" color:White; ")
' strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
' strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
' strBody.Append(" text-decoration:none; ")
' strBody.Append(" } ")
' strBody.Append(" .Verde {color: #00CC00;} ")
' strBody.Append(" .Negro {color: #000000;} ")
' strBody.Append(" .Rojo {color: #FF0000;} ")
' strBody.Append(" </style> ")
' strBody.Append("</head> ")
' strBody.Append("<body> ")
' strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
' strBody.AppendFormat(" <fieldset>")
' strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
' strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat(" </fieldset>")
' strBody.AppendFormat("</div><br/><br/>")
' strBody.AppendFormat("<div style='width: 600px'>")
' strBody.AppendFormat(" <fieldset>")
' strBody.AppendFormat(" <legend><b> </b></legend>")
' strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
' If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
' strBody.Append(" <tr style=""height: 22px""> ")
' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
' strBody.Append(" </tr> ")
' End If
' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
' strBody.Append(" <tr style=""height: 22px""> ")
' strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
' strBody.Append(" </tr> ")
' End If
' strBody.Append(" <tr style=""height: 22px""> ")
' strBody.AppendFormat(" <td>&nbsp;</td> ")
' strBody.Append(" </tr> ")
' strBody.Append(" </table> ")
' strBody.AppendFormat(" </fieldset>")
' strBody.Append(" </div> ")
' strBody.AppendFormat("<div style='width: 600px'>")
' strBody.AppendFormat(" <table style='width:100%'>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td style='vertical-align: top'>")
' strBody.AppendFormat(" <fieldset>")
' strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
' strBody.AppendFormat(" <table width='100%'>")
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
' strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
' strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Movimiento:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Banco:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Cuenta:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
' strBody.AppendFormat(" </tr>")
' If objIE.CuentaDepositado.ToString <> "" Then
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Cuenta Destino:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
' strBody.AppendFormat(" </tr>")
' End If
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Fecha:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Importe:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>Observaciones:</td>")
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td colspan='2'>")
' strBody.AppendFormat(" <hr />")
' strBody.AppendFormat(" </td>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat(" </fieldset>")
' strBody.AppendFormat(" </td>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat("</div>")
' 'MOVIMIENTOS CHEQUE
' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
' Dim Textov33 As String = ""
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
' End If
' strBody.AppendFormat("<div style='width: 1000px'>")
' strBody.AppendFormat(" <table style='width:1000px'>")
' strBody.AppendFormat(" <tr>")
' strBody.AppendFormat(" <td style='vertical-align: top'>")
' strBody.AppendFormat(" <fieldset>")
' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
' strBody.AppendFormat(" <table width='1000px'>")
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
' strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
' strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
' strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
' strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
' strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
' strBody.AppendFormat(" </tr>")
' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
' strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
' strBody.AppendFormat(" </tr>")
' Next
' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <td colspan='5'>")
' strBody.AppendFormat(" <hr />")
' strBody.AppendFormat(" </td>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat(" </fieldset>")
' strBody.AppendFormat(" </td>")
' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </table>")
' strBody.AppendFormat("</div>")
' End If
' strBody.Append(" <div> Favor de no responder a este correo. </div> ")
' strBody.Append("</body></html>")
' End If
' objIE.Dispose()
' Return strBody.ToString
'End Function
#End Region
#Region "SALDAR CUENTAS"
@@ -1950,31 +1691,17 @@ Partial Class Bancos_ProveedoresAbonar
End If
Next
If MsgError.Trim.Length = 0 AndAlso CvePrePoliza > 0 Then
If MsgError = "" AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
Else
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
Else
'Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
End If
End If
End If
End If
End If
If MsgError = "" Then
ObjConta.Commit()
CargaDatos(CveMoneda)

View File

@@ -1,8 +1,6 @@
<%@ Page Title="Compras - Registro de Facturas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" ValidateRequest="false" CodeFile="Compras.aspx.vb" Inherits="Compras_Compras" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
<ContentTemplate>
@@ -284,9 +282,7 @@
</div>
</div>
<div class="row">
<table>
<tr>
<td align="Center" style="width: 100px">Fecha Factura:</td>
@@ -322,12 +318,7 @@
</td>
</tr>
</table>
<div class="form-group whitoutcol" style="width: 280px;">
<span class="whitoutcol linewhitsize comprasdfleft">Descripción: </span>
<div class="whitoutcol whitoutcol comprasdfleftvar">
@@ -348,18 +339,7 @@
<div class="whitoutcol whitoutcol comprasdfleftvar">
<asp:CheckBox ID="ChkEsNoDeducible" runat="server" OnCheckedChanged="ChkEsNoDeducible_CheckedChanged1" AutoPostBack="true" />
</div>
</div>
<%-- <div class="form-group whitoutcol" style="width: 320px;">
<span class="whitoutcol linewhitsize comprasdfleft">Tipo Gasto: </span>
<div class="whitoutcol whitoutcol comprasdfleftvar">
<asp:DropDownList ID="DdlTipoGasto" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>--%>
</div>
</div>
</div>
</div>
@@ -525,6 +505,7 @@
<asp:ListItem Text="NC Con Productos" Value="6"></asp:ListItem>
<asp:ListItem Text="Apoyo Logístico" Value="9"></asp:ListItem>
<asp:ListItem Text="NC Por Devolución" Value="11"></asp:ListItem>
<%--<asp:ListItem Text="Garantía" Value="12"></asp:ListItem>--%>
</asp:DropDownList>
</div>
@@ -1140,7 +1121,7 @@
<div class="col-md-6 ">
<asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" />
<asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" />
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear Deducible" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear 8.5%" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
</div>
</div>
@@ -1152,7 +1133,8 @@
<ajax:TabPanel ID="TabAlmacen" runat="server" HeaderText="Almacén">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="uppAlmacenGral" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="Pnlalmaceninventarios" runat="server">
<asp:UpdatePanel runat="server" ID="UpConsignaciones" UpdateMode="Conditional">
@@ -1171,14 +1153,7 @@
<asp:ListItem Value="2" Text="Recepción a Almacén"></asp:ListItem>
</asp:DropDownList>
</li>
<li runat="server" id="LiConsignacion" visible="false">Consignación:
<li runat="server" id="LiConsignacion" visible="false">Consignación:
<asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList>
</li>
<%--<li>Folio Consignación:
@@ -1432,7 +1407,8 @@
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
@@ -1452,14 +1428,7 @@
<div class="portlet-title portlet-filterT">
<div class="titlefiltros caption ">
<ul class="list-inline" style="font-size: 14px;">
<li>Tipo Cambio:
<li>Tipo Cambio:
<asp:TextBox ID="TxtTipoCambioOC" runat="server" align="right" MaxLength="12" Text="" Width="100px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtTipoCambioOC" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVTipoCambioOC" runat="server" ControlToValidate="TxtTipoCambioOC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Cambio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTipoCambioOC"></asp:RequiredFieldValidator>
@@ -1858,19 +1827,9 @@
<asp:Label ID="LbProductoServicio" runat="server" Text='<%# Eval("PS")%>'></asp:Label>
</ItemTemplate>
<HeaderTemplate>
Clasificación
Clasificación
<br />
Producto/Servicio
Producto/Servicio
</HeaderTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Producto/Servicio SAT" DataField="SATClaveProductoServicio" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Left" Visible="false" />
@@ -4593,9 +4552,9 @@
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UpEsNoDeduciblePS" runat="server" UpdateMode="Conditional" Visible="false">
<asp:UpdatePanel ID="UpEsNoDeduciblePS" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<div class="row">
<div class="row" runat="server" id="divNoDeducibleModal" visible="false">
<div class="col-md-6">
<label>¿Es No Deducible? </label>
<asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" />
@@ -4607,14 +4566,7 @@
<div class="form-group form-md-line-input input-iconright">
<div class="row">
<div class="col-md-6">
<asp:Label ID="Label11" runat="server" Text="Total:"></asp:Label>&nbsp&nbsp$
<asp:Label ID="Label11" runat="server" Text="Total:"></asp:Label>&nbsp&nbsp$
<asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label>
</div>
@@ -4624,13 +4576,8 @@
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -320,7 +320,7 @@
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes"
DataKeyNames="CveCompra,FechaCompra,CveProveedor,CveMoneda,Proveedor,SerieFolio,SubTotal,IVA,RetIVA,RetISR,IEPS,Total,TipoCambio,IdCtaContProveedores,IdCtaContAcreedor,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto,IVAPorPagar">
DataKeyNames="CveCompra,FechaCompra,CveProveedor,CveMoneda,Proveedor,SerieFolio,SubTotal,IVA,RetIVA,RetISR,IEPS,Total,TipoCambio,IdCtaContProveedores,IdCtaContAcreedor,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto,IVAPorPagar,NoDeducible">
<Columns>
<asp:TemplateField>
<HeaderTemplate>

View File

@@ -709,6 +709,7 @@ Partial Class Compras_ReembolsosComprobaciones
CompraActual.PorcentajeIVA = gvr.DataKey("IVAPorcentaje").ToDecimal
CompraActual.UsuarioActual = UsuarioActual
CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
CompraActual.CompraNoDeducible = gvr.DataKey("NoDeducible").ToEntero
CompraActual.IdCtaContableProv = IdCtaProveedor
ImportePagar = gvr.FCTextBox("TxtAbonar").Text.ToDecimal

View File

@@ -2978,7 +2978,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
End If
If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").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)
MensajeAlert.AppendFormat("<br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
End If
Next

View File

@@ -382,7 +382,6 @@
</asp:UpdatePanel>
</div>
</div>
<br />
<div class="row" style="margin-top: 5px;">
<div class="col-md-12" style="text-align: center;">
<asp:Button ID="BtnAddCodigo" runat="server" Text="Guardar" CssClass="btn btn-primary" Width="75%" />
@@ -556,14 +555,7 @@
</div>
</div>
<div class="portlet-body ">
<div class="rowpadding">
<%-- <div class="row">
<label class="col-md-3">Transitorio:</label>
<div class="col-md-9">
<asp:DropDownList ID="DdlAlmacenTransitorio" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"
CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
</div>
</div>--%>
<div class="rowpadding">
<div class="row rowpadding" id="divEmitir" runat="server">
<label class="col-md-3">Emitir:</label>
<div class="col-md-9">
@@ -605,24 +597,18 @@
<ajax:ValidatorCalloutExtender ID="VCERfvDdlConfigAuto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlConfigAuto" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
<label class="col-md-3">Remolque 1:</label>
<div class="col-md-9">
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
</div>
</div>
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
<label class="col-md-3">Remolque 2:</label>
<div class="col-md-9">
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca"></asp:DropDownList>
</div>
</div>
</div>
<div class="row rowpadding">
<label class="col-md-3">F. Salida:</label>
<div class="col-md-9" style="padding-top: 0px;">
@@ -658,8 +644,6 @@
<ajax:TextBoxWatermarkExtender ID="TBWEDistancia" runat="server" TargetControlID="TxtDistancia" WatermarkText="Distancia" WatermarkCssClass="watermarked" />
</div>
</div>
<div class="row rowpadding" >
<label class="col-md-3">Cliente:</label>
<div class="col-md-9">
@@ -675,23 +659,40 @@
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<%--CARTA PORTE FIN--%>
</div>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
<div class="col-md-4 pull-right">
<div class="row">
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%--<div class="row">
<div class="col-md-12" align="Right">
<asp:LinkButton ID="LkAgregar" runat="server" CssClass="btn btn-default" Text="Agregar Producto" />
</div>
</div>
<br />--%>
<div class="row">
<div class="col-md-10" align="right">
<asp:Label ID="LbTotalMovimientos" Text="Total de Movimientos: 0" runat="server" />
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="col-md-2 pull-right" runat="server" id="DivCodigoSeriePS" visible="false">
<table style="float: right;">
<tr>
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
@@ -719,26 +720,6 @@
</table>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%--<div class="row">
<div class="col-md-12" align="Right">
<asp:LinkButton ID="LkAgregar" runat="server" CssClass="btn btn-default" Text="Agregar Producto" />
</div>
</div>
<br />--%>
<div class="row">
<div class="col-md-12" align="right">
<asp:Label ID="LbTotalMovimientos" Text="Total de Movimientos: 0" runat="server" />
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
<ContentTemplate>

View File

@@ -1480,10 +1480,9 @@ Partial Class Inventarios_EntradasSalidas
Dim FechaCaducidadVal As Date = If(RowPS("AplicaCaducidad").ToString = "True", FechaCaducidad, MinFecha)
If RowPS("AplicaSerie").ToString = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
'SI NO ES USADO O GARANTIA
If Not Me.CveTipoAlmacenSeleccionado.Contiene(6, 22) Then
'SI NO ES USADO O GARANTIA O SALIDA APOYO LOGISTICO
If Not Me.CveTipoAlmacenSeleccionado.Contiene(6, 22, 21) Then
Valido = False
Alert("El producto requiere Serie", TipoMensaje.MsgAdvertencia)
End If
@@ -1500,8 +1499,13 @@ Partial Class Inventarios_EntradasSalidas
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacen.SelectedValue))
If drA2 IsNot Nothing Then
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero
'codigo temporal
If UsuarioActual.CveEmpresa = 140 AndAlso drA2("CveTipoAlmacen").ToString = "21" Then
Serie = ""
End If
End If
'salida
If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen
@@ -1523,7 +1527,6 @@ Partial Class Inventarios_EntradasSalidas
End If
End If
If Valido Then
Dim CveClasificacion As Integer
'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
@@ -1911,8 +1914,12 @@ Partial Class Inventarios_EntradasSalidas
CveClasificacion = drr("CveClasificacion").ToString.ToEntero
IdCtaContableOtro = drr("IdCuentaCostos").ToString.ToEntero
End If
Case 3
CveConceptoContable = 51
EsContabilizable = True
Case Else
CveConceptoContable = 95
End Select
'2-78

View File

@@ -3978,9 +3978,8 @@ Partial Class Clientes
End If
End If
End If
Else
Respuesta = True
End If
Return Respuesta