diff --git a/Acumuladores/RepRecolecciones.aspx.vb b/Acumuladores/RepRecolecciones.aspx.vb index a54114ae5..0fd8d43d1 100644 --- a/Acumuladores/RepRecolecciones.aspx.vb +++ b/Acumuladores/RepRecolecciones.aspx.vb @@ -220,9 +220,9 @@ Partial Class Acumuladores_RepRecolecciones Dim ErrorMovInv As Boolean = False Dim Fecha As DateTime = NowADS() Dim Concepto As String = "Traspaso Recolección" - Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 26, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveEntregaAlmacen:=CveEntregaAlmacen) + Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 45, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados") Dim FolioSalida As Integer = ObjInventario.Folio - Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida, CveEntregaAlmacen:=CveEntregaAlmacen) + Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 42, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados") Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=HdnPSRecoleccion.Value.ToEntero).FiltroPrimeroValor("CveUnidadMedida", "").ToEntero If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, HdnCantidadRecoleccion.Value.ToDecimal, CveUM, HdnPSRecoleccion.Value.ToEntero, 0) Then ErrorMovInv = True diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index f5e4ccba6..fd52292fd 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -172,7 +172,7 @@ Partial Class Bancos_RepCortes DtCortesVentas = Vent.DtResultados divDetalle.Visible = True End If - If DtCortesVentasResumen.Rows.Count > 0 Or DtCortesVentas.Rows.Count > 0 Then + If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then HplDownPDF.Visible = True HplDownEXCEL.Visible = True HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}&CVESUBPROYECTO={2}", CveCorte, "PDF", DdlSubProyectos.SelectedValue.ToEntero))) diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 531d8780a..7d7b7887c 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -497,6 +497,7 @@ Partial Class Contabilidad2_CatCuentas Exit Sub End If Else + Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError) TieneError = True ObjConta.RollBack() ObjConta.Dispose() diff --git a/Inventarios/CartaPorteManual.aspx.vb b/Inventarios/CartaPorteManual.aspx.vb index 784e26323..71f333a2a 100644 --- a/Inventarios/CartaPorteManual.aspx.vb +++ b/Inventarios/CartaPorteManual.aspx.vb @@ -781,7 +781,7 @@ Partial Class Inventarios_CartaPorteManual Exit Sub End If - If ObjTimbres.Timbrar() Then + If ObjTimbres.Timbrar(4) Then Try PdfFactura(ObjTimbres.ObjFactura) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 85ebb9a3a..9285ca71e 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -2519,7 +2519,14 @@ public partial class Nomina_Nomina2 : ClsPaginas if (dconr != null) { CveConcepto = dconr["CveConcepto"].ToString(); - dtxz.Columns[i].ColumnName = CveConcepto; + if (dtxz.Columns.Contains(CveConcepto)) + { + stringError = string.Format("Ocurrio un Error al procesar el excel código duplicado '{0}'({1}).", conceptocodigo, i); + } + else + { + dtxz.Columns[i].ColumnName = CveConcepto; + } } else { diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index ac79814f3..453c99c5d 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -3037,16 +3037,16 @@ Partial Class OS_OrdenesServicios Select Case DdlTipoVenta.SelectedValue.ToEntero - Case 1, 2 + Case 1, 2 ' *Fuera de liena *pago directo Opcion = 1 Exit Select Case 3 ' por el momento ya no se usa Opcion = 2 Exit Select - Case 5 + Case 5 ' consignacion uso Opcion = 3 Exit Select - Case 6 + Case 6 ' a vista uso de material Opcion = 4 Exit Select Case Else diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb index 0222be5d3..de07ebba7 100644 --- a/Ventas/ActualizarPrecios.aspx.vb +++ b/Ventas/ActualizarPrecios.aspx.vb @@ -425,7 +425,7 @@ Partial Class Ventas_ActualizarPrecios .Precio = row.FCTextBox("TxtPrecio").Text.ToDecimal() }).QueryToDataTable(True) If DtExcel.Rows.Count < 1 Then - Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia) + Alert("No hay resultados en la busqueda.", TipoMensaje.MsgAdvertencia) Exit Sub End If diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index 820691846..bc89fc143 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -292,9 +292,9 @@ + DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA"> - + @@ -310,14 +310,15 @@
- Nombre: - -           +
+
Nombre:
+
         
+ - - - - +
+
+
+
@@ -514,15 +515,7 @@ - - - - - - - - - +     diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index b07564e1a..2da8d426b 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -93,7 +93,7 @@ Partial Class Ventas_PVCobranza If ObjPVenta.DtResultados.Rows.Count > 0 Then CveCorte = ObjPVenta.CveCorte Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5) - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then + If FechaICorte < NowADS().Date Then DebeCerrarCorte = True LblMotivoBloqueo.Text = $"Existe un corte del día {FechaICorte.ToString("dd/MM/yyyy")}. Favor de cerrarlo para iniciar un nuevo corte." Else @@ -244,7 +244,7 @@ Partial Class Ventas_PVCobranza TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero HdnTotal.Value = GvRow.DataKey("Saldo") TxtImporteEfectivo.Focus() - LtlNombre.Text = GvRow.DataKey("DescripcionVenta") + LtlNombre.Text = GvRow.DataKey("AtencionA") LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero Catch ex As Exception TieneError = True @@ -340,6 +340,10 @@ Partial Class Ventas_PVCobranza PagoEfectivo = TxtImporteCheque.Text.ToDecimal End If + If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then + MsgError = "Error al aplicar el corte" + End If + Else MsgError = "Error al registrar prepólizas" End If @@ -503,7 +507,7 @@ Partial Class Ventas_PVCobranza Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click Dim ObjPVenta As New ClsPuntoVenta - ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa) + ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, "", UsuarioActual.CveEmpresa) CveCorte = ObjPVenta.CveCorte LblTurno.Text = NowADS().ToShortDateString UpTurno.Visible = True @@ -561,4 +565,15 @@ Partial Class Ventas_PVCobranza End If End Sub + + Protected Sub LnkLiberar_Click(sender As Object, e As EventArgs) + Dim ObjVentas As New ClsVentas + + If ObjVentas.UpdateAsignaVentaCobranza(HdnCveVenta.Value.ToEntero, -1, -1, -1, "", Now) Then + PnlContado.Visible = False + HdnCveVenta.Value = "" + CargaDatos() + End If + ObjVentas.Dispose() + End Sub End Class diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index b4747a7da..4338b5057 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -788,7 +788,7 @@ Partial Class Ventas_RepProductosServiciosDetalle Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) If File.Exists(Archivo) Then archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf") - If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa = 119 Then + If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa.Contiene(119, 141, 152, 159, 160, 161, 162, 166) Then Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) If File.Exists(Archivo) Then archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml") diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 1dcf43f65..25bdaabd5 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -9840,7 +9840,7 @@ console.log("evento descuento"); if ($get("TxtPorPS").value != "") { let PorcentajeDescuento = parseFloat($get("TxtPorPS").value); - if (PorcentajeDescuento < 0 || PorcentajeDescuento > 99) { + if (PorcentajeDescuento < 0 || PorcentajeDescuento > 100) { alert("No se puede aplicar ese porcentaje de descuento"); $get("TxtPorPS").value = "0"; recalcularUtilidad(0); diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e05c849bc..07b0c9773 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2695,6 +2695,7 @@ Partial Class Ventas If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 Then ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714) + RBLPago.SelectedValue = "2" CargaCliente(CveCliente) End If End If @@ -12954,6 +12955,13 @@ Partial Class Ventas 'si el codigo objeto impuesto es 02 y no tiene desglose de impuestos por el descuento, debe asignar el valor 04 - Si objeto de impuesto y no causa impuesto If concepto.Impuestos.Count = 0 AndAlso concepto.ObjetoImpuesto = "02" AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(2) = 0.00D Then concepto.ObjetoImpuesto = "04" + 'se ajusta a un centavo, para que se pueda emitir con un centavo. + If UsuarioActual.CveEmpresa = 140 Then + concepto.ObjetoImpuesto = "02" + concepto.Descuento = concepto.Descuento - 0.01D + Obj.SubTotal = Obj.SubTotal + 0.01D + Obj.Total = Obj.Total + 0.01D + End If End If Timbre.Conceptos.Add(concepto) @@ -37319,7 +37327,7 @@ Partial Class Ventas If HdnDescPS.Value.ToEntero() > 0 Then Dim RowUpdate As DataRow = TmpDT.Select($"Consec = {HdnConsecPS.Value}").FirstOrDefault() If RowUpdate IsNot Nothing Then - If HdnDescPS.Value.ToDecimal().RoundSQL(2) < RowUpdate("Total").ToString().ToDecimal() Then + If HdnDescPS.Value.ToDecimal().RoundSQL(2) <= RowUpdate("Total").ToString().ToDecimal() Then RowUpdate("Descuento") = HdnDescPS.Value.ToDecimal().RoundSQL(2) Dim TotalCalculableImpuestos = (RowUpdate("Cantidad").ToString().ToDecimal * RowUpdate("PU").ToString().ToDecimal) - RowUpdate("Descuento").ToString().ToDecimal() @@ -37332,7 +37340,7 @@ Partial Class Ventas CalculaTotalesVenta() RegistraScript("$('#ModalDescPS').modal('hide');") Else - Alert("El descuento no puede ser mayor o igual al total.", TipoMensaje.MsgAdvertencia) + Alert("El descuento no puede ser mayor al total.", TipoMensaje.MsgAdvertencia) End If End If