This commit is contained in:
Antonio Gonzalez
2020-02-08 11:56:56 -07:00
6 changed files with 1215 additions and 1198 deletions

View File

@@ -61,11 +61,18 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
e.Row.CssClass = "SubTotales2"
End If
'If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
' e.Row.CssClass = "SubTotales2"
'End If
If e.Row.DBCampo("TipoHeader").ToString = "1" Then
e.Row.CssClass = "Totales"
ElseIf e.Row.DBCampo("TipoHeader").ToString = "2" Then
e.Row.CssClass = "SubTotales"
ElseIf e.Row.DBCampo("TipoHeader").ToString = "3" Then
e.Row.CssClass = "SubTotales2"
End If
End If
End Sub
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)

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>
<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>
</div>
</div>
@@ -2916,6 +2917,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<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: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>--%>
@@ -3011,23 +3013,65 @@
<script type="text/javascript">
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") {
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));
} 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);
}
}
function ValidarCodigoLinea(source, arguments) {
var CveMarca = HdnPSAjusteMarca.value;
if (CveMarca == "1086") {
var re = new RegExp("^[0-9]+$");
function ValidarCodigoInspeccion(source, arguments) {
let CveClasificacion = HdnPSAjusteClasificacion.value;
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));
return;
} 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);
return;
}
}

View File

@@ -5232,11 +5232,13 @@ Partial Class PV
Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero
Dim PrecioSugerido As Decimal = 0
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
PrecioSugerido = drPS("Precio").ToString.ToDecimal
CveMarca = drPS("CveMarca").ToString.ToEntero
CveClasificacion = drPS("CveClasificacion").ToString.ToEntero
End If
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
@@ -5247,6 +5249,7 @@ Partial Class PV
DdlTipoUso.DataBind()
HdnPSAjusteMarca.Value = CveMarca.ToString()
HdnPSAjusteClasificacion.Value = CveClasificacion.ToString()
End If

View File

@@ -211,7 +211,7 @@
<%--INICIA: CANCELAR - NC - DEVOLUCION [OLD]--%>
<%--<li>
<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" />
@@ -355,7 +355,7 @@
<li>
<asp:LinkButton runat="server" ID="LnkEnviarPolizaVirtual" Visible="false" OnClick="LnkEnviarPolizaVirtual_Click">Enviar Póliza Virtual</asp:LinkButton>
</li>
<%-- <li>
<%-- <li>
<asp:LinkButton runat="server" ID="LnkDescargarFacturaPrueba" OnClick="LnkDescargarFacturaPrueba_Click">Descargar Factura Prueba</asp:LinkButton>
</li>--%>
</ContentTemplate>
@@ -364,7 +364,7 @@
<asp:PostBackTrigger ControlID="BtnContabilizar" />
<asp:PostBackTrigger ControlID="BtnContabilizar" />
<asp:PostBackTrigger ControlID="LnkImprimirFormatoCicovisa" />
<%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%>
<%-- <asp:PostBackTrigger ControlID="LnkDescargarFacturaPrueba" />--%>
<%-- <asp:PostBackTrigger ControlID="LbDescargarExcel" />--%>
</Triggers>
</asp:UpdatePanel>
@@ -1303,7 +1303,7 @@
<asp:UpdatePanel ID="UpCodigosUnicos" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="col-md-12">
<asp:GridView ID="GvCodigosUnicos" runat="server" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="False"
<asp:GridView ID="GvCodigosUnicos" runat="server" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="False"
DataKeyNames="CvePolizaVirtual,SerieLote,IdProductoPolizaVirtual,Total,Descuento,AnioVehiculo,FechaUsado,IdModeloAuto,IdMarcaAuto,IdBCI,TipoServicio,TipoPoliza,TieneUsado,IdMarcaUsado" ClientIDMode="Static" EmptyDataText="" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Código Único">
@@ -6506,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) {
var Importe = 0, ImporteSinPorcentaje = 0;
@@ -6531,18 +6550,18 @@
}
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC();
}
}
CompararNC();
}
}
function CalculaTotalRNCChk(TxtImporte, Saldo, Chk) {
if (Chk.checked) {
TxtImporte.value = FormatoNumero(Saldo, 2);
} else {
TxtImporte.value = "";
}
function CalculaTotalRNCChk(TxtImporte, Saldo, Chk) {
if (Chk.checked) {
TxtImporte.value = FormatoNumero(Saldo, 2);
} else {
TxtImporte.value = "";
}
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
CompararNC();
}
}
@@ -6981,17 +7000,17 @@
function SetDisabledTxtTotal(valor) {
DisabledTxtTotal = valor;
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
}
}
function loadpage() {
$('.AjustaT').each(function () {
AjustaTotales($(this));
})
$('.AjustaT').change(function () {
AjustaTotales($(this));
});
function loadpage() {
$('.AjustaT').each(function () {
AjustaTotales($(this));
})
$('.AjustaT').change(function () {
AjustaTotales($(this));
});
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
$('#<%= TxtTotal.ClientID %>').prop('readonly', DisabledTxtTotal);
}

View File

@@ -21074,6 +21074,12 @@ Partial Class Ventas
UpDescNC.Update()
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)
If e.Row.RowType = DataControlRowType.DataRow Then