This commit is contained in:
2024-08-29 08:23:45 -07:00
33 changed files with 6222 additions and 4802 deletions

View File

@@ -147,6 +147,7 @@ Public Class ClsClientes
Public Property CargoUsados As Boolean Public Property CargoUsados As Boolean
Public Property BonificacionUsado As Boolean Public Property BonificacionUsado As Boolean
Public Property CveSATEstado As Integer Public Property CveSATEstado As Integer
Public Property Aseguradora As Boolean
Public ReadOnly Property DtResultados() As DataTable Public ReadOnly Property DtResultados() As DataTable
@@ -426,6 +427,7 @@ Public Class ClsClientes
_CreditoRegistroFirmas = Data(0)("CreditoRegistroFirmas").ToString _CreditoRegistroFirmas = Data(0)("CreditoRegistroFirmas").ToString
_GastosEnvio = Data(0)("GastosEnvio").ToString.ToDecimal _GastosEnvio = Data(0)("GastosEnvio").ToString.ToDecimal
_EsFilial = CBool(Data(0)("EsFilial")) _EsFilial = CBool(Data(0)("EsFilial"))
_Aseguradora = CBool(Data(0)("Aseguradora"))
End If End If
Retorno = True Retorno = True
Catch ex As Exception Catch ex As Exception
@@ -543,7 +545,7 @@ Public Class ClsClientes
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False, Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False) As Boolean Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -680,6 +682,7 @@ Public Class ClsClientes
.Add("@CreditoRegistroFirmas", SqlDbType.VarChar).Value = CreditoRegistroFirmas .Add("@CreditoRegistroFirmas", SqlDbType.VarChar).Value = CreditoRegistroFirmas
.Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio .Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio
.Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial .Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial
.Add("@Aseguradora", SqlDbType.Bit).Value = Aseguradora
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -726,7 +729,7 @@ Public Class ClsClientes
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False, Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False) As Boolean Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -873,6 +876,7 @@ Public Class ClsClientes
.Add("@CreditoRegistroFirmas", SqlDbType.VarChar).Value = CreditoRegistroFirmas .Add("@CreditoRegistroFirmas", SqlDbType.VarChar).Value = CreditoRegistroFirmas
.Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio .Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio
.Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial .Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial
.Add("@Aseguradora", SqlDbType.Bit).Value = Aseguradora
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -3599,6 +3599,32 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function End Function
Public Function GetLibroMayor2(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_LibroMayor2Get")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.Int).Value = TipoReporte
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
End With
SqlAdapter.SelectCommand.CommandTimeout = 0
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener los Movimientos Libro mayor", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function PolizaGet(CvePoliza As Integer) As Boolean Public Function PolizaGet(CvePoliza As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -1670,7 +1670,8 @@ Public Class ClsOC
FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer, FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer,
CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1", CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1",
Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1,
Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveMoneda As Integer = -1, Optional MetodoPago As Integer = -1) As Boolean Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveMoneda As Integer = -1,
Optional MetodoPago As Integer = -1, Optional Serie As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_OC_OrdenesCompraRep") DataAdapter("PA_OC_OrdenesCompraRep")
@@ -1701,6 +1702,7 @@ Public Class ClsOC
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect .Add("@TopSelect", SqlDbType.Int).Value = TopSelect
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago .Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago
.Add("@Serie", SqlDbType.VarChar).Value = Serie
End With End With

View File

@@ -10173,6 +10173,9 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420) PaginaDict.Add("/Contabilidad/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1) PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1)
PaginaDict.Add("/Contabilidad/CatBloqueoDiario.aspx".ToUpper(), 680) PaginaDict.Add("/Contabilidad/CatBloqueoDiario.aspx".ToUpper(), 680)
PaginaDict.Add("/Contabilidad/LibroMayor2.aspx".ToUpper(), 1353)
#End Region #End Region
#Region "Contratos" #Region "Contratos"
'--------------------- C O N T R A T O S - P R E S U P U E S T O S --------------------- '--------------------- C O N T R A T O S - P R E S U P U E S T O S ---------------------
@@ -10823,6 +10826,10 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/CatPSSubProyectosVendedores.aspx".ToUpper(), 787) PaginaDict.Add("/Ventas/CatPSSubProyectosVendedores.aspx".ToUpper(), 787)
#End Region #End Region
#Region "VIA"
PaginaDict.Add("/VIA/TripsChecks.aspx".ToUpper(), 1351)
PaginaDict.Add("/VIA/RepTripsChecks.aspx".ToUpper(), 1352)
#End Region
#Region "Varios" #Region "Varios"
'Portal Cliente/Proveedor 'Portal Cliente/Proveedor
PaginaDict.Add("/PortalCliente/PortalCliente.aspx".ToUpper(), 1101) PaginaDict.Add("/PortalCliente/PortalCliente.aspx".ToUpper(), 1101)

View File

@@ -454,7 +454,8 @@ Public Class ClsVentas
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1", Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "", Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False,
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1) As Boolean Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1,
Optional Addenda As String = "") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd") DataAdapter("PA_VentasAdd")
@@ -569,6 +570,7 @@ Public Class ClsVentas
.Add("@SATAnio", SqlDbType.Int).Value = SATAnio .Add("@SATAnio", SqlDbType.Int).Value = SATAnio
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion .Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
.Add("@Addenda", SqlDbType.VarChar).Value = Addenda
End With End With
'SqlTypes.SqlDateTime.Null 'SqlTypes.SqlDateTime.Null
Try Try

View File

@@ -5,6 +5,7 @@ Imports System.Data
Imports System.IO Imports System.IO
Imports System.Net.Http Imports System.Net.Http
Imports System.Xml Imports System.Xml
Imports System.Xml.Serialization
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
@@ -401,6 +402,25 @@ Namespace Modelos
Public Property TipoFolio As String Public Property TipoFolio As String
Public Property Valido As Boolean Public Property Valido As Boolean
End Class
<Serializable(), System.Xml.Serialization.XmlRoot("REM")>
Public Class M_REM
<System.Xml.Serialization.XmlElement("NOS")>
Public Property NOS As String
<System.Xml.Serialization.XmlElement("OR")>
Public Property _OR As String
<System.Xml.Serialization.XmlElement("CLUES")>
Public Property CLUES As String
<System.Xml.Serialization.XmlElement("CONTRATO")>
Public Property CONTRATO As String
<System.Xml.Serialization.XmlElement("FEEX")>
Public Property FEEX As String
<System.Xml.Serialization.XmlElement("FEEN")>
Public Property FEEN As String
<System.Xml.Serialization.XmlElement("FERE")>
Public Property FERE As String
End Class End Class
Public Enum TipoMensajeRespuesta Public Enum TipoMensajeRespuesta
TextoLimpio = 0 TextoLimpio = 0
@@ -8037,6 +8057,7 @@ Namespace Modelos
Public Property CveMotivoCancelacion As Integer = -1 Public Property CveMotivoCancelacion As Integer = -1
Public Property MotivoCancelacion As String = "" Public Property MotivoCancelacion As String = ""
Public Property TipoContable As Integer = -1 Public Property TipoContable As Integer = -1
Public Property Addenda As String = ""
#End Region #End Region

View File

@@ -2237,6 +2237,13 @@ Public Class Timbrado
GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB) GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB)
End If End If
'Si tiene una addenda personalizada, agregarla al xml
If Not String.IsNullOrEmpty(Ventas.Addenda) Then
Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML)
GeneraAddenda(RutaCadena, Ventas.Addenda)
End If
End If End If
End Select End Select
'---------------------- '----------------------
@@ -3013,6 +3020,12 @@ concep.DescripcionesEspecificas.NumeroSerie)
End If End If
'Si tiene una addenda personalizada, agregarla al xml
If Not String.IsNullOrEmpty(Ventas.Addenda) Then
Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML)
GeneraAddenda(RutaCadena, Ventas.Addenda)
End If
End If End If
End Select End Select
@@ -3288,6 +3301,12 @@ concep.DescripcionesEspecificas.NumeroSerie)
End If End If
'Si tiene una addenda personalizada, agregarla al xml
If Not String.IsNullOrEmpty(Ventas.Addenda) Then
Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML)
GeneraAddenda(RutaCadena, Ventas.Addenda)
End If
End If End If
End Select End Select
@@ -3502,7 +3521,7 @@ concep.DescripcionesEspecificas.NumeroSerie)
End Using End Using
End Sub End Sub
Private Sub GeneraAddendaFord(Archivo As String, pFolio As String, LstFordASN As ListBox, FordGSDBM As String) Private Sub GeneraAddenda(Archivo As String, Addenda As String)
Dim cfdi As String = "" Dim cfdi As String = ""
Dim SB As New StringBuilder Dim SB As New StringBuilder
Try Try
@@ -3513,28 +3532,13 @@ concep.DescripcionesEspecificas.NumeroSerie)
End Using End Using
Catch e As Exception Catch e As Exception
Alert("The file could not be read:", TipoMensaje.MsgError) Alert("The file could not be read:", TipoMensaje.MsgError)
End Try End Try
cfdi = cfdi.Replace("</cfdi:Comprobante>", "") cfdi = cfdi.Replace("</cfdi:Comprobante>", "")
SB.Append(cfdi) SB.Append(cfdi)
SB.AppendFormat("{0}", Addenda)
SB.Append("<cfdi:Addenda><fomadd:addenda xmlns:fomadd="" http://www.ford.com.mx/cfdi/addenda"" xsi:schemaLocation=""http://www.ford.com.mx/cfdi/addenda http://www.ford.com.mx/cfdi/addenda/cfdiAddendaFord_1_0.xsd"">") SB.Append("</cfdi:Comprobante>")
SB.AppendFormat("<fomadd:FOMASN version="" 1.0""><fomadd:GSDB>{0}</fomadd:GSDB>", FordGSDBM.Trim.ToUpper)
If pFolio <> "" Then SB.AppendFormat("<fomadd:ASN>{0}</fomadd:ASN>", pFolio)
'If TxtFordASN2.Text.Trim <> "" Then SB.AppendFormat("<fomadd:ASN>{0}</fomadd:ASN>", TxtFordASN2.Text.Trim)
For Each li As ListItem In LstFordASN.Items
SB.AppendFormat("<fomadd:ASN>{0}</fomadd:ASN>", li.Text)
Next
SB.Append("</fomadd:FOMASN></fomadd:addenda></cfdi:Addenda></cfdi:Comprobante>")
Using outfile As New StreamWriter(Archivo) Using outfile As New StreamWriter(Archivo)
outfile.Write(SB.ToString()) outfile.Write(SB.ToString())

View File

@@ -14902,7 +14902,7 @@ Partial Class Compras_Compras
AjusteProntoPagoConIVA = (ImporteCompraConIVA - ImporteOCConIVA) AjusteProntoPagoConIVA = (ImporteCompraConIVA - ImporteOCConIVA)
AjusteProntoPagoSinIVA = (ImporteCompraSinIVA - ImporteOCSinIVA) AjusteProntoPagoSinIVA = (ImporteCompraSinIVA - ImporteOCSinIVA)
If ConfirmaVinculacionOCProntoPago() Then If ConfirmaVinculacionOCProntoPago(AjusteProntoPagoPorcentajeIVA) Then
Vinculacion() Vinculacion()
End If End If
@@ -21246,14 +21246,18 @@ Partial Class Compras_Compras
End Set End Set
End Property End Property
Public Function ConfirmaVinculacionOCProntoPago() As Boolean Public Function ConfirmaVinculacionOCProntoPago(AjusteProntoPagoPorcentajeIVA As Decimal) As Boolean
If VincularOcProntoPago Then If VincularOcProntoPago Then
Return True Return True
Else Else
Dim StrMsg As String = $"Existe una diferencia de ${(ImporteRNC + ImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra. <br/> Se generaran Remisiones de Nota de Crédito. <br/> - Descuento de ${ImporteRNC.ToString("###,###,###.00")}.<br/>"
If ImporteRNCProntoPago > 0 Then Dim TmpImporteRNC As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, ImporteRNC + (ImporteRNC * AjusteProntoPagoPorcentajeIVA), ImporteRNC)
StrMsg = StrMsg & $"- Pronto pago de ${ImporteRNCProntoPago.ToString("###,###,###.00")}" Dim TmpImporteRNCProntoPago As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, ImporteRNCProntoPago + (ImporteRNCProntoPago * AjusteProntoPagoPorcentajeIVA), ImporteRNCProntoPago)
Dim StrMsg As String = $"Existe una diferencia de ${(TmpImporteRNC + TmpImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra. <br/> Se generaran Remisiones de Nota de Crédito. <br/> - Descuento de ${TmpImporteRNC.ToString("###,###,###.00")}.<br/>"
If TmpImporteRNCProntoPago > 0 Then
StrMsg = StrMsg & $"- Pronto pago de ${TmpImporteRNCProntoPago.ToString("###,###,###.00")}"
End If End If
LblModalConfirmaVinculacionProntoPago.Text = StrMsg LblModalConfirmaVinculacionProntoPago.Text = StrMsg

View File

@@ -0,0 +1,246 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="LibroMayor2.aspx.vb" Inherits="Conta_LibroMayor2" EnableEventValidation="false" %>
<asp:Content ContentPlaceHolderID="Css" runat="server">
<style>
.truncate {
width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
table {
border: none !important;
}
tr {
border: none !important;
}
td {
border: none !important;
}
</style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="ImgExcel" runat="server" Visible="false"><i class="fa fa-ad-excel" ></i> Generar EXCEL</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="Imprimir" runat="server" Visible="false"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
Libro Mayor
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1">
Cuenta:
</div>
<div class="col-md-3">
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1">
Fecha Inicio:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1">
Fecha Fin:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<div class="col-md-1 ">
Tipo Movto
</div>
<div class="col-md-3 ">
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 " id="tdTipoReporte" visible="false" runat="server">
Tipo
</div>
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" id="divProyecto" runat="server">
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
</asp:DropDownList>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="row" style="margin-right: 10px; margin-top: 8px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{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>
</div>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
EmptyDataText="No se encontrarios movimientos."
DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
<Columns>
<asp:TemplateField ControlStyle-CssClass="Widthall">
<HeaderTemplate>
<table width="100%" style="border: none">
<tr>
<td colspan="3"><font size="2">Cuenta</font></td>
<td colspan="1"><font size="2">Nombre</font></td>
<td colspan="4"></td>
<td><font size="2">Saldo Inicial</font></td>
</tr>
<tr>
<td width="60px" align="center">Fecha</td>
<td width="60px" align="center">Tipo</td>
<td width="60px" align="center">Número</td>
<td width="300px" align="left">Concepto</td>
<td width="100px" align="center">Referencia</td>
<td width="100px" align="center">Referencia Movto</td>
<td width="100px" align="center">SubProyecto</td>
<td width="100px" align="center">Cargos</td>
<td width="100px" align="center">Abonos</td>
<td width="100px" align="center">Saldo</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table width="100%" style="border: none">
<tr runat="server" id="tr1">
<td colspan="3" align="left" width="180px">
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
</td>
<td colspan="1" align="left" width="300px">
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
</td>
<td colspan="2" width="200px"></td>
<td style="font-weight: normal;" align="right" width="100px">Saldo Inicial:
</td>
<td style="font-weight: normal;" align="right" width="100px">
<asp:Label ID="LbSaldoInicial" runat="server" Text='<%# Eval("SaldoInicial", "{0:N2}")%>'></asp:Label>
</td>
</tr>
<tr runat="server" id="tr2">
<td width="60px" style="border: 0px;" align="center">
<asp:Literal ID="LbFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
</td>
<td width="60px" style="border: 0px;" align="center">
<asp:Literal ID="LbTipo" runat="server" Text='<%# Eval("TipoPoliza")%>'></asp:Literal>
</td>
<td width="60px" style="border: 0px;" align="center">
<asp:HyperLink ID="HLPoliza" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</td>
<td width="300px" align="left">
<div class="truncate" style="width: 300px;">
<asp:Label ID="LbConcepto" runat="server" CssClass="truncate" Text='<%# Eval("Concepto")%>' title='<%# Eval("Concepto")%>'></asp:Label>
</div>
</td>
<td width="100px">
<asp:Label ID="LbReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Label>
</td>
<td width="60px" style="border: 0px;" align="center">
<asp:Literal ID="LtlRefMovto" runat="server" Text='<%# Eval("ReferenciaAdmin")%>'></asp:Literal>
</td>
<td width="100px">
<asp:Label ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Label>
</td>
<td width="100px" align="right">
<asp:Label ID="LbCargos" runat="server"></asp:Label>
</td>
<td width="100px" align="right">
<asp:Label ID="LbAbonos" runat="server"></asp:Label>
</td>
<td width="100px" align="right">
<asp:Label ID="LbSaldo" runat="server"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<ItemStyle />
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
</script>
</asp:Content>

View File

@@ -0,0 +1,456 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Conta_LibroMayor2
Inherits ClsPaginas
#Region "PROPIEDADES"
Private Property DtDatos As DataTable
Get
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DtDatos") = value
End Set
End Property
Private Property DtTotales As DataTable
Get
DtTotales = DirectCast(ViewState("DtTotales"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DtTotales") = value
End Set
End Property
Private Property FechaInicio As Date
Get
FechaInicio = ViewState("FechaInicio").ToString.ToDate
End Get
Set(value As Date)
ViewState("FechaInicio") = value
End Set
End Property
Private Property FechaFin As Date
Get
FechaFin = ViewState("FechaFin").ToString.ToDate
End Get
Set(value As Date)
ViewState("FechaFin") = value
End Set
End Property
Private Property TotalPadre As Boolean
Get
TotalPadre = CBool(ViewState("TotalPadre"))
End Get
Set(value As Boolean)
ViewState("TotalPadre") = value
End Set
End Property
Private Property DTCuentas As DataTable
Get
Return CType(ViewState("DTCuentas"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTCuentas") = value
End Set
End Property
Private Property TipoReporte As String
Get
TipoReporte = ViewState("TP").ToString
End Get
Set(value As String)
ViewState("TP") = value
End Set
End Property
Private Property Cuenta As String
Get
Return ViewState("Cuenta").ToString
End Get
Set(value As String)
ViewState("Cuenta") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
' Response.Redirect($"/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx")
'End If
Dim ErrorParametros As Boolean = True
CargaTipoCuentas()
'TxtCuenta.Enabled = False
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then
If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then
FechaFin = Request("FF").ToDate
txtFechaF.Text = FechaFin.ToShortDateString
DdlCuentas.SelectedValueExist(Request("CveCuenta").ToEntero)
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
FechaInicio = Request("FI").ToDate
txtFechaI.Text = FechaInicio.ToShortDateString
Else
FechaInicio = DateSerial(Year(FechaFin), Month(FechaFin), 1)
TxtFechaF.Text = FechaInicio.ToShortDateString
End If
If Request("CveProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveProyecto")) Then
DdlProyecto.SelectedValueExist(Request("CveProyecto"))
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
End If
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
DdlSubproyecto.SelectedValueExist(Request("CveSubProyecto"))
End If
ErrorParametros = False
If Request("TP") IsNot Nothing AndAlso IsNumeric(Request("TP")) AndAlso Request("TP").ToEntero > 0 Then
TipoReporte = Request("TP").ToString
' DdlTipoReporte.SelectedValue = TipoReporte.ToString
End If
''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
'' DdlTipoCuentas.SelectedValue = IdCuenta.ToString
''Else
'' DdlTipoCuentas.SelectedValue = "-2"
'' TxtCuenta.Enabled = True
'' If DTCuentas.FiltraParametros(String.Format("Cvecuenta = {0}", IdCuenta)).Rows.Count > 0 Then
'' TxtCuenta.Text = DTCuentas.FiltraParametros(String.Format("CveCuenta = {0}", IdCuenta)).Rows(0)("Codigo").ToString
'' End If
''End If
End If
End If
If Not ErrorParametros Then
TotalPadre = True
TipoReporte = "1"
CargaDatos()
End If
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
If DdlCuentas.SelectedValue.ToEntero = -2 Then
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
Else
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
CargaDatos()
End If
' Imprimir_click(sender, e)
'RegistraScript("Enable();")
End Sub
#Region "C A R G A - D A T O S"
Public Function WSCuentas() As String
Dim Str As New StringBuilder
Dim i As Integer = 0
Dim dt As DataTable = DTCuentas
For Each dr As DataRow In dt.Rows
i += 1
Str.AppendFormat("{{value:""{0}"",label:""{1}""}}{2}", dr("CveCuenta"), dr("Codigo").ToString.Replace("""", ""), If(i < dt.Rows.Count, ",", ""))
Next
Return Str.ToString
End Function
Private Sub CargaTipoCuentas()
Dim ObjTipoCuenta As New ClsContabilidad
DdlCuentas.Enabled = True
If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
DTCuentas = ObjTipoCuenta.DtResultados
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
End If
ObjTipoCuenta.Dispose()
DdlCuentas.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos")
End Sub
Private Sub CargaDatos()
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero
TipoReporte = DdlTipoReporte.SelectedValue.ToString
'If TipoReporte = "1" And DdlCuentas.SelectedValue.ToEntero < 0 Then
' Alert("No ha seleccionado cuenta, Favor de especificar una", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
Cuenta = DdlCuentas.SelectedItem.ToString
Dim ObjConta As New ClsContabilidad
If ObjConta.GetLibroMayor2(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados
DtTotales = DtDatos.Clone
CargaGrid()
Else
DtDatos = Nothing
End If
ObjConta.Dispose()
End Sub
#End Region
Private Sub InsertaTotales()
Dim i As Integer = 0
Dim Aumento As Integer = 0
Dim Row As DataRow
Dim Row2 As DataRow
'Llena DtTotales
For Each dr As DataRow In DtDatos.Rows
If dr("Concepto").ToString = "" Then
Row = DtTotales.NewRow
Row("CveCuenta") = -1
Row("CargosMovto") = If("1" = "1", dr("Cargos"), dr("CargosME"))
Row("AbonosMovto") = If("1" = "1", dr("Abonos"), dr("AbonosME"))
Row("Saldo") = dr("SaldoActual")
Row("CtaMayor") = dr("CtaMayor")
Row("Concepto") = String.Format("Total {0}:", dr("Nombre"))
Row("Nombre") = dr("Nombre")
DtTotales.Rows.Add(Row)
Row("Clasificacion") = i
End If
i += 1
Next
'Inserta Totales en DtDatos
For Each dr As DataRow In DtTotales.Rows
i = 0
If dr("CtaMayor").ToString = "1" Then
DtDatos.ImportRow(dr)
End If
If dr("CtaMayor").ToString = "2" Then
For index As Integer = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count
If DtDatos.Rows(index)("Nombre").ToString <> dr("Nombre").ToString Then
i = index
Exit For
End If
Next
Row2 = DtDatos.NewRow
Row2.ItemArray = dr.ItemArray
DtDatos.Rows.InsertAt(Row2, i + Aumento)
Aumento += 1
End If
Next
End Sub
#Region "G R I D - GV DATOS"
Private Sub CargaGrid()
GvDatos.DataSource = DtDatos
'GvDatos.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Concepto") = "" Then
e.Row.ControlStyle.Font.Bold = True
e.Row.ControlStyle.Height = 35
'Cuando es Titulo
If e.Row.DBCampo("SaldoActual") = "" Then
CType(e.Row.FindControl("tr2"), HtmlTableRow).Visible = False
'Cuando Es Total
Else
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
'Anterior para TotalPadre
'If e.Row.DBCampo("CtaMayor").ToString = "2" And (e.Row.DBCampo("Nivel3").ToString <> "" Xor e.Row.DBCampo("Orden").ToString.Length = 18) Then
' e.Row.FCLabel("LbReferencia").Text = "Total:"
'Else
' e.Row.FCLabel("LbConcepto").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString)
'End If
If TotalPadre Then
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "1px"
'CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells.Remove(CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3))
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Align = "Right"
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(3).Width = "400px"
If e.Row.RowIndex + 1 = DtDatos.Rows.Count Then
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Attributes.Add("style", "border-top: 1px solid black;")
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(5).Attributes.Add("style", "border-top: 1px solid black;")
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(6).Attributes.Add("style", "border-top: 1px solid black;")
End If
e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", e.Row.DBCampo("Nombre").ToString)
Else
TotalPadre = True
e.Row.FCLabel("LbReferencia").Font.Bold = False
e.Row.FCLabel("LbReferencia").Text = "Total:"
CType(e.Row.FindControl("tr2"), HtmlTableRow).Cells(4).Align = "Right"
End If
'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString))
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If("1" = "1", 2, 4))
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If("1" = "1", 2, 4))
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If("1" = "1", 2, 4))
End If
Else
TotalPadre = False
e.Row.ControlStyle.Font.Bold = False
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza"))
If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If("1" = "1", 2, 4))
End If
'COLOREA NEGATIVOS
If e.Row.FCLabel("LbCargos").Text.ToDouble < 0 Then
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Red
Else
e.Row.FCLabel("LbCargos").ForeColor = Drawing.Color.Black
End If
If e.Row.FCLabel("LbAbonos").Text.ToDouble < 0 Then
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Red
Else
e.Row.FCLabel("LbAbonos").ForeColor = Drawing.Color.Black
End If
If e.Row.FCLabel("LbSaldo").Text.ToDouble < 0 Then
e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Red
Else
e.Row.FCLabel("LbSaldo").ForeColor = Drawing.Color.Black
End If
If e.Row.FCLabel("LbSaldoInicial").Text.ToDouble < 0 Then
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Red
Else
e.Row.FCLabel("LbSaldoInicial").ForeColor = Drawing.Color.Black
End If
End If
End Sub
#End Region
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
If DdlCuentas.SelectedValue.ToEntero = -1 Then
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
Else
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate)
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate)
DtDatos = DtDatos
ImprimirReporte()
End If
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
ImprimirReporte("Excel")
'Dim htmlTabe As New HtmlTable
'Dim RutaLogo As String = $"{UsuarioActual.Empresa.Ruta}Logo.png"
'Dim strinLiteral As String = ""
'Dim EncabezadoLiteral As New LiteralControl
'If System.IO.File.Exists(RutaLogo) Then
' RutaLogo = $"http://{Request.Url.Host }/Empresas/{UsuarioActual.CveEmpresa}/Logo.png"
' strinLiteral = $"<table style='width:{ GvDatos.Width }px'><tr>
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'><img width='200px' height='150px' style='max-height:150px!important;max-width:200px!important' src='{RutaLogo}' /> </td>
' <td colspan='3' style='width:70%;height:150px; text-align:center; vertical-align:middle;font-weight: bold; display: block;'><p><span>{UsuarioActual.Empresa.Empresa} </span><br><span> Movimientos Auxiliares del Catálogo<p></td>
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> Fecha:{NowADS().ToString("dd/MM/yyyy")}</td>
' </tr>
' <tr>
' <td style='text-align:left;' colspan='6'>
' <b>Filtros Cuenta:</b> {DdlCuentas.SelectedItem.Text} <b>Fecha inicio: </b>{ TxtFechaDel.Text} <b>Fecha Fin:</b> {TxtFechaAl.Text}
' <td>
' </tr>
' </table>"
'Else
' strinLiteral = $"<table style='width:{ GvDatos.Width }px'><tr>
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> </td>
' <td colspan='3' style='width:70%;height:150px; text-align:center; vertical-align:middle;font-weight: bold; display: block;'><p><span>{UsuarioActual.Empresa.Empresa} </span><br><span> Movimientos Auxiliares del Catálogo<p></td>
' <td colspan='3' style='width:15%;height:150px; text-align:center; vertical-align:middle;font-weight: bold;'> Fecha:{NowADS().ToString("dd/MM/yyyy")}</td>
' </tr>
' <tr>
' <td style='text-align:left;' colspan='9'>
' <b>Filtros Cuenta:</b> {DdlCuentas.SelectedItem.Text} <b>Fecha inicio: </b>{ TxtFechaDel.Text} <b>Fecha Fin:</b> {TxtFechaAl.Text}
' <td>
' <tr>
' </table>"
'End If
'EncabezadoLiteral.Text = strinLiteral
'GvDatos.ExportToExcel($"MovimientosAuxiliares_{NowADS().ToString("yyyyMMddmmss")}", Encabezado2:=EncabezadoLiteral)
End Sub
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("CveMoneda", "1"))
params.Add(New ReportParameter("Cuenta", Cuenta))
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
End Sub
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
End Sub
End Class

View File

@@ -10,6 +10,9 @@
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton> <asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> &nbsp;--%> <%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> &nbsp;--%>
</li> </li>
<li>
<asp:LinkButton ID="BtnImprimirPoSubProyecto" runat="server" OnClick="BtnImprimirPoSubProyecto_Click" Visible="false" ><i class="fa fa-print"></i> Imprimir por Sub Proyecto</asp:LinkButton>
</li>
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">

View File

@@ -5,6 +5,12 @@ Imports System
Imports System.Data Imports System.Data
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports ClosedXML.Excel
Imports Profact.TimbraCFDI40
Imports System.IO
Imports System.Drawing
Partial Class Contabilidad2_RepBalanzaComprobacion Partial Class Contabilidad2_RepBalanzaComprobacion
Inherits ClsPaginas Inherits ClsPaginas
@@ -105,6 +111,10 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
End If End If
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto) CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
If UsuarioActual.CveRol = 1 Then
BtnImprimirPoSubProyecto.Visible = True
End If
End If End If
End Sub End Sub
@@ -254,4 +264,238 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato) ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
End Sub End Sub
Protected Sub BtnImprimirPoSubProyecto_Click(sender As Object, e As EventArgs)
Dim WBAnexoBalanza = New ClosedXML.Excel.XLWorkbook
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
Dim SPCounter As Integer = 1
For Each drSP As DataRow In GlobalDTSubProyectos(UsuarioActual.CveEmpresa).Rows
Dim ObjConta As New ClsContabilidad
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, 2, TipoReporte, -1, drSP("CveSubProyecto").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados
Else
DtDatos = Nothing
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
Exit For
End If
ObjConta.Dispose()
If DtDatos.Rows.Count > 0 Then
WBAnexoBalanza.AddWorksheet(WSDocumento(drSP("SubProyecto").ToString, DtDatos))
Dim spNombre As String = drSP("SubProyecto").ToString().Replace(":", "_").Replace("/", "_").Replace("\", "_").Replace("?", "_").Replace("*", "_").Replace("[", "_").Replace("]", "_")
WBAnexoBalanza.Worksheet(SPCounter).Name = $"{SPCounter}_{spNombre}"
SPCounter = SPCounter + 1
End If
Next
Dim msB = New MemoryStream()
WBAnexoBalanza.SaveAs(msB)
Dim BB As Byte() = msB.ToArray
msB.Dispose()
Response.Clear()
Response.Buffer = True
Response.AddHeader("content-disposition", "attachment; filename=Balanza_" & Now.ToString("yyyyMMddhhmmss") & ".xlsx")
Response.ContentType = "application/vnd.ms-excel"
Response.BinaryWrite(BB)
Response.End()
End Sub
Function WSDocumento(SubProyecto As String, DtDatos As DataTable) As IXLWorksheet
Dim WBAnexoSalvar = New ClosedXML.Excel.XLWorkbook
Dim WBReporte = New ClosedXML.Excel.XLWorkbook()
WBReporte.Worksheets.Add("1")
Dim WSReporte = WBReporte.Worksheet(1)
Dim RutaLogo As String = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
If File.Exists(RutaLogo) Then
Dim imagePath As String = RutaLogo
Dim img As Bitmap = New Bitmap(imagePath)
Dim picture = WSReporte.AddPicture(img).MoveTo(WSReporte.Cell("A1"))
picture.Scale(0.5)
End If
Dim Tamaniofuente As Integer = 13
Dim Range = WSReporte.Range("A1:D1")
WSReporte.Style.Font.FontSize = 10
WSReporte.Style.Font.FontName = "Arial Narrow"
WSReporte.Style.Alignment.WrapText = True
Range.Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A1:F1").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A2:F2").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A3:F3").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A4:F4").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A5:F5").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A1:A5").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
WSReporte.Column(1).Width = 15
WSReporte.Column(2).Width = 35
WSReporte.Column(3).Width = 14
WSReporte.Column(4).Width = 14
WSReporte.Column(5).Width = 14
WSReporte.Column(6).Width = 14
WSReporte.Column(7).Width = 14
WSReporte.Cell(1, 1).Value = UsuarioActual.Empresa.Empresa
WSReporte.Cell(2, 1).Value = $"Balanza de Comprobación del {TxtFechaDel.Text} al {TxtFechaAl.Text}"
WSReporte.Cell(5, 1).Value = $"Sub Proyecto: {SubProyecto}"
WSReporte.Cell(5, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left
WSReporte.Cell(5, 1).Style.Font.Bold = True
WSReporte.Cell(6, 1).Value = "Cuenta"
WSReporte.Cell(6, 2).Value = "Nombre"
WSReporte.Cell(6, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
WSReporte.Cell(6, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
WSReporte.Cell(6, 3).Value = $"Saldos Iniciales{vbCrLf}Deudor Acreedor"
WSReporte.Cell(6, 4).Value = $"Cargos"
WSReporte.Cell(6, 5).Value = $"Abonos"
WSReporte.Cell(6, 6).Value = $"Saldo Actuales{vbCrLf} Deudor Acreedo"
WSReporte.Range("A6:F6").Style.Font.Bold = True
WSReporte.Range("A6:F6").Style.Font.FontSize = 10
WSReporte.Range("A6:F6").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
WSReporte.Range("A6:F6").Style.Border.TopBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range("A6:F6").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range("A6:F6").Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
Dim CuerrentRow As Integer = 7
CuerrentRow = CuerrentRow + 1
For Each Drow As DataRow In DtDatos.Rows
WSReporte.Cell(CuerrentRow, 1).Value = Drow("Codigo").ToString
WSReporte.Cell(CuerrentRow, 2).Value = Drow("Nombre").ToString
WSReporte.Cell(CuerrentRow, 3).Value = Drow("SaldoInicial").ToString
WSReporte.Cell(CuerrentRow, 4).Value = Drow("Cargos").ToString
WSReporte.Cell(CuerrentRow, 5).Value = Drow("Abonos").ToString
WSReporte.Cell(CuerrentRow, 6).Value = Drow("SaldoActual").ToString
If Drow("CtaMayor").ToString.ToEntero.Contiene(1) Then
WSReporte.Cell(CuerrentRow, 1).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 2).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 3).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 4).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 5).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 6).Style.Font.Bold = True
If Drow("CtaMayor").ToString.ToEntero.Contiene(1) Then
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Indent = 1
WSReporte.Cell(CuerrentRow, 1).Style.Font.Italic = True
End If
Else
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.WrapText = True
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Indent = 2
End If
WSReporte.Cell(CuerrentRow, 2).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 4).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 5).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
CuerrentRow = CuerrentRow + 1
Next
For xy As Integer = 6 To CuerrentRow
WSReporte.Cell(xy, 6).Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(xy, 1).Style.Border.LeftBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
Next
CuerrentRow = CuerrentRow + 1
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
WSReporte.Cell(CuerrentRow, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
WSReporte.Cell(CuerrentRow, 3).Value = $"Saldos Iniciales{vbCrLf}Deudor Acreedor"
WSReporte.Cell(CuerrentRow, 4).Value = $"Cargos"
WSReporte.Cell(CuerrentRow, 5).Value = $"Abonos"
WSReporte.Cell(CuerrentRow, 6).Value = $"Saldo Actuales{vbCrLf} Deudor Acreedo"
WSReporte.Cell(CuerrentRow, 1).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 2).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 3).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 4).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 5).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 6).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Font.Bold = True
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Font.FontSize = 10
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.TopBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
CuerrentRow = CuerrentRow + 1
Dim ultimaFila As DataRow = DtDatos.Rows(DtDatos.Rows.Count - 1)
Dim LastSaldoID As Decimal = ultimaFila("SaldoID").ToString.ToDecimal
Dim LastTotalAbonos As Decimal = ultimaFila("TotalAbonos").ToString.ToDecimal
Dim LastTotalCargos As Decimal = ultimaFila("TotalCargos").ToString.ToDecimal
Dim LastSaldoAD As Decimal = ultimaFila("SaldoAD").ToString.ToDecimal
Dim LastSaldoIA As Decimal = ultimaFila("SaldoIA").ToString.ToDecimal
Dim LastSaldoAA As Decimal = ultimaFila("SaldoAA").ToString.ToDecimal
WSReporte.Cell(CuerrentRow, 2).Value = "Sumas Iguales"
WSReporte.Cell(CuerrentRow, 3).Value = LastSaldoID
WSReporte.Cell(CuerrentRow, 4).Value = LastTotalCargos
WSReporte.Cell(CuerrentRow, 5).Value = LastTotalAbonos
WSReporte.Cell(CuerrentRow, 6).Value = LastSaldoAD
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 4).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 5).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
CuerrentRow = CuerrentRow + 1
WSReporte.Cell(CuerrentRow, 3).Value = LastSaldoIA
WSReporte.Cell(CuerrentRow, 6).Value = LastSaldoAA
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Range($"B{CuerrentRow}:F{CuerrentRow}").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.PageSetup.PrintAreas.Add($"A1:G{CuerrentRow + 0 + 1}")
WSReporte.PageSetup.Margins.Top = 0.3
WSReporte.PageSetup.Margins.Left = 0.8
WSReporte.PageSetup.Margins.Right = 0.8
WSReporte.PageSetup.FitToPages(1, 1)
WBReporte.Worksheet(1).CopyTo(WBAnexoSalvar, "SubProyecto")
Return WBReporte.Worksheet(1)
End Function
End Class End Class

View File

@@ -4588,6 +4588,39 @@ Partial Class Inventarios_EntregaAlmacen
Dim ObjInventario As New ClsInventarios(TransaccionSql) Dim ObjInventario As New ClsInventarios(TransaccionSql)
If ObjInventario.GetMovimientosDetalle(CveMovimientoGenerado, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoGenerado, UsuarioActual.CveEmpresa) Then
If Not cancelarPeido Then If Not cancelarPeido Then
'Dim DT_Ventas_Detalles As DataTable = DTSolicitudDev.FiltraParametros("", "", {"CantidadPedido", "CvePS", "CveVentaDetalle"})
'DT_Ventas_Detalles.Columns.Add("CantidadUsada", GetType(Decimal))
'DT_Ventas_Detalles.AcceptChanges()
'For Each dRow As DataRow In DT_Ventas_Detalles.Rows
' For Each gvRow As GridViewRow In GvMU.Rows
' Dim CantidadUsada As Decimal = gvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
' If dRow("CvePS").ToString.ToDecimal = gvRow.DataKey("CvePS").ToDecimal AndAlso CantidadUsada > 0 Then
' dRow("CantidadUsada") = dRow("CantidadUsada").ToString.ToDecimal + CantidadUsada
' End If
' Next
'Next
'For Each dRow As DataRow In DT_Ventas_Detalles.Rows
' Dim CantidadUsada As Decimal = dRow("CantidadUsada").ToString.ToDecimal
' If dRow("CantidadUsada").ToString.ToDecimal < dRow("CantidadPedido").ToString.ToDecimal Then
' If Not ObjInventario.UpdatePedidoDetalleCantidad(dRow("CveVentaDetalle").ToString.ToEntero, CantidadUsada, 2) Then
' ProcesoOK = False
' Exit For
' End If
' End If
'Next
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
Dim CveVentaDetalle As Integer = Dr("CveVentaDetalle").ToString().ToEntero() Dim CveVentaDetalle As Integer = Dr("CveVentaDetalle").ToString().ToEntero()
@@ -4603,8 +4636,10 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
Next Next
End If
End If
End If End If
End If End If

View File

@@ -498,6 +498,11 @@
Text='<%# Eval("ValorInventario", "{0:N2}")%>'></asp:Label> Text='<%# Eval("ValorInventario", "{0:N2}")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" HeaderText="OdeC">
<ItemTemplate>
<asp:Label ID="LbOC" runat="server" Text='<%# Eval("NoOrden")%>' data-toggle="tooltip" title='<%# Eval("CveOrdendeCorte")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" /> <AlternatingRowStyle CssClass="TextoAlterno" />
@@ -646,11 +651,12 @@
<asp:HyperLink ID="hlFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Target="_blank" /> <asp:HyperLink ID="hlFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Target="_blank" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="Orden de corte" DataField="NoOrden" ItemStyle-Width="15%" /> <asp:BoundField HeaderText="Orden de corte" DataField="NoOrden" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Concepto" DataField="Concepto" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Fecha" DataField="FechaMovto" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="Fecha" DataField="FechaMovto" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Almacen" DataField="Almacen" ItemStyle-Width="15%" /> <asp:BoundField HeaderText="Almacen" DataField="Almacen" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Entrada" DataField="Entrada" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Entrada" DataField="Entrada" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
<%-- <asp:BoundField HeaderText="Salida" DataField="Salida" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />--%> <%-- <asp:BoundField HeaderText="Salida" DataField="Salida" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="Disponible" DataField="Disponible" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Disponible" DataField="Disponible" DataFormatString="{0:#,###.##}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -82,6 +82,8 @@ Partial Class Inventarios_Kardex
GvM.Columns(15).Visible = TienePermisoImportes ' importe GvM.Columns(15).Visible = TienePermisoImportes ' importe
GvM.Columns(17).Visible = TienePermisoImportes ' valor GvM.Columns(17).Visible = TienePermisoImportes ' valor
GvM.Columns(18).Visible = UsuarioActual.CveEmpresa = 172 AndAlso UsuarioActual.CveRol = 1
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
DVFiltroCodigo.Visible = True DVFiltroCodigo.Visible = True
End If End If
@@ -282,7 +284,7 @@ Partial Class Inventarios_Kardex
LnkSeries.Visible = AuxAplicaSerie LnkSeries.Visible = AuxAplicaSerie
LnkCaducidad.Visible = AuxAplicaCad LnkCaducidad.Visible = AuxAplicaCad
If UsuarioActual.CveEmpresa = 172 Then If UsuarioActual.CveEmpresa = 172 AndAlso UsuarioActual.CveRol = 1 Then
LnkExistenciasPorCapas.Visible = True LnkExistenciasPorCapas.Visible = True
End If End If
'CARGA INDICADORES 'CARGA INDICADORES

View File

@@ -192,7 +192,7 @@
<%--7--%> <%--7--%>
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" /> <asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
<%--8--%> <%--8--%>
<asp:BoundField HeaderText="Sutido" DataField="Surtido" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Surtido" DataField="Surtido" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" />
<%--9--%> <%--9--%>
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Acción" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="70px" HeaderText="Acción" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>

View File

@@ -1700,6 +1700,7 @@ public partial class Nomina_Finiquito : ClsPaginas
string urlfile = System.IO.Path.Combine(string.Format("{0}Formatos/SobreReciboFiniquito.rdlc", UsuarioActual.Empresa.Ruta)); string urlfile = System.IO.Path.Combine(string.Format("{0}Formatos/SobreReciboFiniquito.rdlc", UsuarioActual.Empresa.Ruta));
if (!System.IO.File.Exists(urlfile)) if (!System.IO.File.Exists(urlfile))
{ {
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("EmpresaDireccion", string.Format("{0} No. {1},Colonia {2} ", UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.NoExt , UsuarioActual.Empresa.Colonia).ToLower()));
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreReciboFiniquito.rdlc"); urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreReciboFiniquito.rdlc");
} }

View File

@@ -141,8 +141,8 @@
<Columns> <Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="5%"> <asp:TemplateField HeaderText="Folio" ItemStyle-Width="5%">
<ItemTemplate> <ItemTemplate>
<asp:Label Text='<%# Eval("Folio") %>' ID="LbFolio" runat="server" Style="width: 70px!important" /> <asp:Label Text='<%# Eval("SerieFolio") %>' ID="LbFolio" runat="server" Style="width: 70px!important" />
<asp:HyperLink Text='<%# Eval("Folio") %>' ID="HLFolio" Visible="false" CssClass="Texto" Style="text-align: center" runat="server" Width="70px" /> <asp:HyperLink Text='<%# Eval("SerieFolio") %>' ID="HLFolio" Visible="false" CssClass="Texto" Style="text-align: center" runat="server" Width="70px" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

@@ -176,13 +176,45 @@ Partial Class OC_PopUpBuscarReq
Dim guia As String = If(TxtGuia.Text.Trim = "", "-1", TxtGuia.Text) Dim guia As String = If(TxtGuia.Text.Trim = "", "-1", TxtGuia.Text)
'Cargar Datos 'Cargar Datos
Dim Serie As String = "-1"
Dim Folio As Integer = -1
If TxtFolio.Text.Trim.Length = 0 Then
Serie = "-1"
Folio = -1
Else
Dim Array() As String = TxtFolio.Text.Trim.Split(CChar("-"))
If Array.Length >= 2 Then
If Array.Length = 2 Then
Serie = Array(0)
Folio = Array(1).ToEntero
End If
If Array.Length = 3 Then
Serie = Array(0) + "-" + Array(1)
Folio = Array(2).ToEntero
End If
Else
Serie = "-1"
Folio = -1
If TxtFolio.Text.Trim.ToEntero > 0 Then
Folio = TxtFolio.Text.Trim.ToEntero
Else
Serie = TxtFolio.Text.Trim
End If
End If
End If
If ValidarFiltrosSeleccionado() Then If ValidarFiltrosSeleccionado() Then
Dim CveProveedor As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) Dim CveProveedor As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
Dim ObjOC As New ClsOC Dim ObjOC As New ClsOC
ObjOC.GetOrdenesCompraRep(DdlTipo.SelectedValue, CveProyecto, CveSubProyecto, -1, DdlEstatus.SelectedValue.ToEntero, FI, MaxFecha, -1, CveProveedor, ObjOC.GetOrdenesCompraRep(DdlTipo.SelectedValue, CveProyecto, CveSubProyecto, -1, DdlEstatus.SelectedValue.ToEntero, FI, MaxFecha, -1, CveProveedor,
If(TxtFolio.Text.ToEntero <= 0, -1, TxtFolio.Text.ToEntero), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Guia:=guia, Folio, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Guia:=guia,
SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), TopSelect:=100) SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), TopSelect:=100, Serie:=Serie)
Dim DtOC As Data.DataTable = ObjOC.DtResultados ' tipotermino, esattus inicial Dim DtOC As Data.DataTable = ObjOC.DtResultados ' tipotermino, esattus inicial
ObjOC.Dispose() ObjOC.Dispose()
@@ -262,7 +294,7 @@ Partial Class OC_PopUpBuscarReq
If DdlTipo.SelectedValue = "REQ" OrElse DdlTipo.SelectedValue = "OC" Then Return True If DdlTipo.SelectedValue = "REQ" OrElse DdlTipo.SelectedValue = "OC" Then Return True
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
If DdlProveedor.SelectedValue.ToEntero > 0 Then Return True If DdlProveedor.SelectedValue.ToEntero > 0 Then Return True
If TxtFolio.Text.ToEntero > 0 Then Return True If TxtFolio.Text.Trim.Length > 0 Then Return True
If DdlSubProyectos.SelectedValue.ToEntero > 0 Then Return True If DdlSubProyectos.SelectedValue.ToEntero > 0 Then Return True
If DdlProyectos.SelectedValue.ToEntero > 0 Then Return True If DdlProyectos.SelectedValue.ToEntero > 0 Then Return True
Return False Return False

View File

@@ -2,6 +2,7 @@
Option Strict On Option Strict On
Imports System.Data Imports System.Data
Imports DocumentFormat.OpenXml.Spreadsheet
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports MKB.TimePicker Imports MKB.TimePicker
@@ -140,9 +141,16 @@ Partial Class OS_Asignaciones
End If End If
GvNA.DataBind() GvNA.DataBind()
ObjOS.Dispose() ObjOS.Dispose()
UpOS.Update() UpOS.Update()
CargarTecnico() CargarTecnico()
End Sub End Sub
Private Sub CargaOrdenesServiciosAsignadas() Private Sub CargaOrdenesServiciosAsignadas()
Dim ObjOS As New ClsOS Dim ObjOS As New ClsOS
@@ -240,7 +248,7 @@ Partial Class OS_Asignaciones
Dim picker As MKB.TimePicker.TimeSelector = DirectCast(row.FindControl("TimeSelector"), MKB.TimePicker.TimeSelector) Dim picker As MKB.TimePicker.TimeSelector = DirectCast(row.FindControl("TimeSelector"), MKB.TimePicker.TimeSelector)
If row.FCCheckBox("ChbxAsignar").Checked Then If row.FCCheckBox("ChbxAsignar").Checked Then
time = DateTime.Parse(String.Format("{0} {1}:{2} {3}", row.FCTextBox("FechaOS").Text, picker.Hour, picker.Minute, picker.AmPm)) time = DateTime.Parse(String.Format("{0} {1}:{2} {3}", row.FCTextBox("FechaOS").Text, picker.Hour, picker.Minute, If(picker.Hour < 12, TimeSelector.AmPmSpec.AM, TimeSelector.AmPmSpec.PM)))
contadorOrdenesAsignadas += 1 contadorOrdenesAsignadas += 1
If ObjOS.GetSubProyectosEstatusInicial(DdlTecnico.SelectedValue.ToEntero, 3, UsuarioActual.CveEmpresa) Then If ObjOS.GetSubProyectosEstatusInicial(DdlTecnico.SelectedValue.ToEntero, 3, UsuarioActual.CveEmpresa) Then
@@ -557,6 +565,12 @@ Partial Class OS_Asignaciones
Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector) Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector)
TMSelector.Date = FechaCita TMSelector.Date = FechaCita
'If TMSelector.Hour = 0 And TMSelector.AmPm = TimeSelector.AmPmSpec.AM Or e.Row.DataKey("CveOS").ToEntero = 9004 Then
If FechaCita.Hour = 0 Then
Dim scripttxth As String = " $(document).ready(function() {setTimeout(function() { document.getElementById('" + TMSelector.UniqueID + "_txtHour').value = '00'; }, 100);}); "
RegistraScript(scripttxth)
End If
e.Row.Cells(10).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.Ticks.ToString) e.Row.Cells(10).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.Ticks.ToString)
e.Row.Cells(11).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.ToString("HHmm")) e.Row.Cells(11).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.ToString("HHmm"))

View File

@@ -10,6 +10,7 @@ Imports System.ServiceModel.Security
Imports RVCFDI.RVLTimbrado Imports RVCFDI.RVLTimbrado
Imports Microsoft.Owin.Security.Provider Imports Microsoft.Owin.Security.Provider
Imports Telerik.Web.UI Imports Telerik.Web.UI
Imports ADSNetLibrary.SIGAPI.Services.SAT.DescargaCFDI
@@ -478,8 +479,16 @@ Partial Class OS_OrdenesServicios
End If End If
End If End If
If TipoEstatus.Contiene(1, 2, 3, 4) And CveVenta <= 0 Then If TipoEstatus.Contiene(1, 2, 3) And CveVenta <= 0 And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
BtnCancelar.Visible = True BtnCancelar.Visible = True
ElseIf TipoEstatus.Contiene(4) And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
BtnCancelar.Visible = False
BtnGuardar.Visible = True
DdlEstatusOS.Enabled = False
ElseIf TipoEstatus.Contiene(5) And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
BtnCancelar.Visible = False
BtnGuardar.Visible = False
DdlEstatusOS.Enabled = False
Else Else
BtnGuardar.Visible = False BtnGuardar.Visible = False
End If End If
@@ -3202,6 +3211,9 @@ Partial Class OS_OrdenesServicios
End If End If
End If End If
End If End If
'ProcesoOK = False
Dim Respuesta As New RespuestaFacturacion() Dim Respuesta As New RespuestaFacturacion()
Dim DtVentaDetalle As New DataTable Dim DtVentaDetalle As New DataTable
Dim CveMovimientoSalida, CveMovimientoEntrada As Integer Dim CveMovimientoSalida, CveMovimientoEntrada As Integer

View File

@@ -117,7 +117,7 @@
<div class="portlet-body rowpadding"> <div class="portlet-body rowpadding">
<div class="row my-1"> <div class="row my-1">
<label class="col-md-4 bold text-primary">Folio</label> <label class="col-md-4 bold text-primary">Folio</label>
<asp:Label class="col-md-2" runat="server" ID="LbFolio" Text=""></asp:Label> <asp:TextBox class="col-md-2" runat="server" ID="TxtFolio" Text="" MaxLength="50" style="margin-left:15px" Width="120px" Height="34px"></asp:TextBox>
<div class="col-md-2"> <div class="col-md-2">
<asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink> <asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>
</div> </div>

View File

@@ -148,7 +148,7 @@ Partial Class RepContratoDetalle
CveContratoTipo = Contrato.Rows(0)("CveContratoTipo").ToString.ToEntero CveContratoTipo = Contrato.Rows(0)("CveContratoTipo").ToString.ToEntero
SubProyecto = Contrato.Rows(0)("SubProyecto").ToString SubProyecto = Contrato.Rows(0)("SubProyecto").ToString
CveMasivo = Contrato.Rows(0)("CveMasivo").ToString.ToEntero CveMasivo = Contrato.Rows(0)("CveMasivo").ToString.ToEntero
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString TxtFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
@@ -267,7 +267,7 @@ Partial Class RepContratoDetalle
Response.Clear() Response.Clear()
Response.ClearHeaders() Response.ClearHeaders()
Response.ClearContent() Response.ClearContent()
Response.AddHeader("Content-Disposition", "attachment; filename=" & LbFolio.Text & $"{File.Extension}") Response.AddHeader("Content-Disposition", "attachment; filename=" & TxtFolio.Text & $"{File.Extension}")
Response.AddHeader("Content-Length", File.Length.ToString()) Response.AddHeader("Content-Length", File.Length.ToString())
'Response.ContentType = "text/plain" 'Response.ContentType = "text/plain"
Response.ContentType = "application/octet-stream" Response.ContentType = "application/octet-stream"
@@ -297,7 +297,7 @@ Partial Class RepContratoDetalle
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
ObjContratos.IniciaTransacSQL() ObjContratos.IniciaTransacSQL()
Try Try
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", If ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "",
DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal,
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservaciones.Text) Then DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservaciones.Text) Then
Alert("Contrato actualizado correctamente") Alert("Contrato actualizado correctamente")
@@ -345,7 +345,7 @@ Partial Class RepContratoDetalle
Dim dtResult As New DataTable() Dim dtResult As New DataTable()
Dim params As New List(Of ReportParameter) From { Dim params As New List(Of ReportParameter) From {
New ReportParameter("Folio", LbFolio.Text), New ReportParameter("Folio", TxtFolio.Text),
New ReportParameter("Cliente", DdlClientes.SelectedText), New ReportParameter("Cliente", DdlClientes.SelectedText),
New ReportParameter("Servicio", TxtDescripcion.Text), New ReportParameter("Servicio", TxtDescripcion.Text),
New ReportParameter("Observaciones", TxtObservaciones.Text), New ReportParameter("Observaciones", TxtObservaciones.Text),
@@ -364,7 +364,7 @@ Partial Class RepContratoDetalle
New ReportParameter("Usuario", UsuarioActual.Nombre) New ReportParameter("Usuario", UsuarioActual.Nombre)
} }
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Contrato.mrt", dtResult, params, NombreArchivo:=LbFolio.Text) ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Contrato.mrt", dtResult, params, NombreArchivo:=TxtFolio.Text)
End Sub End Sub
Protected Sub AgregarABitacora(Descripcion As String) Protected Sub AgregarABitacora(Descripcion As String)
Dim ObjEventoBitacora As New ClsOIEventos Dim ObjEventoBitacora As New ClsOIEventos

19
VIA/RepTripsChecks.aspx Normal file
View File

@@ -0,0 +1,19 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepTripsChecks.aspx.cs" Inherits="VYA_RepTripsChecks" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
</asp:Content>

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class VYA_RepTripsChecks : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}

19
VIA/TripsChecks.aspx Normal file
View File

@@ -0,0 +1,19 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="TripsChecks.aspx.cs" Inherits="VYA_TripsChecks" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
</asp:Content>

14
VIA/TripsChecks.aspx.cs Normal file
View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class VYA_TripsChecks : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}

View File

@@ -693,6 +693,12 @@
<asp:CheckBox ID="ChkRequiereOC" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" /> <asp:CheckBox ID="ChkRequiereOC" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
</div> </div>
</div> </div>
<div class="row" id="DivAseguradora" runat="server" visible="false">
<div class="form-group col-md-6">
<label>Aseguradora: </label>
<asp:CheckBox ID="ChkAseguradora" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
</div>
</div>
<div class="row"> <div class="row">
<div class=" col-md-6"> <div class=" col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -730,19 +736,19 @@
</div> </div>
</div> </div>
<div class="col-md-6" runat="server" visible="false" id="DivPrecioLista" > <div class="col-md-6" runat="server" visible="false" id="DivPrecioLista">
<div class="row"> <div class="row">
<div class="col-md-10"> <div class="col-md-10">
<div runat="server" class="form-group form-md-line-input input-iconright"> <div runat="server" class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList> <asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlPrecioLista" Visible="false" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlPrecioLista" <asp:RequiredFieldValidator ID="RfvDdlPrecioLista" Visible="false" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlPrecioLista"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lista de Precio''</b> es necesario, por favor ingréselo." ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lista de Precio''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista:</label> <label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista:</label>
<i></i> <i></i>
</div> </div>
</div> </div>
<div class="col-md-2" id="DivCrearPrecioLista" runat="server" style="padding-top: 8px;" visible="false"> <div class="col-md-2" id="DivCrearPrecioLista" runat="server" style="padding-top: 8px;" visible="false">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:LinkButton runat="server" ID="LnkAddPrecioLista" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" OnClick="LnkAddPrecioLista_Click"></asp:LinkButton> <asp:LinkButton runat="server" ID="LnkAddPrecioLista" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" OnClick="LnkAddPrecioLista_Click"></asp:LinkButton>
</div> </div>
@@ -785,11 +791,11 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<div runat="server" id="DivEsDistribuidor" visible="false" class="col-md-4 form-group form-md-line-input input-iconright"> <div runat="server" id="DivEsDistribuidor" visible="false" class="col-md-4 form-group form-md-line-input input-iconright">
<label for="<%= ChkEsDistribuidor.ClientID%>"> Es distribuidor:</label> <label for="<%= ChkEsDistribuidor.ClientID%>">Es distribuidor:</label>
<asp:CheckBox ID="ChkEsDistribuidor" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" /> <asp:CheckBox ID="ChkEsDistribuidor" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
</div>
</div> </div>
</div>
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group form-md-line-input" runat="server" id="DivCargoUsado" visible="false"> <div class="form-group form-md-line-input" runat="server" id="DivCargoUsado" visible="false">
<label>Cargo Usado:</label> <label>Cargo Usado:</label>
@@ -803,29 +809,29 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row" id="divAlmacenAsignado" runat="server" visible="false"> <div class="row" id="divAlmacenAsignado" runat="server" visible="false">
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlAlmacenAsignado" runat="server" CssClass=" form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen"> <asp:DropDownList ID="DdlAlmacenAsignado" runat="server" CssClass=" form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlAlmacenAsignado.ClientID.ToString()%>">Almacen Asignado:</label> <label for="<%= DdlAlmacenAsignado.ClientID.ToString()%>">Almacen Asignado:</label>
</div> </div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlAlmacenConsignacion" runat="server" CssClass=" form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen">
</asp:DropDownList>
<label for="<%= DdlAlmacenConsignacion.ClientID.ToString()%>">Almacen Consignación:</label>
</div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlAlmacenConsignacion" runat="server" CssClass=" form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen">
</asp:DropDownList>
<label for="<%= DdlAlmacenConsignacion.ClientID.ToString()%>">Almacen Consignación:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlAlmacenAlterno" runat="server" CssClass=" form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen"> <asp:DropDownList ID="DdlAlmacenAlterno" runat="server" CssClass=" form-control input-sm select2me" Width="100%" DataTextField="Almacen" DataValueField="CveAlmacen">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlAlmacenAlterno.ClientID.ToString()%>">Almacen Alterno:</label> <label for="<%= DdlAlmacenAlterno.ClientID.ToString()%>">Almacen Alterno:</label>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -1198,26 +1204,27 @@
</div> </div>
<div class="row" id="divGastosEnvio" runat="server" visible="false"> <div class="row" id="divGastosEnvio" runat="server" visible="false">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input" > <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtGastosEnvio" CssClass="form-control" runat="server" ></asp:TextBox> <asp:TextBox ID="TxtGastosEnvio" CssClass="form-control" runat="server"></asp:TextBox>
<label for="<%= TxtGastosEnvio.ClientID.ToString()%>">$ Envío:</label></div> <label for="<%= TxtGastosEnvio.ClientID.ToString()%>">$ Envío:</label>
</div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input" id="DivAplicaProductoAlterno" runat="server"> <div class="form-group form-md-line-input" id="DivAplicaProductoAlterno" runat="server">
Aplica Producto Alterno: Aplica Producto Alterno:
<asp:CheckBox ID="ChkProductoAlterno" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" /> <asp:CheckBox ID="ChkProductoAlterno" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input" id="Div5" runat="server"> <div class="form-group form-md-line-input" id="Div5" runat="server">
Es Parte relacionada: Es Parte relacionada:
<asp:CheckBox ID="ChkEsFilial" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" /> <asp:CheckBox ID="ChkEsFilial" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
</div> </div>
</div> </div>
</div> </div>
<br /> <br />
@@ -1737,11 +1744,11 @@
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Crédito</span> <span class="caption-subject bold uppercase">Crédito</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="LblAlertaQuebranto" runat="server" Font-Bold ="true" ForeColor="#CC0000"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="LblAlertaQuebranto" runat="server" Font-Bold="true" ForeColor="#CC0000"></asp:Label>
</div> </div>
<div class="tools"> <div class="tools">
<asp:CheckBox ID="ChkPermiteCredito" runat="server" Text="Permite Crédito" /> <asp:CheckBox ID="ChkPermiteCredito" runat="server" Text="Permite Crédito" />
<a href="javascript:;" class="collapse" data-original-title="" title=""></a> <a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div> </div>
@@ -1866,15 +1873,15 @@
<label for="<%= TxtObsDiasRevision.ClientID.ToString()%>">Documentación Revisión: </label> <label for="<%= TxtObsDiasRevision.ClientID.ToString()%>">Documentación Revisión: </label>
</div> </div>
<div class="row" runat="server" id="divQuebranto1" visible="false"> <div class="row" runat="server" id="divQuebranto1" visible="false">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-4" > <div class="col-md-4">
<asp:CheckBox ID="ChkEnQuebranto" runat="server" Text="En Quebranto" /> <asp:CheckBox ID="ChkEnQuebranto" runat="server" Text="En Quebranto" />
</div> </div>
<div class="col-md-4" > <div class="col-md-4">
<asp:CheckBox ID="ChkEnDemanda" runat="server" Text="En Demanda" /> <asp:CheckBox ID="ChkEnDemanda" runat="server" Text="En Demanda" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -1949,12 +1956,12 @@
</div> </div>
</div> </div>
<div class="row" runat="server" id="divQuebranto2" visible="false"> <div class="row" runat="server" id="divQuebranto2" visible="false">
<div class="col-md-12"> <div class="col-md-12">
<label class="col-md-1 " style="width: 120px; text-align: right">Registro Firmas:</label> <label class="col-md-1 " style="width: 120px; text-align: right">Registro Firmas:</label>
<div class="col-md-2" style="width: 250px"> <div class="col-md-2" style="width: 250px">
<asp:TextBox ID="TxtNombreFirmas" runat="server" Width="250px"></asp:TextBox> <asp:TextBox ID="TxtNombreFirmas" runat="server" Width="250px"></asp:TextBox>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -2337,8 +2344,8 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Autorización" ItemStyle-HorizontalAlign="Center" Visible="false"> <asp:TemplateField HeaderText="Autorización" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkAutorizar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" tooltip="Autorizar Anticipo" runat="server" OnClick="LnkAutorizarAnticipo_Click" /> <asp:LinkButton ID="LnkAutorizar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ToolTip="Autorizar Anticipo" runat="server" OnClick="LnkAutorizarAnticipo_Click" />
<asp:LinkButton ID="LnkCancelar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'></i>" tooltip="Bloquear Anticipo" runat="server" OnClick="LnkCancelarAnticipo_Click" /> <asp:LinkButton ID="LnkCancelar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'></i>" ToolTip="Bloquear Anticipo" runat="server" OnClick="LnkCancelarAnticipo_Click" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
@@ -4050,9 +4057,9 @@
<asp:TemplateField HeaderText="Editar"> <asp:TemplateField HeaderText="Editar">
<EditItemTemplate> <EditItemTemplate>
<center> <center>
<asp:LinkButton ID="ImgA" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>"/> <asp:LinkButton ID="ImgA" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" />
&nbsp;<asp:LinkButton ID="ImgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" /> &nbsp;<asp:LinkButton ID="ImgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</center> </center>
</EditItemTemplate> </EditItemTemplate>
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" /> <asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
@@ -5031,10 +5038,10 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div id="Div1" runat="server" class="form-group form-md-line-input input-iconright"> <div id="Div1" runat="server" class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPrecioListaClonar" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList> <asp:DropDownList ID="DdlPrecioListaClonar" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
<label for="<%= DdlPrecioListaClonar.ClientID.ToString()%>">Clonar de:</label> <label for="<%= DdlPrecioListaClonar.ClientID.ToString()%>">Clonar de:</label>
<i></i> <i></i>
</div> </div>
</div> </div>
</div> </div>
@@ -5215,7 +5222,7 @@
</div> </div>
</div> </div>
<div class="row" style="padding-left: 16px;"> <div class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtCorreoSucursal" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtCorreoSucursal" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreoSucursal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarSucursal"></asp:RegularExpressionValidator> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreoSucursal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarSucursal"></asp:RegularExpressionValidator>
@@ -5230,18 +5237,18 @@
<i></i> <i></i>
</div> </div>
</div> </div>
<div class="row" style="padding-left: 16px;" > <div class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtContactoSucursal" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtContactoSucursal" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtContactoSucursal.ClientID.ToString()%>">Contacto:</label> <label for="<%= TxtContactoSucursal.ClientID.ToString()%>">Contacto:</label>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlResponsableSucursal" DataValueField="CveUsuario" DataTextField="Nombre" Width="150px" runat="server" CssClass="form-control select2me"> <asp:DropDownList ID="DdlResponsableSucursal" DataValueField="CveUsuario" DataTextField="Nombre" Width="150px" runat="server" CssClass="form-control select2me">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlResponsableSucursal.ClientID.ToString()%>">Responsable: </label> <label for="<%= DdlResponsableSucursal.ClientID.ToString()%>">Responsable: </label>
</div> </div>
</div> </div>
<div class="row" style="padding-left: 16px"> <div class="row" style="padding-left: 16px">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
@@ -5277,7 +5284,7 @@
</div> </div>
<div class="row" style="display:none;" > <div class="row" style="display: none;">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlMetodoPagoSucursal" CssClass="form-control select2me" runat="server" Width="250px" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardarSucursal"> <asp:DropDownList ID="DdlMetodoPagoSucursal" CssClass="form-control select2me" runat="server" Width="250px" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardarSucursal">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -5298,24 +5305,23 @@
</div> </div>
<div class="row" style="padding-left: 16px" id="DivAlmacenesSucursal" visible="false" runat="server"> <div class="row" style="padding-left: 16px" id="DivAlmacenesSucursal" visible="false" runat="server">
<div class="form-group form-md-line-input input-iconright col-xs-4" > <div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:DropDownList runat="server" ID="ddlAlmacenSucursal" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control select2me" Width="100%"></asp:DropDownList> <asp:DropDownList runat="server" ID="ddlAlmacenSucursal" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control select2me" Width="100%"></asp:DropDownList>
<label for="<%=ddlAlmacenSucursal.ClientID.ToString()%>">Almacén:</label> <label for="<%=ddlAlmacenSucursal.ClientID.ToString()%>">Almacén:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-4" > <div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:DropDownList runat="server" ID="DdlAlmacenConsignacionSucursal" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control select2me" Width="100%"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlAlmacenConsignacionSucursal" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control select2me" Width="100%"></asp:DropDownList>
<label for="<%=DdlAlmacenConsignacionSucursal.ClientID.ToString()%>">Almacén Consig:</label> <label for="<%=DdlAlmacenConsignacionSucursal.ClientID.ToString()%>">Almacén Consig:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-4" > <div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:DropDownList runat="server" ID="DdlAlmacenAlternoSucursal" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control select2me" Width="100%"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlAlmacenAlternoSucursal" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control select2me" Width="100%"></asp:DropDownList>
<label for="<%=DdlAlmacenAlternoSucursal.ClientID.ToString()%>">Almacén Alt:</label> <label for="<%=DdlAlmacenAlternoSucursal.ClientID.ToString()%>">Almacén Alt:</label>
</div> </div>
</div> </div>
<div class="row" style="padding-left: 16px"> <div class="row" style="padding-left: 16px">
<div class="form-group form-md-line-input input-iconright col-xs-6" runat="server" id="Div4" visible="false"> <div class="form-group form-md-line-input input-iconright col-xs-6" runat="server" id="Div4" visible="false">
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<div id="DivEstatusSucursal" visible="false" runat="server" class="form-group form-md-line-input input-iconright col-xs-12"> <div id="DivEstatusSucursal" visible="false" runat="server" class="form-group form-md-line-input input-iconright col-xs-12">
<asp:CheckBox runat="server" ID="ChkEstatusSucursal" Checked="true" AutoPostBack="false" /> <asp:CheckBox runat="server" ID="ChkEstatusSucursal" Checked="true" AutoPostBack="false" />
<label for="<%= ChkEstatusSucursal.ClientID.ToString()%>">Estatus Sucursal</label> <label for="<%= ChkEstatusSucursal.ClientID.ToString()%>">Estatus Sucursal</label>
@@ -6589,9 +6595,9 @@
<asp:TemplateField> <asp:TemplateField>
<EditItemTemplate> <EditItemTemplate>
<center> <center>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" /> <asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
&nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" /> &nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</center> </center>
</EditItemTemplate> </EditItemTemplate>
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" Visible="false" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" /> <asp:LinkButton ID="imgE" runat="server" Visible="false" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
@@ -6720,9 +6726,9 @@
<asp:TemplateField> <asp:TemplateField>
<EditItemTemplate> <EditItemTemplate>
<center> <center>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" /> <asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
&nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" /> &nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</center> </center>
</EditItemTemplate> </EditItemTemplate>
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" /> <asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
@@ -6962,7 +6968,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -6971,21 +6977,16 @@
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Categoria:</label> <label for="<%= DdlClasificacion.ClientID.ToString()%>">Categoria:</label>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlLAEstatus" Width="250px" runat="server" CssClass="form-control select2me"> <asp:DropDownList ID="DdlLAEstatus" Width="250px" runat="server" CssClass="form-control select2me">
<asp:ListItem Text="Activo" Value="1"></asp:ListItem> <asp:ListItem Text="Activo" Value="1"></asp:ListItem>
<asp:ListItem Text="Cerrado" Value="0"></asp:ListItem> <asp:ListItem Text="Cerrado" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlLAEstatus.ClientID.ToString()%>">Estatus:</label> <label for="<%= DdlLAEstatus.ClientID.ToString()%>">Estatus:</label>
</div </div>
</div>
</div> </div>
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">
@@ -7400,10 +7401,10 @@
let strRegimenSociedad = $('#TxtRegimenSociedad').val(); let strRegimenSociedad = $('#TxtRegimenSociedad').val();
if(strRegimenSociedad !== undefined ){ if (strRegimenSociedad !== undefined) {
$get('TxtNombreComercial').value = strNombre + " " + strRegimenSociedad; $get('TxtNombreComercial').value = strNombre + " " + strRegimenSociedad;
}else{ } else {
$get('TxtNombreComercial').value = strNombre ; $get('TxtNombreComercial').value = strNombre;
} }

View File

@@ -742,7 +742,6 @@ Partial Class Clientes
End If End If
divRegimen.Visible = True divRegimen.Visible = True
If UsuarioActual.CveEmpresa.Contiene(1) Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.CveEmpresa.Contiene(1) Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
@@ -933,6 +932,11 @@ Partial Class Clientes
ChkPermiso4.Enabled = False ChkPermiso4.Enabled = False
ChkPermiso5.Enabled = False ChkPermiso5.Enabled = False
ChkPermiso6.Enabled = False ChkPermiso6.Enabled = False
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
DivAseguradora.Visible = True
End If
End If End If
@@ -1545,6 +1549,7 @@ Partial Class Clientes
ChkRequiereOC.Checked = ObjClientes.RequiereOC ChkRequiereOC.Checked = ObjClientes.RequiereOC
ChkEsDistribuidor.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("EsDistribuidor").ToString()) ChkEsDistribuidor.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("EsDistribuidor").ToString())
CobranzaTelefono = ObjClientes.CobranzaTelefono CobranzaTelefono = ObjClientes.CobranzaTelefono
ChkAseguradora.Checked = ObjClientes.Aseguradora
If ObjClientes.DtResultados(0)("Genero").ToString().Length > 0 Then If ObjClientes.DtResultados(0)("Genero").ToString().Length > 0 Then
DdlGeneroCliente.SelectedValueExist(If(Boolean.Parse(ObjClientes.DtResultados(0)("Genero").ToString()), 1, 0)) DdlGeneroCliente.SelectedValueExist(If(Boolean.Parse(ObjClientes.DtResultados(0)("Genero").ToString()), 1, 0))
@@ -2605,7 +2610,7 @@ Partial Class Clientes
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente,
CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal) Then CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked) Then
CveClienteNuevo = ObjClientes.CveCliente CveClienteNuevo = ObjClientes.CveCliente
@@ -2690,7 +2695,7 @@ Partial Class Clientes
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked,
EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal) Then EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked) Then
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
ErrorProceso = True ErrorProceso = True

View File

@@ -569,22 +569,52 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
} }
else else
{ {
//SI REGISTRA SALIDA DE ALMACÉN EN AUTOMÁTICO Y ES DEVOLUCION QUE REALIZE EL MOVMIENTO DE SALIDA DE ALMACEN //EN BDH, SI ES DEVOLUCION, QUE REALICE LA SALIDA DE ALMACEN
if ((UsuarioActual.Empresa.Funcionalidad(567) == "1" || UsuarioActual.Empresa.Funcionalidad(531) == "1") && factura.TipoDocto == "Dev" && factura.SaldoAlmacen != 0) if (UsuarioActual.Empresa.Funcionalidad(531) == "1" && factura.TipoDocto == "Dev" && factura.SaldoAlmacen != 0)
{ {
factura.RealizarDevolucionAlmacen = 1; factura.RealizarDevolucionAlmacen = 1;
} }
//SI REGISTRA SALIDA DE ALMACÉN EN AUTOMÁTICO, QUE REALIZE EL MOVIMIENTO DE ALMACEN EN AUTOMATICO
if (UsuarioActual.Empresa.Funcionalidad(567) == "1" && factura.TipoDocto.Contiene("Ing", "Dev") && factura.SaldoAlmacen != 0)
{
factura.RealizarDevolucionAlmacen = 1;
}
//SI TIENE PERMISO 'PERMITE DEVOLVER PRODUCTO EN UNA CANCELACION', QUE REALIZE EL MOVIMIENTO DE ALMACEN EN AUTOMATICO
if (UsuarioActual.TienePermisoProceso(269) && factura.TipoDocto.Contiene("Ing", "Dev") && factura.SaldoAlmacen != 0)
{
factura.RealizarDevolucionAlmacen = 1;
}
//EN TODAS LAS EMPRESAS. SI ES REMISION FACTURADA DEBE REALIZAR EL MOVIMIENTO DE ALMACEN EN AUTOMATICO
if (factura.TipoDocto == "Ing")
{
using (var ObjVentas = new ClsVentas())
{
if (ObjVentas.GetRemisionesRelacionadas(CveVenta, factura.TipoDocto))
{
if (ObjVentas.DtResultados.Copy().Rows.Count > 0)
{
factura.RealizarDevolucionAlmacen = 1;
}
}
else
{
retorno = new Modelos.Factura.MCancelacionVentaMensaje();
retorno.Mensaje = "No se pudo verificar si tiene remisiones relacionadas";
retorno.HuboError = true;
return retorno;
}
}
}
bool AplicaCancelacionConPagos = false; bool AplicaCancelacionConPagos = false;
if (UsuarioActual.Empresa.Funcionalidad(382) == "1" || UsuarioActual.Empresa.Funcionalidad(109) == "1" ) if (UsuarioActual.Empresa.Funcionalidad(382) == "1" || UsuarioActual.Empresa.Funcionalidad(109) == "1")
{ {
AplicaCancelacionConPagos = true; AplicaCancelacionConPagos = true;
} }
if (UsuarioActual.TienePermisoProceso(269) && UsuarioActual.Empresa.Funcionalidad(109) == "1" && factura.TipoDocto == "Ing" && factura.SaldoAlmacen != 0)
{
factura.RealizarDevolucionAlmacen = 1;
}
retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse, AplicaCancelacionConPagos: AplicaCancelacionConPagos); retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse, AplicaCancelacionConPagos: AplicaCancelacionConPagos);
} }

File diff suppressed because it is too large Load Diff

View File

@@ -5030,9 +5030,14 @@ Partial Class Ventas
BtnArchivoAdjunto.Visible = True BtnArchivoAdjunto.Visible = True
BtnEliminarAdjunto.Visible = True BtnEliminarAdjunto.Visible = True
BtnAdjuntar.Visible = False BtnAdjuntar.Visible = False
BtnReemplazarAdjunto.Visible = True
If Request("CveVenta") IsNot Nothing Then
BtnReemplazarAdjunto.Visible = True
End If
Else Else
BtnReemplazarAdjunto.Visible = True If Request("CveVenta") IsNot Nothing Then
BtnReemplazarAdjunto.Visible = True
End If
End If End If
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero() ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
@@ -6070,19 +6075,23 @@ Partial Class Ventas
ThCantidadFacturada2.Visible = False ThCantidadFacturada2.Visible = False
End If End If
'ACTIVA EDITAR 'SI ES FACTURACION DIRECTA DESDE URL NO CARGAR LOS BOTONES
'SOLO LA PUEDE EDITAR USUATIOACTUAL-VENDEDOR | NO DEBE ESTAR FACTURADA If Request("CveCotizacion") Is Nothing Then
If (UsuarioActual.CveUsuario = DbRowVenta("CveUsuario").ToString().ToEntero() Or UsuarioActual.CveVendedor = DdlVendedor.SelectedValue.ToEntero()) And TmpDT.SUM("CantidadFacturadaCot") = 0 Then 'And TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad") 'ACTIVA EDITAR
BtnPermisoEditarCotizacion.Visible = True 'SOLO LA PUEDE EDITAR USUATIOACTUAL-VENDEDOR | NO DEBE ESTAR FACTURADA
If (UsuarioActual.CveUsuario = DbRowVenta("CveUsuario").ToString().ToEntero() Or UsuarioActual.CveVendedor = DdlVendedor.SelectedValue.ToEntero()) And TmpDT.SUM("CantidadFacturadaCot") = 0 Then 'And TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad")
BtnPermisoEditarCotizacion.Visible = True
End If
'SOLO LA PUEDE EDITAR USUATIOACTUAL-VENDEDOR | NO DEBE ESTAR FACTURADA
If UsuarioActual.TienePermisoProceso(281) And TmpDT.SUM("CantidadFacturadaCot") = 0 Then 'And TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad")
BtnPermisoEditarCotizacion.Visible = True
End If
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
VerificarBtnFacturarCotizacion(DbRowVenta("CveVendedor").ToString().ToEntero())
End If End If
'SOLO LA PUEDE EDITAR USUATIOACTUAL-VENDEDOR | NO DEBE ESTAR FACTURADA
If UsuarioActual.TienePermisoProceso(281) And TmpDT.SUM("CantidadFacturadaCot") = 0 Then 'And TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad")
BtnPermisoEditarCotizacion.Visible = True
End If
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
VerificarBtnFacturarCotizacion(DbRowVenta("CveVendedor").ToString().ToEntero())
End If End If
If DbRowVenta("TipoDocto").ToString().Contiene("Ped") Then If DbRowVenta("TipoDocto").ToString().Contiene("Ped") Then
@@ -6115,6 +6124,11 @@ Partial Class Ventas
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ped") Then BtnPermisoEditarRemision.Visible = True If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ped") Then BtnPermisoEditarRemision.Visible = True
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
'OCULTAR BOTON DE EDICION SI SE FACTURA COTIZACION DESDE URL
If UsuarioActual.Empresa.Funcionalidad(558) <> "1" AndAlso Request("CveCotizacion") IsNot Nothing Then
BtnEditar.Visible = False
End If
If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then
RblPaqueteria.SelectedValue = If(DbRowVenta("FormaPaqueteria").ToString = "", "1", DbRowVenta("FormaPaqueteria").ToString) RblPaqueteria.SelectedValue = If(DbRowVenta("FormaPaqueteria").ToString = "", "1", DbRowVenta("FormaPaqueteria").ToString)
RblPaqueteria.Enabled = False RblPaqueteria.Enabled = False
@@ -6241,6 +6255,38 @@ Partial Class Ventas
End If End If
End If End If
Dim Addenda = DbRowVenta("Addenda").ToString()
If Not String.IsNullOrEmpty(Addenda) Then
Try
Dim ObjAddenda As New Modelos.M_REM
Addenda = Addenda.Replace("<cfdi:Addenda>", "")
Addenda = Addenda.Replace("</cfdi:Addenda>", "")
Dim strAddenda As New StringBuilder()
strAddenda.Append("<?xml version=""1.0""?>")
strAddenda.Append(Addenda)
Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(ObjAddenda.GetType())
Dim string_reader As TextReader = New System.IO.StringReader(strAddenda.ToString())
ObjAddenda = DirectCast(serializer.Deserialize(string_reader), Modelos.M_REM)
If ObjAddenda IsNot Nothing Then
TxtNOS.Text = ObjAddenda.NOS
TxtOR.Text = ObjAddenda._OR
TxtCLUES.Text = ObjAddenda.CLUES
TxtContrato.Text = ObjAddenda.CONTRATO
TxtFEEX.Text = ObjAddenda.FEEX
TxtFERE.Text = ObjAddenda.FERE
TxtFEEN.Text = ObjAddenda.FEEN
End If
Catch ex As Exception
OnError("Ocurrió un error al cargar los datos de la addenda", ex)
End Try
End If
End If End If
End Using End Using
End If End If
@@ -7298,7 +7344,7 @@ Partial Class Ventas
BtnModalClienteDocumentoCancelar.Visible = False BtnModalClienteDocumentoCancelar.Visible = False
If CveVenta <= 0 Then If CveVenta <= 0 Then
LnkUploadDocumentacionCliente.Visible = True LnkUploadDocumentacionCliente.Visible = UsuarioActual.Empresa.Funcionalidad(382) <> "1"
End If End If
UpModalTitleUploadDocumentoCliente.Update() UpModalTitleUploadDocumentoCliente.Update()
@@ -10165,7 +10211,8 @@ Partial Class Ventas
End If End If
If RequiereOC AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Ing") AndAlso Not CveDevolucion > 0 Then If RequiereOC AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Ing") AndAlso Not CveDevolucion > 0 Then
If Not CargaDocumentoOC Then
If Not CargaDocumentoOC AndAlso UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
Alert("Tiene que cargar un archivo de orden de compra", TipoMensaje.MsgAdvertencia) Alert("Tiene que cargar un archivo de orden de compra", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
@@ -12103,7 +12150,7 @@ Partial Class Ventas
'**** IMPUESTOS LOCALES '**** IMPUESTOS LOCALES
factura.DtDetalle = tmpcon factura.DtDetalle = tmpcon
Dim TotalSubTotal As Decimal = tmpcon.SUMD("TotalImporte") Dim TotalSubTotal As Decimal = tmpcon.SUMD("TotalImporte").RoundSQL(2)
Dim TotalDescuentos As Decimal = tmpcon.SUMD("Descuento") Dim TotalDescuentos As Decimal = tmpcon.SUMD("Descuento")
Dim TotalIVA As Decimal = tmpcon.SUMD("ImporteIVA") Dim TotalIVA As Decimal = tmpcon.SUMD("ImporteIVA")
@@ -12885,6 +12932,49 @@ Partial Class Ventas
End If End If
End If End If
'AGREGA LA ADDENDA DESDE AQUI PARA QUE SE GUARDE LA INFORMACION DEL CAMPO
If ObjFactura.TipoDocto = "Ing" AndAlso Not String.IsNullOrEmpty(TxtNOS.Text.Trim()) Then
Dim Obj_REM As New Modelos.M_REM
Obj_REM.NOS = TxtNOS.Text
Obj_REM._OR = TxtOR.Text
Obj_REM.CLUES = TxtCLUES.Text
Obj_REM.CONTRATO = TxtContrato.Text
Obj_REM.FEEX = TxtFEEX.Text
Obj_REM.FEEN = TxtFEEN.Text
Obj_REM.FERE = TxtFERE.Text
Dim xmlRem As String = ""
Try
Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(Obj_REM.GetType)
Dim string_writer As New System.IO.StringWriter
serializer.Serialize(string_writer, Obj_REM)
xmlRem = string_writer.ToString()
'QUITAR NAMESPACES Y ETIQUETAS NO NECESARIAS
If xmlRem <> "" Then
xmlRem = xmlRem.Replace("<?xml version=""1.0"" encoding=""utf-16""?>", "")
xmlRem = xmlRem.Replace("xmlns:xsd=""http://www.w3.org/2001/XMLSchema""", "")
xmlRem = xmlRem.Replace("xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""", "")
End If
Catch ex As Exception
xmlRem = ""
OnError("Ocurrió un error al guardar los datos de la addenda", ex)
End Try
If Not String.IsNullOrEmpty(xmlRem) Then
Dim SB As New StringBuilder
SB.Append("<cfdi:Addenda>")
SB.AppendFormat("{0}", xmlRem)
SB.Append("</cfdi:Addenda>")
ObjFactura.Addenda = SB.ToString()
End If
End If
End Sub End Sub
Private Sub CreaObjetosVentaDevolucion() Private Sub CreaObjetosVentaDevolucion()
@@ -13609,6 +13699,7 @@ Partial Class Ventas
} }
End If End If
End If End If
Return Timbre Return Timbre
@@ -14148,7 +14239,7 @@ Partial Class Ventas
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta, CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir, CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir,
Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text, CveMotivoDevolucion:=CveMotivoDevolucion) Then Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text, CveMotivoDevolucion:=CveMotivoDevolucion, Addenda:=factura.Addenda) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else Else
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
@@ -39162,6 +39253,5 @@ Partial Class Ventas
' End Sub ' End Sub
'End Class 'End Class
End Class End Class