Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -331,10 +331,10 @@
|
||||
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio,CondicionesPago,PlazoCobranza">
|
||||
<Columns>
|
||||
<%--<asp:BoundField HeaderText="Atención" DataField="AtencionA" />--%>
|
||||
<asp:TemplateField HeaderText="Atención/Cliente" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblAtencionA" Font-Italic="true" Text='<%# Eval("AtencionA") %>' ></asp:Label><br />
|
||||
<asp:Label runat="server" ID="Label4" Text='<%# Eval("NombreComercial") %>' ></asp:Label>
|
||||
<asp:TemplateField HeaderText="Atención/Cliente" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblAtencionA" Font-Italic="true" Text='<%# Eval("AtencionA") %>'></asp:Label><br />
|
||||
<asp:Label runat="server" ID="Label4" Text='<%# Eval("NombreComercial") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
||||
@@ -401,7 +401,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<asp:LinkButton ID="ImgAntiPend" Visible="false" OnClick="ImgAntiPend_Click" runat="server" Text=" <i class='fa fa-money' style='font-size: 18px !important; color: #3c763d !important;'></i> " AlternateText="Aplicación de anticipos" Style="cursor: pointer;" />
|
||||
|
||||
|
||||
<b>Nombre:</b>
|
||||
</div>
|
||||
<div class="col-md-4"> <label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label> </div>
|
||||
@@ -553,42 +553,32 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chequesie1" runat="server" id="DivContadoOtros" visible="false">
|
||||
<div class="row">
|
||||
<asp:UpdatePanel class="chequesie1" runat="server" ID="UpContadoOtros" Visible="false" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>TD/TC/Trans.:</label>
|
||||
</div>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteOtrosContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FETxtImporteOtrosContado" runat="server" TargetControlID="TxtImporteOtrosContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true">
|
||||
<asp:ListItem Value="-1">Otros</asp:ListItem>
|
||||
<asp:ListItem Value="1">Credito</asp:ListItem>
|
||||
<asp:ListItem Value="2">Debito</asp:ListItem>
|
||||
<asp:ListItem Value="3">Cheque</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" CssClass="form-control input-sm select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlOtroFormaPago_SelectedIndexChanged">
|
||||
<asp:ListItem Value="-1">Seleccione</asp:ListItem>
|
||||
<asp:ListItem Value="1">Debito</asp:ListItem>
|
||||
<asp:ListItem Value="2">Crédito</asp:ListItem>
|
||||
<asp:ListItem Value="3">Transferencia</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlCuentaOtrosContado" runat="server" CssClass="form-control input-sm select2me" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteOtrosContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FETxtImporteOtrosContado" runat="server" TargetControlID="TxtImporteOtrosContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" runat="server" id="DivContadoOtrosCuenta">
|
||||
<asp:DropDownList ID="DdlCuentaOtrosContado" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender24" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" runat="server" id="DivMesesSinIntereses2" visible="false">
|
||||
<asp:DropDownList ID="DdlMesesSinIntereses2" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%">
|
||||
<asp:ListItem Value="-1">Meses</asp:ListItem>
|
||||
<asp:ListItem Value="3">3M</asp:ListItem>
|
||||
<asp:ListItem Value="6">6M</asp:ListItem>
|
||||
<asp:ListItem Value="9">9M</asp:ListItem>
|
||||
<asp:ListItem Value="12">12M</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
@@ -613,10 +603,10 @@
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2" id="divPagar">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
@@ -666,11 +656,11 @@
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="PanelIniciarTurno" TargetControlID="btnShow"
|
||||
@@ -1276,152 +1266,154 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Scripts/PrintJS/print.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
//function impresionDirecta(urlPDF) {
|
||||
// printJS({ printable: urlPDF, type: 'pdf', showModal: true });
|
||||
//}
|
||||
//function impresionDirecta(urlPDF) {
|
||||
// printJS({ printable: urlPDF, type: 'pdf', showModal: true });
|
||||
//}
|
||||
|
||||
function chkAnt(t, txt, importe, AmorContrato = 0) {
|
||||
let totalAnt = 0;
|
||||
function chkAnt(t, txt, importe, AmorContrato = 0) {
|
||||
let totalAnt = 0;
|
||||
|
||||
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
||||
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
||||
|
||||
//si es con.nc,es.el.total
|
||||
let Total = ToDouble($get("C_LtlSaldo").value.replace(",",""));
|
||||
//si es con.nc,es.el.total
|
||||
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
|
||||
|
||||
let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value.replace(",", "")).toFixed(2));
|
||||
let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value.replace(",", "")).toFixed(2));
|
||||
|
||||
if (t.checked) {
|
||||
if (t.checked) {
|
||||
|
||||
if (SaldoCompra > 0) {
|
||||
if (SaldoCompra > 0) {
|
||||
|
||||
if (AmorContrato > 0) {
|
||||
txt.value = AmorContrato.toFixed(2);
|
||||
} else {
|
||||
txt.value = importe.toFixed(2);
|
||||
}
|
||||
|
||||
totalAnt = FnSumaValoresAnt();
|
||||
|
||||
if (totalAnt > SaldoCompra) {
|
||||
txt.value = FormatoNumero(importe - (totalAnt - SaldoCompra), 2);
|
||||
//$get('HdnVentaSaldo').value = 0.00;
|
||||
alert("El Importe no debe de exceder a el saldo");
|
||||
}
|
||||
|
||||
if (AmorContrato > 0) {
|
||||
txt.value = AmorContrato.toFixed(2);
|
||||
} else {
|
||||
txt.value = importe.toFixed(2);
|
||||
}
|
||||
|
||||
totalAnt = FnSumaValoresAnt();
|
||||
|
||||
if (totalAnt > SaldoCompra) {
|
||||
txt.value = FormatoNumero(importe - (totalAnt - SaldoCompra), 2);
|
||||
//$get('HdnVentaSaldo').value = 0.00;
|
||||
alert("El Importe no debe de exceder a el saldo");
|
||||
t.checked = false;
|
||||
}
|
||||
|
||||
} else {
|
||||
t.checked = false;
|
||||
//$get('HdnVentaSaldo').value = parseFloat(SaldoCompra) + parseFloat(txt.value);
|
||||
txt.value = "";
|
||||
}
|
||||
|
||||
} else {
|
||||
//$get('HdnVentaSaldo').value = parseFloat(SaldoCompra) + parseFloat(txt.value);
|
||||
txt.value = "";
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
}
|
||||
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
}
|
||||
|
||||
function FnCambiaAnt(chk, txt, saldo) {
|
||||
|
||||
function FnCambiaAnt(chk, txt, saldo) {
|
||||
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));// ToDouble($get('TxtSubTotal').value);
|
||||
|
||||
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));// ToDouble($get('TxtSubTotal').value);
|
||||
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
||||
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
|
||||
|
||||
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
||||
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
|
||||
if (TipoAnticipo == '4') {
|
||||
Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
|
||||
}
|
||||
|
||||
if (TipoAnticipo == '4') {
|
||||
Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
|
||||
}
|
||||
|
||||
if (isNaN(importeTxt)) {
|
||||
importeTxt = 0;
|
||||
} else {
|
||||
if (importeTxt <= 0) {
|
||||
if (isNaN(importeTxt)) {
|
||||
importeTxt = 0;
|
||||
chk.checked = false;
|
||||
return;
|
||||
} else {
|
||||
if (importeTxt <= 0) {
|
||||
importeTxt = 0;
|
||||
chk.checked = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
saldo = (importeTxt > saldo) ? saldo : importeTxt;
|
||||
|
||||
|
||||
var SaldoCompra = (Total - FnSumaValoresAnt() + ToDouble(txt.value)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
|
||||
if (SaldoCompra < 0) txt.value = SaldoCompra - txt.value;
|
||||
//minimo entre saldocompra y el saldoanticipo
|
||||
if (SaldoCompra < saldo) saldo = SaldoCompra;
|
||||
|
||||
if (ToDouble(txt.value) > 0) {
|
||||
chk.checked = true;
|
||||
} else {
|
||||
chk.checked = false;
|
||||
}
|
||||
|
||||
if (ToDouble(txt.value) > saldo) {
|
||||
txt.value = saldo;
|
||||
alert("El Importe no debe de exceder a el saldo");
|
||||
}
|
||||
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
|
||||
// $get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
|
||||
}
|
||||
|
||||
saldo = (importeTxt > saldo) ? saldo : importeTxt;
|
||||
function FnSumaValoresAnt() {
|
||||
let totalPoints = 0;
|
||||
let t = '';
|
||||
|
||||
$('input[name*=TxtAnticipo]').each(function () {
|
||||
totalPoints += ToDouble($(this).val());
|
||||
});
|
||||
|
||||
var SaldoCompra = (Total - FnSumaValoresAnt() + ToDouble(txt.value)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
|
||||
if (SaldoCompra < 0) txt.value = SaldoCompra - txt.value;
|
||||
//minimo entre saldocompra y el saldoanticipo
|
||||
if (SaldoCompra < saldo) saldo = SaldoCompra;
|
||||
return Math.round(totalPoints * 100) / 100;
|
||||
}
|
||||
|
||||
if (ToDouble(txt.value) > 0) {
|
||||
chk.checked = true;
|
||||
} else {
|
||||
chk.checked = false;
|
||||
}
|
||||
|
||||
if (ToDouble(txt.value) > saldo) {
|
||||
txt.value = saldo;
|
||||
alert("El Importe no debe de exceder a el saldo");
|
||||
}
|
||||
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
|
||||
// $get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
|
||||
}
|
||||
|
||||
function FnSumaValoresAnt() {
|
||||
let totalPoints = 0;
|
||||
let t = '';
|
||||
|
||||
$('input[name*=TxtAnticipo]').each(function () {
|
||||
totalPoints += ToDouble($(this).val());
|
||||
});
|
||||
|
||||
return Math.round(totalPoints * 100) / 100;
|
||||
}
|
||||
|
||||
function impresionBase64(pdfBase64) {
|
||||
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||
}
|
||||
|
||||
function CalculaTotalPagoContado() {
|
||||
let totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
||||
let totalCredito = ToDouble($get("TxtImporteCredito").value);
|
||||
let totalDebito = ToDouble($get("TxtImporteDebito").value);
|
||||
let totalCheque = ToDouble($get("TxtImporteCheque").value);
|
||||
let totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
|
||||
let TotalOtrosContado = 0;
|
||||
|
||||
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado;
|
||||
|
||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||
let totalAnticipos = ToDouble($get("TxtNCDev").value);
|
||||
total = total + totalAnticipos;
|
||||
function impresionBase64(pdfBase64) {
|
||||
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||
}
|
||||
|
||||
let totalVenta = ToDouble($get('HdnTotal').value);// - ToDouble($get('HdnTotal').value);
|
||||
function CalculaTotalPagoContado() {
|
||||
let totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
||||
let totalCredito = ToDouble($get("TxtImporteCredito").value);
|
||||
let totalDebito = ToDouble($get("TxtImporteDebito").value);
|
||||
let totalCheque = ToDouble($get("TxtImporteCheque").value);
|
||||
let totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
|
||||
let TotalOtrosContado = 0;
|
||||
|
||||
if (total > totalVenta) {
|
||||
lblCambio.innerHTML = "Cambio:";
|
||||
//HdnCambioFaltante.value = "1";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||
} else {
|
||||
lblCambio.innerHTML = "Faltante:";
|
||||
//HdnCambioFaltante.value = "0";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
||||
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
|
||||
|
||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||
let totalAnticipos = ToDouble($get("TxtNCDev").value);
|
||||
TotalOtrosContado = ToDouble($get("TxtImporteOtrosContado").value);
|
||||
|
||||
total = total + totalAnticipos + TotalOtrosContado;
|
||||
}
|
||||
|
||||
let totalVenta = ToDouble($get('HdnTotal').value);// - ToDouble($get('HdnTotal').value);
|
||||
|
||||
if (total > totalVenta) {
|
||||
lblCambio.innerHTML = "Cambio:";
|
||||
//HdnCambioFaltante.value = "1";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||
} else {
|
||||
lblCambio.innerHTML = "Faltante:";
|
||||
//HdnCambioFaltante.value = "0";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
||||
}
|
||||
|
||||
$get("TxtImporteContado").value = FormatoNumero(total, 2);
|
||||
}
|
||||
|
||||
$get("TxtImporteContado").value = FormatoNumero(total, 2);
|
||||
}
|
||||
|
||||
function CalculaDiferencia() {
|
||||
let total = 0;
|
||||
total = ToDouble($('#C_TxtEfectivoEnCaja').val()) - ToDouble($('#C_LblEfectivoEsperado').text());
|
||||
$('#C_LblDiferenciaCaja').text(FormatoNumero(total));
|
||||
}
|
||||
function CalculaDiferencia() {
|
||||
let total = 0;
|
||||
total = ToDouble($('#C_TxtEfectivoEnCaja').val()) - ToDouble($('#C_LblEfectivoEsperado').text());
|
||||
$('#C_LblDiferenciaCaja').text(FormatoNumero(total));
|
||||
}
|
||||
|
||||
function CalculaDiferenciaBloqueo() {
|
||||
let total = 0;
|
||||
total = ToDouble($('#C_TxtEfectivoCajaBloqueo').val()) - ToDouble($('#C_LblEfectivoBloqueo').text());
|
||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||
}
|
||||
function CalculaDiferenciaBloqueo() {
|
||||
let total = 0;
|
||||
total = ToDouble($('#C_TxtEfectivoCajaBloqueo').val()) - ToDouble($('#C_LblEfectivoBloqueo').text());
|
||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -109,6 +109,8 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
DivDatosCheque.Visible = True
|
||||
UpContadoOtros.Visible = True
|
||||
UpContadoOtros.Update()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
@@ -458,7 +460,7 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
If VentaContado Then
|
||||
'validaciones
|
||||
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal()
|
||||
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal() + TxtImporteOtrosContado.Text.ToDecimal()
|
||||
If Pagado = 0 Then
|
||||
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
||||
Exit Sub
|
||||
@@ -485,6 +487,18 @@ Partial Class Ventas_PVCobranza
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtImporteOtrosContado.Text.ToDecimal() > 0 Then
|
||||
If DdlOtroFormaPago.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Es necesario especificar la forma de pago adicional", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlCuentaOtrosContado.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Es necesario especificar la cuenta de la forma de pago adicional", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim tCveCorte As Integer = CveCorte
|
||||
@@ -626,6 +640,23 @@ Partial Class Ventas_PVCobranza
|
||||
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteOtrosContado.Text.ToDecimal > 0 Then
|
||||
Dim CveConceptroOtros As Integer = -1
|
||||
|
||||
Select Case DdlOtroFormaPago.SelectedValue
|
||||
Case "1" 'Debito
|
||||
CveConceptroOtros = 11
|
||||
Case "2" 'Crédito
|
||||
CveConceptroOtros = 12
|
||||
Case "3" 'Transferencia
|
||||
CveConceptroOtros = 8
|
||||
End Select
|
||||
|
||||
MsgError = RegistraIE(CveConceptroOtros, DdlCuentaOtrosContado.SelectedValue.ToEntero, TxtImporteOtrosContado.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
||||
SaldoPendiente -= TxtImporteOtrosContado.Text.ToDecimal
|
||||
PagoAplicado += TxtImporteOtrosContado.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
||||
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
|
||||
|
||||
@@ -2034,4 +2065,23 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlOtroFormaPago_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
Dim CveMon As Integer = 1
|
||||
|
||||
If DdlOtroFormaPago.SelectedValue.Contiene("1", "2") Then
|
||||
DdlCuentaOtrosContado.dataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
|
||||
ElseIf DdlOtroFormaPago.SelectedValue.Contiene("3") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(195, 197) Then
|
||||
DdlCuentaOtrosContado.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(CveMon <= 0, 1, CveMon)))
|
||||
Else
|
||||
DdlCuentaOtrosContado.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(CveMon <= 0, 1, CveMon)))
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlCuentaOtrosContado.DataBind()
|
||||
|
||||
UpContadoOtros.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -405,9 +405,9 @@
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
||||
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirFormatoCicovisa" />
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirFormatoTelcel" />
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirFormatoTelcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -944,7 +944,7 @@
|
||||
<asp:Label ID="LblMotivoCancelacion" runat="server"></asp:Label>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td><b>Se timbró:</b> </td>
|
||||
<td>
|
||||
@@ -1094,8 +1094,8 @@
|
||||
<asp:Label runat="server" ID="LblProyectoHeader" Text="" />
|
||||
<asp:Label runat="server" ID="LblSubProyecto" Text="" /></th>
|
||||
<th>P.U. <asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" Visible="false" /></th>
|
||||
<th runat="server" visible="false" id="thCosto2">
|
||||
Costo <br />
|
||||
<th runat="server" visible="false" id="thCosto2">Costo
|
||||
<br />
|
||||
Utilidad
|
||||
</th>
|
||||
<th id="thEncDesc1" runat="server" visible="true">Desc
|
||||
@@ -1413,7 +1413,7 @@
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--10--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false" ItemStyle-Width="20px" >
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false" ItemStyle-Width="20px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCosto" runat="server"></asp:Label><br />
|
||||
<asp:Label ID="LblCostoPorcentaje" runat="server"></asp:Label>
|
||||
@@ -1971,23 +1971,23 @@
|
||||
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Serie" visible="false">
|
||||
<asp:TemplateField HeaderText="Serie" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSerie" Text='<%# Eval("Serie") %>' Visible="false" runat="server" />
|
||||
<asp:TextBox ID="TxtSerie" AutoPostBack="false" Text='<%# Eval("Serie") %>' Visible="false" runat="server" />
|
||||
<asp:Button Text="" ID="BtnSerie" Style="display: none;" OnClick="BtnSerie_Click" runat="server" />
|
||||
<asp:HiddenField runat="server" Value='<%# Eval("Serie") %>' ID="HdnSerie" />
|
||||
<asp:HiddenField runat="server" Value='<%# Eval("Serie") %>' ID="HdnSerie" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Lote" HeaderText="Lote" Visible="False" />
|
||||
<asp:BoundField DataField="Lote" HeaderText="Lote" Visible="False" />
|
||||
<asp:BoundField DataField="FechaCaducidad" HeaderText="F. Caducidad" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Lote/Caducidad" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="270px">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="100%" runat="server" Visible="false" CausesValidation="true" >
|
||||
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote/Caducidad" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="270px">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="100%" runat="server" Visible="false" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -8207,7 +8207,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="padding-left: 16px;">
|
||||
<div class="col-md-8">
|
||||
<div id="DivValidaRFC" runat="server" visible="false" class="col-md-8">
|
||||
<div class="row">
|
||||
<asp:Panel ID="PnlRFCCliente" runat="server" DefaultButton="BtnValidarRFC">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-9">
|
||||
@@ -8221,6 +8221,46 @@
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivValidaPorNombre" runat="server" visible="false" class="col-md-8">
|
||||
<div class="row">
|
||||
<asp:Panel ID="PnlValidaNombre" runat="server" DefaultButton="BtnValidaPorNombre">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-9">
|
||||
<asp:TextBox ID="TxtRFCNombre" Style="text-transform: uppercase;" placeholder="Ingrese el RFC/Nombre para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtRFCNombre.ClientID.ToString()%>">RFC / Nombre:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||
<asp:Button ID="BtnValidaPorNombre" runat="server" CssClass="btn btn-success" Text="Consultar" />
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivBusquedaCliente" runat="server" visible="false" >
|
||||
<div style="overflow-y: auto; width: 100%; height: 250px;">
|
||||
<asp:GridView ID="GvBusquedaCliente" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
|
||||
CssClass="ScrollAD table table-smallpadding Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="15%">
|
||||
<HeaderTemplate>Código</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigo" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-CssClass="truncate" ItemStyle-Width="55%">
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="30%">
|
||||
<HeaderTemplate>RFC</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRFC" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div runat="server" id="DivTipoPersona" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:RadioButtonList runat="server" ID="RdTipoPersona" RepeatDirection="Horizontal" OnSelectedIndexChanged="RdTipoPersona_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control">
|
||||
|
||||
@@ -5469,7 +5469,11 @@ Partial Class Ventas
|
||||
HplPagado.Text = "<b>CANCELADO<b>"
|
||||
End If
|
||||
If ViewState("CveCotizacion") IsNot Nothing AndAlso ViewState("CveCotizacion").ToString().ToEntero() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
ImgAntiPend.Visible = True
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
Else
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
Else
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
@@ -5578,7 +5582,11 @@ Partial Class Ventas
|
||||
|
||||
If DbRowVenta("Saldo").ToString().ToDouble < 0.01 Then
|
||||
If ViewState("CveCotizacion") IsNot Nothing AndAlso ViewState("CveCotizacion").ToString().ToEntero() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
ImgAntiPend.Visible = True
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
Else
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
Else
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
@@ -8738,12 +8746,16 @@ Partial Class Ventas
|
||||
e.Row.FCDropDownList("DdlPrecioListaEdit").DataSource = Dt
|
||||
End If
|
||||
End Using
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Ant" Then
|
||||
e.Row.FCHtmlGenericControl("DivPrecioLista").Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
e.Row.FCDropDownList("DdlPrecioListaEdit").DataBind()
|
||||
e.Row.FCDropDownList("DdlPrecioListaEdit").SelectedValueExist(e.Row.DBCampo("CvePrecioLista"))
|
||||
If e.Row.FCHtmlGenericControl("DivPrecioLista").Visible Then
|
||||
e.Row.FCDropDownList("DdlPrecioListaEdit").DataBind()
|
||||
e.Row.FCDropDownList("DdlPrecioListaEdit").SelectedValueExist(e.Row.DBCampo("CvePrecioLista"))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'Si es facturacion de OC o Contrato
|
||||
@@ -9343,17 +9355,47 @@ Partial Class Ventas
|
||||
NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal()
|
||||
End If
|
||||
|
||||
DatarowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero()).FiltroPrimero("") ' Estado = -1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(601) = "1" Then 'valida anticipo que tenga conceptos válidos
|
||||
If DdlTipoComprobante.SelectedValue = "Ant" Then
|
||||
Dim PSCodigoSAT As String = DatarowPS("SATClavePS").ToString
|
||||
If PSCodigoSAT <> "84111506" Then
|
||||
Alert($"El producto y/o servicio no es válido para generar anticipos.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
If PU < DatarowPS("PrecioMinimo").ToString().ToDecimal() Then
|
||||
Alert($"El precio no puede ser menor al precio mínimo. Precio Mínimo: {DatarowPS("PrecioMinimo"):N2}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
TmpDT.Rows.Remove(TmpDT.Rows(e.RowIndex))
|
||||
CalculaUsados()
|
||||
|
||||
Dim CvePrecioLista As Integer = -1
|
||||
Dim PrecioLista As String = ""
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
|
||||
CvePrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedValue.ToEntero()
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text.Split("-"c)(0)
|
||||
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem IsNot Nothing Then
|
||||
Dim listaPL = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text.Split("-"c)
|
||||
If listaPL.Count() > 0 Then
|
||||
PrecioLista = listaPL(0)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text
|
||||
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem IsNot Nothing Then
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -9453,7 +9495,9 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
|
||||
CvePrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedValue.ToEntero()
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text
|
||||
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem IsNot Nothing Then
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text
|
||||
End If
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("CvePrecioLista") = CvePrecioLista
|
||||
TmpDT.Rows(e.RowIndex)("PrecioLista") = PrecioLista
|
||||
@@ -17301,6 +17345,10 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DtMovtos IsNot Nothing AndAlso DtMovtos.Rows.Count = 0 Then
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
Else
|
||||
GVAnticipos.DataSource = Nothing
|
||||
End If
|
||||
@@ -18716,7 +18764,13 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub DdlPSEdit_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If GvPS.EditIndex >= 0 Then
|
||||
|
||||
Dim EditarPrecio As Boolean = True
|
||||
If DdlTipoComprobante.SelectedValue = "Ant" AndAlso UsuarioActual.CveEmpresa = 189 Then
|
||||
EditarPrecio = False
|
||||
End If
|
||||
|
||||
If GvPS.EditIndex >= 0 AndAlso EditarPrecio Then
|
||||
Dim ddlPSEdit = DirectCast(sender, ADServerControl.Dropdownlost)
|
||||
Dim GvRow = DirectCast(ddlPSEdit.NamingContainer, GridViewRow)
|
||||
|
||||
@@ -18963,6 +19017,9 @@ Partial Class Ventas
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
|
||||
If ImgAntiPend.Visible Then
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
@@ -19008,6 +19065,10 @@ Partial Class Ventas
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
|
||||
If ImgAntiPend.Visible Then
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC','Ant') ", "")}")
|
||||
@@ -19493,11 +19554,6 @@ Partial Class Ventas
|
||||
Return False
|
||||
End If
|
||||
|
||||
If PU <= 0 Then
|
||||
Alert("No se puede vender a un importe de cero", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim PrecioLibre As Boolean = False
|
||||
|
||||
|
||||
@@ -19505,13 +19561,6 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
Dim DatarowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If DatarowPS IsNot Nothing Then
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
If PU < DatarowPS("PrecioMinimo").ToString().ToDecimal() Then
|
||||
Alert($"El precio no puede ser menor al precio mínimo. Precio Mínimo: {DatarowPS("PrecioMinimo"):N2}", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Ant" Then
|
||||
Dim PSCodigoSAT As String = DatarowPS("SATClavePS").ToString
|
||||
If PSCodigoSAT <> "84111506" Then
|
||||
@@ -19520,11 +19569,23 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
If PU < DatarowPS("PrecioMinimo").ToString().ToDecimal() Then
|
||||
Alert($"El precio no puede ser menor al precio mínimo. Precio Mínimo: {DatarowPS("PrecioMinimo"):N2}", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
PrecioLibre = CBool(DatarowPS("PrecioLibre"))
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If PU <= 0 Then
|
||||
Alert("No se puede vender a un importe de cero", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
'SI NO VIENE DESDE EL MODAL
|
||||
If CantidadModal = 0 Then
|
||||
If TxtCantidad.Text.ToDecimal() <= 0 Then
|
||||
@@ -19892,7 +19953,7 @@ Partial Class Ventas
|
||||
Descuento = Descuento + ((PU * PromocionPorcentaje / 100) * Cantidad)
|
||||
End If
|
||||
ElseIf TipoPromo = 3 Then 'Promocion por Cantidad
|
||||
If Cantidad >= CantMinima Then
|
||||
If Cantidad >= CantMinima Then
|
||||
Descuento = Descuento + TotalPromocion
|
||||
Else
|
||||
CvePromocionDetalle = -1
|
||||
@@ -23985,7 +24046,7 @@ Partial Class Ventas
|
||||
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,
|
||||
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.ToUpper(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||
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(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero,
|
||||
@@ -25204,17 +25265,71 @@ Partial Class Ventas
|
||||
DivFormaCliente.Visible = False
|
||||
divRegimenCliente.Visible = False
|
||||
divGiro.Visible = False
|
||||
UpAgregarCliente.Update()
|
||||
DivBusquedaCliente.Visible = False
|
||||
|
||||
CargaEstados()
|
||||
TxtRFCCliente.Focus()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
TxtRFCNombre.Text = ""
|
||||
|
||||
DivValidaRFC.Visible = False
|
||||
DivValidaPorNombre.Visible = True
|
||||
CargaGiro()
|
||||
|
||||
TxtRFCNombre.Focus()
|
||||
Else
|
||||
DivValidaRFC.Visible = True
|
||||
DivValidaPorNombre.Visible = False
|
||||
|
||||
TxtRFCCliente.Focus()
|
||||
End If
|
||||
|
||||
UpAgregarCliente.Update()
|
||||
|
||||
RegistraScript("showDivEC();")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvBusquedaCliente_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBusquedaCliente.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
Dim Liga As String = String.Format("<a href='javascript:CargaCliente(""{0}"");$(""#divAgregarCliente"").modal(""hide""); '>", e.Row.DBCampo("CveCliente"))
|
||||
|
||||
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<div class='truncate'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Codigo"))
|
||||
e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate'>{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial"))
|
||||
e.Row.FCLiteral("LtlRFC").Text = String.Format("<div class='truncate'>{0}{1}</a></div>", Liga, e.Row.DBCampo("RFC"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnValidaPorNombre_Click(sender As Object, e As EventArgs) Handles BtnValidaPorNombre.Click
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.BuscarClienteRFCNombre(TxtRFCNombre.Text, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCliente.DtResultados.Rows.Count = 1 AndAlso TxtRFCNombre.Text.Trim() <> "XAXX010101000" Then
|
||||
RegistraScript("hideDivEC();")
|
||||
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString().ToEntero()
|
||||
HdnCveCliente.Value = ObjCliente.DtResultados(0)("CveCliente").ToString()
|
||||
CargaCliente(CveCliente)
|
||||
UpCliente.Update()
|
||||
|
||||
ElseIf ObjCliente.DtResultados.Rows.Count > 0 AndAlso TxtRFCNombre.Text.Trim() <> "XAXX010101000" Then
|
||||
DivBusquedaCliente.Visible = True
|
||||
GvBusquedaCliente.DataSource = ObjCliente.DtResultados
|
||||
GvBusquedaCliente.DataBind()
|
||||
|
||||
Else
|
||||
DivValidaRFC.Visible = True
|
||||
DivValidaPorNombre.Visible = False
|
||||
DivBusquedaCliente.Visible = False
|
||||
TxtRFCCliente.Text = TxtRFCNombre.Text
|
||||
BtnValidarRFC_Click(Nothing, EventArgs.Empty)
|
||||
End If
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
|
||||
UpAgregarCliente.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnValidarRFC_Click(sender As Object, e As EventArgs) Handles BtnValidarRFC.Click
|
||||
|
||||
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
||||
@@ -25291,6 +25406,21 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
divGiro.Visible = True
|
||||
|
||||
Dim DrSP As DataRow = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, DdlSubProyectoDatos.SelectedValue.ToEntero()).FiltroPrimero("")
|
||||
If DrSP IsNot Nothing Then
|
||||
|
||||
DdlEstadoSAT.SelectedValueExist(DrSP("CveEstado").ToString())
|
||||
TxtCiudadCliente.Text = DrSP("Municipio").ToString()
|
||||
TxtLocalidadCliente.Text = DrSP("Localidad").ToString()
|
||||
TxtColoniaCliente.Text = DrSP("Colonia").ToString()
|
||||
TxtCPCliente.Text = DrSP("CP").ToString()
|
||||
TxtDireccionCliente.Text = DrSP("Calle").ToString()
|
||||
TxtNumExtCliente.Text = DrSP("NoExt").ToString()
|
||||
TxtNumIntCliente.Text = DrSP("NoInt").ToString()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -26751,16 +26881,21 @@ Partial Class Ventas
|
||||
Dim GenerarDevolucionAnticipada As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion AndAlso ObjFacturaCancelacion.Pagado > 0 Then
|
||||
CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion Then
|
||||
|
||||
If ChkDevAlm.Checked Then
|
||||
GenerarDevolucionAnticipada = True
|
||||
End If
|
||||
|
||||
For Each Gvr As GridViewRow In GvCancelarRemisiones.Rows
|
||||
ListaRemisionesCancelar.Add(Gvr.DataKey("CveVenta").ToEntero())
|
||||
Next
|
||||
If ObjFacturaCancelacion.TipoDocto.Contiene("Ing") Then
|
||||
For Each Gvr As GridViewRow In GvCancelarRemisiones.Rows
|
||||
ListaRemisionesCancelar.Add(Gvr.DataKey("CveVenta").ToEntero())
|
||||
Next
|
||||
End If
|
||||
|
||||
CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC
|
||||
End If
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(If(ChkDevAlm.Checked, 1, 0), ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion, ForzarDevolucion:=GenerarDevolucionAnticipada, CancelacionPagos:=CancelacionPagos)
|
||||
@@ -32655,6 +32790,10 @@ Partial Class Ventas
|
||||
GVAnticipos.DataSource = DtMovtos
|
||||
GVAnticipos.DataBind()
|
||||
If DtMovtos.Rows.Count > 0 Then ImgAntiPend.Visible = True
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
Else
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
divAmortizacionTipoRelacion.Visible = True
|
||||
@@ -32948,7 +33087,7 @@ Partial Class Ventas
|
||||
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||
UsuarioActual.CveEmpresa, CveVenta,
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim.ToUpper(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
|
||||
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
|
||||
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero()) Then
|
||||
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
|
||||
|
||||
Reference in New Issue
Block a user