Compilacion correciones

This commit is contained in:
rakcsle
2023-08-24 11:23:50 -07:00
parent d094d993a2
commit e36f1786ed
23 changed files with 115 additions and 114 deletions

View File

@@ -306,7 +306,7 @@ Partial Class OC_CotizacionEnLinea
End If
For Each dr As GridViewRow In GvD.Rows
If Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString) Then
If Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString) Then
TieneError = True
Exit For
End If
@@ -366,12 +366,12 @@ Partial Class OC_CotizacionEnLinea
If objCotizacion.GetOC(CveOrdenCompra, CveEmpresa) Then
Dim Folio = "", Descripcion = "", Justificacion = "", Estatus = "", Empresa = "", FechaEstimadaEntrega = ""
Folio = objCotizacion.Folio
Folio = objCotizacion.Folio.ToString
Descripcion = objCotizacion.Descripcion
Justificacion = objCotizacion.Justificacion
Estatus = objCotizacion.Estatus
Empresa = objCotizacion.Empresa
FechaEstimadaEntrega = objCotizacion.FechaEstimadaEntrega
FechaEstimadaEntrega = objCotizacion.FechaEstimadaEntrega.ToString("dd/MM/yyyy")
If objCotizacion.GetCotizaciones(-1, CveCotizacion) Then
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")

View File

@@ -234,7 +234,7 @@ Partial Class OC_CotizacionEnvio
'Agrega CveCotizacion a la lista
OrdenCotizacion.Add(objCotizacion.CveCotizacion)
For Each RowCD As DataRow In objCotizacion.DtResultados.Rows
If Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, RowCD("CvePS").ToString.ToEntero, -1, RowCD("Cantidad").ToString.ToDouble, RowCD("CveUnidadMedida").ToString.ToEntero, 0, "-1", "", RowCD("CveOrdenCompraDetalle").ToString.ToEntero) Then TieneError = True : Exit For
If Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, RowCD("CvePS").ToString.ToEntero, -1, RowCD("Cantidad").ToString.ToDecimal, RowCD("CveUnidadMedida").ToString.ToEntero, 0, "-1", "", RowCD("CveOrdenCompraDetalle").ToString.ToEntero) Then TieneError = True : Exit For
Next
'If TieneError = False Then

View File

@@ -1,4 +1,5 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports System.IO
@@ -507,7 +508,7 @@ Partial Class OC_OC
If ViewState("MonedaTexto") Is Nothing Then
Return ""
Else
Return ViewState("MonedaTexto").ToString.ToEntero
Return ViewState("MonedaTexto").ToString
End If
End Get
Set(value As String)
@@ -1402,7 +1403,7 @@ Partial Class OC_OC
DdlVendedor.SelectedValueExist(objOC.CveVendedor.ToString)
If DdlVendedor.SelectedValue <> objOC.CveVendedor.ToString Then
DdlVendedor.Items.Insert(1, New ListItem(GlobalDTVendedores(UsuarioActual.CveEmpresa, False).FiltroPrimeroValor("Vendedor", $"CveVendedor = {objOC.CveVendedor}"), objOC.CveVendedor.ToString))
DdlVendedor.Items.Insert(1, New ListItem(GlobalDTVendedores(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("Vendedor", $"CveVendedor = {objOC.CveVendedor}"), objOC.CveVendedor.ToString))
End If
End If
@@ -1427,9 +1428,9 @@ Partial Class OC_OC
Select Case objOC.PorcentajeIVA.ToString.ToDecimal
Case 0
DdlIVA.SelectedValue = "1"
Case 0.16
Case 0.16D
DdlIVA.SelectedValue = "1.16"
Case 0.08
Case 0.08D
DdlIVA.SelectedValue = "1.08"
End Select
'If objOC.PorcentajeIVA.ToString.ToDecimal = 0 Then DdlIVA.SelectedValue = "1" Else DdlIVA.SelectedValue = "1.16"
@@ -2273,7 +2274,7 @@ Partial Class OC_OC
If drProv IsNot Nothing Then
If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
RetISR = 0.0125
RetISR = 0.0125D
End If
End If
End If
@@ -3342,7 +3343,7 @@ Partial Class OC_OC
If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
PorcentajeIVA:=PorIVA.ToDecimal, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal,
CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim) Then
@@ -4059,7 +4060,7 @@ Partial Class OC_OC
Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
If drProv IsNot Nothing Then
If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
RetISR = 0.0125
RetISR = 0.0125D
End If
End If
End If
@@ -4594,7 +4595,7 @@ Partial Class OC_OC
Filtro.Clear()
If DtPresupuestosTemp.Rows.Count > 0 Then
disponible = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year)
disponible = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year).ToDecimal
If disponible > 0 AndAlso disponible > Total Then
'Alert("Si hay dinero: ")
@@ -5593,15 +5594,15 @@ Partial Class OC_OC
Dim PorcentajeIVA As Decimal = 0D
If DrPS("IVA").ToString().Contiene("-1", "") Then
PorcentajeIVA = Row("IVAPorcentaje")
PorcentajeIVA = Row("IVAPorcentaje").ToString.ToDecimal
Else
PorcentajeIVA = DrPS("IVA")
PorcentajeIVA = DrPS("IVA").ToString.ToDecimal
End If
Dim ImporteIEPS As Decimal = (TotalCalculableImpuestos * PorcentajeIEPS).RoundSQL(2)
Dim ImporteIVA As Decimal = (TotalCalculableImpuestosIVA * PorcentajeIVA).RoundSQL(2)
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, "", UsuarioActual.CveUsuario) Then
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, 0, "", UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If
@@ -7297,13 +7298,13 @@ Partial Class OC_OC
End Sub
Private Sub CalculaGenerales()
Dim Subtotal As Decimal = DtDetalle.SUM("Total", "Total > 0") + DtDetalle.SUM("Descuento")
Dim Descuento As Decimal = DtDetalle.SUM("Descuento")
Dim SubTotalIEPSIVA As Decimal = DtDetalle.SUM("IEPSPSIVA")
Dim IVA As Decimal = DtDetalle.SUM("IVA") + SubTotalIEPSIVA
Dim SubTotalIEPS As Decimal = DtDetalle.SUM("IEPSPS")
Dim SubTotalRetIVA As Decimal = DtDetalle.SUM("RetIVA")
Dim SubTotalRetISR As Decimal = DtDetalle.SUM("RetISR")
Dim Subtotal As Decimal = DtDetalle.SUMD("Total", "Total > 0") + DtDetalle.SUMD("Descuento")
Dim Descuento As Decimal = DtDetalle.SUMD("Descuento")
Dim SubTotalIEPSIVA As Decimal = DtDetalle.SUMD("IEPSPSIVA")
Dim IVA As Decimal = DtDetalle.SUMD("IVA") + SubTotalIEPSIVA
Dim SubTotalIEPS As Decimal = DtDetalle.SUMD("IEPSPS")
Dim SubTotalRetIVA As Decimal = DtDetalle.SUMD("RetIVA")
Dim SubTotalRetISR As Decimal = DtDetalle.SUMD("RetISR")
'SUBTOTAL
LblSubTotal.Text = (Subtotal).FormatoNumero
@@ -7513,7 +7514,7 @@ Partial Class OC_OC
TxtRetIVA.Text = TxtRetIVA.Text.FormatoNumero
HdnRetIVA.Value = TxtRetIVA.Text
Dim Porcentaje As Decimal = TxtRetIVA.Text.ToDecimal / DtDetalle.SUM("Total")
Dim Porcentaje As Decimal = TxtRetIVA.Text.ToDecimal / DtDetalle.SUMD("Total")
Dim LastDr As DataRow = Nothing
For Each Dr As DataRow In DtDetalle.Rows
'Dr("RetIVA") = (Math.Truncate((Dr("Total").ToString.ToDecimal * Porcentaje) * 100)) / 100
@@ -7930,7 +7931,7 @@ Partial Class OC_OC
'cantidad, Producto, Precio Unitario, Fecha Entrega, Observación
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows
Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)()
Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero()
Where row.RowType = DataControlRowType.DataRow
Select New With
@@ -8028,7 +8029,7 @@ Partial Class OC_OC
Try
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows
Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)()
Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero()
Where row.RowType = DataControlRowType.DataRow
Select New With
@@ -8129,12 +8130,12 @@ Partial Class OC_OC
PU = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * TCAjuste
ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI228").ToDecimal
Importe176 = Importe228 + Importe229
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe228, -Importe228, 228, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe229, -Importe229, 229, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe228, -Importe228, 228, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe229, -Importe229, 229, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
ErrorPrepoliza = True
Exit For
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Importe176, Importe176, 176, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe176, Importe176, 176, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
ErrorPrepoliza = True
Exit For
Else
@@ -8412,7 +8413,7 @@ Partial Class OC_OC
PorletIEAnticipo.Visible = True
GvAnticpos.DataSource = objbancos.DtResultados
ImporteAnticipos = objbancos.DtResultados.SUM("Importe")
ImporteAnticipos = objbancos.DtResultados.SUMD("Importe")
End If
@@ -8536,7 +8537,7 @@ Partial Class OC_OC
Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero)
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
AddPS(Cantidad, CvePS, PS, "", PrecioUnitario, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UM, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, LblCodigo.Text,
AddPS(Cantidad.ToString, CvePS, PS, "", PrecioUnitario, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UM, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, LblCodigo.Text,
CveActivoFijo, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer, IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero,
DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR)
@@ -8635,7 +8636,7 @@ Partial Class OC_OC
Dim PS As String = GvRow.DataKey("PS")
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
Dim TotalPS As Decimal = GvRow.FCTextBox("TxtImporte").Text.ToDecimal
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida")
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString
Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
@@ -8661,7 +8662,7 @@ Partial Class OC_OC
If Cantidad > 0 Then
AddPS(Cantidad, CvePS, PS, PS, PU, 0, TotalPS,
AddPS(Cantidad.ToString, CvePS, PS, PS, PU, 0, TotalPS,
CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UMAbreviatura, Clasificacion, CveProyecto, Proyecto,
CveSubProyecto, SubProyecto, Codigo, -1, 0, -1, -1, IdCuentaPorEjercer,
IdCuentaComprometido, -1, -1, -1, -1,

View File

@@ -30,7 +30,7 @@ Partial Class RegOp
Master.EsPopup = True
If Request("p") IsNot Nothing Then
If Decripta(Request("p")) Then
If Decripta(Request("p")).Length > 0 Then
Dim Par As Hashtable = ClsPaginas.UrlParametros
Select Case Par("OP").ToString

View File

@@ -260,7 +260,7 @@ Partial Class RepCotizaciones
'Ingresar los detalles
For Each RowD As DataRow In DtCotizacionesDetalle.FiltraParametros("CveCotizacion = " + CveCotizacion.ToString).Rows
If Not objCotizacion.AddOrdenCompraDetalle(CveOrdenCompra, RowD("Cantidad").ToString.ToDouble, RowD("CveUnidadMedida").ToString.ToEntero, RowD("CvePS").ToString.ToEntero, 0, -1, If(Not IsDBNull(Row("CveActivoFijo")), Row("CveActivoFijo").ToString.ToEntero, -1), Row("Observacion").ToString, UsuarioActual.CveUsuario) Then
If Not objCotizacion.AddOrdenCompraDetalle(CveOrdenCompra, RowD("Cantidad").ToString.ToDecimal, RowD("CveUnidadMedida").ToString.ToEntero, RowD("CvePS").ToString.ToEntero, 0, -1, If(Not IsDBNull(Row("CveActivoFijo")), Row("CveActivoFijo").ToString.ToEntero, -1), Row("Observacion").ToString, UsuarioActual.CveUsuario) Then
HuboError = True
End If
Next