Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -128,7 +128,7 @@ Public Class ClsEdocumentacion
|
||||
#Region "D O C U M E N T A C I O N "
|
||||
|
||||
|
||||
Public Function DocumentacionGet(CveDocumentacion As Integer, CveDocumentacionTipo As Integer, Estatus As Integer, CveEmpresa As Integer, Optional Modulo As Integer = 1) As Boolean
|
||||
Public Function DocumentacionGet(CveDocumentacion As Integer, CveDocumentacionTipo As Integer, Estatus As Integer, CveEmpresa As Integer, Optional Modulo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Edoc_DocumentacionGet")
|
||||
@@ -433,7 +433,7 @@ Public Class ClsEdocumentacion
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DocumentacionTipoGet(CveEmpresa As Integer, Optional Modulo As Integer = 1) As Boolean
|
||||
Public Function DocumentacionTipoGet(CveEmpresa As Integer, Optional Modulo As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -4562,8 +4562,10 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 5)
|
||||
PaginaDict.Add("/Ventas/CatClientes.aspx".ToUpper(), 5)
|
||||
PaginaDict.Add("/Ventas/CatClientesClasificaciones.aspx".ToUpper(), 408)
|
||||
PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 6)
|
||||
PaginaDict.Add("/Ventas/RepVentas.aspx".ToUpper(), 9)
|
||||
PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 6)
|
||||
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 366)
|
||||
PaginaDict.Add("/Ventas/RepVentas.aspx".ToUpper(), 9)
|
||||
PaginaDict.Add("/Ventas/RepVentas.aspx?Op=Cot".ToUpper(), 367)
|
||||
PaginaDict.Add("/Ventas/RepRemisiones.aspx".ToUpper(), 430)
|
||||
PaginaDict.Add("/Ventas/RepRemisionesDetalle.aspx".ToUpper(), 430)
|
||||
PaginaDict.Add("/Ventas/RepCotizaciones.aspx".ToUpper(), 430)
|
||||
@@ -4641,7 +4643,7 @@ Public Class ClsPaginas
|
||||
'PaginaDict.Add("/Ventas/Ventas.aspx".ToUpper(), 2016)
|
||||
'PaginaDict.Add("/Ventas/Clientes.aspx".ToUpper(), 2017)
|
||||
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Rem".ToUpper(), 2018)
|
||||
PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 2019)
|
||||
'PaginaDict.Add("/Ventas/Ventas.aspx?Op=Cot".ToUpper(), 2019)
|
||||
PaginaDict.Add("/Ventas/VentasH.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Ventas/ClientesAbonarH.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Ventas/PVRaul.aspx".ToUpper(), -1)
|
||||
|
||||
@@ -3375,7 +3375,15 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Scotiabank CTA. 0686 4074 CLABE 0447 7011 006 8640 743</Value>
|
||||
<Value>CONVENIO CIE Bancomer: 001598120 Referencia:</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!ClienteCodigo.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
@@ -3388,15 +3396,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Referencia: </Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Referencia.Value</Value>
|
||||
<Value>Scotiabank CTA. 0686 4074 CLABE 0447 7011 006 8640 743</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
@@ -3411,7 +3411,7 @@
|
||||
<Top>6.7921in</Top>
|
||||
<Left>0.16632cm</Left>
|
||||
<Height>0.36385in</Height>
|
||||
<Width>4.87092in</Width>
|
||||
<Width>4.94037in</Width>
|
||||
<ZIndex>14</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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">
|
||||
@@ -6090,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"
|
||||
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,
|
||||
ImporteRetISR,PorcentajeIEPS,ImporteIEPS,SATClaveProdServ,SATClaveUM,CantSur,CantRes"
|
||||
ImporteRetISR,PorcentajeIEPS,ImporteIEPS,SATClaveProdServ,SATClaveUM,CantSur,CantRes,CveTamaño"
|
||||
AllowPaging="False">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6419,7 +6419,7 @@ Partial Class Ventas
|
||||
'VALIDA EXISTENCIA
|
||||
CveProducto = dr("CvePS").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
|
||||
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
|
||||
@@ -13828,7 +13828,7 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||
'VALIDA EXISTENCIA
|
||||
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)
|
||||
Return False
|
||||
End If
|
||||
@@ -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
|
||||
@@ -21362,7 +21368,7 @@ Partial Class Ventas
|
||||
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,
|
||||
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
|
||||
Row = TmpDT.NewRow()
|
||||
@@ -21421,6 +21427,8 @@ Partial Class Ventas
|
||||
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
||||
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
||||
|
||||
Row("CveTamaño") = CveTamaño
|
||||
|
||||
TmpDT.Rows.Add(Row)
|
||||
End Sub
|
||||
|
||||
@@ -21573,7 +21581,8 @@ Partial Class Ventas
|
||||
Dim ObjVenta As New ClsVentas
|
||||
If ObjVenta.GetVentaDetalle(CveVenta) Then
|
||||
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
|
||||
ObjVenta.Dispose()
|
||||
|
||||
@@ -21622,6 +21631,8 @@ Partial Class Ventas
|
||||
|
||||
Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253)
|
||||
|
||||
Dim DtUsados As DataTable = TmpDT.FiltraParametros("CveClasificacion = 20519")
|
||||
|
||||
TmpDT.Clear()
|
||||
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
|
||||
If Gv.FCCheckBox("Chk").Checked And Gv.FCTextBox("TxtCantidadAplicaDevolucion").Text.ToDecimal > 0 Then
|
||||
@@ -21644,9 +21655,48 @@ Partial Class Ventas
|
||||
Gv.DataKey("PorcentajeRetIVA").ToString.ToDecimal, ImporteRetIVA,
|
||||
Gv.DataKey("PorcentajeRetISR").ToString.ToDecimal, ImporteRetISR, Gv.DataKey("PorcentajeIEPS").ToString.ToDecimal,
|
||||
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
|
||||
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
|
||||
DdlTiposRelacion.SelectedValueExist("3")
|
||||
|
||||
@@ -23712,8 +23762,8 @@ Partial Class Ventas
|
||||
#Region "U S A D O S"
|
||||
|
||||
|
||||
Private Sub CalculaUsados()
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot") Then
|
||||
Private Sub CalculaUsados(Optional DtUsadosDevolucion As DataTable = Nothing)
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then
|
||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
||||
|
||||
Dim DTCvePSCostos As DataTable
|
||||
@@ -23831,16 +23881,23 @@ Partial Class Ventas
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
||||
Modalidad = "A"
|
||||
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,
|
||||
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("SubProyecto").ToString)
|
||||
drowPsTamaños("SubProyecto").ToString, CveVentaDetalle:=CveVentaDetalleDevolucion)
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user