This commit is contained in:
2021-04-12 08:59:33 -07:00
22 changed files with 384 additions and 84 deletions

View File

@@ -208,7 +208,7 @@ Public Class ClsProductosServicios
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1", Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1",
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000) As Boolean Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000, Optional CveMarca As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_ProductosServiciosGet") DataAdapter("PA_ProductosServiciosGet")
@@ -229,6 +229,7 @@ Public Class ClsProductosServicios
.Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS .Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
.Add("@SATClavePS", SqlDbType.VarChar).Value = SATClavePS .Add("@SATClavePS", SqlDbType.VarChar).Value = SATClavePS
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect .Add("@TopSelect", SqlDbType.Int).Value = TopSelect
End With End With
@@ -252,7 +253,7 @@ Public Class ClsProductosServicios
Oferta = Data.Rows(0)("Oferta").ToString.ToDouble Oferta = Data.Rows(0)("Oferta").ToString.ToDouble
IVA = Data.Rows(0)("IVA").ToString.ToDouble IVA = Data.Rows(0)("IVA").ToString.ToDouble
RetIVA = Data.Rows(0)("RetIVA").ToString.ToDouble RetIVA = Data.Rows(0)("RetIVA").ToString.ToDouble
CveMarca = Data.Rows(0)("CveMarca").ToString.ToEntero Me.CveMarca = Data.Rows(0)("CveMarca").ToString.ToEntero
AplicaParaConcepto = CBool(Data.Rows(0)("AplicaParaConcepto").ToString) AplicaParaConcepto = CBool(Data.Rows(0)("AplicaParaConcepto").ToString)
AplicaParaVenta = Data.Rows(0)("AplicaParaVenta").ToString = "True" AplicaParaVenta = Data.Rows(0)("AplicaParaVenta").ToString = "True"
Estado = Data.Rows(0)("Estado").ToString = "Activo" Estado = Data.Rows(0)("Estado").ToString = "Activo"

View File

@@ -983,7 +983,7 @@ Partial Class Bancos_Creditos
For Each gvr As GridViewRow In GvTA.Rows For Each gvr As GridViewRow In GvTA.Rows
If Not ObjCredito.UpdateCreditosDetalle(gvr.DataKey("CveCreditoDetalle").ToString.ToEntero, gvr.FCTextBox("TxtFecha").Text.ToString.ToDate, gvr.FCTextBox("TxtCapital").Text.ToString.ToDouble, gvr.FCTextBox("TxtIntereses").Text.ToString.ToDouble, If Not ObjCredito.UpdateCreditosDetalle(gvr.DataKey("CveCreditoDetalle").ToString.ToEntero, gvr.FCTextBox("TxtFecha").Text.ToString.ToDate, gvr.FCTextBox("TxtCapital").Text.ToString.ToDouble, gvr.FCTextBox("TxtIntereses").Text.ToString.ToDouble,
gvr.FCTextBox("TxtSeguro").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVACapital").Text.ToString.ToDouble, gvr.FCTextBox("TxtSeguro").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVACapital").Text.ToString.ToDouble,
gvr.FCTextBox("TxtIVAIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVASeguro").Text.ToString.ToDouble, 1) Then gvr.FCTextBox("TxtIVAIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVASeguro").Text.ToString.ToDouble, -1) Then
ErrorCredito = True ErrorCredito = True
Exit For Exit For
End If End If

View File

@@ -6676,5 +6676,6 @@ Partial Class Bancos_IE
End Sub End Sub
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub
End Class End Class

View File

@@ -3647,6 +3647,8 @@ Partial Class Bancos_PopIECompras
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub

View File

@@ -3665,6 +3665,8 @@ Partial Class Bancos_PopIEVentas
#End Region #End Region
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub

View File

@@ -3390,6 +3390,8 @@ Partial Class Bancos_ProveedoresAbonar
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub

View File

@@ -1449,6 +1449,8 @@ Partial Class Compras_Compras
DivEsNoDeducible.Visible = True DivEsNoDeducible.Visible = True
DivActualizarVincular.Visible = True DivActualizarVincular.Visible = True
Else Else
ViewState("CveProveedor") = -1 ViewState("CveProveedor") = -1
@@ -7300,6 +7302,10 @@ Partial Class Compras_Compras
importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMovimiento = importeMovimiento.Abs.RoundSQL()
importeMN = importeMovimiento importeMN = importeMovimiento
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
@@ -7483,7 +7489,9 @@ Partial Class Compras_Compras
importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMovimiento = importeMovimiento.Abs.RoundSQL()
importeMN = importeMovimiento importeMN = importeMovimiento
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -7577,7 +7585,9 @@ Partial Class Compras_Compras
importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMovimiento = importeMovimiento.Abs.RoundSQL()
importeMN = importeMovimiento importeMN = importeMovimiento
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -7673,7 +7683,8 @@ Partial Class Compras_Compras
importeFluctuacion = importeFluctuacion.Abs.RoundSQL() importeFluctuacion = importeFluctuacion.Abs.RoundSQL()
If importeFluctuacion <> 0 Then If importeFluctuacion <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -9035,9 +9046,14 @@ Partial Class Compras_Compras
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If End If
importeFluctuacion = importeFluctuacion.Abs.RoundSQL() importeFluctuacion = importeFluctuacion.Abs.RoundSQL()
If importeFluctuacion <> 0 Then If importeFluctuacion <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then
ErrorMovtosCxP = 1 ErrorMovtosCxP = 1
End If End If
End If End If
@@ -9459,8 +9475,13 @@ Partial Class Compras_Compras
importeMN = ImporteMovimiento importeMN = ImporteMovimiento
End If End If
If ImporteMovimiento <> 0 Then If ImporteMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
Dim CveSubProyecto64 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto64, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
ErrorMovtosCxP = 1 ErrorMovtosCxP = 1
Exit For Exit For
End If End If
@@ -9483,7 +9504,8 @@ Partial Class Compras_Compras
End If End If
If ImporteMovimiento <> 0 Then If ImporteMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then Dim CveSubProyecto65 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto65, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
ErrorMovtosCxP = 1 ErrorMovtosCxP = 1
Exit For Exit For
End If End If
@@ -19148,6 +19170,7 @@ Partial Class Compras_Compras
CargaAnticipos(CveProveedor, If(ChkNCInv.Checked, "NC", "-1")) CargaAnticipos(CveProveedor, If(ChkNCInv.Checked, "NC", "-1"))
UpAnticipos.Update() UpAnticipos.Update()
End Sub End Sub
Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False) Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False)
Dim SaldoAnticipo = 0.0 Dim SaldoAnticipo = 0.0

View File

@@ -2068,5 +2068,7 @@ Partial Class Compras_ReembolsosComprobaciones
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub
End Class End Class

View File

@@ -216,10 +216,20 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Importe" ItemStyle-Width="125px"> <asp:TemplateField HeaderText="Importe" ItemStyle-Width="125px">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal> <%-- <table>
<tr>
<td><asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0}", Eval("Total", "{0:N2}")) %>'></asp:Literal></td>
<td><asp:Literal ID="LtlAbre" runat="server" Text='<%# String.Format("{0}", Eval("Abreviatura")) %>'></asp:Literal></td>
</tr>
</table>--%>
<%--<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal>--%>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0}", Eval("Total", "{0:N2}")) %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" /> <ItemStyle HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="Abreviatura" Visible="true" HeaderText="" ItemStyle-Width="30px" />
<asp:BoundField DataField="CantidadOC" Visible="false" HeaderText="# OC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" /> <asp:BoundField DataField="CantidadOC" Visible="false" HeaderText="# OC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
<asp:TemplateField HeaderText="XML"> <asp:TemplateField HeaderText="XML">
<ItemTemplate> <ItemTemplate>

View File

@@ -719,9 +719,15 @@ Partial Class Compras_eFacturas
If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim
If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True
If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True 'If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True
If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False 'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False
If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True 'If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True
If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(12).Visible = True : GvD.Columns(13).Visible = True
If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(11).Visible = False
If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(6).Visible = True
CargaGvBitacora() CargaGvBitacora()
CargaDatos() CargaDatos()
End If End If
@@ -913,6 +919,11 @@ Partial Class Compras_eFacturas
#Region "G V D A T O S" #Region "G V D A T O S"
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.Header Then
e.Row.Cells(4).Attributes.Add("data-tipodato", "numeric")
End If
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FindControl("lnkRegenerarPDF").Visible = True ' (UsuarioActual.CveRol = 1) e.Row.FindControl("lnkRegenerarPDF").Visible = True ' (UsuarioActual.CveRol = 1)
'e.Row.FindControl("lnkDownPdf").Visible = (UsuarioActual.CveRol = 1) 'e.Row.FindControl("lnkDownPdf").Visible = (UsuarioActual.CveRol = 1)
@@ -937,6 +948,13 @@ Partial Class Compras_eFacturas
e.Row.Cells(2).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString) e.Row.Cells(2).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString)
'e.Row.Cells(4).Attributes.Add("data-order", Convert.ToInt64(e.Row.DBCampo("Total").ToDecimal).ToString.PadLeft(10, "0"c))
If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML"))) Then If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML"))) Then
e.Row.FCLiteral("LtlXML").Text = String.Format("<a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?RFC={0}&File={1}"">Ver</a>", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML"))) e.Row.FCLiteral("LtlXML").Text = String.Format("<a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?RFC={0}&File={1}"">Ver</a>", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML")))
If e.Row.DBCampo("TipoComprobante") = "P" Then If e.Row.DBCampo("TipoComprobante") = "P" Then

View File

@@ -185,13 +185,6 @@
<ADS:Dropdownlost ID="DdlProveedores" runat="server" data-metodo="getproveedores" UsaWebService="true" Width="100%" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlProveedores" runat="server" data-metodo="getproveedores" UsaWebService="true" Width="100%" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
</div> </div>
</asp:Panel> </asp:Panel>
<asp:Panel runat="server" ID="pnlOpcion2" Visible="false" CssClass="form-line">
<div class="catcuentas left">
<asp:Label runat="server" Text="Porcentaje IVA():"></asp:Label></div>
<div class="catcuentas right">
<asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% )
</div>
</asp:Panel>
<asp:Panel runat="server" ID="pnlOpcion3" Visible="false" CssClass="form-line"> <asp:Panel runat="server" ID="pnlOpcion3" Visible="false" CssClass="form-line">
<div class="catcuentas left"> <div class="catcuentas left">
<asp:Label runat="server" Text="Clasificación"></asp:Label></div> <asp:Label runat="server" Text="Clasificación"></asp:Label></div>
@@ -222,11 +215,18 @@
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="min-width: 100px;"></ADS:Dropdownlost> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="min-width: 100px;"></ADS:Dropdownlost>
</div> </div>
</asp:Panel> </asp:Panel>
<asp:Panel runat="server" ID="pnlOpcion2" Visible="false" CssClass="form-line">
<div class="catcuentas left">
<asp:Label runat="server" Text="Porcentaje Impuesto:"></asp:Label></div>
<div class="catcuentas right">
<asp:TextBox ID="TxtPorcentaje" runat="server"></asp:TextBox>(0% - 100% )
</div>
</asp:Panel>
<br /> <br />
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" data-toggle="confirmation" data-popout="true" data-original-title="<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>" data-btn-ok-label="si" /> <asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" />
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" /> <asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" /> <asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
</fieldset> </fieldset>
</div> </div>
@@ -270,5 +270,21 @@
buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol') buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol')
}); });
}); });
function Afectable(btn) {
debugger;
$('#C_nuevacuenta').attr('data-toggle', 'confirmation');
$('#C_nuevacuenta').attr('data-popout', 'true');
$('#C_nuevacuenta').attr('data-original-title', '<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>');
$('#C_nuevacuenta').attr('data-btn-ok-label', 'si');
}
function NoAfectable() {
debugger;
$('#C_nuevacuenta').attr('data-toggle', '');
$('#C_nuevacuenta').attr('data-popout', '');
$('#C_nuevacuenta').attr('data-original-title', '');
$('#C_nuevacuenta').attr('data-btn-ok-label', '');
}
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -206,7 +206,11 @@ Partial Class Contabilidad2_CatCuentas
End If End If
If Afectable Then If Afectable Then
RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID))
Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia) Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia)
Else
RegistraScript("NoAfectable();")
End If End If
TxtCuenta.Enabled = True TxtCuenta.Enabled = True
@@ -406,15 +410,21 @@ Partial Class Contabilidad2_CatCuentas
Dim CveTipoSaldo As Integer = 0 Dim CveTipoSaldo As Integer = 0
Dim PorcentajeIVA As Decimal = -1 Dim PorcentajeIVA As Decimal = -1
Dim drt As DataRow Dim drt As DataRow
Dim CveConceptoAdmin As Integer = -1 Dim CveConceptoAdmin As Integer
Dim CveProveedor As Integer = -1 Dim CveProveedor As Integer
Dim CveCliente As Integer = -1 Dim CveCliente As Integer
Dim CveClasificacion As Integer = -1 Dim CveClasificacion As Integer
Dim PorcentajeImpuesto As Decimal = -1 Dim PorcentajeImpuesto As Decimal
Dim CveBancoCuenta As Integer = -1 Dim CveBancoCuenta As Integer
Dim CveAlmacen As Integer = -1 'Dim CveAlmacen As Integer = -1
Dim CvePersonal As Integer = -1 'Dim CvePersonal As Integer = -1
Dim NombreCuenta As String
Dim TipoCuenta As String
Dim CuentaMayor As Integer
Dim CveMoneda As Integer
Dim DigAgrup As Integer
Dim CveAgrupadorSat As Integer
Dim NomIdioma As String
If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then
If CveConceptoContable > 0 Then If CveConceptoContable > 0 Then
@@ -438,19 +448,28 @@ Partial Class Contabilidad2_CatCuentas
CveBancoCuenta = IIf(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero) CveBancoCuenta = IIf(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero)
'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero) 'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero)
'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero) 'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero)
End If NombreCuenta = IIf(drt("Nombre").ToString = "", "", drt("Nombre").ToString.ToEntero)
TipoCuenta = IIf(drt("Tipo").ToString = "", "", drt("Tipo").ToString.ToEntero)
CuentaMayor = IIf(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero)
CveMoneda = IIf(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero)
DigAgrup = IIf(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero)
CveAgrupadorSat = IIf(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero)
NomIdioma = IIf(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString.ToEntero)
idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente,
CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta) CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta)
If idnew > 0 Then If idnew > 0 Then
If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then If Not ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then
ObjConta.RollBack() If ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda,
ObjConta.Dispose() DigAgrup, CveAgrupadorSat, NomIdioma) Then
Exit Sub ObjConta.RollBack()
ObjConta.Dispose()
Exit Sub
End If
End If
End If End If
End If End If
Else Else
idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA) DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA)

View File

@@ -1362,7 +1362,7 @@ Partial Class Inventarios_EntradasSalidas
registro.Item("CveUM") = CveUM registro.Item("CveUM") = CveUM
registro.Item("UnidadMedida") = UM registro.Item("UnidadMedida") = UM
registro.Item("CvePS") = CvePS registro.Item("CvePS") = CvePS
registro.Item("CodigoPS") = PS registro.Item("CodigoPS") = String.Format("{0} - {1}", Codigo, PS)
registro.Item("PS") = PS registro.Item("PS") = PS
registro.Item("PU") = PU registro.Item("PU") = PU
'registro.Item("PUExtranjero") = PU 'registro.Item("PUExtranjero") = PU

View File

@@ -0,0 +1,92 @@
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ReconstruirCostos.aspx.vb" Inherits="Inventario_ReconstruirCostos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlTitulo" runat="server" Text="Reconstruir Costos"></asp:Literal>&nbsp;<asp:Literal ID="LtlReconstruir" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<%-- <li>
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
</li>--%>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<%--Filtros--%>
<label class="col-md-1 truncate" style="width: 100px;">Clasificacion:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClasificacion" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="width: 100px;">Marca:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlMarca" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Marca" DataValueField="CveMarca" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione la Marca (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="row">
<div class="col-md-12" align="right">
<asp:Label ID="LbFiltrar" Text="Filtrar" runat="server" />
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProdcutos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvProdcutos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UpGvProductos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div style="height:650px; overflow-y: scroll;" >
<asp:GridView ID="GvProdcutos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="ChkProducto" runat="server"/>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="PS" NullDisplayText="N/A" ItemStyle-Width="30%" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField NullDisplayText="N/A" ItemStyle-Width="60%" ItemStyle-HorizontalAlign="Center" />
</Columns>
<RowStyle Font-Size="Smaller" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,64 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports System.Data
Partial Class Inventario_ReconstruirCostos
Inherits ClsPaginas
Private Property FacturasCheckadas As Integer
Get
Return ViewState("FacturasCheckadas").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("FacturasCheckadas") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaClasificaciones()
CargaMarcas()
End If
End Sub
Private Sub CargaClasificaciones()
If UsuarioActual.Empresa.UsaAC Then
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
Else
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
End If
DdlClasificacion.DataBind()
End Sub
Private Sub CargaMarcas()
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
DdlMarca.DataSource = ObjPS.DtResultados
DdlMarca.DataBind()
End If
ObjPS.Dispose()
End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim ObjPS As New ClsProductosServicios
ObjPS.GetPS(-1, DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveMarca:=DdlMarca.SelectedValue.ToEntero)
If ObjPS.DtResultados.Rows.Count > 0 Then
GvProdcutos.DataSource = ObjPS.DtResultados
GvProdcutos.DataBind()
UpGvProductos.Update()
End If
ObjPS.Dispose()
End Sub
End Class

View File

@@ -1036,7 +1036,7 @@
DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" ShowHeaderWhenEmpty="true"> DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" ShowHeaderWhenEmpty="true">
<%--<asp:GridView ID="GvBancosCuentas" runat="server" DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias" CssClass="table table-striped table-advance table-hover" Style="table-layout: fixed" BorderWidth="0" GridLines="None">--%> <%--<asp:GridView ID="GvBancosCuentas" runat="server" DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias" CssClass="table table-striped table-advance table-hover" Style="table-layout: fixed" BorderWidth="0" GridLines="None">--%>
<Columns> <Columns>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Banco"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Banco" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtNombreBanco" runat="server" data-toggle="tooltip" title='<%# Eval("BancoNombre")%>' Text='<%# Eval("BancoNombre")%>'></asp:Label> &nbsp;<asp:Label ID="LtNombreBanco" runat="server" data-toggle="tooltip" title='<%# Eval("BancoNombre")%>' Text='<%# Eval("BancoNombre")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1046,7 +1046,7 @@
<ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false" HeaderText="Sucursal" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtNumeroSucursal" runat="server" data-toggle="tooltip" title='<%# Eval("Sucursal")%>' Text='<%# Eval("Sucursal")%>'></asp:Label> &nbsp;<asp:Label ID="LtNumeroSucursal" runat="server" data-toggle="tooltip" title='<%# Eval("Sucursal")%>' Text='<%# Eval("Sucursal")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1054,7 +1054,7 @@
<asp:TextBox CssClass="form-control" ID="TxtNumeroSucursal" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Sucursal")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtNumeroSucursal" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Sucursal")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Cuenta"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtNumeroCuenta" runat="server" data-toggle="tooltip" title='<%# Eval("Cuenta")%>' Text='<%# Eval("Cuenta")%>'></asp:Label> &nbsp;<asp:Label ID="LtNumeroCuenta" runat="server" data-toggle="tooltip" title='<%# Eval("Cuenta")%>' Text='<%# Eval("Cuenta")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1064,7 +1064,7 @@
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Clabe"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="CLABE" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtCLABE" runat="server" data-toggle="tooltip" title='<%# Eval("CLABE")%>' Text='<%# Eval("CLABE")%>'></asp:Label> &nbsp;<asp:Label ID="LtCLABE" runat="server" data-toggle="tooltip" title='<%# Eval("CLABE")%>' Text='<%# Eval("CLABE")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1074,7 +1074,7 @@
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false" HeaderText="SWIFT" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtSWIFT" runat="server" data-toggle="tooltip" title='<%# Eval("SWIFT")%>' Text='<%# Eval("SWIFT")%>'></asp:Label> &nbsp;<asp:Label ID="LtSWIFT" runat="server" data-toggle="tooltip" title='<%# Eval("SWIFT")%>' Text='<%# Eval("SWIFT")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1082,7 +1082,7 @@
<asp:TextBox CssClass="form-control" ID="TxtSWIFT" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("SWIFT")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtSWIFT" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("SWIFT")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false" HeaderText="Plaza" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtPlaza" runat="server" data-toggle="tooltip" title='<%# Eval("Plaza")%>' Text='<%# Eval("Plaza")%>'></asp:Label> &nbsp;<asp:Label ID="LtPlaza" runat="server" data-toggle="tooltip" title='<%# Eval("Plaza")%>' Text='<%# Eval("Plaza")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1090,7 +1090,7 @@
<asp:TextBox CssClass="form-control" ID="TxtPlaza" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("Plaza")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtPlaza" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("Plaza")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false" HeaderText="CIE" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtConvenioCIE" runat="server" data-toggle="tooltip" title='<%# Eval("CIE")%>' Text='<%# Eval("CIE")%>'></asp:Label> &nbsp;<asp:Label ID="LtConvenioCIE" runat="server" data-toggle="tooltip" title='<%# Eval("CIE")%>' Text='<%# Eval("CIE")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1099,7 +1099,7 @@
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%> <%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false" HeaderText="Referencia" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtReferencia" runat="server" data-toggle="tooltip" title='<%# Eval("Referencia")%>' Text='<%# Eval("Referencia")%>'></asp:Label> &nbsp;<asp:Label ID="LtReferencia" runat="server" data-toggle="tooltip" title='<%# Eval("Referencia")%>' Text='<%# Eval("Referencia")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1108,7 +1108,7 @@
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false" HeaderText="Ref. Proveedor" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtRefCrediProveedor" runat="server" data-toggle="tooltip" title='<%# Eval("RefCrediProveedor")%>' Text='<%# Eval("RefCrediProveedor")%>'></asp:Label> &nbsp;<asp:Label ID="LtRefCrediProveedor" runat="server" data-toggle="tooltip" title='<%# Eval("RefCrediProveedor")%>' Text='<%# Eval("RefCrediProveedor")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1117,7 +1117,7 @@
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Moneda" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LtMoneda" runat="server" data-toggle="tooltip" title='<%# Eval("Moneda")%>' Text='<%# Eval("Moneda")%>'></asp:Label> &nbsp;<asp:Label ID="LtMoneda" runat="server" data-toggle="tooltip" title='<%# Eval("Moneda")%>' Text='<%# Eval("Moneda")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1129,7 +1129,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false" HeaderText="Alias" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Label ID="LblBBVAAlias" runat="server" data-toggle="tooltip" title='<%# Eval("BBVAAlias")%>' Text='<%# Eval("BBVAAlias")%>'></asp:Label> &nbsp;<asp:Label ID="LblBBVAAlias" runat="server" data-toggle="tooltip" title='<%# Eval("BBVAAlias")%>' Text='<%# Eval("BBVAAlias")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -1139,13 +1139,13 @@
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center" HeaderText="Estatus Pago E.">
<ItemTemplate> <ItemTemplate>
<!--IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No") = If(EstatusPagoElectronico) Then "Sí" Else "No"--> <!--IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No") = If(EstatusPagoElectronico) Then "Sí" Else "No"-->
<asp:Label ID="LblEstatusPE" runat="server" Text='<%# IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No")%>'>'></asp:Label> <asp:Label ID="LblEstatusPE" runat="server" Text='<%# IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No")%>'>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
<ItemTemplate> <ItemTemplate>
<!--IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No") = If(EstatusPagoElectronico) Then "Sí" Else "No"--> <!--IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No") = If(EstatusPagoElectronico) Then "Sí" Else "No"-->
<asp:Label ID="LlbEstatusTexto" Text='<%# Eval("EstatusTexto")%>' runat="server" /> <asp:Label ID="LlbEstatusTexto" Text='<%# Eval("EstatusTexto")%>' runat="server" />
@@ -1154,7 +1154,7 @@
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# IIf(Eval("EstatusTexto").ToString = "Activo", True, False)%>' Visible="false"></asp:CheckBox> <asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# IIf(Eval("EstatusTexto").ToString = "Activo", True, False)%>' Visible="false"></asp:CheckBox>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false"> <asp:TemplateField HeaderText="Editar" ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate> <EditItemTemplate>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" <asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditarCuentaBanco" /> CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditarCuentaBanco" />
@@ -1165,7 +1165,7 @@
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" /> <asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Elim." ItemStyle-Width="7%" ItemStyle-CssClass="Excede"> <asp:TemplateField HeaderText="Elim." ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnClientClick="javascript:return confirm('Está seguro de eliminar el registro?');" /> <asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnClientClick="javascript:return confirm('Está seguro de eliminar el registro?');" />
</ItemTemplate> </ItemTemplate>
@@ -2323,6 +2323,24 @@
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="width: 160px;">
<asp:TextBox ID="TxtFechaPago" runat="server" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkTxtFechaPago" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEETxtFechaPago" runat="server" TargetControlID="TxtFechaPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEETxtFechaPago" TargetControlID="TxtFechaPago" PopupButtonID="LnkTxtFechaPago" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<label>Fecha pago</label>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">
<asp:TextBox ID="Txtdiasinabiles" runat="server" TextMode="Number" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
<label>días inhábiles</label>
</div>
</div>
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important"> <div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 100px!important">

View File

@@ -365,7 +365,7 @@
<asp:TemplateField > <asp:TemplateField >
<HeaderTemplate>Complemento Pago</HeaderTemplate> <HeaderTemplate>Complemento Pago</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:LinkButton runat="server" ID="LnkComplemento" CssClass="text-success" Text="<i class='fa fa-check' aria-hidden='true'></i>" OnClientClick="return false;" ></asp:LinkButton> <asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

@@ -639,11 +639,10 @@ Partial Class Ventas_ClientesAbonar
If e.Row.DBCampo("CveVenta").ToEntero > 0 Then If e.Row.DBCampo("CveVenta").ToEntero > 0 Then
If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then
e.Row.FCLinkButton("LnkComplemento").Text = "<i class='fa fa-times' aria-hidden='true'></i>" e.Row.FCLiteral("LtlComplemento").Text = "<i class='fa fa-times text-danger ' aria-hidden='true'></i>"
e.Row.FCLinkButton("LnkComplemento").CssClass = "text-danger"
End If End If
Else Else
e.Row.FCLinkButton("LnkComplemento").Visible = False e.Row.FCLiteral("LtlComplemento").Visible = False
End If End If
@@ -3179,5 +3178,7 @@ Partial Class Ventas_ClientesAbonar
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub End Sub
End Class End Class

View File

@@ -46,8 +46,10 @@
</div> </div>
<label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label> <label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label>
<div class="col-md-2" id="DivDdlCliente" runat="server"> <div class="col-md-2" id="DivDdlCliente" runat="server">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%"> <ADS:Dropdownlost ID="DdlCliente" runat="server" AutoPostBack="False" DataTextField="NombreComercial" IncluyeTodos="false" DataValueField="CveCliente" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
</asp:DropDownList>
<%-- <asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList>--%>
</div> </div>
<div class="col-md-1" style="">Fecha Ini Doc:</div> <div class="col-md-1" style="">Fecha Ini Doc:</div>
<div class="col-md-1"> <div class="col-md-1">

View File

@@ -65,11 +65,16 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1")); DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
} }
//protected void CargaClientes()
//{
// DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa,-1);
// DdlCliente.DataBind();
// DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
//}
protected void CargaClientes() protected void CargaClientes()
{ {
DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa,-1); DdlCliente.setEsWebService(true);
DdlCliente.DataBind(); DdlCliente.Attributes.Add("data-metodo", "getcliente");
DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
} }
protected void CargaVendedores() protected void CargaVendedores()
{ {
@@ -87,7 +92,12 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
DateTime FechaFCorte; DateTime FechaFCorte;
if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; } if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; }
ClsVentas ObjVenta = new ClsVentas(); ClsVentas ObjVenta = new ClsVentas();
if (ObjVenta.GetRepAnticiposNCIXC(DdlCliente.SelectedValue.ToEntero(), DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), int CveCliente = -1;
if (DdlCliente.SelectedValue.ToEntero() != 0)
{
CveCliente = DdlCliente.SelectedValue.ToEntero();
}
if (ObjVenta.GetRepAnticiposNCIXC(CveCliente, DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(),
txtFechaF.Text.ToDate(),UsuarioActual.CveEmpresa, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, DdlVendedor.SelectedValue.ToEntero(),DdlConSaldo.SelectedValue.ToEntero())) txtFechaF.Text.ToDate(),UsuarioActual.CveEmpresa, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, DdlVendedor.SelectedValue.ToEntero(),DdlConSaldo.SelectedValue.ToEntero()))
{ {
GvDatos.DataSource = ObjVenta.DtResultados; GvDatos.DataSource = ObjVenta.DtResultados;
@@ -127,7 +137,7 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
String Sucursal; String Sucursal;
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; } if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
String Cliente; String Cliente;
if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedItem.Text}"; } else { Cliente = ""; } if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedText}"; } else { Cliente = ""; }
if (DtDatos.Rows.Count > 0) if (DtDatos.Rows.Count > 0)
{ {
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)); System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));

View File

@@ -50,8 +50,10 @@
</div> </div>
<label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label> <label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label>
<div class="col-md-2" id="DivDdlCliente" runat="server"> <div class="col-md-2" id="DivDdlCliente" runat="server">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%"> <%-- <asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList> </asp:DropDownList>--%>
<ADS:Dropdownlost ID="DdlCliente" runat="server" AutoPostBack="False" DataTextField="NombreComercial" IncluyeTodos="false" DataValueField="CveCliente" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
</div> </div>
<div class="col-md-1" style="">Fecha Ini Doc:</div> <div class="col-md-1" style="">Fecha Ini Doc:</div>
<div class="col-md-1"> <div class="col-md-1">

View File

@@ -58,7 +58,12 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
TxtFechaFCorte.Text = DateTime.Today.ToString(); TxtFechaFCorte.Text = DateTime.Today.ToString();
CargaSucursales(); CargaSucursales();
CargaClientes(); CargaClientes();
DdlCliente.SelectedValueExist(Request["CveCliente"] == null ? "-1" : Request["CveCliente"].ToString()); int CveCliente = (Request["CveCliente"] == null ? -1 : Request["CveCliente"].ToString().ToEntero());
DdlCliente.SelectedValue = CveCliente.ToString();
DataTable dt = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:CveCliente);
DdlCliente.SelectedText = dt.FiltroPrimeroValor("NombreComercial", "");
DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString()); DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString());
DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString()); DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString());
CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero(); CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero();
@@ -90,16 +95,21 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
DdlSucursal.DataBind(); DdlSucursal.DataBind();
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1")); DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSucursal.SelectedValue = "-1"; DdlSucursal.SelectedValue = "-1";
}
//protected void CargaClientes()
//{
// DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
// DdlCliente.DataBind();
// DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
// DdlCliente.SelectedValue = "-1";
//}
protected void CargaClientes()
{
DdlCliente.setEsWebService(true);
DdlCliente.Attributes.Add("data-metodo", "getcliente");
} }
protected void CargaClientes()
{
DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
DdlCliente.DataBind();
DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
DdlCliente.SelectedValue = "-1";
}
protected void CargaVendedores() protected void CargaVendedores()
{ {
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa); DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
@@ -116,8 +126,13 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
if (TxtFechaICorte.Text != "") { FechaICorte = TxtFechaICorte.Text.ToDate(); } else { FechaICorte = DateTime.MinValue; } if (TxtFechaICorte.Text != "") { FechaICorte = TxtFechaICorte.Text.ToDate(); } else { FechaICorte = DateTime.MinValue; }
DateTime FechaFCorte; DateTime FechaFCorte;
if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; } if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; }
ClsVentas ObjVenta = new ClsVentas(); ClsVentas ObjVenta = new ClsVentas();
if (ObjVenta.GetRepAnticiposNCIXCDetalle(DdlCliente.SelectedValue.ToEntero(), DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), int CveCliente = -1;
if (DdlCliente.SelectedValue.ToEntero() != 0)
{
CveCliente = DdlCliente.SelectedValue.ToEntero();
}
if (ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(),
UsuarioActual.CveEmpresa, DdlConSaldo.SelectedValue.ToEntero(), DdlTipo.SelectedValue.ToEntero(), CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico)) UsuarioActual.CveEmpresa, DdlConSaldo.SelectedValue.ToEntero(), DdlTipo.SelectedValue.ToEntero(), CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico))
{ {
GvDatos.DataSource = ObjVenta.DtResultados; GvDatos.DataSource = ObjVenta.DtResultados;
@@ -128,7 +143,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
UpDatos.Update(); UpDatos.Update();
if (TxtFechaFCorte.Text != DateTime.Now.ToShortDateString() && txtFechaI.Text != "") { LnkHabilitarSaldar.Visible = false; LnkSaldar.Visible = false; } else { LnkHabilitarSaldar.Visible = true; } if (TxtFechaFCorte.Text != DateTime.Now.ToShortDateString() && txtFechaI.Text != "") { LnkHabilitarSaldar.Visible = false; LnkSaldar.Visible = false; } else { LnkHabilitarSaldar.Visible = true; }
if (LnkSaldar.Visible) { HabilitarCheckbox(); } if (LnkSaldar.Visible) { HabilitarCheckbox(); }
Tipo = DdlTipo.SelectedValue.ToEntero(); Tipo = DdlTipo.SelectedValue.ToEntero();
} }
protected void BtnConsultar_Click(object sender, EventArgs e) protected void BtnConsultar_Click(object sender, EventArgs e)
@@ -159,7 +174,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
String Sucursal; String Sucursal;
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; } if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
String Cliente; String Cliente;
if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedItem.Text}"; } else { Cliente = ""; } if (DdlCliente.SelectedValue.ToEntero() != -1) { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedText}"; } else { Cliente = ""; }
String ConSaldo; String ConSaldo;
if (DdlConSaldo.SelectedValue != "-1") { ConSaldo = $"&emsp;<b>Con Saldo:</b> {DdlConSaldo.SelectedItem.Text}"; } else { ConSaldo = ""; } if (DdlConSaldo.SelectedValue != "-1") { ConSaldo = $"&emsp;<b>Con Saldo:</b> {DdlConSaldo.SelectedItem.Text}"; } else { ConSaldo = ""; }
String Tipo2; String Tipo2;