Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1488,7 +1488,7 @@ Public Class ClsBancos
|
||||
Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1,
|
||||
Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False,
|
||||
Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1,
|
||||
Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha) As Integer
|
||||
Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha, Optional CveAutorizacion As String = "") As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Banc_IEAdd")
|
||||
@@ -1531,6 +1531,7 @@ Public Class ClsBancos
|
||||
.Add("@ImporteDeduccionesPago", SqlDbType.Money).Value = ImporteDeduccionesPago
|
||||
.Add("@AnticipoPuntual", SqlDbType.Bit).Value = AnticipoPuntual
|
||||
.Add("@FechaEmision", SqlDbType.Date).Value = FechaEmision
|
||||
.Add("@CveAutorizacion", SqlDbType.VarChar).Value = CveAutorizacion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1678,7 +1678,8 @@ Public Class ClsClientes
|
||||
Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, CveEstado As Integer,
|
||||
RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1, Optional RegimenSociedad As String = "-1",
|
||||
Optional TipoPersona As Boolean = False, Optional CveRegimenFiscal As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional Genero As Boolean = True) As Boolean
|
||||
Optional TipoPersona As Boolean = False, Optional CveRegimenFiscal As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional Genero As Boolean = True,
|
||||
Optional CveClienteClasificacion As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_ClientesNoFrecuenteAdd")
|
||||
|
||||
@@ -1707,6 +1708,7 @@ Public Class ClsClientes
|
||||
.Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona
|
||||
.Add("@CveRegimenFiscal", SqlDbType.Int).Value = CveRegimenFiscal
|
||||
.Add("@CveUsoCFDI", SqlDbType.Int).Value = CveUsoCFDI
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@Genero", SqlDbType.Int).Value = Genero
|
||||
|
||||
End With
|
||||
|
||||
@@ -330,7 +330,7 @@ Public Class LogicNominas
|
||||
cfdi.Emisor.RFC = UsuarioActual.Empresa.RFC
|
||||
cfdi.Emisor.RegimenFiscal = UsuarioActual.Empresa.CodigoRegimenFiscal
|
||||
'aplica persona fisica debe de tener CURP
|
||||
If cfdi.Emisor.RegimenFiscal.Contiene("605", "606", "608", "611", "612", "614", "616", "621", "622", "629", "630", "615") Then
|
||||
If cfdi.Emisor.RegimenFiscal.Contiene("605", "606", "608", "611", "612", "614", "616", "621", "622", "629", "630", "615", "626") OrElse cfdi.Emisor.RFC.Length = 13 Then
|
||||
cfdi.Emisor.CURP = UsuarioActual.Empresa.CURP
|
||||
End If
|
||||
cfdi.Nomina.CveNomina = CveNomina
|
||||
|
||||
@@ -58,7 +58,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim FechaF As Date = context.Request("end").ToDate
|
||||
Dim Cvecliente As Integer = -1 'DdlClienteSucursalCliente()
|
||||
Dim CveClienteSucursal As Integer = -1 ' DdlClienteSucursalSucursal()
|
||||
Dim CveVendedor As Integer = -1
|
||||
Dim CveVendedor As Integer = If(context.Request("CveVendedor") IsNot Nothing, context.Request("CveVendedor").ToEntero, -1)
|
||||
Dim CveEstatus As Integer = -1
|
||||
Dim ObjOS As New ClsOS
|
||||
|
||||
|
||||
@@ -41,6 +41,12 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim StrEncriptPrueba As String = Encripta($"OP=DC&CveIE={2784391}&CuentaCaja={"TestCuantaCaja"}&CuentaDepo={"Test cuenta"}")
|
||||
HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={StrEncriptPrueba}"
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If DdlTipoPago.Items.FindByValue("-1") IsNot Nothing Then
|
||||
DdlTipoPago.Items.Remove(DdlTipoPago.Items.FindByValue("-1"))
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -327,7 +333,7 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
If CveSubProyecto <= 0 Then
|
||||
'se saca de la cuenta de la caja chica
|
||||
CveSubProyecto = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, Estatus:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto")
|
||||
CveSubProyecto = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, Estatus:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -246,11 +246,19 @@
|
||||
<br />
|
||||
<asp:CheckBox ID="ChkAplicaViatico" CssClass="md-checksd" Text="Aplica Viaticos" runat="server" Visible="false" align="Right" />
|
||||
<asp:CheckBox ID="ChkAnticipoPuntual" CssClass="md-checksd" ClientIDMode="Static" runat="server" Text="Anticipo Puntual" Visible="false"></asp:CheckBox>
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
<div class="row" id="DivCveAutorizacion" runat="server" visible="false">
|
||||
<label class="col-md-2 control-label">
|
||||
<asp:Label runat="server" Text="Clave de autorización:"></asp:Label>
|
||||
</label>
|
||||
<label class="col-md-10 control-label">
|
||||
<asp:Label ID="LblCveAutorizacion" runat="server" ></asp:Label>
|
||||
</label>
|
||||
</div>
|
||||
<div id="DivOtrosIngresosEgresos" runat="server" visible="false" class="row">
|
||||
|
||||
<label class="col-md-2 control-label ">Otros:</label>
|
||||
|
||||
@@ -815,6 +815,11 @@ Partial Class Bancos_IE
|
||||
NumComplementos = ObjIE.DtResultados(0)("NumComplementos").ToString.ToEntero
|
||||
Dim CveIEEstadoCuenta As Integer = ObjIE.DtResultados(0)("CveIEEstadoCuenta").ToString.ToEntero
|
||||
|
||||
If Not String.IsNullOrEmpty(ObjIE.DtResultados(0)("CveAutorizacion").ToString) Then
|
||||
DivCveAutorizacion.Visible = True
|
||||
LblCveAutorizacion.Text = ObjIE.DtResultados(0)("CveAutorizacion").ToString()
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(99) Then
|
||||
'BtnActualizar.Visible = True
|
||||
TxtFechaDocumento.Enabled = True
|
||||
|
||||
@@ -1644,7 +1644,7 @@
|
||||
|
||||
<asp:GridView runat="server" ID="GvOC1" AutoGenerateColumns="false"
|
||||
GridLines="None" UseAccessibleHeader="true" EmptyDataText="No se encontraron registros." CssClass="table table-striped table-hover Widthall Sortable" RowStyle-HorizontalAlign="Center"
|
||||
DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,CveTipoPS,PS,CantidadPendienteVincular,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC,Importe,CveSATPS">
|
||||
DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,CveTipoPS,PS,CantidadPendienteVincular,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC,Importe,CveSATPS,NumeroParte">
|
||||
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="10%" Visible="false">
|
||||
|
||||
@@ -3812,6 +3812,7 @@ Partial Class Compras_Compras
|
||||
Dim PorcentajeIEPS As Decimal = 0
|
||||
Dim PorcentajeRetISR As Decimal = 0
|
||||
Dim PorcentajeRetIVA As Decimal = 0
|
||||
Dim NoIdentificacion As String = ""
|
||||
Dim DtTemporalGuardados As DataTable = New DataTable
|
||||
DtTemporalGuardados.Columns.Add("Contador", GetType(Integer))
|
||||
DtTemporalGuardados.Columns.Add("Tipo", GetType(Integer))
|
||||
@@ -3871,6 +3872,7 @@ Partial Class Compras_Compras
|
||||
PorcentajeIEPS = 0
|
||||
PorcentajeRetISR = 0
|
||||
PorcentajeRetIVA = 0
|
||||
NoIdentificacion = ""
|
||||
|
||||
|
||||
'CARGA NODO ACTUAL
|
||||
@@ -3896,6 +3898,8 @@ Partial Class Compras_Compras
|
||||
'OBTIENE SUBTOTAL
|
||||
SubTotalTemp += If(Total > 0, Total, PU * ValorXML(node, "cantidad").ToDecimal)
|
||||
|
||||
'OBTIENE NoIdentificacion
|
||||
If ValorXML(node, "noIdentificacion") IsNot Nothing Then NoIdentificacion = ValorXML(node, "noIdentificacion").Trim
|
||||
|
||||
'OBTIENE UM
|
||||
If ValorXML(node, "unidad") IsNot Nothing Then UMM = ValorXML(node, "unidad").Trim
|
||||
@@ -14535,9 +14539,26 @@ Partial Class Compras_Compras
|
||||
DTOCGV = If(ArrayCveOC.Length > 1, DTOCGV.FiltraParametros("", "Producto"), DTOCGV)
|
||||
|
||||
CargaTipoCentroCostoOC()
|
||||
|
||||
GvOC1.DataSource = DTOCGV
|
||||
GvOC1.DataBind()
|
||||
|
||||
'PROCESO DE ASIGNACION DE CANTIDAD DEPENDIENDO DEL NoIdentificacion DEL XML Y EL NumeroParte DEL PRODUCTO
|
||||
If UsuarioActual.Empresa.Funcionalidad(382).ToEntero > 0 Then
|
||||
For Each Gvr As GridViewRow In GvOC1.Rows
|
||||
Dim Change As Boolean = False
|
||||
For Each Dr2 As DataRow In TmpDT.Rows
|
||||
If Gvr.DataKey("NumeroParte").ToString = Dr2("NoIdentificacion").ToString() Then
|
||||
Gvr.FCTextBox("TxtCantidad").Text = Dr2("Cantidad").ToString
|
||||
Change = True
|
||||
End If
|
||||
Next
|
||||
If Not Change Then
|
||||
Gvr.FCTextBox("TxtCantidad").Text = "0"
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim DTCVEOGV As DataTable = DTOCGV.FiltraParametros("", "", {"CveOrdenCompra"})
|
||||
If DTCVEOGV.Rows.Count > 1 Then
|
||||
GvOC1.Columns(0).Visible = True
|
||||
@@ -22011,6 +22032,7 @@ Public Class ClsCompraManagerCompras
|
||||
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
|
||||
TmpDT.Columns.Add("TemporadaCuadro", GetType(String))
|
||||
|
||||
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
|
||||
@@ -1945,7 +1945,7 @@ Partial Class Compras_RepCxP
|
||||
|
||||
Dim Filtro As String = $"{Cliente}{Sucursal}{Grupo}{FechaIn}{FechaFn}{TipoDocto}{FVI}{FVF}{ClasificacionProv}{CorteA}"
|
||||
|
||||
GvCxP.ExportToExcelGembox("ReporteCxC", UsuarioActual, "REPORTE DE CUENTAS POR PAGAR", DatoTituloExtra:=$"", DatosFiltros:=Filtro)
|
||||
GvCxP.ExportToExcelGembox("ReporteCxP", UsuarioActual, "REPORTE DE CUENTAS POR PAGAR", DatoTituloExtra:=$"", DatosFiltros:=Filtro)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -118,7 +118,6 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then
|
||||
DdlCuenta.SelectedValueExist(Request("CM").ToString)
|
||||
End If
|
||||
@@ -127,6 +126,7 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
CveProyecto = Request("CveProyecto").ToString
|
||||
DdlProyecto.SelectedValueExist(CveProyecto)
|
||||
DdlProyecto_SelectedIndexChanged(Nothing, Nothing)
|
||||
divProyecto.Visible = True
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
|
||||
@@ -172,7 +172,7 @@ Partial Class AC2_RepAnexoCatalogo
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto, VisualizacionReporte:=1)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2745,7 +2745,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
e.Row.ControlStyle.Font.Size = 13
|
||||
End If
|
||||
Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
'setgraficaCC(e)
|
||||
setgraficaProy(e)
|
||||
'Dim CveProyecto As Integer = e.Row.DataKey("CveProyecto").ToEntero
|
||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then
|
||||
|
||||
@@ -2860,7 +2860,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub setgraficaProyCC(e As GridViewRowEventArgs)
|
||||
Public Sub setgraficaProy(e As GridViewRowEventArgs)
|
||||
Dim lista As New List(Of Object)
|
||||
Dim colorindex As Integer = 0
|
||||
For Each campo As String() In listaCampos
|
||||
@@ -2893,18 +2893,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
ExportToExcelG(GvIngresosMesH, GvGastosMesH, TMesT1, "Reporte_Mensual_Horizontal", UsuarioActual, "Mensual Horizontal", Gv3:=GvTotalesMesH)
|
||||
ElseIf Tab.ActiveTabIndex = 2 AndAlso GvIngresosAnualH.Rows.Count > 0 Then
|
||||
ExportToExcelG(GvIngresosAnualH, GvGastosAnualH, TMesT1, "Reporte_Anual_Horizontal", UsuarioActual, "Anual Horizontal", Gv3:=GvTotalesAnualH)
|
||||
|
||||
ElseIf Tab.ActiveTabIndex = 3 AndAlso GvIngresosSubProyectoH.Rows.Count > 0 Then
|
||||
|
||||
ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", Gv3:=GvTotalesSubProyectoH, EsPorSubProtyecto:=True)
|
||||
|
||||
ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_CentroCosto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", Gv3:=GvTotalesSubProyectoH, EsPorSubProyecto:=True)
|
||||
ElseIf Tab.ActiveTabIndex = 4 AndAlso GvIngresosProyectoH.Rows.Count > 0 Then
|
||||
ExportToExcelG(GvIngresosProyectoH, GvGastosProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por Proyecto", EsPorSubProyecto:=True)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
'Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100)
|
||||
Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, TablaResultados As HtmlTable, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional Gv3 As GridView = Nothing, Optional EsPorSubProtyecto As Boolean = False)
|
||||
Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, TablaResultados As HtmlTable, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional Gv3 As GridView = Nothing, Optional EsPorSubProyecto As Boolean = False)
|
||||
|
||||
Dim sw1 As New StringWriter()
|
||||
Dim htw1 As New HtmlTextWriter(sw1)
|
||||
@@ -3023,7 +3022,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
If EsPorSubProtyecto And DdlSubproyecto.SelectedValue.ToEntero > 0 Then
|
||||
If EsPorSubProyecto And DdlSubproyecto.SelectedValue.ToEntero > 0 Then
|
||||
Dim RangoSubProyecto = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
|
||||
RangoSubProyecto.Merged = True
|
||||
RangoSubProyecto.Value = DdlSubproyecto.SelectedItem.Text
|
||||
@@ -3042,9 +3041,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
|
||||
|
||||
If Not EsPorSubProtyecto Then
|
||||
If Not EsPorSubProyecto Then
|
||||
worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
Else
|
||||
@@ -3052,8 +3049,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
worksheet.Rows(18).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If i > 0 Then
|
||||
Try
|
||||
worksheet.Columns(i).AutoFit(1)
|
||||
@@ -3081,11 +3076,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
End Using
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
|
||||
If I > 0 Then
|
||||
@@ -3108,7 +3098,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
|
||||
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
@@ -3117,9 +3106,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -1019,7 +1019,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
'verifico si existe
|
||||
If (DdlSubProyecto.Items.FindByValue(Mov.CveSubProyecto.ToString()) Is Nothing) Then
|
||||
Dim dr As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Mov.CveSubProyecto, Estatus:=-1).FiltroPrimero("")
|
||||
Dim dr As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Mov.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1).FiltroPrimero("")
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem(dr("SubProyecto").ToString, dr("CveSubProyecto").ToString)) ' lo genera Obj.SelectedValue = Valor.ToString
|
||||
End If
|
||||
|
||||
|
||||
@@ -656,7 +656,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, Serie As String, Lote As String, FechaCaducidad As Date) As Boolean
|
||||
Private Function ValidaExistencia(Cantidad As Decimal, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, Serie As String, Lote As String, FechaCaducidad As Date) As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
Dim ExistenciaEspecificada As Decimal
|
||||
@@ -2953,16 +2953,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Dim RowPS As DataRow = DtPS.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Codigo").ToString()))
|
||||
|
||||
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
|
||||
Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
|
||||
|
||||
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
|
||||
Dim Serie As String = RowExcel("Serie").ToString()
|
||||
Dim Lote As String = RowExcel("Lote").ToString()
|
||||
Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
|
||||
Dim Observaciones As String = RowExcel("Observaciones").ToString()
|
||||
|
||||
If CveProducto > 0 Then
|
||||
If RowPS IsNot Nothing Then
|
||||
Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero()
|
||||
Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
|
||||
Dim Cantidad As Decimal = RowExcel("Cantidad").ToString().ToDecimal()
|
||||
Dim Serie As String = RowExcel("Serie").ToString()
|
||||
Dim Lote As String = RowExcel("Lote").ToString()
|
||||
Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
|
||||
Dim Observaciones As String = RowExcel("Observaciones").ToString()
|
||||
|
||||
Dim Valido As Boolean = True
|
||||
Dim ValidarLote As Boolean = True
|
||||
@@ -3001,10 +2999,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
RowsNoCargados = RowsNoCargados + 1
|
||||
ProductosNoCargados.AppendFormat("{0},", RowPS("PSCodigo").ToString())
|
||||
End If
|
||||
|
||||
Else
|
||||
RowsNoCargados = RowsNoCargados + 1
|
||||
ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString())
|
||||
ProductosNoCargados.AppendFormat("{0}, ", RowExcel("Producto").ToString())
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -3156,9 +3153,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ElseIf DrAlmO("CveTipoAlmacen").ToString.Contiene("22") Then 'Recepcion de Usados
|
||||
|
||||
If ChkTransitorio.Checked Then
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ")
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22,2) AND Estatus = 'Activo' ")
|
||||
Else
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22) ")
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22,2) ")
|
||||
End If
|
||||
|
||||
DdlAlmacenDestino.DataBind()
|
||||
@@ -3172,6 +3169,16 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (1,21,22) ")
|
||||
End If
|
||||
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
ElseIf DrAlmO("CveTipoAlmacen").ToString.Contiene("2") Then 'herramientas -- puede regresar a usados
|
||||
|
||||
If ChkTransitorio.Checked Then
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ")
|
||||
Else
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (1,21,22) ")
|
||||
End If
|
||||
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
@@ -3456,8 +3463,3 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10525,7 +10525,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
bool ErroresValidaciones = false;
|
||||
int modalidadnomina = 1;
|
||||
if (UsuarioActual.CveEmpresa == 189) modalidadnomina = 2;
|
||||
if (UsuarioActual.CveEmpresa.Contiene(189,193,195,196,197)) modalidadnomina = 2;
|
||||
|
||||
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout:<br/>");
|
||||
|
||||
|
||||
@@ -151,7 +151,9 @@
|
||||
<label class="col-md-1 "><asp:Label Visible="false" runat="server" ID="LblSubProyectoFiltro"></asp:Label></label>
|
||||
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" Visible="false" ClientIDMode="Static" DataValueField="CveSubProyecto" DataTextField="SubProyecto" runat="server" CssClass="form-control select2me" Width="150px" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlSubProyecto" Visible="false" DataValueField="CveSubProyecto" DataTextField="SubProyecto" runat="server" CssClass="form-control select2me" Width="150px" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:HiddenField ID="HdnCveVendedor" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -758,7 +760,8 @@
|
||||
E: '<%= UsuarioActual.CveEmpresa %>',
|
||||
METODO: 'servicio_medicos',
|
||||
CveUsuarioPara: $('#DdlTecnico').val(),
|
||||
CveSubProyecto: $('#DdlSubProyecto').val()
|
||||
CveSubProyecto: $('#DdlSubProyecto').val(),
|
||||
CveVendedor: $('#HdnCveVendedor').val()
|
||||
}
|
||||
},
|
||||
eventDrop: eventDropped,
|
||||
|
||||
@@ -259,7 +259,9 @@ Partial Class OS_RepServiciosMedicos
|
||||
CargaUsuariosTecnicos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyectoEtiqueta)
|
||||
LblSubProyectoFiltro.Text = LblSubProyectoEtiqueta.Text
|
||||
' LblModalSubProyectoLabel.Text = LblSubProyectoEtiqueta.Text
|
||||
If UsuarioActual.CveVendedor > 0 Then
|
||||
HdnCveVendedor.Value = UsuarioActual.CveVendedor.ToString
|
||||
End If
|
||||
CargaTecnicos()
|
||||
ConsultaOrdenesServiciosNoAsignadas()
|
||||
CargaOrdenesServiciosNoAsignadas()
|
||||
@@ -273,7 +275,7 @@ Partial Class OS_RepServiciosMedicos
|
||||
|
||||
Private Sub CargaUsuariosTecnicos()
|
||||
|
||||
If not UsuarioActual.TienePermisoProceso(171) Then Exit Sub
|
||||
' If not UsuarioActual.TienePermisoProceso(171) Then Exit Sub
|
||||
|
||||
Dim DTTecnicosresultado As DataTable = Nothing
|
||||
DTTecnicos = New DataTable
|
||||
@@ -295,6 +297,8 @@ Partial Class OS_RepServiciosMedicos
|
||||
End If
|
||||
ObjOS.Dispose()
|
||||
|
||||
DTTecnicos = DTTecnicos.FiltraParametros("", DistinctColumns:={"CveUsuario", "Nombre"})
|
||||
|
||||
DdlTecnicoAsignar.DataSource = DTTecnicos
|
||||
DdlTecnicoAsignar.DataBind()
|
||||
DdlTecnicoAsignar.Visible = True
|
||||
@@ -345,6 +349,10 @@ Partial Class OS_RepServiciosMedicos
|
||||
DdlTecnico.DataSource = DTTecnicos 'GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlTecnico.DataBind()
|
||||
DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
If UsuarioActual.TienePermisoProceso(376) Then
|
||||
DdlTecnico.Enabled = False
|
||||
DdlTecnico.SelectedValueExist(UsuarioActual.CveUsuario)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTecnicosAsignar()
|
||||
|
||||
@@ -214,10 +214,10 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Productos o Servicios registrados"
|
||||
ToolTip="Listado de Productos o Servicios" CssClass="table table-striped table-hover Widthall" UseAccessibleHeader="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" SortExpression="OrdenarGV" />
|
||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-Width="10%" SortExpression="OrdenarGV" />
|
||||
<asp:BoundField DataField="TipoPS" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="U.M." ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="U.M." ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:HyperLinkField ItemStyle-CssClass="Izquierda Texto" HeaderText="Código" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" DataTextField="Codigo" DataNavigateUrlFields="CvePS" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:HyperLinkField ItemStyle-CssClass="Izquierda Texto" HeaderText="Producto o Servicio" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" DataTextField="PS" DataNavigateUrlFields="CvePS" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
||||
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="AplicaParaVenta" HeaderText="Aplica Para Venta" Visible="false" ItemStyle-Width="20px" />
|
||||
|
||||
@@ -1767,13 +1767,21 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
DtImpuestos = CargaTotalesImpuestos(DtImpuestos)
|
||||
|
||||
Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, ObjFacturaDevolucion.CveSubProyecto).Rows(0)
|
||||
|
||||
Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, ObjFacturaDevolucion.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
Dim Cantidad As Decimal = 1
|
||||
Dim CveProyecto As Integer = DrSubProyecto("CveProyecto").ToString().ToEntero()
|
||||
Dim CveSubProyecto As Integer = DrSubProyecto("CveSubProyecto").ToString.ToEntero
|
||||
Dim SubProyecto As String = DrSubProyecto("SubProyecto").ToString
|
||||
Dim Proyecto As String = DrSubProyecto("Proyecto").ToString
|
||||
Dim CveProyecto As Integer
|
||||
Dim CveSubProyecto As Integer
|
||||
Dim SubProyecto As String
|
||||
Dim Proyecto As String
|
||||
If DrSubProyecto IsNot Nothing Then
|
||||
CveProyecto = DrSubProyecto("CveProyecto").ToString().ToEntero()
|
||||
CveSubProyecto = DrSubProyecto("CveSubProyecto").ToString.ToEntero
|
||||
SubProyecto = DrSubProyecto("SubProyecto").ToString
|
||||
Proyecto = DrSubProyecto("Proyecto").ToString
|
||||
Else
|
||||
Alert("Ocurrió un error al obtener información de la sucursal")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveSATNC As Integer
|
||||
Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray())
|
||||
|
||||
@@ -2639,6 +2639,10 @@ Partial Class PV
|
||||
LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}")
|
||||
End If
|
||||
|
||||
If ObjCliente.Vendedor <> "" Then
|
||||
DdlVendedor.SelectedValueExistInsert(ObjCliente.DtResultados(0)("CveVendedor"), LbVendedor.Text)
|
||||
End If
|
||||
|
||||
' si es empresa acumuladores
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
CargaPorcentajeMarcas()
|
||||
@@ -3023,9 +3027,11 @@ Partial Class PV
|
||||
|
||||
Dim DtVendedores As DataTable = Nothing
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then DtVendedores = ObjVendedores.DtResultados.Copy
|
||||
ObjVendedores.Dispose()
|
||||
'Dim ObjVendedores As New ClsVtaVendedores
|
||||
'If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then DtVendedores = ObjVendedores.DtResultados.Copy
|
||||
'ObjVendedores.Dispose()
|
||||
|
||||
DtVendedores = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).Copy
|
||||
|
||||
If DtVendedores IsNot Nothing Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
|
||||
@@ -3035,12 +3041,14 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
DdlVendedor.SelectedValue = "0"
|
||||
DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
DdlVendedor.DataBind()
|
||||
|
||||
DdlVendedor.SelectedValueExist(CveVendedorActual)
|
||||
If CveVendedorActual > 0 Then
|
||||
Dim tt As String = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", "CveVendedor =" & CveVendedorActual)
|
||||
DdlVendedor.SelectedValueExistInsert(CveVendedorActual, tt)
|
||||
End If
|
||||
|
||||
If Not DdlVendedor.SelectedValue.ToEntero > 0 Then
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.btn-xs {
|
||||
.btn-xs {
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
@@ -200,9 +200,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LkbRetiro" runat="server" OnClick="LkbRetiro_Click" Visible="false"> <i class="fa fa-ad-excel"></i> Retiro de Efectivo</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCobrosEnTranscurso" runat="server" OnClick="LnkCobrosEnTranscurso_Click"><i class="fa fa-money"></i> Cobros en Transcurso</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCobrosEnTranscurso" runat="server" OnClick="LnkCobrosEnTranscurso_Click"><i class="fa fa-money"></i> Cobros en Transcurso</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -273,13 +273,13 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-1">
|
||||
Solo pagadas:
|
||||
</div>
|
||||
<div class="col-md-1" style="padding-top:6px">
|
||||
<asp:CheckBox ID="ChkMostrarSoloPagados" CssClass="chksino" runat="server" Text="Ver Solo pagadas" />
|
||||
</div>
|
||||
<div class="col-md-1" style="padding-top: 6px">
|
||||
<asp:CheckBox ID="ChkMostrarSoloPagados" CssClass="chksino" runat="server" Text="Ver Solo pagadas" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -335,13 +335,18 @@
|
||||
<div class="col-md-1"><b>Folio:</b></div>
|
||||
<div class="col-md-2"> <label><asp:Literal ID="LtlFolio" runat="server"></asp:Literal></label> </div>
|
||||
|
||||
<div class="col-md-1"><b>
|
||||
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b></div>
|
||||
<div class="col-md-1"><b>
|
||||
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
|
||||
</b></div>
|
||||
<div class="col-md-1">
|
||||
<b>
|
||||
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<b>
|
||||
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
|
||||
</b>
|
||||
</div>
|
||||
<div class="col-md-1" style="text-align: right;">
|
||||
<asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" /></div>
|
||||
<asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -423,6 +428,20 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender11" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator3" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DivDatosCheque" runat="server" visible="false" style="padding-top: 8px;">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Clave de autorización:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtClaveAutorizacion" CssClass="form-control input-sm " runat="server" MaxLength="50" Width="100%" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
<label class="col-md-2">¿Quién autorizó?:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtAutorizo" CssClass="form-control input-sm " runat="server" MaxLength="50" Width="100%" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chequesie1" id="DivTransferencia" runat="server">
|
||||
@@ -515,43 +534,44 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte"
|
||||
DataKeyNames="CveVenta,CveIE,CveTipoTransaccion,CveCuenta,SerieFolio"
|
||||
ToolTip="Reporte de Cortes" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" Style="position: static" UseAccessibleHeader="false" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
Serie - Folio
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LBDescripcion" runat="server" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTotal" Text='<%# Eval("ImportePagado", "{0:N2}") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="" ItemStyle-Width="80">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarPago" runat="server" AlternateText="Editar" Visible="false" CausesValidation="False" CssClass="btn btn-circle btn-sm green" OnClick="LnkEditarPago_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte"
|
||||
DataKeyNames="CveVenta,CveIE,CveTipoTransaccion,CveCuenta,SerieFolio"
|
||||
ToolTip="Reporte de Cortes" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" Style="position: static" UseAccessibleHeader="false" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
Serie - Folio
|
||||
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LBDescripcion" runat="server" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTotal" Text='<%# Eval("ImportePagado", "{0:N2}") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="" ItemStyle-Width="80">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarPago" runat="server" AlternateText="Editar" Visible="false" CausesValidation="False" CssClass="btn btn-circle btn-sm green" OnClick="LnkEditarPago_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -574,7 +594,7 @@
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
<tr align="left" >
|
||||
<tr align="left">
|
||||
<td>
|
||||
<asp:Label runat="server" Font-Bold="true" ID="Label3">Sucursal:</asp:Label>
|
||||
</td>
|
||||
@@ -591,7 +611,7 @@
|
||||
<asp:RegularExpressionValidator ID="REVCaja" runat="server" ControlToValidate="TxtDineroCaja" Display="None" ErrorMessage="El campo <b>''Dinero''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GprIniciarTruno"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
@@ -763,7 +783,7 @@
|
||||
<asp:DropDownList ID="DdlCuentaGastoDestino" runat="server" CssClass="form-control input-sm select2me" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -913,54 +933,54 @@
|
||||
|
||||
|
||||
|
||||
<div id="DVModalPagos" class="modal ADS fade" role="dialog">
|
||||
<div id="DVModalPagos" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalPago" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalPago" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblModalPagoTitulo" runat="server">Editar Pago</asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblModalPagoTitulo" runat="server">Editar Pago</asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input">
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" ClientIDMode="Static" runat="server" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardarPago" Width="100%" >
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Transaccion''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarPago"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlTipoTransaccion">Movimiento:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input">
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" ClientIDMode="Static" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardarPago" Enabled="false" Width="100%">
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" ClientIDMode="Static" runat="server" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardarPago" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Transaccion''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarPago"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlTipoTransaccion">Movimiento:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input">
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" ClientIDMode="Static" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardarPago" Enabled="false" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuentaModal" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarPago"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaModal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlCuenta">Cuenta:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkDvModalPagoAceptar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkDvModalPagoAceptar_Click" Text="Aceptar" ValidationGroup="GrpGuardarPago" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkDvModalPagoAceptar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkDvModalPagoAceptar_Click" Text="Aceptar" ValidationGroup="GrpGuardarPago" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -979,21 +999,21 @@
|
||||
<div class="modal-body">
|
||||
|
||||
<asp:GridView ID="GvModalCobrosEnTranscurso" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||
EmptyDataText="Cobros en Transcursos" data-sort="true" ToolTip="Cobros en Transcurso"
|
||||
CssClass="ScrollAD table table-striped table-hover Widthall mysmallbtn" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Atención" DataField="AtencionA" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="UsuarioCobranza" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
EmptyDataText="Cobros en Transcursos" data-sort="true" ToolTip="Cobros en Transcurso"
|
||||
CssClass="ScrollAD table table-striped table-hover Widthall mysmallbtn" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Atención" DataField="AtencionA" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="UsuarioCobranza" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1053,7 +1073,7 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -72,6 +72,9 @@ Partial Class Ventas_PVCobranza
|
||||
If UsuarioActual.TienePermisoProceso(371) Then
|
||||
CargaCorteCaja()
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
DivDatosCheque.Visible = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -253,9 +256,8 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
ObjMovtos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpL.Update()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
TxtImporteEfectivo.Text = ""
|
||||
TxtImporteCredito.Text = ""
|
||||
TxtImporteDebito.Text = ""
|
||||
@@ -263,6 +265,10 @@ Partial Class Ventas_PVCobranza
|
||||
TxtImporteTransferencia.Text = ""
|
||||
TxtImporteOtrosContado.Text = ""
|
||||
TxtCambio.Text = ""
|
||||
TxtClaveAutorizacion.Text = ""
|
||||
TxtAutorizo.Text = ""
|
||||
|
||||
UpL.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -381,8 +387,16 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
If LtlSaldo.Text.ToDecimal() > Pagado Then
|
||||
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If (LtlSaldo.Text.ToDecimal() - Pagado) > 6 Then
|
||||
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal
|
||||
@@ -391,6 +405,18 @@ Partial Class Ventas_PVCobranza
|
||||
If PagadoSinEfectivo > LtlSaldo.Text.ToDecimal() Then
|
||||
Alert("El pago con los metodos de pago actuales no puede ser mayor al importe de la venta", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DivDatosCheque.Visible AndAlso TxtImporteCheque.Text.ToDecimal() > 0 Then
|
||||
If String.IsNullOrEmpty(TxtClaveAutorizacion.Text.Trim()) Then
|
||||
Alert("La clave de autorización es necesaria", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(TxtAutorizo.Text.Trim()) Then
|
||||
Alert("El nombre de la persona que autorizó es necesario", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
|
||||
@@ -472,7 +498,12 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
If SaldoPendiente > 0 AndAlso TxtImporteCheque.Text.ToDecimal > 0 Then
|
||||
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
|
||||
Dim Obs As String = ""
|
||||
If DivDatosCheque.Visible Then
|
||||
Obs = $"{VentaActual.SerieFolio} - Autorizó: {TxtAutorizo.Text}"
|
||||
End If
|
||||
|
||||
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim())
|
||||
SaldoPendiente -= TxtImporteCheque.Text.ToDecimal
|
||||
PagoAplicado += TxtImporteCheque.Text.ToDecimal
|
||||
End If
|
||||
@@ -496,7 +527,13 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
If SaldoPendiente > 0 Then
|
||||
MsgError = "Tiene saldo pendiente por aplicar"
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
If SaldoPendiente > 6 Then
|
||||
MsgError = "Tiene saldo pendiente por aplicar"
|
||||
End If
|
||||
Else
|
||||
MsgError = "Tiene saldo pendiente por aplicar"
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, tCveCorte) Then
|
||||
@@ -708,11 +745,14 @@ Partial Class Ventas_PVCobranza
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer) As String
|
||||
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "") As String
|
||||
Dim Retorno As String = ""
|
||||
Dim CveIEPago As Integer = 0
|
||||
Dim ErrorConta As Boolean
|
||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte)
|
||||
If String.IsNullOrEmpty(Obs) Then
|
||||
Obs = VentaActual.SerieFolio
|
||||
End If
|
||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion)
|
||||
If CveIEPago > 0 Then
|
||||
Dim Pago As New VentaPago
|
||||
Pago.ImportePagoVenta = ImportePago
|
||||
|
||||
@@ -570,7 +570,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
else
|
||||
{
|
||||
//SI REGISTRA SALIDA DE ALMACÉN EN AUTOMÁTICO Y ES DEVOLUCION QUE REALIZE EL MOVMIENTO DE SALIDA DE ALMACEN
|
||||
if (UsuarioActual.Empresa.Funcionalidad(567) == "1" && factura.TipoDocto == "Dev" && factura.SaldoAlmacen != 0)
|
||||
if ((UsuarioActual.Empresa.Funcionalidad(567) == "1" || UsuarioActual.Empresa.Funcionalidad(531) == "1") && factura.TipoDocto == "Dev" && factura.SaldoAlmacen != 0)
|
||||
{
|
||||
factura.RealizarDevolucionAlmacen = true;
|
||||
}
|
||||
|
||||
@@ -1478,6 +1478,8 @@
|
||||
<%--19--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkExistencias" runat="server" Visible="false" AlternateText="Ver Existencias" CausesValidation="False" CommandName="Existencias" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
|
||||
CssClass="btn btn-circle btn-sm purple" Text="<i class='fa fa-eye'></i>" />
|
||||
<asp:LinkButton ID="LnkDescuentos" runat="server" Visible="false" AlternateText="Descuento" CausesValidation="False" CommandName="Descuento" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-percent'></i>" />
|
||||
<asp:LinkButton ID="imgClone" runat="server" AlternateText="Clonar" CausesValidation="False" CommandName="Clonar" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
|
||||
@@ -8195,6 +8197,14 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="divGiro" runat="server" visible="false" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:DropDownList ID="DdlGiro" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="100%" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlGiro.ClientID.ToString()%>">Giro:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivBotonesAgregarCliente" runat="server" visible="false" class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarCliente" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardarCliente" />
|
||||
@@ -8741,8 +8751,36 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DivModalVerExistencias" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<asp:UpdatePanel ID="UpVerExistencias" runat="server" UpdateMode="Conditional" class="modal-content">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlVerExistenciasPS" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvVerExistencias" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="" CssClass="table table-striped table-hover" GridLines="None" OnRowDataBound="GvVerExistencias_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad Medida" />
|
||||
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DvModalTipoVenta" class="modal ADS fade" role="dialog">
|
||||
|
||||
|
||||
@@ -3733,7 +3733,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub CargaListasPreciosSubProyectos(CvePS As Integer)
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
DivPrecioLista.Visible = True
|
||||
|
||||
Using ObjVta As New ClsVentas
|
||||
@@ -3741,9 +3741,9 @@ Partial Class Ventas
|
||||
Dim Dt As DataTable = Nothing
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(384) Then
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Predeterminada = 'True'")
|
||||
Dt = ObjVta.DtResultados.Copy()
|
||||
Else
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Predeterminada = 'True' AND Restringuida = 'False'")
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
|
||||
End If
|
||||
|
||||
DdlPrecioLista.DataSource = Dt
|
||||
@@ -8790,6 +8790,10 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
e.Row.FCLinkButton("LnkExistencias").Visible = True
|
||||
End If
|
||||
|
||||
'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
||||
' e.Row.FCLinkButton("imgE").Enabled = False
|
||||
' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."
|
||||
@@ -9145,7 +9149,11 @@ Partial Class Ventas
|
||||
Dim PrecioLista As String = ""
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
|
||||
CvePrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedValue.ToEntero()
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text.Split("-"c)(0)
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text.Split("-"c)(0)
|
||||
Else
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text
|
||||
End If
|
||||
End If
|
||||
|
||||
AgregarProductoServicio(Cantidad, DdlUM.SelectedValue.ToEntero(), DdlUM.SelectedItem.Text, DdlCla.SelectedValue.ToEntero(), DdlCla.SelectedItem.Text,
|
||||
@@ -17933,15 +17941,38 @@ Partial Class Ventas
|
||||
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
|
||||
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
||||
|
||||
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
|
||||
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
|
||||
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count > 0 Then
|
||||
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
|
||||
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
|
||||
If ObjPrecioSugerido.CvePrecioLista = Me.CvePrecioListaCliente Then
|
||||
Alert("La lista de precios del cliente no esta permitido en la sucursal actual", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
End If
|
||||
Else
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
|
||||
Alert("No se encontro una lista de precios permitida en la sucursal actual", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
|
||||
Alert("No se encontraron listas de precio disponibles", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
|
||||
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -18593,7 +18624,7 @@ Partial Class Ventas
|
||||
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||
End If
|
||||
|
||||
CargaListasPreciosSubProyectos(-1)
|
||||
CargaListasPreciosSubProyectos(If(DdlPS.SelectedValue.ToEntero() <= 0, -1, DdlPS.SelectedValue.ToEntero()))
|
||||
|
||||
UpDetalle.Update()
|
||||
UpEmitirTransitorio.Update()
|
||||
@@ -19429,7 +19460,12 @@ Partial Class Ventas
|
||||
If DivPrecioLista.Visible Then
|
||||
If DdlPrecioLista.SelectedValue.ToEntero() > 0 AndAlso DdlPrecioLista.SelectedValue.ToEntero() = Me.CvePrecioLista Then
|
||||
CvePrecioListaPS = Me.CvePrecioLista
|
||||
PrecioListaPS = DdlPrecioLista.SelectedItem.Text.Split("-"c)(0)
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
PrecioListaPS = DdlPrecioLista.SelectedItem.Text.Split("-"c)(0)
|
||||
Else
|
||||
PrecioListaPS = DdlPrecioLista.SelectedItem.Text
|
||||
End If
|
||||
|
||||
Else
|
||||
'sino es la seleccionada se recalcula de nuevo
|
||||
CargaPrecioLista(DdlPS.SelectedValue.ToEntero)
|
||||
@@ -24430,10 +24466,15 @@ Partial Class Ventas
|
||||
DivBotonesAgregarCliente.Visible = False
|
||||
DivFormaCliente.Visible = False
|
||||
divRegimenCliente.Visible = False
|
||||
divGiro.Visible = False
|
||||
UpAgregarCliente.Update()
|
||||
CargaEstados()
|
||||
TxtRFCCliente.Focus()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
CargaGiro()
|
||||
End If
|
||||
|
||||
RegistraScript("showDivEC();")
|
||||
End Sub
|
||||
|
||||
@@ -24511,6 +24552,10 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
divGiro.Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaComboCFDICliente()
|
||||
@@ -24603,7 +24648,7 @@ Partial Class Ventas
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||
TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista,
|
||||
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI) Then
|
||||
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI, CveClienteClasificacion:=DdlGiro.SelectedValue.ToEntero()) Then
|
||||
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("hideDivEC();")
|
||||
@@ -25313,6 +25358,29 @@ Partial Class Ventas
|
||||
RegistraScript("$('#ModalPermisoDesc').modal({backdrop: 'static', keyboard: false});setTimeout(() => {$('#txtUserDesc').focus();}, 500); ", "A2")
|
||||
End If
|
||||
|
||||
ElseIf e.CommandName = "Existencias" Then
|
||||
Dim RowNum As Integer = Convert.ToInt32(e.CommandArgument)
|
||||
Dim GvRow As GridViewRow = GvPS.Rows(RowNum)
|
||||
|
||||
LtlVerExistenciasPS.Text = $"Existencias: {GvRow.DataKey("PS")}"
|
||||
|
||||
Dim RestringirAlmacenes As Integer = -1
|
||||
|
||||
Dim BuscarEnTabla As Boolean = True
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios()
|
||||
If ObjInventarios.GetExistenciasProducto(GvRow.DataKey("CvePS").ToEntero(), -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero,
|
||||
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100, BuscarEnTabla:=BuscarEnTabla) Then
|
||||
GvVerExistencias.DataSource = ObjInventarios.DtResultados.Copy()
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
GvVerExistencias.DataBind()
|
||||
|
||||
UpVerExistencias.Update()
|
||||
|
||||
RegistraScript("$('#DivModalVerExistencias').modal({backdrop: 'static', keyboard: false}); ", "A2")
|
||||
Else
|
||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
@@ -32674,7 +32742,6 @@ Partial Class Ventas
|
||||
DdlSubProyectoDatos.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveSubProyecto"))
|
||||
End If
|
||||
DdlSucursalCliente.SelectedValueExist(If(dtSeleccionadas.FiltroPrimeroValor("CveClienteSucursal").ToEntero() > 0, dtSeleccionadas.FiltroPrimeroValor("CveClienteSucursal"), "-1"))
|
||||
DdlVendedor.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveVendedor"))
|
||||
|
||||
CambiaSucursalGeneral()
|
||||
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
|
||||
@@ -32702,6 +32769,8 @@ Partial Class Ventas
|
||||
|
||||
RemisionesLista.Clear()
|
||||
|
||||
DdlVendedor.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveVendedor"))
|
||||
|
||||
Dim MsgUsados As New StringBuilder
|
||||
Dim UsadosValidados As Boolean = True
|
||||
|
||||
@@ -37270,7 +37339,7 @@ Partial Class Ventas
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
Dim DTSubproyectoActual As DataTable = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
Dim DTSubproyectoActual As DataTable = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
If (DTSubproyectoActual.Rows(0)("TipoSucursal").ToString.ToEntero = 1) Then
|
||||
Respuesta = True
|
||||
@@ -38827,5 +38896,20 @@ Partial Class Ventas
|
||||
|
||||
Return "<a href='javascript:void(0);' class='Texto' onclick=''javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact', 800, 547, 'N', 'PopUpBuscar')''> ver </a>"
|
||||
End Function
|
||||
Protected Sub GvVerExistencias_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CveAlmacen") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGiro()
|
||||
Dim Dt As DataTable = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlGiro.DataSource = Dt
|
||||
DdlGiro.DataBind()
|
||||
DdlGiro.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UpAgregarCliente.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user