Merge -- Empresas
This commit is contained in:
@@ -121,7 +121,7 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
Str.AppendFormat("Sello=""{0}"" ", "123")
|
||||
Str.AppendFormat("noCertificado=""{0}"" ", "123")
|
||||
Str.AppendFormat("Certificado=""{0}"" ", "1234567890")
|
||||
Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas""")
|
||||
Str.Append("xmlns:catalogocuentas=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/CatalogoCuentas"">")
|
||||
|
||||
'DETALLES
|
||||
For Each Dr As DataRow In DtCuentas.Rows
|
||||
@@ -183,20 +183,26 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), DdlEjercicio.SelectedValue).ToDate
|
||||
Dim FechaF = FechaI.LastDayOfMonth
|
||||
Dim DtCuentas As New DataTable
|
||||
|
||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Dim objconta As New ClsContabilidad
|
||||
If objconta.GetBalanzaComprobacion(FechaI, FechaF, UsuarioActual.CveEmpresa) Then
|
||||
DtCuentas = objconta.DtResultados
|
||||
End If
|
||||
objconta.Dispose()
|
||||
Else
|
||||
Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then
|
||||
DtCuentas = ObjConpaq.DtResultados
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
End If
|
||||
ObjConpaq.Dispose()
|
||||
|
||||
|
||||
If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
'CABECERA
|
||||
Str.Append("<?xml version=""1.0"" encoding=""UTF-8""?>")
|
||||
Str.Append("<BCE:Balanza xsi:schemaLocation=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion BalanzaComprobacion_1_1.xsd"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" Version=""1.1"" ")
|
||||
Str.Append("<BCE:Balanza xsi:schemaLocation=""www.sat.gob.mx/esquemas/ContabilidadE/1_1/BalanzaComprobacion/BalanzaComprobacion_1_1.xsd"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" Version=""1.1"" ")
|
||||
Str.AppendFormat("RFC=""{0}"" ", UsuarioActual.Empresa.RFC)
|
||||
Str.AppendFormat("Mes=""{0}"" ", DdlPeriodo.SelectedValue)
|
||||
Str.AppendFormat("Anio=""{0}"" ", DdlEjercicio.SelectedValue)
|
||||
@@ -212,11 +218,11 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
'DETALLES
|
||||
For Each Dr As DataRow In DtCuentas.Rows
|
||||
Str.Append("<BCE:Ctas ")
|
||||
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta"))
|
||||
Str.AppendFormat("SaldoIni=""{0}"" ", Dr("SaldoIni"))
|
||||
Str.AppendFormat("Debe=""{0}"" ", Dr("Debe"))
|
||||
Str.AppendFormat("Haber=""{0}"" ", Dr("Haber"))
|
||||
Str.AppendFormat("SaldoFin=""{0}"" ", Dr("SaldoFin"))
|
||||
Str.AppendFormat("NumCta=""{0}"" ", Dr("NumCta").ToString)
|
||||
Str.AppendFormat("SaldoIni=""{0}"" ", Dr("SaldoIni").ToString)
|
||||
Str.AppendFormat("Debe=""{0}"" ", Dr("Debe").ToString)
|
||||
Str.AppendFormat("Haber=""{0}"" ", Dr("Haber").ToString)
|
||||
Str.AppendFormat("SaldoFin=""{0}"" ", Dr("SaldoFin").ToString)
|
||||
Str.Append("/>")
|
||||
Next
|
||||
|
||||
@@ -225,7 +231,6 @@ Partial Class Contabilidad_ContabilidadElectronica
|
||||
'FIN
|
||||
Str.Append("</BCE:Balanza>")
|
||||
|
||||
|
||||
'GUARDA ARHIVO
|
||||
ArchivoBalanza = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica/{1}{2}{3}BN.xml", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c)))
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ Partial Class Contabilidad_FisImpuestos
|
||||
Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.FileUrl
|
||||
RutaArchivo = String.Format("{0}{1}", RutaDirectorio, CveImpuesto)
|
||||
RutaArchivo = String.Format("{0}.{1}", RutaArchivo, fileItem.Extencion)
|
||||
RutaArchivo = String.Format("{0}.{1}", RutaArchivo, fileItem.Extension)
|
||||
|
||||
Try
|
||||
If Not Directory.Exists(RutaDirectorio) Then
|
||||
|
||||
@@ -1891,8 +1891,8 @@ Partial Class RegPoliza
|
||||
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.path
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.FileUrl, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
||||
@@ -454,7 +455,7 @@
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta" Width="100%" >
|
||||
DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto" Width="100%" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
@@ -729,6 +730,10 @@
|
||||
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlClasificacionesE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="160px" Visible="false"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlPorcentajeIVAE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" VISIBLE="false" Width="160px" >
|
||||
<asp:ListItem Text="16%" Value="0.16"></asp:ListItem>
|
||||
<asp:ListItem Text="8%" Value="0.08"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -331,7 +331,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("ContadoNumeroFolio", Type.GetType("System.String"))
|
||||
.Add("ContadoImporte", Type.GetType("System.Double"))
|
||||
.Add("ContadoBeneficiario", Type.GetType("System.String"))
|
||||
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
||||
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
||||
.Add("PorcentajeImpuesto", Type.GetType("System.Double"))
|
||||
.Add("Modificado", Type.GetType("System.Boolean"))
|
||||
|
||||
|
||||
@@ -578,7 +579,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlConceptosContables.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
|
||||
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
|
||||
|
||||
|
||||
If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||
CargaProveedores()
|
||||
DdlProveedores.Visible = True
|
||||
@@ -1051,7 +1054,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1065,7 +1069,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
||||
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero) Then
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, PorcentajeImpuesto:=row.DataKey("PorcentajeImpuesto").ToDecimal) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1119,6 +1123,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim CveCuenta As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveCuenta").ToString.ToEntero
|
||||
Dim Cargo As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDouble
|
||||
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
|
||||
Dim PorcentajeImpuesto As Double = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToEntero
|
||||
|
||||
CargaConceptosContablesE()
|
||||
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
|
||||
@@ -1187,7 +1192,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlCuentaContableE.DataBind()
|
||||
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
End Sub
|
||||
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
||||
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
||||
Dim dr As DataRow = GlobalDTContaConceptosContables(DdlConceptosContablesE.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
DdlPorcentajeIVAE.Visible = dr("AplicaImpuesto") = "True"
|
||||
End If
|
||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||
CargaProveedoresE()
|
||||
DdlProveedoresE.Visible = True
|
||||
@@ -1303,9 +1312,14 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
|
||||
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
||||
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
|
||||
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
|
||||
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
|
||||
dr("Modificado") = True
|
||||
|
||||
If DdlPorcentajeIVAE.Visible Then
|
||||
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
@@ -1966,9 +1980,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
|
||||
Dim Directorio As String = Server.MapPath("~") & file.patch
|
||||
Dim Directorio As String = Server.MapPath("~") & file.path
|
||||
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
|
||||
Reference in New Issue
Block a user