This commit is contained in:
2024-02-29 12:07:02 -07:00
12 changed files with 58 additions and 34 deletions

View File

@@ -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

View File

@@ -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)))

View File

@@ -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()

View File

@@ -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)

View File

@@ -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
{

View File

@@ -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

View File

@@ -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

View File

@@ -292,9 +292,9 @@
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
DataKeyNames="CveVenta,TipoDocto,Saldo,DescripcionVenta">
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA">
<Columns>
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Atención" DataField="AtencionA" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
@@ -310,14 +310,15 @@
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
<div class="row">
<div class="note note-success">
<b>Nombre:
</b>
&nbsp;<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<div class="row">
<div class="col-md-1"><b>Nombre:</b></div>
<div class="col-md-3">&nbsp;<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<b>
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal>
</b>
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
<div class="col-md-1"><b><asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b></div>
<div class="col-md-1"><b><asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox> </b></div>
<div class="col-md-3" style="text-align:right;"><asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" /></div>
</div>
</div>
</div>
@@ -514,15 +515,7 @@
<asp:RegularExpressionValidator ID="REVCaja" runat="server" ControlToValidate="TxtDineroCaja" Display="None" ErrorMessage="El campo <b>''Dinero''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GprIniciarTruno"></asp:RegularExpressionValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td colspan="1">
<asp:Label runat="server" Text="Descripción:" Font-Bold="true" Width="120px" />
</td>
<td colspan="1">
<asp:TextBox runat="server" ID="TxtDescripcionCaja" TextMode="MultiLine" Width="100%" />
</td>
</tr>
</tr>
<tr>
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>

View File

@@ -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 <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. 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

View File

@@ -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")

View File

@@ -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);

View File

@@ -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