--Crea a partir de con carga de precios nuevos
This commit is contained in:
@@ -3455,16 +3455,17 @@
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="display: none;">
|
||||
<div class="form-body">
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4" style="display:flex">
|
||||
No.Permiso <div style="color:red">*</div>
|
||||
<div class="col-md-4" style="display: flex">
|
||||
No.Permiso
|
||||
<div style="color: red">*</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtNumPerLicoAut" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4" style="display:flex">
|
||||
Calle<div style="color:red">*</div>
|
||||
<div class="col-md-4" style="display: flex">
|
||||
Calle<div style="color: red">*</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCCalle" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
@@ -3511,16 +3512,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4" style="display:flex">
|
||||
Municipio<div style="color:red">*</div>
|
||||
<div class="col-md-4" style="display: flex">
|
||||
Municipio<div style="color: red">*</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCMunicipio" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4" style="display:flex">
|
||||
Estado<div style="color:red">*</div>
|
||||
<div class="col-md-4" style="display: flex">
|
||||
Estado<div style="color: red">*</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlSCEstado" DataTextField="NombreEstado" DataValueField="CveEstado" runat="server" CssClass="form-control input-sm select2me" Width="100%">
|
||||
@@ -3528,8 +3529,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
|
||||
<div class="col-md-4" style="display:flex">
|
||||
C.Postal<div style="color:red">*</div>
|
||||
<div class="col-md-4" style="display: flex">
|
||||
C.Postal<div style="color: red">*</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtSCCP" CssClass="form-control" runat="server" CausesValidation="true" Width="100%"></asp:TextBox>
|
||||
@@ -6943,6 +6944,8 @@
|
||||
<asp:Button ID="BtnRefacturacionConfirmarAceptacion" runat="server" ClientIDMode="Static" Text="Refacturacion Aceptacion Documento" Style="display: none;" />
|
||||
<asp:Button ID="BtnRefrescarPagina" runat="server" ClientIDMode="Static" Text="Refrescar" Style="display: none;" />
|
||||
<asp:Button ID="BtnAplicaNuevaNC" runat="server" ClientIDMode="Static" Text="AplicarNC" Style="display: none;" />
|
||||
<asp:Button ID="BtnCreaApartirDePrecioOriginal" runat="server" ClientIDMode="Static" Text="Crear" Style="display: none;" OnClick="BtnCreaApartirDePrecioOriginal_Click" />
|
||||
<asp:Button ID="BtnCreaApartirDePrecioNuevo" runat="server" ClientIDMode="Static" Text="Refrescar" Style="display: none;" OnClick="BtnCreaApartirDePrecioNuevo_Click" />
|
||||
|
||||
<asp:HiddenField ID="HdnCveVentaAcuse" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<%--FLETES--%>
|
||||
@@ -11225,6 +11228,13 @@
|
||||
$('#BtnCargarPSAdicionales').click();
|
||||
}
|
||||
|
||||
function BtnCreaApartirDePrecioOriginal() {
|
||||
$('#BtnCreaApartirDePrecioOriginal').click();
|
||||
}
|
||||
function BtnCreaApartirDePrecioNuevo() {
|
||||
$('#BtnCreaApartirDePrecioNuevo').click();
|
||||
}
|
||||
|
||||
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||
|
||||
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
|
||||
|
||||
@@ -35911,7 +35911,14 @@ Partial Class Ventas
|
||||
|
||||
#Region " CREAR APARTIR DE "
|
||||
Protected Sub BtnCrearApartirDe_Click(sender As Object, e As System.EventArgs) Handles BtnCrearApartirDe.Click
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
Alert("Se va crear una nueva cotización. ¿Requiere que se actualicen a los precios actuales?", TipoMensaje.MsgDosBotones, "BtnCreaApartirDePrecioNuevo()", TextoConfirmacion:="Si", TextoSegundoBoton:="No", JSBtn2:="BtnCreaApartirDePrecioOriginal()", ShowCloseButton:=False)
|
||||
Else
|
||||
CreaAPartirDe(False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CreaAPartirDe(Optional RecargaPrecios As Boolean = False)
|
||||
Dim FolioOriginal As String = TxtFolio.Text
|
||||
|
||||
HdnCveVenta.Value = ""
|
||||
@@ -36104,6 +36111,14 @@ Partial Class Ventas
|
||||
|
||||
GvFacturasRelacionadas.Columns(2).Visible = True
|
||||
|
||||
If RecargaPrecios Then
|
||||
Dim CvePrecioListaSugerido As Integer = Me.CvePrecioListaCliente
|
||||
If CvePrecioListaCliente <= 0 Then
|
||||
CvePrecioListaSugerido = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'").ToEntero()
|
||||
End If
|
||||
RecalculaPrecios(False, AplicarPromociones:=False, AplicarDescuentoGlobal:=False, CvePrecioListaSugerido:=CvePrecioListaSugerido)
|
||||
End If
|
||||
|
||||
CalculaTotalesVenta()
|
||||
|
||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||
@@ -36171,6 +36186,7 @@ Partial Class Ventas
|
||||
UpFacturasRelacionadas.Update()
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GENERAR FACTURA "
|
||||
@@ -41135,7 +41151,7 @@ Partial Class Ventas
|
||||
RegistraScript("MuestraAnticipos();", "AE")
|
||||
End Sub
|
||||
|
||||
Private Sub RecalculaPrecios(ByRef RecalculoPromociones As Boolean, Optional AplicarPromociones As Boolean = False, Optional AplicarDescuentoGlobal As Boolean = False)
|
||||
Private Sub RecalculaPrecios(ByRef RecalculoPromociones As Boolean, Optional AplicarPromociones As Boolean = False, Optional AplicarDescuentoGlobal As Boolean = False, Optional CvePrecioListaSugerido As Integer = -1)
|
||||
Dim PuedeRecalcular As Boolean = False
|
||||
|
||||
Dim DescuentoManual As Decimal = 0, DescuentoPorcentaje As Decimal = 0
|
||||
@@ -41170,8 +41186,6 @@ Partial Class Ventas
|
||||
Dim CodigoPS As String = Row("CodigoPS").ToString()
|
||||
Dim PUOriginal As Decimal = Row("PU").ToString().ToDecimal()
|
||||
|
||||
Dim CvePrecioListaSugerido As Integer = -1
|
||||
|
||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = Nothing
|
||||
|
||||
If AplicarPromociones OrElse AplicarDescuentoGlobal Then
|
||||
@@ -41179,7 +41193,7 @@ Partial Class Ventas
|
||||
ObjPrecioSugerido.PrecioSugerido = PUOriginal
|
||||
ObjPrecioSugerido.CvePrecioLista = Row("CvePrecioLista").ToString().ToEntero()
|
||||
Else
|
||||
ObjPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
||||
ObjPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion, CvePrecioListaSugerido:=CvePrecioListaSugerido)
|
||||
End If
|
||||
|
||||
If ObjPrecioSugerido.PrecioSugerido > 0 Then
|
||||
@@ -42103,5 +42117,14 @@ Partial Class Ventas
|
||||
|
||||
FileExcel.Save(Response, $"{folio}.xlsx", SaveOptions.XlsxDefault)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCreaApartirDePrecioOriginal_Click(sender As Object, e As EventArgs)
|
||||
CreaAPartirDe(RecargaPrecios:=False)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCreaApartirDePrecioNuevo_Click(sender As Object, e As EventArgs)
|
||||
CreaAPartirDe(RecargaPrecios:=True)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user