Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.Derecha {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
Reporte Entradas Usados Clientes
|
Reporte Entradas Usados Clientes
|
||||||
@@ -80,7 +85,8 @@
|
|||||||
<asp:BoundField HeaderText="Cantidad" DataField="Total" DataFormatString="{0:N0}" />
|
<asp:BoundField HeaderText="Cantidad" DataField="Total" DataFormatString="{0:N0}" />
|
||||||
<asp:TemplateField HeaderText="Cantidad">
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkCantidad" OnClick="CargarVentasGrupo" Text='<%# Eval("Total", "{0:N0}") %>' runat="server" />
|
<%--OnClick="CargarVentasGrupo"--%>
|
||||||
|
<asp:LinkButton ID="LnkCantidad" CommandName="Mostrar" OnCommand="CargarVentasGrupo" Text='<%# Eval("Total", "{0:N0}") %>' runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -122,8 +128,8 @@
|
|||||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||||
<asp:HyperLinkField HeaderText="Fecha" DataTextField="Fecha" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
<asp:HyperLinkField HeaderText="Fecha" DataTextField="Fecha" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||||
<asp:HyperLinkField HeaderText="Sucursal" DataTextField="SubProyecto" Target="_blank" ItemStyle-Width="15%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
<asp:HyperLinkField HeaderText="Sucursal" DataTextField="SubProyecto" Target="_blank" ItemStyle-Width="15%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||||
<asp:HyperLinkField HeaderText="Cantidad" DataTextField="Cantidad" Target="_blank" ItemStyle-Width="5%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
<asp:HyperLinkField HeaderText="Cantidad" DataTextField="Cantidad" Target="_blank" ItemStyle-Width="5%" ItemStyle-CssClass="Derecha" DataTextFormatString="{0:###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||||
<asp:HyperLinkField HeaderText="Total" DataTextField="Total" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
<asp:HyperLinkField HeaderText="Total" DataTextField="Total" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Derecha" DataTextFormatString="{0:###,###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -102,6 +102,6 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
|||||||
ObjAcum.Dispose()
|
ObjAcum.Dispose()
|
||||||
GvVentas.DataBind()
|
GvVentas.DataBind()
|
||||||
|
|
||||||
RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
|
RegistraScript("$('#ModalVentasAvance').modal();")
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1858,7 +1858,7 @@ Public Class ClsCompProveedores
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetRePresentanteLegal(CveRepresentanteLegal As Integer, CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1868,6 +1868,7 @@ Public Class ClsCompProveedores
|
|||||||
|
|
||||||
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
|
.Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Imports System.Net
|
|||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
|
Imports System.Collections.Generic
|
||||||
|
|
||||||
Namespace Modelos
|
Namespace Modelos
|
||||||
|
|
||||||
@@ -539,7 +540,64 @@ Namespace Modelos
|
|||||||
Public Property CveEstatus As Integer
|
Public Property CveEstatus As Integer
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
Public Function RegenerarPrePolizas(Optional TransaccionCompartida As SqlClient.SqlTransaction = Nothing, Optional ObjACTransac As ClsContPAQi = Nothing) As Boolean
|
||||||
|
Dim ErrorPrePolizas As Boolean = False
|
||||||
|
|
||||||
|
Dim ObjVentas As ClsVentas = Nothing
|
||||||
|
If TransaccionCompartida IsNot Nothing Then
|
||||||
|
ObjVentas = New ClsVentas(TransaccionCompartida)
|
||||||
|
Else
|
||||||
|
ObjVentas = New ClsVentas()
|
||||||
|
ObjVentas.IniciaTransacSQL()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
|
||||||
|
Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
|
||||||
|
Dim ObjEventos As New ClsOIEventos(ObjVentas.IniciaTransacSQL())
|
||||||
|
Dim ObjAC As ClsContPAQi = Nothing
|
||||||
|
|
||||||
|
If ObjACTransac Is Nothing Then
|
||||||
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
|
ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ObjAC = ObjACTransac
|
||||||
|
End If
|
||||||
|
|
||||||
|
ErrorPrePolizas = Not RegeneracionPolizas(Me, ObjVentas, ObjAC, ObjConta, ObjBancos, ObjEventos)
|
||||||
|
|
||||||
|
If TransaccionCompartida Is Nothing Then
|
||||||
|
ObjVentas.Commit()
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
ObjBancos.Dispose()
|
||||||
|
ObjEventos.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjACTransac Is Nothing Then
|
||||||
|
If ObjAC IsNot Nothing Then
|
||||||
|
ObjAC.Commit()
|
||||||
|
ObjAC.Dispose()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Not ErrorPrePolizas
|
||||||
|
End Function
|
||||||
|
Private Function RegeneracionPolizas(ObjFactura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjAC As ClsContPAQi, ByRef ObjConta As ClsContabilidad, ObjBancos As ClsBancos, ObjEventos As ClsOIEventos) As Boolean
|
||||||
|
Dim ErrorPrePolizas As Boolean = False
|
||||||
|
|
||||||
|
'REMOVEMOS LOS CONCEPTOS DE LA PREPOLIZA
|
||||||
|
ErrorPrePolizas = Not ObjConta.RemovePrePolizasDetalle(ObjFactura.CvePrePoliza, -1, ObjFactura.CveVenta, 2)
|
||||||
|
|
||||||
|
'VUELVE A GENERAR LAS PREPOLIZAS
|
||||||
|
If Not ErrorPrePolizas Then
|
||||||
|
ErrorPrePolizas = ProcesoPrepolizas(ObjFactura, ObjConta, -1, ObjFactura.DtDetalle, ObjAC, ValorMultiplicador:=1, ObjBancos:=ObjBancos, ObjVentas:=ObjVentas, ObjEventos:=ObjEventos, DtRemisionesRelacionadas:=New DataTable, SeCancelaRemisionProceso:=False,
|
||||||
|
CancelarRemisiones:=False, ListaRemisionesCancelar:=New List(Of Integer))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorPrePolizas Then ErrorPrePolizas = GuardarVentaImpuestosLocales(ObjFactura, ObjVentas, ObjConta, 1)
|
||||||
|
|
||||||
|
Return Not ErrorPrePolizas
|
||||||
|
End Function
|
||||||
Public Function EmitirFactura(Optional Timbrar As Boolean = True, Optional Transac As SqlClient.SqlTransaction = Nothing, Optional ObjContPaqTransac As ClsContPAQi = Nothing) As MMensajeFactura
|
Public Function EmitirFactura(Optional Timbrar As Boolean = True, Optional Transac As SqlClient.SqlTransaction = Nothing, Optional ObjContPaqTransac As ClsContPAQi = Nothing) As MMensajeFactura
|
||||||
Dim Retorno As New MMensajeFactura()
|
Dim Retorno As New MMensajeFactura()
|
||||||
|
|
||||||
@@ -1059,7 +1117,7 @@ Namespace Modelos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = true) As Byte()
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
||||||
Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||||
Dim File As Byte() = Nothing
|
Dim File As Byte() = Nothing
|
||||||
Try
|
Try
|
||||||
@@ -6067,7 +6125,7 @@ Namespace Modelos
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
|
Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa)
|
Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa)
|
||||||
|
|
||||||
|
|||||||
@@ -603,6 +603,51 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>--%>
|
</div>--%>
|
||||||
|
|
||||||
|
<div class="portlet light smmallpadding bordered ">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Representastes Legales</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
<a href="javascript:;" class="reload" data-original-title="" title=""></a>
|
||||||
|
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||||
|
<a href="javascript:;" class="remove" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||||
|
|
||||||
|
<asp:GridView ID="GvRepresentante" runat="server" AutoGenerateColumns="False" DataKeyNames="CveRepresentanteLegal" EmptyDataText="No se encontraron Representantes" Width="100%"
|
||||||
|
ToolTip="Listado de representantes" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Representante" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlProveedor" runat="server" Text='<%# Eval("RepresentanteLegal") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--
|
||||||
|
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvRepresentantesEliminar_Click" 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" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>--%>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -380,6 +380,9 @@ Partial Class Compras_Proveedores
|
|||||||
End If
|
End If
|
||||||
HlEvento.Visible = True
|
HlEvento.Visible = True
|
||||||
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;"
|
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;"
|
||||||
|
|
||||||
|
CargaRepresentantes()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
'Configuración de Modalidad Insert
|
'Configuración de Modalidad Insert
|
||||||
|
|
||||||
@@ -500,6 +503,30 @@ Partial Class Compras_Proveedores
|
|||||||
'ViewState("OUsuario") = "Usuario DESC"
|
'ViewState("OUsuario") = "Usuario DESC"
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaRepresentantes()
|
||||||
|
|
||||||
|
If CveProveedor > 0 Then
|
||||||
|
|
||||||
|
Dim ObjProveedores As New ClsCompProveedores
|
||||||
|
|
||||||
|
If ObjProveedores.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa, CveProveedor) Then
|
||||||
|
|
||||||
|
GvRepresentante.DataSource = ObjProveedores.DtResultados
|
||||||
|
Else
|
||||||
|
GvRepresentante.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjProveedores.Dispose()
|
||||||
|
|
||||||
|
GvRepresentante.DataBind()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1)
|
Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1)
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|||||||
@@ -787,7 +787,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble,
|
CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble,
|
||||||
CveChofer:=If(ChkTransitorio.Checked, DdlChofer.SelectedValue.ToEntero, -1), Placa:=If(ChkTransitorio.Checked, TxtPlaca.Text.Trim, "-1"), FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:=If(ChkTransitorio.Checked, TxtEspecifUnidad.Text.Trim, "-1"),
|
CveChofer:=If(ChkTransitorio.Checked, DdlChofer.SelectedValue.ToEntero, -1), Placa:=If(ChkTransitorio.Checked, TxtPlaca.Text.Trim, "-1"), FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:=If(ChkTransitorio.Checked, TxtEspecifUnidad.Text.Trim, "-1"),
|
||||||
ResponsableCarga:=If(ChkTransitorio.Checked, TxtResponsableCarga.Text.Trim, "-1"), ResponsableRecibio:=If(ChkTransitorio.Checked, TxtResponsableRecibio.Text.Trim, "-1"), Identificacion:=If(ChkTransitorio.Checked, TxtIdentificacion.Text.Trim, "-1"), Domicilio:=If(ChkTransitorio.Checked, TxtDomicilio.Text.Trim, "-1"),
|
ResponsableCarga:=If(ChkTransitorio.Checked, TxtResponsableCarga.Text.Trim, "-1"), ResponsableRecibio:=If(ChkTransitorio.Checked, TxtResponsableRecibio.Text.Trim, "-1"), Identificacion:=If(ChkTransitorio.Checked, TxtIdentificacion.Text.Trim, "-1"), Domicilio:=If(ChkTransitorio.Checked, TxtDomicilio.Text.Trim, "-1"),
|
||||||
Telefono:=If(ChkTransitorio.Checked, TxtTelefono.Text.Trim, "-1"), Ciudad:=If(ChkTransitorio.Checked, TxtCiudad.Text.Trim, "-1"), Licencia:=If(ChkTransitorio.Checked, TxtLicencia.Text.Trim, "-1"), Modulo:="TA/G")
|
Telefono:=If(ChkTransitorio.Checked, TxtTelefono.Text.Trim, "-1"), Ciudad:=If(ChkTransitorio.Checked, TxtCiudad.Text.Trim, "-1"), Licencia:=If(ChkTransitorio.Checked, TxtLicencia.Text.Trim, "-1"), Modulo:="TA/G2")
|
||||||
FolioSalida = ObjInventario.Folio
|
FolioSalida = ObjInventario.Folio
|
||||||
Folio = ObjInventario.Folio
|
Folio = ObjInventario.Folio
|
||||||
If CveMovimientoSalida <= 0 Then
|
If CveMovimientoSalida <= 0 Then
|
||||||
@@ -852,7 +852,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero)
|
AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero)
|
||||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
|
CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
|
||||||
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
|
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
|
||||||
CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G")
|
CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3")
|
||||||
FolioEntrada = ObjInventario.Folio
|
FolioEntrada = ObjInventario.Folio
|
||||||
If CveMovimientoEntrada <= 0 Then
|
If CveMovimientoEntrada <= 0 Then
|
||||||
TextoError = "Ocurrió un error al generar el movimiento de entrada"
|
TextoError = "Ocurrió un error al generar el movimiento de entrada"
|
||||||
@@ -1039,7 +1039,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
|
'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
|
||||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, CveConceptoInventario, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, CveConceptoInventario, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||||
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""),
|
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""),
|
||||||
GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble, Modulo:="TA/G")
|
GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble, Modulo:="TA/G4")
|
||||||
Dim FolioMov As Integer = ObjInventario.Folio
|
Dim FolioMov As Integer = ObjInventario.Folio
|
||||||
|
|
||||||
If CveMovimiento <= 0 Then
|
If CveMovimiento <= 0 Then
|
||||||
@@ -1510,68 +1510,88 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CveMovimientoEntrada As Integer = 0
|
||||||
|
Dim Folio As Integer = 0
|
||||||
|
Dim ErrorMovInv As Boolean = False
|
||||||
|
Dim TextoError As String = ""
|
||||||
|
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
ObjInventario.IniciaTransacSQL()
|
ObjInventario.IniciaTransacSQL()
|
||||||
Dim CveMovimientoEntrada As Integer = 0
|
Try
|
||||||
Dim Folio = 0
|
CveMovimientoEntrada = ObjInventario.AddMovimiento(GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||||
Dim ErrorMovInv As Boolean = False
|
Observaciones:=TxtObservacionesRecepcion.Text.Trim, Recibio:=TxtRecibio.Text, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero,
|
||||||
Dim TextoError = ""
|
CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/C")
|
||||||
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
If CveMovimientoEntrada <= 0 Then
|
||||||
|
TextoError = "No se pudo generar el movimiento"
|
||||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
ErrorMovInv = True
|
||||||
Observaciones:=TxtObservacionesRecepcion.Text.Trim, Recibio:=TxtRecibio.Text, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero,
|
|
||||||
CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G")
|
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservacionesRecepcion.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
If CvePrePoliza <= 0 Then
|
|
||||||
TextoError = "No se pudo generar la Poliza para la cancelacion"
|
|
||||||
ErrorMovInv = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Folio = ObjInventario.Folio
|
|
||||||
|
|
||||||
If CveMovimientoEntrada <= 0 And Not ErrorMovInv Then
|
|
||||||
TextoError = "No se pudo generar el movimiento de entrada correctamente"
|
|
||||||
ErrorMovInv = True
|
|
||||||
Else
|
|
||||||
Dim CveMovimientoDetalleSalida As Integer = 0
|
|
||||||
Dim importe As Double = 0
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
|
||||||
CveMovimientoDetalleSalida = Dr("CveMovimientoDetalle").ToString.ToEntero
|
|
||||||
Dim Cantidad As Double = Dr("Cantidad").ToString.ToDouble
|
|
||||||
Dim PrecioUnitario As Double = Dr("PU").ToString.ToDouble
|
|
||||||
If CveMovimientoDetalleSalida <= 0 Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PrecioUnitario, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
importe += Cantidad * PrecioUnitario
|
|
||||||
Next
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CvePrePoliza As Integer = -1
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
Dim ImporteDecimal As Decimal = importe.ToDecimal
|
Folio = ObjInventario.Folio
|
||||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservacionesRecepcion.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
If CvePrePoliza <= 0 Then
|
||||||
CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
|
TextoError = "No se pudo generar la Poliza para la cancelación"
|
||||||
ErrorMovInv = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
|
||||||
CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
|
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
If CveMovimientoEntrada <= 0 And Not ErrorMovInv Then
|
||||||
|
TextoError = "No se pudo generar el movimiento de entrada correctamente"
|
||||||
|
ErrorMovInv = True
|
||||||
|
Else
|
||||||
|
Dim CveMovimientoDetalleSalida As Integer = 0
|
||||||
|
Dim importe As Double = 0
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
|
CveMovimientoDetalleSalida = Dr("CveMovimientoDetalle").ToString.ToEntero
|
||||||
|
Dim Cantidad As Double = Dr("Cantidad").ToString.ToDouble
|
||||||
|
Dim PrecioUnitario As Double = Dr("PU").ToString.ToDouble
|
||||||
|
If CveMovimientoDetalleSalida <= 0 Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PrecioUnitario, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
importe += Cantidad * PrecioUnitario
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un error al obtener los movimientos de salida"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
Dim ImporteDecimal As Decimal = importe.ToDecimal
|
||||||
|
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||||
|
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||||
|
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||||
|
OnError(TextoError, ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
ObjInventario.Commit()
|
ObjInventario.Commit()
|
||||||
@@ -1593,11 +1613,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
UPDatosAlmacen.Update()
|
UPDatosAlmacen.Update()
|
||||||
Else
|
Else
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
ObjConta.RollBack()
|
|
||||||
Alert(TextoError, TipoMensaje.MsgError)
|
Alert(TextoError, TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
|
|
||||||
CargaRecepcion()
|
CargaRecepcion()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1648,7 +1670,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
'AGREGAMOS LA ENTRADA
|
'AGREGAMOS LA ENTRADA
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(GvDatosRecepcion.Rows(0).DataKey("CveAlmacenDestino").ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
CveMovimientoSalida = ObjInventario.AddMovimiento(GvDatosRecepcion.Rows(0).DataKey("CveAlmacenDestino").ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||||
Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G")
|
Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G1")
|
||||||
Folio = ObjInventario.Folio
|
Folio = ObjInventario.Folio
|
||||||
|
|
||||||
If CveMovimientoSalida <= 0 Then
|
If CveMovimientoSalida <= 0 Then
|
||||||
|
|||||||
@@ -648,7 +648,8 @@
|
|||||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaConversion, 2) + ' MXN';
|
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaConversion, 2) + ' MXN';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function FnSeleccionaNC(chk, chkNC)
|
|
||||||
|
function FnSeleccionaNC(chk, chkNC,txtImporte)
|
||||||
{
|
{
|
||||||
if (chk.checked) {
|
if (chk.checked) {
|
||||||
chkNC.disabled = false;
|
chkNC.disabled = false;
|
||||||
@@ -659,6 +660,11 @@
|
|||||||
chkNC.click();
|
chkNC.click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
txtImporte.disabled = chkNC.checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
function FnEditarImporte(chkNC, txtImporte) {
|
||||||
|
txtImporte.disabled = chkNC.checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
function FnLimites(chk, txt, limiteInferior, limiteSuperior) {
|
function FnLimites(chk, txt, limiteInferior, limiteSuperior) {
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6},{0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID))
|
||||||
Else
|
Else
|
||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda))
|
||||||
End If
|
End If
|
||||||
@@ -646,8 +646,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
||||||
e.Row.FCCheckBox("ChkGenerarNC").Visible = True
|
e.Row.FCCheckBox("ChkGenerarNC").Visible = True
|
||||||
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda))
|
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -1540,12 +1539,26 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
If ListaFacturasGenerarNC.Count > 0 Then
|
If ListaFacturasGenerarNC.Count > 0 Then
|
||||||
Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaFacturasGenerarNC)
|
For Each Fac As Modelos.Factura In ListaFacturasGenerarNC
|
||||||
If Resp.CveVenta > 0 Then
|
Dim ListaNC As New List(Of Modelos.Factura)
|
||||||
NCGeneradas.Add(Resp)
|
ListaNC.Add(Fac)
|
||||||
Else
|
|
||||||
MsgError = "No se pudo generar la nota de credito"
|
Dim Resp As Modelos.Factura.MMensajeFactura = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaNC)
|
||||||
|
|
||||||
|
If Resp.CveVenta > 0 Then
|
||||||
|
NCGeneradas.Add(Resp)
|
||||||
|
Else
|
||||||
|
MsgError = "No se pudo generar la nota de crédito"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If MsgError = "" Then
|
||||||
|
If NCGeneradas.Count <> ListaFacturasGenerarNC.Count Then
|
||||||
|
MsgError = "No se generaron las notas de crédito seleccionadas"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1641,21 +1654,14 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
If ObjConta IsNot Nothing Then ObjConta.Commit()
|
||||||
|
|
||||||
Dim StrMsg As New StringBuilder
|
Dim StrMsg As New StringBuilder
|
||||||
StrMsg.Append("Abono Registrado Correctamente.<br/>")
|
StrMsg.AppendFormat("Abono Registrado Correctamente. Folio <b><a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>{1}</a></b> <br/>", CveIE, ObjIE.Folio)
|
||||||
StrMsg.AppendFormat("Folio <b><a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>{1}</a></b>", CveIE, ObjIE.Folio)
|
|
||||||
|
|
||||||
If IDPoliza > 0 Then StrMsg.AppendFormat("<br/> Poliza: <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>{1}</a>", IDPoliza, FolioPoliza)
|
If IDPoliza > 0 Then StrMsg.AppendFormat("Poliza: <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>{1}</a> <br/>", IDPoliza, FolioPoliza)
|
||||||
|
|
||||||
Dim TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
|
Dim TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
|
||||||
|
|
||||||
Dim SbMensaje As New StringBuilder
|
|
||||||
SbMensaje.Append(String.Format("Abono Registrado Correctamente.<br/><br/> Poliza: <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>{1}</a><br/><br/>{2}", IDPoliza, FolioPoliza, TextoComplementoPago))
|
|
||||||
|
|
||||||
For Each NC In NCGeneradas
|
For Each NC In NCGeneradas
|
||||||
For Each msg In NC.Mensajes
|
StrMsg.AppendFormat("Nota de crédito generada correctamente.<br/><br/> Folio: <a href='/Ventas/Ventas.aspx?CveVenta={0}' target='_blank' class='Texto'>{1}</a><br/>", NC.CveVenta, NC.SerieFolio)
|
||||||
StrMsg.Append(msg)
|
|
||||||
Next
|
|
||||||
StrMsg.Append("</br>")
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Alert($"{StrMsg.ToString}<br/><br/>{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
|
Alert($"{StrMsg.ToString}<br/><br/>{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
|
||||||
@@ -1680,7 +1686,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
#Region " N O T A - D E - C R E D I T O"
|
#Region " N O T A - D E - C R E D I T O"
|
||||||
|
|
||||||
Private Function GenerarNC(Trasac As SqlClient.SqlTransaction, ObjConta As ClsContPAQi, ListaVentasGenerarNC As List(Of Modelos.Factura)) As Modelos.Factura.MMensajeFactura
|
Private Function GenerarNC(SqlTransaccion As SqlClient.SqlTransaction, ObjConta As ClsContPAQi, ListaVentasGenerarNC As List(Of Modelos.Factura)) As Modelos.Factura.MMensajeFactura
|
||||||
Dim ObjFacturaDevolucion = New Modelos.Factura(UsuarioActual)
|
Dim ObjFacturaDevolucion = New Modelos.Factura(UsuarioActual)
|
||||||
ObjFacturaDevolucion.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML
|
ObjFacturaDevolucion.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML
|
||||||
ObjFacturaDevolucion.CveUsuario = UsuarioActual.CveUsuario
|
ObjFacturaDevolucion.CveUsuario = UsuarioActual.CveUsuario
|
||||||
@@ -1844,8 +1850,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
DtVentasNC.AcceptChanges()
|
DtVentasNC.AcceptChanges()
|
||||||
|
|
||||||
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
|
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
|
||||||
'ObjFacturaDevolucion.GenerarPDFFactura = True
|
|
||||||
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=Trasac, ObjContPaqTransac:=ObjConta)
|
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta)
|
||||||
|
|
||||||
ObjFacturaDevolucion.Dispose()
|
ObjFacturaDevolucion.Dispose()
|
||||||
|
|
||||||
@@ -2371,6 +2377,11 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
#Region " COMPLEMENTOS PAGO "
|
#Region " COMPLEMENTOS PAGO "
|
||||||
Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String
|
Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String
|
||||||
|
|
||||||
|
If Not UsuarioActual.Empresa.FacturaProduccion Then
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ChkComplementoPago.Checked Then
|
If Not ChkComplementoPago.Checked Then
|
||||||
Return ""
|
Return ""
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -621,7 +621,8 @@
|
|||||||
<th runat="server" visible="false" id="nomostrar2"></th>
|
<th runat="server" visible="false" id="nomostrar2"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False" DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem" CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;">
|
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveVentaDetalle,Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,EsCargo" CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;">
|
||||||
<Columns>
|
<Columns>
|
||||||
<%--0--%>
|
<%--0--%>
|
||||||
<asp:TemplateField ItemStyle-Font-Size="6pt">
|
<asp:TemplateField ItemStyle-Font-Size="6pt">
|
||||||
@@ -1331,12 +1332,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body formnombottom">
|
<div class="portlet-body formnombottom">
|
||||||
<table border="0" align="center">
|
<table border="0" align="center">
|
||||||
<tr>
|
<tr id="TrEmitir" runat="server">
|
||||||
<td>
|
<td>
|
||||||
<asp:Button ID="BtnEmitirImprimir" runat="server" Text="Emitir e Imprimir" Style="width: 170px; padding-right: 30px;" CssClass="btn btn-primary" ValidationGroup="GrpEmitirImprimir" />
|
<asp:Button ID="BtnEmitirImprimir" runat="server" Text="Emitir e Imprimir" Style="width: 170px; padding-right: 30px;" CssClass="btn btn-primary" ValidationGroup="GrpEmitirImprimir" />
|
||||||
<i class=" fa-print fa " style="margin-left: -30px; margin-top: 10px; color: white;"></i>
|
<i class=" fa-print fa " style="margin-left: -30px; margin-top: 10px; color: white;"></i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<asp:Button ID="BtnEditarRemision" runat="server" Text="Actualizar Remision" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
<asp:Button ID="BtnPermisoEditarRemision" runat="server" Text="Editar Remision" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -2671,9 +2678,9 @@
|
|||||||
<label>Año:</label>
|
<label>Año:</label>
|
||||||
<br />
|
<br />
|
||||||
<asp:TextBox ID="TxtAnioVehiculo" runat="server" Height="100%" Width="100%" CssClass="form-control" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
<asp:TextBox ID="TxtAnioVehiculo" runat="server" Height="100%" Width="100%" CssClass="form-control" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class ="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label>Tipo Servicio:</label>
|
<label>Tipo Servicio:</label>
|
||||||
<br />
|
<br />
|
||||||
@@ -2807,7 +2814,7 @@
|
|||||||
<a href="javascript;" class="collapse" data-original-title="" title=""></a>
|
<a href="javascript;" class="collapse" data-original-title="" title=""></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="display:none;">
|
<div class="row" style="display: none;">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlFacturas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="SerieFolio" DataValueField="CveVenta" OnSelectedIndexChanged="DdlFacturas_SelectedIndexChanged" Width="100%" AutoPostBack="true">
|
<asp:DropDownList ID="DdlFacturas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="SerieFolio" DataValueField="CveVenta" OnSelectedIndexChanged="DdlFacturas_SelectedIndexChanged" Width="100%" AutoPostBack="true">
|
||||||
@@ -2818,7 +2825,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<div >
|
<div>
|
||||||
<label for="<%= DdlDistribuidor.ClientID.ToString()%>">Distribuidor:</label><br />
|
<label for="<%= DdlDistribuidor.ClientID.ToString()%>">Distribuidor:</label><br />
|
||||||
<ADS:Dropdownlost ID="DdlDistribuidor" data-metodo="getcliente" CssStyle="width:100%" CssClassDdl="select2me" runat="server" DataTextField="CodigoNombre" DataValueField="CveCliente" Width="300px"></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="DdlDistribuidor" data-metodo="getcliente" CssStyle="width:100%" CssClassDdl="select2me" runat="server" DataTextField="CodigoNombre" DataValueField="CveCliente" Width="300px"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
@@ -2827,8 +2834,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<ADS:DropDownLost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange" >
|
<ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange"></ADS:Dropdownlost>
|
||||||
</ADS:DropDownLost>
|
|
||||||
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
|
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnPSAjusteClasificacion" ClientIDMode="Static" runat="server" Value="-1" />
|
<asp:HiddenField ID="HdnPSAjusteClasificacion" ClientIDMode="Static" runat="server" Value="-1" />
|
||||||
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
||||||
@@ -2876,7 +2882,7 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div id="DivCodEnsamble" runat="server" class="form-group form-md-line-input input-iconright">
|
<div id="DivCodEnsamble" runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtCodEnsamble" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtCodEnsamble" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||||
<asp:CustomValidator id="CVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" ClientValidationFunction="ValidarCodigoEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
<asp:CustomValidator ID="CVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" ClientValidationFunction="ValidarCodigoEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||||
<label for="<%= TxtCodEnsamble.ClientID.ToString()%>">Cod.Ensamble:</label>
|
<label for="<%= TxtCodEnsamble.ClientID.ToString()%>">Cod.Ensamble:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2895,7 +2901,7 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtCodLinea" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtCodLinea" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||||
<asp:CustomValidator id="CVCodLinea" runat="server" ControlToValidate="TxtCodLinea" ClientValidationFunction="ValidarCodigoLinea" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
<asp:CustomValidator ID="CVCodLinea" runat="server" ControlToValidate="TxtCodLinea" ClientValidationFunction="ValidarCodigoLinea" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||||
<label for="<%= TxtCodLinea.ClientID.ToString()%>">Cod.Linea:</label>
|
<label for="<%= TxtCodLinea.ClientID.ToString()%>">Cod.Linea:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2917,8 +2923,8 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||||
<asp:CustomValidator id="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
<asp:CustomValidator ID="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
|
||||||
<%-- <asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>--%>
|
<%-- <asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>--%>
|
||||||
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||||
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
|
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
|
||||||
<label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label>
|
<label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label>
|
||||||
@@ -2963,7 +2969,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="margin-top:17px;">
|
<div class="row" style="margin-top: 17px;">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||||
@@ -3021,7 +3027,7 @@
|
|||||||
if (CveClasificacion = "20517") {
|
if (CveClasificacion = "20517") {
|
||||||
regex = "[1X]|"
|
regex = "[1X]|"
|
||||||
//regex = "[*]|"
|
//regex = "[*]|"
|
||||||
//SI ES OPTIMA
|
//SI ES OPTIMA
|
||||||
} else if (CveClasificacion = "20511") {
|
} else if (CveClasificacion = "20511") {
|
||||||
regex = "[1X]|"
|
regex = "[1X]|"
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -5272,35 +5272,30 @@
|
|||||||
</div>
|
</div>
|
||||||
<asp:UpdatePanel runat="server" ID="UpClasificacionPyME" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpClasificacionPyME" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div id="DivAddClasificacionPyME" runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
<%-- <%--<asp:HiddenField ID="HdnUnidadMedida" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField1" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField2" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField3" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField4" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField5" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField6" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField7" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField8" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField9" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField10" runat="server" Value="-1" />
|
|
||||||
<asp:HiddenField ID="HiddenField11" runat="server" Value="-1" />--%>
|
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlClasificacionPyME" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="50%">
|
<asp:DropDownList ID="DdlClasificacionPyME" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="50%">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlClasificacionPyME.ClientID.ToString()%>">Clasificacion:</label>
|
<label for="<%= DdlClasificacionPyME.ClientID.ToString()%>">Clasificacion:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row">
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlPSPyME" CssStyle="width: 50%;" CssClass=" form-control input-sm DdlPS" CssClassDdl=" select2me " DataTextField="PSCodigo" DataValueField="CvePS" data-onresult="CargaExistenciaAlmacenes" />
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= DdlPSPyME.ClientID.ToString()%>">Producto/Servicio:</label>
|
||||||
|
<ADS:Dropdownlost runat="server" ID="DdlPSPyME" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" DataTextField="PSCodigo" DataValueField="CvePS" data-onresult="CargaExistenciaAlmacenes" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||||
|
<ADS:Dropdownlost runat="server" ID="DdlPSPyME" CssStyle="width: 50%;" CssClass="form-control input-sm DdlPS" CssClassDdl="select2me " IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" data-onresult="CargaExistenciaAlmacenes" />
|
||||||
<label for="<%= DdlPSPyME.ClientID.ToString()%>">
|
<label for="<%= DdlPSPyME.ClientID.ToString()%>">
|
||||||
Productos / Servicio:
|
Productos / Servicio:
|
||||||
<label>
|
<label>
|
||||||
</div>
|
</div>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<br />
|
<br />
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div id="DivAddUMPyME" runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlUMPyME" AppendDataBoundItems="true" CssClass="form-control input-sm select2me " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Style="width: 50%; max-width: 150px;"></asp:DropDownList>
|
<asp:DropDownList ID="DdlUMPyME" AppendDataBoundItems="true" CssClass="form-control input-sm select2me " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Style="width: 50%; max-width: 150px;"></asp:DropDownList>
|
||||||
<label for="<%= DdlUMPyME.ClientID.ToString()%>">Unidad de Medida:</label>
|
<label for="<%= DdlUMPyME.ClientID.ToString()%>">Unidad de Medida:</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -5308,7 +5303,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<label>Observación:</label>
|
<label>Observación:</label>
|
||||||
<br />
|
<br />
|
||||||
<asp:TextBox ID="TxtObsPyME" runat="server" Height="50" Width="503px" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
<asp:TextBox ID="TxtObsPyME" runat="server" CssClass="form-control input-sm" Height="50" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
<div id="divproyectos" runat="server">
|
<div id="divproyectos" runat="server">
|
||||||
<asp:UpdatePanel ID="UPPProyecto" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPProyecto" runat="server" UpdateMode="Conditional">
|
||||||
@@ -5328,12 +5323,23 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row">
|
||||||
<asp:TextBox ID="TxtPrecioPyME" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" MaxLength="12" ValidationGroup="GrpAddVenta" CssClass="form-control"></asp:TextBox>
|
<div class="col-md-6">
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" TargetControlID="TxtPrecioPyME" FilterType="Custom, Numbers" ValidChars="." />
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPrecioPyME" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
<asp:TextBox ID="TxtPrecioPyME" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" MaxLength="12" ValidationGroup="GrpAddVenta" CssClass="form-control"></asp:TextBox>
|
||||||
<label for="<%= TxtPrecioPyME.ClientID.ToString()%>">Precio:</label>
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" TargetControlID="TxtPrecioPyME" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPrecioPyME" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtPrecioPyME.ClientID.ToString()%>">Precio:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtDescuentoPyME" runat="server" Enabled="false" CausesValidation="true" lang="nb" ClientIDMode="Static" MaxLength="12" CssClass="form-control"></asp:TextBox>
|
||||||
|
<label for="<%= TxtDescuentoPyME.ClientID.ToString()%>">Descuento:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -7016,17 +7022,17 @@
|
|||||||
function SetDisabledTxtTotal(valor) {
|
function SetDisabledTxtTotal(valor) {
|
||||||
DisabledTxtTotal = valor;
|
DisabledTxtTotal = valor;
|
||||||
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
|
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadpage() {
|
function loadpage() {
|
||||||
$('.AjustaT').each(function () {
|
$('.AjustaT').each(function () {
|
||||||
AjustaTotales($(this));
|
AjustaTotales($(this));
|
||||||
})
|
})
|
||||||
$('.AjustaT').change(function () {
|
$('.AjustaT').change(function () {
|
||||||
AjustaTotales($(this));
|
AjustaTotales($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
|
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -7050,9 +7056,9 @@
|
|||||||
$get(Row).style.backgroundColor = "#82b6db";
|
$get(Row).style.backgroundColor = "#82b6db";
|
||||||
$get(Obj).focus();
|
$get(Obj).focus();
|
||||||
var total = parseFloat($('#<%= HplSaldoAuxiliar.ClientID%>').text().replace(',', ''));
|
var total = parseFloat($('#<%= HplSaldoAuxiliar.ClientID%>').text().replace(',', ''));
|
||||||
$get(Obj).value = 0;
|
$get(Obj).value = 0;
|
||||||
var suma = 0;
|
var suma = 0;
|
||||||
$('#<%= GVAnticipos.ClientID%> input[type="text"]').each(function (index) {
|
$('#<%= GVAnticipos.ClientID%> input[type="text"]').each(function (index) {
|
||||||
var currentsaldo = parseFloat($(this).val())
|
var currentsaldo = parseFloat($(this).val())
|
||||||
if (isNaN(currentsaldo)) { currentsaldo = 0 }
|
if (isNaN(currentsaldo)) { currentsaldo = 0 }
|
||||||
suma = currentsaldo + suma;
|
suma = currentsaldo + suma;
|
||||||
@@ -7068,7 +7074,7 @@
|
|||||||
$get(Obj).value = "";
|
$get(Obj).value = "";
|
||||||
$get(Row).style.backgroundColor = "#ffffff";
|
$get(Row).style.backgroundColor = "#ffffff";
|
||||||
}
|
}
|
||||||
//if ($("input:checkbox:not(:checked)"))
|
//if ($("input:checkbox:not(:checked)"))
|
||||||
SetText2($get("LblTotalAnticipos"), formato_numero($get("HdnAnticipos").value, 2, '.', ','));
|
SetText2($get("LblTotalAnticipos"), formato_numero($get("HdnAnticipos").value, 2, '.', ','));
|
||||||
}
|
}
|
||||||
function imprimircotizacion() {
|
function imprimircotizacion() {
|
||||||
@@ -7346,6 +7352,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||||
|
$('.DdlPSPyME').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||||
|
|
||||||
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
|
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var ind = $this.index();
|
var ind = $this.index();
|
||||||
|
|||||||
@@ -2446,7 +2446,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CvePlataforma = 2 Then
|
If UsuarioActual.Empresa.CvePlataforma = 2 OrElse UsuarioActual.CveRol = 1 Then
|
||||||
ImgOtrosConceptos.Visible = False
|
ImgOtrosConceptos.Visible = False
|
||||||
TrFormaEntrega.Visible = False
|
TrFormaEntrega.Visible = False
|
||||||
TabDetalleVentas.Visible = False
|
TabDetalleVentas.Visible = False
|
||||||
@@ -2461,6 +2461,9 @@ Partial Class Ventas
|
|||||||
Next
|
Next
|
||||||
LnkAddVenta.Visible = True
|
LnkAddVenta.Visible = True
|
||||||
divproyectos.Visible = False
|
divproyectos.Visible = False
|
||||||
|
|
||||||
|
DivAddClasificacionPyME.Visible = False
|
||||||
|
DivAddUMPyME.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TabVentaAF.Visible = False
|
TabVentaAF.Visible = False
|
||||||
@@ -5824,9 +5827,9 @@ Partial Class Ventas
|
|||||||
Dim objPS As New ClsProductosServicios
|
Dim objPS As New ClsProductosServicios
|
||||||
If objPS.GetPSSucursalesALL(CvePS, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero) Then
|
If objPS.GetPSSucursalesALL(CvePS, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero) Then
|
||||||
PrecioMinimo = objPS.DtResultados.FiltroPrimeroValor("PrecioMinimo", "").ToDecimal
|
PrecioMinimo = objPS.DtResultados.FiltroPrimeroValor("PrecioMinimo", "").ToDecimal
|
||||||
If PrecioMinimo > 0 Then
|
'If PrecioMinimo > 0 Then
|
||||||
Costo = PrecioMinimo
|
' Costo = PrecioMinimo
|
||||||
End If
|
'End If
|
||||||
End If
|
End If
|
||||||
objPS.Dispose()
|
objPS.Dispose()
|
||||||
|
|
||||||
@@ -5835,7 +5838,7 @@ Partial Class Ventas
|
|||||||
If ValidaExistencia AndAlso DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False AndAlso Not RegistroxOC Then
|
If ValidaExistencia AndAlso DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False AndAlso Not RegistroxOC Then
|
||||||
'VALIDA EXISTENCIA
|
'VALIDA EXISTENCIA
|
||||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
|
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
|
||||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS}") < TxtCantidad.Text.ToDouble Then
|
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -13642,6 +13645,10 @@ Partial Class Ventas
|
|||||||
CargarAlmacenes()
|
CargarAlmacenes()
|
||||||
DdlPS.Attributes.Remove("data-cvesubproyecto")
|
DdlPS.Attributes.Remove("data-cvesubproyecto")
|
||||||
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||||
|
|
||||||
|
DdlPSPyME.Attributes.Remove("data-cvesubproyecto")
|
||||||
|
DdlPSPyME.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaFolios()
|
Private Sub CargaFolios()
|
||||||
@@ -14105,9 +14112,65 @@ Partial Class Ventas
|
|||||||
Dim CveSubProyecto As Integer = IIf(DdlSubProyectoPyME.SelectedValue <> "-1", DdlSubProyectoPyME.SelectedValue, "0").ToString.ToEntero
|
Dim CveSubProyecto As Integer = IIf(DdlSubProyectoPyME.SelectedValue <> "-1", DdlSubProyectoPyME.SelectedValue, "0").ToString.ToEntero
|
||||||
Dim SubProyecto As String = IIf(DdlSubProyectoPyME.SelectedValue <> "-1", DdlSubProyectoPyME.SelectedItem.Text, "").ToString
|
Dim SubProyecto As String = IIf(DdlSubProyectoPyME.SelectedValue <> "-1", DdlSubProyectoPyME.SelectedItem.Text, "").ToString
|
||||||
|
|
||||||
AgregarProductoServicio(TxtCantidadPyME.Text.ToDecimal, DdlUMPyME.SelectedValue.ToEntero, DdlUMPyME.SelectedItem.Text, DdlClasificacionPyME.SelectedValue.ToEntero, DdlClasificacionPyME.SelectedItem.Text,
|
Dim Descuento As Decimal = 0
|
||||||
DdlPSPyME.SelectedValue.ToEntero, DdlPSPyME.SelectedText, TxtObsPyME.Text, TxtPrecioPyME.Text.ToDecimal, 0, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
Dim PU As Decimal = TxtPrecioPyME.Text.ToDecimal()
|
||||||
|
Dim Cantidad As Decimal = TxtCantidadPyME.Text.ToDecimal()
|
||||||
|
|
||||||
|
Dim CvePS As Integer = DdlPSPyME.SelectedValue.ToEntero
|
||||||
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||||
|
Dim ValidaCondicionesComerciales As Boolean = True
|
||||||
|
|
||||||
|
If DrPS IsNot Nothing AndAlso DrPS("CveClasificacion").ToString.ToEntero = 20636 Then
|
||||||
|
ValidaCondicionesComerciales = False
|
||||||
|
End If
|
||||||
|
'VERIFICA SI APLICAN CONDICIONES COMERCIALES
|
||||||
|
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
|
||||||
|
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
|
||||||
|
If Not String.IsNullOrEmpty(DrPS("CveMarca").ToString()) AndAlso DrPS("CveMarca").ToString().ToEntero() > 0 Then
|
||||||
|
Dim RowPorcentaje = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={DrPS("CveMarca").ToString()}")
|
||||||
|
'REALIZA LOS DESCUENTOS DE ACUERDO AL PORCENTAJE POR MARCA
|
||||||
|
If RowPorcentaje IsNot Nothing Then
|
||||||
|
Dim PorcentajeProducto = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
|
||||||
|
Dim PorcentajeProducto2 = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
|
||||||
|
Dim PorcentajeProducto3 = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
|
||||||
|
|
||||||
|
Dim TotalInicial As Decimal = (Cantidad * (PU)) - Descuento
|
||||||
|
Dim TotalFinal = TotalInicial
|
||||||
|
'SI APLICA EL PRIMER DESCUENTO
|
||||||
|
If PorcentajeProducto > 0 Then
|
||||||
|
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
|
||||||
|
Dim Total2 = (TotalInicial - Descuento1)
|
||||||
|
|
||||||
|
'SI APLICA EL SEGUNDO DESCUENTO
|
||||||
|
If PorcentajeProducto2 > 0 Then
|
||||||
|
Dim Descuento2 As Decimal = (Total2 * PorcentajeProducto2).RoundSQL(2)
|
||||||
|
Dim Total3 = (Total2 - Descuento2)
|
||||||
|
|
||||||
|
'SI APLICA EL TERCER DESCUENTO
|
||||||
|
If PorcentajeProducto3 > 0 Then
|
||||||
|
Dim Descuento3 As Decimal = (Total3 * PorcentajeProducto3).RoundSQL(2)
|
||||||
|
TotalFinal = Total3 - Descuento3
|
||||||
|
Else
|
||||||
|
TotalFinal = Total3
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TotalFinal = Total2
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TotalFinal = TotalInicial
|
||||||
|
End If
|
||||||
|
|
||||||
|
Descuento += ((Cantidad * PU) - TotalFinal)
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
AgregarProductoServicio(Cantidad, DdlUMPyME.SelectedValue.ToEntero, DdlUMPyME.SelectedItem.Text, DdlClasificacionPyME.SelectedValue.ToEntero, DdlClasificacionPyME.SelectedItem.Text,
|
||||||
|
CvePS, DdlPSPyME.SelectedText, TxtObsPyME.Text, PU, Descuento, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
|
|
||||||
|
CalculaUsados()
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
|
|
||||||
@@ -14629,7 +14692,7 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("CveConcepto", GetType(Integer))
|
TmpDT.Columns.Add("CveConcepto", GetType(Integer))
|
||||||
|
|
||||||
TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean))
|
TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean))
|
||||||
TmpDT.Columns.Add("EsUsado", GetType(Boolean))
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CreaDTmpC()
|
Private Sub CreaDTmpC()
|
||||||
@@ -19550,9 +19613,10 @@ Partial Class Ventas
|
|||||||
Private Sub LnkAddVenta_Click(sender As Object, e As EventArgs) Handles LnkAddVenta.Click
|
Private Sub LnkAddVenta_Click(sender As Object, e As EventArgs) Handles LnkAddVenta.Click
|
||||||
Modalidad = "A"
|
Modalidad = "A"
|
||||||
LnkAgregarPyME.Text = "Agregar"
|
LnkAgregarPyME.Text = "Agregar"
|
||||||
TxtCantidadPyME.Text = ""
|
TxtCantidadPyME.Text = "1"
|
||||||
TxtObsPyME.Text = ""
|
TxtObsPyME.Text = ""
|
||||||
TxtPrecioPyME.Text = "0.00"
|
TxtPrecioPyME.Text = "0.00"
|
||||||
|
TxtDescuentoPyME.Text = "0.00"
|
||||||
LblTotalPyME.Text = "0.00"
|
LblTotalPyME.Text = "0.00"
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
|
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
|
||||||
DdlPSPyME.SelectedValue = "-1"
|
DdlPSPyME.SelectedValue = "-1"
|
||||||
@@ -19636,18 +19700,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Private Sub CargaPSPyME(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
Private Sub CargaPSPyME(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
||||||
|
|
||||||
DdlPSPyME.setEsWebService(If(UsuarioActual.Empresa.Funcionalidad(141).ToString = "1", True, False))
|
DdlPSPyME.setEsWebService(True)
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
|
DdlPSPyME.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||||
Objeto.ddl.Items.Clear()
|
DdlPSPyME.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
||||||
'Objeto.ddl.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, AplicaParaVenta:=1, Estatus:=1)
|
DdlPSPyME.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||||
Objeto.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, AplicaParaVenta:=1, Estatus:=1)
|
DdlPSPyME.ddlWS.Attributes.Add("data-Estatus", "1")
|
||||||
Objeto.ddl.DataBind()
|
|
||||||
Objeto.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
|
||||||
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
|
||||||
Else
|
|
||||||
DdlPSPyME.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -19678,6 +19736,62 @@ Partial Class Ventas
|
|||||||
'LblUnidadMedida.Text = PS.Rows(0)("UnidadMedida").ToString
|
'LblUnidadMedida.Text = PS.Rows(0)("UnidadMedida").ToString
|
||||||
TxtPrecioPyME.Text = drPS("Precio").ToString.FormatoNumero(2).Replace(","c, "")
|
TxtPrecioPyME.Text = drPS("Precio").ToString.FormatoNumero(2).Replace(","c, "")
|
||||||
|
|
||||||
|
Dim Cantidad As Decimal = TxtCantidadPyME.Text.ToDecimal()
|
||||||
|
Dim PU As Decimal = TxtPrecioPyME.Text.ToDecimal()
|
||||||
|
Dim Descuento As Decimal = 0
|
||||||
|
Dim ValidaCondicionesComerciales As Boolean = True
|
||||||
|
|
||||||
|
If drPS IsNot Nothing AndAlso drPS("CveClasificacion").ToString.ToEntero = 20636 Then
|
||||||
|
ValidaCondicionesComerciales = False
|
||||||
|
End If
|
||||||
|
'VERIFICA SI APLICAN CONDICIONES COMERCIALES
|
||||||
|
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
|
||||||
|
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
|
||||||
|
If Not String.IsNullOrEmpty(drPS("CveMarca").ToString()) AndAlso drPS("CveMarca").ToString().ToEntero() > 0 Then
|
||||||
|
Dim RowPorcentaje = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={drPS("CveMarca").ToString()}")
|
||||||
|
'REALIZA LOS DESCUENTOS DE ACUERDO AL PORCENTAJE POR MARCA
|
||||||
|
If RowPorcentaje IsNot Nothing Then
|
||||||
|
Dim PorcentajeProducto = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
|
||||||
|
Dim PorcentajeProducto2 = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
|
||||||
|
Dim PorcentajeProducto3 = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
|
||||||
|
|
||||||
|
Dim TotalInicial As Decimal = (Cantidad * (PU)) - Descuento
|
||||||
|
Dim TotalFinal = TotalInicial
|
||||||
|
'SI APLICA EL PRIMER DESCUENTO
|
||||||
|
If PorcentajeProducto > 0 Then
|
||||||
|
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
|
||||||
|
Dim Total2 = (TotalInicial - Descuento1)
|
||||||
|
|
||||||
|
'SI APLICA EL SEGUNDO DESCUENTO
|
||||||
|
If PorcentajeProducto2 > 0 Then
|
||||||
|
Dim Descuento2 As Decimal = (Total2 * PorcentajeProducto2).RoundSQL(2)
|
||||||
|
Dim Total3 = (Total2 - Descuento2)
|
||||||
|
|
||||||
|
'SI APLICA EL TERCER DESCUENTO
|
||||||
|
If PorcentajeProducto3 > 0 Then
|
||||||
|
Dim Descuento3 As Decimal = (Total3 * PorcentajeProducto3).RoundSQL(2)
|
||||||
|
TotalFinal = Total3 - Descuento3
|
||||||
|
Else
|
||||||
|
TotalFinal = Total3
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TotalFinal = Total2
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TotalFinal = TotalInicial
|
||||||
|
End If
|
||||||
|
|
||||||
|
Descuento += ((Cantidad * PU) - TotalFinal)
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
TxtDescuentoPyME.Text = Descuento.FormatoNumero(2).Replace(","c, "")
|
||||||
|
|
||||||
|
LblTotalPyME.Text = ((Cantidad * PU) - Descuento).FormatoNumero(2).Replace(","c, "")
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 80 Then
|
If UsuarioActual.CveEmpresa = 80 Then
|
||||||
'busca el precio de la sucursal
|
'busca el precio de la sucursal
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
@@ -21770,7 +21884,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253)
|
Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253)
|
||||||
|
|
||||||
Dim DtUsados As DataTable = TmpDT.FiltraParametros("EsUsado = True")
|
Dim DtUsados As DataTable = TmpDT.FiltraParametros("EsCargo = True")
|
||||||
|
|
||||||
TmpDT.Clear()
|
TmpDT.Clear()
|
||||||
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
|
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
|
||||||
@@ -23944,6 +24058,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Private Sub CalculaUsados(Optional DtUsadosDevolucion As DataTable = Nothing)
|
Private Sub CalculaUsados(Optional DtUsadosDevolucion As DataTable = Nothing)
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then
|
||||||
|
If ViewState("CargoUsado").ToString = "False" Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
||||||
|
|
||||||
Dim DTCvePSCostos As DataTable
|
Dim DTCvePSCostos As DataTable
|
||||||
@@ -23953,7 +24071,17 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("Eliminar", GetType(Integer))
|
TmpDT.Columns.Add("Eliminar", GetType(Integer))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each drow As DataRow In TmpDT.Rows
|
|
||||||
|
Dim TmpDTCalculo As DataRow() = Nothing
|
||||||
|
'SI ES VENTA NUEVA O SI VA SER DEVOLUCION CONSIDERAR TODOS
|
||||||
|
If Me.CveVenta <= 0 OrElse DtUsadosDevolucion IsNot Nothing Then
|
||||||
|
TmpDTCalculo = TmpDT.Rows.Cast(Of DataRow).ToArray()
|
||||||
|
'SI ES EDICION DE REMISION SOLO CONSIDERAR LOS PRODUCTOS NUEVOS
|
||||||
|
ElseIf Me.CveVenta > 0 AndAlso DtUsadosDevolucion Is Nothing AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||||
|
TmpDTCalculo = TmpDT.Select("CveVentaDetalle IS NULL OR CveVentaDetalle <=0")
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each drow As DataRow In TmpDTCalculo
|
||||||
If DTCvePSCostos IsNot Nothing Then
|
If DTCvePSCostos IsNot Nothing Then
|
||||||
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
||||||
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
||||||
@@ -23962,7 +24090,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim TmpDTView As New DataView(TmpDT)
|
Dim TmpDTView As New DataView(TmpDT)
|
||||||
@@ -23972,11 +24099,19 @@ Partial Class Ventas
|
|||||||
dRowEliminar.Delete()
|
dRowEliminar.Delete()
|
||||||
Next
|
Next
|
||||||
|
|
||||||
TmpDT.AcceptChanges()
|
'SI ES VENTA NUEVA O SI VA SER DEVOLUCION CONSIDERAR TODOS
|
||||||
If ViewState("CargoUsado").ToString = "False" Then
|
If Me.CveVenta <= 0 OrElse DtUsadosDevolucion IsNot Nothing Then
|
||||||
Exit Sub
|
TmpDTCalculo = TmpDT.Rows.Cast(Of DataRow).ToArray()
|
||||||
|
'SI ES EDICION DE REMISION SOLO CONSIDERAR LOS PRODUCTOS NUEVOS
|
||||||
|
ElseIf Me.CveVenta > 0 AndAlso DtUsadosDevolucion Is Nothing AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||||
|
TmpDTCalculo = TmpDT.Select("CveVentaDetalle IS NULL OR CveVentaDetalle <=0")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TmpDT.AcceptChanges()
|
||||||
|
|
||||||
|
|
||||||
Dim CveUnidadMedidaPSA As Integer = -1
|
Dim CveUnidadMedidaPSA As Integer = -1
|
||||||
Dim UnidadMedidaPSA As String = "Unidad"
|
Dim UnidadMedidaPSA As String = "Unidad"
|
||||||
Dim CveClasificacionPSA As Integer = -1
|
Dim CveClasificacionPSA As Integer = -1
|
||||||
@@ -24001,7 +24136,7 @@ Partial Class Ventas
|
|||||||
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||||
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
||||||
|
|
||||||
For Each DrowPartidas As DataRow In TmpDT.Rows
|
For Each DrowPartidas As DataRow In TmpDTCalculo
|
||||||
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString.ToEntero
|
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString.ToEntero
|
||||||
|
|
||||||
If CveTamanioTemp > 0 Then
|
If CveTamanioTemp > 0 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user