Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2154,18 +2154,30 @@ Public Class ClsPaginas
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
'Property GlobalDTBancosCuentas(CveUsuario As Integer) As DataTable
|
||||
' Get
|
||||
' Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
|
||||
' If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario ={1}", Str, CveUsuario)
|
||||
' Dim Dv As New DataView(DirectCast(Application("GlobalDTBancosCuentas"), DataTable), Str, "", DataViewRowState.CurrentRows)
|
||||
' GlobalDTBancosCuentas = Dv.ToTable
|
||||
' Dv.Dispose()
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' Application("GlobalDTBancosCuentas") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Public Shared Property GlobalDTBancosCuentasGral(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveTipoCuenta As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTBancosCuentasGral-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Using ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancosCuentas(-1, CveEmpresa) Then
|
||||
HttpContext.Current.Application(AppNombre) = ObjBancos.DtResultados
|
||||
Else
|
||||
HttpContext.Current.Application(AppNombre) = Nothing
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
Dim Str As String = String.Format("CveEmpresa = {0} ", CveEmpresa)
|
||||
If CveTipoCuenta > -1 Then Str = String.Format("{0} AND CveTipoCuenta = {1}", Str, CveTipoCuenta)
|
||||
If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTBancosCuentasGral = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTBancosCuentasGral-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Shared Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTBancosCuentas-{CveEmpresa}"
|
||||
|
||||
@@ -1656,36 +1656,6 @@ Partial Class Compras_Compras
|
||||
DdlTipoComprobante_SelectedIndexChanged(Nothing, Nothing)
|
||||
DdlTipoCompra.SelectedValueExist(15)
|
||||
DdlTipoCompra_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
|
||||
'For Each gvRow As GridViewRow In GvFacturaNC.Rows
|
||||
' If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
|
||||
' Dim SerieFolioFacura As String = ObtenerUltimaParte(gvRow.DataKey("SerieFolio"))
|
||||
' Dim seleccion As String = ""
|
||||
|
||||
' For Each item As ListItem In DdlRemisionNotaCredito.Items
|
||||
' Dim serieFolioItem As String = ObtenerUltimaParte(item.Text)
|
||||
' If SerieFolioFacura = serieFolioItem Then
|
||||
' 'seleccion = item.Value
|
||||
' AutoSelRNC = True
|
||||
' DdlRemisionNotaCredito.SelectedValueExist(item.Value)
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
' If AutoSelRNC Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'Next
|
||||
|
||||
If AutoSelRNC Then
|
||||
'DdlRemisionNotaCredito_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
HLAplicaNCFact.Visible = True
|
||||
UpPS.Update()
|
||||
UpEstatus.Update()
|
||||
|
||||
@@ -15189,8 +15159,6 @@ Partial Class Compras_Compras
|
||||
UpGvOC1.Update()
|
||||
TmpDT = TmpDT.FiltraParametros("", "PU")
|
||||
|
||||
|
||||
|
||||
'PROCESO DE ASIGNACION DE CANTIDAD DEPENDIENDO DEL NoIdentificacion DEL XML Y EL NumeroParte DEL PRODUCTO
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
For Each Gvr As GridViewRow In GvOC1.Rows
|
||||
@@ -15446,17 +15414,13 @@ Partial Class Compras_Compras
|
||||
Vinculacion()
|
||||
ElseIf Math.Abs(LbSubTotalOC2.Text.ToDecimal - (LbSubTotalOC1.Text.ToDecimal - LbAnticiposOC2.Text.ToDecimal)) < DiferenciaPermitida Then
|
||||
LbSubTotalDif.Visible = False
|
||||
Vinculacion()
|
||||
Else
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then
|
||||
|
||||
ImporteRNC = (SubTotalCompra - SubTotalGV).RoundSQL(2)
|
||||
ImporteRNCProntoPago = (SubTotalCompra * PorcentajeProntoPago).RoundSQL(2)
|
||||
|
||||
Dim ImporteOCConIVA As Decimal = 0D
|
||||
Dim ImporteOCSinIVA As Decimal = 0D
|
||||
|
||||
Dim ImporteCompraConIVA As Decimal = TmpDT.SUM("Total", " IVAPorcentaje > 0 ")
|
||||
Dim ImporteCompraSinIVA As Decimal = TmpDT.SUM("Total", " IVAPorcentaje = 0 ")
|
||||
|
||||
@@ -15472,18 +15436,45 @@ Partial Class Compras_Compras
|
||||
AjusteProntoPagoConIVA = (ImporteCompraConIVA - ImporteOCConIVA)
|
||||
AjusteProntoPagoSinIVA = (ImporteCompraSinIVA - ImporteOCSinIVA)
|
||||
|
||||
If ConfirmaVinculacionOCProntoPago(AjusteProntoPagoPorcentajeIVA) Then
|
||||
If ConfirmaVinculacionOC_RNC(AjusteProntoPagoPorcentajeIVA) Then
|
||||
Vinculacion()
|
||||
End If
|
||||
Else
|
||||
Vinculacion()
|
||||
End If
|
||||
Else
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then
|
||||
|
||||
ImporteRNC = (SubTotalCompra - SubTotalGV).RoundSQL(2)
|
||||
ImporteRNCProntoPago = (SubTotalCompra * PorcentajeProntoPago).RoundSQL(2)
|
||||
|
||||
Dim ImporteOCConIVA As Decimal = 0D
|
||||
Dim ImporteOCSinIVA As Decimal = 0D
|
||||
Dim ImporteCompraConIVA As Decimal = TmpDT.SUM("Total", " IVAPorcentaje > 0 ")
|
||||
Dim ImporteCompraSinIVA As Decimal = TmpDT.SUM("Total", " IVAPorcentaje = 0 ")
|
||||
|
||||
For Each gvr As GridViewRow In GvOC1.Rows
|
||||
If gvr.DataKey("IVAPorcentaje").ToDecimal > 0 Then
|
||||
ImporteOCConIVA = ImporteOCConIVA + (gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal)
|
||||
Else
|
||||
ImporteOCSinIVA = ImporteOCSinIVA + (gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal)
|
||||
End If
|
||||
Next
|
||||
|
||||
AjusteProntoPagoPorcentajeIVA = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||
AjusteProntoPagoConIVA = (ImporteCompraConIVA - ImporteOCConIVA)
|
||||
AjusteProntoPagoSinIVA = (ImporteCompraSinIVA - ImporteOCSinIVA)
|
||||
|
||||
If ConfirmaVinculacionOC_RNC(AjusteProntoPagoPorcentajeIVA) Then
|
||||
Vinculacion()
|
||||
End If
|
||||
Else
|
||||
LbSubTotalDif.Visible = True
|
||||
LbSubTotalDif.Text = (SubTotalCompra - SubTotalGV).FormatoNumero
|
||||
Alert("Los SubTotales de la vinculación no coinciden. Rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia,,)
|
||||
RegistraScript("CalculaTotalesOC();")
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpEstatus.Update()
|
||||
@@ -15617,7 +15608,7 @@ Partial Class Compras_Compras
|
||||
IndexTmpOriginal += 1
|
||||
Next
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 AndAlso (AjusteProntoPagoConIVA > 0 Or AjusteProntoPagoSinIVA > 0) Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(574) = "1" AndAlso (AjusteProntoPagoConIVA > 0 Or AjusteProntoPagoSinIVA > 0) Then
|
||||
|
||||
Dim CvePS_RNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero
|
||||
If CvePS_RNC = 0 Then
|
||||
@@ -15637,9 +15628,6 @@ Partial Class Compras_Compras
|
||||
Dim Clasificacion As String = PSRow("Clasificacion").ToString
|
||||
Dim PS As String = PSRow("PS").ToString
|
||||
Dim CveUM As Integer = PSRow("CveUnidadMedida").ToString.ToEntero
|
||||
|
||||
|
||||
|
||||
Dim DTConIVA As DataTable = TmpDT.FiltraParametros(" IVAPorcentaje > 0")
|
||||
If DTConIVA.Rows.Count > 0 Then
|
||||
|
||||
@@ -15680,7 +15668,6 @@ Partial Class Compras_Compras
|
||||
Tab.ActiveTabIndex = 0
|
||||
UpTabs.Update()
|
||||
|
||||
|
||||
ImgClasificacion.Visible = False
|
||||
ImgSubProyecto.Visible = False
|
||||
LbAgregar.Visible = False
|
||||
@@ -16559,8 +16546,9 @@ Partial Class Compras_Compras
|
||||
If DdlTipoCompra.Items.FindByValue("15") Is Nothing Then
|
||||
DdlTipoCompra.Items.Add(New ListItem("Remision Nota De Crédito", "15"))
|
||||
UpEstatus.Update()
|
||||
'oculta el botón para aplicar el saldo, esto bloquea que no duplique el abono.
|
||||
HLAplicaNCFact.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
DivReembolso.Visible = True
|
||||
@@ -17204,9 +17192,9 @@ Partial Class Compras_Compras
|
||||
Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ")
|
||||
If NumNoDed > 0 Then GvPS.Columns(11).Visible = True 'visualiza columnas de nodeducibles
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 Then
|
||||
InicializaAplicaNCFact()
|
||||
End If
|
||||
'If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 Then
|
||||
' InicializaAplicaNCFact()
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Private Sub OriginalesVisible(Accion As Boolean)
|
||||
@@ -21824,12 +21812,11 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Function ConfirmaVinculacionOCProntoPago(AjusteProntoPagoPorcentajeIVA As Decimal) As Boolean
|
||||
Public Function ConfirmaVinculacionOC_RNC(AjusteProntoPagoPorcentajeIVA As Decimal) As Boolean
|
||||
|
||||
If VincularOcProntoPago Then
|
||||
Return True
|
||||
Else
|
||||
|
||||
Dim TmpImporteRNC As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, ImporteRNC + (ImporteRNC * AjusteProntoPagoPorcentajeIVA), ImporteRNC)
|
||||
Dim TmpImporteRNCProntoPago As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, ImporteRNCProntoPago + (ImporteRNCProntoPago * AjusteProntoPagoPorcentajeIVA), ImporteRNCProntoPago)
|
||||
|
||||
|
||||
@@ -3323,7 +3323,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
using (ClsNominas objRH = new ClsNominas())
|
||||
{
|
||||
|
||||
if (objRH.GETPersonalVacaciones(UsuarioActual.CveEmpresa, SRCvePersonal))
|
||||
if (objRH.GetPersonalVacaciones(UsuarioActual.CveEmpresa, SRCvePersonal))
|
||||
{
|
||||
GvVacaciones.DataSource = objRH.DtResultados;
|
||||
|
||||
@@ -3345,7 +3345,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
ChkVacCobrarIMSS.Checked = true;
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GETPersonalVacResumen(UsuarioActual.Empresa.CveEmpresa, SRCvePersonal))
|
||||
if (objnom.GetPersonalVacResumen(UsuarioActual.Empresa.CveEmpresa, SRCvePersonal))
|
||||
{
|
||||
DdlVacPeriodo.DataSource = objnom.DtResultados;
|
||||
DdlVacPeriodo.DataBind();
|
||||
|
||||
@@ -2748,6 +2748,13 @@ Partial Class OC_OC
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If ModalidadSubProyectoGeneral Then
|
||||
Dim t As Integer = DtDetalle.COUNT("CvePS", $"CveSubProyecto <> {DdlSubProyectoGral.SelectedValue}")
|
||||
If t > 0 Then
|
||||
Alert("Se tienen partidas de diferentes Sucursales.", TipoMensaje.MsgAdvertencia)
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
|
||||
'VALIDA QUE ANTES DE QUE PUEDA MANDARLA A SUPERVISADA SE TIENE QUE SELECCIONAR UN PROVEEDOR
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
||||
@@ -4054,12 +4061,10 @@ Partial Class OC_OC
|
||||
e.Row.FCLabel("LtlCantidad").Attributes.Add("data-toggle", "tooltip")
|
||||
e.Row.FCLabel("LtlCantidad").Attributes.Add("Title", e.Row.DataKey("CveOrdenCompraDetalle"))
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Normal Or e.Row.RowState = DataControlRowState.Alternate Then
|
||||
|
||||
@@ -2295,8 +2295,8 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
If DdlEmpresaAsignaciones.SelectedValue.ToEntero > 0 Then
|
||||
If UsuarioControlado Then
|
||||
DdlCuentasBancarias.DataSource = DtCuentasBancariasControlado.FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}")
|
||||
Else
|
||||
DdlCuentasBancarias.DataSource = GlobalDTBancosCuentas(-1, -1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}", "", {"CveCuenta", "NumCuentaMoneda"})
|
||||
Else
|
||||
DdlCuentasBancarias.DataSource = GlobalDTBancosCuentasGral(CveEmpresa)
|
||||
End If
|
||||
End If
|
||||
DdlCuentasBancarias.DataBind()
|
||||
|
||||
@@ -591,7 +591,7 @@ Partial Class RepContratoDetalle
|
||||
|
||||
If Not 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, ChkEsPresupuestal.Checked, 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, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -320,8 +320,6 @@
|
||||
<asp:LinkButton ID="LBDevolucionAlmacen" OnClick="LBDevolucionAlmacen_Click" runat="server" Text="<i class='fa fa-pencil'></i> Solicitar Devolución Almacén" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de solicitar la Devolución de Almacén?" data-btn-ok-label="si" />
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LbDescargarExcel" Visible="false" OnClick="LbDescargarExcel_Click" runat="server"><i class='fa fa-file-excel-o'></i> Descargar Formato</asp:LinkButton>
|
||||
</li>--%>
|
||||
@@ -344,7 +342,7 @@
|
||||
<asp:LinkButton ID="LnkGenerarOC" OnClick="LnkGenerarOC_Click" title="Generar Orden de Compra!" runat="server"><i class="fa fa-tags"></i> Generar Orden de Compra</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<asp:UpdatePanel ID="UPPDescontabilizar" runat="server" UpdateMode="Conditional">
|
||||
<%--<asp:UpdatePanel ID="UPPDescontabilizar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnContabilizar" runat="server" Text="<i class='fa fa-plus-square'></i>Contabilizar" Visible="false" />
|
||||
@@ -357,7 +355,7 @@
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnDescontabilizar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HLModalFletes" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#ModalFletes" runat="server"><i class='fa fa-truck'></i> Fletes</asp:HyperLink>
|
||||
@@ -402,19 +400,14 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCancelarSoloCFDI" Visible="false" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea cancelar el CFDI?" data-btn-ok-label="si" OnClick="LnkCancelarSoloCFDI_Click"><i class="fa fa-plus"></i>Cancelar solo CFDI</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HLFAgregarOS" Target="_blank" runat="server" Visible="false"> <i class="fa fa-plus"></i> Agregar Orden de Servicio</asp:HyperLink>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
||||
<asp:PostBackTrigger ControlID="BtnContabilizar" />
|
||||
<asp:PostBackTrigger ControlID="BtnContabilizar" />
|
||||
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirFormatoCicovisa" />
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirFormatoTelcel" />
|
||||
<%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%>
|
||||
<%-- <asp:PostBackTrigger ControlID="LbDescargarExcel" />--%>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirFormatoTelcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -951,16 +944,7 @@
|
||||
<asp:Label ID="LblMotivoCancelacion" runat="server"></asp:Label>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" id="trContabilizada" runat="server" visible="False">
|
||||
<td><b>Contabilizada:</b></td>
|
||||
<td>
|
||||
<asp:HyperLink ID="HLContabilizada" Target="_blank" runat="server" Text="No"></asp:HyperLink>
|
||||
<asp:HyperLink ID="HPLContaCancelacion" Target="_blank" runat="server" Text=""></asp:HyperLink>
|
||||
<%-- <asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" Visible="false" CssClass="btn btn-success" />--%>
|
||||
<%--<asp:Button ID="BtnDescontabilizar" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar la poliza?" data-btn-ok-label="si" Text="Descontabilizar" runat="server" OnClick="BtnDescontabilizar_Click" CssClass="btn btn-default" Style="margin-left: 20px;" Visible="false" />--%>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td><b>Se timbró:</b> </td>
|
||||
<td>
|
||||
|
||||
@@ -3294,7 +3294,7 @@ Partial Class Ventas
|
||||
|
||||
CargaFormatoSucursal()
|
||||
|
||||
InicializaDevolucionAlmacen()
|
||||
'InicializaDevolucionAlmacen()
|
||||
'CargaOtrosConceptos()
|
||||
CargaFacturaOC()
|
||||
|
||||
@@ -5827,30 +5827,6 @@ Partial Class Ventas
|
||||
End If
|
||||
IdPoliza = DbRowVenta("IdPoliza").ToString().ToEntero()
|
||||
|
||||
'Carga si es Contabilizada
|
||||
If IdPoliza > 0 Then
|
||||
HLContabilizada.Text = "Si"
|
||||
HLContabilizada.NavigateUrl = $"/Contabilidad/RegPoliza.aspx?IdPoliza={DbRowVenta("IdPoliza")}"
|
||||
trContabilizada.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(107) Then BtnDescontabilizar.Visible = True
|
||||
|
||||
Else
|
||||
'cuando no este contabilizada y usa AC, habilita el boton para generar la poliza
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.CveRol = 1 Then
|
||||
BtnGenerarPoliza.Visible = True
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
BtnContabilizar.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If DbRowVenta("IdPolizaCancelacion").ToString().ToEntero() > 0 Then
|
||||
HPLContaCancelacion.Text = "Cancelación"
|
||||
HPLContaCancelacion.NavigateUrl = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", DbRowVenta("IdPolizaCancelacion"))
|
||||
trContabilizada.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaOS AndAlso DbRowVenta("CveOS").ToString().ToEntero() = 0 Then
|
||||
BtnGenerarOS.Visible = True
|
||||
BtnGenerarOS.OnClientClick = String.Format("javascriptwindow.location.href = '/OS/OrdenesServicios.aspx?CveVenta={0}'; return false;", CveVenta)
|
||||
@@ -7298,7 +7274,8 @@ Partial Class Ventas
|
||||
|
||||
CargarAlmacenes()
|
||||
|
||||
CargaDocumentacionCliente()
|
||||
'RMF. 2024.12.07, verificar cuando se debe de cargar.
|
||||
'CargaDocumentacionCliente()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 1, 119) Then
|
||||
BtnEmitirImprimir.OnClientClick = $"ValidaGuardar({ If(ImprimeNombreSucursal = True, 1, 0)});"
|
||||
@@ -21794,9 +21771,9 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
HLCargaCotizaciones.Visible = True
|
||||
HlAgregarExcel.Visible = False
|
||||
Else
|
||||
HLCargaCotizaciones.Visible = False
|
||||
HlAgregarExcel.Visible = True
|
||||
'Else
|
||||
' HLCargaCotizaciones.Visible = False
|
||||
' HlAgregarExcel.Visible = True
|
||||
End If
|
||||
|
||||
Dim PuedeVerCosto As Boolean = UsuarioActual.TienePermisoProceso(201) OrElse UsuarioActual.TienePermisoProceso(385)
|
||||
@@ -23678,36 +23655,7 @@ Partial Class Ventas
|
||||
RegistraScript("$('#DivMotivoRefacturacion').modal({ backdrop: 'static', keyboard: false });", "R1")
|
||||
'CancelarDocumento(True)
|
||||
End Sub
|
||||
Private Sub BtnContabilizar_Click(sender As Object, e As System.EventArgs) Handles BtnContabilizar.Click
|
||||
'Dim ObjMov As New ClsContabilidad
|
||||
'Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
|
||||
|
||||
'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, 2) Then
|
||||
' Alert(alertaContabilizacion & ObjMov.AlertaMensaje, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
'Else
|
||||
' Alert(String.Format("Ocurrio un error al contabilizar {0}", ObjMov.AlertaMensaje))
|
||||
'End If
|
||||
|
||||
'ObjMov.Dispose()
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnDescontabilizar_Click(sender As Object, e As EventArgs)
|
||||
'Alert("Hola entre", TipoMensaje.MsgError)
|
||||
'Exit Sub
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim Movimientos As Integer = ObjConta.GetMovimientosPoliza(IdPoliza, UsuarioActual.CveEmpresa)
|
||||
|
||||
'Verifica que solo exista 1 compra asociada
|
||||
If Movimientos = 1 Then
|
||||
EliminaPoliza()
|
||||
Else
|
||||
RegistraScript("ConfirmEliminarPolizaMultiple();")
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
Private Sub BtnMateriales_Click(sender As Object, e As EventArgs) Handles BtnMateriales.Click
|
||||
Dim OS As New ClsOS
|
||||
Dim DtDetalle As DataTable = Nothing
|
||||
@@ -25510,7 +25458,9 @@ Partial Class Ventas
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev" OrElse (DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = NowADS().Month And TxtFecha.Text.ToDate.Year = NowADS().Year)) Then
|
||||
If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse
|
||||
DdlTipoComprobante.SelectedValue = "Dev" OrElse
|
||||
(DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = NowADS().Month And TxtFecha.Text.ToDate.Year = NowADS().Year)) Then
|
||||
|
||||
If Not DevolucionAlmacen = 2 Then
|
||||
'If UsuarioActual.Empresa.Funcionalidad(555) = "1" Then
|
||||
@@ -28409,7 +28359,7 @@ Partial Class Ventas
|
||||
Dim TipoDocumento As Integer = If(CveVenta <= 0, 14, -1)
|
||||
|
||||
If CveVenta <= 0 AndAlso TempCliente <= 0 Then
|
||||
Dim a As String = "carga de docuemntacion del cleinte, masivo, corregir"
|
||||
Dim a As String = "carga de documentacion del cliente, masivo, corregir"
|
||||
a.GuardaLog()
|
||||
End If
|
||||
|
||||
@@ -28446,7 +28396,6 @@ Partial Class Ventas
|
||||
UpModalButtonUploadDocumentoCliente.Update()
|
||||
RegistraScript("$('#DivDocsClienteUpload').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnModalClienteDocumentoUpload_Click(sender As Object, e As EventArgs) Handles BtnModalClienteDocumentoUpload.Click
|
||||
|
||||
Reference in New Issue
Block a user