Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -31,14 +31,16 @@
|
||||
<asp:Content ID="Content7" 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="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption" style="margin-top: -8px;">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Estatus:
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="height: 32px;">
|
||||
<label class="col-md-1">Estatus: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList AppendDataBoundItems="true" ID="DdlEstatus" runat="server" Width="200px" DataTextField="Nombre" DataValueField="CveDispositivosGrupos" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Value="-1" Text="Todos"></asp:ListItem>
|
||||
<asp:ListItem Value="0" Text="Solicitada"></asp:ListItem>
|
||||
@@ -46,16 +48,51 @@
|
||||
<asp:ListItem Value="2" Text="Aplicada"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Rechazada"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Cliente:
|
||||
|
||||
</div>
|
||||
<label class="col-md-1">Cliente: </label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClienteFiltro" Width="200px" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</li>
|
||||
<li>Vendedor:
|
||||
</div>
|
||||
<label class="col-md-1">Vendedor: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVendedorFiltro" CssClass="form-control marginFixRow select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="200px">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-2" style="min-width: 115px">
|
||||
<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: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="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-2" style="min-width: 115px">
|
||||
<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: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="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,15 +104,20 @@
|
||||
EmptyDataText="No se encontraron autorizaciones" ToolTip=""
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo " ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTipo" Text='<%# Eval("TipoDocumento") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="15%" />
|
||||
<asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="10%" HeaderText="Limite Credito" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="10%" HeaderText="Limite Crédito" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Saldo" ItemStyle-Width="10%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="Dias Vencidos" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="D.Venc" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||
<asp:HyperLinkField DataTextField="FacturaAplicada" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
Imports Extensiones
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_CatAutorizacionLimites
|
||||
Inherits ClsPaginas
|
||||
@@ -24,6 +23,8 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
#End Region
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
@@ -63,8 +64,12 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim CveCliente As Integer = -1
|
||||
If DdlClienteFiltro.SelectedValue.ToEntero() <= 0 Then
|
||||
CveCliente = -1
|
||||
Else
|
||||
Dim CveCliente As Integer = -1
|
||||
CveCliente = DdlClienteFiltro.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
Dim FechaI, FechaF As Date
|
||||
@@ -153,6 +158,12 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
If e.Row.DBCampo("CveEstatus") = "0" Then
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-secondary"
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
e.Row.FCLinkButton("LnkRechazar").Visible = True
|
||||
ElseIf e.Row.DBCampo("CveEstatus") = "1" Then
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success"
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkRechazar").Visible = True
|
||||
ElseIf e.Row.DBCampo("CveEstatus") = "2" Then
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-primary"
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkRechazar").Visible = False
|
||||
@@ -175,7 +186,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
' e.Row.Cells(1).Text = "Inactivo"
|
||||
' e.Row.Cells(1).ForeColor = Drawing.Color.Red
|
||||
' e.Row.Cells(1).Font.Bold = True
|
||||
'End If
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -192,7 +203,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
Dim Importe = gvRow.DataKey("Importe").ToDecimal()
|
||||
Dim CveEstatusAutorizacion As Integer = 1
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.AutorizacionLimitesUpdate(CveAutorizacion, CveCliente, CveVendedor, Importe, CveEstatusAutorizacion) Then
|
||||
Alert("El límite de crédito fue autorizado.")
|
||||
End If
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Ventas - Clientes" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Clientes.aspx.vb" Inherits="Clientes" %>
|
||||
<%@ Page Title="Ventas - Clientes" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Clientes.aspx.vb" Inherits="Clientes" ValidateRequest="false" %>
|
||||
|
||||
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
|
||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||
|
||||
@@ -1891,12 +1891,89 @@
|
||||
|
||||
<asp:Button ID="btnShow" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||
<asp:Button ID="btnClose" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" Text="Cancelar" />
|
||||
<asp:Button ID="btnShowBloqueoCorte" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||
|
||||
<!-- ModalPopupExtender -->
|
||||
<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="PanelIniciarTurno" TargetControlID="btnShow"
|
||||
CancelControlID="btnClose" BackgroundCssClass="modalBackground">
|
||||
</cc1:ModalPopupExtender>
|
||||
|
||||
<cc1:ModalPopupExtender ID="MPEBloqueo" runat="server" PopupControlID="PanelBloqueoCorte" TargetControlID="btnShowBloqueoCorte" BackgroundCssClass="modalBackground">
|
||||
</cc1:ModalPopupExtender>
|
||||
|
||||
<asp:Panel ID="PanelBloqueoCorte" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
<table border="0" width="650px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
<tr style="background-color: #3598dc; color: #FFFFFF; font-size: 14px">
|
||||
<td>Pantalla Bloqueada </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div id="DivAdvertenciaBloqueo" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
<asp:Literal ID="LblMotivoBloqueo" runat="server" Text=""></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1;">Estado de caja</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label ID="LblEfectivoBloqueo" CssClass="form-control" runat="server"></asp:Label>
|
||||
<label for="<%= LblEfectivoBloqueo.ClientID.ToString()%>">Efectivo Esperado:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEfectivoCajaBloqueo" CssClass="form-control" runat="server" onkeyup="javascript:this.value=Comma(this.value);" />
|
||||
<asp:RegularExpressionValidator ID="REVEfectivoCajaBloqueo" runat="server" ControlToValidate="TxtEfectivoCajaBloqueo" 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="GprBloqueo"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender25" runat="server" HighlightCssClass="vco" TargetControlID="REVEfectivoCajaBloqueo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtEfectivoEnCaja.ClientID.ToString()%>">Efectivo en Caja:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="LblDiferenciaCajaBloqueo" CssClass="form-control" runat="server" Enabled="false" />
|
||||
<label for="<%= LblDiferenciaCajaBloqueo.ClientID.ToString()%>">Diferencia:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:Button ID="BtnCerrarBloqueo" runat="server" CssClass="btn btn-danger" Text="Cerrar Turno" ValidationGroup="GprBloqueo" />
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="PanelIniciarTurno" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
|
||||
<table border="0" width="250px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
@@ -3170,6 +3247,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
function CalculaDiferenciaBloqueo() {
|
||||
var total = 0;
|
||||
total = ToDouble($('#C_TxtEfectivoCajaBloqueo').val()) - ToDouble($('#C_LblEfectivoBloqueo').text());
|
||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||
}
|
||||
|
||||
// Get the input field
|
||||
var txtCodigoAcceso = document.getElementById("C_TxtCodigoAcceso");
|
||||
|
||||
|
||||
@@ -1149,6 +1149,7 @@ Partial Class PV
|
||||
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
|
||||
TxtEfectivoCajaBloqueo.Attributes.Add("onKeyUp", "CalculaDiferenciaBloqueo();")
|
||||
'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();")
|
||||
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")
|
||||
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
|
||||
@@ -2129,6 +2130,7 @@ Partial Class PV
|
||||
|
||||
#Region "PUNTO DE VENTA"
|
||||
Private Sub CargaCorteCaja()
|
||||
Dim DebeCerrarCorte As Boolean = False
|
||||
'Checar si hay un Turno Abierto
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
@@ -2136,18 +2138,33 @@ Partial Class PV
|
||||
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
LblEstatusCaja.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
BtnIniciarTurno.Visible = False
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
Dim FechaICorte = ObjPVenta.FechaInicial.Date '.AddDays(-1)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.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
|
||||
LblEstatusCaja.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
BtnIniciarTurno.Visible = False
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
'Ingresar un nuevo Turno
|
||||
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
|
||||
End If
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
|
||||
If DebeCerrarCorte Then
|
||||
CargaDatosCorte()
|
||||
BtnEmitirImprimir.Visible = False
|
||||
HlCliente.Visible = False
|
||||
DdlPS.Visible = False
|
||||
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueoCorte"").click(); }")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
@@ -2181,6 +2198,7 @@ Partial Class PV
|
||||
Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString.ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString.ToDouble + ObjPVenta.DtResultados(0)("Propina").ToString.ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString.ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString.ToDouble
|
||||
DineroCaja = Total
|
||||
LblEfectivoEsperado.Text = Total.FormatoNumero(2)
|
||||
LblEfectivoBloqueo.Text = Total.FormatoNumero(2)
|
||||
|
||||
Dim Dt As New DataTable
|
||||
|
||||
@@ -2288,6 +2306,20 @@ Partial Class PV
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
End Sub
|
||||
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga = "document.location.href=""/Ventas/PV.aspx"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
End If
|
||||
Else
|
||||
Alert("Debe especificar el efectivo en caja", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueoCorte"").click(); }")
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
End Sub
|
||||
Private Sub BtnCancelar_Click(sender As Object, e As EventArgs) Handles BtnCancelar.Click
|
||||
Response.Redirect("~/Inicio.aspx")
|
||||
End Sub
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
||||
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" OnClick="BtnValidar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" OnClick="BtnValidar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -281,11 +281,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
{
|
||||
retorno.IrARefacturar = true;
|
||||
retorno.LigaRefacturacion = string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta);
|
||||
}
|
||||
//if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
//{
|
||||
// retorno.IrARefacturar = true;
|
||||
// retorno.LigaRefacturacion = string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta);
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -333,11 +333,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
}
|
||||
|
||||
if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
{
|
||||
retorno.IrARefacturar = true;
|
||||
retorno.LigaRefacturacion = string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta);
|
||||
}
|
||||
//if (respCancelacion.CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
//{
|
||||
// retorno.IrARefacturar = true;
|
||||
// retorno.LigaRefacturacion = string.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=1", CveVenta);
|
||||
//}
|
||||
}
|
||||
else if (resp.EstatusCancelacion.ToUpper() == "SOLICITUD RECHAZADA")
|
||||
{
|
||||
@@ -390,13 +390,13 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
retorno.Mensaje = sb.ToString();
|
||||
return retorno;
|
||||
}
|
||||
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false, string FolioSustitucion = "", int CveEstatusRefacturacion = -1)
|
||||
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false, string FolioSustitucion = "", int CveEstatusRefacturacion = 0)
|
||||
{
|
||||
Modelos.Factura.MCancelacionVentaMensaje retorno = null;
|
||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion: true);
|
||||
if (EsRefacturacion)
|
||||
{
|
||||
if (CveEstatusRefacturacion > 0)
|
||||
if (CveEstatusRefacturacion >= 0)
|
||||
{
|
||||
factura.CveEstatusRefacturacion = CveEstatusRefacturacion;
|
||||
}
|
||||
@@ -616,6 +616,41 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//protected void BtnAcuse_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
// string UsuarioServicio = "rene.molina@adsistemas.mx";
|
||||
// string ClaveServicio = "rene2018";
|
||||
// string UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL";
|
||||
|
||||
// this.CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
||||
|
||||
// string Uuid = GvRow.DataKey("FolioFiscal");
|
||||
// decimal Total = GvRow.DataKey("Total").ToDecimal();
|
||||
// string RFCCliente = GvRow.DataKey("RFCCliente");
|
||||
// string FolioFiscalSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
||||
// Cancelacion2022.AcuseSat resp = new Cancelacion2022.AcuseSat();
|
||||
// GoFac.GoCfdi a = new GoFac.GoCfdi();
|
||||
// a.ObtenerAcuse(UrlServicio, UsuarioActual.Empresa.RFC, UsuarioServicio, ClaveServicio, Uuid);
|
||||
|
||||
// if (a.CodigoError != 0)
|
||||
// {
|
||||
// //no se pudo obtener, la mandamos cancelar
|
||||
// Timbrado ObjCancelacion = new Timbrado();
|
||||
|
||||
// if (ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, Uuid, Total, RFCCliente, UsuarioActual.Empresa.RFC, 4, ValidaFactura:false, CveSATMotivoCancelacion: 1, FolioSustitucion: FolioFiscalSustitucion ))
|
||||
// {
|
||||
// string b = ObjCancelacion.CancelacionAcuse;
|
||||
// //falta actualizar
|
||||
// Alert("Se regeneró la solicitud de cancelación");
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
|
||||
//}
|
||||
}
|
||||
public class MRespuestaSAT
|
||||
{
|
||||
|
||||
@@ -6,10 +6,10 @@ Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Ventas_RepProductosServicios
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||
@@ -52,10 +52,10 @@ Partial Class Ventas_RepProductosServicios
|
||||
Set(value As Integer)
|
||||
ViewState("TipoCambio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||
@@ -71,11 +71,11 @@ Partial Class Ventas_RepProductosServicios
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA DATOS INICIALES "
|
||||
|
||||
|
||||
Private Sub CargaGrupo()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("Clasificación", "4"))
|
||||
@@ -244,13 +244,19 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
@@ -308,10 +314,10 @@ Partial Class Ventas_RepProductosServicios
|
||||
End Using
|
||||
End If
|
||||
DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV DATOS - PERSONALIZAR "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -335,7 +341,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
End Select
|
||||
|
||||
Else
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(0).Width = Unit.Pixel(200)
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
@@ -411,10 +417,10 @@ Partial Class Ventas_RepProductosServicios
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " SELECTED INDEX CHANGED"
|
||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaClientes()
|
||||
@@ -466,8 +472,8 @@ Partial Class Ventas_RepProductosServicios
|
||||
If DdlTipoComprobante.SelectedValue <> "-1" Then
|
||||
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue))
|
||||
Else
|
||||
DdlEstatus.DataSource = GlobalDTEstatusFactura
|
||||
|
||||
DdlEstatus.DataSource = GlobalDTEstatusFactura
|
||||
|
||||
End If
|
||||
DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
|
||||
DdlEstatus.DataBind()
|
||||
@@ -485,10 +491,10 @@ Partial Class Ventas_RepProductosServicios
|
||||
LiEspecifico.Visible = False
|
||||
End If
|
||||
UpBodyTipoCambio.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
If GvDatos.Rows.Count > 0 Then
|
||||
@@ -541,12 +547,12 @@ Partial Class Ventas_RepProductosServicios
|
||||
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GRAFICA"
|
||||
|
||||
|
||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||
If Not DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
||||
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
||||
@@ -676,9 +682,9 @@ Partial Class Ventas_RepProductosServicios
|
||||
|
||||
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CambioGrafica()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -346,6 +346,8 @@
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-Width="5%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Método de Pago" DataField="MetodoPago" ItemStyle-Width="5%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-Width="5%" Visible="false" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
@@ -380,6 +382,12 @@
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRFC" runat="server" Text="RFC" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMetodoPago" runat="server" Text="Metodo de Pago" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -598,6 +598,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
GvDatos.Columns(3).Visible = ChkSucCob.Checked
|
||||
GvDatos.Columns(9).Visible = ChkObs.Checked
|
||||
GvDatos.Columns(15).Visible = ChkRFC.Checked
|
||||
GvDatos.Columns(16).Visible = ChkMetodoPago.Checked
|
||||
GvDatos.Columns(17).Visible = ChkFormaPago.Checked
|
||||
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
|
||||
@@ -637,7 +637,7 @@
|
||||
<td><b>Serie - Folio:</b></td>
|
||||
<td>
|
||||
<asp:Label ID="LblSerie" runat="server"></asp:Label>-
|
||||
<asp:TextBox ID="TxtFolio" runat="server" BorderStyle="None" Text="000" MaxLength="7" Width="60px" ValidationGroup="GrpEmitirImprimir" Style="text-align: left" autopostback="true"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFolio" runat="server" BorderStyle="None" Text="000" MaxLength="7" Width="60px" ValidationGroup="GrpEmitirImprimir" Style="text-align: left" AutoPostBack="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CompareValidator ID="CVFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> no tiene el formato correcto, solo formato numérico." Operator="DataTypeCheck" Type="Integer" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
@@ -4239,12 +4239,16 @@
|
||||
|
||||
<asp:Button ID="btnShow" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||
<asp:Button ID="btnClose" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" Text="Cancelar" />
|
||||
<asp:Button ID="btnShowBloqueo" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||
|
||||
<!-- ModalPopupExtender -->
|
||||
<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="PanelIniciarTurno" TargetControlID="btnShow"
|
||||
CancelControlID="btnClose" BackgroundCssClass="modalBackground">
|
||||
</cc1:ModalPopupExtender>
|
||||
|
||||
<cc1:ModalPopupExtender ID="MPEBloqueo" runat="server" PopupControlID="PanelBloqueo" TargetControlID="btnShowBloqueo" BackgroundCssClass="modalBackground">
|
||||
</cc1:ModalPopupExtender>
|
||||
|
||||
<asp:Panel ID="PanelIniciarTurno" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
|
||||
<table border="0" width="250px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
@@ -4286,6 +4290,79 @@
|
||||
</asp:Panel>
|
||||
<!-- ModalPopupExtender -->
|
||||
|
||||
<asp:Panel ID="PanelBloqueo" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
<table border="0" width="650px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
<tr style="background-color: #3598dc; color: #FFFFFF; font-size: 14px">
|
||||
<td>Pantalla Bloqueada </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div id="DivAdvertenciaBloqueo" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
<asp:Literal ID="LblMotivoBloqueo" runat="server" Text=""></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1;">Estado de caja</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label ID="LblEfectivoBloqueo" CssClass="form-control" runat="server"></asp:Label>
|
||||
<label for="<%= LblEfectivoBloqueo.ClientID.ToString()%>">Efectivo Esperado:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEfectivoCajaBloqueo" CssClass="form-control" runat="server" onkeyup="javascript:this.value=Comma(this.value);" />
|
||||
<asp:RegularExpressionValidator ID="REVEfectivoCajaBloqueo" runat="server" ControlToValidate="TxtEfectivoCajaBloqueo" 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="GprBloqueo"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender25" runat="server" HighlightCssClass="vco" TargetControlID="REVEfectivoCajaBloqueo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtEfectivoEnCaja.ClientID.ToString()%>">Efectivo en Caja:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="LblDiferenciaCajaBloqueo" CssClass="form-control" runat="server" Enabled="false" />
|
||||
<label for="<%= LblDiferenciaCajaBloqueo.ClientID.ToString()%>">Diferencia:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:LinkButton ID="BtnCerrarBloqueo" runat="server" CssClass="btn btn-danger" Text="Cerrar Turno" ValidationGroup="GprBloqueo"/>
|
||||
</asp:Panel>
|
||||
|
||||
<div id="DivEstadoCaja" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 470px; min-width: 470px;">
|
||||
<div class="modal-content">
|
||||
@@ -8927,6 +9004,12 @@
|
||||
$('#C_LblDiferenciaCaja').text(FormatoNumero(total));
|
||||
}
|
||||
|
||||
function CalculaDiferenciaBloqueo() {
|
||||
var total = 0;
|
||||
total = ToDouble($('#C_TxtEfectivoCajaBloqueo').val()) - ToDouble($('#C_LblEfectivoBloqueo').text());
|
||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||
}
|
||||
|
||||
function CalculaTotalPagoContado() {
|
||||
|
||||
var totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
||||
|
||||
@@ -2356,6 +2356,7 @@ Partial Class Ventas
|
||||
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
|
||||
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
|
||||
TxtEfectivoCajaBloqueo.Attributes.Add("onKeyUp", "CalculaDiferenciaBloqueo();")
|
||||
|
||||
'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();")
|
||||
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante
|
||||
@@ -3201,6 +3202,7 @@ Partial Class Ventas
|
||||
|
||||
#Region "Punto Venta"
|
||||
Private Sub CargaCorteCaja()
|
||||
Dim DebeCerrarCorte As Boolean = False
|
||||
'Checar si hay un Turno Abierto
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
@@ -3208,14 +3210,21 @@ Partial Class Ventas
|
||||
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
LblEstatusCaja.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
LblTurno.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
BtnIniciarTurno.Visible = False
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
UpTurno.Visible = True
|
||||
Dim FechaICorte = ObjPVenta.FechaInicial.Date'.AddDays(-5)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.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
|
||||
LblEstatusCaja.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
LblTurno.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
BtnIniciarTurno.Visible = False
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
UpTurno.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
UpTurno.Visible = False
|
||||
'Ingresar un nuevo Turno
|
||||
@@ -3223,6 +3232,14 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
|
||||
If DebeCerrarCorte Then
|
||||
CargaDatosCorte()
|
||||
BtnEmitirImprimir.Visible = False
|
||||
HlCliente.Visible = False
|
||||
DdlPS.Visible = False
|
||||
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueo"").click(); }")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
@@ -3256,6 +3273,7 @@ Partial Class Ventas
|
||||
Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble
|
||||
DineroCaja = Total
|
||||
LblEfectivoEsperado.Text = Total.FormatoNumero(2)
|
||||
LblEfectivoBloqueo.Text = Total.FormatoNumero(2)
|
||||
|
||||
Dim Dt As New DataTable
|
||||
|
||||
@@ -3368,6 +3386,21 @@ Partial Class Ventas
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
End If
|
||||
Else
|
||||
Alert("Debe especificar el efectivo en caja", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueo"").click(); }")
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
End Sub
|
||||
Private Sub BtnCancelar_Click(sender As Object, e As EventArgs) Handles BtnCancelar.Click
|
||||
Response.Redirect("~/Inicio.aspx")
|
||||
End Sub
|
||||
@@ -10945,6 +10978,8 @@ Partial Class Ventas
|
||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||
End If
|
||||
|
||||
Timbre.Receptor.RegimenFiscalReceptor = Obj.Cliente.CodigoRegimenFiscal
|
||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
||||
Timbre.Receptor.ResidenciaFiscal = ""
|
||||
Timbre.Receptor.NumeroRegistroTributario = ""
|
||||
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||
@@ -11835,7 +11870,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'SI SE FACTURAN RNC DE CARGO, SE AGREGA EL CONCEPTO DE ACREDITAMIENTO
|
||||
If ListaRNC IsNot Nothing AndAlso ClienteEsDistribuidor AndAlso EsCargo Then
|
||||
If ListaRNC IsNot Nothing AndAlso ClienteEsDistribuidor AndAlso EsCargo AndAlso Not factura.EsGarantia Then
|
||||
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
||||
|
||||
Dim CvePSCargo As Integer = -1
|
||||
@@ -17252,7 +17287,11 @@ Partial Class Ventas
|
||||
If CveClasifPS = 20636 Then
|
||||
ValidaCondicionesComerciales = False
|
||||
End If
|
||||
|
||||
'CAMBIO DE VIGENCIA NO SE APLICAN DESCUENTOS
|
||||
If CveClasifPS = 20637 Then
|
||||
ObjDescuento.ImporteDescuento = 0
|
||||
Return ObjDescuento
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim dr As DataRow = Nothing
|
||||
@@ -21477,7 +21516,7 @@ Partial Class Ventas
|
||||
DrDebito("Folio") = CargaFolioContado(DdlCuentaTarjetaDebito.SelectedValue.ToEntero(), 11)
|
||||
DrDebito("Observaciones") = ""
|
||||
DrDebito("Tipo") = "Tarjeta de Débito"
|
||||
DrDebito("CveMetodoPago") = 5
|
||||
DrDebito("CveMetodoPago") = 18
|
||||
DrDebito("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrDebito)
|
||||
@@ -21572,7 +21611,7 @@ Partial Class Ventas
|
||||
DrDebito("Folio") = CargaFolioContado(DdlCuentaOtrosContado.SelectedValue.ToEntero(), 11)
|
||||
DrDebito("Observaciones") = ""
|
||||
DrDebito("Tipo") = "Tarjeta de Débito"
|
||||
DrDebito("CveMetodoPago") = 5
|
||||
DrDebito("CveMetodoPago") = 18
|
||||
DrDebito("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrDebito)
|
||||
@@ -21615,6 +21654,14 @@ Partial Class Ventas
|
||||
UpFacturar.Update()
|
||||
End If
|
||||
|
||||
'TOMA EL VALOR DEL PAGO MAS ALTO QUE SE APLIQUE
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DtPagos IsNot Nothing Then
|
||||
Dim RowPagoMasAlto As DataRow = DtPagos.FiltraParametros("", Orderby:="Importe DESC").FiltroPrimero("")
|
||||
If RowPagoMasAlto IsNot Nothing Then
|
||||
DdlFormaPago33.SelectedValueExist(RowPagoMasAlto("CveMetodoPago"))
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaGridContado()
|
||||
UpContado.Update()
|
||||
|
||||
@@ -26939,9 +26986,7 @@ Partial Class Ventas
|
||||
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
|
||||
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
|
||||
Dim Verificacion As Boolean = False
|
||||
|
||||
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then ' si hay opciones seleccionadas, se activa el generar las NCs
|
||||
Verificacion = True
|
||||
Else
|
||||
@@ -26953,7 +26998,10 @@ Partial Class Ventas
|
||||
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, "Egs", CveEstatus:=1) Then
|
||||
Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL ", Orderby:="TipoAutorizacion")
|
||||
If RowAutorizacion IsNot Nothing Then
|
||||
Verificacion = True
|
||||
Dim ImporteAutorizacion As Decimal = RowAutorizacion("Importe").ToString().ToDecimal()
|
||||
If ImporteAutorizacion > TxtNCImporte.Text.ToDecimal Then
|
||||
Verificacion = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -27463,12 +27511,16 @@ Partial Class Ventas
|
||||
End If
|
||||
UltimoRenglonRNC += 1
|
||||
|
||||
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO
|
||||
If Cantidad.RoundSQL(6) > 0D Then
|
||||
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowUsado("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowUsado("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalle").ToString().ToEntero())
|
||||
|
||||
End If
|
||||
|
||||
If Terminar Then
|
||||
Exit For
|
||||
End If
|
||||
@@ -27552,12 +27604,16 @@ Partial Class Ventas
|
||||
End If
|
||||
UltimoRenglonRNC += 1
|
||||
|
||||
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO
|
||||
If Cantidad.RoundSQL(6) > 0D Then
|
||||
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA,
|
||||
0, ImporteRetISR, 0, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero())
|
||||
|
||||
End If
|
||||
|
||||
If Terminar Then
|
||||
Exit For
|
||||
End If
|
||||
@@ -27640,11 +27696,15 @@ Partial Class Ventas
|
||||
End If
|
||||
UltimoRenglonRNC += 1
|
||||
|
||||
AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO
|
||||
If Cantidad.RoundSQL(6) > 0D Then
|
||||
AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Next
|
||||
@@ -27730,11 +27790,15 @@ Partial Class Ventas
|
||||
End If
|
||||
UltimoRenglonRNC += 1
|
||||
|
||||
AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO
|
||||
If Cantidad.RoundSQL(6) > 0D Then
|
||||
AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Next
|
||||
@@ -27814,11 +27878,15 @@ Partial Class Ventas
|
||||
End If
|
||||
UltimoRenglonRNC += 1
|
||||
|
||||
AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO
|
||||
If Cantidad.RoundSQL(6) > 0D Then
|
||||
AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA,
|
||||
0, ImporteRetISR, 0, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero())
|
||||
End If
|
||||
|
||||
|
||||
If Terminar Then
|
||||
Exit For
|
||||
@@ -27897,11 +27965,15 @@ Partial Class Ventas
|
||||
End If
|
||||
UltimoRenglonRNC += 1
|
||||
|
||||
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO
|
||||
If Cantidad.RoundSQL(6) > 0D Then
|
||||
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowRNC("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowRNC("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowRNC("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowRNC("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowRNC("CveVentaDetalle").ToString().ToEntero())
|
||||
End If
|
||||
|
||||
|
||||
If Terminar Then
|
||||
Exit For
|
||||
@@ -31294,7 +31366,7 @@ Partial Class Ventas
|
||||
Private Function GuardarUsados(CveConcepto As Integer, SqlTransaccion As SqlClient.SqlTransaction, factura As Modelos.Factura) As Boolean
|
||||
Dim Resultado As Boolean = True
|
||||
|
||||
If ClienteEsDistribuidor Then
|
||||
If ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then
|
||||
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
|
||||
|
||||
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
||||
|
||||
Reference in New Issue
Block a user