Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -191,7 +191,7 @@
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificarCompra_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<td style="width: 80px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" CssClass="Texto" Text="Ver Poliza" ></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -144,6 +144,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
||||
if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
|
||||
{
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
||||
e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}";
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
||||
}
|
||||
else
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificarCompra_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<td style="width: 80px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
|
||||
|
||||
@@ -129,7 +129,16 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
|
||||
e.Row.FCHyperLink("HplEdicion").Visible = true;
|
||||
}
|
||||
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0;
|
||||
if (UsuarioActual.Empresa.TipoContabilidad == 1)
|
||||
{
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
||||
e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}" ;
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0;
|
||||
}
|
||||
|
||||
contP.Dispose();
|
||||
GvD.DataBind();
|
||||
|
||||
@@ -3,6 +3,7 @@ Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
@@ -2299,36 +2300,41 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'VERIFICA EXISTENCIAS
|
||||
If TipoMovimiento > 1 Then
|
||||
Dim MensajeExistencias As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
For Each gvr As GridViewRow In GvInv.Rows
|
||||
Dim ExistenciaActual = DtInv.SUM("CantidadSurtidaPantalla", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero} ")
|
||||
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveTipoAlmacen", "").ToEntero
|
||||
Dim ValidaExistencia As Boolean = True
|
||||
If CveTipoAlmacen.Contiene(6, 21) AndAlso UsuarioActual.CveEmpresa = 140 Then ValidaExistencia = False ' si es garantia no valida existencia
|
||||
If ValidaExistencia Then
|
||||
Dim MensajeExistencias As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
For Each gvr As GridViewRow In GvInv.Rows
|
||||
Dim ExistenciaActual = DtInv.SUM("CantidadSurtidaPantalla", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero} ")
|
||||
|
||||
If TipoMovimiento = 2 Then
|
||||
'If gvr.DataKey("CantidadC").ToString.ToDecimal <> ExistenciaActual Then
|
||||
' Alert("La devolución debe de ser completa.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
If TipoMovimiento = 2 Then
|
||||
'If gvr.DataKey("CantidadC").ToString.ToDecimal <> ExistenciaActual Then
|
||||
' Alert("La devolución debe de ser completa.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If DtExistencias.SUM("Existencia", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero}") < ExistenciaActual Then
|
||||
If DtExistencias.SUM("Existencia", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero}") < ExistenciaActual Then
|
||||
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
|
||||
Continue For
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=(TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
||||
If Existencia < ExistenciaActual Then
|
||||
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
|
||||
Continue For
|
||||
End If
|
||||
Next
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If MensajeExistencias.ToString <> "" Then
|
||||
Alert($"Los siguientes productos no cuentan con la existencia suficiente para hacer la devolución. </br></br> {MensajeExistencias.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:= (TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
||||
If Existencia < ExistenciaActual Then
|
||||
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
|
||||
Continue For
|
||||
End If
|
||||
Next
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If MensajeExistencias.ToString <> "" Then
|
||||
Alert($"Los siguientes productos no cuentan con la existencia suficiente para hacer la devolución. </br></br> {MensajeExistencias.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
@@ -3926,7 +3932,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim ObjCompras As New ClsCompras(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjOC As New ClsOC(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
|
||||
'ENTRADA ALMACÉN
|
||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 2, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveImportacionCompra, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=-1, Remision:=TxtRemision.Text, Modulo:="RA/G6")
|
||||
@@ -4075,9 +4080,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ImporteAbono = SubTotalPartida
|
||||
ImporteAbonoME = (SubTotalPartida * dr("TipoCambio").ToString.ToDecimal) - SubTotalPartida
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, CveConceptoCostoIndirecto, ConceptoPartida, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono, CveSubProyecto:=CveSubProyecto) Then
|
||||
' si tiene valor es que hay complementaria
|
||||
If ImporteAbonoME > 0 Then
|
||||
@@ -4092,7 +4094,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
'DOCUMENTOS RELACIONADOS AL MOVIMIENTO
|
||||
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
|
||||
If Not ErrorMovInv AndAlso Not GuardaDocumentoBitacora(ObjBitacora, CveMovimiento) Then
|
||||
@@ -4100,8 +4101,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Alert("Ocurrió un error al guardar los datos adjuntos de la bitácora", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
@@ -4114,16 +4113,16 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
||||
MensajeError = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al contabilizar los conceptos contables"
|
||||
End If
|
||||
End If
|
||||
'If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
' ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' ObjContaAC.IniciaTransacSQL()
|
||||
' If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
||||
' MensajeError = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
||||
' Else
|
||||
' ErrorMovInv = True
|
||||
' MensajeError = "Error al contabilizar los conceptos contables"
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
If Not ErrorMovInv AndAlso CveImportacionSeleccionada > 0 Then
|
||||
@@ -4145,7 +4144,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'FINAL
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
@@ -4158,14 +4157,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Limpia()
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
GuardaLog(MensajeError)
|
||||
Alert("Error al guardar el movimiento de almacen. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjInventario.Dispose()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
End Sub
|
||||
Private Sub Limpia()
|
||||
CveCompraSurtir = -1
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkDeshabilitaAutorizaciones" runat="server" CssClass="form-control" Checked="false" />
|
||||
<label for="<%= ChkDeshabilitaAutorizaciones.ClientID.ToString()%>">Deshabilita autorizaciones para público general</label>
|
||||
<label for="<%= ChkDeshabilitaAutorizaciones.ClientID.ToString()%>">Activar remisión para público general hasta $5000</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1010,7 +1010,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
tipoCambioPago = Pago.TCPago
|
||||
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * Pago.TCPago
|
||||
|
||||
'If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
|
||||
' EsAnticipoEspecial = True
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="IEPS" Visible="false" ItemStyle-HorizontalAlign="Right" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIEPS" runat="server" Text='<%# Eval("IEPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -580,8 +580,7 @@
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" Text="Folio" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal" runat="server" Text="SubTotal" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -592,8 +591,7 @@
|
||||
<asp:CheckBox ID="ChkAmortizacion" runat="server" Text="Amortización" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text="IVA" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -605,8 +603,7 @@
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text="Total" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text="Fecha" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text="Sucursal" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -618,8 +615,7 @@
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="Sucursal Cliente" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text="Vendedor" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -630,8 +626,7 @@
|
||||
<asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text="Motivo Cancelacion" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeTimbro" runat="server" Text="Se Timbró" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text="Se envió Mail" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -642,8 +637,7 @@
|
||||
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolioFiscal" runat="server" Text="Folio Fiscal (UUID)" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -654,8 +648,7 @@
|
||||
<asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text="Estatus Facturación" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text="Factura Cotización" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCliente" runat="server" Text="Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -665,23 +658,16 @@
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text="Impuestos Locales" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMoneda" runat="server" Text="Moneda" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSaldo" runat="server" Text="Saldo" Checked="false" /></td>
|
||||
</td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>
|
||||
|
||||
@@ -56,7 +56,6 @@ Partial Class RepVentaDetalle
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property TipoCliente As Integer
|
||||
Get
|
||||
If ViewState("TipoCliente") Is Nothing Then
|
||||
@@ -64,16 +63,12 @@ Partial Class RepVentaDetalle
|
||||
Else
|
||||
Return ViewState("TipoCliente").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
|
||||
Set(value As Integer)
|
||||
ViewState("TipoCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property TCEspecifico As Decimal
|
||||
Get
|
||||
Return ViewState("TCEspecifico").ToString.ToDecimal
|
||||
@@ -110,6 +105,7 @@ Partial Class RepVentaDetalle
|
||||
Personalizo = 0
|
||||
CargaCombos()
|
||||
InicializaValores()
|
||||
ConfiguraEmpresa()
|
||||
CargaDatos()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
@@ -370,7 +366,6 @@ Partial Class RepVentaDetalle
|
||||
#Region "CONSULTAR"
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
ConfiguraEmpresa()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
@@ -423,6 +418,7 @@ Partial Class RepVentaDetalle
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DtVentas.SUMD("Descuento") <= 0 Then GvDatos.Columns(5).Visible = False ' se oculta descuentos, si está vac+io
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
|
||||
GvDatos.DataBind()
|
||||
@@ -451,12 +447,12 @@ Partial Class RepVentaDetalle
|
||||
End Function
|
||||
|
||||
Private Sub ConfiguraEmpresa()
|
||||
'Dim ObjEmpresa As New ClsEmpresas()
|
||||
'If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
|
||||
If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(10).Visible = False
|
||||
If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(11).Visible = False
|
||||
'End If
|
||||
'ObjEmpresa.Dispose()
|
||||
|
||||
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -356,12 +356,12 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" Visible="false" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="Sub Total 2" DataField="SubTotal2" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret. ISR" DataField="RetISR" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Imp. Locales" DataField="TotalImpuestos" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -78,8 +78,9 @@ Partial Class Ventas_RepVentas
|
||||
TipoCambio = 1
|
||||
TCEspecifico = -1
|
||||
CargaCombos()
|
||||
|
||||
'MODALIDADES
|
||||
ConfiguraEmpresa()
|
||||
|
||||
'MODALIDADES
|
||||
If Request("Op") IsNot Nothing AndAlso Request("Op").ToString <> "" Then
|
||||
Opcion = Request("Op").ToString
|
||||
Else
|
||||
@@ -155,6 +156,7 @@ Partial Class Ventas_RepVentas
|
||||
Private Sub ConfiguraEmpresa()
|
||||
' If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(8).Visible = False
|
||||
If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(9).Visible = False
|
||||
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
@@ -210,9 +212,9 @@ Partial Class Ventas_RepVentas
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
ConfiguraEmpresa()
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
CargaDatos()
|
||||
Personaliza()
|
||||
UPDatos.Update()
|
||||
'XmlConf(UsuarioActual.CveUsuario, 9)
|
||||
@@ -252,6 +254,8 @@ Partial Class Ventas_RepVentas
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If DtVentas.SUMD("Descuento") <= 0 Then GvDatos.Columns(3).Visible = False ' se oculta descuentos, si está vac+io
|
||||
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||
ObjVentas.Dispose()
|
||||
@@ -474,82 +478,22 @@ Partial Class Ventas_RepVentas
|
||||
Personaliza()
|
||||
End Sub
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
If ChkSubTotal2.Checked Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIEPS.Checked Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetIVA.Checked Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetISR.Checked Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
|
||||
If ChkImpLoc.Checked Then
|
||||
GvDatos.Columns(10).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMinSub.Checked Then
|
||||
GvDatos.Columns(12).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(12).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAVGSub.Checked Then
|
||||
GvDatos.Columns(13).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(13).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMaxSub.Checked Then
|
||||
GvDatos.Columns(14).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(14).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMinTot.Checked Then
|
||||
GvDatos.Columns(17).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(17).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAvgTot.Checked Then
|
||||
GvDatos.Columns(16).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(16).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMaxTot.Checked Then
|
||||
GvDatos.Columns(15).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(15).Visible = False
|
||||
End If
|
||||
|
||||
If CheckRefacturado.Checked Then
|
||||
GvDatos.Columns(18).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(18).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
GvDatos.Columns(5).Visible = ChkSubTotal2.Checked
|
||||
GvDatos.Columns(7).Visible = ChkIEPS.Checked
|
||||
GvDatos.Columns(8).Visible = ChkRetIVA.Checked
|
||||
GvDatos.Columns(9).Visible = ChkRetISR.Checked
|
||||
GvDatos.Columns(10).Visible = ChkImpLoc.Checked
|
||||
GvDatos.Columns(12).Visible = ChkMinSub.Checked
|
||||
GvDatos.Columns(13).Visible = ChkAVGSub.Checked
|
||||
GvDatos.Columns(14).Visible = ChkMaxSub.Checked
|
||||
GvDatos.Columns(15).Visible = ChkMaxTot.Checked
|
||||
GvDatos.Columns(16).Visible = ChkAvgTot.Checked
|
||||
GvDatos.Columns(17).Visible = ChkMinTot.Checked
|
||||
GvDatos.Columns(18).Visible = CheckRefacturado.Checked
|
||||
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Reference in New Issue
Block a user