This commit is contained in:
Rakcsle Supertramp
2020-02-10 18:13:41 -07:00
16 changed files with 1500 additions and 1264 deletions

View File

@@ -4,7 +4,7 @@ var polylinesGeoRutas = [];
var polybounds = []; var polybounds = [];
function initGeoRutas() { function initGeoRutas() {
NuevaConsultaGeoRutas(); //NuevaConsultaGeoRutas();
var upRutasDiv = document.createElement('div'); var upRutasDiv = document.createElement('div');
var upRutas = new ControlGeoRutas(upRutasDiv, map); var upRutas = new ControlGeoRutas(upRutasDiv, map);
@@ -65,6 +65,8 @@ function NuevaConsultaGeoRutas() {
polylinesGeoRutas = []; polylinesGeoRutas = [];
polybounds = []; polybounds = [];
markersRutas = []; markersRutas = [];
$("#LnkMostarGeoRutas").css("display", "block");
} }
function ControlGeoRutas(controlDiv, map) { function ControlGeoRutas(controlDiv, map) {
@@ -98,7 +100,7 @@ function ControlGeoRutas(controlDiv, map) {
ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; '; ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; ';
ControlSub2.style.msUserSelect = 'none;'; ControlSub2.style.msUserSelect = 'none;';
ControlSub2.style.fontSize = '11px' ControlSub2.style.fontSize = '11px'
ControlSub2.style.display = 'block' ControlSub2.style.display = 'none'
ControlSub2.style.backgroundColor = 'rgb(255,255,255)' ControlSub2.style.backgroundColor = 'rgb(255,255,255)'
ControlSub2.style.padding = '11px' ControlSub2.style.padding = '11px'
ControlSub2.style.backgroundClip = 'padding-box' ControlSub2.style.backgroundClip = 'padding-box'

View File

@@ -0,0 +1,108 @@
//REGION PUNTOS DE INTERES
var markersPI = [];
function initPI() {
//NuevaConsultaPI();
var upRutasDiv = document.createElement('div');
var upRutas = new ControlPI(upRutasDiv, map);
map.controls[google.maps.ControlPosition.TOP_LEFT].push(upRutasDiv);
}
function CreaMarcadorPI(coords, nomEquipo) {
var marker = new google.maps.Marker({
position: coords,
title: nomEquipo,
map: map
});
var infowindow = new google.maps.InfoWindow({
content: '<h4><b>' + nomEquipo + '</b></h4>'
});
marker.addListener('click', function () {
closeLastOpenedInfoWindow();
infowindow.open(map, marker);
lastOpenedInfoWindow = infowindow;
});
markersPI.push(marker);
}
function NuevaConsultaPI() {
for (var j = 0; j < markersPI.length; j++) {
markersPI[j].setMap(null);
}
markersPI = [];
$("#LnkMostarPI").css("display", "block");
}
function ControlPI(controlDiv, map) {
// Set CSS for the control border.
var controlUI = document.createElement('div');
controlUI.style.marginLeft = '10px';
controlUI.style.zIndex = '0';
controlUI.style.cursor = 'pointer';
// controlUI.style.position = 'absolute';
controlUI.style.left = "0px";
controlUI.style.width = "150px";
controlUI.style.marginTop = "10px"
controlUI.style.top = "0px";
controlUI.className = 'gmnoprint';
controlDiv.appendChild(controlUI);
var ControlSub1 = document.createElement('div')
ControlSub1.style.float = 'left';
ControlSub1.className = 'gm-style-mtc'
controlUI.appendChild(ControlSub1)
var ControlSub2 = document.createElement('div')
ControlSub2.style.direction = 'ltr';
ControlSub2.style.overflow = 'hidden';
ControlSub2.id = "LnkMostarPI"
ControlSub2.style.textAlign = 'center';
ControlSub2.style.position = 'relative';
ControlSub2.style.color = 'rgb(0,0,0)';
ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; ';
ControlSub2.style.msUserSelect = 'none;';
ControlSub2.style.fontSize = '11px'
ControlSub2.style.display = 'none'
ControlSub2.style.backgroundColor = 'rgb(255,255,255)'
ControlSub2.style.padding = '11px'
ControlSub2.style.backgroundClip = 'padding-box'
ControlSub2.style.minWidth = '28px'
ControlSub2.style.fontWeight = '500'
ControlSub2.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
ControlSub2.innerHTML = 'Mostrar Puntos de Interés'
ControlSub1.appendChild(ControlSub2)
ControlSub1.addEventListener('click', function () {
VerPI();
});
}
var IsPIVisible = false;
function VerPI() {
if (IsPIVisible) {
HidePI();
IsPIVisible = false;
} else {
CargaPI();
IsPIVisible = true;
}
}
function HidePI() {
for (var j = 0; j < markersPI.length; j++) {
markersPI[j].setMap(null);
}
}
function CargaPI() {
for (var i = 0; i < markersPI.length; i++) {
markersPI[i].setMap(map);
}
}

View File

@@ -1175,7 +1175,7 @@ Partial Class Inventarios_RecepcionUsados
DdlSubProyecto.SelectedValueExist("-1") DdlSubProyecto.SelectedValueExist("-1")
End If End If
EnvioCorreo() ' EnvioCorreo()
CargaPendientesRecibir() CargaPendientesRecibir()
UPDatos.Update() UPDatos.Update()

View File

@@ -584,10 +584,12 @@
function ValidarCantidad(i) { function ValidarCantidad(i) {
var Cant = $("#C_Tab_TabLiberacion_GvMLiberacion_TxtCantidad_" + i).val(); var Cant = $("#C_Tab_TabLiberacion_GvMLiberacion_TxtCantidad_" + i).val();
var CantDisp = $("#C_Tab_TabLiberacion_GvMLiberacion_LblCantidad_" + i).text(); var CantDisp = $("#C_Tab_TabLiberacion_GvMLiberacion_LblCantidad_" + i).text();
if (Cant > CantDisp) {
if (parseFloat(Cant) > parseFloat(CantDisp)) {
$("#C_Tab_TabLiberacion_GvMLiberacion_TxtCantidad_" + i).val(formato_numero(CantDisp, 2, '.', ',')); $("#C_Tab_TabLiberacion_GvMLiberacion_TxtCantidad_" + i).val(formato_numero(CantDisp, 2, '.', ','));
} }
} }
function formato_numero(numero, decimales, separador_decimal, separador_miles) { function formato_numero(numero, decimales, separador_decimal, separador_miles) {
numero = parseFloat(numero); numero = parseFloat(numero);
if (isNaN(numero)) { if (isNaN(numero)) {

View File

@@ -470,7 +470,7 @@
<br /> <br />
<asp:UpdatePanel runat="server"> <asp:UpdatePanel ID="UpNuevoRealizar" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row" style="text-align: center;"> <div class="row" style="text-align: center;">
<div class="col-md-12"> <div class="col-md-12">

View File

@@ -913,19 +913,41 @@ Partial Class Inventarios_TraspasoAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim resultado As DataTable = ObjInventario.DtResultados Dim resultado As DataTable = ObjInventario.DtResultados
Dim importe As Decimal = resultado.SUM("Total").ToDecimal Dim importe As Decimal = resultado.SUMD("Total")
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero
Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero
Dim Contabilizable As Boolean = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then If IdCtaContableSalida = IdCtaContableEntrada Then Contabilizable = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableSalida, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
ErrorMovInv = True ErrorMovInv = True
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableEntrada, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then
ErrorMovInv = True ErrorMovInv = True
End If End If
End If End If
End If End If
End If End If
Else
If Not ErrorMovInv Then
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim resultado As DataTable = ObjInventario.DtResultados
Dim importe As Decimal = resultado.SUM("Total").ToDecimal
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
ErrorMovInv = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
ErrorMovInv = True
End If
End If
End If
End If End If
@@ -989,7 +1011,7 @@ Partial Class Inventarios_TraspasoAlmacen
If ErrorExistencia Then If ErrorExistencia Then
CargaGvDatos() CargaGvDatos()
End If End If
ObjConta.Dispose()
ObjInventario.Dispose() ObjInventario.Dispose()
End Sub End Sub
@@ -1573,6 +1595,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Folio = 0 Dim Folio = 0
Dim ErrorMovInv As Boolean = False Dim ErrorMovInv As Boolean = False
Dim TextoError = "" Dim TextoError = ""
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
'' verifica que no se halla recibido previamente, si ya se recibió da salida '' verifica que no se halla recibido previamente, si ya se recibió da salida
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
@@ -1644,7 +1667,23 @@ Partial Class Inventarios_TraspasoAlmacen
End If End If
Cont += 1 Cont += 1
Next Next
If Not ErrorMovInv Then
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservacionesRecepcion.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim resultado As DataTable = ObjInventario.DtResultados
Dim importe As Decimal = resultado.SUM("Total").ToDecimal
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
ErrorMovInv = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
ErrorMovInv = True
End If
End If
End If
End If End If
@@ -1773,6 +1812,7 @@ Partial Class Inventarios_TraspasoAlmacen
Alert(TextoError, TipoMensaje.MsgError) Alert(TextoError, TipoMensaje.MsgError)
End If End If
ObjInventario.Dispose() ObjInventario.Dispose()
ObjConta.Dispose()
CargaRecepcion() CargaRecepcion()
Else Else
Alert("No hay movimientos para el traspaso", TipoMensaje.MsgAdvertencia) Alert("No hay movimientos para el traspaso", TipoMensaje.MsgAdvertencia)

View File

@@ -591,7 +591,7 @@
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="Ddlcliente" OnSelectedIndexChanged="Ddlcliente_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" Width="100%" DataTextField="Nombre" DataValueField="CveCliente" runat="server"></asp:DropDownList> <asp:DropDownList ID="Ddlcliente" OnSelectedIndexChanged="Ddlcliente_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" Width="100%" DataTextField="CodigoNombre" DataValueField="CveCliente" runat="server"></asp:DropDownList>
<%-- <asp:RangeValidator ID="RVCliente" CssClass="form-control" runat="server" ControlToValidate="Ddlcliente" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator> <%-- <asp:RangeValidator ID="RVCliente" CssClass="form-control" runat="server" ControlToValidate="Ddlcliente" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RVCliente" Width="300px"></ajax:ValidatorCalloutExtender>--%> <ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RVCliente" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>

View File

@@ -83,8 +83,8 @@ Partial Class CatSubProyectos
Private Sub RecargaGlobal() Private Sub RecargaGlobal()
Dim ObjSubProyectos As New ClsSubProyectos Dim ObjSubProyectos As New ClsSubProyectos
If ObjSubProyectos.GetSubProyectos() Then If ObjSubProyectos.GetSubProyectos(UsuarioActual.CveEmpresa) Then
GlobalDTSubProyectos(-1) = ObjSubProyectos.DtResultados GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = ObjSubProyectos.DtResultados
End If End If
ObjSubProyectos.Dispose() ObjSubProyectos.Dispose()
End Sub End Sub
@@ -400,6 +400,7 @@ Partial Class CatSubProyectos
RecargaGlobal() RecargaGlobal()
Else Else
ObjSubproyectos.RollBack() ObjSubproyectos.RollBack()
RecargaGlobal()
End If End If
'se regeneran los subproyectos 'se regeneran los subproyectos

View File

@@ -346,7 +346,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Generar NC" Visible="false" > <asp:TemplateField HeaderText="Generar NC" Visible="false" >
<ItemTemplate> <ItemTemplate>
<asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false"></asp:CheckBox> <asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false" Enabled="false"></asp:CheckBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="300px"> <asp:TemplateField ItemStyle-Width="300px">
@@ -501,7 +501,7 @@
var Ventas = ''; var Ventas = '';
function FnSuma(t, txt, importe) { function FnSuma(t, txt, importe) {
debugger;
var chkPesosBancos = $get("ChkPagarPesos"); var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares"); var chkDolaresBancos = $get("ChkPagarDolares");
@@ -526,7 +526,7 @@
} }
function SumaValores(pagoMultiple, monedaPago) { function SumaValores(pagoMultiple, monedaPago) {
debugger;
var Importe = 0; var Importe = 0;
var Comision = 0.00; var Comision = 0.00;
var topLevelElem = document.getElementById("form1"); var topLevelElem = document.getElementById("form1");
@@ -614,8 +614,6 @@
} }
function FnCambia(chk, txt, saldo, op, pagoMultiple, monedaPago) { function FnCambia(chk, txt, saldo, op, pagoMultiple, monedaPago) {
debugger;
if (op == 1) { if (op == 1) {
if (txt.value != '') { if (txt.value != '') {
chk.checked = true; chk.checked = true;
@@ -650,9 +648,20 @@
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaConversion, 2) + ' MXN'; $get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaConversion, 2) + ' MXN';
} }
} }
function FnSeleccionaNC(chk, chkNC)
{
if (chk.checked) {
chkNC.disabled = false;
chkNC.click();
} else {
chkNC.disabled = true;
if (chkNC.checked) {
chkNC.click();
}
}
}
function FnLimites(chk, txt, limiteInferior, limiteSuperior) { function FnLimites(chk, txt, limiteInferior, limiteSuperior) {
debugger;
if (ToDouble(txt.value) < limiteInferior) { if (ToDouble(txt.value) < limiteInferior) {
txt.value = limiteInferior; txt.value = limiteInferior;
alert("El Importe no debe de exceder a el saldo"); alert("El Importe no debe de exceder a el saldo");
@@ -674,11 +683,8 @@
} }
function CambiaPesosDolares() { function CambiaPesosDolares() {
debugger;
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2); $get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
$('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2)) $('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2))
debugger;
if ($("#LbImporteME").length) { if ($("#LbImporteME").length) {
$get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' USD'; $get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' USD';
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value) * ToDouble($get('TxtTC').value), 2); $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value) * ToDouble($get('TxtTC').value), 2);
@@ -691,12 +697,12 @@
} }
function CambiaDolaresPesos() { function CambiaDolaresPesos() {
debugger;
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2); $get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
$('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2)) $('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2))
debugger;
if ($("#LbImporteMN").length) { if ($("#LbImporteMN").length) {
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN'; $get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN';
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTCDolares').value), 2); $get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTCDolares').value), 2);
@@ -743,7 +749,7 @@
for (var i = 0; i < textBoxes.length; i++) { for (var i = 0; i < textBoxes.length; i++) {
if (textBoxes[i].type == "checkbox") { if (textBoxes[i].type == "checkbox") {
debugger;
if (textBoxes[i].id == "ChkAll") { if (textBoxes[i].id == "ChkAll") {
check = !textBoxes[i].checked; check = !textBoxes[i].checked;

File diff suppressed because it is too large Load Diff

View File

@@ -2830,6 +2830,7 @@
<ADS:DropDownLost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange" > <ADS:DropDownLost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange" >
</ADS:DropDownLost> </ADS:DropDownLost>
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" /> <asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
<asp:HiddenField ID="HdnPSAjusteClasificacion" ClientIDMode="Static" runat="server" Value="-1" />
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label> <label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
</div> </div>
</div> </div>
@@ -2916,6 +2917,7 @@
<div class="col-md-8"> <div class="col-md-8">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:CustomValidator id="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" />
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator> <asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%> <%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%> <%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
@@ -3011,23 +3013,65 @@
<script type="text/javascript"> <script type="text/javascript">
function ValidarCodigoEnsamble(source, arguments) { function ValidarCodigoEnsamble(source, arguments) {
var CveMarca = HdnPSAjusteMarca.value; let CveMarca = HdnPSAjusteMarca.value;
let CveClasificacion = HdnPSAjusteClasificacion.value;
let regex = "";
//SI ES MOTOBATERIA
if (CveClasificacion = "20517") {
regex = "[*]|"
//SI ES OPTIMA
} else if (CveClasificacion = "20511") {
regex = "[1X]|"
}
//MARCA OPTIMA
if (CveMarca == "1086") { if (CveMarca == "1086") {
var re = new RegExp("^[0-9]+$"); let re = new RegExp("^" + regex + "[0-9]+$");
arguments.IsValid = re.test(parseInt(arguments.Value));
return;
} else {
let re = new RegExp("^" + regex + "[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$");
arguments.IsValid = re.test(arguments.Value);
return;
}
}
function ValidarCodigoLinea(source, arguments) {
var CveMarca = HdnPSAjusteMarca.value;
let CveClasificacion = HdnPSAjusteClasificacion.value;
let regex = "";
//SI ES MOTOBATERIA
if (CveClasificacion = "20517") {
regex = "[*]|";
} else {
regex = "";
}
if (CveMarca == "1086") {
var re = new RegExp("^" + regex + "[0-9]+$");
arguments.IsValid = re.test(parseInt(arguments.Value)); arguments.IsValid = re.test(parseInt(arguments.Value));
} else { } else {
var re = new RegExp("^[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$"); var re = new RegExp("^" + regex + "$");
arguments.IsValid = re.test(arguments.Value); arguments.IsValid = re.test(arguments.Value);
} }
} }
function ValidarCodigoLinea(source, arguments) {
var CveMarca = HdnPSAjusteMarca.value; function ValidarCodigoInspeccion(source, arguments) {
if (CveMarca == "1086") { let CveClasificacion = HdnPSAjusteClasificacion.value;
var re = new RegExp("^[0-9]+$");
let clasificaciones = ["20517", "20511"]
//SI ES MOTOBATERIA
if (clasificaciones.includes(CveClasificacion)) {
var re = new RegExp("^[*]|[A-L][0-9][1-9A-Z][A-HJ-M]$");
arguments.IsValid = re.test(parseInt(arguments.Value)); arguments.IsValid = re.test(parseInt(arguments.Value));
return;
} else { } else {
var re = new RegExp("^[*]$"); var re = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$");
arguments.IsValid = re.test(arguments.Value); arguments.IsValid = re.test(arguments.Value);
return;
} }
} }

View File

@@ -5232,11 +5232,13 @@ Partial Class PV
Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero
Dim PrecioSugerido As Decimal = 0 Dim PrecioSugerido As Decimal = 0
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("") Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
Dim CveMarca As Integer Dim CveMarca As Integer = -1
Dim CveClasificacion As Integer = -1
If drPS IsNot Nothing Then If drPS IsNot Nothing Then
PrecioSugerido = drPS("Precio").ToString.ToDecimal PrecioSugerido = drPS("Precio").ToString.ToDecimal
CveMarca = drPS("CveMarca").ToString.ToEntero CveMarca = drPS("CveMarca").ToString.ToEntero
CveClasificacion = drPS("CveClasificacion").ToString.ToEntero
End If End If
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2) TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
@@ -5247,6 +5249,7 @@ Partial Class PV
DdlTipoUso.DataBind() DdlTipoUso.DataBind()
HdnPSAjusteMarca.Value = CveMarca.ToString() HdnPSAjusteMarca.Value = CveMarca.ToString()
HdnPSAjusteClasificacion.Value = CveClasificacion.ToString()
End If End If

View File

@@ -230,7 +230,7 @@ Partial Class RepVentaDetalle
ImgExcel.Visible = False ImgExcel.Visible = False
End If End If
If UsuarioActual.CveVendedor > 0 Then If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
DdlVendedor.SelectedValuesIfExistM(UsuarioActual.CveVendedor.ToString) DdlVendedor.SelectedValuesIfExistM(UsuarioActual.CveVendedor.ToString)
DdlVendedor.Attributes.Add("disabled", "") DdlVendedor.Attributes.Add("disabled", "")
DdlVendedor.Enabled = False DdlVendedor.Enabled = False

View File

@@ -212,10 +212,6 @@
<%--INICIA: CANCELAR - NC - DEVOLUCION [OLD]--%> <%--INICIA: CANCELAR - NC - DEVOLUCION [OLD]--%>
<li>
<asp:LinkButton ID="LkDevolucion" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Devolución"
data-toggle="confirmation" data-popout="true" data-original-title="¿Aplicar Devolución?" data-btn-ok-label="si" Visible="false" />
</li>
<%--<li> <%--<li>
<asp:LinkButton ID="LkNotaCredito" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Nota de crédito" <asp:LinkButton ID="LkNotaCredito" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Nota de crédito"
data-toggle="confirmation" data-popout="true" data-original-title="¿Aplicar Nota de crédito?" data-btn-ok-label="si" Visible="false" /> data-toggle="confirmation" data-popout="true" data-original-title="¿Aplicar Nota de crédito?" data-btn-ok-label="si" Visible="false" />
@@ -359,7 +355,7 @@
<li> <li>
<asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Póliza Virtual</asp:LinkButton> <asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Póliza Virtual</asp:LinkButton>
</li> </li>
<%-- <li> <%-- <li>
<asp:LinkButton runat="server" ID="LnkDescargarFacturaPrueba" OnClick="LnkDescargarFacturaPrueba_Click">Descargar Factura Prueba</asp:LinkButton> <asp:LinkButton runat="server" ID="LnkDescargarFacturaPrueba" OnClick="LnkDescargarFacturaPrueba_Click">Descargar Factura Prueba</asp:LinkButton>
</li>--%> </li>--%>
</ContentTemplate> </ContentTemplate>
@@ -368,7 +364,7 @@
<asp:PostBackTrigger ControlID="BtnContabilizar" /> <asp:PostBackTrigger ControlID="BtnContabilizar" />
<asp:PostBackTrigger ControlID="BtnContabilizar" /> <asp:PostBackTrigger ControlID="BtnContabilizar" />
<asp:PostBackTrigger ControlID="LnkImprimirFormatoCicovisa" /> <asp:PostBackTrigger ControlID="LnkImprimirFormatoCicovisa" />
<%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%> <%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%>
<%-- <asp:PostBackTrigger ControlID="LbDescargarExcel" />--%> <%-- <asp:PostBackTrigger ControlID="LbDescargarExcel" />--%>
</Triggers> </Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -6094,7 +6090,7 @@
<asp:GridView ID="GvAplicaDevolucion" runat="server" OnRowDataBound="GvAplicaDevolucion_RowDataBound" AutoGenerateColumns="false" GridLines="None" CssClass="table table-grid table-striped table-advance table-hover Widthall" <asp:GridView ID="GvAplicaDevolucion" runat="server" OnRowDataBound="GvAplicaDevolucion_RowDataBound" AutoGenerateColumns="false" GridLines="None" CssClass="table table-grid table-striped table-advance table-hover Widthall"
DataKeyNames="CveVentaDetalle, PU, Total, Cantidad,Descuento,CvePS,PS,Codigo,CodigoPS,CveTipoPS,CveTipoInvPS,CveUM,UM,CveClasificacion, DataKeyNames="CveVentaDetalle, PU, Total, Cantidad,Descuento,CvePS,PS,Codigo,CodigoPS,CveTipoPS,CveTipoInvPS,CveUM,UM,CveClasificacion,
Clasificacion,CveProyecto,Proyecto,CveSubProyecto,SubProyecto,Obs,PorcentajeIVA,ImporteIVA,PorcentajeRetIVA,ImporteRetIVA,PorcentajeRetISR, Clasificacion,CveProyecto,Proyecto,CveSubProyecto,SubProyecto,Obs,PorcentajeIVA,ImporteIVA,PorcentajeRetIVA,ImporteRetIVA,PorcentajeRetISR,
ImporteRetISR,PorcentajeIEPS,ImporteIEPS,SATClaveProdServ,SATClaveUM,CantSur,CantRes" ImporteRetISR,PorcentajeIEPS,ImporteIEPS,SATClaveProdServ,SATClaveUM,CantSur,CantRes,CveTamaño"
AllowPaging="False"> AllowPaging="False">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
@@ -6510,6 +6506,25 @@
} }
} }
function CalculaSaldoRNCChk(TxtImporte, Saldo, Chk) {
if (Chk.checked) {
TxtImporte.value = FormatoNumero(Saldo, 2);
} else {
TxtImporte.value = "";
}
}
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
var Importe = 0;
if (TxtImporte.value != '') {
Importe = parseFloat(TxtImporte.value);
}
if (Importe > Saldo) {
TxtImporte.value = FormatoNumero(Saldo, 2);
} else {
TxtImporte.value = FormatoNumero(Importe, 2);;
}
}
function CalculaTotalChk(Total, SubTotal, TxtTotalGv, TxtImporte, Saldo, Porcentaje, Chk) { function CalculaTotalChk(Total, SubTotal, TxtTotalGv, TxtImporte, Saldo, Porcentaje, Chk) {
var Importe = 0, ImporteSinPorcentaje = 0; var Importe = 0, ImporteSinPorcentaje = 0;
@@ -6535,18 +6550,18 @@
} }
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') { if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC(); CompararNC();
} }
} }
function CalculaTotalRNCChk(TxtImporte, Saldo, Chk) { function CalculaTotalRNCChk(TxtImporte, Saldo, Chk) {
if (Chk.checked) { if (Chk.checked) {
TxtImporte.value = FormatoNumero(Saldo, 2); TxtImporte.value = FormatoNumero(Saldo, 2);
} else { } else {
TxtImporte.value = ""; TxtImporte.value = "";
} }
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') { if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC(); CompararNC();
} }
} }
@@ -6985,17 +7000,17 @@
function SetDisabledTxtTotal(valor) { function SetDisabledTxtTotal(valor) {
DisabledTxtTotal = valor; DisabledTxtTotal = valor;
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal); $('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
} }
function loadpage() { function loadpage() {
$('.AjustaT').each(function () { $('.AjustaT').each(function () {
AjustaTotales($(this)); AjustaTotales($(this));
}) })
$('.AjustaT').change(function () { $('.AjustaT').change(function () {
AjustaTotales($(this)); AjustaTotales($(this));
}); });
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal); $('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
} }

View File

@@ -3544,7 +3544,6 @@ Partial Class Ventas
If TienePermiso <> "" Then ' si tiene acceso en el subproyecto If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175) 'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175)
If UsuarioActual.TienePermisoProceso(264) Then If UsuarioActual.TienePermisoProceso(264) Then
LkDevolucion.Visible = True
InicializaAplicaDevolucion() InicializaAplicaDevolucion()
End If End If
End If End If
@@ -6420,7 +6419,7 @@ Partial Class Ventas
'VALIDA EXISTENCIA 'VALIDA EXISTENCIA
CveProducto = dr("CvePS").ToString.ToEntero CveProducto = dr("CvePS").ToString.ToEntero
CveUnidad = dr("CveUM").ToString.ToEntero CveUnidad = dr("CveUM").ToString.ToEntero
Cantidad = TmpDT.SUM("Cantidad", $"CvePS = {CveProducto}") 'VALIDA CONTRA LA SUMA DEL MISMO PS Cantidad = TmpDT.SUM("Cantidad", $"CvePS = {CveProducto} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") 'VALIDA CONTRA LA SUMA DEL MISMO PS
If UsuarioActual.Empresa.UsaInventarios AndAlso RemisionesLista.Count < 1 AndAlso dr("EntregaDirecta").ToString.ToEntero < 1 Then If UsuarioActual.Empresa.UsaInventarios AndAlso RemisionesLista.Count < 1 AndAlso dr("EntregaDirecta").ToString.ToEntero < 1 Then
Existencia = ObjInventarios.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1) Existencia = ObjInventarios.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
If Existencia < Cantidad Then If Existencia < Cantidad Then
@@ -7694,7 +7693,9 @@ Partial Class Ventas
'ObjFactura.RefDocto = TxtDocto.Text.Trim 'ObjFactura.RefDocto = TxtDocto.Text.Trim
ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1) 'si es cancelacion, debe de conservar el folio actual
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1)
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero, -1) 'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero, -1)
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text) ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second) ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
@@ -13827,7 +13828,7 @@ Partial Class Ventas
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
'VALIDA EXISTENCIA 'VALIDA EXISTENCIA
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS}") < TxtCantidad.Text.ToDouble Then If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia) Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
Return False Return False
End If End If
@@ -13880,6 +13881,12 @@ Partial Class Ventas
If PU * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal) >= DtPromociones.FiltroPrimeroValor("PUPromocion", $"CvePS = {CvePS}").ToDecimal Then If PU * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal) >= DtPromociones.FiltroPrimeroValor("PUPromocion", $"CvePS = {CvePS}").ToDecimal Then
EsValido = True EsValido = True
End If End If
Else
'valida sino tiene promocion la clasificacion
If DtPromociones.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero}").Rows.Count > 0 Then
''falta aplicar si tiene promocion
End If
End If End If
End If End If
@@ -16268,12 +16275,7 @@ Partial Class Ventas
Response.Redirect(url) Response.Redirect(url)
End Sub End Sub
Private Sub BtnGenerarNC_Click(sender As Object, e As EventArgs) Handles LkDevolucion.Click
Dim url As String = String.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=0", CveVenta)
Response.Redirect(url)
End Sub
'Private Sub LkNotaCreditoC_Click(sender As Object, e As EventArgs) Handles LkNotaCredito.Click 'Private Sub LkNotaCreditoC_Click(sender As Object, e As EventArgs) Handles LkNotaCredito.Click
' Dim url As String = String.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=2", CveVenta) ' Dim url As String = String.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=2", CveVenta)
@@ -16409,6 +16411,7 @@ Partial Class Ventas
DdlMetodoPago33.Enabled = True DdlMetodoPago33.Enabled = True
DdlFormaPago33.Enabled = True DdlFormaPago33.Enabled = True
UPCondicionesPago.Update() UPCondicionesPago.Update()
If Me.PermiteCredito Then RBLPago.Enabled = True
ModalidadEdicion = True ModalidadEdicion = True
@@ -17026,7 +17029,19 @@ Partial Class Ventas
Dim total As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal Dim total As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal
DtPagos = Nothing DtPagos = Nothing
InicializaCondicionesPago()
DtPagos = New DataTable
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
DtPagos.Columns.Add("TipoMovimiento", GetType(String))
DtPagos.Columns.Add("CveCuenta", GetType(String))
DtPagos.Columns.Add("Cuenta", GetType(String))
DtPagos.Columns.Add("Folio", GetType(String))
DtPagos.Columns.Add("Importe", GetType(Decimal))
DtPagos.Columns.Add("Observaciones", GetType(String))
DtPagos.Columns.Add("Tipo", GetType(String))
DtPagos.Columns.Add("CveMetodoPago", GetType(Integer))
DtPagos.Columns.Add("MesesSinIntereses", GetType(Integer))
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
@@ -21059,6 +21074,12 @@ Partial Class Ventas
UpDescNC.Update() UpDescNC.Update()
End Sub End Sub
Protected Sub GvDescNC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
End If
End Sub
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -21347,7 +21368,7 @@ Partial Class Ventas
PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double, PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double,
Total As Double, SerieLote As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String, Total As Double, SerieLote As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer, SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer) CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1)
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
Row = TmpDT.NewRow() Row = TmpDT.NewRow()
@@ -21406,6 +21427,8 @@ Partial Class Ventas
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
Row("CveTamaño") = CveTamaño
TmpDT.Rows.Add(Row) TmpDT.Rows.Add(Row)
End Sub End Sub
@@ -21417,7 +21440,6 @@ Partial Class Ventas
'LIMPIA ACCIONES 'LIMPIA ACCIONES
HLOrdendeCompra.Visible = False HLOrdendeCompra.Visible = False
LkDevolucion.Visible = False
LBAplicaDevolucion.Visible = False LBAplicaDevolucion.Visible = False
'LkNotaCredito.Visible = False 'LkNotaCredito.Visible = False
LkEliminarFactura.Visible = False LkEliminarFactura.Visible = False
@@ -21544,7 +21566,7 @@ Partial Class Ventas
#Region " APLICA DEVOLUCION " #Region " APLICA DEVOLUCION "
Private Sub InicializaAplicaDevolucion() Private Sub InicializaAplicaDevolucion()
If Not UsuarioActual.CveUsuario = 100 Then If Not UsuarioActual.CveUsuario = 100 Then
If Not UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then If Not UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 140, 141, 146) Then
Exit Sub Exit Sub
End If End If
End If End If
@@ -21554,13 +21576,13 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
LkDevolucion.Visible = False
LBAplicaDevolucion.Visible = True LBAplicaDevolucion.Visible = True
Dim SeEsconde As Boolean = False Dim SeEsconde As Boolean = False
Dim ObjVenta As New ClsVentas Dim ObjVenta As New ClsVentas
If ObjVenta.GetVentaDetalle(CveVenta) Then If ObjVenta.GetVentaDetalle(CveVenta) Then
If Not ObjVenta.DtResultados.SUM("CantSur").ToString.ToDecimal > 0 Then SeEsconde = True If Not ObjVenta.DtResultados.SUM("CantSur").ToString.ToDecimal > 0 Then SeEsconde = True
GvAplicaDevolucion.DataSource = ObjVenta.DtResultados.FiltraParametros("CantRes > 0") 'NO MOSTRAR LOS PRODUCTOS CON LA CLASIFICACION DE USADOS
GvAplicaDevolucion.DataSource = ObjVenta.DtResultados.FiltraParametros("CantRes > 0 AND CveClasificacion <> 20519")
End If End If
ObjVenta.Dispose() ObjVenta.Dispose()
@@ -21609,6 +21631,8 @@ Partial Class Ventas
Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253) Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253)
Dim DtUsados As DataTable = TmpDT.FiltraParametros("CveClasificacion = 20519")
TmpDT.Clear() TmpDT.Clear()
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
If Gv.FCCheckBox("Chk").Checked And Gv.FCTextBox("TxtCantidadAplicaDevolucion").Text.ToDecimal > 0 Then If Gv.FCCheckBox("Chk").Checked And Gv.FCTextBox("TxtCantidadAplicaDevolucion").Text.ToDecimal > 0 Then
@@ -21631,9 +21655,48 @@ Partial Class Ventas
Gv.DataKey("PorcentajeRetIVA").ToString.ToDecimal, ImporteRetIVA, Gv.DataKey("PorcentajeRetIVA").ToString.ToDecimal, ImporteRetIVA,
Gv.DataKey("PorcentajeRetISR").ToString.ToDecimal, ImporteRetISR, Gv.DataKey("PorcentajeIEPS").ToString.ToDecimal, Gv.DataKey("PorcentajeRetISR").ToString.ToDecimal, ImporteRetISR, Gv.DataKey("PorcentajeIEPS").ToString.ToDecimal,
ImporteIEPS, -1, Descuento, Total, "", "", -1, -1, ImporteIEPS, -1, Descuento, Total, "", "", -1, -1,
Gv.DataKey("SATClaveProdServ").ToString, Gv.DataKey("SATClaveUM").ToString, -1, Gv.DataKey("CveVentaDetalle").ToString.ToEntero, -1, -1, -1, -1) Gv.DataKey("SATClaveProdServ").ToString, Gv.DataKey("SATClaveUM").ToString, -1, Gv.DataKey("CveVentaDetalle").ToString.ToEntero, -1, -1, -1, -1, Gv.DataKey("CveTamaño").ToEntero())
End If End If
Next Next
'AGREGAR LOS USADOS EN LA DEVOLUCION
CalculaUsados(DtUsados)
'If DtUsados IsNot Nothing AndAlso DtUsados.Rows.Count > 0 Then
' Dim DtPSVenta As DataTable = TmpDT.Copy()
' For Each Row As DataRow In DtPSVenta.Rows
' Dim RowCargo As DataRow = DTTamanios.FiltroPrimero($"CveTamaño = { Row("CveTamaño").ToString.ToEntero } ")
' If RowCargo IsNot Nothing Then
' Dim CvePSCargo As Integer = RowCargo("CvePSCargo").ToString.ToEntero
' For Each RowUsado As DataRow In DtUsados.FiltraParametros($"CvePS = {CvePSCargo}").Rows
' 'If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
' 'End If
' Dim Cantidad As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
' Dim Descuento As Decimal = Cantidad * RowUsado("Descuento").ToString.ToDecimal / RowUsado("Cantidad").ToString.ToDecimal
' Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal()
' Dim Total As Decimal = (Cantidad * PU)
' Dim TotalImpuestos As Decimal = (Cantidad * PU) - Descuento
' Dim ImporteIVA As Decimal = TotalImpuestos * RowUsado("PorcentajeIVA").ToString.ToDecimal
' Dim ImporteRetIVA As Decimal = TotalImpuestos * RowUsado("PorcentajeRetIVA").ToString.ToDecimal
' Dim ImporteRetISR As Decimal = TotalImpuestos * RowUsado("PorcentajeRetISR").ToString.ToDecimal
' Dim ImporteIEPS As Decimal = TotalImpuestos * RowUsado("PorcentajeIEPS").ToString.ToDecimal
' AgregaTempDT(TmpDT, RowUsado("CvePS").ToString.ToEntero, RowUsado("PS").ToString, RowUsado("Codigo").ToString, RowUsado("CodigoPS").ToString,
' RowUsado("CveTipoPS").ToString.ToEntero, RowUsado("CveTipoInvPS").ToString.ToEntero,
' RowUsado("CveUM").ToString.ToEntero, RowUsado("UM").ToString, RowUsado("CveClasificacion").ToString.ToEntero,
' RowUsado("Clasificacion").ToString, RowUsado("CveProyecto").ToString.ToEntero, RowUsado("Proyecto").ToString,
' RowUsado("CveSubProyecto").ToString.ToEntero, RowUsado("SubProyecto").ToString,
' RowUsado("Obs").ToString, Cantidad, PU, RowUsado("PorcentajeIVA").ToString.ToDecimal, ImporteIVA,
' RowUsado("PorcentajeRetIVA").ToString.ToDecimal, ImporteRetIVA,
' RowUsado("PorcentajeRetISR").ToString.ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString.ToDecimal,
' ImporteIEPS, -1, Descuento, Total, "", "", -1, -1,
' RowUsado("SATClaveProdServ").ToString, RowUsado("SATClaveUM").ToString, -1, RowUsado("CveVentaDetalle").ToString.ToEntero, -1, -1, -1, -1)
' Next
' End If
' Next
'End If
TrTipoRelacion.Visible = True TrTipoRelacion.Visible = True
DdlTiposRelacion.SelectedValueExist("3") DdlTiposRelacion.SelectedValueExist("3")
@@ -21733,7 +21796,6 @@ Partial Class Ventas
BtnEmitir.Visible = False BtnEmitir.Visible = False
'REINICIALIZA ACCIONES 'REINICIALIZA ACCIONES
LkDevolucion.Visible = False
'LkNotaCredito.Visible = False 'LkNotaCredito.Visible = False
LkEliminarFactura.Visible = False LkEliminarFactura.Visible = False
ImgDownCancelacion.Visible = False ImgDownCancelacion.Visible = False
@@ -23379,7 +23441,6 @@ Partial Class Ventas
BtnGenerarOS.Visible = False BtnGenerarOS.Visible = False
BtnsFacturar.Visible = False BtnsFacturar.Visible = False
HLOrdendeCompra.Visible = False HLOrdendeCompra.Visible = False
LkDevolucion.Visible = False
LBAplicaDevolucion.Visible = False LBAplicaDevolucion.Visible = False
'LkNotaCredito.Visible = False 'LkNotaCredito.Visible = False
LkEliminarFactura.Visible = False LkEliminarFactura.Visible = False
@@ -23701,8 +23762,8 @@ Partial Class Ventas
#Region "U S A D O S" #Region "U S A D O S"
Private Sub CalculaUsados() Private Sub CalculaUsados(Optional DtUsadosDevolucion As DataTable = Nothing)
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot") Then If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then
Dim DTTamanios As DataTable = GlobalDTAcumTamaños() Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
Dim DTCvePSCostos As DataTable Dim DTCvePSCostos As DataTable
@@ -23820,16 +23881,23 @@ Partial Class Ventas
End If End If
Next Next
For Each drowPsTamaños As DataRow In DTPSTemp.Rows For Each drowPsTamaños As DataRow In DTPSTemp.Rows
Modalidad = "A" Modalidad = "A"
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
Dim CveVentaDetalleDevolucion As Integer = -1
If DtUsadosDevolucion IsNot Nothing AndAlso DtUsadosDevolucion.Rows.Count > 0 Then
CveVentaDetalleDevolucion = DtUsadosDevolucion.FiltroPrimeroValor("CveVentaDetalle", $"CvePS = {drowPsTamaños("CvePS").ToString.ToEntero}").ToEntero()
End If
AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString, AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero, drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero, drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
drowPsTamaños("SubProyecto").ToString) drowPsTamaños("SubProyecto").ToString, CveVentaDetalle:=CveVentaDetalleDevolucion)
End If End If
Next Next
End If End If
End Sub End Sub

View File

@@ -7,6 +7,12 @@
<StartupServices> <StartupServices>
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/> <Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
</StartupServices> </StartupServices>
</VisualWebDeveloper> </VisualWebDeveloper>