This commit is contained in:
2023-12-08 11:56:03 -07:00
39 changed files with 650 additions and 294 deletions

View File

@@ -60,7 +60,7 @@ Partial Class Ventas_CatImpuestosLocales
End Sub
Private Sub CargaCuentasContables()
If UsuarioActual.Empresa.UsaContabilidad OrElse UsuarioActual.Empresa.UsaAC Then
If UsuarioActual.Empresa.TipoContabilidad = 2 OrElse UsuarioActual.Empresa.UsaAC Then
Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
If ObjContabilidad.GetCuentasRecursiva(1, 1) Then
@@ -82,7 +82,7 @@ Partial Class Ventas_CatImpuestosLocales
Protected Sub GvImpuestos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvImpuestos.RowDeleting
Dim ObjVentas As New ClsVentas()
Dim TieneError = False
Dim TieneError As Boolean = False
Dim CveImpuesto As Integer = GvImpuestos.Rows(e.RowIndex).DataKey("CveImpuestoLocal").ToEntero
@@ -155,7 +155,7 @@ Partial Class Ventas_CatImpuestosLocales
Private Sub BtnAgregarImpuesto_Click(sender As Object, e As EventArgs) Handles BtnAgregarImpuesto.Click
Dim ObjVentas As New ClsVentas
Dim Estatus = 0
Dim Estatus As Integer = 0
If CveImpuestoLocal = -1 Then
If ChkEstatus.Checked Then Estatus = 1
@@ -169,11 +169,11 @@ Partial Class Ventas_CatImpuestosLocales
TxtImpuesto.Focus()
Else
If CveImpuestoLocal <> -1 Then
Dim TieneError = False
Dim TieneError As Boolean = False
Dim Impuesto As String = TxtImpuesto.Text.Trim
Dim Porcentaje As Decimal = TxtPorcentaje.Text.ToDecimal
Dim Orden = TxtOrden.Text.ToEntero
Dim TipoImpuesto = DdlTipoImpuesto.SelectedValue.ToEntero
Dim Orden As Integer = TxtOrden.Text.ToEntero
Dim TipoImpuesto As Integer = DdlTipoImpuesto.SelectedValue.ToEntero
If ChkEstatus.Checked Then Estatus = 1
If Not ObjVentas.UpdateImpuestosLocales(CveImpuestoLocal, Impuesto, Porcentaje, Orden, TipoImpuesto, Estatus, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) Then

View File

@@ -101,6 +101,14 @@
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="FechaVenta" HeaderText="Ultima Venta" ItemStyle-Width="80px" DataFormatString="{0:dd/MM/yyyy}">
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="SerieFolioVenta" HeaderText="Serie Folio">
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="EstatusStr" HeaderText="Estatus">
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
@@ -117,13 +125,9 @@
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="SerieFolioVenta" HeaderText="Serie Folio">
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="FechaVenta" HeaderText="Fecha Venta" ItemStyle-Width="80px" DataFormatString="{0:dd/MM/yyyy}">
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px" >
<ItemTemplate>

View File

@@ -9113,8 +9113,7 @@ Partial Class Clientes
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
TmpDT.Columns.Add("Total", GetType(Decimal))
'Para uso del módulo contable
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
TmpDT.Columns.Add("Proyecto", GetType(String))

View File

@@ -38,47 +38,48 @@
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
Fecha Inicio Docto:
</div>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
Fecha Fin Docto:
</div>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
<div class="row">
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
Fecha Inicio Docto:
</div>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
Fecha Fin Docto:
</div>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
@@ -257,7 +258,7 @@
<label class="col-md-2">Total:</label>
<div class="col-md-4 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
</div>
@@ -271,7 +272,8 @@
</div>
<div class="row">
<div class="col-md-12" style="text-align:center;">
<asp:HiddenField ID="HdnCveVenta" runat="server" />
<asp:HiddenField ID="HdnCveVenta" runat="server" />
<asp:HiddenField ID="HdnTotal" runat="server" ClientIDMode="Static" />
<asp:Button ID="BtnPagar" CssClass="btn btn-large btn-success e-big-btn" runat="server" Text="Pagar" />
</div>
</div>
@@ -287,5 +289,31 @@
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
function CalculaTotalPagoContado() {
debugger;
var totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
var totalCredito = ToDouble($get("TxtImporteCredito").value);
var totalDebito = ToDouble($get("TxtImporteDebito").value);
var totalCheque = ToDouble($get("TxtImporteCheque").value);
var totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
var TotalOtrosContado = 0;
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado ;
var totalVenta = ToDouble($get('HdnTotal').value);// - ToDouble($get('HdnTotal').value);
if (total > totalVenta) {
lblCambio.innerHTML = "Cambio:";
//HdnCambioFaltante.value = "1";
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
} else
{
lblCambio.innerHTML = "Faltante:";
HdnCambioFaltante.value = "0";
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
}
$get("TxtImporteContado").value = FormatoNumero(total, 2);
}
</script>
</asp:Content>

View File

@@ -7,9 +7,20 @@ Imports Extensiones
Partial Class Ventas_PVCobranza
Inherits ClsPaginas
Private Property CveCorte As Integer
Get
Return ViewState("CveCorte").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveCorte") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CveCorte = 0
CargaFiltros()
CargaCorteCaja()
End If
End Sub
@@ -18,7 +29,7 @@ Partial Class Ventas_PVCobranza
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
txtFechaI.Text = Now.AddDays(-7).ToShortDateString
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
txtFechaF.Text = Now.ToShortDateString
'DdlCuentaEfectivo.Items.Clear()
@@ -34,19 +45,11 @@ Partial Class Ventas_PVCobranza
'If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon))
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon))
'Else
' DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
' DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
'End If
'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
'Else
' DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", CveMon))
'DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", CveMon))
'End If
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", CveMon))
DtCC.Dispose()
@@ -56,6 +59,28 @@ Partial Class Ventas_PVCobranza
DdlCuentaTarjetaDebito.DataBind()
DdlCuentaCheque.DataBind()
DdlCuentaTransferencia.DataBind()
TxtImporteEfectivo.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteCredito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
End Sub
Private Sub CargaCorteCaja()
Dim DebeCerrarCorte As Boolean = False
'Checar si hay un Turno Abierto
Dim ObjPVenta As New ClsPuntoVenta
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then
CveCorte = ObjPVenta.CveCorte
End If
End If
ObjPVenta.Dispose()
End Sub
@@ -65,21 +90,27 @@ Partial Class Ventas_PVCobranza
Dim FechaI, FechaF As Date
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, FechaI, FechaF) Then
If ObjMovtos.GetCxCDetalle(FechaI, FechaF, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, "-1", "-1", -1, "-1", -1,
"-1", 1, UsuarioActual.CveEmpresa, -1, 1,
TipoDocto:="Rem", FechaCorte:=NowADS.AddDays(1), CveUsuarioConsulta:=UsuarioActual.CveUsuario, AplicaAnticiposPagados:=0) Then
Dim dtt As DataTable = ObjMovtos.DSResultados.Tables(0).FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario})")
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario})")
'si hay ya asignado, solo la mostrará
Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario}")
If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
GvDatos.DataSource = dtt
End If
ObjMovtos.Dispose()
GvDatos.DataBind()
UpL.Update()
TxtImporteEfectivo.Text = ""
TxtImporteCredito.Text = ""
TxtImporteDebito.Text = ""
TxtImporteCheque.Text = ""
TxtImporteTransferencia.Text = ""
TxtImporteOtrosContado.Text = ""
TxtCambio.Text = ""
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
@@ -109,7 +140,9 @@ Partial Class Ventas_PVCobranza
TieneError = True
End If
HdnCveVenta.Value = CveVenta.ToString
TxtImporteEfectivo.Text = GvRow.DataKey("Saldo")
TxtImporteEfectivo.Text = GvRow.DataKey("Saldo").FormatoNumero
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
HdnTotal.Value = GvRow.DataKey("Saldo")
TxtImporteEfectivo.Focus()
LtlNombre.Text = GvRow.DataKey("DescripcionVenta")
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
@@ -164,26 +197,38 @@ Partial Class Ventas_PVCobranza
Dim ObjConta As New ClsContabilidad
Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL())
Dim ObjVentas2 As New ClsVentas(ObjConta.IniciaTransacSQL())
Dim CvePrePoliza As Integer
Dim Fecha As Date = NowADS()
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
Dim Mensaje As String = ""
Dim SaldoPendiente As Decimal = VentaActual.Total
CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 5, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza > 0 Then
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
Mensaje = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, TxtImporteEfectivo.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
If PagoEfectivo > 0 Then
If PagoEfectivo > VentaActual.Total Then
TxtCambio.Text = (VentaActual.Total - PagoEfectivo).FormatoNumero
PagoEfectivo = VentaActual.Total
End If
Mensaje = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
End If
If TxtImporteCredito.Text.ToDecimal > 0 Then
Mensaje = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
SaldoPendiente -= PagoEfectivo
If SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then
Mensaje = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
PagoEfectivo = TxtImporteCredito.Text.ToDecimal
End If
If TxtImporteDebito.Text.ToDecimal > 0 Then
Mensaje = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
SaldoPendiente -= PagoEfectivo
If SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
Mensaje = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
PagoEfectivo = TxtImporteDebito.Text.ToDecimal
End If
If TxtImporteCheque.Text.ToDecimal > 0 Then
Mensaje = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
If SaldoPendiente > 0 AndAlso TxtImporteCheque.Text.ToDecimal > 0 Then
Mensaje = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
End If
Else
@@ -194,7 +239,7 @@ Partial Class Ventas_PVCobranza
PnlContado.Visible = False
ObjConta.Commit()
CargaDatos()
Alert("Pago Registrado correctamente.", TipoMensaje.MsgInformacion)
Alert("Pago Registrado correctamente.<br/><br/> <a href='#' class='Texto'>Imprimir ticket</a>", TipoMensaje.MsgInformacion)
Else
ObjConta.RollBack()
End If
@@ -202,11 +247,11 @@ Partial Class Ventas_PVCobranza
End Sub
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad) As String
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas) As String
Dim Retorno As String = ""
Dim CveIEPago As Integer = 0
Dim ErrorConta As Boolean
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte)
If CveIEPago > 0 Then
Dim Pago As New VentaPago
Pago.ImportePagoVenta = ImportePago
@@ -220,6 +265,11 @@ Partial Class Ventas_PVCobranza
If ErrorConta Then
Retorno = "Error en aplicación de pago"
End If
Dim MetodoPago As Integer = If(Metodo = 13, 1, If(Metodo = 12, 4, If(Metodo = 11, 5, If(Metodo = 3, 2, 3))))
If Not ErrorConta AndAlso Not ObjVentas.AddVta_VentaPago(VentaActual.CveVenta, MetodoPago, ImportePago) Then
Retorno = "Error en aplicación de pago.."
ErrorConta = True
End If
Else
Retorno = "Pago en Bancos no registrado"
ErrorConta = True

View File

@@ -1404,7 +1404,7 @@
<tr>
<th style="width: 50px;">Cantidad </th>
<th>Producto</th>
<th>U.M. </th>
<th style="width:150px">U.M. </th>
<th>Tipo</th>
<th colspan="2">Comandos</th>
</tr>
@@ -1423,7 +1423,7 @@
<td>
<ADS:Dropdownlost runat="server" ID="DdlProductows" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
</td>
<td align="center">
<td align="center" style="width:150px">
<asp:DropDownList ID="ddlUnidad" CssClass="form-control input-sm select2me" runat="server" DataTextField="UnidadMedida" ToolTip="Unidad de Medida" DataValueField="CveUnidadMedida"></asp:DropDownList></td>
<td align="center">
@@ -1440,7 +1440,7 @@
</tr>
</tbody>
</table>
<asp:GridView ID="gvPaqueteDetalle" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
<asp:GridView ID="gvPaqueteDetalle" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="20px">
<ItemTemplate>

View File

@@ -1321,7 +1321,7 @@ Partial Class ProductosyServicios
End If
txtCantidad.Text = ""
DdlProductows.ddl.SelectedIndex = 0
DdlProductows.ddl.SelectedIndex = -1
ddlUnidad.SelectedIndex = 0
ddlTipo.SelectedIndex = 0
End If

View File

@@ -0,0 +1,119 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEntregasEcommerce.aspx.vb" Inherits="Ventas_RepEntregasEcommerce" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dashboard-stat2 {
padding: 1px 2px 15px 10px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="LnkPDF" ToolTip="Descarga PDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExcel" ToolTip="Descarga Excel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Entregas de ecommerce
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" style="">
<div class="titlefiltros caption magindate ">
<div class="row">
<div class="col-md-1">Fecha Inicial</div>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="margin-top: -8px; padding: 5px 0px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1">Fecha Final</div>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="margin-top: -8px; padding: 5px 0px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-2">
<asp:RadioButtonList ID="RBL" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Text="Pendiente" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Entregado" Value="2" ></asp:ListItem>
</asp:RadioButtonList>
</div>
</div>
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="text-right">
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvD.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true"
data-freezerows="1" GridLines="None">
<Columns>
<asp:HyperLinkField DataTextfield="SerieFolio" HeaderText="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:BoundField Datafield="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:BoundField Datafield="PS" HeaderText="Ps" />
<asp:BoundField Datafield="Cantidad" HeaderText="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField Datafield="Hmo" HeaderText="Hmo" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField Datafield="Cul" HeaderText="Cul" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField Datafield="Mex" HeaderText="Mex" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField Datafield="LP" HeaderText="LP" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,139 @@
Imports System.Data
Imports Extensiones
Imports iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms
Partial Class Ventas_RepEntregasEcommerce
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaCombos()
CargaDatos()
End If
End Sub
Private Sub CargaCombos()
txtFechaI.Text = NowADS.AddDays(-3).ToShortDateString
txtFechaF.Text = NowADS.ToShortDateString
End Sub
Private Sub CargaDatos()
Dim FechaI, FechaF As Date
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text.Trim.ToDate Else FechaI = MinFecha
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text.Trim.ToDate Else FechaF = MaxFecha
Dim Obj As New ClsVentas
If Obj.GetEntregasEcommerce(FechaI, FechaF, UsuarioActual.CveEmpresa) Then
GvD.DataSource = Obj.DtResultados
End If
Obj.Dispose()
GvD.DataBind()
UPDatos.Update()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
#Region " I M P R I M I R P D F"
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
Dim EsVisibleColPagoProveedor As Boolean = False
If GvD.Columns(10).Visible Then
EsVisibleColPagoProveedor = True
GvD.Columns(10).Visible = False
End If
GenerarPDFpp("Excel")
End Sub
Protected Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
GenerarPDFpp()
End Sub
Protected Sub LnkPDFSubProyecto_Click(sender As Object, e As EventArgs)
GenerarPDFpp(AgrupadoPorSubProyecto:=True)
End Sub
Protected Sub LnkExcelSubProyecto_Click(sender As Object, e As EventArgs)
Dim EsVisibleColPagoProveedor As Boolean = False
If GvD.Columns(10).Visible Then
EsVisibleColPagoProveedor = True
GvD.Columns(10).Visible = False
End If
GenerarPDFpp("Excel", True)
If EsVisibleColPagoProveedor Then
GvD.Columns(10).Visible = True
End If
End Sub
Private Sub GenerarPDFpp(Optional Formato As String = "PDF", Optional AgrupadoPorSubProyecto As Boolean = False)
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
'OBTENEMOS LOS DATOS
Dim DTpp As DataTable = Nothing
If DTpp.Rows.Count > 0 Then
Dim dr As DataRow = DTpp.Rows(0)
Dim params As New List(Of ReportParameter)
Dim Filtros As New StringBuilder
Filtros.Append("<b>Filtros </b>")
Dim ExistenFechas As Boolean = False
If txtFechaI.Text.Trim.Length > 0 Then
Filtros.Append($" Fecha Inicio: {txtFechaI.Text.Trim}")
ExistenFechas = True
End If
If txtFechaF.Text.Trim.Length > 0 Then
Filtros.Append($" Fecha Fin: {txtFechaF.Text.Trim}")
ExistenFechas = True
End If
If ExistenFechas Then
params.Add(New ReportParameter("AgrupadoPor", Filtros.ToString))
End If
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
' params.Add(New ReportParameter("FechaInicio", FI))
' params.Add(New ReportParameter("FechaFin", FF))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString))
' params.Add(New ReportParameter("AgrupadoPor", $"{Programo} {Proveedor} {Registro} {Responsable} {Clasificacion} {Moneda} {Estatus} {SubProyecto} {FechaIn} {FechaFn}{FVI}{FVF}"))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF("Empresas/Grales/Formatos/RepPagoProveedores.rdlc", DTpp, params, "ReportePagoProveedores", Formato)
Else
Alert("No se tienen registrados movimientos", TipoMensaje.MsgAdvertencia)
End If
End Sub
Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CvePS") = "" Then e.Row.CssClass = "SubTotales"
End If
End Sub
#End Region
End Class

View File

@@ -9,7 +9,7 @@
padding: 0px 5px;
}
.nolineheight {ChkRequiereTecnico
.nolineheight {
line-height: 1;
}

View File

@@ -4754,6 +4754,7 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
Me.CveLineaAdicionalVenta = DbRowVenta("CveLineaAdicional").ToString().ToEntero()
End If
TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString()
'CargaEncabezado
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
@@ -4859,10 +4860,8 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(163) = "1" Then
TrDescripcionVenta.Visible = True
TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString()
End If
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
Case "Egs"
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
@@ -9475,7 +9474,7 @@ Partial Class Ventas
End If
If DivAlmacen.Visible AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Dev") AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 AndAlso ddlAlmacen.SelectedValue.ToEntero() <= 0 Then
Alert("Tiene que seleccionar un almacén para la salida de almacén", TipoMensaje.MsgAdvertencia)
Alert("Seleccione el almacén del cual saldrán los productos.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -19453,8 +19452,6 @@ Partial Class Ventas
End Sub
Protected Sub TxtCodigo_TextChanged(sender As Object, e As System.EventArgs) Handles TxtCodigo.TextChanged
Dim ObjClientes As New ClsClientes()
Dim Nombre As String = "-1"
Dim Codigo As String = "-1"
Dim NombreCorto As String = "-1"
@@ -19465,6 +19462,7 @@ Partial Class Ventas
If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim
If Codigo <> "-1" Then
Dim ObjClientes As New ClsClientes()
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, -1, UsuarioActual.CveEmpresa, TipoCliente:=-1) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not ObjClientes.CveCliente.Contiene(10450, 10460, 10458) Then
@@ -21564,8 +21562,6 @@ Partial Class Ventas
Dim DrProducto As DataRow = Nothing
If TxtCantidad.Text.Trim.ToDouble <= 0 Then TxtCantidad.Text = "1"
Dim SerieL As String = ""
Dim CodigoBarras As String = ""
Dim CvePS As Integer
'LIMPIA "PROPIEDAD"
@@ -21582,7 +21578,7 @@ Partial Class Ventas
If Existencia - ExistenciaActual > 0 Then
If CvePS > 0 Then
DrProducto = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
DrProducto = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrProducto IsNot Nothing Then
HdnCvePS.Value = CvePS.ToString()
TxtCantidad.Text = "1"
@@ -21598,17 +21594,16 @@ Partial Class Ventas
End If
End If
'BUSCA POR CODIGO DE BARRAS
If Not CvePS > 0 Then
CodigoBarras = TxtCodigoBarras.Text.Trim()
DrProducto = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}'")
If Not CvePS > 0 AndAlso TxtCodigoBarras.Text.Trim() <> "" Then
DrProducto = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoBarras.Text.Trim()}'")
If DrProducto IsNot Nothing Then
If DrProducto("Inv_CveMetodoInventario").ToString() = "5" Then 'si es serie
If DrProducto("Inv_CveMetodoInventario").ToString() = "5" OrElse DrProducto("AplicaSerie").ToString = "True" Then 'si es serie
TxtCodigoSerie.Focus()
Exit Sub
Else
CvePS = DrProducto("CvePS").ToString().ToEntero()
CvePS = DrProducto("CvePS").ToString.ToEntero()
HdnCvePS.Value = CvePS.ToString()
End If
Else
@@ -21627,8 +21622,9 @@ Partial Class Ventas
DdlPSIndexChange(CvePS, DdlPS)
If Not TxtCantidad.Text.ToDouble > 0 Then TxtCantidad.Text = "1"
TxtPrecio.Focus()
TxtPrecio.Text = "11"
RegistraScript($"$('#{TxtPrecio.ClientID}').select();")
UpPS.Update()
'LO DE ABAJO YA NO SE USA - ES VIEJO
Exit Sub
@@ -21843,6 +21839,10 @@ Partial Class Ventas
DivTransferencia.Visible = False
End If
TxtImporteContado.Text = TxtTotal.Text
'SI ES MODALIDAD COBRANZA, NO MOSTRAR
If (UsuarioActual.Empresa.Funcionalidad(109) = "1") Then
DivContado.Visible = False
End If
End If
TxtFechaPago.Text = NowADS().ToShortDateString
'SI ES CONTADO EL METODO DE PAGO DEBE SER PUE
@@ -35788,11 +35788,11 @@ Partial Class Ventas
If CveOsDetalle > 0 Then
'MENSAJE PRINCIPAL
Dim MensajeAlertOS As New StringBuilder
MensajeAlertOS.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/><br/>", ObjOrdenServicio.Folio))
'Dim MensajeAlertOS As New StringBuilder
MensajeAlert.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/>", ObjOrdenServicio.Folio))
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
'Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
'Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
Else
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
Errores = True