Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -99,10 +99,17 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server"
|
||||
DataKeyNames="CveEntregaAlmacen,Estatus,CveCliente,CveDireccionOrigen,CveDireccionDestino,CveCamion,CveChofer,FechaEntrega,CveAlmacen"
|
||||
DataKeyNames="CveEntregaAlmacen,Estatus,CveCliente,CveDireccionOrigen,CveDireccionDestino,CveCamion,CveChofer,FechaEntrega,CveAlmacen,Tipo,AplicaCP,RFCReceptor,RFCEmisor"
|
||||
AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con los filtros especificados" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" GridLines="None"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Tipo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtTipo" runat="server" Text='<%# Eval("TipoDescripcion") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
|
||||
|
||||
@@ -351,6 +351,79 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
protected void LnkCancelaTimbre_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
return;
|
||||
bool ProcesoOK = false;
|
||||
LinkButton LnkCancelarFolioFiscal = (LinkButton)sender;
|
||||
GridViewRow GvRow = (GridViewRow)LnkCancelarFolioFiscal.BindingContainer;
|
||||
|
||||
int CveTimbre = GvRow.DataKey("CveTimbre").ToEntero();
|
||||
string FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString();
|
||||
string RFCReceptor = GvRow.DataKey("RFCReceptor").ToString();
|
||||
string RFCEmisor = GvRow.DataKey("RFCEmisor").ToString();
|
||||
|
||||
int CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero();
|
||||
bool AplicaCP = bool.Parse( GvRow.DataKey("AplicaCP") );
|
||||
|
||||
|
||||
Timbrado ObjCancelacion = new Timbrado();
|
||||
ClsGenerales ObjGenrales = new ClsGenerales();
|
||||
|
||||
if (EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptor))
|
||||
{
|
||||
if (ObjGenrales.UpdateGralTimbre(CveTimbre, "-1", "-1", -1, "-1", new DateTime(1900, 01, 01), UsuarioActual.CveEmpresa, UsuarioActual.CveEmpresa, 2, -1, CvePACCancelacion, DateTime.Now, AplicaCP,"-1")){
|
||||
ProcesoOK = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptor, RFCEmisor, CvePACCancelacion)) {
|
||||
|
||||
|
||||
if(ObjGenrales.UpdateGralTimbre(CveTimbre,"-1","-1",-1,"-1",new DateTime(1900,01,01),UsuarioActual.CveEmpresa,UsuarioActual.CveEmpresa,2,-1, CvePACCancelacion,DateTime.Now, AplicaCP,SelloCancelacion: ObjCancelacion.CancelacionAcuse)){
|
||||
|
||||
}
|
||||
|
||||
Alert("El complemento se cancelo correctamente.");
|
||||
ProcesoOK = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Se presento un error al cancelar el Folio Fiscal", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ObjGenrales.Dispose();
|
||||
|
||||
if (ProcesoOK)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public bool EstatusSATCancelado(string FolioFiscal, string RFCDe, string RFCReceptor)
|
||||
{
|
||||
bool respuesta = false;
|
||||
var Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", true);
|
||||
if (Vigencia is object)
|
||||
{
|
||||
if (Vigencia.Estado.ToUpper() == "CANCELADO")
|
||||
{
|
||||
respuesta = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
respuesta = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
respuesta = false;
|
||||
}
|
||||
|
||||
return respuesta;
|
||||
}
|
||||
|
||||
|
||||
@@ -412,6 +485,19 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
||||
|
||||
LnkCancelaTimbre.Visible = true;
|
||||
|
||||
|
||||
|
||||
switch (e.Row.DataKey("Tipo"))
|
||||
{
|
||||
case "E":
|
||||
e.Row.FCLabel("LtTipo").CssClass = "label label-sm label-success";
|
||||
break;
|
||||
default:
|
||||
e.Row.FCLabel("LtTipo").CssClass = "label label-sm label-warning";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2053,6 +2053,7 @@ Partial Class General_SaldosIniciales
|
||||
ObjRH.IniciaTransacSQL()
|
||||
Dim ErrorRH As Boolean = False
|
||||
Dim Contador As Integer = 0
|
||||
Dim ContadorAgregados As Integer = 0
|
||||
Dim NumRow As Integer = 0
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
@@ -2095,6 +2096,12 @@ Partial Class General_SaldosIniciales
|
||||
Dim MetodoPago As String = Row("Metodo Pago").ToString
|
||||
Dim Nominista As String = Row("Nominista").ToString
|
||||
|
||||
Dim NombreCompleto As String = $"{Nombre} {ApellidoPaterno} {ApellidoMaterno}"
|
||||
|
||||
If NombreCompleto.Trim.Replace(" ", "") = String.Empty Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
'CLAVES
|
||||
Dim CveGenero As Integer = 0
|
||||
Dim CveEstadoCivil As Integer = 0
|
||||
@@ -2152,7 +2159,7 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
|
||||
myarraystr = TipoContrato.Split(":"c)
|
||||
If (myarraystr.Length > 0) Then
|
||||
If (myarraystr.Length > 1) Then
|
||||
CveTipoContrato = myarraystr(0).ToEntero()
|
||||
Else
|
||||
CveTipoContrato = GlobalDTTiposContrato().FiltroPrimeroValor("CveTipoContrato", $"TipoContrato = '{TipoContrato}'").ToString.ToEntero
|
||||
@@ -2215,7 +2222,12 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
'VALIDACIONES
|
||||
' If Not CveSucursal > 0 Then Alert("La Empresa no cuenta con Sucursal, es necesario dar una Sucursal de alta.", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
If Not CveDepartamento > 0 Then Alert($"No se encontró el Departamento: {Departamento} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
If Not CveDepartamento > 0 Then
|
||||
Alert($"No se encontró el Departamento: {Departamento} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia)
|
||||
ErrorRH = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not CvePuesto > 0 Then Alert($"No se encontró el Puesto: {Puesto} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
If Not CveTurno > 0 Then Alert($"No se encontró el turno: {Turno} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
If Not CveEstado > 0 Then Alert($"No se encontró el Estado: {Estado} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
@@ -2226,7 +2238,7 @@ Partial Class General_SaldosIniciales
|
||||
If Not CveUsuarioNomina > 0 Then CveUsuarioNomina = -1 'Alert("No se encontró el Nominista: " + Nominista + " Renglón: " + NumRow, TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
|
||||
|
||||
Dim NombreCompleto As String = $"{Nombre} {ApellidoPaterno} {ApellidoMaterno}"
|
||||
|
||||
Dim CvePersonal As Integer = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePersonal", $"NombreCompletoNombre = '{NombreCompleto}'").ToString.ToEntero()
|
||||
|
||||
|
||||
@@ -2280,6 +2292,8 @@ Partial Class General_SaldosIniciales
|
||||
ClabeInterbancaria, "", CveJornada, CveJornada, "", -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveUsuarioNomina) Then
|
||||
ErrorRH = True
|
||||
Exit For
|
||||
Else
|
||||
ContadorAgregados = ContadorAgregados + 1
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2289,7 +2303,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If Not ErrorRH Then
|
||||
If Contador > 0 Then
|
||||
Alert(String.Format("Se agregaron: <b>{0}</b> Empleados correctamente. <br>Se Omitieron: <b>{1}</b> Empleados ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
|
||||
Alert(String.Format("Se agregaron: <b>{0}</b> Empleados correctamente. <br>Se Omitieron: <b>{1}</b> Empleados ya que ya se encontraban registrados.", ContadorAgregados, Contador), TipoMensaje.MsgInformacion)
|
||||
ObjRH.Commit()
|
||||
TxtExcel.Text = ""
|
||||
UpDatos.Update()
|
||||
|
||||
Reference in New Issue
Block a user