Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -710,10 +710,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr id="DivReclasifica" class="collapse">
|
<tr id="DivReclasifica" class="collapse">
|
||||||
<th colspan="3"></th>
|
<th colspan="3"></th>
|
||||||
<th>
|
<th>
|
||||||
<asp:DropDownList ID="DdlAplicaClasificacion" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlAplicaClasificacion_SelectedIndexChanged" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
<ADS:Dropdownlost runat="server" ID="DdlAplicaPSMasivo" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" data-metodo="getps" DataValueField="CvePS" Onselectedindexchange="DdlAplicaPSMasivo_selectedindexchange" />
|
||||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>
|
<th>
|
||||||
@@ -3823,9 +3821,8 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group form-md-line-input input-iconright" id="div1" runat="server">
|
<div class="form-group form-md-line-input input-iconright" id="div1" runat="server">
|
||||||
<%--<asp:DropDownList ID="DdlAplicaClasificacion" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
<%--<asp:DropDownList ID="DdlAplicaClasificacion" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||||
<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>--%>
|
v
|
||||||
<label for="<%= DdlAplicaClasificacion.ClientID.ToString()%>">Clasificacion:</label>
|
|
||||||
</div>
|
</div>
|
||||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlAplicaPS" runat="server" CssClass=" form-control input-sm select2me" Width="50%" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="PSCodigo" DataValueField="CvePS">
|
<asp:DropDownList ID="DdlAplicaPS" runat="server" CssClass=" form-control input-sm select2me" Width="50%" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="PSCodigo" DataValueField="CvePS">
|
||||||
|
|||||||
@@ -1316,15 +1316,6 @@ Partial Class Compras_Compras
|
|||||||
'lblProveedor.Visible = False
|
'lblProveedor.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If isAlmacenistaGluyas() Then
|
|
||||||
GvInv.Columns(10).Visible = True
|
|
||||||
'Dim productos As New ClsProductosServicios
|
|
||||||
'If productos.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
' PSDTRemplazo = productos.DtResultados.FiltraParametros("PendienteEnOC=1", "PS")
|
|
||||||
'End If
|
|
||||||
'productos.Dispose()
|
|
||||||
End If
|
|
||||||
|
|
||||||
PermisoEdicionManual = False
|
PermisoEdicionManual = False
|
||||||
CveMovimientoAlmacen = 0
|
CveMovimientoAlmacen = 0
|
||||||
SetValues()
|
SetValues()
|
||||||
@@ -1790,11 +1781,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function isAlmacenistaGluyas() As Boolean
|
|
||||||
'Return (UsuarioActual.CveRol = 1052 And UsuarioActual.CveEmpresa = 66)
|
|
||||||
Return False
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function CargaFactura(CveFactura As Integer) As String
|
Private Function CargaFactura(CveFactura As Integer) As String
|
||||||
Dim ObjeFacturas As New ClsCompras
|
Dim ObjeFacturas As New ClsCompras
|
||||||
Dim RFC As String = ""
|
Dim RFC As String = ""
|
||||||
@@ -3807,17 +3793,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
DdlPSAlias2.setEsWebService(True)
|
DdlPSAlias2.setEsWebService(True)
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 66 Then
|
|
||||||
DdlPSAlias2.ddlWS.Attributes.Add("data-subfamilia", "-1")
|
|
||||||
DdlPSAlias2.ddlWS.Attributes.Add("data-fueporxml", "0")
|
|
||||||
'SOLO CUANDO SEA FACTURA DE INGRESOS
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Fac" Then
|
|
||||||
DdlPSAlias2.ddlWS.Attributes.Add("data-pagina", "Compras")
|
|
||||||
Else
|
|
||||||
DdlPSAlias2.ddlWS.Attributes.Add("data-pagina", "Compras2")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not DdlPSAlias2.UsaWebService AndAlso CType(DdlPSAlias2.DataSource, DataTable) Is Nothing Then
|
If Not DdlPSAlias2.UsaWebService AndAlso CType(DdlPSAlias2.DataSource, DataTable) Is Nothing Then
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
|
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
|
||||||
@@ -4164,22 +4139,12 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
AddPS2(False)
|
AddPS2(False)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then CompruebaAgregar()
|
||||||
CompruebaAgregar()
|
|
||||||
End If
|
|
||||||
|
|
||||||
If isAlmacenistaGluyas() Then
|
|
||||||
BtnGuardar.Visible = False
|
|
||||||
AlmacenCambiaPS.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
SubTotalConceptos = Math.Round(SubTotalTemp, 2)
|
SubTotalConceptos = Math.Round(SubTotalTemp, 2)
|
||||||
'TmpDT = DtPSTemp.Copy
|
|
||||||
'DtPSTemp.Dispose()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaClasificacionesComprobaciones()
|
Private Sub CargaClasificacionesComprobaciones()
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
|
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
|
||||||
@@ -4319,7 +4284,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'------------------ INICIA VALIDACIONES ------------------
|
'------------------ INICIA VALIDACIONES ------------------
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
If UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso UsuarioActual.CveUsuario <> 1803 Then
|
||||||
Dim AnioFactura As Integer = TxtFecha.Text.ToDate.Year
|
Dim AnioFactura As Integer = TxtFecha.Text.ToDate.Year
|
||||||
Dim Fecha28Dic As Date = New Date(2024, 12, 28)
|
Dim Fecha28Dic As Date = New Date(2024, 12, 28)
|
||||||
If NowADS() >= Fecha28Dic AndAlso TxtFecha.Text.ToDate.Year < 2025 Then
|
If NowADS() >= Fecha28Dic AndAlso TxtFecha.Text.ToDate.Year < 2025 Then
|
||||||
@@ -8825,8 +8790,6 @@ Partial Class Compras_Compras
|
|||||||
Alert("Tiene que seleccionar algun Producto o Servicio", TipoMensaje.MsgAdvertencia)
|
Alert("Tiene que seleccionar algun Producto o Servicio", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlAplicaClasificacion.SelectedValue = "-1"
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivClasificacion"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "DivClasificacion"))
|
||||||
Else
|
Else
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivClasificacion"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "DivClasificacion"))
|
||||||
@@ -11055,14 +11018,8 @@ Partial Class Compras_Compras
|
|||||||
TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();")
|
TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||||
TxtDescuentoModal.Attributes.Add("onKeyUp ", "Recalcula();")
|
TxtDescuentoModal.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||||
|
|
||||||
'ImgAmort.Attributes.Add("onclick", "javascript:$('#DivDescP').show(1000); PosicionaObjeto(this.id,'DivDescP');") ' $get('LblTitulo1').style.display = 'none'; $get('LblTituloTipo1').style.display = 'none'; $get('LblTituloTipo2').style.display = ''; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = ''; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = 'none';")
|
DdlAplicaPSMasivo.setEsWebService(True)
|
||||||
|
|
||||||
'If um.GetUnidadesMedida() Then
|
|
||||||
' GlobalDTUnidadesMedida = um.DtResultados
|
|
||||||
'End If
|
|
||||||
'um.Dispose()
|
|
||||||
|
|
||||||
'CargaEstatus()
|
|
||||||
CargaTiposAF()
|
CargaTiposAF()
|
||||||
CargaProyectoAsignado()
|
CargaProyectoAsignado()
|
||||||
CargaClasificacionesComprobaciones()
|
CargaClasificacionesComprobaciones()
|
||||||
@@ -11071,12 +11028,6 @@ Partial Class Compras_Compras
|
|||||||
CreaDTCompras()
|
CreaDTCompras()
|
||||||
CargaMonedas()
|
CargaMonedas()
|
||||||
CargarAlmacen()
|
CargarAlmacen()
|
||||||
'CreaDtAF()
|
|
||||||
'TabOC.Visible = False
|
|
||||||
|
|
||||||
'BORRAR OC
|
|
||||||
'Valores para Vinculacion OC
|
|
||||||
'If UsuarioActual.Empresa.MetodoOC = 1 Then GvOC2.Columns(2).Visible = False : tdSurtirOC.Visible = False Else GvOC2.Columns(0).Visible = False : tdFolioOC.Visible = False
|
|
||||||
|
|
||||||
CveAlmacenConsignacion = -1
|
CveAlmacenConsignacion = -1
|
||||||
CveConsignacion = -1
|
CveConsignacion = -1
|
||||||
@@ -17676,9 +17627,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
divIVA.Visible = True
|
divIVA.Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If GvInvMov.Rows.Count > 0 AndAlso GvRow.DataKey("CveTipoPS").ToEntero = 2 Then
|
If GvInvMov.Rows.Count > 0 AndAlso GvRow.DataKey("CveTipoPS").ToEntero = 2 Then
|
||||||
TxtCantidad.Enabled = False
|
TxtCantidad.Enabled = False
|
||||||
DdlClasificacion.Enabled = False
|
DdlClasificacion.Enabled = False
|
||||||
@@ -17712,6 +17660,19 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero)
|
CargaPS(DdlClasificacion.SelectedValue.ToEntero)
|
||||||
|
|
||||||
|
'si solo tiene un solo producto la clasificación que lo asigne
|
||||||
|
Dim dtps As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, DdlClasificacion.SelectedValue.ToEntero)
|
||||||
|
If dtps.Rows.Count = 1 Then
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||||
|
DdlPS.SelectedValue = dtps.Rows(0)("CvePS").ToString
|
||||||
|
DdlPS.SelectedText = dtps.Rows(0)("PSCodigo").ToString
|
||||||
|
DdlPSChange()
|
||||||
|
Else
|
||||||
|
DdlPS.SelectedValue = dtps.Rows(0)("CvePS").ToString
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
UPPClasificacion.Update()
|
UPPClasificacion.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaPS(CveClasificacion As Integer)
|
Private Sub CargaPS(CveClasificacion As Integer)
|
||||||
@@ -18351,8 +18312,6 @@ Partial Class Compras_Compras
|
|||||||
Row("IEPSPSPorcentaje") = 0
|
Row("IEPSPSPorcentaje") = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
TmpDT.Rows.IndexOf(Row)
|
TmpDT.Rows.IndexOf(Row)
|
||||||
|
|
||||||
@@ -18540,82 +18499,14 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||||
DdlAplicaClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||||
DdlAplicaClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
|
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
|
||||||
DdlClasificacion.DataSource = DTClasificacionesComprobaciones.FiltraParametros("", Orderby:="Clasificacion")
|
DdlClasificacion.DataSource = DTClasificacionesComprobaciones.FiltraParametros("", Orderby:="Clasificacion")
|
||||||
DdlAplicaClasificacion.DataSource = DTClasificacionesComprobaciones.FiltraParametros("", Orderby:="Clasificacion")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
DdlAplicaClasificacion.DataBind()
|
|
||||||
End Sub
|
|
||||||
Private Sub BtnAplicarClasificacion_Click(sender As Object, e As EventArgs) Handles BtnAplicarClasificacion.Click
|
|
||||||
ReclasificaClasificacion()
|
|
||||||
End Sub
|
|
||||||
Protected Sub DdlAplicaClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
||||||
ReclasificaClasificacion()
|
|
||||||
End Sub
|
|
||||||
Private Sub ReclasificaClasificacion()
|
|
||||||
|
|
||||||
|
|
||||||
If Not DdlAplicaClasificacion.SelectedValue.ToEntero > 0 Then
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ErrorPS As Boolean = False
|
|
||||||
|
|
||||||
'Actualiza Clasificacion directamente a la DB cuando ya se tiene alguna clasificacion
|
|
||||||
'Solo cuando el PS ya esta registrado
|
|
||||||
If UsuarioActual.TienePermisoProceso(104) Then
|
|
||||||
Dim ObjPS As New ClsProductosServicios
|
|
||||||
For Each gvr As GridViewRow In GvPS.Rows
|
|
||||||
If gvr.FCCheckBox("CheckClasificacion").Checked AndAlso gvr.DataKey("CvePS").ToString.ToEntero > 0 Then
|
|
||||||
If Not ObjPS.UpdateClasificacionPS(DdlAplicaClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, gvr.DataKey("CvePS").ToString.ToEntero) Then
|
|
||||||
ErrorPS = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
ObjPS.Dispose()
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ErrorPS Then
|
|
||||||
Dim index As Integer = 0
|
|
||||||
For Each Dr As DataRow In TmpDT.Rows
|
|
||||||
If Dr("CvePS").ToString.ToEntero = 0 OrElse Dr("CveClasificacion").ToString.ToEntero <= 0 Then
|
|
||||||
'Dr("CveClasificacion") = DdlClasificacion.SelectedValue.ToEntero
|
|
||||||
Dr("Clasificacion") = DdlAplicaClasificacion.SelectedItem.Text
|
|
||||||
Dr("CveClasificacionActualizar") = DdlAplicaClasificacion.SelectedValue.ToEntero
|
|
||||||
ElseIf UsuarioActual.TienePermisoProceso(104) AndAlso GvPS.Rows(index).FCCheckBox("CheckClasificacion").Checked Then
|
|
||||||
Dr("Clasificacion") = DdlAplicaClasificacion.SelectedItem.Text
|
|
||||||
Dr("CveClasificacionActualizar") = DdlAplicaClasificacion.SelectedValue.ToEntero
|
|
||||||
End If
|
|
||||||
index += 1
|
|
||||||
Next
|
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT
|
|
||||||
GvPS.DataBind()
|
|
||||||
UpPS.Update()
|
|
||||||
Alert("La Clasificacion ha sido aplicada correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
|
|
||||||
'Para validar AC
|
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
|
||||||
CompruebaAgregar()
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Alert("Ocurrio un error al actualizar la Clasificación de los Productos/Servicios")
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlAsignarProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlAsignarProyecto.SelectedIndexChanged
|
Protected Sub DdlAsignarProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlAsignarProyecto.SelectedIndexChanged
|
||||||
@@ -18689,11 +18580,8 @@ Partial Class Compras_Compras
|
|||||||
If DtpsTemp IsNot Nothing AndAlso DtpsTemp.Rows.Count > 0 Then
|
If DtpsTemp IsNot Nothing AndAlso DtpsTemp.Rows.Count > 0 Then
|
||||||
Dr("CveContratoDetalle") = DtpsTemp.FiltroPrimeroValor("CveContratoDetalle", String.Format("CvePS = {0}", Dr("CvePS"))).ToEntero
|
Dr("CveContratoDetalle") = DtpsTemp.FiltroPrimeroValor("CveContratoDetalle", String.Format("CvePS = {0}", Dr("CvePS"))).ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT.FiltraParametros("", "Consec")
|
GvPS.DataSource = TmpDT.FiltraParametros("", "Consec")
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
@@ -18707,8 +18595,6 @@ Partial Class Compras_Compras
|
|||||||
Alert("SubProyectos cambiados correctamente", TipoMensaje.ToastInformacion)
|
Alert("SubProyectos cambiados correctamente", TipoMensaje.ToastInformacion)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Protected Sub DdlTipoGastoAsignar_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoGastoAsignar_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
If Not GvPS.Rows.Count > 0 Then
|
If Not GvPS.Rows.Count > 0 Then
|
||||||
Alert("No hay partidas para reclasificar el tipo de gasto", TipoMensaje.MsgAdvertencia)
|
Alert("No hay partidas para reclasificar el tipo de gasto", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -22374,8 +22260,46 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlAplicaPSMasivo_selectedindexchange(sender As Object, e As EventArgs)
|
||||||
|
ReclasificaProductosMasivos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub ReclasificaProductosMasivos()
|
||||||
|
|
||||||
|
|
||||||
|
If Not DdlAplicaPSMasivo.SelectedValue.ToEntero > 0 Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
'cveps,cveclasif, ps,clasif, cveum. unidadmedida,aplica
|
||||||
|
Dim drPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlAplicaPSMasivo.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
|
|
||||||
|
For Each Dr As DataRow In TmpDT.Rows
|
||||||
|
If drPS IsNot Nothing Then
|
||||||
|
Dr("PSCodigo") = drPS("PSCodigo").ToString
|
||||||
|
Dr("CveMetodoInventario") = drPS("Inv_CveMetodoInventario").ToString.ToEntero
|
||||||
|
Dr("CveUM") = drPS("CveUnidadMedida")
|
||||||
|
Dr("UM") = drPS("UnidadMedida")
|
||||||
|
Dr("CveClasificacion") = drPS("CveClasificacion")
|
||||||
|
Dr("Clasificacion") = drPS("Clasificacion")
|
||||||
|
Dr("CvePS") = drPS("CvePS")
|
||||||
|
Dr("PS") = drPS("PSCodigo")
|
||||||
|
Dr("CodigoPS") = drPS("PSCodigo")
|
||||||
|
Dr("CveTipoPS") = drPS("CveTipoPS")
|
||||||
|
Dr("PSDescripcion") = drPS("PSCodigo")
|
||||||
|
'Dr("AplicaSerie") = drPS("AplicaSerie")
|
||||||
|
'Dr("AplicaLote") = drPS("AplicaLote")
|
||||||
|
'Dr("AplicaCaducidad") = drPS("AplicaCaducidad")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
GvPS.DataSource = TmpDT
|
||||||
|
GvPS.DataBind()
|
||||||
|
UpPS.Update()
|
||||||
|
Alert("La reclasificación de productos ha sido aplicada correctamente.", TipoMensaje.ToastInformacion)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -1122,7 +1122,7 @@ Partial Class Compras_eFacturas
|
|||||||
e.Row.FCCheckBox("chkRegistraFactura").Visible = False
|
e.Row.FCCheckBox("chkRegistraFactura").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
If UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso UsuarioActual.CveUsuario <> 1803 Then
|
||||||
Dim Fecha28Dic As Date = New Date(2024, 12, 28)
|
Dim Fecha28Dic As Date = New Date(2024, 12, 28)
|
||||||
If NowADS() >= Fecha28Dic AndAlso e.Row.DBCampo("FechaFactura").ToDate.Year < 2025 Then
|
If NowADS() >= Fecha28Dic AndAlso e.Row.DBCampo("FechaFactura").ToDate.Year < 2025 Then
|
||||||
e.Row.FCHyperLink("HplAgregar").Visible = False
|
e.Row.FCHyperLink("HplAgregar").Visible = False
|
||||||
|
|||||||
@@ -1641,7 +1641,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Try
|
Try
|
||||||
DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("CveTipoPS = 1")
|
||||||
Dim CvePS As Integer = drr("CvePS").ToString().ToEntero()
|
Dim CvePS As Integer = drr("CvePS").ToString().ToEntero()
|
||||||
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero()
|
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero()
|
||||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
|||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion, UsuarioActual.CveUsuario) Then
|
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion, UsuarioActual.CveUsuario) Then
|
||||||
Alert("El límite de crédito fue rechazado.")
|
Alert("la solicitud de crédito fue rechazado.")
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
|||||||
@@ -219,8 +219,6 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
CargaGvBitacora()
|
CargaGvBitacora()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -279,6 +277,8 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
If PermisoAutorizPromocionPorcentaje Then
|
If PermisoAutorizPromocionPorcentaje Then
|
||||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
DdlTipoPromocion.Items.Add(New ListItem("Último Costo", "4"))
|
||||||
|
'DdlPS.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||||
@@ -547,14 +547,14 @@ Partial Class Ventas_Promociones
|
|||||||
Dim CveTipoPromocion As Integer = DdlTipoPromocion.SelectedValue.ToEntero
|
Dim CveTipoPromocion As Integer = DdlTipoPromocion.SelectedValue.ToEntero
|
||||||
|
|
||||||
If DdlClasificacion.SelectedValue.ToEntero <= 0 Then
|
If DdlClasificacion.SelectedValue.ToEntero <= 0 Then
|
||||||
If DdlPS.SelectedValue.ToEntero <= 0 Then
|
If DdlPS.SelectedValue.ToEntero <= 0 AndAlso CveTipoPromocion <> 4 Then
|
||||||
Alert("Debe seleccionar una clasificacion o un producto y/o servicio", TipoMensaje.MsgAdvertencia)
|
Alert("Debe seleccionar una clasificacion o un producto y/o servicio", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlPS.SelectedValue.ToEntero <= 0 Then
|
If DdlPS.SelectedValue.ToEntero <= 0 Then
|
||||||
If DdlClasificacion.SelectedValue.ToEntero <= 0 Then
|
If DdlClasificacion.SelectedValue.ToEntero <= 0 AndAlso CveTipoPromocion <> 4 Then
|
||||||
Alert("Debe seleccionar una clasificacion o un producto y/o servicio", TipoMensaje.MsgAdvertencia)
|
Alert("Debe seleccionar una clasificacion o un producto y/o servicio", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -10311,6 +10311,8 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If dr("CvePromocionDetalle").ToString.ToEntero > 0 Then EsValido = True
|
||||||
|
|
||||||
'NO DEJA REGISTRAR CON VALIDACION DE COSTO ALMACEN O PROMOCION
|
'NO DEJA REGISTRAR CON VALIDACION DE COSTO ALMACEN O PROMOCION
|
||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
If Not EsValido Then
|
If Not EsValido Then
|
||||||
@@ -18558,12 +18560,6 @@ Partial Class Ventas
|
|||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'RMF código temporal. GDiaz. cliente DICA 7%
|
|
||||||
If CveCliente = 1555244 Then
|
|
||||||
PrecioSugerido = Costo * 1.07D
|
|
||||||
TxtPrecio.Text = PrecioSugerido.ToString("#,##0.####")
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Costo > 0 Then
|
If Costo > 0 Then
|
||||||
If TxtPrecio.Text.ToDecimal() > 0 Then
|
If TxtPrecio.Text.ToDecimal() > 0 Then
|
||||||
Dim PorUtilidad = String.Format("{0:N2} %", ((TxtPrecio.Text.ToDecimal() - Costo) / Costo) * 100D)
|
Dim PorUtilidad = String.Format("{0:N2} %", ((TxtPrecio.Text.ToDecimal() - Costo) / Costo) * 100D)
|
||||||
@@ -18734,31 +18730,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 189 AndAlso CveCliente = 1555244 Then
|
|
||||||
Dim Costo As Decimal
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(602) = "UC" Then 'validación sobre el último costo
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
|
||||||
If ObjInventarios.GetUltimoCosto(UsuarioActual.CveEmpresa, CvePSParametro) Then
|
|
||||||
Dim dr As DataRow = ObjInventarios.DtResultados.FiltroPrimero("")
|
|
||||||
If dr IsNot Nothing Then
|
|
||||||
Costo = dr("UltimoCosto").ToString.ToDecimal
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjInventarios.Dispose()
|
|
||||||
Else
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
|
||||||
Costo = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
|
||||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
|
||||||
If Costo <= 0 Then Costo = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
|
||||||
ObjInventarios.Dispose()
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CveCliente = 1555244 Then
|
|
||||||
PrecioSugerido = Costo * 1.07D
|
|
||||||
'TxtPrecio.Text = PrecioSugerido.ToString("#,##0.####")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Retorno.PrecioSugerido = PrecioSugerido
|
Retorno.PrecioSugerido = PrecioSugerido
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
@@ -19762,14 +19733,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim VerificarCostos As Boolean = True
|
Dim VerificarCostos As Boolean = True
|
||||||
If CveCliente = 1555244 Then ' GDIAZ - DICA
|
|
||||||
VerificarCostos = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(253) Then VerificarCostos = False
|
If UsuarioActual.TienePermisoProceso(253) Then VerificarCostos = False
|
||||||
|
|
||||||
@@ -20021,6 +19988,12 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
CvePromocionDetalle = -1
|
CvePromocionDetalle = -1
|
||||||
End If
|
End If
|
||||||
|
ElseIf TipoPromo = 4 Then 'Promocion por precio base + X%
|
||||||
|
'siempre es sobre PU y toma el último costo
|
||||||
|
Dim Costo As Decimal = DrPS("UltimoCosto").ToString.ToDecimal
|
||||||
|
Descuento = 0
|
||||||
|
SeAjustoPU = True
|
||||||
|
PUModificado = (Costo + (Costo * PromocionPorcentaje / 100D)).RoundSQL(4)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'VERIFICA SI APLICAN CONDICIONES COMERCIALES
|
'VERIFICA SI APLICAN CONDICIONES COMERCIALES
|
||||||
@@ -33842,10 +33815,10 @@ Partial Class Ventas
|
|||||||
' Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
|
' Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
|
||||||
' CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True)
|
' CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True)
|
||||||
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
|
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
|
||||||
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
|
Dr("CvePS").ToString.ToEntero(), Dr("PS").ToString, Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
|
||||||
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
|
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString, Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
|
||||||
CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True,
|
CveContratoDetalle:=Dr("CveContratoDetalle").ToString.ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True,
|
||||||
PorcentajeIVAFijo:=Dr("PorcentajeIVA").ToString.ToDecimal)
|
PorcentajeIVAFijo:=Dr("PorcentajeIVA").ToString.ToDecimal, CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero())
|
||||||
Next
|
Next
|
||||||
'Dim TotalFactura = TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal()
|
'Dim TotalFactura = TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal()
|
||||||
|
|
||||||
@@ -34171,7 +34144,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
AgregarProductoServicio(1, PS("CveUM").ToString().ToEntero(), PS("UnidadMedida").ToString(), PS("CveClasificacion").ToString().ToEntero(),
|
AgregarProductoServicio(1, PS("CveUM").ToString().ToEntero(), PS("UnidadMedida").ToString(), PS("CveClasificacion").ToString().ToEntero(),
|
||||||
PS("Clasificacion").ToString(), PS("CvePS").ToString().ToEntero(), PS("PS").ToString(), "", PU, 0,
|
PS("Clasificacion").ToString(), PS("CvePS").ToString().ToEntero(), PS("PS").ToString(), "", PU, 0,
|
||||||
rowSP("CveProyecto").ToString().ToEntero(), rowSP("Proyecto").ToString(), rowSP("CveSubProyecto").ToString().ToEntero(), rowSP("SubProyecto").ToString(), RegeneraIEPS:=True)
|
rowSP("CveProyecto").ToString().ToEntero(), rowSP("Proyecto").ToString(), rowSP("CveSubProyecto").ToString().ToEntero(), rowSP("SubProyecto").ToString(),
|
||||||
|
RegeneraIEPS:=True)
|
||||||
|
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
Case "2" 'T O T A L X R E M I S I O N
|
Case "2" 'T O T A L X R E M I S I O N
|
||||||
@@ -34449,7 +34423,7 @@ Partial Class Ventas
|
|||||||
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
|
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
|
||||||
CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||||
CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(),
|
CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(),
|
||||||
CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(), RegeneraIEPS:=True)
|
CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(), CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero(), RegeneraIEPS:=True)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If DdlFiltroContrato.SelectedValue.ToEntero() > 0 Then
|
If DdlFiltroContrato.SelectedValue.ToEntero() > 0 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user