diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs
index a0050887d..ad05f2e5d 100644
--- a/CRM/Acercamiento.aspx.cs
+++ b/CRM/Acercamiento.aspx.cs
@@ -1027,6 +1027,19 @@ public partial class CRM_Acercamiento : ClsPaginas
Archivo = null;
}
+ protected void EliminarFile(object sender, EventArgs e)
+ {
+ string cveEvento = string.Format("{0}",((LinkButton)sender).CommandArgument);
+ ClsOIEventos ObjEventoBitacora = new ClsOIEventos();
+ ObjEventoBitacora.RemoveAgendaBitacora( cveEvento.ToEntero(), UsuarioActual.CveEmpresa);
+ ObjEventoBitacora.Dispose();
+ UPAddEventoBitacora.Update();
+
+ //RECARGAMOS GRID BITACORA
+ CargaEventoBitacora(HdfEtapaSeleccionada.Value.ToEntero());
+ UPBitacora.Update();
+ }
+
protected void BtnGuardarEventoBitacora_Click(object sender, EventArgs e)
{
ClsOIEventos ObjEventoBitacora = new ClsOIEventos();
@@ -1109,6 +1122,9 @@ public partial class CRM_Acercamiento : ClsPaginas
ScriptManager.GetCurrent(this).RegisterPostBackControl(e.Item.FindControl("LinkArchivo")); // Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione
((Label)e.Item.FindControl("LblTipoArchivo")).Text = row["Archivo"].ToString().Split('.')[1].ToUpper();
+
+ ((LinkButton)e.Item.FindControl("LinkDelete")).CommandArgument = row["CveEvento"].ToString();
+
}
}
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index 6015bbbd6..6e663ced8 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -4563,6 +4563,9 @@
+
+
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 307c6c707..8ca21fd06 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -3789,7 +3789,7 @@ Partial Class Compras_Compras
'' AGREGA PS
'AGREGA A TMPDT
- AddPS(ValorXML(node, "cantidad").ToDouble, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CveSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS)
+ AddPS(ValorXML(node, "cantidad").ToDouble, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CodigoSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS)
@@ -15904,7 +15904,7 @@ Partial Class Compras_Compras
'Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal
Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero
Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero
- Dim CveSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero
+ Dim CodigoSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero
Dim CveTipoGasto As Integer = dr("CveTipoGastoObra").ToString.ToEntero
Dim TipoGasto As String = dr("TipoGasto").ToString
@@ -15921,7 +15921,7 @@ Partial Class Compras_Compras
End If
AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False,
- CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto, CveContratoDetalle:=CveContratoDetalle, CveCultivoCuadroDetalle:=CveCultivoCuadroDetalle)
+ CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CodigoSATPS:=CodigoSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto, CveContratoDetalle:=CveContratoDetalle, CveCultivoCuadroDetalle:=CveCultivoCuadroDetalle)
'CARGA PE
Index = TmpDT.Rows.Count - 1
@@ -16170,7 +16170,7 @@ Partial Class Compras_Compras
Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal
Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero
Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero
- Dim CveSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero
+ Dim CodigoSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero
Dim CveTipoGasto As Integer = -1
Dim TipoGasto As String = ""
@@ -16184,7 +16184,7 @@ Partial Class Compras_Compras
End If
'AGREGA PS
- Dim IndexVinculacionOC = AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto)
+ Dim IndexVinculacionOC = AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CodigoSATPS:=CodigoSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto)
'CARGA PE
TmpDT.Rows(IndexVinculacionOC)("CvePresupuestoEgreso") = dr("CvePresupuestoEgreso").ToString.ToEntero
@@ -18123,10 +18123,10 @@ Partial Class Compras_Compras
Select Case Modalidad
Case "A" 'ADD
- Dim SATClavePS = -1
+ Dim CodigoSATPS = -1
Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
If PSRow IsNot Nothing Then
- SATClavePS = PSRow("SATClavePS").ToString.ToEntero
+ CodigoSATPS = PSRow("SATClavePS").ToString.ToEntero
End If
Dim IVA As Double
If chkImportacion.Checked Then
@@ -18137,7 +18137,7 @@ Partial Class Compras_Compras
AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, IVA,
TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
- NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS)
+ NoDeducible:=ChkEsNoDeduciblePS.Checked, CodigoSATPS:=CodigoSATPS)
AddPS2()
LimpiaAgregar()
@@ -18192,7 +18192,7 @@ Partial Class Compras_Compras
Private Function AddPS(Cantidad As Double, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, CveTipoPS As Integer, CveSubProyectoContrato As String, SubProyecto As String, Proyecto As String, CveProyecto As String,
Obs As String, PU As Double, Total As Double, IVA As Double, RetIVA As Double, RetISR As Double, IEPSPS As Double, IEPSPSIVA As Double, Descuento As Double, Optional CveOrdenCompraDetalle As Integer = -1, Optional TCalculaTotales As Boolean = True,
Optional PSCodigo As String = "-", Optional PSDescripcion As String = "-", Optional CantidadF As Double = -1, Optional EntregaDirecta As Integer = -1, Optional OtrosGastos As Double = 0,
- Optional CveSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Double = 0,
+ Optional CodigoSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Double = 0,
Optional PorcentajeIEPS As Double = 0, Optional PorcentajeRetIVA As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Integer
Dim Row As DataRow = Nothing
@@ -18232,15 +18232,15 @@ Partial Class Compras_Compras
Row("Consec") = TmpDT.Rows.Count + 1
End If
- If Version = "3.3" And CveSATPS > 0 Then
+ If Version = "3.3" And CodigoSATPS > 0 Then
Dim DrPSSAT As DataRow = Nothing
If CargaXml Then
- DrPSSAT = GlobalDTPSATPS("-1", CveSATPS.ToString).FiltroPrimero("")
+ DrPSSAT = GlobalDTPSATPS("-1", CodigoSATPS.ToString).FiltroPrimero("")
'If GlobalDTPSATPS().FiltraParametros(String.Format("SATClavePS={0}", CveSATPS)).Rows.Count > 0 Then
' DrPSSAT = GlobalDTPSATPS().FiltraParametros(String.Format("SATClavePS={0}", CveSATPS)).Rows(0)
'End If
Else
- DrPSSAT = GlobalDTPSATPS("-1", CveSATPS.ToString).FiltroPrimero("") '= GlobalDTPSATPS().FiltroPrimero(String.Format("SATClavePS={0}", CveSATPS))
+ DrPSSAT = GlobalDTPSATPS("-1", CodigoSATPS.ToString).FiltroPrimero("") '= GlobalDTPSATPS().FiltroPrimero(String.Format("SATClavePS={0}", CveSATPS))
'If GlobalDTPSATPS().FiltraParametros(String.Format("CveSATPS={0}", CveSATPS)).Rows.Count > 0 Then
' DrPSSAT = GlobalDTPSATPS().FiltraParametros(String.Format("CveSATPS={0}", CveSATPS)).Rows(0)
'End If
@@ -18664,6 +18664,9 @@ Partial Class Compras_Compras
DdlUnidadAlias.DataBind()
HdnPSAliasCveClasificacion.Value = DrPS("CveClasificacion").ToString
HdnPSAliasClasificacion.Value = DrPS("Clasificacion").ToString
+ HdnPSAliasCveSATPS.Value = DrPS("CveSATPS").ToString
+ HdnPSAliasSATClavePS.Value = DrPS("SATClavePS").ToString
+
End If
End If
UpPSAlias.Update()
@@ -18686,6 +18689,8 @@ Partial Class Compras_Compras
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Clasificacion") = HdnPSAliasClasificacion.Value
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("Obs") = TxtPSAlias.Text.Trim
+ TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSATPS") = HdnPSAliasCveSATPS.Value
+ TmpDT.Rows(HdnAliasInd.Value.ToEntero)("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value
'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE
For Each drt As DataRow In TmpDT.Select($"PS ='{TxtPSAlias.Text.Trim}' and ISNULL(CvePS,0) = 0")
@@ -18696,10 +18701,11 @@ Partial Class Compras_Compras
drt("CveClasificacion") = HdnPSAliasCveClasificacion.Value.ToEntero
drt("Clasificacion") = HdnPSAliasClasificacion.Value
drt("Obs") = TxtPSAlias.Text.Trim
+ drt("CveSATPS") = HdnPSAliasCveSATPS.Value
+ drt("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value
+
Next
-
TmpDT.AcceptChanges()
-
GvPS.DataSource = TmpDT
GvPS.DataBind()
UpPS.Update()
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb
index 545597a2c..220803b63 100644
--- a/Compras/ReembolsosComprobaciones.aspx.vb
+++ b/Compras/ReembolsosComprobaciones.aspx.vb
@@ -102,31 +102,31 @@ Partial Class Compras_ReembolsosComprobaciones
ObjPersonal.Dispose()
- DdlPersonal.DataBind()
+ DdlPersonal.DataBind()
- CargaTipoTransaccion()
+ CargaTipoTransaccion()
- If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then
- CbPermitirExcedente.Visible = True
- Else
- CbPermitirExcedente.Visible = False
- End If
+ If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then
+ CbPermitirExcedente.Visible = True
+ Else
+ CbPermitirExcedente.Visible = False
+ End If
' If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
'rowComisiones.Visible = True
' End If
If UsuarioActual.CveEmpresa = 119 Then
- ChkReembolsarSinBancos.Visible = True
- End If
-
- TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
-
- 'CargaCuentasDiferencia()
-
- 'TableDiferencia.Visible = False
+ ChkReembolsarSinBancos.Visible = True
End If
+ TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
+
+ 'CargaCuentasDiferencia()
+
+ 'TableDiferencia.Visible = False
+ End If
+
End Sub
#Region " FILTROS "
@@ -799,7 +799,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If
Else
'Agrego el IVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
'Agrego el IVA
@@ -1129,7 +1129,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If
Else
'Agrego el IVA
- If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago, Referencia, 14, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAXAcreditar > 0, IdCtaContIVAXAcreditar, IdCtaIVAxAcreditar), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago) * tipoCambio, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx
index 1868ddeed..11d26abf9 100644
--- a/Contabilidad/RegPrePolizaS.aspx
+++ b/Contabilidad/RegPrePolizaS.aspx
@@ -224,9 +224,7 @@
-
-
-
+
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index d5978097f..e9f305103 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -1283,6 +1283,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
+ dr("Modificado") = True
DtMovimientos.Rows.Add(dr)
diff --git a/GPS/TrayectoDetalle.aspx b/GPS/TrayectoDetalle.aspx
index c977aaab9..7348e02c5 100644
--- a/GPS/TrayectoDetalle.aspx
+++ b/GPS/TrayectoDetalle.aspx
@@ -360,8 +360,8 @@
-
+
diff --git a/GPS/TrayectoDetalle.aspx.vb b/GPS/TrayectoDetalle.aspx.vb
index 7153f6f10..fe58efe5d 100644
--- a/GPS/TrayectoDetalle.aspx.vb
+++ b/GPS/TrayectoDetalle.aspx.vb
@@ -186,7 +186,17 @@ Partial Class GPS_TrayectoDetalle
GvIgnicion.DataSource = DsDatos.Tables(1)
GvIgnicion.DataBind()
- GvExcesos.DataSource = DsDatos.Tables(2)
+ Dim DtExcesos As DataTable = DsDatos.Tables(2)
+
+ Dim Direcciones = ConsultarDirecciones(DtExcesos)
+
+ If Direcciones IsNot Nothing Then
+ For Each Dir As JObject In Direcciones
+ DtExcesos.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
+ Next
+ End If
+
+ GvExcesos.DataSource = DtExcesos
GvExcesos.DataBind()
GvRalenti.DataSource = DsDatos.Tables(3)
diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx b/Inventarios/PopUpExistenciasAlmacen.aspx
index 3588e3237..6f5122421 100644
--- a/Inventarios/PopUpExistenciasAlmacen.aspx
+++ b/Inventarios/PopUpExistenciasAlmacen.aspx
@@ -135,6 +135,8 @@
+<%--
+ --%>
@@ -147,6 +149,7 @@
+
diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb
index a50ab4f25..8af463766 100644
--- a/Inventarios/RecepcionUsados.aspx.vb
+++ b/Inventarios/RecepcionUsados.aspx.vb
@@ -2560,11 +2560,12 @@ Partial Class Inventarios_RecepcionUsados
Case "0" ' USADOS
CvePS = Row.DataKey("CvePS").ToEntero()
Case "1" ' AJUSTE/GARANTIA
- Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
+ CvePS = Row.DataKey("CvePS").ToEntero()
+ 'Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
- If drDatos IsNot Nothing Then
- CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
- End If
+ 'If drDatos IsNot Nothing Then
+ ' CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
+ 'End If
End Select
If CvePS > 0 Then
@@ -3104,28 +3105,37 @@ Partial Class Inventarios_RecepcionUsados
End If
Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa))
+ Dim Importe As Decimal = 0
+ Dim drTamañoPS As DataRow = Nothing
+
+ DtMovimientos.Rows.Clear()
+
+ ' USADOS
If drDatos IsNot Nothing Then
- Dim Importe As Decimal = drDatos("Cargo").ToString.ToDecimal
- Dim drTamañoPS As DataRow = Nothing
+ If RblUsadosAjuste.SelectedValue = "0" Then
+ CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
+ End If
+ Importe = drDatos("Cargo").ToString.ToDecimal
+ Else
+ Importe = TxtImporteAjuste.Text.ToDecimal
+ End If
- DtMovimientos.Rows.Clear()
-
- Select Case RblUsadosAjuste.SelectedValue
- Case "0" ' USADOS
- CvePS = drDatos.Item("CvePSCargo").ToString.ToEntero
- Case "1" ' AJUSTE/GARANTIA
- CvePS = DdlPSAjuste.SelectedValue.ToEntero
- End Select
+ 'AJUSTE/GARANTIA
+ If RblUsadosAjuste.SelectedValue = "1" Then
+ CvePS = DdlPSAjuste.SelectedValue.ToEntero
+ End If
+ If CvePS > 0 Then
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
drTamañoPS = ObjPS.DtResultados.FiltroPrimero("")
'CveTamaño = -1 'limpio esta variable para que no se registre dos veces en la clase Modelos
AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe,
- "", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño)
+ "", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño)
End If
Else
Alert("No se pudo cargar el producto", TipoMensaje.MsgError)
End If
+
Catch ex As Exception
OnError("Ocurrió un error al agregar el producto", ex)
End Try
diff --git a/Inventarios/Remanufactura.aspx.vb b/Inventarios/Remanufactura.aspx.vb
index 52f88843e..62aa9cee2 100644
--- a/Inventarios/Remanufactura.aspx.vb
+++ b/Inventarios/Remanufactura.aspx.vb
@@ -803,14 +803,13 @@ Partial Class Inventarios_Remanufactura
FechaMovimiento = ObjFactura.FechaPago
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
- CveCuenta = ObjFactura.Cliente.CveCuentaClientes
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
CuentasContablesInvalidas.Append(" " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
ErrorPrepoliza = True
Else
ViewState("SeGuardoPrePoliza") = True
diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb
index e6384aa58..b6e71a423 100644
--- a/OC/OC.aspx.vb
+++ b/OC/OC.aspx.vb
@@ -463,6 +463,14 @@ Partial Class OC
ViewState("CveConfianzaProveedor") = value
End Set
End Property
+ Private Property CveProveedorOriginal As Integer
+ Get
+ Return IfNull(ViewState("CveProveedorOriginal"), -1).ToString().ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("CveProveedorOriginal") = value
+ End Set
+ End Property
Private Property CveEstatusSupervisada As Integer
Get
Return IfNull(ViewState("CveEstatusSupervisada"), -1).ToString().ToEntero()
@@ -572,6 +580,7 @@ Partial Class OC
If Not Page.IsPostBack Then
CargaDatosAgregarPS()
+ CveProveedorOriginal = -1
'MODALIDAD MULTIEMPRESA
CveEmpresaActual = UsuarioActual.CveEmpresa
CargaEstatusUsuariosClasificaciones()
@@ -1431,6 +1440,7 @@ Partial Class OC
DdlProveedores.SelectedValue = objOC.CveProveedor.ToString
If DdlProveedores.SelectedValue.ToEntero > 0 Then
+ CveProveedorOriginal = objOC.CveProveedor
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString
Else
DdlProveedores.SelectedText = "-"
@@ -2718,8 +2728,10 @@ Partial Class OC
DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)) Then
- If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then
- TieneError = True
+ If CveProveedorOriginal <> CveProveedor Then
+ If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then
+ TieneError = True
+ End If
End If
Else
TieneError = True
diff --git a/PortalCliente/PortalCliente.aspx.vb b/PortalCliente/PortalCliente.aspx.vb
index 3f6f4a084..8e8d8596e 100644
--- a/PortalCliente/PortalCliente.aspx.vb
+++ b/PortalCliente/PortalCliente.aspx.vb
@@ -766,8 +766,7 @@ Partial Class Ventas_PortalCliente
Dim TipoMovimiento = False
Dim ImporteMovimiento = 0.0D
Dim importeMX = 0.0D
- Dim IdCtaContable = 0
- Dim CveCuenta = 0
+ Dim IdCtaContable = 0
Dim ConceptoMovimiento = ""
Dim Referencia = ""
Dim CveSubProyecto = -1
@@ -810,7 +809,6 @@ Partial Class Ventas_PortalCliente
ImporteMovimiento = 0
importeMX = 0
IdCtaContable = 0
- CveCuenta = 0
PorcentajeImpuesto = 0
ConceptoMovimiento = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, LtlCliente.Text, DrPago("Factura").ToString, DrPago("Factura").ToString)
'VALORES DE LA VENTA
@@ -843,14 +841,12 @@ Partial Class Ventas_PortalCliente
If CveMonedaVenta = 1 Then
IdCtaContable = IdCuentaCliente
- CveCuenta = CveCuentacliente
Else
IdCtaContable = IdCtaContMonedaExtranjera
- CveCuenta = CveCuentaComplementaria
ConceptoMovimiento += $" TC:{TCPago} ${ImporteMovimiento.FormatoNumero(2)}"
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 207, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, ImporteMX:=(importeMX - ImporteMovimiento).RoundSQL(), ImporteME:=ImporteMovimiento, CveCuenta:=CveCuenta, TipoCambio:=TCVenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 207, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, ImporteMX:=(importeMX - ImporteMovimiento).RoundSQL(), ImporteME:=ImporteMovimiento, TipoCambio:=TCVenta) Then
TieneError = True
MensajeError.Append("No se pudo insertar el detalle de pago de la póliza ")
Exit For
@@ -858,7 +854,6 @@ Partial Class Ventas_PortalCliente
End If
IdCtaContable = IdCtaContMonedaExtranjera
- CveCuenta = CveCuentaMonedaExtranjera
End If
Case 134 'PAGO INTERMEDIARIO
@@ -882,7 +877,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCVenta
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
- CveCuenta = UsuarioActual.Empresa.CveCuentaIVAxTrasladar
If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 61 'IVA TRASLADADO
@@ -900,7 +894,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCFluctuacion
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVATrasladado
- CveCuenta = UsuarioActual.Empresa.CveCuentaIVATrasladado
If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}"
Case 8 'RETIVA X TRASLADAR
@@ -926,16 +919,8 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacion").ToEntero
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetIVA <> 0 Then
- CveCuenta = CveCuentaRetIVA
- Else
- If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacionSIG").ToEntero
- End If
- End If
+ End If
+
Case 62 'RETIVA TRASLADADO
If CveMonedaVenta = 1 Then
ImporteMovimiento = RetIVAVenta * PorcentajePago
@@ -959,17 +944,9 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacion").ToEntero
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetIVA <> 0 Then
- CveCuenta = CveCuentaRetIVA
- Else
- If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetIVACirculacionSIG").ToEntero
- End If
- End If
-
+ End If
+
+
Case 9 'RETISR X TRASLADAR
If CveMonedaVenta = 1 Then
ImporteMovimiento = RetISRVenta * PorcentajePago
@@ -993,17 +970,9 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacion").ToEntero
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetISR <> 0 Then
- CveCuenta = CveCuentaRetISR
- Else
- If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacionSIG").ToEntero
- End If
- End If
-
+ End If
+
+
Case 63 'RETISR TRASLADADO
If CveMonedaVenta = 1 Then
ImporteMovimiento = RetIVAVenta * PorcentajePago
@@ -1027,17 +996,8 @@ Partial Class Ventas_PortalCliente
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacion").ToEntero
End If
- End If
-
- 'Conta SIG
- If CveCuentaRetISR <> 0 Then
- CveCuenta = CveCuentaRetISR
- Else
- If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
- CveCuenta = ObjConta.DtResultados.FiltroPrimeroValor("IdCuentaRetISRCirculacionSIG").ToEntero
- End If
- End If
-
+ End If
+
Case 38 'IEPS X TRASLADAR
If CveMonedaVenta = 1 Then
ImporteMovimiento = IEPSVenta * PorcentajePago
@@ -1053,7 +1013,6 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCVenta
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
- CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 39 'IEPS TRASLADADO
@@ -1071,14 +1030,12 @@ Partial Class Ventas_PortalCliente
TCGeneral = TCFluctuacion
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
- CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}"
Case 64 'GANANCIA
Continue For 'SKIPEA
If CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
If TCPago > TCVenta AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta)
ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta)
@@ -1094,7 +1051,6 @@ Partial Class Ventas_PortalCliente
Continue For 'SKIPEA
If CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
- CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
If TCPago < TCVenta AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta)
ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta)
@@ -1110,7 +1066,7 @@ Partial Class Ventas_PortalCliente
'AGREGA PREPOLIZA DETALLE
If ImporteMovimiento <> 0 Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, CveProveedorContabilizar, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, CveProveedorContabilizar, ImporteMX:=importeMX, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
TieneError = True
MensajeError.Append("No se pudo insertar el detalle de la póliza ")
Exit For
@@ -1954,7 +1910,7 @@ Partial Class Ventas_PortalCliente
End Select
If importeMovimiento <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, ObjFactura.Cliente.IdCtaContClientes, ObjFactura.Cliente.IdCtaContAnticipos), -1, CveIE:=CveIE, CveCompra:=-1, CveProveedor:=-1, CvePersonal:=-1, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCuenta:=If(ConceptoContable = 30, ObjFactura.Cliente.CveCuentaClientes, ObjFactura.Cliente.CveCuentaAnticipos)) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, ObjFactura.Cliente.IdCtaContClientes, ObjFactura.Cliente.IdCtaContAnticipos), -1, CveIE:=CveIE, CveCompra:=-1, CveProveedor:=-1, CvePersonal:=-1, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
End If
diff --git a/PortalProveedor/PortalProveedor.aspx b/PortalProveedor/PortalProveedor.aspx
index acdd6b0e0..28c9c6951 100644
--- a/PortalProveedor/PortalProveedor.aspx
+++ b/PortalProveedor/PortalProveedor.aspx
@@ -193,7 +193,13 @@
-
+
+ Aplica NC
+
+
+
+
+ <%----%>
@@ -751,72 +757,6 @@
- <%--02/07/2018 - TAB CAMBIO DE CONTRASENIAS--%>
-
-
-
-
-
-
-
-
-
-
- Cambio Contraseña
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<%---2020/02/06 - Auditoria--%>
diff --git a/PortalProveedor/PortalProveedor.aspx.vb b/PortalProveedor/PortalProveedor.aspx.vb
index 370954255..093cdb5ec 100644
--- a/PortalProveedor/PortalProveedor.aspx.vb
+++ b/PortalProveedor/PortalProveedor.aspx.vb
@@ -293,7 +293,6 @@ Partial Class Portal_PortalProveedor
End If
'CARGA TAB CONTRASENIA PARA TODOS LOS USUARIOS
- If UsuarioActual.CvePlataforma = 7 Then TabContraseña.Visible = True
End If
@@ -511,13 +510,25 @@ Partial Class Portal_PortalProveedor
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
+ e.Row.Cells(9).Width = Unit.Percentage(10)
+
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(5).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxP" Then e.Row.Cells(3).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("CveCompra") = "" Then
e.Row.BackColor = Drawing.Color.LightGray
- End If
-
+ End If
+
+ If e.Row.DBCampo("CveCompraNC").ToEntero > 0 Then
+ Dim asdas2 As Integer = e.Row.DBCampo("CveCompraNC").ToEntero
+ Dim asdas As String = e.Row.DBCampo("AplicaNotaCredito").ToString
+ If e.Row.DBCampo("AplicaNotaCredito").ToString = "True" Then
+ e.Row.FCHyperLink("HplNC").Visible = True
+ e.Row.FCHyperLink("HplNC").ImageUrl = "/Imagenes/flag_green.png"
+ e.Row.FCHyperLink("HplNC").ToolTip = "Notas de Crédito Aplicadas"
+ End If
+ End If
+
If CType(sender, GridView).ID = "GvCxPHistorial" Then
If e.Row.DBCampo("CveCompra") = "" Then
e.Row.BackColor = Drawing.Color.LightGray
@@ -1367,39 +1378,11 @@ Partial Class Portal_PortalProveedor
End If
ObjMovtos.Dispose()
Return retorno
- End Function
+ End Function
#End Region
-
-#Region "TAB CONTRASENIA"
-
- Protected Sub BtnGuardarContraseña_Click(sender As Object, e As EventArgs) Handles BtnGuardarContraseña.Click
-
- If Decripta(UsuarioActual.Contraseña) = TxtContraseniaActual.Text Then
-
- Dim ObjUsuario As New ClsSisUsuarios
- Dim Usuario As Usuario = Nothing
- If ObjUsuario.GetUsuariosPortal(UsuarioActual.CveUsuario, -1, -1) Then
-
- Dim dr As DataRow = ObjUsuario.DtResultados.FiltroPrimero("")
-
- If ObjUsuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, True, Encripta(TxtContrasenia1.Text), dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveUsuario) Then
- UsuarioActual.Contraseña = Encripta(TxtContrasenia1.Text)
- Alert("Contraseña Modificada.", TipoMensaje.MsgInformacion)
-
- End If
- End If
-
- ObjUsuario.Dispose()
- Else
- Alert("La Contraseña Actual es incorrecta.", TipoMensaje.MsgAdvertencia)
- End If
-
- End Sub
-#End Region
-
-
+
#Region "AUDITORIA"
-
+
Property DTDocumentacion As DataTable
Get
If ViewState("DTDocumentacion") Is Nothing Then
diff --git a/Sistemas/UsuarioDetalle.aspx b/Sistemas/UsuarioDetalle.aspx
index 512355535..182c8df96 100644
--- a/Sistemas/UsuarioDetalle.aspx
+++ b/Sistemas/UsuarioDetalle.aspx
@@ -307,6 +307,13 @@
+
+
Límite Cédito Autorizado:
+
+
+
+
+
diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb
index e9948bffc..72683623b 100644
--- a/Sistemas/UsuarioDetalle.aspx.vb
+++ b/Sistemas/UsuarioDetalle.aspx.vb
@@ -447,6 +447,7 @@ Partial Class Sistemas_UsuarioDetalle
If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
TrDescuentoAutorizado.Visible = True
+ TrLimiteAutorizacion.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
@@ -586,8 +587,8 @@ Partial Class Sistemas_UsuarioDetalle
LblFechaCaptura.Text = ObjUsuario.Fecha.ToShortDateString
LblUsuarioCapturo.Text = ObjUsuario.UsuarioCreo
- TxtDescuentoAutorizado.Text = ObjUsuario.DescuentoAutorizado.FormatoNumero
-
+ TxtDescuentoAutorizado.Text = ObjUsuario.DescuentoAutorizado.FormatoNumero
+ TxtLimiteAutorizado.Text = ObjUsuario.DtResultados.Rows(0)("LimiteCreditoAutorizado").ToString()
Else
Alert("El Usuario Solicitado no existe, Revise su búsqueda.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
@@ -831,7 +832,7 @@ Partial Class Sistemas_UsuarioDetalle
'REGISTRA O ACTUALIZA LOS DATOS GENERALES DEL USUARIO
If CveUsuario = -1 Then
- CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso)
+ CveUsuario = ObjUsuarios.AddUsuario(TxtUsuario.Text.Trim, Encripta(ContraseñaPredeterminada), TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, UsuarioActual.CveUsuario, DdlEmpresa.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, CveAlmacenAsignado:=DdlAlmacenGeneral.SelectedValue.ToEntero, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso, LimiteCreditoAutorizado:=TxtLimiteAutorizado.Text.ToDecimal())
EsNuevoUsuario = True
If CveUsuario = -1 Then
TieneError = True
@@ -843,7 +844,7 @@ Partial Class Sistemas_UsuarioDetalle
End If
Next
Else
- If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso) Then
+ If Not ObjUsuarios.UpdateUsuario(TxtUsuario.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlPersonal.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, ChkCambiarContraseña.Checked, ChkEstatus.Checked, DdlEmpresa.SelectedValue.ToEntero, CveUsuario, DdlAlmacenGeneral.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, AsignarSubProyecto:=ChkAsignarSubProyecto.Checked, AsignarOC:=ChkAsignarOC.Checked, DescuentoAutorizado:=TxtDescuentoAutorizado.Text.ToDouble, CodigoAcceso:=CodigoAcceso, LimiteCreditoAutorizado:=TxtLimiteAutorizado.Text.ToDecimal()) Then
TieneError = True
End If
diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb
index b26f69ee9..ca172e5ec 100644
--- a/Ventas/ActualizarPrecios.aspx.vb
+++ b/Ventas/ActualizarPrecios.aspx.vb
@@ -559,7 +559,7 @@ Partial Class Ventas_ActualizarPrecios
For Each Franquicia In Franquicias
Dim CveFranquicia As Integer = Franquicia.ToEntero
- Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo.ToUpper).FiltroPrimeroValor("CvePS", "").ToEntero
+ Dim CvePS As Integer = GlobalDTPSSimplificado(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero
If CvePS <= 0 Then
diff --git a/Ventas/CatAutorizacionLimites.aspx b/Ventas/CatAutorizacionLimites.aspx
new file mode 100644
index 000000000..b71f4c61e
--- /dev/null
+++ b/Ventas/CatAutorizacionLimites.aspx
@@ -0,0 +1,156 @@
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatAutorizacionLimites.aspx.vb" Inherits="Ventas_CatAutorizacionLimites" %>
+
+
+
+
+
+
+
+ Catálogo de autorizaciones de límite de crédito
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Ventas/CatAutorizacionLimites.aspx.vb b/Ventas/CatAutorizacionLimites.aspx.vb
new file mode 100644
index 000000000..0b450106d
--- /dev/null
+++ b/Ventas/CatAutorizacionLimites.aspx.vb
@@ -0,0 +1,215 @@
+
+Imports Extensiones
+
+Partial Class Ventas_CatAutorizacionLimites
+ Inherits ClsPaginas
+
+#Region "PROPIEDADES"
+ Private Property CveAutorizacion() As Integer
Get
+ Return If(IsNothing(ViewState("CveAutorizacion")), -1, CInt(ViewState("CveAutorizacion")))
+ End Get
Set
+ ViewState("CveAutorizacion") = Value
End Set
End Property
+ Private Property Modalidad() As String
Get
+ Return If(IsNothing(ViewState("Modalidad")), "", (ViewState("Modalidad").ToString))
+ End Get
Set
+ ViewState("Modalidad") = Value
End Set
End Property
+#End Region
+
+ Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
+ If Not IsPostBack Then
+ CargaCombos()
+ CargaDatos()
+ End If
+ End Sub
+
+#Region "CARGAS"
+ Private Sub CargaCombos()
+ Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
+ If EsWS Then
+ DdlCliente.setEsWebService(True)
+ Else
+ DdlCliente.setEsWebService(False)
+ DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
+ DdlCliente.DataBind()
+ DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ End If
+
+ DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
+ DdlVendedor.DataBind()
+
+ UpModal.Update()
+ End Sub
+ Private Sub CargaDatos()
+ Dim ObjGral As New ClsVentas
+ If ObjGral.GetAutorizacionLimite(UsuarioActual.CveEmpresa, -1, -1, CveEstatus:=DdlEstatus.SelectedValue.ToEntero()) Then
+ GvDatos.DataSource = ObjGral.DtResultados
+ End If
+ ObjGral.Dispose()
+ GvDatos.DataBind()
+ UpDatos.Update()
+ End Sub
+
+ Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
+ CargaDatos()
+ End Sub
+
+#End Region
+
+#Region "BOTONES"
+ Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
+ Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+
+ Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
+ Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
+
+ Dim ObjGral As New ClsVentas
+ If ObjGral.RemoveAutorizacionLimite(CveAutorizacion, CveCliente) Then
+ Alert("La autorización se elimino correctamente.", TipoMensaje.MsgInformacion)
+ End If
+ ObjGral.Dispose()
+
+ CargaDatos()
+ End Sub
+
+ Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs)
+ LimpiaModal()
+ Modalidad = "A"
+ BtnGuardar.Text = "Agregar"
+ ltlMotititulo.Text = "Agregar autorización"
UpModal.Update()
+ RegistraScript("$('#DModal').modal()")
End Sub
+ Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
+ If DdlTipoDocto.SelectedValue = "Ing" AndAlso DdlTipoAutorizacion.SelectedValue.ToEntero() <= 0 Then
+ Alert("Debe seleccionar un tipo de autorización", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ Dim CveEstatus As Integer = 1
+ Dim TipoDocto As String = DdlTipoDocto.SelectedValue
+ Dim CveTipoAutorizacion As Integer = -1
+
+ Select Case TipoDocto
+ Case "Ing"
+ CveTipoAutorizacion = DdlTipoAutorizacion.SelectedValue.ToEntero()
+ Case "Egs"
+ CveTipoAutorizacion = -1
+ End Select
+
+ Dim ObjPS As New ClsVentas
+ If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, DdlCliente.SelectedValue.ToEntero(), DdlVendedor.SelectedValue.ToEntero(), TxtPrecio.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveAutorizacion, TipoDocto) Then
+ RegistraScript("$('#DModal').modal('hide')")
+ Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
+ End If
+ ObjPS.Dispose()
+
+ CargaDatos()
+ End Sub
+
+#End Region
+
+#Region "LIMPIAR"
+ Protected Sub LimpiaModal()
Me.CveAutorizacion = -1
TxtPrecio.Text = ""
+
+ DdlCliente.SelectedValue = "-1"
DdlVendedor.SelectedValueExist("-1")
End Sub
+
+#End Region
+
+#Region "GRIDVIEW"
+ Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ If e.Row.DBCampo("CveEstatus") = "0" Then
+ e.Row.FCLabel("LblEstatus").CssClass = "badge badge-secondary"
+ e.Row.FCLinkButton("LnkAutorizar").Visible = True
+ e.Row.FCLinkButton("LnkRechazar").Visible = True
+ ElseIf e.Row.DBCampo("CveEstatus") = "1" Then
+ e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success"
+ e.Row.FCLinkButton("LnkAutorizar").Visible = False
+ e.Row.FCLinkButton("LnkRechazar").Visible = True
+ ElseIf e.Row.DBCampo("CveEstatus") = "2" Then
+ e.Row.FCLabel("LblEstatus").CssClass = "badge badge-primary"
+ e.Row.FCLinkButton("LnkAutorizar").Visible = False
+ e.Row.FCLinkButton("LnkRechazar").Visible = False
+ ElseIf e.Row.DBCampo("CveEstatus") = "3" Then
+ e.Row.FCLabel("LblEstatus").CssClass = "badge badge-danger"
+ e.Row.FCLinkButton("LnkAutorizar").Visible = False
+ e.Row.FCLinkButton("LnkRechazar").Visible = False
+ End If
+ 'If e.Row.DBCampo("Estatus") = "True" Then
+ ' e.Row.Cells(1).ForeColor = Drawing.Color.Green
+ ' e.Row.Cells(1).Font.Bold = True
+ ' e.Row.Cells(1).Text = "Activo"
+ 'Else
+ ' e.Row.Cells(1).Text = "Inactivo"
+ ' e.Row.Cells(1).ForeColor = Drawing.Color.Red
+ ' e.Row.Cells(1).Font.Bold = True
+ 'End If
+ End If
+ End Sub
+
+#End Region
+
+
+
+ Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs)
+ Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+
+ Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
+ Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
+ Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
+ Dim Importe = gvRow.DataKey("Importe").ToEntero()
+ Dim CveEstatusAutorizacion As Integer = 1
+
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion) Then
+ Alert("El límite de crédito fue autorizado.")
+ End If
+ ObjVentas.Dispose()
+
+ CargaDatos()
+ End Sub
+
+ Protected Sub LnkRechazar_Click(sender As Object, e As EventArgs)
+ Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+
+ Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
+ Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
+ Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
+ Dim Importe = gvRow.DataKey("Importe").ToEntero()
+ Dim CveEstatusAutorizacion As Integer = 3
+
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion) Then
+ Alert("El límite de crédito fue rechazado.")
+ End If
+ ObjVentas.Dispose()
+
+ CargaDatos()
+ End Sub
+ Protected Sub DdlTipoAutorizacion_SelectedIndexChanged(sender As Object, e As EventArgs)
+ DivImporte.Visible = DdlTipoAutorizacion.SelectedValue.ToEntero() = 1
+ UpModal.Update()
+ End Sub
+ Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
+ Dim CveCliente As Integer = DdlCliente.SelectedValue.ToEntero()
+ If CveCliente > 0 Then
+ Using ObjClientes As New ClsClientes
+ If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) AndAlso ObjClientes.DtResultados.Rows.Count > 0 Then
+ DdlVendedor.SelectedValueExist(ObjClientes.DtResultados.Rows(0)("CveVendedor"))
+ End If
+ End Using
+ End If
+
+ UpModal.Update()
+ End Sub
+ Protected Sub DdlTipoDocto_SelectedIndexChanged(sender As Object, e As EventArgs)
+ Dim TipoDocto As String = DdlTipoDocto.SelectedValue.ToString()
+ Select Case TipoDocto
+ Case "Ing"
+ DivAutorizacion.Visible = True
+ DivImporte.Visible = True
+ Case "Egs"
+ DivAutorizacion.Visible = False
+ DivImporte.Visible = False
+ End Select
+ UpModal.Update()
+ End Sub
+End Class
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 1f4d659d8..1e0415ffa 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -855,7 +855,7 @@ Partial Class Ventas_ClientesAbonar
Dim tipoCambioVentaDiferenciaCambiaria As Double = 1
Dim EsAnticipoEspecial As Boolean = False
- If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then EsAnticipoEspecial = True
+ If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True
If dtConceptos IsNot Nothing Then
For Each Row As DataRow In dtConceptos.Rows
@@ -900,9 +900,9 @@ Partial Class Ventas_ClientesAbonar
Else
ConceptoMovimiento += $" TC:{tipoCambioVentaValuacion} ${ImporteMovimiento.FormatoNumero(2)}"
IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria)
- If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
+ If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
importeMX = ImporteMovimiento
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa = 119, 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158), 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2579,7 +2579,6 @@ Partial Class Ventas_ClientesAbonar
For Each gr As GridViewRow In GvCxC.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim IdCtaContable As Integer = IdCuentaCliente
- Dim CveCuenta As Integer = 0
Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal
Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal
Dim RETIVA As Decimal = gr.DataKey("RetIVA").ToDecimal
@@ -2632,11 +2631,11 @@ Partial Class Ventas_ClientesAbonar
End If
- Dim UsaComplementaria As Boolean = False
+ Dim UsaComplementaria As Boolean = True
- If UsuarioActual.CveEmpresa = 119 Then
- UsaComplementaria = True
- End If
+ 'If UsuarioActual.CveEmpresa = 119 Then
+ ' UsaComplementaria = True
+ 'End If
If MsgError = "" Then
@@ -2648,16 +2647,16 @@ Partial Class Ventas_ClientesAbonar
If UsaComplementaria AndAlso tCveMoneda = 2 Then
'normal
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
'complementaria
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo).RoundSQL, ImporteME:=Saldo, CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo).RoundSQL, ImporteME:=Saldo, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo * TCVenta), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, CveConceptoCliente, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo * TCVenta), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
@@ -2673,11 +2672,11 @@ Partial Class Ventas_ClientesAbonar
End If
If TCPago > TCVenta Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
@@ -2700,19 +2699,17 @@ Partial Class Ventas_ClientesAbonar
End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
- CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
- If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
+ If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
- If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, gr.DataKey("SerieFolio").ToString, 8, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContRetIVA, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
+ If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, gr.DataKey("SerieFolio").ToString, 8, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContRetIVA, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
- CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
- If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
+ If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb
index 3c943a27d..f01634812 100644
--- a/Ventas/PV.aspx.vb
+++ b/Ventas/PV.aspx.vb
@@ -4993,13 +4993,13 @@ Partial Class PV
If CveVentaDetalle <= 0 AndAlso Not EsCargo Then
Dim ListaPSCargo = CalculaUsados(Consec)
If ListaPSCargo.Count > 0 Then
- CalculaRecepcionUsados(CvePS, ListaPSCargo)
+ CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad)
End If
ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then
EliminarUsados()
Dim ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False)
If ListaPSCargo.Count > 0 Then
- CalculaRecepcionUsados(CvePS, ListaPSCargo)
+ CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad)
End If
End If
@@ -7091,7 +7091,7 @@ Partial Class PV
EmitirImprimirNew()
End Sub
- Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of Integer))
+ Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of Integer), CantidadUsado As Decimal)
If Modalidad = "U" Then
If TmpDTRecepcionUsados.Rows.Count > 0 Then
@@ -7139,14 +7139,14 @@ Partial Class PV
Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}")
If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then
- TotalCargos += 1D * DrTamanio("Cargo").ToString().ToDecimal
- TotalCantidad += 1D
+ TotalCargos += CantidadUsado * DrTamanio("Cargo").ToString().ToDecimal
+ TotalCantidad += CantidadUsado
StrTamanios.AppendFormat("{0},", DrTamanio("CodigoPS"))
Dim Row As DataRow = TmpDTRecepcionUsados.NewRow()
Row("CvePS") = DrTamanio("CvePSCargo").ToString().ToEntero
Row("CvePSRelacionado") = CvePS
- Row("Cantidad") = 1D
+ Row("Cantidad") = CantidadUsado
Row("CveUM") = DrTamanio("CveUM").ToString().ToEntero
Row("CveVentaDetalle") = -1
Row("PU") = DrTamanio("Cargo").ToString().ToDecimal
@@ -7176,11 +7176,14 @@ Partial Class PV
' Exit Sub
'End If
- For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = True AND EliminarDB = False AND CvePS IN ({StrCargos})").Rows
+ Dim DtUsadosFiltro As DataTable = TmpDT.FiltraParametros($"EsCargo = True AND EliminarDB = False AND CvePS IN ({StrCargos})")
+ Dim DivisorUsado = DtUsadosFiltro.Rows.Count.ToString().ToDecimal()
+
+ For Each Dr As DataRow In DtUsadosFiltro.Rows
Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
'Dim PUActual As Decimal = (TotalAnterior - TotalCargos) / Dr("Cantidad").ToString.ToDecimal
- Dim DescuentoCargo As Decimal = (TotalCargos / Dr("Cantidad").ToString.ToDecimal)
+ Dim DescuentoCargo As Decimal = (TotalCargos / DivisorUsado)
If DescuentoCargo > (TotalAnterior - Dr("Descuento").ToString.ToDecimal()) Then
DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal())
@@ -7218,20 +7221,23 @@ Partial Class PV
Next
TmpDT.AcceptChanges()
If TotalCargos > 0 Then ' cuando se entrega más valor de usados, que los cargos hechos, se descuenta sobre el PU del producto de venta
- For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = False AND EliminarDB = False AND CvePS={CvePS}").Rows
+ Dim DtPSFiltro As DataTable = TmpDT.FiltraParametros($"EsCargo = False AND EliminarDB = False AND CvePS={CvePS}")
+ Dim Divisor = DtPSFiltro.Rows.Count.ToString().ToDecimal()
- Dim PUAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
- Dim DescuentoCargo As Decimal = (TotalCargos / Dr("Cantidad").ToString.ToDecimal)
+ For Each Dr As DataRow In DtPSFiltro.Rows
- If DescuentoCargo > (PUAnterior - Dr("Descuento").ToString.ToDecimal()) Then
- DescuentoCargo = (PUAnterior - Dr("Descuento").ToString.ToDecimal())
+ Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
+ Dim DescuentoCargo As Decimal = (TotalCargos / Divisor)
+
+ If DescuentoCargo > (TotalAnterior - Dr("Descuento").ToString.ToDecimal()) Then
+ DescuentoCargo = (TotalAnterior - Dr("Descuento").ToString.ToDecimal())
End If
'Dim PUActual As Decimal = PUAnterior - DescuentoCargo
Dim Descuento As Decimal = Dr("Descuento").ToString.ToDecimal + DescuentoCargo
- Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (PUAnterior)) - Descuento
- TotalCargos += -DescuentoCargo
+ Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal) - Descuento
+ TotalCargos -= DescuentoCargo
Dim drt As DataRow() = TmpDT.Select("Consec = " & Dr("Consec").ToString)
Dim drr As DataRow = drt(0)
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index c6adff94b..8583d5742 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -2944,7 +2944,10 @@ Partial Class ProductosyServicios
Return True
End If
End If
+
+ GlobalDTPSSimplificado(CveEmpresaFranquicia) = Nothing
Next
+
Return False
End Function
diff --git a/Ventas/RepAnticipo-NC-IXCDetalle.aspx b/Ventas/RepAnticipo-NC-IXCDetalle.aspx
index 427376291..2ba2f08ee 100644
--- a/Ventas/RepAnticipo-NC-IXCDetalle.aspx
+++ b/Ventas/RepAnticipo-NC-IXCDetalle.aspx
@@ -196,6 +196,11 @@
+
+
+
+
+
diff --git a/Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs b/Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs
index 24bd56845..00c7931df 100644
--- a/Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs
+++ b/Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs
@@ -94,7 +94,9 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
DdlSucursal.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
DdlSucursal.DataBind();
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
- DdlSucursal.SelectedValue = "-1";
+ DdlSucursal.SelectedValue = "-1";
+ DdlSubProyectoSaldar.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
+ DdlSubProyectoSaldar.DataBind();
}
//protected void CargaClientes()
@@ -386,7 +388,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
break;
}
- if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1, CveSubProyecto: Gv.DataKey("CveSubProyecto").ToEntero()))
+ if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1, CveSubProyecto: DdlSubProyectoSaldar.SelectedValue.ToEntero()))
{
MsgError = "Ocurrio un error al saldar el movimiento";
break;
diff --git a/Ventas/RepPS.aspx.vb b/Ventas/RepPS.aspx.vb
index cf7a1a120..7ff45a9fe 100644
--- a/Ventas/RepPS.aspx.vb
+++ b/Ventas/RepPS.aspx.vb
@@ -775,9 +775,9 @@ Partial Class Ventas_RepPS
'worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 9).Value = Row("PolizasCantidadAcumulada")
worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 9).Formula = $"=SUM({worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 7).Name}:{worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 8).Name})"
- worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 10).Value = Row("VentaAnterior")
- worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 11).Value = Row("VentaDia")
- 'worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 12).Value = Row("VentaAcumulada")
+ worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 10).Value = Row("ManoObraCantidadAnterior")
+ worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 11).Value = Row("ManoObraCantidadDia")
+ 'worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 12).Value = Row("ManoObraCantidadAcumulada")
worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 12).Formula = $"=SUM({worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 10).Name}:{worksheet.Cells(IdxSucursalesServiciosAmortPolizas, 11).Name})"
Dim StyleData = worksheet.Cells.GetSubrangeAbsolute(IdxSucursalesServiciosAmortPolizas, 0, IdxSucursalesServiciosAmortPolizas, 12).Style
diff --git a/Ventas/RepVentasUtilidad.aspx b/Ventas/RepVentasUtilidad.aspx
index d21808115..755ce2a34 100644
--- a/Ventas/RepVentasUtilidad.aspx
+++ b/Ventas/RepVentasUtilidad.aspx
@@ -244,7 +244,7 @@
-
+
diff --git a/Ventas/RepVentasUtilidad.aspx.vb b/Ventas/RepVentasUtilidad.aspx.vb
index 04c8477c2..cfd0678b8 100644
--- a/Ventas/RepVentasUtilidad.aspx.vb
+++ b/Ventas/RepVentasUtilidad.aspx.vb
@@ -181,6 +181,9 @@ Partial Class Ventas_RepVentasUtilidad
End If
If Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("SubTotal").ToDecimal = 0 AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
+ If e.Row.DBCampo("FechaVenta").ToDate < txtFechaI.Text.ToDate.FirstDayOfMonth Then
+ e.Row.ToolTip = "Venta con realizada en un periodo anterior"
+ End If
e.Row.CssClass = "danger"
ElseIf Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("CveVenta") <> "" Then
e.Row.Cells(0).BackColor = ColorTranslator.FromHtml("#e9e9e9")
@@ -218,6 +221,7 @@ Partial Class Ventas_RepVentasUtilidad
If e.Row.DBCampo("CveVenta").ToEntero > 0 AndAlso Not CBool(e.Row.DBCampo("TienePago")) Then
e.Row.Cells(15).BackColor = Drawing.Color.LightPink
+ e.Row.Cells(15).ToolTip = "Factura sin pago registrado"
End If
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index 39418049f..bef184d20 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -367,6 +367,9 @@