-- vsta de retención

This commit is contained in:
2023-06-01 20:16:14 -07:00
parent 70218d26f3
commit f31d239caf
2 changed files with 18 additions and 34 deletions

View File

@@ -1149,7 +1149,6 @@ Partial Class Compras_Compras
End Set
End Property
Private Property UUIDSList As List(Of String)
Get
If ViewState("UUIDSList") Is Nothing Then
@@ -1163,8 +1162,6 @@ Partial Class Compras_Compras
ViewState("UUIDSList") = value
End Set
End Property
Private Property NumeroReembolsoOriginal As String
Get
If ViewState("NumeroReembolsoOriginal") Is Nothing Then
@@ -1227,6 +1224,9 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
btnProrateo.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
divIEPSModal.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(303) <> "" Then
btnProrateo2.Visible = True
@@ -2344,7 +2344,7 @@ Partial Class Compras_Compras
If OtrosImpuestos > 0 Or TrasladoIEPS > 0 Then
If UsuarioActual.Empresa.Funcionalidad(713).ToEntero = 1 Then
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
'Si tiene funcionalidad y es Acreedor se muestra modal
If CveTipoProveedor.Contiene(2, 3) Then ' Acreedor
RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
@@ -2416,8 +2416,8 @@ Partial Class Compras_Compras
HdnCompraSaldo.Value = TotalTemp.ToString
CompraSaldo = TotalTemp
LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(3), "")
LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(3), "")
LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
'ASIGNA VALORES ORIGINALES PARA GUARDAR
AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total)
@@ -2626,8 +2626,8 @@ Partial Class Compras_Compras
LblUsuarioCaptura.Text = dr("Usuario").ToString
LitFechCaptura.Text = dr("FechaIng").ToString.ToDate.ToShortDateString
LitFechCaptura.ToolTip = dr("FechaIng").ToString
LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
If dr("TipoFactura").ToString <> "CFDi" Then LblTipoFact.Text = dr("TipoFactura").ToString : divTipoFactura.Visible = True
ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero
ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero
@@ -16286,8 +16286,8 @@ Partial Class Compras_Compras
UpAnticipos.Update()
End If
LblRetIVA.Text = TmpDT.MAX("RetIVAPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetISR.Text = TmpDT.MAX("RetISRPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
LblRetIVA.Text = If(TxtRetIVA.Text.ToDecimal > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
LblRetISR.Text = If(TxtRetISR.Text.ToDecimal > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
'IMPORTES DE RESTRICCION
TxtDocumentoImporteFE.Text = Total.ToString.FormatoNumero(2)
@@ -16641,12 +16641,7 @@ Partial Class Compras_Compras
DdlProyecto.SelectedValueExist("-1")
End If
CargaSubProyecto()
'DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto"))
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DdlSubProyecto_SelectedIndexChanged(Nothing, Nothing)
@@ -16661,7 +16656,6 @@ Partial Class Compras_Compras
If PS("IVA").ToString.ToEntero() <> -1 Then
' DdlIVA.Enabled = False
Else
'DdlIVA.Enabled = If(CveCompra > 0 Or CveFactura > 0 Or OCVinculada, False, True)
End If
End If
@@ -16675,24 +16669,14 @@ Partial Class Compras_Compras
DdlIVA.SelectedValue = "1.08"
End Select
'TxtIVAModal.Text = FormatoNumero(GvRow.DataKey("IVAPorcentaje").ToDouble * 100, 0)
TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 2)
TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 2)
TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 4)
TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 4)
TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 2)
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
'TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0)
'TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0)
TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6)
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6)
TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal.ToString("#,##0.00####")
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").ToDecimal.ToString("#,##0.00####")
LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero
'FUNCIONALIDAD DE SEGUIR AGREGANDO (NO CERRAR MODAL)