-
This commit is contained in:
@@ -1382,7 +1382,8 @@ Public Class ClsVentas
|
|||||||
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
|
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
|
||||||
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Decimal = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
|
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Decimal = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
|
||||||
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Decimal = 0, Optional PorcentajeRetIVA As Double = 0,
|
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Decimal = 0, Optional PorcentajeRetIVA As Double = 0,
|
||||||
Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Decimal = 0D) As Boolean
|
Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1,
|
||||||
|
Optional NumTurnos As Decimal = 0D, Optional EstatusAlmacen As Integer = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_VentasDetalleAdd")
|
DataAdapter("PA_VentasDetalleAdd")
|
||||||
|
|
||||||
@@ -1415,6 +1416,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||||
.Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos
|
.Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos
|
||||||
|
.Add("@EstatusAlmacen", SqlDbType.Int).Value = EstatusAlmacen
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Partial Class General_CatRimTamanios
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "CARGAS"
|
#Region "CARGAS"
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
|
|||||||
@@ -1,18 +1,207 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVCobranza.aspx.vb" Inherits="Ventas_PVCobranza" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVCobranza.aspx.vb" Inherits="Ventas_PVCobranza" %>
|
||||||
|
|
||||||
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
.e-big-btn {
|
.e-big-btn {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-xs {
|
||||||
|
padding: 0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nolineheight {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claseesconder {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.myventasbutton {
|
||||||
|
margin: 5px;
|
||||||
|
width: 170px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.dragging, body.dragging * {
|
||||||
|
cursor: move !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dragged {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0.5;
|
||||||
|
z-index: 2000;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Sortable tr.placeholder {
|
||||||
|
display: block;
|
||||||
|
background: red;
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Sortable th.placeholder {
|
||||||
|
display: block;
|
||||||
|
background: red;
|
||||||
|
position: relative;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Sortable th.placeholder:before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border: 5px solid transparent;
|
||||||
|
border-top-color: red;
|
||||||
|
top: -6px;
|
||||||
|
margin-left: -5px;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.Sortable tr.placeholder:before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border: 5px solid transparent;
|
||||||
|
border-left-color: red;
|
||||||
|
margin-top: -5px;
|
||||||
|
left: -5px;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvEst > tbody > tr > td:nth-child(2) {
|
||||||
|
padding-left: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvEst > tbody > tr.Totales > td:nth-child(2) {
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvEst > tbody > tr.SubTotales > td:nth-child(2) {
|
||||||
|
padding-left: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvEst > tbody > tr.SubTotales2 > td:nth-child(2) {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvEst > tbody > tr.SubTotales3 > td:nth-child(2) {
|
||||||
|
padding-left: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.GVAnticipos input {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modalBackground {
|
||||||
|
background-color: Black;
|
||||||
|
filter: alpha(opacity=90);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modalPopup {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rbl input[type="radio"] {
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.mylkbutton:link, a.mylkbutton:hover, a.mylkbutton:active {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow {
|
||||||
|
left: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popover {
|
||||||
|
width: 500px !important;
|
||||||
|
max-width: 500px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popover .popover-title {
|
||||||
|
margin: 0 !important;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2anothertable {
|
||||||
|
position: absolute;
|
||||||
|
left: 100%;
|
||||||
|
background-color: white;
|
||||||
|
/*top: 50px;*/ top: 21px;
|
||||||
|
/*max-height: 200px;*/ max-height: 229px;
|
||||||
|
/*background-color: #dcdcdc;*/
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2anothertable {
|
||||||
|
position: absolute;
|
||||||
|
left: 100%;
|
||||||
|
background-color: white;
|
||||||
|
/*top: 50px;*/ top: 21px;
|
||||||
|
/*max-height: 200px;*/ max-height: 229px;
|
||||||
|
/*background-color: #dcdcdc;*/
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2anothertable > table > tbody > tr > td:nth-of-type(odd) {
|
||||||
|
background-color: rgba(220, 220, 220, 0.45);
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2anothertable > table > tbody > tr > td {
|
||||||
|
line-height: 21px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2anothertable > table > tbody > tr.active {
|
||||||
|
background-color: #5897fb;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Bootstrap text-uppercase =)*/
|
||||||
|
.Mayuscula {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-padding {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UpHB" runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LkbEstadodeCaja" Visible="false" runat="server"><i class="fa fa-ad-excel"></i> Estado de Caja</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LkbIngreso" runat="server" OnClick="LkbIngreso_Click" Visible="false"> <i class="fa fa-ad-excel"></i> Ingreso de Efectivo</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LkbRetiro" runat="server" OnClick="LkbRetiro_Click" Visible="false"> <i class="fa fa-ad-excel"></i> Retiro de Efectivo</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
Cobranza
|
Cobranza
|
||||||
@@ -33,6 +222,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1 truncate">
|
<div class="col-md-1 truncate">
|
||||||
Sucursal:
|
Sucursal:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 ">
|
<div class="col-md-2 ">
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
@@ -41,6 +231,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
|
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
|
||||||
Fecha Inicio Docto:
|
Fecha Inicio Docto:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<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;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
@@ -58,6 +249,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
|
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
|
||||||
Fecha Fin Docto:
|
Fecha Fin Docto:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<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;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
@@ -78,8 +270,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" style="display: none;">
|
<div class="portlet-body" style="display: none;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -87,6 +277,16 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UpL" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpL" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<asp:UpdatePanel ID="UpTurno" runat="server" UpdateMode="Conditional" Visible="false" class="portlet light xspadding bordered whitoutcol" style="width: 20%; display: flex; flex-direction: row; color: white; background-color: #c49f47">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="DivTurno" runat="server" style="width: 100%; text-align: center;">
|
||||||
|
Turno:
|
||||||
|
<asp:Label runat="server" ID="LblTurno"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||||
@@ -110,10 +310,10 @@
|
|||||||
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
|
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="note note-success">
|
<div class="note note-success">
|
||||||
<b>
|
<b>Nombre:
|
||||||
Nombre:
|
|
||||||
</b>
|
</b>
|
||||||
<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>
|
<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>
|
||||||
|
|
||||||
<b>
|
<b>
|
||||||
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal>
|
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal>
|
||||||
</b>
|
</b>
|
||||||
@@ -287,6 +487,332 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<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;">
|
||||||
|
<tr style="background-color: #3598dc; color: #FFFFFF; font-size: 14px">
|
||||||
|
<td>Inicio de Turno </td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1">
|
||||||
|
<asp:Label runat="server" Text="Dinero En Caja:" Font-Bold="true" Width="120px" />
|
||||||
|
</td>
|
||||||
|
<td colspan="1">
|
||||||
|
<asp:TextBox ID="TxtDineroCaja" runat="server" Width="170px" onkeyup="javascript:this.value=Comma(this.value);" />
|
||||||
|
<asp:RegularExpressionValidator ID="REVCaja" runat="server" ControlToValidate="TxtDineroCaja" Display="None" ErrorMessage="El campo <b>''Dinero''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GprIniciarTruno"></asp:RegularExpressionValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1">
|
||||||
|
<asp:Label runat="server" Text="Descripción:" Font-Bold="true" Width="120px" />
|
||||||
|
</td>
|
||||||
|
<td colspan="1">
|
||||||
|
<asp:TextBox runat="server" ID="TxtDescripcionCaja" TextMode="MultiLine" Width="100%" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
<td colspan="1"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<asp:Button ID="BtnIniciarTurno" runat="server" CssClass="btn btn-success" Text="Iniciar Turno" ValidationGroup="GprIniciarTruno" />
|
||||||
|
|
||||||
|
<asp:Button ID="BtnCancelar" runat="server" CssClass="btn btn-danger" Text="Cancelar" />
|
||||||
|
|
||||||
|
</asp:Panel>
|
||||||
|
<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="<%= TxtEfectivoCajaBloqueo.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="DivTerminarCorte" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel ID="UpTerminarCorte" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-dialog" style="width: 470px; min-width: 470px;">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Label runat="server" Text="Cierre de Turno"></asp:Label>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:Label ID="LblEfectivoEsperado" CssClass="form-control" runat="server"></asp:Label>
|
||||||
|
<label for="<%= LblEfectivoEsperado.ClientID.ToString()%>">Efectivo Esperado:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtEfectivoEnCaja" CssClass="form-control" runat="server" onkeyup="javascript:this.value=Comma(this.value);" />
|
||||||
|
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TxtEfectivoEnCaja" 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="GprCorteCaja"></asp:RegularExpressionValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="RegularExpressionValidator2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<label for="<%= TxtEfectivoEnCaja.ClientID.ToString()%>">Efectivo en Caja:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= LblEfectivoEsperado.ClientID.ToString()%>">Diferencia:</label>
|
||||||
|
<asp:Label ID="LblDiferenciaCaja" CssClass="form-control" runat="server" TextMode="MultiLine" Width="500px"></asp:Label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnCerrarTurno" runat="server" CssClass="btn btn-success" Text="Cerrar Turno" ValidationGroup="GprCorteCaja" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DivIngresoEgreso" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel ID="UpIngresoEgreso" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:HiddenField ID="HdnTipoMovimiento" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
|
<div class="modal-dialog" style="width: 470px; min-width: 470px;">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Label runat="server" ID="LblTituloIE" Text="" />
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtCantidadIE" CssClass="form-control" runat="server" Width="170px" />
|
||||||
|
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TxtCantidadIE" 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="GprIngresoEgreso"></asp:RegularExpressionValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="RegularExpressionValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<label for="<%= TxtCantidadIE.ClientID.ToString()%>">Cantidad:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= TxtDescripcionIE.ClientID.ToString()%>">Descripcion:</label>
|
||||||
|
<asp:TextBox runat="server" ID="TxtDescripcionIE" CssClass="form-control" TextMode="MultiLine" Width="500px" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnAceptarIE" runat="server" CssClass="btn btn-success" Text="Aceptar" ValidationGroup="GprIngresoEgreso" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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;" />
|
||||||
|
|
||||||
|
<div id="DivEstadoCaja" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="width: 470px; min-width: 470px;">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Label runat="server" Text="Estado de Caja"></asp:Label>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:UpdatePanel ID="UpDineroCaja" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<b>Dinero en Caja</b>
|
||||||
|
<asp:GridView ID="GvDineroCaja" BorderWidth="0px" ShowHeader="False" runat="server" Height="200px" horizontal-align="Right" vertical-align="Top" GridLines="None" ShowHeaderWhenEmpty="False" AutoGenerateColumns="False" EmptyDataText="">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataFormatString="{0}:" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtImporte" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UpMetodosPago" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<b>Metodos de Pago</b>
|
||||||
|
<asp:GridView ID="GvMetodosPago" BorderWidth="0px" ShowHeader="False" runat="server" Height="200px" horizontal-align="Right" vertical-align="Top" DataKeyNames="CveTipoTransaccion" GridLines="None" ShowHeaderWhenEmpty="False" AutoGenerateColumns="False" EmptyDataText="">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTipoTransaccion" runat="server" Text='<%# Eval("TipoTransaccion") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataFormatString="{0}:" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtImporte" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UpIngresos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<b>Ingresos</b>
|
||||||
|
<asp:GridView ID="GvIngresos" BorderWidth="0px" ShowHeader="False" runat="server" horizontal-align="Right" vertical-align="Top" GridLines="None" ShowHeaderWhenEmpty="False" AutoGenerateColumns="False" EmptyDataText="">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataFormatString="{0}:" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtImporte" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UpEgresos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<b>Retiros</b>
|
||||||
|
<asp:GridView ID="GvEgresos" BorderWidth="0px" ShowHeader="False" runat="server" horizontal-align="Right" vertical-align="Top" GridLines="None" ShowHeaderWhenEmpty="False" AutoGenerateColumns="False" EmptyDataText="">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTipoTransaccion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataFormatString="{0}:" ItemStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtImporte" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button OnClick="BtnCerrarCaja_Click" ID="BtnCerrarCaja" runat="server" Text="Cerrar Turno" CssClass="btn btn-success" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -305,8 +831,7 @@
|
|||||||
lblCambio.innerHTML = "Cambio:";
|
lblCambio.innerHTML = "Cambio:";
|
||||||
//HdnCambioFaltante.value = "1";
|
//HdnCambioFaltante.value = "1";
|
||||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
lblCambio.innerHTML = "Faltante:";
|
lblCambio.innerHTML = "Faltante:";
|
||||||
HdnCambioFaltante.value = "0";
|
HdnCambioFaltante.value = "0";
|
||||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
||||||
@@ -315,5 +840,18 @@
|
|||||||
$get("TxtImporteContado").value = FormatoNumero(total, 2);
|
$get("TxtImporteContado").value = FormatoNumero(total, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function CalculaDiferencia() {
|
||||||
|
;
|
||||||
|
var total = 0
|
||||||
|
total = ToDouble($('#C_TxtEfectivoEnCaja').val()) - ToDouble($('#C_LblEfectivoEsperado').text());
|
||||||
|
$('#C_LblDiferenciaCaja').text(FormatoNumero(total));
|
||||||
|
}
|
||||||
|
|
||||||
|
function CalculaDiferenciaBloqueo() {
|
||||||
|
var total = 0;
|
||||||
|
total = ToDouble($('#C_TxtEfectivoCajaBloqueo').val()) - ToDouble($('#C_LblEfectivoBloqueo').text());
|
||||||
|
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -16,12 +16,23 @@ Partial Class Ventas_PVCobranza
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property DineroCaja As Double
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("DineroCaja")), 0, ViewState("DineroCaja").ToString().ToDecimal())
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
ViewState("DineroCaja") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
CveCorte = 0
|
CveCorte = 0
|
||||||
CargaFiltros()
|
CargaFiltros()
|
||||||
|
If UsuarioActual.TienePermisoProceso(371) Then
|
||||||
CargaCorteCaja()
|
CargaCorteCaja()
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaFiltros()
|
Private Sub CargaFiltros()
|
||||||
@@ -59,6 +70,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
DdlCuentaTarjetaDebito.DataBind()
|
DdlCuentaTarjetaDebito.DataBind()
|
||||||
DdlCuentaCheque.DataBind()
|
DdlCuentaCheque.DataBind()
|
||||||
DdlCuentaTransferencia.DataBind()
|
DdlCuentaTransferencia.DataBind()
|
||||||
|
|
||||||
TxtImporteEfectivo.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
TxtImporteEfectivo.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||||
TxtImporteCredito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
TxtImporteCredito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||||
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||||
@@ -66,6 +78,9 @@ Partial Class Ventas_PVCobranza
|
|||||||
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||||
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||||
|
|
||||||
|
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
|
||||||
|
TxtEfectivoCajaBloqueo.Attributes.Add("onKeyUp", "CalculaDiferenciaBloqueo();")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCorteCaja()
|
Private Sub CargaCorteCaja()
|
||||||
@@ -77,13 +92,96 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||||
CveCorte = ObjPVenta.CveCorte
|
CveCorte = ObjPVenta.CveCorte
|
||||||
|
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
|
||||||
|
DebeCerrarCorte = True
|
||||||
|
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||||
|
Else
|
||||||
|
LblTurno.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||||
|
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
|
||||||
|
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjPVenta.Dispose()
|
ObjPVenta.Dispose()
|
||||||
|
|
||||||
|
If DebeCerrarCorte Then
|
||||||
|
CargaDatosCorte()
|
||||||
|
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueo"").click(); }")
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatosCorte()
|
||||||
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
|
Dim Total As Double
|
||||||
|
|
||||||
|
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
|
||||||
|
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
Dt.Columns.Add("Descripcion", GetType(String))
|
||||||
|
Dt.Columns.Add("Importe", GetType(Decimal))
|
||||||
|
|
||||||
|
Dim Dr1 As DataRow = Dt.NewRow
|
||||||
|
Dr1("Descripcion") = "Fondo de Caja"
|
||||||
|
Dr1("Importe") = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble
|
||||||
|
Dt.Rows.Add(Dr1)
|
||||||
|
|
||||||
|
Dim Dr2 As DataRow = Dt.NewRow
|
||||||
|
Dr2("Descripcion") = "Ventas en Efectivo"
|
||||||
|
Dr2("Importe") = ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble
|
||||||
|
Dt.Rows.Add(Dr2)
|
||||||
|
|
||||||
|
Dim Dr21 As DataRow = Dt.NewRow
|
||||||
|
Dr21("Descripcion") = "Devoluciones"
|
||||||
|
Dr21("Importe") = ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble
|
||||||
|
Dt.Rows.Add(Dr21)
|
||||||
|
|
||||||
|
'Dim Dr3 = Dt.NewRow
|
||||||
|
'Dr3("Descripcion") = "Propinas"
|
||||||
|
'Dr3("Importe") = ObjPVenta.DtResultados(0)("Propina").ToString().ToDouble
|
||||||
|
'Dt.Rows.Add(Dr3)
|
||||||
|
|
||||||
|
Dim Dr4 As DataRow = Dt.NewRow
|
||||||
|
Dr4("Descripcion") = "Entradas"
|
||||||
|
Dr4("Importe") = ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble
|
||||||
|
Dt.Rows.Add(Dr4)
|
||||||
|
|
||||||
|
Dim Dr5 As DataRow = Dt.NewRow
|
||||||
|
Dr5("Descripcion") = "Salidas"
|
||||||
|
Dr5("Importe") = ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble
|
||||||
|
Dt.Rows.Add(Dr5)
|
||||||
|
|
||||||
|
Dim Dr6 As DataRow = Dt.NewRow
|
||||||
|
Dr6("Descripcion") = "Total"
|
||||||
|
Dr6("Importe") = Total
|
||||||
|
Dt.Rows.Add(Dr6)
|
||||||
|
|
||||||
|
GvDineroCaja.DataSource = Dt
|
||||||
|
GvDineroCaja.DataBind()
|
||||||
|
UpDineroCaja.Update()
|
||||||
|
UpTerminarCorte.Update()
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjPVenta.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
@@ -278,4 +376,126 @@ Partial Class Ventas_PVCobranza
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Protected Sub BtnCerrarCaja_Click(sender As Object, e As EventArgs)
|
||||||
|
RegistraScript("$('#DivEstadoCaja').modal('hide')")
|
||||||
|
RegistraScript("$('#DivTerminarCorte').modal()", "divterminarcorte")
|
||||||
|
End Sub
|
||||||
|
Protected Sub LkbIngreso_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaIngresoEgreso(1)
|
||||||
|
End Sub
|
||||||
|
Public Sub CargaIngresoEgreso(Opcion As Integer)
|
||||||
|
RegistraScript("$('#DivIngresoEgreso').modal()")
|
||||||
|
If Opcion = 1 Then
|
||||||
|
LblTituloIE.Text = "Ingreso de Efectivo: "
|
||||||
|
HdnTipoMovimiento.Value = "1"
|
||||||
|
ElseIf Opcion = 0 Then
|
||||||
|
LblTituloIE.Text = "Retiro de Efectivo: "
|
||||||
|
HdnTipoMovimiento.Value = "0"
|
||||||
|
End If
|
||||||
|
UpIngresoEgreso.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub LkbRetiro_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaIngresoEgreso(0)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LkbEstadodeCaja_Click(sender As Object, e As EventArgs) Handles LkbEstadodeCaja.Click
|
||||||
|
CargaDatosCorte()
|
||||||
|
CargaVentasPago()
|
||||||
|
CargaEntradasSalidas()
|
||||||
|
RegistraScript("$('#DivEstadoCaja').modal()")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaVentasPago()
|
||||||
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
|
|
||||||
|
If ObjPVenta.GetVta_MetodosPago(CveCorte) Then
|
||||||
|
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||||
|
GvMetodosPago.DataSource = ObjPVenta.DtResultados
|
||||||
|
GvMetodosPago.DataBind()
|
||||||
|
UpMetodosPago.Update()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjPVenta.Dispose()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaEntradasSalidas()
|
||||||
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
|
|
||||||
|
'Salida
|
||||||
|
If ObjPVenta.GetVta_MovimientosCajas(CveCorte, 0) Then
|
||||||
|
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||||
|
GvEgresos.DataSource = ObjPVenta.DtResultados
|
||||||
|
GvEgresos.DataBind()
|
||||||
|
UpEgresos.Update()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Entrada
|
||||||
|
If ObjPVenta.GetVta_MovimientosCajas(CveCorte, 1) Then
|
||||||
|
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||||
|
GvIngresos.DataSource = ObjPVenta.DtResultados
|
||||||
|
GvIngresos.DataBind()
|
||||||
|
UpIngresos.Update()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjPVenta.Dispose()
|
||||||
|
End Sub
|
||||||
|
Private Sub BtnCerrarTurno_Click(sender As Object, e As EventArgs) Handles BtnCerrarTurno.Click
|
||||||
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
|
If TxtEfectivoEnCaja.Text.Trim <> "" Then
|
||||||
|
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, NowADS(), 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 As String = "document.location.href=""/Ventas/PVCobranza.aspx"";"
|
||||||
|
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||||
|
End If
|
||||||
|
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, NowADS(), 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 As String = "document.location.href=""/Ventas/PVCobranza.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_btnShowBloqueo"").click(); }")
|
||||||
|
End If
|
||||||
|
ObjPVenta.Dispose()
|
||||||
|
End Sub
|
||||||
|
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||||
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
|
|
||||||
|
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
|
||||||
|
CveCorte = ObjPVenta.CveCorte
|
||||||
|
LblTurno.Text = NowADS().ToShortDateString
|
||||||
|
UpTurno.Visible = True
|
||||||
|
LkbEstadodeCaja.Visible = True
|
||||||
|
LkbIngreso.Visible = True
|
||||||
|
LkbRetiro.Visible = True
|
||||||
|
BtnIniciarTurno.Visible = False
|
||||||
|
|
||||||
|
ObjPVenta.Dispose()
|
||||||
|
|
||||||
|
RegistraScript("$('#DivCorteDeCaja').hide();")
|
||||||
|
|
||||||
|
UpTurno.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnAceptarIE_Click(sender As Object, e As EventArgs) Handles BtnAceptarIE.Click
|
||||||
|
Dim ObjPVenta As New ClsPuntoVenta
|
||||||
|
If TxtCantidadIE.Text.ToEntero() > 0 Then
|
||||||
|
If ObjPVenta.AddVta_MovimientosCajas(CveCorte, UsuarioActual.CveUsuario, TxtCantidadIE.Text.ToDouble, TxtDescripcionIE.Text, HdnTipoMovimiento.Value.ToEntero(), NowADS()) Then
|
||||||
|
TxtCantidadIE.Text = ""
|
||||||
|
TxtDescripcionIE.Text = ""
|
||||||
|
RegistraScript("$('#DivIngresoEgreso').modal('hide')", "divingresoegreso")
|
||||||
|
Alert("El movimiento se realizó correctamente")
|
||||||
|
UpIngresoEgreso.Update()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjPVenta.Dispose()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -582,16 +582,16 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr runat="server" id="TrVentasMedicas2" visible="false">
|
<tr runat="server" id="TrVentasMedicas2" visible="false">
|
||||||
<td runat="server" id="TdRequiereTecnico1" visible="false">
|
<td runat="server" id="TdRequiereTecnico1" visible="true">
|
||||||
<b>Requiere Técnico:</b>
|
<b>Requiere Técnico:</b>
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdRequiereTecnico2" visible="false">
|
<td runat="server" id="TdRequiereTecnico2" visible="true">
|
||||||
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" CssClass="chksino" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico:" />
|
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" CssClass="chksino" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico:" />
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdFechaOS1" visible="false">
|
<td runat="server" id="TdFechaOS1" visible="true">
|
||||||
<b>Fecha de Cirugia:</b>
|
<b>Fecha de Cirugia:</b>
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdFechaOS2" visible="false">
|
<td runat="server" id="TdFechaOS2" visible="true">
|
||||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" ></asp:TextBox>
|
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" ></asp:TextBox>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1976,12 +1976,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div runat="server" id="DVMEEFechaEje" visible="true">
|
<div runat="server" id="DVMEEFechaEje" visible="true">
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaEje" runat="server" TargetControlID="TxtFechaEjecucion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaEje" runat="server" TargetControlID="TxtFechaEjecucion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VcoRFVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaEje" TargetControlID="TxtFechaEjecucion" PopupButtonID="ImgCalendarFechaEje" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CEFechaEje" TargetControlID="TxtFechaEjecucion" PopupButtonID="ImgCalendarFechaEje" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha de Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha de Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||||
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoRFVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoCVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VcoCVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@@ -4093,7 +4094,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr align="left" id="TrObsMedico1" visible="false" runat="server">
|
<%--<tr align="left" id="TrObsMedico1" visible="false" runat="server">
|
||||||
<td>Médico: </td>
|
<td>Médico: </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left" id="TrObsMedico2" visible="false" runat="server">
|
<tr align="left" id="TrObsMedico2" visible="false" runat="server">
|
||||||
@@ -4114,7 +4115,7 @@
|
|||||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>--%>
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
@@ -8405,13 +8406,13 @@
|
|||||||
|
|
||||||
<%--Tipo Venta--%>
|
<%--Tipo Venta--%>
|
||||||
<div class="row" runat="server" visible="True" id="DvModalTipoVentaPasoTipo">
|
<div class="row" runat="server" visible="True" id="DvModalTipoVentaPasoTipo">
|
||||||
<div class="col-md-4">
|
<div class="col-md-3">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" style="text-align: left!important">
|
<div class="col-md-6" style="text-align: left!important">
|
||||||
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" RepeatDirection="Vertical" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged" Style="margin-top: 10px!important">
|
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" RepeatDirection="Vertical" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged" Style="margin-top: 10px!important">
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-3">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -8489,7 +8490,7 @@
|
|||||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoRequiereOS">
|
<div runat="server" visible="False" id="DvModalTipoVentaPasoRequiereOS">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Requiere Técnico:</asp:Label>
|
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="ChkRequiereTecnicoModal">Requiere Técnico:</asp:Label>
|
||||||
<asp:CheckBox ID="ChkRequiereTecnicoModal" CssClass="chksino" runat="server" OnCheckedChanged="ChkRequiereTecnicoModal_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico" />
|
<asp:CheckBox ID="ChkRequiereTecnicoModal" CssClass="chksino" runat="server" OnCheckedChanged="ChkRequiereTecnicoModal_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6 form-md-line-input input-iconright " runat="server" id="DvModalRequiereOSFecha" visible="false">
|
<div class="form-group col-md-6 form-md-line-input input-iconright " runat="server" id="DvModalRequiereOSFecha" visible="false">
|
||||||
@@ -8545,6 +8546,40 @@
|
|||||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function impresionDirecta(url){
|
||||||
|
var frame = document.createElement('iframe');
|
||||||
|
frame.setAttribute('src', url);
|
||||||
|
//must be in the DOM to work in Firefox/IE
|
||||||
|
document.body.appendChild(frame);
|
||||||
|
//since it's in the DOM we need to hide it (lest we ruin our page layout)
|
||||||
|
//can't use 'display:none' or 'visibility:hidden' because you can't get focus (needed for IE)
|
||||||
|
//'z-index:-1' & 'opacity:0' wont help if there is no background in the elements above it and someone clicks through to it
|
||||||
|
frame.style.position = 'absolute';
|
||||||
|
frame.style.left = '-9999px';
|
||||||
|
//when it is loaded, print it
|
||||||
|
function printFrame() {
|
||||||
|
//have to get focus in IE
|
||||||
|
frame.contentWindow.focus();
|
||||||
|
//print!
|
||||||
|
frame.contentWindow.print();
|
||||||
|
/* cant remove the element because print() is non-blocking in FF
|
||||||
|
* (I.e. it would remove the frame before it was printed!)
|
||||||
|
//cleanup
|
||||||
|
//document.body.removeChild(frame);*/
|
||||||
|
};
|
||||||
|
//if it was cached, it may already be done (onload wont fire, IE8)
|
||||||
|
if (frame.contentWindow && frame.contentDocument.readyState == 'complete')
|
||||||
|
printFrame();
|
||||||
|
else {
|
||||||
|
if (frame.addEventListener)
|
||||||
|
//W3C
|
||||||
|
frame.addEventListener('load', printFrame, false);
|
||||||
|
else
|
||||||
|
//IE<9
|
||||||
|
frame.attachEvent('onload', printFrame);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function pageLoad()
|
function pageLoad()
|
||||||
{
|
{
|
||||||
//ABRIR EL DROPDOWN DE PS DESPUES DE ASIGNAR CANTIDAD
|
//ABRIR EL DROPDOWN DE PS DESPUES DE ASIGNAR CANTIDAD
|
||||||
|
|||||||
@@ -2282,6 +2282,53 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
#Region "VENTA MEDICA"
|
||||||
|
|
||||||
|
Property EsVentaMedica As Boolean
|
||||||
|
Get
|
||||||
|
If ViewState("EsVentaMedica") Is Nothing Then
|
||||||
|
ViewState("EsVentaMedica") = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Boolean.Parse(ViewState("EsVentaMedica").ToString)
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("EsVentaMedica") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Property SeEstaFActurandoVentaMedica As Boolean
|
||||||
|
Get
|
||||||
|
If ViewState("SeEstaFActurandoVentaMedica") Is Nothing Then
|
||||||
|
ViewState("SeEstaFActurandoVentaMedica") = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Boolean.Parse(ViewState("SeEstaFActurandoVentaMedica").ToString)
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("SeEstaFActurandoVentaMedica") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property CveTipoVenta As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveTipoVenta") Is Nothing Then
|
||||||
|
ViewState("CveTipoVenta") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveTipoVenta").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveTipoVenta") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
@@ -3391,7 +3438,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
EsVentaMedica = True
|
EsVentaMedica = True
|
||||||
CargaTiposVenta()
|
CargaTiposVenta()
|
||||||
@@ -5819,14 +5866,16 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
|
||||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 Then
|
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
||||||
TrObsMedico1.Visible = True
|
|
||||||
TrObsMedico2.Visible = True
|
|
||||||
TrObsProcedimiento1.Visible = True
|
|
||||||
TrObsProcedimiento2.Visible = True
|
|
||||||
|
|
||||||
DdlMedicoObservaciones.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||||
DdlProcedimientoObservaciones.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
TrVentasMedicas1.Visible = True
|
||||||
|
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||||
|
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
||||||
|
|
||||||
|
|
||||||
|
DdlMedico.Enabled = False
|
||||||
|
DdlProcedimiento.Enabled = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10528,6 +10577,10 @@ Partial Class Ventas
|
|||||||
OnError("Ocurrió un error al limpiar los datos", ex)
|
OnError("Ocurrió un error al limpiar los datos", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
RegistraScript($"impresionDirecta('/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}');", "Imprimir")
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjVentas.RollBack()
|
ObjVentas.RollBack()
|
||||||
|
|
||||||
@@ -13193,18 +13246,13 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim CveMedico As Integer = -1
|
Dim CveMedico As Integer = -1
|
||||||
Dim CveProcedimiento As Integer = -1
|
Dim CveProcedimiento As Integer = -1
|
||||||
|
Dim CveTipoVentaGuardar As Integer = -1
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
If SeEstaFActurandoVentaMedica Then
|
|
||||||
CveMedico = DdlMedicoObservaciones.SelectedValue.ToEntero
|
|
||||||
CveProcedimiento = DdlProcedimientoObservaciones.SelectedValue.ToEntero
|
|
||||||
Else
|
|
||||||
CveMedico = DdlMedico.SelectedValue.ToEntero
|
CveMedico = DdlMedico.SelectedValue.ToEntero
|
||||||
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||||
|
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||||
@@ -13224,7 +13272,7 @@ Partial Class Ventas
|
|||||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
||||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
||||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Else
|
Else
|
||||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||||
@@ -13334,13 +13382,16 @@ Partial Class Ventas
|
|||||||
CargaNCDT(factura.CveVentaPadre, DdlTipoComprobante.SelectedValue, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas)
|
CargaNCDT(factura.CveVentaPadre, DdlTipoComprobante.SelectedValue, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim EsatusAlmacen As Integer = If(RBLTipoVenta.SelectedValue = "5" AndAlso EsVentaMedica AndAlso DdlTipoComprobante.SelectedValue = "Ped", 1, 0) ', EstatusAlmacen:=EsatusAlmacen
|
||||||
'Se agregan los PS
|
'Se agregan los PS
|
||||||
For Each Row As DataRow In TmpDTDetalle.Rows
|
For Each Row As DataRow In TmpDTDetalle.Rows
|
||||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("CveUM").ToString().ToEntero(),
|
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("CveUM").ToString().ToEntero(),
|
||||||
Row("PU").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDecimal, Math.Round((Row("Total").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
Row("PU").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDecimal, Math.Round((Row("Total").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||||
Row("Obs").ToString(), Row("Descuento").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(),
|
Row("Obs").ToString(), Row("Descuento").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(),
|
||||||
CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDecimal,
|
CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDecimal,
|
||||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then
|
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal,
|
||||||
|
PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(),
|
||||||
|
CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal(), EstatusAlmacen:=EsatusAlmacen) Then
|
||||||
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
@@ -16380,6 +16431,7 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'IMPRESION
|
'IMPRESION
|
||||||
@@ -21511,7 +21563,6 @@ Partial Class Ventas
|
|||||||
BtnEditarRemision.Visible = True
|
BtnEditarRemision.Visible = True
|
||||||
BtnPermisoEditarRemision.Visible = False
|
BtnPermisoEditarRemision.Visible = False
|
||||||
BtnCrearApartirDe.Visible = False
|
BtnCrearApartirDe.Visible = False
|
||||||
DdlSucursalCliente.Enabled = True
|
|
||||||
TxtObsFact.Enabled = True
|
TxtObsFact.Enabled = True
|
||||||
TxtOrdenCompra.Enabled = True
|
TxtOrdenCompra.Enabled = True
|
||||||
TxtPedidoContrato.Enabled = True
|
TxtPedidoContrato.Enabled = True
|
||||||
@@ -21522,12 +21573,17 @@ Partial Class Ventas
|
|||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
If Me.PermiteCredito Then RBLPago.Enabled = True
|
If Me.PermiteCredito Then RBLPago.Enabled = True
|
||||||
DdlVendedor.Enabled = True
|
DdlVendedor.Enabled = True
|
||||||
|
|
||||||
ModalidadEdicion = True
|
ModalidadEdicion = True
|
||||||
|
|
||||||
ViewState("CveClienteAnterior") = CveCliente
|
ViewState("CveClienteAnterior") = CveCliente
|
||||||
|
|
||||||
DdlMedicoObservaciones.Enabled = True
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||||
DdlProcedimientoObservaciones.Enabled = True
|
TrVentasMedicas1.Visible = True
|
||||||
|
DdlMedico.Enabled = True
|
||||||
|
DdlProcedimiento.Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim CantidadFacturadaRemision As Decimal = 0
|
Dim CantidadFacturadaRemision As Decimal = 0
|
||||||
|
|
||||||
@@ -21576,6 +21632,7 @@ Partial Class Ventas
|
|||||||
TxtPrecio.Enabled = True
|
TxtPrecio.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
LbAgregar.Enabled = True
|
LbAgregar.Enabled = True
|
||||||
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
|
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
|
||||||
LblSubTotal1.Text = TxtSubTotal.Text
|
LblSubTotal1.Text = TxtSubTotal.Text
|
||||||
@@ -21604,7 +21661,6 @@ Partial Class Ventas
|
|||||||
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
|
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
|
||||||
Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal
|
Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||||
EditoRemision = True
|
EditoRemision = True
|
||||||
CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
|
||||||
Try
|
Try
|
||||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||||
If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then
|
If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||||
@@ -21679,14 +21735,13 @@ Partial Class Ventas
|
|||||||
Moneda = 1
|
Moneda = 1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Actualizo los parametros de la venta
|
|
||||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||||
UsuarioActual.CveEmpresa, CveVenta,
|
UsuarioActual.CveEmpresa, CveVenta,
|
||||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedicoObservaciones.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimientoObservaciones.SelectedValue.ToEntero) Then
|
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -30208,6 +30263,8 @@ Partial Class Ventas
|
|||||||
Moneda = 1
|
Moneda = 1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'ACTUALIZA VENTA
|
||||||
'ACTUALIZA VENTA
|
'ACTUALIZA VENTA
|
||||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal(), TxtIVA.Text.ToDecimal(), TxtIEPS.Text.ToDecimal(), TxtTotal.Text.ToDecimal(),
|
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal(), TxtIVA.Text.ToDecimal(), TxtIEPS.Text.ToDecimal(), TxtTotal.Text.ToDecimal(),
|
||||||
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||||
@@ -30220,6 +30277,8 @@ Partial Class Ventas
|
|||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'ELIMINA DETALLES
|
'ELIMINA DETALLES
|
||||||
If Not ObjVentas.RemoveVentasDetalle(CveVenta) Then
|
If Not ObjVentas.RemoveVentasDetalle(CveVenta) Then
|
||||||
MensajeError = "Ocurrió un error al actualizar las partidas de la cotización"
|
MensajeError = "Ocurrió un error al actualizar las partidas de la cotización"
|
||||||
@@ -33485,9 +33544,10 @@ Partial Class Ventas
|
|||||||
DdlUsoCFDI.Enabled = True
|
DdlUsoCFDI.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||||
DdlMedicoObservaciones.Enabled = True
|
TrVentasMedicas1.Visible = True
|
||||||
DdlProcedimientoObservaciones.Enabled = True
|
DdlMedico.Enabled = True
|
||||||
|
DdlProcedimiento.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(289) Then
|
If UsuarioActual.TienePermisoProceso(289) Then
|
||||||
@@ -33528,12 +33588,12 @@ Partial Class Ventas
|
|||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
ObjVentas.IniciaTransacSQL()
|
ObjVentas.IniciaTransacSQL()
|
||||||
|
|
||||||
DdlMedicoObservaciones.Enabled = True
|
'DdlMedicoObservaciones.Enabled = True
|
||||||
DdlProcedimientoObservaciones.Enabled = True
|
'DdlProcedimientoObservaciones.Enabled = True
|
||||||
|
|
||||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
||||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
||||||
CveMedico:=DdlMedicoObservaciones.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimientoObservaciones.SelectedValue.ToEntero) Then
|
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -34854,34 +34914,7 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property EsVentaMedica As Boolean
|
|
||||||
Get
|
|
||||||
If ViewState("EsVentaMedica") Is Nothing Then
|
|
||||||
ViewState("EsVentaMedica") = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return Boolean.Parse(ViewState("EsVentaMedica").ToString)
|
|
||||||
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
ViewState("EsVentaMedica") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
Property SeEstaFActurandoVentaMedica As Boolean
|
|
||||||
Get
|
|
||||||
If ViewState("SeEstaFActurandoVentaMedica") Is Nothing Then
|
|
||||||
ViewState("SeEstaFActurandoVentaMedica") = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return Boolean.Parse(ViewState("SeEstaFActurandoVentaMedica").ToString)
|
|
||||||
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
ViewState("SeEstaFActurandoVentaMedica") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -35866,7 +35899,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
RBLTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
|
RBLTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
|
||||||
RBLTipoVenta.DataBind()
|
RBLTipoVenta.DataBind()
|
||||||
RBLTipoVenta.Items.Add(New ListItem("Otros", "5"))
|
RBLTipoVenta.Items.Add(New ListItem("Otros", "99"))
|
||||||
|
|
||||||
TrVentasMedicas1.Visible = True
|
TrVentasMedicas1.Visible = True
|
||||||
TrVentasMedicas2.Visible = True
|
TrVentasMedicas2.Visible = True
|
||||||
@@ -35885,8 +35918,7 @@ Partial Class Ventas
|
|||||||
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
DdlProcedimientoModal.DataBind()
|
DdlProcedimientoModal.DataBind()
|
||||||
|
|
||||||
DdlProcedimientoObservaciones.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa)
|
|
||||||
DdlProcedimientoObservaciones.DataBind()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -35897,8 +35929,7 @@ Partial Class Ventas
|
|||||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
DdlMedicoModal.DataBind()
|
DdlMedicoModal.DataBind()
|
||||||
|
|
||||||
DdlMedicoObservaciones.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa)
|
|
||||||
DdlMedicoObservaciones.DataBind()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -35949,7 +35980,11 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
|
||||||
|
|
||||||
|
TdFechaOS1.Visible = ChkRequiereTecnico.Checked
|
||||||
|
TdFechaOS2.Visible = ChkRequiereTecnico.Checked
|
||||||
|
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -35976,7 +36011,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
Select Case RBLTipoVenta.SelectedValue
|
Select Case RBLTipoVenta.SelectedValue
|
||||||
Case "1" ' Fuera de linea
|
Case "1", "5" '1 Fuera de linea || 5 Consignación - Uso material
|
||||||
ChkRequiereTecnicoModal.Checked = True
|
ChkRequiereTecnicoModal.Checked = True
|
||||||
ChkRequiereTecnicoModal.Enabled = True
|
ChkRequiereTecnicoModal.Enabled = True
|
||||||
DvModalRequiereOSFecha.Visible = True
|
DvModalRequiereOSFecha.Visible = True
|
||||||
@@ -35990,13 +36025,13 @@ Partial Class Ventas
|
|||||||
DvModalRequiereOSFecha.Visible = False
|
DvModalRequiereOSFecha.Visible = False
|
||||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||||
DVGvProductosProcedimiento.Visible = False
|
DVGvProductosProcedimiento.Visible = False
|
||||||
Case "4" 'Consigna
|
Case "4" 'Consignación
|
||||||
ChkRequiereTecnicoModal.Checked = False
|
ChkRequiereTecnicoModal.Checked = False
|
||||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||||
DvModalRequiereOSFecha.Visible = False
|
DvModalRequiereOSFecha.Visible = False
|
||||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||||
DVGvProductosProcedimiento.Visible = False
|
DVGvProductosProcedimiento.Visible = False
|
||||||
Case "5" ' Otros
|
Case "99" ' Otros
|
||||||
LnkDvModalTipoVentaAceptar.Visible = False
|
LnkDvModalTipoVentaAceptar.Visible = False
|
||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||||
@@ -36099,6 +36134,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If DdlClienteSucursalCliente() > 0 Then
|
If DdlClienteSucursalCliente() > 0 Then
|
||||||
ViewState("CveCliente") = DdlClienteSucursalCliente()
|
ViewState("CveCliente") = DdlClienteSucursalCliente()
|
||||||
Else
|
Else
|
||||||
@@ -36127,20 +36164,45 @@ Partial Class Ventas
|
|||||||
DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue)
|
DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue)
|
||||||
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
|
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
|
||||||
|
|
||||||
'si es pago directo es factura
|
|
||||||
If RBLTipoVenta.SelectedValue.Contiene("2") Then ' Pago Directo
|
If RBLTipoVenta.SelectedValue.Contiene("2") Then 'si es pago directo es factura
|
||||||
DdlTipoComprobante.SelectedValueExist("Ing")
|
DdlTipoComprobante.SelectedValueExist("Ing")
|
||||||
TdRequiereTecnico1.Visible = True
|
|
||||||
TdRequiereTecnico2.Visible = True
|
TrVentasMedicas1.Visible = True
|
||||||
ElseIf RBLTipoVenta.SelectedValue.Contiene("4") Then ' Consigna
|
TrVentasMedicas2.Visible = True
|
||||||
DdlTipoComprobante.SelectedValueExist("Ing")
|
|
||||||
Else
|
|
||||||
TdFechaOS1.Visible = True
|
TdFechaOS1.Visible = True
|
||||||
TdFechaOS2.Visible = True
|
TdFechaOS2.Visible = True
|
||||||
ChkRequiereTecnico.Checked = True
|
ChkRequiereTecnico.Checked = True
|
||||||
ChkRequiereTecnico.Enabled = False
|
ChkRequiereTecnico.Enabled = False
|
||||||
|
|
||||||
|
ElseIf RBLTipoVenta.SelectedValue.Contiene("3") Then ' A vista
|
||||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
||||||
DdlTipoComprobante.SelectedValueExist("Ped")
|
DdlTipoComprobante.SelectedValueExist("Ped")
|
||||||
|
TrVentasMedicas1.Visible = False
|
||||||
|
TrVentasMedicas2.Visible = False
|
||||||
|
ChkRequiereTecnico.Enabled = True
|
||||||
|
ElseIf RBLTipoVenta.SelectedValue.Contiene("4") Then ' consignacion
|
||||||
|
DdlTipoComprobante.SelectedValueExist("Ing")
|
||||||
|
TrVentasMedicas1.Visible = False
|
||||||
|
TrVentasMedicas2.Visible = False
|
||||||
|
ChkRequiereTecnico.Enabled = True
|
||||||
|
Else
|
||||||
|
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
|
||||||
|
DdlTipoComprobante.SelectedValueExist("Ped")
|
||||||
|
|
||||||
|
TrVentasMedicas1.Visible = True
|
||||||
|
TrVentasMedicas2.Visible = True
|
||||||
|
|
||||||
|
TdFechaOS1.Visible = True
|
||||||
|
TdFechaOS2.Visible = True
|
||||||
|
|
||||||
|
ChkRequiereTecnico.Enabled = True
|
||||||
|
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
|
||||||
|
TdFechaOS1.Visible = ChkRequiereTecnicoModal.Checked
|
||||||
|
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
DdlTipoComprobante.Enabled = False
|
DdlTipoComprobante.Enabled = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user