Compras refacturacion, Nominas layout Banorte, RegPrepolizas

This commit is contained in:
rakcsle
2022-05-02 13:00:41 -07:00
parent 728191dec1
commit a5e12e0544
8 changed files with 83 additions and 41 deletions

View File

@@ -1188,8 +1188,10 @@ Public Class ClsContabilidad
Catch ex As Exception Catch ex As Exception
If ex.Message.Contains("50015;") Then If ex.Message.Contains("50015;") Then
OnError("No se puede actualizar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("No se puede actualizar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
ElseIf ex.Message.Contains("IDX_UN_ContaPrePolizasCveEmpresaCveTipoPolizaFoliosAnioMes") Then
OnError($"El Folio <b>{Folio}</b> ya esta registrado.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else Else
OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If End If
End Try End Try
Return Retorno Return Retorno

View File

@@ -5844,7 +5844,7 @@
} }
//var SaldoCompra = parseFloat(parseFloat($get('HdnCompraSaldo').value).toFixed(2)); //var SaldoCompra = parseFloat(parseFloat($get('HdnCompraSaldo').value).toFixed(2));
var SaldoCompra = (Total - FnSumaValoresAnt() + txtvalue).toFixed(2); // le agrego lo del valor actual para validarlo var SaldoCompra = (TotalSaldo - FnSumaValoresAnt() + txtvalue).toFixed(2); // le agrego lo del valor actual para validarlo

View File

@@ -1025,6 +1025,21 @@ Partial Class Compras_Compras
End Set End Set
End Property End Property
Private Property SubTotalRefacturacion As Decimal
Get
If ViewState("SubTotalRefacturacion") Is Nothing Then
ViewState("SubTotalRefacturacion") = 0.0D
End If
Return ViewState("SubTotalRefacturacion").ToString.ToDecimal
End Get
Set(value As Decimal)
ViewState("SubTotalRefacturacion") = value
End Set
End Property
Private Property IVAOriginal As Double Private Property IVAOriginal As Double
Get Get
@@ -2165,7 +2180,7 @@ Partial Class Compras_Compras
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
''If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then ''If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
'DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5")) DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5"))
''End If ''End If
End If End If
@@ -5925,7 +5940,7 @@ Partial Class Compras_Compras
Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal))) Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal)))
Dim importeMN As Decimal = 0 Dim importeMN As Decimal = 0
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1) Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
@@ -6314,7 +6329,7 @@ Partial Class Compras_Compras
Funcionalidad = 313 Funcionalidad = 313
ConceptoContable = 248 ConceptoContable = 248
ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
Funcionalidad = 577 Funcionalidad = 578
ConceptoContable = 285 ConceptoContable = 285
End If End If
@@ -6517,7 +6532,14 @@ Partial Class Compras_Compras
Exit Select 'Es credito el concepto 6 se agrega en CASE 17 Exit Select 'Es credito el concepto 6 se agrega en CASE 17
End If End If
If Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked) Then
Dim DifSubTotatles As Decimal = 0D
If CveCompraRefacturacion > 0 Then
DifSubTotatles = Math.Abs(SubTotalRefacturacion - TxtSubTotal2.Text.ToDecimal)
End If
If DifSubTotatles > 0 Or (Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked)) Then
'AF TipoAF 2 Es para las compras 'AF TipoAF 2 Es para las compras
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1 ") DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1 ")
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
@@ -8972,7 +8994,7 @@ Partial Class Compras_Compras
IdCtaContable = 0 IdCtaContable = 0
Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text) Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
Dim importeMN As Decimal = 0 Dim importeMN As Decimal = 0
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1) Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
Dim PorcentajeImpuesto As Decimal = 0 Dim PorcentajeImpuesto As Decimal = 0
Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text) Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
@@ -10591,7 +10613,7 @@ Partial Class Compras_Compras
Dim importeMovimiento As Decimal = 0 Dim importeMovimiento As Decimal = 0
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim importeMN As Decimal = 0 Dim importeMN As Decimal = 0
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1) Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
Select Case ConceptoContable Select Case ConceptoContable
@@ -14731,14 +14753,19 @@ Partial Class Compras_Compras
Private Sub DdlRefacturacionFacturas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRefacturacionFacturas.SelectedIndexChanged Private Sub DdlRefacturacionFacturas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRefacturacionFacturas.SelectedIndexChanged
SubTotalRefacturacion = 0.0D
If DdlRefacturacionFacturas.SelectedValue.ToEntero > 0 Then If DdlRefacturacionFacturas.SelectedValue.ToEntero > 0 Then
Dim dr As DataRow = DtRefacturacion.FiltroPrimero(String.Format("CveCompra ={0}", DdlRefacturacionFacturas.SelectedValue)) Dim dr As DataRow = DtRefacturacion.FiltroPrimero(String.Format("CveCompra ={0}", DdlRefacturacionFacturas.SelectedValue))
If dr IsNot Nothing Then If dr IsNot Nothing Then
HdnRefacturacionConcepto.Value = dr("CveConceptoContableAlmacen").ToString HdnRefacturacionConcepto.Value = dr("CveConceptoContableAlmacen").ToString
ChkRefacturacionConAlmacen.Checked = If(dr("CveMovimientoAlmacen").ToString.ToEntero > 0, True, False) ChkRefacturacionConAlmacen.Checked = If(dr("CveMovimientoAlmacen").ToString.ToEntero > 0, True, False)
SubTotalRefacturacion = dr("SubTotal").ToString.ToDecimal
End If End If
End If End If
End Sub End Sub

View File

@@ -728,15 +728,10 @@ Partial Class Compras_Proveedores
cfdVer = "http://www.sat.gob.mx/cfd/4" cfdVer = "http://www.sat.gob.mx/cfd/4"
End If End If
'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2" 'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
namespaces.AddNamespace(Prefijo, cfdVer) namespaces.AddNamespace(Prefijo, cfdVer)
Dim node As XmlNode Dim node As XmlNode
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces) node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces)
If node IsNot Nothing Then If node IsNot Nothing Then

View File

@@ -2883,7 +2883,7 @@ Partial Class Compras_eFacturas
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean)) DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
Dim TieneRegistros As Boolean = False
If IO.File.Exists(Archivo) Then If IO.File.Exists(Archivo) Then
@@ -3034,18 +3034,29 @@ Partial Class Compras_eFacturas
End If End If
End If End If
ObjCompraFolios.Dispose() ObjCompraFolios.Dispose()
DTDocumentosRelacionados = DTDocumentosRelacionados.FiltraParametros("CveIE > 0 AND LEN(IdDocumento) > 0")
GVPDocumentosRelacionadosPagos.DataSource = DTDocumentosRelacionados GVPDocumentosRelacionadosPagos.DataSource = DTDocumentosRelacionados
GVPDocumentosRelacionadosPagos.DataBind() GVPDocumentosRelacionadosPagos.DataBind()
DTGVPagosVinculacion = DTDocumentosRelacionados DTGVPagosVinculacion = DTDocumentosRelacionados
BtnVincularPago.Visible = False
If DTDocumentosRelacionados.Rows.Count > 0 Then
SerieFolioIE = DTDocumentosRelacionados.Rows(0)("SerieFolio").ToString
DivVincularPagoManualmente.Visible = False
BtnVincularPago.Visible = True
TieneRegistros = True
Else
DivVincularPagoManualmente.Visible = True
BtnVincularPago.Visible = False
End If
ComprasEnComplemento = DTGVPagosVinculacion.COUNT("CveCompra", " CveCompra > 0") ComprasEnComplemento = DTGVPagosVinculacion.COUNT("CveCompra", " CveCompra > 0")
If DTDocumentosRelacionados.MAX("CveCompra").ToString.ToEntero > 0 Then If DTDocumentosRelacionados.MAX("CveCompra").ToString.ToEntero > 0 Then
TieneCompras = True TieneCompras = True
Else Else
@@ -3096,25 +3107,25 @@ Partial Class Compras_eFacturas
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
Dim TieneRegistros As Boolean = False
If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", "").Replace("pagos10:", ""), UsuarioActual.CveEmpresa) Then
GvVincularPago.DataSource = ObjCompras.DtResultados
If ObjCompras.DtResultados.Rows.Count > 0 Then 'If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", "").Replace("pagos10:", ""), UsuarioActual.CveEmpresa) Then
SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString ' GvVincularPago.DataSource = ObjCompras.DtResultados
DivVincularPagoManualmente.Visible = False
BtnVincularPago.Visible = True ' If ObjCompras.DtResultados.Rows.Count > 0 Then
TieneRegistros = True ' SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString
Else ' DivVincularPagoManualmente.Visible = False
DivVincularPagoManualmente.Visible = True ' BtnVincularPago.Visible = True
BtnVincularPago.Visible = False ' TieneRegistros = True
End If ' Else
'ImportePago = ObjCompras.DtResultados.SUMD("Monto") ' DivVincularPagoManualmente.Visible = True
Else ' BtnVincularPago.Visible = False
DivVincularPagoManualmente.Visible = False ' End If
BtnVincularPago.Visible = False ' 'ImportePago = ObjCompras.DtResultados.SUMD("Monto")
End If 'Else
' DivVincularPagoManualmente.Visible = False
' BtnVincularPago.Visible = False
'End If
For Each GvRowF As GridViewRow In GVPDocumentosRelacionadosPagos.Rows For Each GvRowF As GridViewRow In GVPDocumentosRelacionadosPagos.Rows

View File

@@ -2724,7 +2724,10 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtFolio.Text = ObjConta.ContaFolio.ToString() TxtFolio.Text = ObjConta.ContaFolio.ToString()
LnkFolioManual.Visible = False LnkFolioManual.Visible = False
BtnContabilizar.Visible = False
BtnDescontabilizar.Visible = True
UpPoliza.Update() UpPoliza.Update()
UpGuardar.Update()
End If End If
@@ -3215,15 +3218,18 @@ Partial Class ContabilidadC_RegPrePolizaS
If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then
Alert("Descontabilizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Descontabilizado Correctamente.", TipoMensaje.MsgInformacion)
TxtFolio.Text = "" TxtFolio.Text = ""
LnkFolioManual.Visible = True LnkFolioManual.Visible = True
BtnDescontabilizar.Visible = False
BtnContabilizar.Visible = True
End If End If
ObjConta.Dispose() ObjConta.Dispose()
UpPoliza.Update() UpPoliza.Update()
UpGuardar.Update()

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh> <AutoRefresh>0</AutoRefresh>
<DataSources> <DataSources>
<DataSource Name="DataSet"> <DataSource Name="DataSet">
@@ -93,9 +93,9 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>3.15903cm</Top> <Top>3.15903cm</Top>
<Left>2.98488cm</Left> <Left>0.58123cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>14.64437cm</Width> <Width>17.04802cm</Width>
<ZIndex>1</ZIndex> <ZIndex>1</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -261,9 +261,9 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>4.15713cm</Top> <Top>4.15713cm</Top>
<Left>2.98488cm</Left> <Left>0.58123cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>16.08307cm</Width> <Width>18.48672cm</Width>
<ZIndex>6</ZIndex> <ZIndex>6</ZIndex>
<Style> <Style>
<Border> <Border>

View File

@@ -8800,7 +8800,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
//Tipo de registro A 1 1-1 //Tipo de registro A 1 1-1
sb.AppendLine("D"); sb.AppendLine("");
sb.Append("D");
//Fecha Aplicacion N 8 2-9 //Fecha Aplicacion N 8 2-9
sb.Append(DateTime.Now.ToString("yyyyMMdd")); sb.Append(DateTime.Now.ToString("yyyyMMdd"));
@@ -8828,13 +8829,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
//NumeroCuenta N 18 120-137 //NumeroCuenta N 18 120-137
sb.Append(NumeroCuenta.PadLeft(18, Cero)); sb.Append(NumeroCuenta.PadLeft(18, Cero));
//Tipo movimiento N 1 138-138 //Tipo movimiento N 1 138-138
sb.Append(TipoCuenta.PadLeft(1, Cero)); sb.Append(TipoMovimiento.PadLeft(1, Cero));
//Accion N 1 139-139 //Accion N 1 139-139
sb.Append(Accion.PadLeft(1, Espacio)); sb.Append(Accion.PadLeft(1, Espacio));
//ImporteIvaOperacion 140-147 //ImporteIvaOperacion 140-147
sb.Append(ImporteIvaOperacion.PadLeft(8, Cero)); sb.Append(ImporteIvaOperacion.PadLeft(8, Cero));
//filler 18 148-165 //filler 18 148-165
sb.Append(string.Empty.PadLeft(77, Espacio)); sb.Append(string.Empty.PadLeft(18, Espacio));
} }