Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -174,6 +174,16 @@ Public Class Timbres
|
|||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
|
||||||
|
|
||||||
|
If drT("ClaveTipoRemolque1").ToString <> "" Then
|
||||||
|
Dim Rem1 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque1"), .Placa = drT("PlacaRemolque1")}
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem1)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If drT("ClaveTipoRemolque2").ToString <> "" Then
|
||||||
|
Dim Rem2 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque2"), .Placa = drT("PlacaRemolque2")}
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
||||||
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
|
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
|
||||||
|
|||||||
@@ -49,9 +49,11 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkEliminar" runat="server" Visible="false" OnClientClick="return confirm('¿Está seguro de eliminar el documento?');" Style="color: #686868;"><i class="fa fa-minus" style="color: #686868;"></i> Eliminar Movimiento</asp:LinkButton>
|
<asp:LinkButton ID="LnkEliminar" runat="server" Visible="false" OnClientClick="return confirm('¿Está seguro de eliminar el documento?');" Style="color: #686868;"><i class="fa fa-minus" style="color: #686868;"></i> Eliminar Movimiento</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
|
<%--<li>
|
||||||
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
||||||
</li>
|
</li>--%>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-btn-ok-label="si" Style="color: #686868;" data-toggle="tooltip" data-placement="left" title="Cancelar Movimiento y Complemento" > <i class="fa fa-pencil"></i> Cancelar Movimiento y Complemento</asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-btn-ok-label="si" Style="color: #686868;" data-toggle="tooltip" data-placement="left" title="Cancelar Movimiento y Complemento" > <i class="fa fa-pencil"></i> Cancelar Movimiento y Complemento</asp:LinkButton>
|
||||||
|
|
||||||
@@ -1215,29 +1217,30 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaCancelacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaCancelacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:CheckBox ID="ChkGeneraCancelacion" CssClass="md-checksd2" Text="Genera Devolución" TextAlign="Right" runat="server" AutoPostBack="true" OnCheckedChanged="ChkGeneraCancelacion_CheckedChanged" />
|
<asp:CheckBox ID="ChkGeneraCancelacion" CssClass="md-checksd2" Text="Genera Devolución" TextAlign="Right" runat="server" AutoPostBack="true" OnCheckedChanged="ChkGeneraCancelacion_CheckedChanged" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" id="DVTipoTransacciónCancelar" runat="server" visible ="false">
|
<div class="col-md-12" id="DVTipoTransacciónCancelar" runat="server" visible="false">
|
||||||
|
Movimiento:
|
||||||
Movimiento:
|
<asp:DropDownList ID="DdlTipoTransaccionCancelacion" CssClass="form-control input-sm select2me" runat="server" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpCancelarIE">
|
||||||
<asp:DropDownList ID="DdlTipoTransaccionCancelacion" CssClass="form-control input-sm select2me" runat="server" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpCancelarIE">
|
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
</asp:DropDownList>
|
||||||
</asp:DropDownList>
|
<asp:RequiredFieldValidator ID="RFVDdlTipoTransaccionCancelacion" runat="server" ControlToValidate="DdlTipoTransaccionCancelacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Transaccion''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCancelarIE"></asp:RequiredFieldValidator>
|
||||||
<asp:RequiredFieldValidator ID="RFVDdlTipoTransaccionCancelacion" runat="server" ControlToValidate="DdlTipoTransaccionCancelacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Transaccion''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCancelarIE"></asp:RequiredFieldValidator>
|
<ajax:ValidatorCalloutExtender ID="VCEDdlTipoTransaccionCancelacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoTransaccionCancelacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEDdlTipoTransaccionCancelacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoTransaccionCancelacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:Button ID="BtnCancelarIE" OnClick="BtnCancelarIE_Click" runat="server" CssClass="btn btn-success" Text="Cancelar Movimiento" ValidationGroup="GrpCancelarIE" />
|
<asp:Button ID="BtnCancelarIE" OnClick="BtnCancelarIE_Click" runat="server" CssClass="btn btn-success" Text="Cancelar Movimiento" ValidationGroup="GrpCancelarIE" />
|
||||||
@@ -1367,6 +1370,12 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Visible ="false">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Cancelar" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
<asp:TemplateField HeaderText="Cancelar" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -1574,6 +1583,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row" runat="server" id="DVmotivoCancelacion" visible="false">
|
||||||
|
<div class="col-md-2">
|
||||||
|
Motivo de Cancelación:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-10">
|
||||||
|
|
||||||
|
|
||||||
|
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Width="100%" >
|
||||||
|
</asp:DropDownList>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlMotivoCancelacion" runat="server" ControlToValidate="DdlMotivoCancelacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo de Cancelación''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCancelarComplemento"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCERfvDdlMotivoCancelacion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlMotivoCancelacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -837,6 +837,13 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DdlMotivoCancelacion.DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa)
|
||||||
|
DdlMotivoCancelacion.DataBind()
|
||||||
|
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1096,7 +1103,7 @@ Partial Class Bancos_IE
|
|||||||
HplDepositado.NavigateUrl = $"/Bancos/IE.aspx?CveIE={CveIEDeposito2}"
|
HplDepositado.NavigateUrl = $"/Bancos/IE.aspx?CveIE={CveIEDeposito2}"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
LnkCancelarComplemento.Visible = False
|
'LnkCancelarComplemento.Visible = False
|
||||||
LnkCancelarComplementoImporte.Visible = False
|
LnkCancelarComplementoImporte.Visible = False
|
||||||
UppEliminarIE.Update()
|
UppEliminarIE.Update()
|
||||||
|
|
||||||
@@ -1267,7 +1274,7 @@ Partial Class Bancos_IE
|
|||||||
LnkEliminar.Visible = False
|
LnkEliminar.Visible = False
|
||||||
'LnkCancelar.Visible = False
|
'LnkCancelar.Visible = False
|
||||||
|
|
||||||
LnkCancelarComplemento.Visible = True
|
'LnkCancelarComplemento.Visible = True
|
||||||
LnkCancelarComplementoImporte.Visible = True
|
LnkCancelarComplementoImporte.Visible = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -1275,7 +1282,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
BtnEditar.Visible = False
|
BtnEditar.Visible = False
|
||||||
LnkCancelarComplemento.Visible = False
|
' LnkCancelarComplemento.Visible = False
|
||||||
LnkCancelarComplementoImporte.Visible = False
|
LnkCancelarComplementoImporte.Visible = False
|
||||||
DVGenerarComplementoModal.Visible = False
|
DVGenerarComplementoModal.Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -4587,22 +4594,23 @@ Partial Class Bancos_IE
|
|||||||
Dim ErrorCancelarComplemento As Boolean = True
|
Dim ErrorCancelarComplemento As Boolean = True
|
||||||
|
|
||||||
If CancelarComplemento Then
|
If CancelarComplemento Then
|
||||||
Dim ObjCancelacion As New Timbrado
|
|
||||||
'Dim ObjBanco As New ClsBancos
|
|
||||||
|
|
||||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
|
||||||
|
|
||||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
Dim CveMotivoCancelacion As Integer = DdlMotivoCancelacion.SelectedValue.ToEntero
|
||||||
CargaComplementosPago()
|
Dim CveSATMotivoCancelacion As Integer = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveMotivoCancelacion:=CveMotivoCancelacion).FiltroPrimeroValor("CveSATMotivoCancelacion").ToEntero()
|
||||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
|
||||||
ErrorCancelarComplemento = False
|
|
||||||
Alert("El complemento se cancelo correctamente.")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
If CveMotivoCancelacion <= 0 Or CveSATMotivoCancelacion <= 0 Then
|
||||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
|
Alert("Debe de elegir un motivo de cancelación.", TipoMensaje.MsgAdvertencia)
|
||||||
|
ErrorCancelarComplemento = True
|
||||||
|
End If
|
||||||
|
|
||||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
|
||||||
|
If Not ErrorCancelarComplemento Then
|
||||||
|
|
||||||
|
Dim ObjCancelacion As New Timbrado
|
||||||
|
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||||
|
|
||||||
|
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
||||||
CargaComplementosPago()
|
CargaComplementosPago()
|
||||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||||
ErrorCancelarComplemento = False
|
ErrorCancelarComplemento = False
|
||||||
@@ -4610,12 +4618,25 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
|
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||||
End If
|
|
||||||
|
|
||||||
|
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
||||||
|
CargaComplementosPago()
|
||||||
|
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||||
|
ErrorCancelarComplemento = False
|
||||||
|
Alert("El complemento se cancelo correctamente.")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorCancelarComplemento = False
|
ErrorCancelarComplemento = False
|
||||||
End If
|
End If
|
||||||
@@ -5804,11 +5825,9 @@ Partial Class Bancos_IE
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " COMPLEMENTOS PAGO "
|
#Region " COMPLEMENTOS PAGO "
|
||||||
|
|
||||||
Private Sub CargaComplementosPago()
|
Private Sub CargaComplementosPago()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.CveRol = 1 Then
|
||||||
@@ -5823,9 +5842,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
||||||
|
|
||||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then
|
|
||||||
DVGenerarComplementoModal.Visible = True
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
GvComplementoPagos.DataSource = Nothing
|
GvComplementoPagos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -5833,6 +5850,14 @@ Partial Class Bancos_IE
|
|||||||
If CveIE > 0 Then
|
If CveIE > 0 Then
|
||||||
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
||||||
|
DVGenerarComplementoModal.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 1 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
||||||
|
DVmotivoCancelacion.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
|
' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
|
||||||
|
|
||||||
@@ -5844,11 +5869,14 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
GvComplementoPagos.DataBind()
|
GvComplementoPagos.DataBind()
|
||||||
UpComplementoPagos.Update()
|
UpComplementoPagos.Update()
|
||||||
|
|
||||||
|
|
||||||
|
UpEliminarCotizacion.Update() 'Esto se ocupa para mostrar DVmotivoCancelacion
|
||||||
|
|
||||||
'ObjBancos.Dispose()
|
'ObjBancos.Dispose()
|
||||||
'GvComplementoPagos.DataBind()
|
'GvComplementoPagos.DataBind()
|
||||||
'UpComplementoPagos.Update()
|
'UpComplementoPagos.Update()
|
||||||
@@ -5863,9 +5891,16 @@ Partial Class Bancos_IE
|
|||||||
e.Row.Cells(4).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
e.Row.Cells(4).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
||||||
|
|
||||||
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
|
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
|
||||||
|
|
||||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True
|
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True
|
||||||
|
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = True
|
||||||
|
e.Row.FCDropDownList("DdlMotivoCancelacion").DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa)
|
||||||
|
e.Row.FCDropDownList("DdlMotivoCancelacion").DataBind()
|
||||||
|
e.Row.FCDropDownList("DdlMotivoCancelacion").Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False
|
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False
|
||||||
|
e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf e.Row.DataKey("Tipo") = "Egs" Then
|
ElseIf e.Row.DataKey("Tipo") = "Egs" Then
|
||||||
@@ -5876,6 +5911,7 @@ Partial Class Bancos_IE
|
|||||||
GvComplementoPagos.Columns(6).Visible = False
|
GvComplementoPagos.Columns(6).Visible = False
|
||||||
GvComplementoPagos.Columns(7).Visible = False
|
GvComplementoPagos.Columns(7).Visible = False
|
||||||
GvComplementoPagos.Columns(8).Visible = False
|
GvComplementoPagos.Columns(8).Visible = False
|
||||||
|
GvComplementoPagos.Columns(9).Visible = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -5950,13 +5986,13 @@ Partial Class Bancos_IE
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Protected Sub LnkCancelarComplemento_Click(sender As Object, e As EventArgs)
|
'Protected Sub LnkCancelarComplemento_Click(sender As Object, e As EventArgs)
|
||||||
If ChkConciliado.Checked Then
|
' If ChkConciliado.Checked Then
|
||||||
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
|
' Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
Confirmacion("¿Seguro que desea Cancelar el documento por Sustitución?", "", String.Format("document.location.href=""/Ventas/ClientesAbonar.aspx?CveIESustitucion={0}&CveCliente={1}&CveMoneda={2}""", CveIE, CveCliente, CveMoneda), "")
|
' Confirmacion("¿Seguro que desea Cancelar el documento por Sustitución?", "", String.Format("document.location.href=""/Ventas/ClientesAbonar.aspx?CveIESustitucion={0}&CveCliente={1}&CveMoneda={2}""", CveIE, CveCliente, CveMoneda), "")
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -6126,6 +6162,9 @@ Partial Class Bancos_IE
|
|||||||
CalendarioCancelacion.StartDate = fechaCancelacion.ToDate
|
CalendarioCancelacion.StartDate = fechaCancelacion.ToDate
|
||||||
UpEliminarCotizacion.Update()
|
UpEliminarCotizacion.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RegistraScript("ShowDivCancelarIE();")
|
RegistraScript("ShowDivCancelarIE();")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnDesconciliar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnDesconciliar_Click(sender As Object, e As EventArgs)
|
||||||
@@ -6605,6 +6644,16 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim CveMotivoCancelacion As Integer = GvRow.FCDropDownList("DdlMotivoCancelacion").SelectedValue.ToEntero
|
||||||
|
Dim CveSATMotivoCancelacion As Integer = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveMotivoCancelacion:=CveMotivoCancelacion).FiltroPrimeroValor("CveSATMotivoCancelacion").ToEntero()
|
||||||
|
|
||||||
|
If CveMotivoCancelacion <= 0 Or CveSATMotivoCancelacion <= 0 Then
|
||||||
|
Alert("Debe de elegir un motivo de cancelación.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
CveComplementoPagoCancelar = GvRow.DataKey("CveComplementoPago").ToEntero
|
CveComplementoPagoCancelar = GvRow.DataKey("CveComplementoPago").ToEntero
|
||||||
FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString
|
FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString
|
||||||
'' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
'' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||||
@@ -6622,7 +6671,7 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Dim CveSATMotivoCancelacion As Integer = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion:=2).FiltroPrimeroValor("CveSATMotivoCancelacion").ToEntero()
|
|
||||||
|
|
||||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||||
|
|
||||||
@@ -6681,6 +6730,8 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
RegistraScript("$('#ModalCancelarComplemetno').modal('show');")
|
RegistraScript("$('#ModalCancelarComplemetno').modal('show');")
|
||||||
DivFechaCancelación.Visible = True
|
DivFechaCancelación.Visible = True
|
||||||
|
CargaComplementosPago()
|
||||||
|
|
||||||
UpModalCancelarComplemetno.Update()
|
UpModalCancelarComplemetno.Update()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="5%" />
|
<ItemStyle Width="5%" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField Visible="true">
|
<asp:TemplateField Visible="false">
|
||||||
<HeaderTemplate>Cancelar SAT</HeaderTemplate>
|
<HeaderTemplate>Cancelar SAT</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkCancelarFolioFiscal" OnClick="LnkCancelaFolioFiscal" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" Visible="false" />
|
<asp:LinkButton ID="LnkCancelarFolioFiscal" OnClick="LnkCancelaFolioFiscal" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" Visible="false" />
|
||||||
@@ -189,49 +189,7 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div id="ModalDivMail" class="modal ADS fade" role="dialog">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
|
|
||||||
<!-- Modal content-->
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<h4 class="modal-title">Correo</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<asp:UpdatePanel ID="UpSendMail" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:HiddenField ID="HdnSerieFolioPago" runat="server" ClientIDMode="Static" Value="-1" />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-4">Para:</div>
|
|
||||||
<div class="col-xs-8">
|
|
||||||
<asp:TextBox ID="TxtParaMail" runat="server" Width="370px" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-4">
|
|
||||||
Con copia para:<br />
|
|
||||||
(Separar con: ;)
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-8">
|
|
||||||
<asp:TextBox ID="TxtCC" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:Button ID="BtnSendMail" Text="Enviar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" ValidationGroup="GrpEnviarEmail" />
|
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -150,9 +150,9 @@ Partial Class Bancos_RepComplementoPago
|
|||||||
e.Row.FCHyperLink("HplPDF").Visible = True : e.Row.FCHyperLink("HplPDF").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=pdf&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
e.Row.FCHyperLink("HplPDF").Visible = True : e.Row.FCHyperLink("HplPDF").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=pdf&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||||
e.Row.FCLinkButton("LnkSendMail").Visible = True
|
e.Row.FCLinkButton("LnkSendMail").Visible = True
|
||||||
|
|
||||||
If DdlOpcion.SelectedValue.ToEntero = 2 Then
|
'If DdlOpcion.SelectedValue.ToEntero = 2 Then
|
||||||
e.Row.FCLinkButton("LnkCancelarFolioFiscal").Visible = True
|
' e.Row.FCLinkButton("LnkCancelarFolioFiscal").Visible = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -529,7 +529,11 @@ Partial Class Bancos_RepComplementoPago
|
|||||||
|
|
||||||
|
|
||||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -207,7 +207,7 @@
|
|||||||
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:HyperLinkField HeaderText="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataTextField="RazonSocial" ControlStyle-CssClass="truncate2" />
|
<asp:HyperLinkField HeaderText="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataTextField="RazonSocial" ControlStyle-CssClass="truncate2" />
|
||||||
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="F.Compra" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
|
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
|
||||||
<asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="T.C.P." DataField="TipoCambioPago" DataFormatString="{0:##.####}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="T.C.P." DataField="TipoCambioPago" DataFormatString="{0:##.####}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="F.Compra" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
|
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
|
||||||
|
|
||||||
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|||||||
@@ -41,12 +41,14 @@ Partial Class General_CatCategorias
|
|||||||
If ObjCategorias.AddCategorias(TxtCategoria.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjCategorias.AddCategorias(TxtCategoria.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
TxtCategoria.Text = ""
|
TxtCategoria.Text = ""
|
||||||
Alert("El nueva Categoría se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nueva Categoría se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
GlobalDTGralCategorias(UsuarioActual.CveEmpresa) = Nothing
|
||||||
End If
|
End If
|
||||||
ElseIf HdnModalidadCategoria.Value = "U" Then
|
ElseIf HdnModalidadCategoria.Value = "U" Then
|
||||||
If ObjCategorias.UpdateCategoria(TxtCategoria.Text.Trim, ChkEstatus.Checked, HdnIDCategoria.Value.ToEntero) Then
|
If ObjCategorias.UpdateCategoria(TxtCategoria.Text.Trim, ChkEstatus.Checked, HdnIDCategoria.Value.ToEntero) Then
|
||||||
TxtCategoria.Text = ""
|
TxtCategoria.Text = ""
|
||||||
ChkEstatus.Checked = True
|
ChkEstatus.Checked = True
|
||||||
Alert("La Categoría se actualizó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La Categoría se actualizó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
GlobalDTGralCategorias(UsuarioActual.CveEmpresa) = Nothing
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#RecepcionAlmacen"> </a>
|
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#RecepcionAlmacen"> </a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Excel</asp:HyperLink>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
Recepción Almacén
|
Recepción Almacén
|
||||||
@@ -1087,6 +1090,74 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="DivCargaExcel" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<asp:UpdatePanel ID="UpConcepto" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Cargar Conceptos</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="portlet light xspadding bordered whitoutcol" style="width: 100%;">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Cargar Plantilla </span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body formnombottom">
|
||||||
|
|
||||||
|
<%-- <div class="row">
|
||||||
|
<div class="col-md-12" align="center">
|
||||||
|
<h4>Arraste o haga click para subir el archivo Excel</h4>
|
||||||
|
</div>
|
||||||
|
</div>--%>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 20px;">
|
||||||
|
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2" style="text-align: left">
|
||||||
|
|
||||||
|
<asp:LinkButton ID="LbDescargarExcelConceptos" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-10" style="text-align: center">
|
||||||
|
<asp:Button ID="BtnCargaExcel" runat="server" CssClass="btn btn-success" Text="Procesar"></asp:Button>
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LbDescargarExcelConceptos" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|||||||
@@ -5,13 +5,12 @@ Imports Microsoft.Reporting.WebForms
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class Inventarios_RecepcionAlmacen
|
Partial Class Inventarios_RecepcionAlmacen
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "PROPIEDADES"
|
#Region "PROPIEDADES"
|
||||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
|
||||||
Private Property EstatusInicial As String
|
Private Property EstatusInicial As String
|
||||||
Get
|
Get
|
||||||
EstatusInicial = ViewState("EstatusInicial").ToString
|
EstatusInicial = ViewState("EstatusInicial").ToString
|
||||||
@@ -44,9 +43,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Else
|
Else
|
||||||
Return CType(ViewState("DtInv"), DataTable)
|
Return CType(ViewState("DtInv"), DataTable)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
ViewState("DtInv") = value
|
ViewState("DtInv") = value
|
||||||
@@ -988,11 +984,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
RecibidaCompleta = False
|
RecibidaCompleta = False
|
||||||
|
|
||||||
|
'' carga desde excel
|
||||||
|
' HplCargaExcel.Enabled = True
|
||||||
|
|
||||||
|
|
||||||
Dim CargaSoloUsados As Boolean = False
|
Dim CargaSoloUsados As Boolean = False
|
||||||
|
|
||||||
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
Dim DtRecepcion As DataTable = ObjInventario.DtResultados.Copy()
|
Dim DtRecepcion As DataTable = ObjInventario.DtResultados.Copy()
|
||||||
|
DtInv = DtRecepcion
|
||||||
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
|
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
|
||||||
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
|
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
|
||||||
Dim CveSubProyecto As Integer
|
Dim CveSubProyecto As Integer
|
||||||
@@ -4795,6 +4795,147 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "CargaExcel"
|
||||||
|
|
||||||
|
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 = AppDomain.CurrentDomain.BaseDirectory & file.path
|
||||||
|
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
||||||
|
CargarArchivoExcel(Directorio, file.filename)
|
||||||
|
Else
|
||||||
|
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub CargarArchivoExcel(Ruta As String, FileName As String)
|
||||||
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
|
||||||
|
Dim dt As DataTable = Nothing
|
||||||
|
Dim ErrorArchivo = False
|
||||||
|
|
||||||
|
Try
|
||||||
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
|
Catch ex As Exception
|
||||||
|
ErrorArchivo = True
|
||||||
|
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||||
|
|
||||||
|
If Not dt.Columns(0).ColumnName = "Cantidad" Then
|
||||||
|
Alert("El nombre de la primera columna debe ser 'Cantidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(1).ColumnName = "Código" Then
|
||||||
|
Alert("El nombre de la segunda columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(2).ColumnName = "Producto" Then
|
||||||
|
Alert("El nombre de la tercera columna debe ser 'Producto'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(3).ColumnName = "Serie" Then
|
||||||
|
Alert("El nombre de la cuarta columna debe ser 'Serie'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
'If Not dt.Columns(4).ColumnName = "Lote" Then
|
||||||
|
' Alert("El nombre de la cuarta columna debe ser 'Lote'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
' Exit Sub
|
||||||
|
'End If
|
||||||
|
'If Not dt.Columns(5).ColumnName = "FechaCaducidad" Then
|
||||||
|
' Alert("El nombre de la cuarta columna debe ser 'Fecha Caducidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
' Exit Sub
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
dt.TableName = "Datos"
|
||||||
|
Dim ProductosNoCargados As New StringBuilder()
|
||||||
|
Dim RowsCargados As Integer = 0
|
||||||
|
Dim RowsNoCargados As Integer = 0
|
||||||
|
Dim NoPSConSerie As Integer = 0
|
||||||
|
|
||||||
|
If CveCompraSurtir > 0 Then
|
||||||
|
'DtRecepcion
|
||||||
|
Try
|
||||||
|
'Dim DtPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa)
|
||||||
|
'If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString.ToDecimal, 4), 0)
|
||||||
|
For Each RowExcel As DataRow In dt.Rows
|
||||||
|
If RowExcel("Código").ToString() <> "" Then
|
||||||
|
|
||||||
|
Dim RowPS = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString()))
|
||||||
|
|
||||||
|
If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then
|
||||||
|
|
||||||
|
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
|
||||||
|
Dim CveUnidadMedida As Integer = RowPS("CveUM").ToString().ToEntero()
|
||||||
|
|
||||||
|
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
|
||||||
|
Dim Serie As String = RowExcel("Serie").ToString()
|
||||||
|
Dim Lote As String '= RowExcel("Lote").ToString()
|
||||||
|
Dim FechaCaducidad As Date '= If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
|
||||||
|
Dim Observaciones As String '= If(dt.Columns.Contains("Observaciones"), RowExcel("Observaciones").ToString, "").ToString
|
||||||
|
|
||||||
|
|
||||||
|
Dim Valido As Boolean = True
|
||||||
|
|
||||||
|
If RowPS("AplicaSerie").ToString() = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
|
||||||
|
Valido = False
|
||||||
|
Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia)
|
||||||
|
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then
|
||||||
|
NoPSConSerie = NoPSConSerie + 1
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Valido Then
|
||||||
|
CveConsecSerie = RowPS("Consec").ToString.ToEntero
|
||||||
|
AgregaSerie(RowExcel("Serie").ToString, 1)
|
||||||
|
|
||||||
|
'AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
|
||||||
|
RowsCargados = RowsCargados + 1
|
||||||
|
Else
|
||||||
|
RowsNoCargados = RowsNoCargados + 1
|
||||||
|
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
RowsNoCargados = RowsNoCargados + 1
|
||||||
|
ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al cargar los productos." & ProductosNoCargados.ToString(), ex)
|
||||||
|
Finally
|
||||||
|
|
||||||
|
Dim MensajeFinal As New StringBuilder()
|
||||||
|
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
|
||||||
|
MensajeFinal.Append("Los productos se cargaron correctamente. <br/><br/>")
|
||||||
|
End If
|
||||||
|
If RowsCargados > 0 Then
|
||||||
|
MensajeFinal.Append("Se cargaron <b>" & RowsCargados & "</b> productos correctamente.")
|
||||||
|
End If
|
||||||
|
If RowsNoCargados > 0 Then
|
||||||
|
MensajeFinal.Append("No se pudieron cargar <b>" & RowsNoCargados & "</b> productos. <br/>Los siguientes productos no se pudieron cargar: " & ProductosNoCargados.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Alert(MensajeFinal.ToString())
|
||||||
|
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
Alert("No hay seleccionada compra", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs)
|
'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
' Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
|
' Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
|
||||||
@@ -4899,31 +5040,5 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
'Private Function GuardaDocumentoBitacora(ObjEventoBitacora As ClsOIEventos, CveMovimiento As Integer) As Boolean
|
|
||||||
' Dim Retorno = True
|
|
||||||
' Dim Archivo As System.IO.FileInfo = Nothing
|
|
||||||
|
|
||||||
' For Each Dr As DataRow In DtDocumentos.Rows
|
|
||||||
' If ObjEventoBitacora.AddEventoBitacora("Documento Relacionado", Dr("FileExtension").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMovimientoAlmacen:=CveMovimiento) Then
|
|
||||||
' Try
|
|
||||||
' If Dr("Documento").ToString <> "" Then
|
|
||||||
' Archivo = New System.IO.FileInfo(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, Dr("Documento").ToString))
|
|
||||||
' If Archivo.Exists() Then
|
|
||||||
' File.Move(Archivo.ToString, String.Format("{0}OI\OI{1}{2}", UsuarioActual.Empresa.Ruta, ObjEventoBitacora.CveEvento.ToString, Archivo.Extension))
|
|
||||||
' Else
|
|
||||||
' Retorno = False
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Catch ex As Exception
|
|
||||||
' Retorno = False
|
|
||||||
' Exit For
|
|
||||||
' End Try
|
|
||||||
' Else
|
|
||||||
' Retorno = False
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' Return Retorno
|
|
||||||
'End Function
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1 truncate">Proveedor</div>
|
<div class="col-md-1 truncate">Proveedor</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveProveedor" DataTextField="RazonSocial"></asp:DropDownList>
|
<ADS:DropDownLost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" data-metodo="getproveedores" CssClassDdl="select2me " Width="100%" DataValueField="CveProveedor" DataTextField="RazonSocial"></ADS:DropDownLost>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">Categoría</div>
|
<div class="col-md-1 truncate">Categoría</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
@@ -240,6 +240,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField Visible="false" DataField="CantidadPendienteSurtir" HeaderText="Pte Surtir" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"/>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Inicial">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Inicial">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSaldoI2" runat="server" Text='<%# If(Eval("SaldoIniImp").ToString() = "0", "-", Eval("SaldoIniImp", "{0:N2}")) %>'></asp:Label>
|
<asp:Label ID="lbSaldoI2" runat="server" Text='<%# If(Eval("SaldoIniImp").ToString() = "0", "-", Eval("SaldoIniImp", "{0:N2}")) %>'></asp:Label>
|
||||||
|
|||||||
@@ -94,11 +94,15 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
|
|
||||||
dvImp.Visible = TienePermisoImportes
|
dvImp.Visible = TienePermisoImportes
|
||||||
GvM.Columns(10).Visible = TienePermisoImportes
|
|
||||||
GvM.Columns(11).Visible = TienePermisoImportes
|
GvM.Columns(11).Visible = TienePermisoImportes
|
||||||
GvM.Columns(12).Visible = TienePermisoImportes
|
GvM.Columns(12).Visible = TienePermisoImportes
|
||||||
GvM.Columns(13).Visible = TienePermisoImportes
|
GvM.Columns(13).Visible = TienePermisoImportes
|
||||||
GvM.Columns(14).Visible = TienePermisoImportes
|
GvM.Columns(14).Visible = TienePermisoImportes
|
||||||
|
GvM.Columns(15).Visible = TienePermisoImportes
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
GvM.Columns(10).Visible = TienePermisoImportes
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
@@ -126,9 +130,9 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
DdlMoneda.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlMoneda.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
'Llenar dropdownlist de proveedores
|
'Llenar dropdownlist de proveedores
|
||||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
DdlProveedor.DataBind()
|
'DdlProveedor.DataBind()
|
||||||
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
'DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
'CARGA CLASIFICACIONES
|
'CARGA CLASIFICACIONES
|
||||||
Dim ObjClasificaciones As New ClsClasificaciones
|
Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
@@ -139,7 +143,6 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
|
||||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||||
DdlCategoria.DataBind()
|
DdlCategoria.DataBind()
|
||||||
|
|
||||||
@@ -148,6 +151,9 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
|
|
||||||
'Carga Productos
|
'Carga Productos
|
||||||
DdlPS.setEsWebService(True)
|
DdlPS.setEsWebService(True)
|
||||||
|
DdlProveedor.setEsWebService(True)
|
||||||
|
DdlProveedor.SelectedText = ""
|
||||||
|
DdlProveedor.SelectedValue = "-1"
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||||
@@ -160,7 +166,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
' DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
' DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
DdlMovs.SelectedValue = "2"
|
DdlMovs.SelectedValue = "3"
|
||||||
|
|
||||||
'Llenar dropdownlist de personal
|
'Llenar dropdownlist de personal
|
||||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||||
@@ -179,7 +185,6 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
|
|
||||||
CargarMarcas()
|
CargarMarcas()
|
||||||
|
|
||||||
|
|
||||||
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
|
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
|
||||||
DdlTipoAlmacen.DataBind()
|
DdlTipoAlmacen.DataBind()
|
||||||
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
@@ -187,7 +192,8 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
CargaClasificaciones()
|
CargaClasificaciones(DdlCategoria.SelectedValue.ToEntero)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaClasificaciones(CveCategoria As Integer)
|
Private Sub CargaClasificaciones(CveCategoria As Integer)
|
||||||
@@ -354,7 +360,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
Dim TipoMov = If(DdlTipoMovimiento.SelectedValue = "-1", "", $" <b>Tipo Movimiento:</b> {DdlTipoMovimiento.SelectedItem.Text}")
|
Dim TipoMov = If(DdlTipoMovimiento.SelectedValue = "-1", "", $" <b>Tipo Movimiento:</b> {DdlTipoMovimiento.SelectedItem.Text}")
|
||||||
Dim Moneda = If(DdlMoneda.SelectedValue = "-1", "", $" <b>Moneda:</b> {DdlMoneda.SelectedItem.Text}")
|
Dim Moneda = If(DdlMoneda.SelectedValue = "-1", "", $" <b>Moneda:</b> {DdlMoneda.SelectedItem.Text}")
|
||||||
Dim SoloConMov = If(DdlMovs.SelectedValue = "-1", "", $" <b>Solo Movimientos:</b> {DdlMovs.SelectedItem.Text}")
|
Dim SoloConMov = If(DdlMovs.SelectedValue = "-1", "", $" <b>Solo Movimientos:</b> {DdlMovs.SelectedItem.Text}")
|
||||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedItem.Text}")
|
Dim Proveedor = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||||
Dim Familia = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text}")
|
Dim Familia = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text}")
|
||||||
Dim SubFamilia = If(DdlSubFamilia.SelectedValue = "-1", "", $" <b>SubFamilia:</b> {DdlSubFamilia.SelectedItem.Text}")
|
Dim SubFamilia = If(DdlSubFamilia.SelectedValue = "-1", "", $" <b>SubFamilia:</b> {DdlSubFamilia.SelectedItem.Text}")
|
||||||
@@ -419,8 +425,8 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
GvM.Columns(3).Visible = ChkClasificacion2.Checked
|
GvM.Columns(3).Visible = ChkClasificacion2.Checked
|
||||||
GvM.Columns(5).Visible = ChkSeccionAlmacen.Checked
|
GvM.Columns(5).Visible = ChkSeccionAlmacen.Checked
|
||||||
|
|
||||||
GvM.Columns(15).Visible = ChkFechaUltimaCompra.Checked
|
GvM.Columns(16).Visible = ChkFechaUltimaCompra.Checked
|
||||||
GvM.Columns(16).Visible = ChkFechaUltimaVenta.Checked
|
GvM.Columns(17).Visible = ChkFechaUltimaVenta.Checked
|
||||||
|
|
||||||
'GvM.Columns(4).Visible = ChkSeccionAlmacen.Checked
|
'GvM.Columns(4).Visible = ChkSeccionAlmacen.Checked
|
||||||
If ChkSeccionAlmacen.Checked OrElse ChkCodigoBarras.Checked OrElse ChkCodigoAlterno.Checked Then
|
If ChkSeccionAlmacen.Checked OrElse ChkCodigoBarras.Checked OrElse ChkCodigoAlterno.Checked Then
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptor, RFCEmisor, CvePACCancelacion)) {
|
if( ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptor, RFCEmisor, CvePACCancelacion,CveSATMotivoCancelacion: 3)) {
|
||||||
|
|
||||||
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
if (ObjGenerales.CancelarTimbreTimbrado(CveTimbre, DateTime.Now, CvePACCancelacion, ObjCancelacion.CancelacionAcuse, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -155,14 +155,16 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
ViewState("Mail") = value
|
ViewState("Mail") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property CveIESustitucion As Integer
|
|
||||||
Get
|
'Private Property CveIESustitucion As Integer
|
||||||
Return ViewState("CveIESustitucion").ToString.ToEntero
|
' Get
|
||||||
End Get
|
' Return ViewState("CveIESustitucion").ToString.ToEntero
|
||||||
Set(value As Integer)
|
' End Get
|
||||||
ViewState("CveIESustitucion") = value
|
' Set(value As Integer)
|
||||||
End Set
|
' ViewState("CveIESustitucion") = value
|
||||||
End Property
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
Private Property CFDIRelacionadoSustitucion As String
|
Private Property CFDIRelacionadoSustitucion As String
|
||||||
Get
|
Get
|
||||||
If ViewState("CFDIRelacionadoSustitucion") Is Nothing Then
|
If ViewState("CFDIRelacionadoSustitucion") Is Nothing Then
|
||||||
@@ -244,9 +246,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
FechaCorteIE = DateTime.Now
|
FechaCorteIE = DateTime.Now
|
||||||
|
|
||||||
If CveIESustitucion > 0 Then
|
'If CveIESustitucion > 0 Then
|
||||||
CargaIESustituir()
|
' CargaIESustituir()
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day)
|
Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day)
|
||||||
Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate
|
Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate
|
||||||
@@ -334,7 +336,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Retorno = True
|
Retorno = True
|
||||||
CargaCuentas()
|
CargaCuentas()
|
||||||
CargaTipoTransaccion()
|
CargaTipoTransaccion()
|
||||||
TxtFechaDocumento.Text = IIf(CveIESustitucion > 0, FechaCorteIE.ToShortDateString, Now.ToShortDateString).ToString
|
|
||||||
|
'TxtFechaDocumento.Text = IIf(CveIESustitucion > 0, FechaCorteIE.ToShortDateString, Now.ToShortDateString).ToString
|
||||||
|
TxtFechaDocumento.Text = Now.ToShortDateString.ToString
|
||||||
|
|
||||||
TxtAboneA.Enabled = False
|
TxtAboneA.Enabled = False
|
||||||
LbEncabezado.Text = String.Format("<a href='/Ventas/Clientes.aspx?CveCliente={0}' target='_blank' class='Texto'>{1}</a>", CveCliente, ObjCliente.NombreComercial)
|
LbEncabezado.Text = String.Format("<a href='/Ventas/Clientes.aspx?CveCliente={0}' target='_blank' class='Texto'>{1}</a>", CveCliente, ObjCliente.NombreComercial)
|
||||||
@@ -372,10 +376,12 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim FechaI As String = IfNull(Request("FechaI"), "-1")
|
Dim FechaI As String = IfNull(Request("FechaI"), "-1")
|
||||||
Dim FechaF As String = IfNull(Request("FechaF"), "-1")
|
Dim FechaF As String = IfNull(Request("FechaF"), "-1")
|
||||||
|
|
||||||
Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate
|
'Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate
|
||||||
|
Dim FechaCorte As Date = DateTime.Now.AddYears(1).ToShortDateString.ToString.ToDate
|
||||||
|
|
||||||
Dim SumDescuentoProntoPago As Double = 0.0
|
Dim SumDescuentoProntoPago As Double = 0.0
|
||||||
If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then
|
'If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then
|
||||||
|
If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte) Then
|
||||||
Dim TmpCxCAux As DataTable
|
Dim TmpCxCAux As DataTable
|
||||||
TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||||
SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago")
|
SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago")
|
||||||
@@ -385,6 +391,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
CveMoneda = pCveMoneda
|
CveMoneda = pCveMoneda
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TxtImporte.Text = ""
|
TxtImporte.Text = ""
|
||||||
TxtObservaciones.Text = ""
|
TxtObservaciones.Text = ""
|
||||||
If SumDescuentoProntoPago > 0.0 Then
|
If SumDescuentoProntoPago > 0.0 Then
|
||||||
@@ -701,12 +708,12 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
'02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR
|
'02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR
|
||||||
Dim ErrorCancelarIE As Boolean = False
|
Dim ErrorCancelarIE As Boolean = False
|
||||||
|
|
||||||
If CveIESustitucion > 0 Then
|
'If CveIESustitucion > 0 Then
|
||||||
ErrorCancelarIE = CancelarIE()
|
' ErrorCancelarIE = CancelarIE()
|
||||||
If ErrorCancelarIE Then
|
' If ErrorCancelarIE Then
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim ObjIE As New ClsBancos()
|
Dim ObjIE As New ClsBancos()
|
||||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||||
@@ -761,7 +768,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=CveIESustitucion, CveProveedorIntermediario:=CveProvIntermediario)
|
'CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=CveIESustitucion, CveProveedorIntermediario:=CveProvIntermediario)
|
||||||
|
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=-1, CveProveedorIntermediario:=CveProvIntermediario)
|
||||||
Else
|
Else
|
||||||
If RblTipoPago.SelectedValue.Contiene("3") Then
|
If RblTipoPago.SelectedValue.Contiene("3") Then
|
||||||
CveIE = DdlIngreso.SelectedValue.ToEntero
|
CveIE = DdlIngreso.SelectedValue.ToEntero
|
||||||
@@ -1726,16 +1734,18 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'BITACORA
|
'BITACORA
|
||||||
If MsgError = "" Then
|
'If MsgError = "" Then
|
||||||
If CveIESustitucion > 0 And ComplementoSustitucionGenerado Then
|
|
||||||
If Not ObjEvento.AddEventoBitacora($"Complemento de pago Cancelado por sustitución con Folio <a href='/Bancos/IE.aspx?CveIE={CveIE}' target='_blank' class='Texto'>{TxtFolio.Text}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIESustitucion) Then
|
' If CveIESustitucion > 0 And ComplementoSustitucionGenerado Then
|
||||||
MsgError = "Ocurrió un error al agregar la bitacora"
|
' If Not ObjEvento.AddEventoBitacora($"Complemento de pago Cancelado por sustitución con Folio <a href='/Bancos/IE.aspx?CveIE={CveIE}' target='_blank' class='Texto'>{TxtFolio.Text}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIESustitucion) Then
|
||||||
End If
|
' MsgError = "Ocurrió un error al agregar la bitacora"
|
||||||
If Not ObjEvento.AddEventoBitacora($"Complemento de pago Generado por Sustitución de <a href='/Bancos/IE.aspx?CveIE={CveIESustitucion}' target='_blank' class='Texto'>{FolioIECancelado}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
' End If
|
||||||
MsgError = "Ocurrió un error al agregar la bitacora"
|
' If Not ObjEvento.AddEventoBitacora($"Complemento de pago Generado por Sustitución de <a href='/Bancos/IE.aspx?CveIE={CveIESustitucion}' target='_blank' class='Texto'>{FolioIECancelado}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||||
End If
|
' MsgError = "Ocurrió un error al agregar la bitacora"
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgError = "Ocurrió un error al guardar el movimiento"
|
MsgError = "Ocurrió un error al guardar el movimiento"
|
||||||
@@ -2269,7 +2279,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
DdlCuenta.SelectedValue = "-1"
|
DdlCuenta.SelectedValue = "-1"
|
||||||
DdlTipoTransaccion.SelectedValue = "-1"
|
DdlTipoTransaccion.SelectedValue = "-1"
|
||||||
|
|
||||||
CveIESustitucion = "-1"
|
'CveIESustitucion = "-1"
|
||||||
CFDIRelacionadoSustitucion = "-1"
|
CFDIRelacionadoSustitucion = "-1"
|
||||||
FechaCorteIE = DateTime.Now.ToDate
|
FechaCorteIE = DateTime.Now.ToDate
|
||||||
IDPoliza = -1
|
IDPoliza = -1
|
||||||
@@ -2500,7 +2510,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
|
|
||||||
If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then
|
'If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
If Not ObjBancos.DtResultados.Rows.Count > 0 Then
|
If Not ObjBancos.DtResultados.Rows.Count > 0 Then
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
|
Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -2512,7 +2523,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
ObjBancos.IniciaTransacSQL()
|
ObjBancos.IniciaTransacSQL()
|
||||||
|
|
||||||
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then
|
|
||||||
|
'If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then
|
||||||
|
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=False) Then
|
||||||
ObjBancos.Commit()
|
ObjBancos.Commit()
|
||||||
ComplementoSustitucionGenerado = True
|
ComplementoSustitucionGenerado = True
|
||||||
|
|
||||||
@@ -2883,183 +2896,185 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "COMPLEMENTO DE PAGO - ELIMINAR POR SUSTITUCION"
|
#Region "COMPLEMENTO DE PAGO - ELIMINAR POR SUSTITUCION"
|
||||||
Protected Sub CargaIESustituir()
|
|
||||||
Dim ObjIE As New ClsBancos()
|
|
||||||
If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
|
||||||
FechaCorteIE = ObjIE.FechaDocumento
|
|
||||||
CveMoneda = ObjIE.CveMoneda
|
|
||||||
CveMonedaFiltro = CveMoneda
|
|
||||||
IDPoliza = ObjIE.IDPoliza
|
|
||||||
FolioIECancelado = ObjIE.Folio
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjIE.Dispose()
|
|
||||||
UpDatos.Update()
|
|
||||||
End Sub
|
|
||||||
Function CancelarIE() As Boolean
|
|
||||||
Dim ErrorCancelar = False
|
|
||||||
|
|
||||||
If Not IsDate(TxtFechaDocumento.Text.ToDate) Then
|
'Protected Sub CargaIESustituir()
|
||||||
Alert("El campo fecha cancelación es incorrecto. Por favor verifique y vuelva a intentar")
|
' Dim ObjIE As New ClsBancos()
|
||||||
Return True
|
' If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) Then
|
||||||
End If
|
' If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||||
|
' FechaCorteIE = ObjIE.FechaDocumento
|
||||||
|
' CveMoneda = ObjIE.CveMoneda
|
||||||
|
' CveMonedaFiltro = CveMoneda
|
||||||
|
' IDPoliza = ObjIE.IDPoliza
|
||||||
|
' FolioIECancelado = ObjIE.Folio
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' ObjIE.Dispose()
|
||||||
|
' UpDatos.Update()
|
||||||
|
'End Sub
|
||||||
|
|
||||||
Dim Banc As New ClsBancos
|
'Function CancelarIE() As Boolean
|
||||||
Banc.IniciaTransacSQL()
|
' Dim ErrorCancelar = False
|
||||||
|
|
||||||
Dim ObjAC As ClsContPAQi = Nothing
|
' If Not IsDate(TxtFechaDocumento.Text.ToDate) Then
|
||||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
' Alert("El campo fecha cancelación es incorrecto. Por favor verifique y vuelva a intentar")
|
||||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
' Return True
|
||||||
ObjAC.IniciaTransacSQL()
|
' End If
|
||||||
End If
|
|
||||||
|
|
||||||
Dim IdPolizaNueva = -1
|
' Dim Banc As New ClsBancos
|
||||||
Dim FolioPolizaNueva = -1
|
' Banc.IniciaTransacSQL()
|
||||||
|
|
||||||
Try
|
' Dim ObjAC As ClsContPAQi = Nothing
|
||||||
'CANCELA IE CONTABILIZADO
|
' If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
If IDPoliza > 0 Then
|
' ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
If ObjAC Is Nothing Then
|
' ObjAC.IniciaTransacSQL()
|
||||||
ErrorCancelar = True
|
' End If
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
' Dim IdPolizaNueva = -1
|
||||||
Dim dt As DataTable
|
' Dim FolioPolizaNueva = -1
|
||||||
If ObjAC.GetPoliza(IDPoliza, -1, -1, -1, -1) AndAlso ObjAC.DtResultados.Rows.Count > 0 Then
|
|
||||||
dt = ObjAC.DtResultados
|
|
||||||
|
|
||||||
' MES ANTERIOR, MOVIMIENTOS CONTRARIOS (NEGATIVOS)
|
' Try
|
||||||
If dt.Rows(0)("FechaPol").ToString.ToDate.Month < TxtFechaDocumento.Text.ToDate.Month Or dt.Rows(0)("FechaPol").ToString.ToDate.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
' 'CANCELA IE CONTABILIZADO
|
||||||
IdPolizaNueva = ObjAC.AddPoliza(3, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, TxtFechaDocumento.Text.ToDate)
|
' If IDPoliza > 0 Then
|
||||||
|
' If ObjAC Is Nothing Then
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' End If
|
||||||
|
|
||||||
If IdPolizaNueva > 0 Then
|
' If Not ErrorCancelar Then
|
||||||
FolioPolizaNueva = ObjAC.Folio
|
' Dim dt As DataTable
|
||||||
|
' If ObjAC.GetPoliza(IDPoliza, -1, -1, -1, -1) AndAlso ObjAC.DtResultados.Rows.Count > 0 Then
|
||||||
|
' dt = ObjAC.DtResultados
|
||||||
|
|
||||||
'CREA POLIZA NEGATIVA
|
' ' MES ANTERIOR, MOVIMIENTOS CONTRARIOS (NEGATIVOS)
|
||||||
For Each dr As DataRow In dt.Rows
|
' If dt.Rows(0)("FechaPol").ToString.ToDate.Month < TxtFechaDocumento.Text.ToDate.Month Or dt.Rows(0)("FechaPol").ToString.ToDate.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
||||||
If Not ObjAC.AddMovimiento(IdPolizaNueva, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "True", dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), dr("IdSegNeg").ToString.ToEntero, TxtFechaDocumento.Text.ToDate, "") Then
|
' IdPolizaNueva = ObjAC.AddPoliza(3, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, TxtFechaDocumento.Text.ToDate)
|
||||||
ErrorCancelar = True : Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
'AJUSTA POLIZA
|
' If IdPolizaNueva > 0 Then
|
||||||
If Not ErrorCancelar Then
|
' FolioPolizaNueva = ObjAC.Folio
|
||||||
If Not ObjAC.AjustaPoliza(IdPolizaNueva) Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CANCELA IE
|
' 'CREA POLIZA NEGATIVA
|
||||||
If Not ErrorCancelar Then
|
' For Each dr As DataRow In dt.Rows
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
' If Not ObjAC.AddMovimiento(IdPolizaNueva, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "True", dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), dr("IdSegNeg").ToString.ToEntero, TxtFechaDocumento.Text.ToDate, "") Then
|
||||||
ErrorCancelar = True
|
' ErrorCancelar = True : Exit For
|
||||||
End If
|
' End If
|
||||||
End If
|
' Next
|
||||||
|
|
||||||
Else
|
' 'AJUSTA POLIZA
|
||||||
ErrorCancelar = True
|
' If Not ErrorCancelar Then
|
||||||
End If
|
' If Not ObjAC.AjustaPoliza(IdPolizaNueva) Then
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
Else
|
' 'CANCELA IE
|
||||||
|
' If Not ErrorCancelar Then
|
||||||
|
' If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
'LIMPIA POLIZA PONIENDO IMPORTE EN CEROS
|
' Else
|
||||||
For Each dr As DataRow In dt.Rows
|
' ErrorCancelar = True
|
||||||
If Not ObjAC.UpdateMovimiento(dr("Id").ToString.ToEntero, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "1", 0, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegNeg").ToString.ToEntero, dr("Fecha").ToString.ToDate) Then
|
' End If
|
||||||
ErrorCancelar = True : Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
'AJUSTA POLIZA
|
' Else
|
||||||
If Not ErrorCancelar Then
|
|
||||||
If Not ObjAC.AjustaPoliza(IDPoliza) Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CANCELA IE
|
' 'LIMPIA POLIZA PONIENDO IMPORTE EN CEROS
|
||||||
If Not ErrorCancelar Then
|
' For Each dr As DataRow In dt.Rows
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
' If Not ObjAC.UpdateMovimiento(dr("Id").ToString.ToEntero, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "1", 0, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegNeg").ToString.ToEntero, dr("Fecha").ToString.ToDate) Then
|
||||||
ErrorCancelar = True
|
' ErrorCancelar = True : Exit For
|
||||||
End If
|
' End If
|
||||||
End If
|
' Next
|
||||||
|
|
||||||
End If
|
' 'AJUSTA POLIZA
|
||||||
|
' If Not ErrorCancelar Then
|
||||||
|
' If Not ObjAC.AjustaPoliza(IDPoliza) Then
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
End If
|
' 'CANCELA IE
|
||||||
End If
|
' If Not ErrorCancelar Then
|
||||||
Else
|
' If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
If FechaCorteIE.Month < TxtFechaDocumento.Text.ToDate.Month Or FechaCorteIE.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
' End If
|
||||||
'CANCELA IE MES ANTERIOR
|
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
'CANCELA IE MES ACTUAL
|
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
' End If
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
' If FechaCorteIE.Month < TxtFechaDocumento.Text.ToDate.Month Or FechaCorteIE.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
||||||
If Banc.GetComplementoPagos(-1, CveIESustitucion, -1, UsuarioActual.CveEmpresa) Then
|
' 'CANCELA IE MES ANTERIOR
|
||||||
|
' If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
' 'CANCELA IE MES ACTUAL
|
||||||
|
' If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
Dim CveComplementoPago As Integer = -1
|
' End If
|
||||||
|
|
||||||
If Banc.DtResultados.Rows.Count > 0 Then
|
' If Not ErrorCancelar Then
|
||||||
'OBTENEMOS EL UUID DEL COMPLEMENTO A CANCELAR POR SUSTITUCION
|
' If Banc.GetComplementoPagos(-1, CveIESustitucion, -1, UsuarioActual.CveEmpresa) Then
|
||||||
CFDIRelacionadoSustitucion = Banc.DtResultados.Rows(0)("FolioFiscal")
|
|
||||||
CveComplementoPago = Banc.DtResultados(0)("CveComplementoPago").ToString().ToEntero
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ACTUALIZA FOLIOS CANCELADOS
|
' Dim CveComplementoPago As Integer = -1
|
||||||
If Banc.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}).Rows.Count > 0 Then
|
|
||||||
If Not Banc.GetFoliosCancelados(UsuarioActual.CveEmpresa) Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
Else
|
|
||||||
Dim FolioCancelado = $"{FolioIECancelado}_C_{Banc.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
|
||||||
|
|
||||||
If Not Banc.UpdateFolioCancelado(CveIESustitucion.ToEntero, Folio:=FolioCancelado) Then
|
' If Banc.DtResultados.Rows.Count > 0 Then
|
||||||
ErrorCancelar = True
|
' 'OBTENEMOS EL UUID DEL COMPLEMENTO A CANCELAR POR SUSTITUCION
|
||||||
End If
|
' CFDIRelacionadoSustitucion = Banc.DtResultados.Rows(0)("FolioFiscal")
|
||||||
End If
|
' CveComplementoPago = Banc.DtResultados(0)("CveComplementoPago").ToString().ToEntero
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
'ACTUALIZA ESTATUS DE COMPLEMENTO DE PAGO A CANCELADO = 2
|
' 'ACTUALIZA FOLIOS CANCELADOS
|
||||||
If Not ErrorCancelar And CveComplementoPago > 0 Then
|
' If Banc.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}).Rows.Count > 0 Then
|
||||||
If Not Banc.UpdateComplementoPagoCancelado(CveComplementoPago, 2, UsuarioActual.Empresa.CvePAC, UsuarioActual.CveEmpresa, DateTime.Now) Then
|
' If Not Banc.GetFoliosCancelados(UsuarioActual.CveEmpresa) Then
|
||||||
ErrorCancelar = True
|
' ErrorCancelar = True
|
||||||
End If
|
' Else
|
||||||
End If
|
' Dim FolioCancelado = $"{FolioIECancelado}_C_{Banc.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
ErrorCancelar = True
|
|
||||||
OnError("Ocurrió un error al cancelar el IE", ex)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
' If Not Banc.UpdateFolioCancelado(CveIESustitucion.ToEntero, Folio:=FolioCancelado) Then
|
||||||
Banc.Commit()
|
' ErrorCancelar = True
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
' End If
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
Dim Msg As New StringBuilder
|
' 'ACTUALIZA ESTATUS DE COMPLEMENTO DE PAGO A CANCELADO = 2
|
||||||
Msg.Append("El movimiento bancario quedó cancelado exitosamente.")
|
' If Not ErrorCancelar And CveComplementoPago > 0 Then
|
||||||
|
' If Not Banc.UpdateComplementoPagoCancelado(CveComplementoPago, 2, UsuarioActual.Empresa.CvePAC, UsuarioActual.CveEmpresa, DateTime.Now) Then
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Catch ex As Exception
|
||||||
|
' ErrorCancelar = True
|
||||||
|
' OnError("Ocurrió un error al cancelar el IE", ex)
|
||||||
|
' End Try
|
||||||
|
|
||||||
If IdPolizaNueva > 0 Then Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza de cancelación</a>", IdPolizaNueva)
|
' If Not ErrorCancelar Then
|
||||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
' Banc.Commit()
|
||||||
Else
|
' If ObjAC IsNot Nothing Then ObjAC.Commit()
|
||||||
Banc.RollBack()
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
|
||||||
Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
' Dim Msg As New StringBuilder
|
||||||
Banc.Dispose()
|
' Msg.Append("El movimiento bancario quedó cancelado exitosamente.")
|
||||||
Return ErrorCancelar
|
|
||||||
End Function
|
' If IdPolizaNueva > 0 Then Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza de cancelación</a>", IdPolizaNueva)
|
||||||
|
' Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||||
|
' Else
|
||||||
|
' Banc.RollBack()
|
||||||
|
' If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
||||||
|
' Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||||
|
' Banc.Dispose()
|
||||||
|
' Return ErrorCancelar
|
||||||
|
'End Function
|
||||||
|
|
||||||
Private Sub BtnVincularIntermediario_Click(sender As Object, e As EventArgs) Handles BtnVincularIntermediario.Click
|
Private Sub BtnVincularIntermediario_Click(sender As Object, e As EventArgs) Handles BtnVincularIntermediario.Click
|
||||||
RegistraScript("$('#ModalVincularIntermediario').modal('hide')", "hidemodal")
|
RegistraScript("$('#ModalVincularIntermediario').modal('hide')", "hidemodal")
|
||||||
|
|||||||
@@ -2178,6 +2178,40 @@
|
|||||||
|
|
||||||
<asp:Literal ID="LtlScripts" runat="server"></asp:Literal>
|
<asp:Literal ID="LtlScripts" runat="server"></asp:Literal>
|
||||||
<%-- FIN MODAL PS ADICIONALES --%>
|
<%-- FIN MODAL PS ADICIONALES --%>
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UPModalMensaje" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="DivModalMensaje" class="modal fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header-warning">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Label ID="LblModalMensaje" runat="server" ClientIDMode="Static" Text="Atención"></asp:Label></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:Label ID="LblModalMensajeCuerpo" runat="server" ClientIDMode="Static" Text="Atención"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnmodalMensajeOK" runat="server" Text="Guardar" CssClass="btn btn-sm blue" OnClick="BtnmodalMensajeOK_Click" />
|
||||||
|
<asp:Button ID="BtnCerrarModalMensace" runat="server" Text="Corregir" CssClass="btn btn-sm green" data-dismiss="modal" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,29 @@ Partial Class ProductosyServicios
|
|||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "Material peligroso"
|
||||||
|
|
||||||
|
Property ValidaMaterialPeligrosoMensaje As Boolean
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("ValidaMaterialPeligroso") Is Nothing Then
|
||||||
|
ViewState("ValidaMaterialPeligroso") = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Boolean.Parse(ViewState("ValidaMaterialPeligroso").ToString)
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("ValidaMaterialPeligroso") = value
|
||||||
|
End Set
|
||||||
|
|
||||||
|
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
@@ -1213,6 +1236,15 @@ Partial Class ProductosyServicios
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
|
|
||||||
|
If DdlSATPS.txtValue.Value.ToEntero > 0 Then
|
||||||
|
If Not ValidaMaterialPeligrosoMensaje Then
|
||||||
|
ValidaMaterialPeligroso(DdlSATPS.txtValue.Value.ToEntero)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If DdlSATPS.SelectedValue.Contiene("46920", "0", "-1") AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158, 72, 80, 145) Then
|
If DdlSATPS.SelectedValue.Contiene("46920", "0", "-1") AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158, 72, 80, 145) Then
|
||||||
Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia)
|
Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -3045,4 +3077,76 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Sub ValidaMaterialPeligroso(CveSATPS As Integer)
|
||||||
|
|
||||||
|
Dim EsPeligroso As Boolean = False
|
||||||
|
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
|
||||||
|
|
||||||
|
If ObjGrales.GetSATProductosServicios(CveSATPS:=CveSATPS) Then
|
||||||
|
|
||||||
|
Dim DTDatos As New DataTable
|
||||||
|
DTDatos = ObjGrales.DtResultados.FiltraParametros($" CveSATPS= {CveSATPS}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Es material Peligros
|
||||||
|
If DTDatos.Rows(0)("EsPeligroso").ToString.ToEntero = 1 Then
|
||||||
|
|
||||||
|
If DdlMaterialPeligroso.txtValue.Value.ToEntero > 0 And DdlEmbalaje.txtValue.Value.ToEntero > 0 And TxtPesoKg.Text.Trim.Length > 0 Then
|
||||||
|
ValidaMaterialPeligrosoMensaje = True
|
||||||
|
Else
|
||||||
|
|
||||||
|
RegistraScript("$('#DivModalMensaje').modal('show');")
|
||||||
|
ValidaMaterialPeligrosoMensaje = False
|
||||||
|
LblModalMensajeCuerpo.Text = "El producto servicio del SAT seleccionado esta clasificado como material peligroso, favor de llenar los datos de la sección carta porte en la pestaña Contabilidad - Inventarios."
|
||||||
|
UPModalMensaje.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
'No es matgerial peligroso
|
||||||
|
|
||||||
|
If DdlMaterialPeligroso.txtValue.Value.ToEntero > 0 Or DdlEmbalaje.txtValue.Value.ToEntero > 0 Or TxtPesoKg.Text.Trim.Length > 0 Then
|
||||||
|
RegistraScript("$('#DivModalMensaje').modal('show');")
|
||||||
|
ValidaMaterialPeligrosoMensaje = False
|
||||||
|
LblModalMensajeCuerpo.Text = "El producto servicio del SAT seleccionado no esta clasificado como material peligroso, favor de limpiar los datos de la sección carta porte en la pestaña Contabilidad - Inventarios, el incluir estos datos en un material no peligroso generara errores al timbrar traslados."
|
||||||
|
UPModalMensaje.Update()
|
||||||
|
|
||||||
|
Else
|
||||||
|
ValidaMaterialPeligrosoMensaje = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Return Respuesta
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnmodalMensajeOK_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
ValidaMaterialPeligrosoMensaje = True
|
||||||
|
RegistraScript("$('#DivPersonalizar').modal('hide');")
|
||||||
|
|
||||||
|
BtnGuardar_Click(Nothing, Nothing)
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -36,25 +36,25 @@
|
|||||||
<div class="portlet light smmallpadding traspasorow bordered">
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<span class="caption-subject bold uppercase" style="line-height: 2;">Facturas Pendientes Por Respuesta</span>
|
<span class="caption-subject bold uppercase" style="line-height: 1;">Facturas Pendientes Por Respuesta</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
</div>
|
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript:;" class="collapse"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body rowpadding">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
|
||||||
<div style="margin-right: 15px">
|
<div style="margin-right: 15px">
|
||||||
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<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>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body rowpadding">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
||||||
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCCliente"
|
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCCliente"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
||||||
@@ -84,25 +84,24 @@
|
|||||||
<div id="DivRefacturar" runat="server" visible="false" class="portlet light smmallpadding traspasorow bordered">
|
<div id="DivRefacturar" runat="server" visible="false" class="portlet light smmallpadding traspasorow bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<span class="caption-subject bold uppercase" style="line-height: 2;">Facturas Pendientes Por Refacturar</span>
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Facturas Pendientes de cancelar provenientes de refacturación</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
</div>
|
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript:;" class="collapse"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body rowpadding">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
|
||||||
<div style="margin-right: 15px">
|
<div style="margin-right: 15px">
|
||||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvRefacturaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvRefacturaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvRefacturaciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvRefacturaciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body rowpadding">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvRefacturaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
<asp:GridView ID="GvRefacturaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
||||||
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCCliente,FolioFiscalSustitucion"
|
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCCliente,FolioFiscalSustitucion"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||||
@@ -114,11 +113,9 @@
|
|||||||
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Mon" DataField="Abreviatura" ItemStyle-Width="30px" />
|
<asp:BoundField HeaderText="Mon" DataField="Abreviatura" ItemStyle-Width="30px" />
|
||||||
<asp:BoundField HeaderText="Fecha Solicitud" DataField="FechaCambioEstatus" ItemStyle-Width="160px" />
|
<asp:BoundField HeaderText="Fecha Solicitud" DataField="FechaCambioEstatus" ItemStyle-Width="160px" />
|
||||||
<asp:BoundField HeaderText="Fecha Cancelacion" DataField="FechaCancelacion" ItemStyle-Width="160px" />
|
|
||||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusFactura" ItemStyle-Width="160px" />
|
<asp:BoundField HeaderText="Estatus" DataField="EstatusFactura" ItemStyle-Width="160px" />
|
||||||
<asp:BoundField HeaderText="Serie Folio Nuevo" DataField="SerieFolioSustitucion" ItemStyle-Width="25%" />
|
<asp:HyperLinkField HeaderText="Folio Sustitución" DataTextField="SerieFolioSustitucion" DataNavigateUrlFields="CveVentaSustitucion" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||||
<asp:BoundField HeaderText="Folio Sustitucion" DataField="FolioFiscalSustitucion" ItemStyle-Width="25%" />
|
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
||||||
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
|
||||||
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkValidarRefac" runat="server" OnClick="BtnValidarRefacturacion_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton ID="LnkValidarRefac" runat="server" OnClick="BtnValidarRefacturacion_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
@@ -129,7 +126,6 @@
|
|||||||
<asp:LinkButton ID="LnkCancelar" Visible="false" runat="server" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelar" Visible="false" runat="server" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:HyperLinkField HeaderText="Refacturación" Text="Refacturar" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1" />
|
|
||||||
</Columns>
|
</Columns>
|
||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
|||||||
@@ -456,20 +456,20 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
{
|
{
|
||||||
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0)
|
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0)
|
||||||
{
|
//{
|
||||||
e.Row.Cells[14].Text = "";
|
// e.Row.Cells[14].Text = "";
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||||
{
|
//{
|
||||||
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
// e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23 && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0)
|
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23 && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0)
|
||||||
{
|
{
|
||||||
e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
||||||
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
//e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user