Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1355,7 +1355,7 @@ Partial Class Compras_Compras
|
||||
GvInv.Visible = True
|
||||
CargaProveedor(-1, RFC)
|
||||
|
||||
If Not DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then
|
||||
If TmpDT.MAX("CvePS").ToEntero > 0 Then
|
||||
BtnGuardar.Enabled = False
|
||||
@@ -1449,6 +1449,8 @@ Partial Class Compras_Compras
|
||||
DivEsNoDeducible.Visible = True
|
||||
DivActualizarVincular.Visible = True
|
||||
|
||||
|
||||
|
||||
Else
|
||||
|
||||
ViewState("CveProveedor") = -1
|
||||
@@ -1824,7 +1826,7 @@ Partial Class Compras_Compras
|
||||
DdlTipoCompra.Items.Clear()
|
||||
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11"))
|
||||
|
||||
|
||||
@@ -2708,9 +2710,9 @@ Partial Class Compras_Compras
|
||||
|
||||
TmpDT.Columns.Add("CveContrato", GetType(Integer))
|
||||
TmpDT.Columns.Add("DifPSSat", GetType(Integer))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If Not TmpDT.Columns.Contains("CveContratoDetalle") Then
|
||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
End If
|
||||
@@ -4060,13 +4062,15 @@ Partial Class Compras_Compras
|
||||
' DtNoEncontrados.Dispose()
|
||||
'End If
|
||||
|
||||
'Verifica funcionalidad 702 "Require orden de compra para factura de compra"
|
||||
'Verifica funcionalidad 128 "Require orden de compra para factura de compra"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(128) <> "" Then
|
||||
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
|
||||
If Not CompraEstaVinculadaOC Then
|
||||
Alert("Debe de vincular una orden de compra para registrar la factura")
|
||||
Exit Sub
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then
|
||||
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
|
||||
If Not CompraEstaVinculadaOC Then
|
||||
Alert("Debe de vincular una orden de compra para registrar la factura")
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -5107,7 +5111,7 @@ Partial Class Compras_Compras
|
||||
Row("Obs").ToString, Row("CveOrdenCompraDetalle").ToString.ToEntero, TipoRecepcion, Row("CveContrato").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero,
|
||||
AplicaCostoIndirecto:=Row("AplicaCostoIndirecto").ToString.ToEntero, EstatusAlmacen:=Row("EntregaDirecta").ToString.ToEntero, CvePersonal:=CvePersonal,
|
||||
CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal,
|
||||
RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble,
|
||||
RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble.RoundSQL, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble,
|
||||
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble,
|
||||
IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False),
|
||||
CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CveCultivoCuadroDetalle:=Row("CveCultivoCuadroDetalle").ToString.ToEntero) Then
|
||||
@@ -6769,13 +6773,12 @@ Partial Class Compras_Compras
|
||||
Dim CveSubProyecto69 As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
|
||||
|
||||
If CveSubProyecto69 <= 0 Then
|
||||
Alert("Debe de asignar un sub proyecto o centro de constos", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Debe de asignar un sub proyecto o centro de costos", TipoMensaje.MsgAdvertencia)
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
|
||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
@@ -7298,6 +7301,10 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = importeMovimiento.Abs.RoundSQL()
|
||||
importeMN = importeMovimiento
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
|
||||
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
@@ -7481,7 +7488,9 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = importeMovimiento.Abs.RoundSQL()
|
||||
importeMN = importeMovimiento
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
|
||||
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -7575,7 +7584,9 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = importeMovimiento.Abs.RoundSQL()
|
||||
importeMN = importeMovimiento
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -7671,7 +7682,8 @@ Partial Class Compras_Compras
|
||||
|
||||
importeFluctuacion = importeFluctuacion.Abs.RoundSQL()
|
||||
If importeFluctuacion <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -9033,9 +9045,14 @@ Partial Class Compras_Compras
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
importeFluctuacion = importeFluctuacion.Abs.RoundSQL()
|
||||
If importeFluctuacion <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then
|
||||
Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then
|
||||
ErrorMovtosCxP = 1
|
||||
End If
|
||||
End If
|
||||
@@ -9457,8 +9474,13 @@ Partial Class Compras_Compras
|
||||
importeMN = ImporteMovimiento
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If ImporteMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
|
||||
|
||||
Dim CveSubProyecto64 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto64, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
|
||||
ErrorMovtosCxP = 1
|
||||
Exit For
|
||||
End If
|
||||
@@ -9481,7 +9503,8 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
If ImporteMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
|
||||
Dim CveSubProyecto65 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto65, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then
|
||||
ErrorMovtosCxP = 1
|
||||
Exit For
|
||||
End If
|
||||
@@ -17839,7 +17862,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2 Then
|
||||
DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto"))
|
||||
Else
|
||||
Else
|
||||
DdlProyecto.SelectedValueExist("-1")
|
||||
End If
|
||||
|
||||
@@ -18043,14 +18066,12 @@ Partial Class Compras_Compras
|
||||
|
||||
UpIVA.Update()
|
||||
|
||||
If DdlClasificacion.SelectedIndex = 0 Then
|
||||
If PS("CveClasificacion").ToString IsNot Nothing Then
|
||||
DdlClasificacion.SelectedValueExist(PS("CveClasificacion").ToString)
|
||||
Else
|
||||
Alert("El Productos/Servicio no tiene asignada una Clasificación.")
|
||||
End If
|
||||
|
||||
If PS("CveClasificacion").ToString IsNot Nothing Then
|
||||
DdlClasificacion.SelectedValueExist(PS("CveClasificacion").ToString)
|
||||
Else
|
||||
Alert("El Productos/Servicio no tiene asignada una Clasificación.")
|
||||
End If
|
||||
|
||||
UPPUM.Update()
|
||||
UpPSS.Update()
|
||||
End If
|
||||
@@ -19148,6 +19169,7 @@ Partial Class Compras_Compras
|
||||
CargaAnticipos(CveProveedor, If(ChkNCInv.Checked, "NC", "-1"))
|
||||
UpAnticipos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False)
|
||||
|
||||
Dim SaldoAnticipo = 0.0
|
||||
@@ -20198,7 +20220,7 @@ Partial Class Compras_Compras
|
||||
Dim drInv As DataRow = DtInvOC.FiltroPrimero("")
|
||||
If drInv IsNot Nothing Then 'sino existe no hay problema, porque puede ser le producto un servicio
|
||||
DrInvOCDiferencias("TipoCambioAjuste") = drInv("TipoCambioAjuste").ToString.ToDecimal
|
||||
DrInvOCDiferencias("Diferencia") = ((gvr.FCTextBox("TxtPU").Text.ToDecimal * drInv("TipoCambioAjuste").ToString.ToDecimal) - drInv("PU").ToString.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal 'diferencia * drInv("TipoCambioAjuste").ToString.ToDecimal '
|
||||
DrInvOCDiferencias("Diferencia") = ((gvr.FCTextBox("TxtPU").Text.ToDecimal * drInv("TipoCambioAjuste").ToString.ToDecimal) - drInv("PUOriginal").ToString.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal 'diferencia * drInv("TipoCambioAjuste").ToString.ToDecimal '
|
||||
DrInvOCDiferencias("CveAlmacen") = drInv("CveAlmacen").ToString.ToEntero
|
||||
DrInvOCDiferencias("CveMovimiento") = drInv("CveMovimiento").ToString.ToEntero
|
||||
DrInvOCDiferencias("ConceptoSalida") = drInv("ConceptoSalida").ToString.ToEntero
|
||||
@@ -20306,20 +20328,13 @@ Partial Class Compras_Compras
|
||||
TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal
|
||||
|
||||
IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
|
||||
CveCuentaAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
|
||||
|
||||
Dim CveClasificacionCostoOC = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero
|
||||
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
|
||||
'' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
|
||||
|
||||
|
||||
Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
|
||||
|
||||
|
||||
|
||||
If DiferenciaInvOC.RoundAD() <> 0 Then
|
||||
|
||||
|
||||
If DiferenciaInvOC.RoundSQL() <> 0 Then
|
||||
|
||||
If CveSubProyecto <= 0 Then
|
||||
Alert("Debe de asignar un sub proyecto o centro de constos.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -204,6 +204,8 @@
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a la fecha actual" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -382,6 +382,67 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
#Region " BTN GUARDAR "
|
||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ValFechaDocumento As Boolean = False
|
||||
Dim FoliosFechasValFechaDocumento As New StringBuilder
|
||||
|
||||
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago: <br/>")
|
||||
|
||||
For Each gvRowVal As GridViewRow In GvCxP.Rows
|
||||
|
||||
If gvRowVal.FCCheckBox("Chk").Checked Then
|
||||
|
||||
|
||||
Dim FechaFactura As Date = gvRowVal.DataKey("FechaCompra").ToDate
|
||||
|
||||
|
||||
Dim FechaDocumento As Date
|
||||
|
||||
|
||||
If DDlCheques.SelectedValue.ToEntero = -1 Then
|
||||
FechaDocumento = TxtFechaDocumento.Text.ToDate
|
||||
Else
|
||||
FechaDocumento = TxtFechaPrePoliza.Text.ToDate
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim AnioFactura As Integer = FechaFactura.Year
|
||||
Dim MesFactura As Integer = FechaFactura.Month
|
||||
|
||||
|
||||
Dim AnioDocumento As Integer = FechaDocumento.Year
|
||||
Dim MesDocumento As Integer = FechaDocumento.Month
|
||||
|
||||
|
||||
If AnioFactura > AnioDocumento Then
|
||||
|
||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
ValFechaDocumento = True
|
||||
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
|
||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
ValFechaDocumento = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'rmf. codigo temporal
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
ValFechaDocumento = False
|
||||
End If
|
||||
|
||||
If ValFechaDocumento Then
|
||||
Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If HdnCheque.Value.ToEntero > 0 And ChkChequeExcedente.Checked And TxtImporte.Text.ToDecimal = 0 Then
|
||||
Alert("El importe del cheque excedente debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -2005,5 +2066,9 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
|
||||
Calendario.EndDate = DateTime.Now
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -216,10 +216,20 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-Width="125px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal>
|
||||
<%-- <table>
|
||||
<tr>
|
||||
<td><asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0}", Eval("Total", "{0:N2}")) %>'></asp:Literal></td>
|
||||
<td><asp:Literal ID="LtlAbre" runat="server" Text='<%# String.Format("{0}", Eval("Abreviatura")) %>'></asp:Literal></td>
|
||||
</tr>
|
||||
</table>--%>
|
||||
<%--<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal>--%>
|
||||
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0}", Eval("Total", "{0:N2}")) %>'></asp:Literal>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Abreviatura" Visible="true" HeaderText="" ItemStyle-Width="30px" />
|
||||
<asp:BoundField DataField="CantidadOC" Visible="false" HeaderText="# OC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
|
||||
<asp:TemplateField HeaderText="XML">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -719,9 +719,15 @@ Partial Class Compras_eFacturas
|
||||
If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim
|
||||
If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True
|
||||
'If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True
|
||||
'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False
|
||||
'If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(12).Visible = True : GvD.Columns(13).Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(11).Visible = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(6).Visible = True
|
||||
|
||||
|
||||
CargaGvBitacora()
|
||||
CargaDatos()
|
||||
End If
|
||||
@@ -913,6 +919,11 @@ Partial Class Compras_eFacturas
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.Cells(4).Attributes.Add("data-tipodato", "numeric")
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FindControl("lnkRegenerarPDF").Visible = True ' (UsuarioActual.CveRol = 1)
|
||||
'e.Row.FindControl("lnkDownPdf").Visible = (UsuarioActual.CveRol = 1)
|
||||
@@ -937,6 +948,13 @@ Partial Class Compras_eFacturas
|
||||
|
||||
e.Row.Cells(2).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString)
|
||||
|
||||
|
||||
'e.Row.Cells(4).Attributes.Add("data-order", Convert.ToInt64(e.Row.DBCampo("Total").ToDecimal).ToString.PadLeft(10, "0"c))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML"))) Then
|
||||
e.Row.FCLiteral("LtlXML").Text = String.Format("<a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?RFC={0}&File={1}"">Ver</a>", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML")))
|
||||
If e.Row.DBCampo("TipoComprobante") = "P" Then
|
||||
|
||||
Reference in New Issue
Block a user