rpts IVA, CXC CXP Periodo
This commit is contained in:
@@ -723,7 +723,8 @@ Public Class ClsMovimientos
|
||||
|
||||
Public Function GetCxPPeriodo(CveProveedor As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveUsuarioResponsable As Integer,
|
||||
CveUsuarioRegistro As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer, CveSucursal As Integer,
|
||||
TipoCambio As Integer, TCEspecifico As Double, FechaCorte As Date, CveUsuarioConsulta As Integer, CveTipoProveedor As Integer) As Boolean
|
||||
TipoCambio As Integer, TCEspecifico As Double, FechaCorte As Date, CveUsuarioConsulta As Integer, CveTipoProveedor As Integer,
|
||||
Optional TipoDocto As String = "-1", Optional CveMoneda As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_RepCxPPeriodo")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -740,6 +741,8 @@ Public Class ClsMovimientos
|
||||
.Add("@FechaCorte", SqlDbType.Date).Value = FechaCorte
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
||||
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -3238,6 +3238,27 @@ Public Class ClsNominas
|
||||
End Function
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Function GetLayoutAltaBanorte(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_Dispersionnomina", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el layout de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#Region "IDisposable Support"
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
@@ -7148,8 +7148,11 @@ Public Class ClsPaginas
|
||||
'DATOS GENERALES
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(15) Then
|
||||
params.Add(New ReportParameter("CP", UsuarioActual.Empresa.CP.ToString))
|
||||
End If
|
||||
|
||||
|
||||
'params.Add(New ReportParameter("CP", UsuarioActual.Empresa.CP.ToString))
|
||||
params.Add(New ReportParameter("Observaciones", Vta.Observaciones))
|
||||
params.Add(New ReportParameter("CveVendedor", Vta.CveVendedor.ToString))
|
||||
params.Add(New ReportParameter("Status", Vta.EstatusFactura))
|
||||
|
||||
@@ -104,7 +104,8 @@
|
||||
<asp:ListItem Value="13" Text="Efectivo"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Cheque"></asp:ListItem>
|
||||
<asp:ListItem Value="11" Text="Tarjeta de Debito"></asp:ListItem>
|
||||
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
|
||||
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
|
||||
<asp:ListItem Value="-2" Text="Tarjetas"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:DropDownList ID="DDlMesesSinIntereses" runat="server" Visible="false" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="40px">
|
||||
@@ -281,9 +282,10 @@
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" class="form-check-input" id="ChkSelector" onclick="SelectorNotas(this)">
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkFactura" runat="server"/>
|
||||
<asp:CheckBox ID="ChkFactura" CssClass="CssSelector" runat="server"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Factura">
|
||||
@@ -653,6 +655,32 @@
|
||||
ComisionIntermediario = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function SelectorNotas(Chk) {
|
||||
|
||||
|
||||
$(`.CssSelector input[type=checkbox]`).each(function () {
|
||||
|
||||
if (Chk.checked) {
|
||||
|
||||
if (! $(this).prop('checked')) {
|
||||
$(this).click();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if ($(this).prop('checked')) {
|
||||
$(this).click();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -215,6 +215,19 @@
|
||||
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
<div runat="server" id="DvFolioACCondiciones" visible="false">
|
||||
|
||||
<ajax:FilteredTextBoxExtender runat="server" ID="FTEFolio" TargetControlID="TxtFolio" FilterType="Custom" ValidChars="0123456789" />
|
||||
<asp:RangeValidator ID="RvTxtFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="El Folio debe de tener un valor de entre 1 y 2147483647" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="RvTxtFolio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-4"></div>
|
||||
<label class="col-md-1 control-label text-right">Importe:</label>
|
||||
|
||||
@@ -843,6 +843,9 @@ Partial Class Bancos_IE
|
||||
DdlMotivoCancelacion.DataBind()
|
||||
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
DvFolioACCondiciones.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -861,6 +864,8 @@ Partial Class Bancos_IE
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
CveIEDeposito = ObjIE.DtResultados(0)("CveIEDepositoPadre").ToString.ToEntero
|
||||
CuentaDepositoPadre = ObjIE.DtResultados(0)("CuentaDepositoPadre").ToString
|
||||
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
|
||||
|
||||
@@ -32,9 +32,10 @@
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Cliente:
|
||||
<asp:DropDownList ID="DdlClientes" onclick="CargaClientes();" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" CssClass="form-control input-sm" Style="width: 240px !important; display: inline-block;">
|
||||
<%-- <asp:DropDownList ID="DdlClientes" onclick="CargaClientes();" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" CssClass="form-control input-sm" Style="width: 240px !important; display: inline-block;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>--%>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 240px;"></ADS:Dropdownlost>
|
||||
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargaClientes" Style="display: none;" />
|
||||
</li>
|
||||
<li> F.I.:
|
||||
|
||||
@@ -27,8 +27,17 @@ Partial Class Bancos_RepIngresosPorComprobar
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
'DdlProveedores.DataBind()
|
||||
|
||||
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(91) Then
|
||||
@@ -58,15 +67,16 @@ Partial Class Bancos_RepIngresosPorComprobar
|
||||
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1"
|
||||
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
|
||||
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||
|
||||
If Mov.GetIngresosPorComprobar(FechaI, FechaF, DdlClientes.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
If Mov.GetIngresosPorComprobar(FechaI, FechaF, CveCliente, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = Mov.DtResultados
|
||||
CargaGrid("")
|
||||
UPDatos.Update()
|
||||
|
||||
End If
|
||||
|
||||
If Mov.GetIngresosAnticiposPorComprobar(FechaI, FechaF, DdlClientes.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
If Mov.GetIngresosAnticiposPorComprobar(FechaI, FechaF, CveCliente, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
DtAnticipos = Mov.DtResultados
|
||||
CargaGrid("")
|
||||
UpAnt.Update()
|
||||
@@ -77,13 +87,26 @@ Partial Class Bancos_RepIngresosPorComprobar
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnCargarProveedores_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
|
||||
DdlClientes.CssClass += " select2me"
|
||||
DdlClientes.Items.Clear()
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlClientes.Attributes.Remove("onclick")
|
||||
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
'DdlClientes.CssClass += " select2me"
|
||||
'DdlClientes.Items.Clear()
|
||||
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
|
||||
'DdlClientes.DataBind()
|
||||
'DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'DdlClientes.Attributes.Remove("onclick")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -10817,7 +10817,7 @@ Partial Class Compras_Compras
|
||||
'End If
|
||||
|
||||
'AGREGA MOVIMIENTO
|
||||
If importeMovimiento <> 0 Then
|
||||
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
||||
ErrorPrepoliza = True
|
||||
|
||||
@@ -124,6 +124,16 @@
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1"><span>Tipo Docto:</span></div>
|
||||
<div class="col-md-2 " style="padding-bottom: 10px;">
|
||||
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Fac" Text="Factura"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="NC" Text="Nota Crédito"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="ExC" Text="Egresos X Comp"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="DEV" Text="Devolución"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -95,10 +95,13 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas
|
||||
|
||||
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
|
||||
|
||||
string TipoDocto = (DdlTipoDocto.GetSelectedValuesM() == "") ? "-1" : DdlTipoDocto.GetSelectedValuesM();
|
||||
|
||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||
if (ObjMov.GetCxPPeriodo(CveProveedor, DdlSubProyecto.SelectedValue.ToEntero(),DdlProveedoresClasificaciones.SelectedValue.ToEntero(),
|
||||
DdlUsuarioResponsable.SelectedValue.ToEntero(),DdlUsuarioRegistro.SelectedValue.ToEntero(),DdlEstatusCompra.SelectedValue.ToEntero(),UsuarioActual.CveEmpresa,
|
||||
DdlGrupo.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),TipoCambio,TCEspecifico,txtCorteA.Text.ToDate(),UsuarioActual.CveUsuario,DdlTipoProveedor.SelectedValue.ToEntero()))
|
||||
DdlGrupo.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),TipoCambio,TCEspecifico,txtCorteA.Text.ToDate(),UsuarioActual.CveUsuario,
|
||||
DdlTipoProveedor.SelectedValue.ToEntero(), TipoDocto: TipoDocto))
|
||||
{
|
||||
GvDatos.DataSource = ObjMov.DtResultados;
|
||||
DtDatos = ObjMov.DtResultados;
|
||||
|
||||
@@ -1581,7 +1581,10 @@ Partial Class Compras_eFacturas
|
||||
swTiempo.AppendFormat("espera: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||
swmili = sw.ElapsedMilliseconds
|
||||
sw.Start()
|
||||
VerificaCorreo(True)
|
||||
|
||||
If VerificaCorreo(True) Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
sw.Stop()
|
||||
swTiempo.AppendFormat("Verifica En la app: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||
@@ -1695,6 +1698,9 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
|
||||
|
||||
|
||||
asdasd
|
||||
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
|
||||
End Sub
|
||||
|
||||
@@ -2847,6 +2853,37 @@ Partial Class Compras_eFacturas
|
||||
Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||
|
||||
Dim Prefijo As String = ""
|
||||
|
||||
|
||||
|
||||
|
||||
Dim DTDocumentosRelacionados As New DataTable
|
||||
DTDocumentosRelacionados.Columns.Add("Serie")
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolio")
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("IdDocumento")
|
||||
DTDocumentosRelacionados.Columns.Add("Folio", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("MonedaDR")
|
||||
DTDocumentosRelacionados.Columns.Add("MetodoDePagoDR")
|
||||
DTDocumentosRelacionados.Columns.Add("ImpPagado", GetType(Decimal))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("CveFactura", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("CveCompra", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("CveIE", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("Fecha", GetType(Date))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("FolioPago")
|
||||
DTDocumentosRelacionados.Columns.Add("ImportePago", GetType(Decimal))
|
||||
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
|
||||
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("Tipo", GetType(String))
|
||||
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
|
||||
|
||||
|
||||
|
||||
If IO.File.Exists(Archivo) Then
|
||||
|
||||
|
||||
@@ -2913,30 +2950,7 @@ Partial Class Compras_eFacturas
|
||||
UUIDPago = ValorXML(nodeTFD, "UUID")
|
||||
LblUUID.Text = UUIDPago
|
||||
|
||||
Dim DTDocumentosRelacionados As New DataTable
|
||||
DTDocumentosRelacionados.Columns.Add("Serie")
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolio")
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("IdDocumento")
|
||||
DTDocumentosRelacionados.Columns.Add("Folio", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("MonedaDR")
|
||||
DTDocumentosRelacionados.Columns.Add("MetodoDePagoDR")
|
||||
DTDocumentosRelacionados.Columns.Add("ImpPagado", GetType(Decimal))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("CveFactura", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("CveCompra", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("CveIE", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("Fecha", GetType(Date))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("FolioPago")
|
||||
DTDocumentosRelacionados.Columns.Add("ImportePago", GetType(Decimal))
|
||||
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
|
||||
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("Tipo", GetType(String))
|
||||
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
|
||||
|
||||
|
||||
Dim nodePagosN As XmlNodeList
|
||||
@@ -3140,7 +3154,9 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
'saco la información de lo vinculado en el ie
|
||||
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||
'ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||
ImporteIES = DTDocumentosRelacionados.FiltraParametros("CveIE > 0").SUM("ImportePago")
|
||||
|
||||
|
||||
DiferenciaImportes = Monto - ImporteIES
|
||||
ObjCompras.Dispose()
|
||||
|
||||
@@ -3,16 +3,28 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="BtnImprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Balanza de Comprobación
|
||||
<asp:Label runat="server" ID="LbTitulo"></asp:Label>
|
||||
|
||||
@@ -228,10 +228,15 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
GenerarPDFCrystal("EXCEL")
|
||||
End Sub
|
||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", UsuarioActual.Empresa.Ruta))
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
'If UsuarioActual.CveUsuario = 100 Then
|
||||
' Alert(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
' End If
|
||||
' Exit Sub
|
||||
|
||||
If Not IsNothing(DtDatos) Then
|
||||
'Dim dr As DataRow = DtCxC.Rows(0)
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
@@ -245,7 +250,9 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
lista.Add(New CrystalParametro("pImg", ""))
|
||||
End If
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DtDatos, lista, "Balanza de Comprobación", Formato), "Balanza de Comprobación", Formato)
|
||||
Dim DTTemp As DataTable = DtDatos.Copy
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DTTemp, lista, "Balanza de Comprobación", Formato), "Balanza de Comprobación", Formato)
|
||||
|
||||
Else
|
||||
Alert("No se tienen registrados movimientos", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -768,15 +768,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>83140</Value>
|
||||
<Value>=Parameters!CP.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -3193,7 +3185,19 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Regímen: Regímen General de Ley Personas Morales 601; Método de Pago: </Value>
|
||||
<Value>Regímen: Regímen General de Ley Personas Morales 601</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Método de Pago: </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
@@ -3206,15 +3210,20 @@
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>; Num. Cta Pago:</Value>
|
||||
<Value>Forma de pago: </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value)</Value>
|
||||
<Value>=Parameters!FormaPago.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
@@ -3227,7 +3236,7 @@
|
||||
<rd:DefaultName>Textbox62</rd:DefaultName>
|
||||
<Top>0.83682in</Top>
|
||||
<Left>1.59827in</Left>
|
||||
<Height>0.29498in</Height>
|
||||
<Height>0.40038in</Height>
|
||||
<Width>6.31865in</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
@@ -3257,9 +3266,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox63</rd:DefaultName>
|
||||
<Top>1.1747in</Top>
|
||||
<Top>1.2372in</Top>
|
||||
<Left>2.35328in</Left>
|
||||
<Height>0.25in</Height>
|
||||
<Height>0.23611in</Height>
|
||||
<Width>3.69856in</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Style>
|
||||
@@ -3379,7 +3388,6 @@
|
||||
<rd:FormatSymbolCulture>es-MX</rd:FormatSymbolCulture>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
@@ -4074,13 +4082,13 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>0.74104in</Width>
|
||||
<Width>0.73688in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.57756in</Width>
|
||||
<Width>0.5734in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.67516in</Width>
|
||||
<Width>0.671in</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -4329,9 +4337,9 @@
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet3</DataSetName>
|
||||
<Top>0.26817in</Top>
|
||||
<Left>5.86887in</Left>
|
||||
<Left>5.88134in</Left>
|
||||
<Height>0.34081in</Height>
|
||||
<Width>1.99376in</Width>
|
||||
<Width>1.98129in</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -4362,6 +4370,14 @@
|
||||
<Value>Moneda </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!MonedaAbreviatura.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Moneda.Value</Value>
|
||||
<Style />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -230,7 +230,7 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkOpenProrrateo" OnClick="LnkOpenProrrateo_Click" runat="server"><i class="fa fa-percent"></i> Prorrateo</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkLayoutContable" Visible="false" OnClick="LnkLayoutContable_Click" runat="server"><i class="fa fa-university" aria-hidden="true"></i>Layout banco</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
@@ -286,8 +286,7 @@
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkListaRaya" />
|
||||
<asp:PostBackTrigger ControlID="LnkFormatoTabular" />
|
||||
<asp:PostBackTrigger ControlID="LnkLayoutContable" />
|
||||
|
||||
<asp:PostBackTrigger ControlID="LnkLayoutContable" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -4213,6 +4212,67 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalLayoutBancos" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpModalBancosLayout" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Layout banco</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:RadioButtonList runat="server" ID="RBLModalBancosLayout" RepeatDirection="Horizontal" CssClass=" form-control input-sm" >
|
||||
<asp:ListItem Value="1" Selected="True">Generar Layout</asp:ListItem>
|
||||
<asp:ListItem Value="2">Altas Nomina</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<asp:Label runat="server" AssociatedControlID="RBLModalBancosLayout">Tipo Operacóon:</asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlModalBancosLayout" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione Uno</asp:ListItem>
|
||||
<asp:ListItem Value="1">Bancomer</asp:ListItem>
|
||||
<asp:ListItem Value="2">Banorte</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlModalBancosLayout">Banco:</asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalBancosLayout" runat="server" CssClass="help-block errorimput" Display="none" InitialValue="-1" ControlToValidate="DdlModalBancosLayout"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalBancoLayout">
|
||||
</asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERfvDdlModalBancosLayout" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalBancosLayout" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%-- <asp:UpdatePanel ID="UpModalBancosLayoutBotones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>--%>
|
||||
<button id="BtnModalBancosLayoutCerrar" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:Button Text="Generar" ID="BtnModalBancosProcesar" OnClick="BtnModalBancosProcesar_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalBancoLayout" runat="server" />
|
||||
<%-- </ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnModalBancosProcesar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:TextBox ID="TxtCvePeriodo" CssClass="TxtCvePeriodo hidden" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCvePersonal" CssClass="TxtCvePersonal hidden" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnGeneratepdf" CssClass="BtnGeneratepdf hidden" OnClick="BtnGeneratepdf_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
|
||||
@@ -7662,108 +7662,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
loadtablas();
|
||||
}
|
||||
private void CrearLayout(DataTable DTNomina)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
bool ErroresValidaciones = false;
|
||||
|
||||
|
||||
|
||||
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||
|
||||
|
||||
|
||||
if (RFC.Trim().Length == 0)
|
||||
SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>");
|
||||
|
||||
System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/");
|
||||
if (!Coincidencia.Success)
|
||||
{
|
||||
SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>");
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
if (BancoNumCuenta.Trim().Length != 10)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>"); // Bancomer 10 caracteres
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
|
||||
if (Importe <= 0)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
}
|
||||
|
||||
ErroresValidaciones = false;
|
||||
|
||||
if (!ErroresValidaciones)
|
||||
{
|
||||
int Count = 1;
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
StringBuilder SbLinea = new StringBuilder();
|
||||
|
||||
string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2);
|
||||
|
||||
SbLinea.Append(Count.ToString("000000000"));
|
||||
SbLinea.Append(RFC.Trim().PadRight(16));
|
||||
SbLinea.Append("03");
|
||||
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20));
|
||||
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||
|
||||
|
||||
if (Nombre.Trim().Length > 40)
|
||||
Nombre = Nombre.Substring(0, 40);
|
||||
|
||||
SbLinea.Append(Nombre.Trim().PadRight(40));
|
||||
|
||||
SbLinea.Append("012");
|
||||
SbLinea.Append("000");
|
||||
|
||||
sb.AppendLine(SbLinea.ToString());
|
||||
|
||||
|
||||
Count = Count + 1;
|
||||
}
|
||||
|
||||
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
Response.AppendHeader("Content-Length", sb.ToString());
|
||||
Response.ContentType = "text/plain";
|
||||
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||
Response.Write(sb.ToString());
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionnomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CrearLayout(objnom.DtResultados);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -8204,4 +8105,259 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
this.Alert("El Vacaciones_Empresas Se ha Eliminado");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region Layouts
|
||||
|
||||
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||
{
|
||||
RBLModalBancosLayout.SelectedValue = "1";
|
||||
DdlModalBancosLayout.SelectedValueExist("-1");
|
||||
this.RegistraScript("$('#ModalLayoutBancos').modal('show');");
|
||||
UpModalBancosLayout.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void RBLModalBancosLayout_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(RBLModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionnomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CrearLayoutNominaBancomer(objnom.DtResultados);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else if (RBLModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
if(DdlModalBancosLayout.SelectedValue.ToEntero() == 1 )
|
||||
{
|
||||
|
||||
}
|
||||
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
//Banorte
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CrearLayoutNominaBancomer(DataTable DTNomina)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
bool ErroresValidaciones = false;
|
||||
|
||||
|
||||
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||
|
||||
|
||||
|
||||
if (RFC.Trim().Length == 0)
|
||||
SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>");
|
||||
|
||||
System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/");
|
||||
if (!Coincidencia.Success)
|
||||
{
|
||||
SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>");
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
if (BancoNumCuenta.Trim().Length != 10)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>"); // Bancomer 10 caracteres
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
|
||||
if (Importe <= 0)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
}
|
||||
|
||||
ErroresValidaciones = false;
|
||||
|
||||
if (!ErroresValidaciones)
|
||||
{
|
||||
int Count = 1;
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
StringBuilder SbLinea = new StringBuilder();
|
||||
|
||||
string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2);
|
||||
|
||||
SbLinea.Append(Count.ToString("000000000"));
|
||||
SbLinea.Append(RFC.Trim().PadRight(16));
|
||||
SbLinea.Append("03");
|
||||
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20));
|
||||
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||
|
||||
|
||||
if (Nombre.Trim().Length > 40)
|
||||
Nombre = Nombre.Substring(0, 40);
|
||||
|
||||
SbLinea.Append(Nombre.Trim().PadRight(40));
|
||||
|
||||
SbLinea.Append("012");
|
||||
SbLinea.Append("000");
|
||||
|
||||
sb.AppendLine(SbLinea.ToString());
|
||||
|
||||
|
||||
Count = Count + 1;
|
||||
}
|
||||
|
||||
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
Response.AppendHeader("Content-Length", sb.ToString());
|
||||
Response.ContentType = "text/plain";
|
||||
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||
Response.Write(sb.ToString());
|
||||
this.RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||
Response.Flush();
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CrearLayoutAltaBanorte(DataTable DTNomina, string Promotor, string NIE, string RazonSocial)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
bool ErrorProceso = false;
|
||||
|
||||
|
||||
|
||||
Promotor = Promotor.Trim();
|
||||
NIE = NIE.Trim();
|
||||
RazonSocial = RazonSocial.Trim();
|
||||
|
||||
//SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||
|
||||
|
||||
|
||||
if (DTNomina.Rows.Count > 0)
|
||||
{
|
||||
|
||||
//Tip oRegistro 1 1-1
|
||||
//Clave servicio 2 2-3
|
||||
sb.Append($"HNE");
|
||||
|
||||
|
||||
//Promotor 8 4-11
|
||||
if (Promotor.Length > 0 && Promotor.Length <= 8)
|
||||
{
|
||||
sb.Append(Promotor.PadLeft(8, '0'));
|
||||
}
|
||||
else
|
||||
{
|
||||
SbErrores.AppendLine($"Promotor {Promotor} debe de tener una logitud de entre 1 y 8<br/>");
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
//NIE 5 12-26
|
||||
if (ErrorProceso == false && NIE.Length > 0 && NIE.Length <= 5)
|
||||
{
|
||||
sb.Append(NIE.PadLeft(5, ' '));
|
||||
}
|
||||
else
|
||||
{
|
||||
SbErrores.AppendLine($"NIE {NIE} debe de tener una NIE de entre 1 y 8<br/>");
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
|
||||
//Nombre de Empresa ó Razón Social 40 17-56
|
||||
if (ErrorProceso == false && RazonSocial.Length > 0 && RazonSocial.Length <= 40)
|
||||
{
|
||||
sb.Append(RazonSocial.PadLeft(40, ' '));
|
||||
}
|
||||
else
|
||||
{
|
||||
SbErrores.AppendLine($"RazonSocial {RazonSocial} debe de tener una NIE de entre 1 y 40<br/>");
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
//57-58consecutivo 1
|
||||
sb.Append("1");
|
||||
|
||||
|
||||
//Número de registros N 6 59-64
|
||||
sb.Append(DTNomina.Rows.ToString().PadRight(6, ' '));
|
||||
|
||||
//Filler A 283 65-347
|
||||
sb.Append(DTNomina.Rows.ToString().PadLeft(283, ' '));
|
||||
|
||||
|
||||
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
|
||||
|
||||
string CodigoEmpleado = dRow["CodigoEmpleado"].ToString().Trim();
|
||||
|
||||
//Tipo de registro A 1 1-1
|
||||
sb.AppendLine("D");
|
||||
|
||||
|
||||
//CodigoEmpleado A 10 2-11
|
||||
if (ErrorProceso == false && CodigoEmpleado.Length > 0 && CodigoEmpleado.Trim().Length <= 10)
|
||||
{
|
||||
sb.Append(CodigoEmpleado.PadLeft(10, '0'));
|
||||
}
|
||||
else
|
||||
{
|
||||
SbErrores.AppendLine($"RazonSocial {RazonSocial} debe de tener una NIE de entre 1 y 40<br/>");
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user