Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveFolioGarantia,FolioGarantia,Estatus,CveUsuario,Usuario,FechaIng"
|
||||
DataKeyNames="CveFolioGarantia,FolioGarantia,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
@@ -94,6 +94,12 @@
|
||||
<asp:Literal ID="LblFolioGarantia" runat="server" Text='<%# Eval("FolioGarantia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
@@ -195,7 +201,18 @@
|
||||
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="200px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
|
||||
@@ -37,6 +37,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaSubProyectos()
|
||||
CargadatosGvFolioGarantia()
|
||||
End If
|
||||
|
||||
@@ -45,6 +46,12 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
|
||||
#Region "Folios Garantía"
|
||||
Private Sub CargaSubProyectos()
|
||||
DdlSubProyectos.Items.Clear()
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectos.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargadatosGvFolioGarantia()
|
||||
|
||||
@@ -88,6 +95,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
DdlSubProyectos.SelectedValueExist("-1")
|
||||
|
||||
Actualizar = False
|
||||
UpGral.Update()
|
||||
@@ -108,7 +116,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero) Then
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
@@ -127,7 +135,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario) Then
|
||||
If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero) Then
|
||||
|
||||
TxtFolioGarantia.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
@@ -195,10 +203,11 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00")
|
||||
'TxtPuntos.Text = GvRow.DataKey("Puntos").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
'DdlPS.Items.Clear()
|
||||
'DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
'DdlPS.DataBind()
|
||||
'DdlPS.SelectedValueExist(GvRow.DataKey("CvePSCargo").ToEntero)
|
||||
DdlSubProyectos.Items.Clear()
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectos.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
|
||||
|
||||
BtnAgregarFolioGarantiaModal.Text = "Actualizar"
|
||||
|
||||
|
||||
@@ -480,7 +480,7 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
|
||||
@@ -492,6 +492,7 @@ Public Class ClsAcumuladores
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
|
||||
End With
|
||||
|
||||
@@ -507,7 +508,7 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function FoliosGarantiaUpdate(CveFolioGarantia As Integer, FolioGarantia As String, Estatus As Integer, CveUsuario As Integer) As Boolean
|
||||
Public Function FoliosGarantiaUpdate(CveFolioGarantia As Integer, FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveSubProyecto As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
|
||||
@@ -519,6 +520,7 @@ Public Class ClsAcumuladores
|
||||
.Add("@FolioGarantia", SqlDbType.VarChar).Value = FolioGarantia
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<%@ WebHandler Language="VB" Class="SIGPolizaVirtual" %>
|
||||
|
||||
Imports Fluent
|
||||
Imports System
|
||||
Imports System.Web
|
||||
Imports System.Net.Http
|
||||
@@ -9,61 +10,187 @@ Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports System.Runtime.CompilerServices
|
||||
|
||||
Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Protected ReadOnly Property User As String = "cslth.2809@jcilink.com"
|
||||
Protected ReadOnly Property Password As String = "ff31580a95f36b51ad27f970428b77a5a9245076"
|
||||
|
||||
#Region "U S U A R I O - T O K E N"
|
||||
|
||||
Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario
|
||||
|
||||
Dim UsuarioToken As Usuario = Nothing
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
UsuarioToken = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||
UsuarioToken.CveEmpresa = CveEmpresa
|
||||
CreaObjetoEmpresa(UsuarioToken)
|
||||
End If
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
Return UsuarioToken
|
||||
End Function
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioToken As Usuario)
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
If ObjEmpresa.GetEmpresas(UsuarioToken.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioToken.CveEmpresa) Then
|
||||
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||
|
||||
Dim EmpresasFuncionalidades As New HybridDictionary
|
||||
For Each Row As Data.DataRow In dttmp.Rows
|
||||
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||
Next
|
||||
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||
End If
|
||||
|
||||
UsuarioToken.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
context.Response.ContentType = "application/json"
|
||||
EnviarPolizaVentaWS(context)
|
||||
EnviarPolizaVentaLTHWSD(context)
|
||||
EnviarPolizaIndicadores(context)
|
||||
Dim usuario = ValidaUsuarioSistema(140, 100)
|
||||
Dim ObjFactura As New Modelos.Factura(usuario, 898028, 140)
|
||||
|
||||
GeneraPolizaVentaWS(context, ObjFactura)
|
||||
'GeneraPolizaVentaLTHWSD(context)
|
||||
'GeneraIndicadores(context)
|
||||
End Sub
|
||||
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub EnviarPolizaVentaLTHWSD(ByVal context As HttpContext)
|
||||
Protected Sub GeneraPolizaVentaWS(ByVal context As HttpContext, ObjFactura As Modelos.Factura)
|
||||
Dim obj As New MPolizaVentaWS
|
||||
'DATOS DEL CLIENTE
|
||||
obj.customer_name = ObjFactura.Cliente.Nombre
|
||||
obj.customer_last_name1 = ""
|
||||
obj.customer_last_name2 = ""
|
||||
obj.customer_birthday = Nothing
|
||||
obj.customer_phone = ObjFactura.Cliente.Telefono
|
||||
obj.customer_email = ObjFactura.Cliente.Mail
|
||||
obj.customer_gender = "03" 'OTRO GENERO
|
||||
obj.customer_advertising = False
|
||||
obj.customer_car_brand = "00"
|
||||
obj.customer_car_model = "00"
|
||||
obj.customer_car_year = ObjFactura.Fecha.Year
|
||||
|
||||
'DATOS DE VENTA
|
||||
obj.sale_date = Now
|
||||
obj.sale_paidby = "01"
|
||||
obj.sale_type = "01" 'PISO
|
||||
obj.sale_type_service = "01" 'PARTICULAR
|
||||
obj.sale_total = ObjFactura.Total
|
||||
obj.sale_discount = ObjFactura.SubTotal
|
||||
obj.sale_id = GuidGenerator.GenerateTimeBasedGuid().ToString()
|
||||
|
||||
'Dim PS = ObjFactura.DtDetalle.Rows(0)
|
||||
'DATOS DEL PRODUCTO
|
||||
obj.product_code = "174925"
|
||||
obj.product_unique_code = "65047187"
|
||||
obj.product_sale_type = "02" 'AJUSTE
|
||||
|
||||
'DATOS DE USADO
|
||||
obj.used_product = True
|
||||
obj.used_brand = "01"
|
||||
obj.used_bci = "25"
|
||||
obj.used_month = 1
|
||||
obj.used_year = 2015
|
||||
obj.used_sale_date = ObjFactura.Fecha
|
||||
|
||||
EnviarPolizaVentaWS(context, obj)
|
||||
End Sub
|
||||
|
||||
Protected Sub GeneraPolizaVentaLTHWSD(ByVal context As HttpContext, ObjFactura As Modelos.Factura)
|
||||
Dim obj As New MPolizaVentaLTHWSD
|
||||
'DATOS DEL CLIENTE
|
||||
obj.customer_name = "JOSE ENRIQUE"
|
||||
obj.customer_last_name1 = "VIZCARA"
|
||||
obj.customer_last_name2 = "RENDON"
|
||||
obj.customer_birthday = Now
|
||||
obj.customer_phone = "8186545256"
|
||||
obj.customer_email = "mail@mail.com"
|
||||
obj.customer_gender = "02"
|
||||
obj.customer_advertising = False
|
||||
obj.customer_car_brand = "02"
|
||||
obj.customer_car_model = "741"
|
||||
obj.customer_car_year = 2015
|
||||
|
||||
'DATOS DE VENTA
|
||||
obj.sale_date = Now
|
||||
obj.sale_paidby = "01"
|
||||
obj.sale_type = "01"
|
||||
obj.sale_type_service = "01"
|
||||
obj.sale_discount = 0
|
||||
obj.sale_id = GuidGenerator.GenerateTimeBasedGuid().ToString()
|
||||
|
||||
'DATOS DEL PRODUCTO
|
||||
obj.product_code = "174925"
|
||||
obj.product_unique_code = "65047187"
|
||||
obj.product_sale_type = "01"
|
||||
|
||||
'DATOS DE USADO
|
||||
obj.used_product = True
|
||||
obj.used_brand = "01"
|
||||
obj.used_bci = "25"
|
||||
obj.used_month = 1
|
||||
obj.used_year = 2015
|
||||
obj.used_sale_date = Now
|
||||
|
||||
EnviarPolizaVentaLTHWSD(context, obj)
|
||||
End Sub
|
||||
Protected Sub GeneraIndicadores(ByVal context As HttpContext)
|
||||
Dim obj As New MIndicador(True)
|
||||
EnviarPolizaIndicadores(context, obj)
|
||||
End Sub
|
||||
|
||||
Protected Sub EnviarPolizaVentaLTHWSD(ByVal context As HttpContext, obj As MPolizaVentaLTHWSD)
|
||||
Dim Retorno As String = "[]"
|
||||
Try
|
||||
Using wc As New HttpClient()
|
||||
Dim Url = New Uri("http://polizavirtual.com.mx/lthwsd/api/Venta")
|
||||
|
||||
Dim Parametros = New List(Of KeyValuePair(Of String, String))
|
||||
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", "JOSE ENRIQUE VIZCARA RENDON"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", "Prueba"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", "Prueba"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", "1900-01-01 00:00:00"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", "5417543010"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", "elunap@gmail.com"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", "02"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", "False"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", "2018-07-24 00:00:00"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_code", "174200"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", "65047187"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_product", "True"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", "25"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_month", "1"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_year", "2015"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", "2018-07-24 00:00:00"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", "36"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", "741"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", "2015"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", "0"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", "32860"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", obj.customer_name))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", obj.customer_last_name1))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", obj.customer_last_name1))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", obj.customer_birthday.ToString("yyyy-MM-dd HH:mm:ss")))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", obj.customer_phone))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", obj.customer_email))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", obj.customer_gender))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", obj.customer_advertising.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", obj.sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", obj.sale_paidby))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", obj.sale_type))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", obj.sale_type_service))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_code", obj.product_code))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", obj.product_unique_code))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", obj.product_sale_type))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_product", obj.used_product.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", obj.used_brand))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", obj.used_bci))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_month", obj.used_month.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_year", obj.used_year.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", obj.used_sale_date.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", obj.customer_car_brand.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", obj.customer_car_model.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", obj.customer_car_year.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", obj.sale_discount.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", obj.sale_id.ToString()))
|
||||
|
||||
Dim content As New FormUrlEncodedContent(Parametros)
|
||||
Dim response = wc.PostAsync(Url, content).Result
|
||||
@@ -78,7 +205,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
||||
context.Response.Write(Retorno)
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarPolizaVentaWS(ByVal context As HttpContext)
|
||||
Protected Sub EnviarPolizaVentaWS(ByVal context As HttpContext, obj As MPolizaVentaWS)
|
||||
Dim Retorno As String = "[]"
|
||||
Try
|
||||
Using wc As New HttpClient()
|
||||
@@ -88,33 +215,33 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", "JOSE ENRIQUE "))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", "VIZCARA"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", "RENDON"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", "1900-01-01 00:00:00"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", "8186545256"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", "mail@mail.com"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", "02"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", "False"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", "2018-07-24 00:00:00"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_code", "174925"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", "65047187"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_total", "0"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_product", "True"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", "01"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", "25"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_month", "1"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_year", "2015"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", "2018-07-24 00:00:00"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", "36"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", "741"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", "2015"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", "0"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", "32860"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", obj.customer_name))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", obj.customer_last_name1))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", obj.customer_last_name1))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", obj.customer_birthday.ToString("yyyy-MM-dd HH:mm:ss")))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", obj.customer_phone))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", obj.customer_email))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", obj.customer_gender))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", obj.customer_advertising.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", obj.sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", obj.sale_paidby))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", obj.sale_type))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", obj.sale_type_service))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_code", obj.product_code))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", obj.product_unique_code))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", obj.product_sale_type))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_total", obj.sale_total.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_product", obj.used_product.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", obj.used_brand))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", obj.used_bci))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_month", obj.used_month.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_year", obj.used_year.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", obj.used_sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", obj.customer_car_brand.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", obj.customer_car_model.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", obj.customer_car_year.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", obj.sale_discount.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", obj.sale_id.ToString()))
|
||||
|
||||
Dim content As New FormUrlEncodedContent(Parametros)
|
||||
Dim response = wc.PostAsync(Url, content).Result
|
||||
@@ -129,7 +256,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
||||
context.Response.Write(Retorno)
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarPolizaIndicadores(ByVal context As HttpContext)
|
||||
Protected Sub EnviarPolizaIndicadores(ByVal context As HttpContext, obj As MIndicador)
|
||||
Dim Retorno As String = "[]"
|
||||
Try
|
||||
Using wc As New HttpClient()
|
||||
@@ -139,47 +266,47 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_optima", "1"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_fullpower", "2"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_hitec", "3"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_agm", "4"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_suv", "5"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_taxi", "6"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_america", "7"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_lth", "8"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_cronos", "9"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_diener", "10"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_heavyduty", "11"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_m_lth", "12"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_filtros", "13"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lub1", "14"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lubgalon", "15"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lub5", "16"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_aa", "17"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_aaa", "18"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_optima", "19"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_fullpower", "20"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_hitec", "21"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_agm", "22"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_suv", "23"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_taxi", "24"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_america", "25"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_lth", "26"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_cronos", "27"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_diener", "28"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_heavyduty", "29"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_m_lth", "30"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_optima", "31"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_fullpower", "32"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_hitec", "33"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_agm", "34"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_suv", "35"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_taxi", "36"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_america", "37"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_lth", "38"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_cronos", "39"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_diener", "40"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_heavyduty", "41"))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_optima", obj.v_b_optima.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_fullpower", obj.v_b_fullpower.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_hitec", obj.v_b_hitec.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_agm", obj.v_b_agm.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_suv", obj.v_b_suv.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_taxi", obj.v_b_taxi.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_america", obj.v_b_america.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_lth", obj.v_b_lth.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_cronos", obj.v_b_cronos.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_diener", obj.v_b_diener.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_b_heavyduty", obj.v_b_heavyduty.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_m_lth", obj.v_m_lth.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_filtros", obj.v_o_filtros.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lub1", obj.v_o_lub1.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lubgalon", obj.v_o_lubgalon.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_lub5", obj.v_o_lub5.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_aa", obj.v_o_aa.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("v_o_aaa", obj.v_o_aaa.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_optima", obj.g_b_optima.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_fullpower", obj.g_b_fullpower.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_hitec", obj.g_b_hitec.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_agm", obj.g_b_agm.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_suv", obj.g_b_suv.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_taxi", obj.g_b_taxi.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_america", obj.g_b_america.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_lth", obj.g_b_lth.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_cronos", obj.g_b_cronos.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_diener", obj.g_b_diener.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_b_heavyduty", obj.g_b_heavyduty.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("g_m_lth", obj.g_m_lth.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_optima", obj.a_b_optima.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_fullpower", obj.a_b_fullpower.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_hitec", obj.a_b_hitec.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_agm", obj.a_b_agm.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_suv", obj.a_b_suv.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_taxi", obj.a_b_taxi.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_america", obj.a_b_america.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_lth", obj.a_b_lth.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_cronos", obj.a_b_cronos.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_diener", obj.a_b_diener.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("a_b_heavyduty", obj.a_b_heavyduty.ToString()))
|
||||
|
||||
Dim content As New FormUrlEncodedContent(Parametros)
|
||||
Dim response = wc.PostAsync(Url, content).Result
|
||||
@@ -194,4 +321,217 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
||||
context.Response.Write(Retorno)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
End Class
|
||||
|
||||
Public Class MPolizaVentaLTHWSD
|
||||
Public Property customer_name As String
|
||||
Public Property customer_last_name1 As String
|
||||
Public Property customer_last_name2 As String
|
||||
Public Property customer_birthday As DateTime
|
||||
Public Property customer_phone As String
|
||||
Public Property customer_email As String
|
||||
Public Property customer_gender As String
|
||||
Public Property customer_advertising As Boolean
|
||||
Public Property sale_date As DateTime
|
||||
Public Property sale_paidby As String
|
||||
Public Property sale_type As String
|
||||
Public Property sale_type_service As String
|
||||
Public Property product_code As String
|
||||
Public Property product_unique_code As String
|
||||
Public Property product_sale_type As String
|
||||
Public Property used_product As Boolean
|
||||
Public Property used_brand As String
|
||||
Public Property used_bci As String
|
||||
Public Property used_month As Integer
|
||||
Public Property used_year As Integer
|
||||
Public Property used_sale_date As DateTime
|
||||
Public Property customer_car_brand As String
|
||||
Public Property customer_car_model As String
|
||||
Public Property customer_car_year As Integer
|
||||
Public Property sale_discount As Decimal
|
||||
Public Property sale_id As String
|
||||
End Class
|
||||
|
||||
Public Class MPolizaVentaWS
|
||||
Public Property customer_name As String
|
||||
Public Property customer_last_name1 As String
|
||||
Public Property customer_last_name2 As String
|
||||
Public Property customer_birthday As DateTime
|
||||
Public Property customer_phone As String
|
||||
Public Property customer_email As String
|
||||
Public Property customer_gender As String
|
||||
Public Property customer_advertising As Boolean
|
||||
Public Property sale_date As DateTime
|
||||
Public Property sale_paidby As String
|
||||
Public Property sale_type As String
|
||||
Public Property sale_type_service As String
|
||||
Public Property sale_total As Decimal
|
||||
Public Property product_code As String
|
||||
Public Property product_unique_code As String
|
||||
Public Property product_sale_type As String
|
||||
Public Property used_product As Boolean
|
||||
Public Property used_brand As String
|
||||
Public Property used_bci As String
|
||||
Public Property used_month As Integer
|
||||
Public Property used_year As Integer
|
||||
Public Property used_sale_date As DateTime
|
||||
Public Property customer_car_brand As String
|
||||
Public Property customer_car_model As String
|
||||
Public Property customer_car_year As Integer
|
||||
Public Property sale_discount As Decimal
|
||||
Public Property sale_id As String
|
||||
End Class
|
||||
|
||||
Public Class MIndicador
|
||||
|
||||
Sub New(Optional UsaValoresPrueba As Boolean = False)
|
||||
If UsaValoresPrueba Then
|
||||
Dim Index As Integer = 0
|
||||
For Each p As Reflection.PropertyInfo In Me.GetType().GetProperties()
|
||||
Index = Index + 1
|
||||
p.SetValue(Me, Convert.ChangeType(Index, p.PropertyType), Nothing)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Property v_b_optima As Integer
|
||||
Public Property v_b_fullpower As Integer
|
||||
Public Property v_b_hitec As Integer
|
||||
Public Property v_b_agm As Integer
|
||||
Public Property v_b_suv As Integer
|
||||
Public Property v_b_taxi As Integer
|
||||
Public Property v_b_america As Integer
|
||||
Public Property v_b_lth As Integer
|
||||
Public Property v_b_cronos As Integer
|
||||
Public Property v_b_diener As Integer
|
||||
Public Property v_b_heavyduty As Integer
|
||||
Public Property v_m_lth As Integer
|
||||
Public Property v_o_filtros As Integer
|
||||
Public Property v_o_lub1 As Integer
|
||||
Public Property v_o_lubgalon As Integer
|
||||
Public Property v_o_lub5 As Integer
|
||||
Public Property v_o_aa As Integer
|
||||
Public Property v_o_aaa As Integer
|
||||
Public Property g_b_optima As Integer
|
||||
Public Property g_b_fullpower As Integer
|
||||
Public Property g_b_hitec As Integer
|
||||
Public Property g_b_agm As Integer
|
||||
Public Property g_b_suv As Integer
|
||||
Public Property g_b_taxi As Integer
|
||||
Public Property g_b_america As Integer
|
||||
Public Property g_b_lth As Integer
|
||||
Public Property g_b_cronos As Integer
|
||||
Public Property g_b_diener As Integer
|
||||
Public Property g_b_heavyduty As Integer
|
||||
Public Property g_m_lth As Integer
|
||||
Public Property a_b_optima As Integer
|
||||
Public Property a_b_fullpower As Integer
|
||||
Public Property a_b_hitec As Integer
|
||||
Public Property a_b_agm As Integer
|
||||
Public Property a_b_suv As Integer
|
||||
Public Property a_b_taxi As Integer
|
||||
Public Property a_b_america As Integer
|
||||
Public Property a_b_lth As Integer
|
||||
Public Property a_b_cronos As Integer
|
||||
Public Property a_b_diener As Integer
|
||||
Public Property a_b_heavyduty As Integer
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Namespace Fluent
|
||||
Public Enum GuidVersion
|
||||
TimeBased = &H1
|
||||
Reserved = &H2
|
||||
NameBased = &H3
|
||||
Random = &H4
|
||||
End Enum
|
||||
|
||||
Partial Public Module GuidGenerator
|
||||
Public Const ByteArraySize = 16
|
||||
Public Const VariantByte = 8
|
||||
Public Const VariantByteMask = &H3F
|
||||
Public Const VariantByteShift = &H80
|
||||
Public Const VersionByte = 7
|
||||
Public Const VersionByteMask = &HF
|
||||
Public Const VersionByteShift = 4
|
||||
Private Const TimestampByte As Byte = 0
|
||||
Private Const GuidClockSequenceByte As Byte = 8
|
||||
Private Const NodeByte As Byte = 10
|
||||
Private ReadOnly GregorianCalendarStart As DateTimeOffset = New DateTimeOffset(1582, 10, 15, 0, 0, 0, TimeSpan.Zero)
|
||||
Public Property DefaultClockSequence As Byte()
|
||||
Public Property DefaultNode As Byte()
|
||||
|
||||
Sub New()
|
||||
DefaultClockSequence = New Byte(1) {}
|
||||
DefaultNode = New Byte(5) {}
|
||||
Dim random = New Random
|
||||
random.NextBytes(DefaultClockSequence)
|
||||
random.NextBytes(DefaultNode)
|
||||
End Sub
|
||||
|
||||
<Extension()>
|
||||
Function GetVersion(ByVal guid As Guid) As GuidVersion
|
||||
Dim bytes = guid.ToByteArray
|
||||
Return ((bytes(VersionByte) And &HFF) >> VersionByteShift)
|
||||
End Function
|
||||
|
||||
Function GetDateTimeOffset(ByVal guid As Guid) As DateTimeOffset
|
||||
Dim bytes As Byte() = guid.ToByteArray
|
||||
bytes(VersionByte) = bytes(VersionByte) And CByte(VersionByteMask)
|
||||
bytes(VersionByte) = bytes(VersionByte) Or (CByte(GuidVersion.TimeBased) >> VersionByteShift)
|
||||
Dim timestampBytes = New Byte(7) {}
|
||||
Array.Copy(bytes, TimestampByte, timestampBytes, 0, 8)
|
||||
Dim timestamp As Long = BitConverter.ToInt64(timestampBytes, 0)
|
||||
Dim ticks As Long = timestamp + GregorianCalendarStart.Ticks
|
||||
|
||||
Return New DateTimeOffset(ticks, TimeSpan.Zero)
|
||||
End Function
|
||||
|
||||
Function GetDateTime(ByVal guid As Guid) As Date
|
||||
Return GetDateTimeOffset(guid).DateTime
|
||||
End Function
|
||||
|
||||
Function GetLocalDateTime(ByVal guid As Guid) As Date
|
||||
Return GetDateTimeOffset(guid).LocalDateTime
|
||||
End Function
|
||||
|
||||
Function GetUtcDateTime(ByVal guid As Guid) As Date
|
||||
Return GetDateTimeOffset(guid).UtcDateTime
|
||||
End Function
|
||||
|
||||
Function GenerateTimeBasedGuid() As Guid
|
||||
Return GenerateTimeBasedGuid(DateTimeOffset.UtcNow, DefaultClockSequence, DefaultNode)
|
||||
End Function
|
||||
|
||||
Function GenerateTimeBasedGuid(ByVal dateTime As Date) As Guid
|
||||
Return GenerateTimeBasedGuid(dateTime, DefaultClockSequence, DefaultNode)
|
||||
End Function
|
||||
|
||||
Function GenerateTimeBasedGuid(ByVal dateTime As DateTimeOffset) As Guid
|
||||
Return GenerateTimeBasedGuid(dateTime, DefaultClockSequence, DefaultNode)
|
||||
End Function
|
||||
|
||||
Function GenerateTimeBasedGuid(ByVal dateTime As Date, ByVal clockSequence As Byte(), ByVal node As Byte()) As Guid
|
||||
Return GenerateTimeBasedGuid(New DateTimeOffset(dateTime), clockSequence, node)
|
||||
End Function
|
||||
|
||||
Function GenerateTimeBasedGuid(ByVal dateTime As DateTimeOffset, ByVal clockSequence As Byte(), ByVal node As Byte()) As Guid
|
||||
If clockSequence Is Nothing Then Throw New ArgumentNullException("clockSequence")
|
||||
If node Is Nothing Then Throw New ArgumentNullException("node")
|
||||
If clockSequence.Length <> 2 Then Throw New ArgumentOutOfRangeException("clockSequence", "The clockSequence must be 2 bytes.")
|
||||
If node.Length <> 6 Then Throw New ArgumentOutOfRangeException("node", "The node must be 6 bytes.")
|
||||
Dim ticks = (dateTime - GregorianCalendarStart).Ticks
|
||||
Dim guid = New Byte(15) {}
|
||||
Dim timestamp = BitConverter.GetBytes(ticks)
|
||||
Array.Copy(node, 0, guid, NodeByte, Math.Min(6, node.Length))
|
||||
Array.Copy(clockSequence, 0, guid, GuidClockSequenceByte, Math.Min(2, clockSequence.Length))
|
||||
Array.Copy(timestamp, 0, guid, TimestampByte, Math.Min(8, timestamp.Length))
|
||||
guid(VariantByte) = guid(VariantByte) And CByte(VariantByteMask)
|
||||
guid(VariantByte) = guid(VariantByte) Or CByte(VariantByteShift)
|
||||
guid(VersionByte) = guid(VersionByte) And CByte(VersionByteMask)
|
||||
guid(VersionByte) = guid(VersionByte) Or (CByte(GuidVersion.TimeBased) << VersionByteShift)
|
||||
Return New Guid(guid)
|
||||
End Function
|
||||
End Module
|
||||
End Namespace
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpMovDeudor" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvMovDeudor" runat="server" AutoGenerateColumns="False" DataKeyNames="CveIE,CveProveedor,CveMoneda,Importe,Saldo,Pagado,Folio,TipoCambio" Width="100%" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" OnRowDataBound="GvMovDeudor_RowDataBound">
|
||||
<asp:GridView ID="GvMovDeudor" runat="server" AutoGenerateColumns="False" DataKeyNames="CveIE,CveProveedor,CveMoneda,Importe,Saldo,Pagado,Folio,TipoCambio,FechaDocumento" Width="100%" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" OnRowDataBound="GvMovDeudor_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate></HeaderTemplate>
|
||||
|
||||
@@ -445,7 +445,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
}
|
||||
|
||||
bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
|
||||
if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
|
||||
// if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
|
||||
|
||||
if (AutoConta && MsgError.Equals(""))
|
||||
{
|
||||
@@ -708,6 +708,14 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
{
|
||||
if (gvr.FCCheckBox("Chk").Checked)
|
||||
{
|
||||
|
||||
Decimal TCDoc = gvr.DataKey("TipoCambio").ToDecimal(); // tipo de cambio de IE
|
||||
if (gvr.DataKey("FechaDocumento").ToDate() < TxtFechaDocumento.Text.ToDate().FirstDayOfMonth())
|
||||
{
|
||||
// si la fecha del documento a pagar es menor al primer dia del mes del pago, toma el TC del mes anterior
|
||||
TCDoc = get_GlobalTipoCambio(TxtFechaDocumento.Text.ToDate().AddMonths(-1).LastDayOfMonth()).ToDecimal();
|
||||
}
|
||||
|
||||
Importe = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
|
||||
ImporteMN = Importe;
|
||||
ImporteComplementaria = 0;
|
||||
@@ -722,11 +730,11 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
if (UsaComplementaria)
|
||||
{
|
||||
ImporteMN = Importe;
|
||||
ImporteComplementaria = Importe * gvr.DataKey("TipoCambio").ToDecimal() - Importe;
|
||||
ImporteComplementaria = Importe * TCDoc - Importe;
|
||||
}
|
||||
else
|
||||
{
|
||||
ImporteMN = Importe * gvr.DataKey("TipoCambio").ToDecimal();
|
||||
ImporteMN = Importe * TCDoc;
|
||||
ImporteComplementaria = 0;
|
||||
}
|
||||
}
|
||||
@@ -740,11 +748,11 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
if (UsaComplementaria)
|
||||
{
|
||||
ImporteMN = Importe;
|
||||
ImporteComplementaria = Importe * gvr.DataKey("TipoCambio").ToDecimal() - Importe;
|
||||
ImporteComplementaria = Importe * TCDoc - Importe;
|
||||
}
|
||||
else
|
||||
{
|
||||
ImporteMN = Importe * gvr.DataKey("TipoCambio").ToDecimal();
|
||||
ImporteMN = Importe * TCDoc;
|
||||
ImporteComplementaria = 0;
|
||||
}
|
||||
}
|
||||
@@ -755,32 +763,32 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
if (tCveMoneda != 1)
|
||||
{
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableDeudor, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: gvr.DataKey("TipoCambio").ToDecimal(), TipoCambioPago: TC,CveSubProyecto:DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContableDeudor, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TCDoc, TipoCambioPago: TC,CveSubProyecto:DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de pago deudor";
|
||||
break;
|
||||
}
|
||||
if (UsaComplementaria)
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePagoComplementaria, Conc, DateTime.Now, IDCtaContableDeudorComplementaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: gvr.DataKey("TipoCambio").ToDecimal(), TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePagoComplementaria, Conc, DateTime.Now, IDCtaContableDeudorComplementaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TCDoc, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de deudor complementaria";
|
||||
}
|
||||
}
|
||||
|
||||
if (TC != gvr.DataKey("TipoCambio").ToDecimal())
|
||||
if (TC != TCDoc)
|
||||
{
|
||||
int CveConceptoDiferenciaCambiaria = 0;
|
||||
bool TipoMovto = false;
|
||||
int IdCtaContableDiferenciaCambiaria = 0;
|
||||
if (TC <gvr.DataKey("TipoCambio").ToDecimal())
|
||||
if (TC < TCDoc)
|
||||
{
|
||||
CveConceptoDiferenciaCambiaria = 65;
|
||||
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
|
||||
TipoMovto = false;
|
||||
Importe = (Importe * gvr.DataKey("TipoCambio").ToDecimal()) - (Importe * TC);
|
||||
}
|
||||
else if (TC > gvr.DataKey("TipoCambio").ToDecimal())
|
||||
else if (TC > TCDoc)
|
||||
{
|
||||
CveConceptoDiferenciaCambiaria = 64;
|
||||
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
|
||||
|
||||
@@ -900,14 +900,14 @@ Partial Class Bancos_PolizaCheque
|
||||
Importe = Importe * TC
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=If(UsuarioActual.CveEmpresa = 119, gvr.FCDropDownList("DdlSubProyecto").ToEntero, gvr.DataKey("CveSubProyecto").ToEntero), CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, CveCuenta:=If(UsuarioActual.Empresa.UsaContabilidad AndAlso UsuarioActual.Empresa.UsaContabilidadSIG, ObtenerCuentaDobleConta(gvr.DataKey("IDCuenta").ToEntero, UsuarioActual.CveEmpresa), -1), TipoCambio:=TC) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, CveCuenta:=If(UsuarioActual.Empresa.UsaContabilidad AndAlso UsuarioActual.Empresa.UsaContabilidadSIG, ObtenerCuentaDobleConta(gvr.DataKey("IDCuenta").ToEntero, UsuarioActual.CveEmpresa), -1), TipoCambio:=TC) Then
|
||||
MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||
End If
|
||||
|
||||
If gvr.DataKey("CveConcepto").ToEntero = 30 Then
|
||||
If CveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
|
||||
'Agregamos complementaria
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, 0, gvr.FCTextBox("TxtConcepto").Text, 204, TxtObservaciones.Text, Now, dr("IDCtaContableComplementaria").ToString.ToEntero, -1, CveIE:=CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=If(UsuarioActual.CveEmpresa = 119, gvr.FCDropDownList("DdlSubProyecto").ToEntero, gvr.DataKey("CveSubProyecto").ToEntero), CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe * TC - Importe, ImporteME:=Importe, TipoCambio:=TC) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, 0, gvr.FCTextBox("TxtConcepto").Text, 204, TxtObservaciones.Text, Now, dr("IDCtaContableComplementaria").ToString.ToEntero, -1, CveIE:=CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe * TC - Importe, ImporteME:=Importe, TipoCambio:=TC) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
<asp:CheckBox ID="Chk" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="95px">
|
||||
<asp:TemplateField ItemStyle-Width="115px">
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
|
||||
|
||||
@@ -1811,7 +1811,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
|
||||
If MsgError <> "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
MsgError = ObjMov.MensajePolizaDescuadre + " " + ObjMov.ValorDiferencia
|
||||
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
|
||||
@@ -16,7 +16,13 @@
|
||||
<asp:LinkButton ID="LnkHabilitarSaldar" runat="server"><i class="fa fa-money"></i> Otros Egresos</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSaldar" Visible="false" OnClick="LnkSaldar_Click" runat="server"><i class="fa fa-money"></i> Saldar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkHabilitarSaldarFyE" runat="server"><i class="fa fa-money"></i> Viaticos-Personal</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSaldar" Visible="false" OnClick="LnkSaldar_Click" runat="server"><i class="fa fa-money"></i> Saldar Proveedores</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSaldarFyE" Visible="false" OnClick="LnkSaldarFyE_Click" runat="server"><i class="fa fa-money"></i> Saldar FyE</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -153,7 +159,7 @@
|
||||
|
||||
<asp:GridView ID="GvESC" runat="server" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Proveedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" />
|
||||
</ItemTemplate>
|
||||
@@ -212,8 +218,14 @@
|
||||
<asp:UpdatePanel ID="upDatosPersonal" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPersonal" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Funcionarios Empleados" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<asp:GridView ID="GvPersonal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal"
|
||||
EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Funcionarios Empleados" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Personal">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="Hpl" runat="server" NavigateUrl='<%# String.Format("/RH/Personal.aspx?CvePersonal={0}&Opt=10", Eval("CvePersonal"))%>' Text='<%# Eval("NombreCompleto")%>'></asp:HyperLink>
|
||||
|
||||
@@ -180,53 +180,88 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
gr.FCCheckBox("Chk").Visible = True
|
||||
LnkSaldar.Visible = True
|
||||
LnkHabilitarSaldar.Visible = False
|
||||
'portletBody.Attributes.Remove("style")
|
||||
'portletBody.Attributes.Add("style", "display: block;")
|
||||
|
||||
'HExtensorFiltro.Attributes.Remove("class")
|
||||
'HExtensorFiltro.Attributes.Add("class", "collapse")
|
||||
|
||||
'UPFiltros.Update()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
Private Sub LnkHabilitarSaldoFyE_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldarFyE.Click
|
||||
For Each gr As GridViewRow In GvPersonal.Rows
|
||||
If gr.DataKey("CvePersonal") <> "" Then
|
||||
gr.FCCheckBox("Chk").Visible = True
|
||||
LnkSaldarFyE.Visible = True
|
||||
LnkHabilitarSaldarFyE.Visible = False
|
||||
upDatosPersonal.Update()
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim ObjProveedor As New ClsCompProveedores(ObjConta.IniciaTransacSQL())
|
||||
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
Dim MsgError As String = ""
|
||||
Try
|
||||
For Each gr As GridViewRow In GvESC.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveConceptoContable As Integer
|
||||
|
||||
Select Case gr.DataKey("CveConceptoContable").ToEntero
|
||||
Case 10
|
||||
CveConceptoContable = 21
|
||||
Case 28
|
||||
CveConceptoContable = 29
|
||||
Case 37
|
||||
CveConceptoContable = 43
|
||||
Case 42
|
||||
CveConceptoContable = 41
|
||||
Case 43
|
||||
CveConceptoContable = 37
|
||||
End Select
|
||||
|
||||
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, gr.DataKey("CveProveedor").ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProveedor.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjProveedor.IdCtaContProveedores
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.GetCuentaDobleConta(IdCtaContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("CveCuenta").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
|
||||
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
|
||||
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgError = "Ocurrió un error al generar la prepoliza"
|
||||
OnError(MsgError, ex)
|
||||
End Try
|
||||
|
||||
For Each gr As GridViewRow In GvESC.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim CveConceptoContable As Integer
|
||||
|
||||
Select Case gr.DataKey("CveConceptoContable").ToEntero
|
||||
Case 10
|
||||
CveConceptoContable = 21
|
||||
Case 28
|
||||
CveConceptoContable = 29
|
||||
Case 37
|
||||
CveConceptoContable = 43
|
||||
Case 42
|
||||
CveConceptoContable = 41
|
||||
Case 43
|
||||
CveConceptoContable = 37
|
||||
End Select
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero, ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=-1) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjConta.Commit()
|
||||
@@ -239,11 +274,96 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
|
||||
LnkSaldar.Visible = False
|
||||
LnkHabilitarSaldar.Visible = True
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
ObjProveedor.Dispose()
|
||||
End Sub
|
||||
Protected Sub LnkSaldarFyE_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
ObjConta.IniciaTransacSQL()
|
||||
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
Dim MsgError As String = ""
|
||||
|
||||
Try
|
||||
For Each gr As GridViewRow In GvPersonal.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim IdCtaContPersonal As Integer = 0
|
||||
Dim CveConceptoContable As Integer
|
||||
|
||||
Select Case gr.DataKey("CveConceptoContable").ToEntero
|
||||
Case 10
|
||||
CveConceptoContable = 21
|
||||
Case 28
|
||||
CveConceptoContable = 29
|
||||
Case 37
|
||||
CveConceptoContable = 43
|
||||
Case 42
|
||||
CveConceptoContable = 41
|
||||
Case 43
|
||||
CveConceptoContable = 37
|
||||
End Select
|
||||
|
||||
If ObjConta.GetRetCuenta(CveConceptoContable, gr.DataKey("CvePersonal").ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContPersonal = ObjConta.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.GetCuentaDobleConta(IdCtaContPersonal, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("CveCuenta").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
|
||||
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
|
||||
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgError = "Ocurrió un error al generar la prepoliza"
|
||||
OnError(MsgError, ex)
|
||||
End Try
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjConta.Commit()
|
||||
CargaDatos()
|
||||
Alert("Los movimientos se saldaron correctamente.")
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
Alert(MsgError, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
LnkSaldarFyE.Visible = False
|
||||
LnkHabilitarSaldarFyE.Visible = True
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "IMPRESIONES"
|
||||
|
||||
|
||||
Private Sub ImprimirReportePdf(Archivo As String, DtDatos As DataTable, Optional Formato As String = "PDF")
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
Dim StrFiltro As New StringBuilder
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -301,7 +301,7 @@
|
||||
<asp:LinkButton ID="LinkButton1" CssClass="Texto" runat="server">No Recibidas</asp:LinkButton></th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GvPagos" runat="server" Width="100%" AutoGenerateColumns="False" DataKeyNames="CveFactura,CveCompra,CveProveedor,SerieFolio,NombreProveedor,UUID,RFCDe,RFCPara,TipoFactura,FueValidado,TipoComprobante,Version,RFCde,XML,CveComplementoPagoCompra"
|
||||
<asp:GridView ID="GvPagos" runat="server" Width="100%" AutoGenerateColumns="False" DataKeyNames="CveFactura,CveCompra,CveProveedor,SerieFolio,NombreProveedor,UUID,RFCDe,RFCPara,TipoFactura,FueValidado,TipoComprobante,Version,RFCde,XML,CveComplementoPagoCompra,PDF"
|
||||
EmptyDataText="No se encontraron Registros con el filtro actual" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo">
|
||||
@@ -338,7 +338,7 @@
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="PDF">
|
||||
<ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPDF" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
@@ -380,6 +380,12 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="PDF">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkRegenerarPdf" OnClick="LnkRegenerarPdfnew_Click" CssClass="btn btn-circle btn-sm blue" runat="server"><i class="fa fa-refresh" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
|
||||
@@ -1017,7 +1017,7 @@ Partial Class Compras_eFacturas
|
||||
e.Row.FCLinkButton("LnkAgregarPagoP").Visible = True
|
||||
End If
|
||||
Else
|
||||
e.Row.FCLiteral("LtlXML").Text = "N/D"
|
||||
e.Row.FCLiteral("LtlXML").Text = "N/D" ' String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML")) '
|
||||
If e.Row.DBCampo("TipoComprobante") = "P" Then
|
||||
e.Row.FCLinkButton("LnkAgregarPagoP").Visible = False
|
||||
End If
|
||||
@@ -1026,7 +1026,7 @@ Partial Class Compras_eFacturas
|
||||
If File.Exists(String.Format("{0}{1}/{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("PDF"))) Then
|
||||
e.Row.FCLiteral("LtlPDF").Text = String.Format("<a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?RFC={0}&File={1}"">Ver</a>", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("PDF")))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlPDF").Text = "N/D"
|
||||
e.Row.FCLiteral("LtlPDF").Text = "N/D" ' String.Format("{0}{1}/{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("PDF"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("FueValidado").Contiene("1", "2", "3") Then
|
||||
@@ -3142,4 +3142,134 @@ Partial Class Compras_eFacturas
|
||||
Response.End()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkRegenerarPdfnew_Click(sender As Object, e As EventArgs)
|
||||
Dim gvrow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim objxml As XmlSatCFDI = XmlSatCFDI.readXML(String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("XML")))
|
||||
If Not IsNothing(objxml) Then
|
||||
Dim rutaReporte As String = String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "\Empresas\Grales\Formatos\CFDIV3.rdlc")
|
||||
If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
rutaReporte = String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "\Empresas\Grales\Formatos\CFDIV3Pago.rdlc")
|
||||
End If
|
||||
Dim NombreArchivo As String = String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("PDF"))
|
||||
|
||||
|
||||
Dim QR As ClbNegBICFDv3_2.ClsNegCBBGenerar = New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
Dim cQr As Byte() = QR.GenerarCBBBytes(objxml.emisor.Rfc, objxml.receptor.Rfc, If(IsNothing(objxml.complemento.Pagos), objxml.comprobante.Total, objxml.complemento.Pagos.Monto), objxml.complemento.UUID)
|
||||
Dim parametros As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
parametros.Add(New ReportParameter("comprobante_Certificado", objxml.comprobante.Certificado))
|
||||
parametros.Add(New ReportParameter("comprobante_CondicionesDePago", objxml.comprobante.CondicionesDePago))
|
||||
parametros.Add(New ReportParameter("comprobante_Confirmacion", objxml.comprobante.Confirmacion))
|
||||
parametros.Add(New ReportParameter("comprobante_Fecha", objxml.comprobante.Fecha))
|
||||
parametros.Add(New ReportParameter("comprobante_Serie", objxml.comprobante.Serie))
|
||||
parametros.Add(New ReportParameter("comprobante_Folio", objxml.comprobante.Folio))
|
||||
parametros.Add(New ReportParameter("comprobante_Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_SubTotal", objxml.comprobante.SubTotal.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_Total", objxml.comprobante.Total.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_Version", objxml.comprobante.Version))
|
||||
parametros.Add(New ReportParameter("comprobante_TipoDeComprobante", objxml.comprobante.TipoDeComprobanteTexto))
|
||||
parametros.Add(New ReportParameter("comprobante_FormaPago", objxml.comprobante.FormaPagoTexto))
|
||||
parametros.Add(New ReportParameter("comprobante_LugarExpedicion", objxml.comprobante.LugarExpedicion))
|
||||
parametros.Add(New ReportParameter("comprobante_NoCertificado", objxml.comprobante.NoCertificado))
|
||||
parametros.Add(New ReportParameter("comprobante_Sello", objxml.comprobante.Sello))
|
||||
parametros.Add(New ReportParameter("comprobante_Moneda", objxml.comprobante.Moneda))
|
||||
parametros.Add(New ReportParameter("comprobante_TipoCambio", objxml.comprobante.TipoCambio.ToString("N2")))
|
||||
parametros.Add(New ReportParameter("comprobante_MetodoPago", objxml.comprobante.MetodoPagoTexto))
|
||||
parametros.Add(New ReportParameter("emisor_Rfc", objxml.emisor.Rfc))
|
||||
parametros.Add(New ReportParameter("emisor_Nombre", objxml.emisor.Nombre))
|
||||
parametros.Add(New ReportParameter("emisor_RegimenFiscal", objxml.emisor.RegimenFiscalTexto))
|
||||
parametros.Add(New ReportParameter("receptor_Rfc", objxml.receptor.Rfc))
|
||||
parametros.Add(New ReportParameter("receptor_Nombre", objxml.receptor.Nombre))
|
||||
parametros.Add(New ReportParameter("receptor_NumRegIdTrib", objxml.receptor.NumRegIdTrib))
|
||||
parametros.Add(New ReportParameter("receptor_ResidenciaFiscal", objxml.receptor.ResidenciaFiscal))
|
||||
parametros.Add(New ReportParameter("receptor_UsoCFDI", objxml.receptor.UsoCFDITexto))
|
||||
parametros.Add(New ReportParameter("complemento_FechaTimbrado", objxml.complemento.FechaTimbrado))
|
||||
parametros.Add(New ReportParameter("complemento_NoCertificadoSAT", objxml.complemento.NoCertificadoSAT))
|
||||
parametros.Add(New ReportParameter("complemento_RfcProvCertif", objxml.complemento.RfcProvCertif))
|
||||
parametros.Add(New ReportParameter("complemento_SelloCFD", objxml.complemento.SelloCFD))
|
||||
parametros.Add(New ReportParameter("complemento_SelloSAT", objxml.complemento.SelloSAT))
|
||||
parametros.Add(New ReportParameter("complemento_UUID", objxml.complemento.UUID))
|
||||
parametros.Add(New ReportParameter("complemento_CadenaOriginal", objxml.complemento.CadenaOriginal))
|
||||
If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
parametros.Add(New ReportParameter("CPFechaPago", objxml.complemento.Pagos.FechaPago))
|
||||
parametros.Add(New ReportParameter("CPFormaDePagoP", objxml.complemento.Pagos.FormaDePagoP))
|
||||
parametros.Add(New ReportParameter("CPFormaDePagoPText", objxml.complemento.Pagos.FormaDePagoPText))
|
||||
parametros.Add(New ReportParameter("CPMonedaP", objxml.complemento.Pagos.MonedaP))
|
||||
parametros.Add(New ReportParameter("CPMonto", objxml.complemento.Pagos.Monto.ToString()))
|
||||
parametros.Add(New ReportParameter("CPTipoCambioP", objxml.complemento.Pagos.TipoCambioP.ToString()))
|
||||
parametros.Add(New ReportParameter("CPNumOperacion", objxml.complemento.Pagos.NumOperacion))
|
||||
parametros.Add(New ReportParameter("CPNomBancoOrdExt", objxml.complemento.Pagos.NomBancoOrdExt))
|
||||
parametros.Add(New ReportParameter("CPRfcEmisorCtaOrd", objxml.complemento.Pagos.RfcEmisorCtaOrd))
|
||||
parametros.Add(New ReportParameter("CPCtaOrdenante", objxml.complemento.Pagos.CtaOrdenante))
|
||||
parametros.Add(New ReportParameter("CPRfcEmisorCtaBen", objxml.complemento.Pagos.RfcEmisorCtaBen))
|
||||
parametros.Add(New ReportParameter("CPCtaBeneficiario", objxml.complemento.Pagos.CtaBeneficiario))
|
||||
|
||||
End If
|
||||
Using MR As ReportViewer = New ReportViewer()
|
||||
Dim rdsTotales As ReportDataSource = New ReportDataSource()
|
||||
Dim ltotales As List(Of utilValores) = New List(Of utilValores)()
|
||||
ltotales.Add(New utilValores("Subtotal", objxml.comprobante.SubTotal.ToString("N2")))
|
||||
|
||||
If objxml.comprobante.Descuento > 0 Then
|
||||
ltotales.Add(New utilValores("Descuento", objxml.comprobante.Descuento.ToString("N2")))
|
||||
End If
|
||||
|
||||
For Each item As CFDIImpuesto In objxml.Impuestos
|
||||
|
||||
If item.Importe > 0 Then
|
||||
Dim TasaOCuota As Decimal = 0
|
||||
Decimal.TryParse(item.TasaOCuota, TasaOCuota)
|
||||
ltotales.Add(New utilValores($"Impuestos {item.Tipo} {item.ImpuestoTexto} {(If(item.TipoFactor = "Tasa", (TasaOCuota * 100).ToString("N4"), item.TasaOCuota))} {(If(item.TipoFactor = "Tasa", "%", ""))}", item.Importe.ToString("N2")))
|
||||
End If
|
||||
Next
|
||||
|
||||
ltotales.Add(New utilValores("Total", objxml.comprobante.Total.ToString("N2")))
|
||||
rdsTotales.Name = "dsTotales"
|
||||
rdsTotales.Value = ltotales
|
||||
MR.LocalReport.DataSources.Add(rdsTotales)
|
||||
Dim rds2 As ReportDataSource = New ReportDataSource()
|
||||
Dim limagenes As List(Of utilImage) = New List(Of utilImage)()
|
||||
limagenes.Add(New utilImage(cQr))
|
||||
rds2.Name = "dsImagenes"
|
||||
rds2.Value = limagenes
|
||||
MR.LocalReport.DataSources.Add(rds2)
|
||||
Dim rdsrelacionados As ReportDataSource = New ReportDataSource()
|
||||
rdsrelacionados.Name = "dsRelacionados"
|
||||
rdsrelacionados.Value = objxml.cFDIRelacionados
|
||||
MR.LocalReport.DataSources.Add(rdsrelacionados)
|
||||
Dim rds1 As ReportDataSource = New ReportDataSource()
|
||||
rds1.Name = "dsConceptos"
|
||||
rds1.Value = objxml.GetConceptosforpdf()
|
||||
MR.LocalReport.DataSources.Add(rds1)
|
||||
|
||||
If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
|
||||
Dim rdsp As ReportDataSource = New ReportDataSource()
|
||||
rdsp.Name = "dsPagos"
|
||||
rdsp.Value = objxml.complemento.Pagos.doctosRelacionados
|
||||
MR.LocalReport.DataSources.Add(rdsp)
|
||||
End If
|
||||
|
||||
MR.LocalReport.ReportPath = rutaReporte
|
||||
MR.ProcessingMode = ProcessingMode.Local
|
||||
MR.LocalReport.EnableExternalImages = True
|
||||
MR.LocalReport.SetParameters(parametros)
|
||||
MR.LocalReport.Refresh()
|
||||
Dim warnings As Warning() = Nothing
|
||||
Dim streamids As String() = Nothing
|
||||
Dim mimeType As String = Nothing
|
||||
Dim encoding As String = Nothing
|
||||
Dim extension As String = Nothing
|
||||
Dim bytes As Byte() = Nothing
|
||||
bytes = MR.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
|
||||
|
||||
Using fs As FileStream = New FileStream(NombreArchivo, FileMode.Create)
|
||||
fs.Write(bytes, 0, bytes.Length)
|
||||
fs.Close()
|
||||
End Using
|
||||
End Using
|
||||
Alert("PDF Generado!")
|
||||
Else
|
||||
Alert("no se pudo procesar el archivo xml")
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -386,12 +386,19 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas" CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
||||
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta,TipoDocto">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ControlStyle-Width ="85px" DataTextField="SerieFolio" />
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HlFolio" runat="server" ControlStyle-Width="85px"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ControlStyle-Width ="85px" DataTextField="SerieFolio" />--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -432,6 +432,15 @@ Partial Class RepCxCDetalle
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(1).Width = Unit.Pixel(70)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(75)
|
||||
End If
|
||||
e.Row.FCHyperLink("HlFolio").Text = e.Row.DBCampo("SerieFolio")
|
||||
|
||||
If e.Row.DBCampo("CveVenta").ToEntero() > 0 Then
|
||||
If e.Row.DBCampo("TipoDocto") = "IxC" Then
|
||||
e.Row.FCHyperLink("HlFolio").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveVenta"))
|
||||
Else
|
||||
e.Row.FCHyperLink("HlFolio").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta"))
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("SubProyecto") = "" And e.Row.DBCampo("CveMoneda") = "1" Then
|
||||
@@ -786,8 +795,11 @@ Partial Class RepCxCDetalle
|
||||
|
||||
For index = 0 To GvDatos.Columns.Count - 1
|
||||
If GvDatos.Columns(index).Visible Then
|
||||
|
||||
If TypeOf GvDatos.Columns(index) Is HyperLinkField Then
|
||||
If TypeOf GvDatos.Columns(index) Is TemplateField Then
|
||||
If GvDatos.Columns(index).HeaderText = "Folio" Then
|
||||
dr(GvDatos.Columns(index).HeaderText) = fila.FCHyperLink("HlFolio").Text.Replace(" ", "")
|
||||
End If
|
||||
ElseIf TypeOf GvDatos.Columns(index) Is HyperLinkField Then
|
||||
dr(GvDatos.Columns(index).HeaderText) = DirectCast(fila.Cells(index).Controls(0), HyperLink).Text.Replace(" ", "")
|
||||
Else
|
||||
dr(GvDatos.Columns(index).HeaderText) = fila.Cells(index).Text.Replace(" ", "")
|
||||
@@ -927,22 +939,27 @@ Partial Class RepCxCDetalle
|
||||
UPPersonalizar.Update()
|
||||
UpCobranza.Update()
|
||||
End Sub
|
||||
Private Sub BtnAsignaCobranza_Click(sender As Object, e As EventArgs) Handles BtnAsignaCobranza.Click
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Private Sub BtnAsignaCobranza_Click(sender As Object, e As EventArgs) Handles BtnAsignaCobranza.Click
|
||||
Dim time As DateTime
|
||||
Dim TieneError = False
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
If row.FCCheckBox("ChkCobranza").Checked Then
|
||||
time = DateTime.Parse(String.Format("{0} {1}:{2} {3}", TxtFechaCobranza.Text, TimeSelector.Hour, TimeSelector.Minute, TimeSelector.AmPm))
|
||||
If Not ObjVentas.UpdateAsignaVentaCobranza(row.DataKey("CveVenta").ToEntero, DdlCobranzaEstatus.SelectedValue.ToEntero, DdlUsuarioCobranza.SelectedValue.ToEntero, DdlTurnoCobranza.SelectedValue.ToEntero, TxtObservacionCobranza.Text.Trim, time) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Try
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
Dim TipoDocto As String = row.DataKey("TipoDocto")
|
||||
If row.FCCheckBox("ChkCobranza").Checked AndAlso TipoDocto <> "IxC" Then
|
||||
time = DateTime.Parse(String.Format("{0} {1}:{2} {3}", TxtFechaCobranza.Text, TimeSelector.Hour, TimeSelector.Minute, TimeSelector.AmPm))
|
||||
If Not ObjVentas.UpdateAsignaVentaCobranza(row.DataKey("CveVenta").ToEntero, DdlCobranzaEstatus.SelectedValue.ToEntero, DdlUsuarioCobranza.SelectedValue.ToEntero, DdlTurnoCobranza.SelectedValue.ToEntero, TxtObservacionCobranza.Text.Trim, time) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar", ex)
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
If Not TieneError Then
|
||||
ObjVentas.Commit()
|
||||
@@ -955,11 +972,11 @@ Partial Class RepCxCDetalle
|
||||
|
||||
ObjVentas.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
|
||||
|
||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaClientes()
|
||||
|
||||
|
||||
@@ -976,11 +976,13 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Parameters!CodEnsamble.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
@@ -1011,11 +1013,13 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Parameters!CodInspeccion.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
@@ -1046,11 +1050,13 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Parameters!CodLinea.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
@@ -1431,7 +1437,11 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Nombre del consumidor:</Value>
|
||||
<Value>Nombre del consumidor: </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!NombreCliente.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1470,7 +1480,11 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Dirección:</Value>
|
||||
<Value>Dirección: </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Direccion.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1509,7 +1523,11 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Ciudad, Estado:</Value>
|
||||
<Value>Ciudad, Estado: </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!CiudadEstado.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1549,7 +1567,11 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Tel.</Value>
|
||||
<Value>Tel. </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!TelCliente.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1867,6 +1889,30 @@
|
||||
<Nullable>true</Nullable>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CodEnsamble">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CodLinea">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="CodInspeccion">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Direccion">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<Language>Es-MX</Language>
|
||||
<rd:ReportUnitType>Inch</rd:ReportUnitType>
|
||||
|
||||
@@ -28,9 +28,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1">Producto: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlPS" AppendDataBoundItems="true" DataTextField="PSCodigo" DataValueField="CvePS" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
|
||||
</div>
|
||||
<label class="col-md-1 ">Sucursal:</label>
|
||||
<div class="col-md-2">
|
||||
|
||||
@@ -16,9 +16,20 @@ Partial Class Inventarios_RepVentasXSurtir
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
|
||||
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
DdlPS.DataBind()
|
||||
'Carga Productos
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPS.SelectedText = "Todos"
|
||||
DdlPS.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPS.ddl.Items.Clear()
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
'Carga Sucursales
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectos.DataBind()
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2889,7 +2889,7 @@ Partial Class OC
|
||||
|
||||
If ChkCotizacion.Checked AndAlso NoProveedoresCot > 0 AndAlso (NumCotizacionesGanadoras > 0 OrElse Not (NumCotizacionesGanadoras <= 0 AndAlso CveConfianzaProveedor = 1)) Then
|
||||
Dim CveProveedor = -1
|
||||
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0, PorIVA = 0.0, Porcentaje = 0.0
|
||||
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0, PorIVA = 0.0
|
||||
Dim IdPoliza = -1
|
||||
|
||||
|
||||
@@ -2900,11 +2900,10 @@ Partial Class OC
|
||||
|
||||
CveProveedor = dr("CveProveedor").ToString.ToEntero
|
||||
|
||||
Porcentaje = DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) / DtDetalle.SUM("Total")
|
||||
PorIVA = GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDouble
|
||||
IVACot = (DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) * PorIVA).ToString.ToDecimal
|
||||
RetIVA = TxtRetIVA.Text.ToDecimal * Porcentaje
|
||||
RetISR = TxtRetISR.Text.ToDecimal * Porcentaje
|
||||
PorIVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2) 'GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDouble
|
||||
IVACot = IVA '(DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) * PorIVA).ToString.ToDecimal
|
||||
RetIVA = TxtRetIVA.Text.ToDecimal
|
||||
RetISR = TxtRetISR.Text.ToDecimal
|
||||
|
||||
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
|
||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
@@ -2945,7 +2944,15 @@ Partial Class OC
|
||||
End If
|
||||
|
||||
'AGREGA DETALLES
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDouble, IEPSPS:=dr("IEPSPS").ToString.ToDouble, IEPSPSIVA:=dr("IEPSPSIVA").ToString.ToDouble, IVA:=dr("IVA").ToString.ToDouble, RetIVA:=dr("RetIVA").ToString.ToDouble, RetISR:=dr("RetISR").ToString.ToDouble, Total:=dr("Total").ToString.ToDouble, CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) Then
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero,
|
||||
dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(),
|
||||
dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, CveOrdenCompra,
|
||||
CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDouble,
|
||||
IEPSPS:=dr("IEPSPS").ToString.ToDouble, IEPSPSIVA:=dr("IEPSPSIVA").ToString.ToDouble, IVA:=dr("IVA").ToString.ToDouble,
|
||||
RetIVA:=dr("RetIVA").ToString.ToDouble, RetISR:=dr("RetISR").ToString.ToDouble, Total:=dr("Total").ToString.ToDouble,
|
||||
CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble,
|
||||
RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble,
|
||||
IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -2968,7 +2975,7 @@ Partial Class OC
|
||||
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
|
||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
Promocion:=Promocion) Then
|
||||
|
||||
|
||||
|
||||
@@ -659,16 +659,8 @@
|
||||
<asp:DropDownList ID="DdlUnidadMedidaM" CssClass="form-control input-sm select2me " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="80px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadM" runat="server" ControlToValidate="DdlUnidadMedidaM" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarM"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me" Style="width: 220px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlPS" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="PSCodigo" DataValueField="CvePS" ValidationGroup="GrpGuardarM" CssClass="form-control input-sm select2me" Style="width: 220px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="*** Actualizar listado de Productos o Servicios ***" Value="-2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPsM" runat="server" ControlToValidate="DdlPS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Producto o Servicio''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarM"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVPsM" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<td style="vertical-align: top;">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" CssClassDdl="select2me" CssStyle="width: 220px;"/>
|
||||
</td>
|
||||
<td style="text-align: center; vertical-align: top;">
|
||||
<asp:LinkButton ID="LbAgregarMaterial" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarM"></asp:LinkButton>
|
||||
|
||||
@@ -286,8 +286,8 @@ Partial Class OS_OrdenesServicios
|
||||
CargaTiposOrden()
|
||||
CargaTecnico()
|
||||
CargaPS(-1, DdlPSDetalle)
|
||||
CargaPsMateriales(-1, DdlPS)
|
||||
CargaClasificaciones()
|
||||
CargaPsMateriales()
|
||||
'CargaClasificaciones()
|
||||
CargaPSCaracteristicasOpciones()
|
||||
CargaCuentasCaracteristicas()
|
||||
CargaAlmacen()
|
||||
@@ -499,8 +499,19 @@ Partial Class OS_OrdenesServicios
|
||||
'End If
|
||||
|
||||
If TipoEstatus = 3 Then
|
||||
DisableAll()
|
||||
'DisableAll()
|
||||
|
||||
'If SeFacturara = "True" Then
|
||||
' HplFacturar.Visible = True
|
||||
' If ObjOS.CveCotizacion > 0 Then
|
||||
' HplFacturar.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", ObjOS.CveCotizacion)
|
||||
' Else
|
||||
' HplFacturar.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveOS={0}", CveOS)
|
||||
' End If
|
||||
'End If
|
||||
|
||||
ElseIf TipoEstatus = 4 Then
|
||||
'DisableAll()
|
||||
If SeFacturara = "True" Then
|
||||
HplFacturar.Visible = True
|
||||
If ObjOS.CveCotizacion > 0 Then
|
||||
@@ -509,9 +520,6 @@ Partial Class OS_OrdenesServicios
|
||||
HplFacturar.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveOS={0}", CveOS)
|
||||
End If
|
||||
End If
|
||||
|
||||
ElseIf TipoEstatus = 4 Then
|
||||
DisableAll()
|
||||
End If
|
||||
|
||||
DivCliente.Attributes.Add("class", "col-md-8")
|
||||
@@ -707,12 +715,27 @@ Partial Class OS_OrdenesServicios
|
||||
Objeto.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
Objeto.Items.Insert(0, New ListItem("Seleccione el Servicio", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaPsMateriales(CveClasificacion As Integer, Objeto As DropDownList)
|
||||
Objeto.Items.Clear()
|
||||
Objeto.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, Estatus:=1)
|
||||
Objeto.DataBind()
|
||||
Objeto.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
Objeto.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
Private Sub CargaPsMateriales()
|
||||
'Objeto.Items.Clear()
|
||||
'Objeto.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, Estatus:=1)
|
||||
'Objeto.DataBind()
|
||||
'Objeto.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
'Objeto.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
'Carga Productos
|
||||
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
'DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPS.SelectedText = ""
|
||||
DdlPS.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPS.ddl.Items.Clear()
|
||||
'DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1)
|
||||
Dim ObjCliente As New ClsClientes()
|
||||
@@ -847,11 +870,11 @@ Partial Class OS_OrdenesServicios
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaClasificaciones()
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
'' DdlClasificacion.Items.Insert(0, New ListItem("Seleccione la Clasificación", "-1"))
|
||||
End Sub
|
||||
'Private Sub CargaClasificaciones()
|
||||
' DdlClasificacion.DataSource = GlobalDTClasificaciones.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' DdlClasificacion.DataBind()
|
||||
' '' DdlClasificacion.Items.Insert(0, New ListItem("Seleccione la Clasificación", "-1"))
|
||||
'End Sub
|
||||
Private Sub CargaFolios(CveSub As Integer)
|
||||
Dim ObjFolios As New ClsGralFolios()
|
||||
If ObjFolios.GetFolios() Then
|
||||
@@ -1014,7 +1037,7 @@ Partial Class OS_OrdenesServicios
|
||||
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}OS\Temp\{1}", UsuarioActual.Empresa.Ruta, Row("Archivo").ToString))
|
||||
|
||||
CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePS, Cantidad, -1, -1, Observaciones, False, SeFacturara, False, CveCuentaEquipo, "-1", "-1", "-1", ComentarioTecnico, UsuarioActual.CveUsuario, Archivo:=Archivo.Name)
|
||||
CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePS, Cantidad, -1, -1, Observaciones, False, True, False, CveCuentaEquipo, "-1", "-1", "-1", ComentarioTecnico, UsuarioActual.CveUsuario, Archivo:=Archivo.Name)
|
||||
|
||||
If CveOsDetalle > 0 Then
|
||||
If Archivo.Name <> "-1" AndAlso Archivo.Exists Then
|
||||
@@ -1277,8 +1300,8 @@ Partial Class OS_OrdenesServicios
|
||||
Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm green"
|
||||
Else
|
||||
Row.FCLinkButton("imgEstatus").Enabled = False
|
||||
'TmpDT.Rows(Row.RowIndex)("Estatus") = "False"
|
||||
'Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm red"
|
||||
TmpDT.Rows(Row.RowIndex)("Estatus") = "False"
|
||||
Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm red"
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BtnAddGvDetalle_Click(sender As Object, e As EventArgs) Handles BtnAddGvDetalle.Click
|
||||
@@ -2101,13 +2124,13 @@ Partial Class OS_OrdenesServicios
|
||||
UpAddMateriales.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivGvMateriales"))
|
||||
End Sub
|
||||
Private Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
CargaPsMateriales(DdlClasificacion.SelectedValue.ToEntero, DdlPS)
|
||||
UpAddMateriales.Update()
|
||||
End Sub
|
||||
Private Sub DdlPS_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPS.SelectedIndexChanged
|
||||
'Private Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
' CargaPsMateriales()
|
||||
' UpAddMateriales.Update()
|
||||
'End Sub
|
||||
Private Sub DdlPS_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPS.selectedindexchange
|
||||
If CveCliente > 0 OrElse DdlPS.SelectedValue = "-2" Then
|
||||
If DdlPS.SelectedIndex > 1 Then
|
||||
If DdlPS.SelectedValue.ToEntero > 1 Then
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
If drPS IsNot Nothing Then
|
||||
@@ -2116,25 +2139,31 @@ Partial Class OS_OrdenesServicios
|
||||
DdlUnidadMedidaM.DataBind()
|
||||
DdlUnidadMedidaM.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||
|
||||
If DdlClasificacion.SelectedIndex = 0 Then
|
||||
If drPS("CveClasificacion").ToString IsNot Nothing Then
|
||||
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString)
|
||||
Else
|
||||
'If DdlClasificacion.SelectedIndex = 0 Then
|
||||
' If drPS("CveClasificacion").ToString IsNot Nothing Then
|
||||
' DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString)
|
||||
' Else
|
||||
|
||||
Alert("El Productos/Servicio no tiene asignada una Clasificación.")
|
||||
End If
|
||||
End If
|
||||
' Alert("El Productos/Servicio no tiene asignada una Clasificación.")
|
||||
' End If
|
||||
'End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub LbAgregarMaterial_Click(sender As Object, e As EventArgs) Handles LbAgregarMaterial.Click
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
Dim Clasificacion As String = ""
|
||||
Dim CveClasificacion As Integer
|
||||
If ObjPS.GetPS(DdlPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
Clasificacion = ObjPS.DtResultados.Rows(0)("Clasificacion").ToString
|
||||
CveClasificacion = ObjPS.CveClasificacion
|
||||
End If
|
||||
Dim Consecutivo As Integer = TmpDTMaterialesDetalle.Rows.Count + 1
|
||||
AddMaterial(CveOsDetalle, DdlClasificacion.SelectedValue.ToEntero, TxtCantidadM.Text.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedItem.Text, DdlUnidadMedidaM.SelectedValue.ToEntero, DdlUnidadMedidaM.SelectedItem.Text, Consecutivo)
|
||||
AddMaterial(CveOsDetalle, CveClasificacion, TxtCantidadM.Text.ToEntero, Clasificacion,
|
||||
DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, DdlUnidadMedidaM.SelectedValue.ToEntero, DdlUnidadMedidaM.SelectedItem.Text, Consecutivo)
|
||||
TxtCantidadM.Text = ""
|
||||
DdlClasificacion.SelectedIndex = 0
|
||||
CargaClasificaciones()
|
||||
CargaPsMateriales(-1, DdlPS)
|
||||
CargaPsMateriales()
|
||||
End Sub
|
||||
Private Sub AddMaterial(CveOSDetalle As Integer, CveClasificacion As Integer, Cantidad As Integer, Clasificacion As String, CvePS As Integer, PS As String, CveUM As Integer, UM As String, Consecutivo As Integer)
|
||||
|
||||
@@ -2188,6 +2217,8 @@ Partial Class OS_OrdenesServicios
|
||||
End Sub
|
||||
Private Sub BtnGuardarMateriales_Click(sender As Object, e As EventArgs) Handles BtnGuardarMateriales.Click
|
||||
'VALIDA ALMACEN ORIGEN Y DESTINO
|
||||
Dim ErrorEncontrado As New StringBuilder
|
||||
|
||||
If DdlAlmacenOrigen.SelectedValue = DdlAlmacenDestino.SelectedValue Then
|
||||
Alert("No se puede realizar un traspaso entre el mismo almacén.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -2234,32 +2265,41 @@ Partial Class OS_OrdenesServicios
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
For Each Row As DataRow In TmpDTMaterialesDetalle.Rows
|
||||
Dim CveUM As Integer = Row("CveUM").ToString.ToEntero
|
||||
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
||||
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
|
||||
|
||||
If Not ObjInventario.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, 0, "", -1) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
|
||||
If ErrorExistencia Then
|
||||
Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
Dim ObjOS As New ClsOS
|
||||
Dim MaterialesDetalleNuevos As DataTable = TmpDTMaterialesDetalle.FiltraParametros("CveMaterial = -1")
|
||||
For Each Row As DataRow In MaterialesDetalleNuevos.Rows
|
||||
Dim CveUM As Integer = Row("CveUM").ToString.ToEntero
|
||||
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
||||
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
|
||||
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString.ToEntero
|
||||
|
||||
If Not ObjOS.AddUpdateDetalleMateriales(-1, CveOsDetalle, Cantidad, CveUM, CveClasificacion, CvePS, True) Then
|
||||
TieneError = True
|
||||
ErrorEncontrado.AppendFormat("Ocurrió un Error al agregar los materiales.<br/>")
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjInventario.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, 0, "", -1) Then
|
||||
ErrorEncontrado.AppendFormat("Ocurrió un Error al guardar el traspaso.")
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
ObjOS.Dispose()
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjInventario.Commit()
|
||||
Alert($"El Traspaso se guardó correctamente con el folio #: <b>{Folio}</b>.", TipoMensaje.MsgInformacion, $"document.location.href=""/Inventarios/TrasladoSolicitud.aspx?CveTraspasoSolicitud={CveTraspasoSolicitud}""")
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
Alert("Ocurrió un Error al guardar el traspaso.", TipoMensaje.MsgError)
|
||||
Alert(ErrorEncontrado.ToString, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjInventario.Dispose()
|
||||
@@ -2430,7 +2470,6 @@ Partial Class OS_OrdenesServicios
|
||||
TmpDTSolicitarMaterial.Columns.Add("UM", GetType(String))
|
||||
End Sub
|
||||
Public Sub CargaAlmacen()
|
||||
Dim tablaAuxiliar As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacenOrigen.DataBind()
|
||||
DdlAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
@@ -1738,10 +1738,23 @@ function loaderEnd() {
|
||||
}, 10);
|
||||
|
||||
}
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
$("body").on("click", ".ajax__tab_outer .ajax__tab_inner .ajax__tab_tab", function () {
|
||||
setTimeout(loadadscroll, 10);
|
||||
});
|
||||
//KeppMenuOpen
|
||||
{
|
||||
let varpath = window.location.pathname;
|
||||
if (window.location.pathname != '') {
|
||||
let textfinder = '.page-sidebar-menu a[href="' + varpath + '"]';
|
||||
let objmenu = $($(textfinder)[0]);
|
||||
objmenu.parents().filter("li").addClass('active open')
|
||||
objmenu.parents().filter(".sub-menu").css("display", "")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('body').on('click', '.tab-wizard > .ajax__tab_header > span,.tab-wizard2 > .ajax__tab_header > span', function (e) {
|
||||
let padre = $(this).closest('.tab-wizard,.tab-wizard2 ');
|
||||
|
||||
@@ -2465,9 +2465,9 @@ Partial Class Clientes
|
||||
If ErrorProceso Then
|
||||
ObjClientes.RollBack()
|
||||
Else
|
||||
ObjClientes.Commit()
|
||||
|
||||
'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
|
||||
ObjClientes.Commit()
|
||||
|
||||
'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
|
||||
Dim MensajeCRM As String = ""
|
||||
If CveEmpresaCRM > 0 Then
|
||||
If VincularEmpresaCRM() Then
|
||||
@@ -2536,13 +2536,8 @@ Partial Class Clientes
|
||||
|
||||
ObjClientes.Commit()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
CargaHistorial()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
UpnHistorial.Update()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
If EstatusAnteriorCliente <> ChkEstado.Checked Then
|
||||
|
||||
Dim DTVendedor As New DataTable
|
||||
@@ -2551,7 +2546,7 @@ Partial Class Clientes
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString
|
||||
|
||||
If _CorreoVendedor.Length > 0 Then
|
||||
If _CorreoVendedor.Length > 0 And UsuarioActual.Empresa.Funcionalidad(571).ToEntero > 0 Then
|
||||
|
||||
Dim Asunto As String = ""
|
||||
Dim Para As String = _CorreoVendedor
|
||||
@@ -2559,19 +2554,22 @@ Partial Class Clientes
|
||||
|
||||
If ChkEstado.Checked Then
|
||||
Asunto = "Activación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} a sido activado.", TxtNombre.Text))
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido activado.", TxtNombre.Text))
|
||||
Else
|
||||
Asunto = "Desactivación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} a sido desactivado.", TxtNombre.Text))
|
||||
End If
|
||||
EstatusAnteriorCliente = ChkEstado.Checked
|
||||
MandaCorreo(Asunto, Para, SBBody.ToString)
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido desactivado.", TxtNombre.Text))
|
||||
End If
|
||||
MandaCorreo(Asunto, Para + "", SBBody.ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
CargaHistorial()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
UpnHistorial.Update()
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
|
||||
125
Ventas/PV.aspx
125
Ventas/PV.aspx
@@ -2661,35 +2661,47 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div id="DivRecepcionUsados" runat="server">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" id="DivRecepcionUsados" runat="server" visible="false">
|
||||
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
|
||||
data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-height="100"
|
||||
DataKeyNames="CvePSCargo,CveUM,Cargo,CveTamaño">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="35%" />
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" CssClass="form-control linewhitsize" runat="server" Width="90%" Height="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Modelo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<label>Modelo:</label>
|
||||
<br />
|
||||
<asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" visible="false">
|
||||
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
|
||||
data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-height="100"
|
||||
DataKeyNames="CvePSCargo,CveUM,Cargo,CveTamaño">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="35%" />
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" CssClass="form-control linewhitsize" runat="server" Width="90%" Height="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField HeaderText="Modelo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlModeloAuto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ModeloMarca" DataValueField="CveModeloAuto">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="BCI" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlBCIUsado" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="90%">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="BCI" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlBCIUsado" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="90%">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2781,14 +2793,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPSAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" OnSelectedIndexChanged="DdlPSAjuste_selectedindexchange" Width="100%" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<%-- <div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
@@ -2796,10 +2808,10 @@
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<label for="<%= TxtPUFactura.ClientID.ToString()%>">P.U.:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlFolioGarantia" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FolioGarantia" DataValueField="CveFolioGarantia" Width="100%">
|
||||
</asp:DropDownList>
|
||||
@@ -2808,7 +2820,7 @@
|
||||
<label for="<%= DdlFolioGarantia.ClientID.ToString()%>">Folio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVConsecutivoAjuste" runat="server" ControlToValidate="TxtConsecutivoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Consec.''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||
@@ -2818,17 +2830,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodEnsamble" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[0-9][A-HJ-M]([[0-2][1-9]|3[0-1])$"></asp:RegularExpressionValidator>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" TargetControlID="TxtCodEnsamble" FilterType="UppercaseLetters, Numbers,LowercaseLetters, Custom" runat="server" ValidChars="&Ñ" InvalidChars="-" />
|
||||
<asp:RegularExpressionValidator ID="REVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[0-9][A-HJ-M]([[0-2][1-9]|3[0-1])([A-Z]|X[1-9])[ACEN][A-HJ-NO-Z][A-F]$"></asp:RegularExpressionValidator>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCECodEnsamble" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodEnsamble"></ajax:ValidatorCalloutExtender>--%>
|
||||
<label for="<%= TxtCodEnsamble.ClientID.ToString()%>">Cod.Ensamble:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoUso" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoUso" DataValueField="CveTipoUso" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoUso_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
@@ -2840,7 +2851,7 @@
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCodLinea" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVCodLinea" runat="server" ControlToValidate="TxtCodLinea" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Linea''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||
@@ -2848,35 +2859,31 @@
|
||||
<label for="<%= TxtCodLinea.ClientID.ToString()%>">Cod.Linea:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="text-align: left">Fecha:</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAjuste" CssClass="form-control input-sm ADSMaskDate" Width="100%" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaAjuste" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAjuste" runat="server" TargetControlID="TxtFechaAjuste" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEEFechaAjuste" TargetControlID="TxtFechaAjuste" PopupButtonID="LnkFechaAjuste" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaAjuste" runat="server" ControlToValidate="TxtFechaAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaAjuste"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="<%= TxtFechaAjuste.ClientID.ToString()%>">Fecha:</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAjuste" CssClass="form-control input-sm ADSMaskDate" Width="100%" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaAjuste" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAjuste" runat="server" TargetControlID="TxtFechaAjuste" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEEFechaAjuste" TargetControlID="TxtFechaAjuste" PopupButtonID="LnkFechaAjuste" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaAjuste" runat="server" ControlToValidate="TxtFechaAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaAjuste"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
<ajax:MaskedEditExtender TargetControlID="TxtCodInspeccion" ID="MEECodInspeccion" runat="server" Mask="L9?L" AutoComplete="True" AutoCompleteValue="0" />
|
||||
<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][3-9][1-9A-V][A-FK-O]$"></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>--%>
|
||||
<label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMesesUso" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMesesUso" runat="server" ControlToValidate="TxtMesesUso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meses de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
@@ -2896,16 +2903,16 @@
|
||||
<label for="<%= DdlTipoDefecto.ClientID.ToString()%>">Tipo de Defecto:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-4">
|
||||
<div id="DivCodigoTD" class="form-group form-md-line-input input-iconright" runat="server" visible="false">
|
||||
<asp:TextBox ID="TxtCodigoTD" CssClass="form-control" runat="server" MaxLength="5" Width="120%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigoTD" runat="server" ControlToValidate="TxtCodigoTD" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<asp:TextBox ID="TxtCodigoTD" CssClass="form-control" runat="server" MaxLength="11" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigoTD" runat="server" ControlToValidate="TxtCodigoTD" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigoTD"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCodigoTD" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCodigoTD" FilterType="Custom, Numbers, UppercaseLetters " ValidChars="." />
|
||||
<label for="<%= TxtCodigoTD.ClientID.ToString()%>">Código:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPorcentajeAjuste" CssClass="form-control" Enabled="false" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentajeAjuste" runat="server" ControlToValidate="TxtPorcentajeAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''% Ajuste''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
@@ -3266,8 +3273,8 @@
|
||||
|
||||
var totalVenta = ToDouble($get('TxtTotal').value);
|
||||
|
||||
if (totalEfectivo > totalVenta) {
|
||||
$get("TxtCambio").value = FormatoNumero(totalEfectivo - totalVenta);
|
||||
if (total > totalVenta) {
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||
} else {
|
||||
$get("TxtCambio").value = "0.00";
|
||||
}
|
||||
|
||||
@@ -933,6 +933,14 @@ Partial Class PV
|
||||
ViewState("DtPUFacturas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtModelosAuto As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtModelosAuto"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtModelosAuto") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "PROPIEDADES ACUMULADORES"
|
||||
@@ -1167,7 +1175,7 @@ Partial Class PV
|
||||
DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem"))
|
||||
DdlTipoComprobante.SelectedValueExist("Rem")
|
||||
End If
|
||||
DdlTipoDefecto.Width = New Unit(200%)
|
||||
DdlTipoDefecto.Width = New Unit(260%)
|
||||
|
||||
'Le quitamos el tamaño extra
|
||||
'RegistraScript("window.onload = function AjustarVentana() { $('.page-content').css('min-height','100%'); }")
|
||||
@@ -2779,10 +2787,8 @@ Partial Class PV
|
||||
DivRecepcionUsados.Visible = True
|
||||
If DdlTipoComprobante.SelectedValue <> "Rem" Then
|
||||
GvRecepcionUsados.Columns(2).Visible = False
|
||||
GvRecepcionUsados.Columns(3).Visible = False
|
||||
Else
|
||||
GvRecepcionUsados.Columns(2).Visible = True
|
||||
GvRecepcionUsados.Columns(3).Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2822,6 +2828,7 @@ Partial Class PV
|
||||
End If
|
||||
If PrecioSugerido > 0 Then
|
||||
TxtPrecio.Text = PrecioSugerido.FormatoNumero()
|
||||
RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString + ", 2, '.', ',');")
|
||||
End If
|
||||
|
||||
|
||||
@@ -3479,10 +3486,10 @@ Partial Class PV
|
||||
End If
|
||||
Next
|
||||
|
||||
If CantidadUsados > TxtCantidad.Text.ToEntero() Then
|
||||
Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
'If CantidadUsados > TxtCantidad.Text.ToEntero() Then
|
||||
' Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
|
||||
' Return False
|
||||
'End If
|
||||
|
||||
'VALIDA PROMOCIONES
|
||||
Dim ObjVentas As New ClsVentas
|
||||
@@ -4288,7 +4295,7 @@ Partial Class PV
|
||||
|
||||
Private Sub CargaCuentas()
|
||||
|
||||
DdlCuentaEfectivo.Items.Clear()
|
||||
'DdlCuentaEfectivo.Items.Clear()
|
||||
DdlCuentaTarjetaCredito.Items.Clear()
|
||||
DdlCuentaTarjetaDebito.Items.Clear()
|
||||
DdlCuentaCheque.Items.Clear()
|
||||
@@ -4345,6 +4352,11 @@ Partial Class PV
|
||||
|
||||
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||
|
||||
If TxtCambio.Text.ToDecimal > 0 And TxtImporteEfectivo.Text.ToDecimal < TxtCambio.Text.ToDecimal Then
|
||||
Alert("Debe haber un pago en efectivo y ser mayor que el cambio. Si no, ser pago exacto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If (DtPagos.SUM("Importe").ToString.ToDecimal + total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
|
||||
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -4939,6 +4951,7 @@ Partial Class PV
|
||||
|
||||
Dim DtTamanios = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0")
|
||||
|
||||
CargaModelos()
|
||||
GvRecepcionUsados.DataSource = DtTamanios
|
||||
GvRecepcionUsadosModal.DataSource = DtTamanios
|
||||
|
||||
@@ -4958,6 +4971,15 @@ Partial Class PV
|
||||
DivChkAjuste.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub CargaModelos()
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.ModelosAutosGet(UsuarioActual.CveEmpresa) Then
|
||||
DtModelosAuto = ObjGral.DtResultados
|
||||
DdlModeloAuto.DataSource = DtModelosAuto
|
||||
End If
|
||||
DdlModeloAuto.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvRecepcionUsados_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvRecepcionUsados.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -4970,10 +4992,6 @@ Partial Class PV
|
||||
e.Row.FCDropDownList("DdlBCIUsado").DataBind()
|
||||
'e.Row.FCDropDownList("DdlBCIUsado").SelectedValue = e.Row.DBCampo("CveBCIUsado")
|
||||
|
||||
If ObjGral.ModelosAutosGet(UsuarioActual.CveEmpresa) Then
|
||||
e.Row.FCDropDownList("DdlModeloAuto").DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
e.Row.FCDropDownList("DdlModeloAuto").DataBind()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -5006,7 +5024,7 @@ Partial Class PV
|
||||
LimpiaAjuste()
|
||||
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.FiltraParametros($"ConsecutivoVenta = {ConsecutivoVenta}").Rows.Count > 0 Then
|
||||
ModalidadAjuste = "U"
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPUFactura.ClientID});")
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPrecio.ClientID});")
|
||||
ChkAjuste.Checked = True
|
||||
DivAjuste.Visible = True
|
||||
CargaAjusteDetalle()
|
||||
@@ -5022,7 +5040,7 @@ Partial Class PV
|
||||
TxtCodEnsamble.Text = ""
|
||||
DdlTipoUso.SelectedIndex = -1
|
||||
TxtCodLinea.Text = ""
|
||||
TxtPUFactura.Text = ""
|
||||
TxtPrecio.Text = ""
|
||||
TxtFechaAjuste.Text = Now.ToShortDateString
|
||||
CEEFechaAjuste.EndDate = Now
|
||||
TxtCodInspeccion.Text = ""
|
||||
@@ -5031,7 +5049,7 @@ Partial Class PV
|
||||
TxtPorcentajeAjuste.Text = ""
|
||||
TxtPoliza.Text = ""
|
||||
TxtImporteAjuste.Text = ""
|
||||
DdlPSAjuste.SelectedIndex = 0
|
||||
DdlPSAjuste.SelectedIndex = -1
|
||||
ChkAjuste.Checked = False
|
||||
DivAjuste.Visible = False
|
||||
End Sub
|
||||
@@ -5064,8 +5082,8 @@ Partial Class PV
|
||||
CargaPSAjuste()
|
||||
DdlPSAjuste.SelectedValueExist(Dr("CvePS").ToString)
|
||||
TxtFechaAjuste.Text = Dr("FechaAjuste").ToString.ToDate.ToShortDateString
|
||||
TxtPUFactura.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
|
||||
TxtPUFactura.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||
TxtPrecio.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2)
|
||||
TxtPrecio.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
||||
@@ -5073,17 +5091,18 @@ Partial Class PV
|
||||
End Sub
|
||||
|
||||
Private Sub CalculaMesesUso()
|
||||
Dim FechaI = TxtFechaAjuste.Text.ToDate
|
||||
Dim FechaI = TxtFechaAjuste.Text.ToDate.AddDays(1)
|
||||
Dim FechaF = Now
|
||||
'Dim NumDiasAlMes As Double = (365 / 12)
|
||||
|
||||
'Dim DiasTranscurridos = DateDiff(DateInterval.Day, FechaI, FechaF)
|
||||
|
||||
'Dim MesesTranscurridos As Double = DiasTranscurridos / NumDiasAlMes
|
||||
'Dim MesesTranscurridos As Double = (DiasTranscurridos / NumDiasAlMes)
|
||||
'Dim Diff = Math.Round(MesesTranscurridos - Math.Truncate(MesesTranscurridos), 2)
|
||||
|
||||
'Dim NoMesesTrascurridos = Math.Ceiling(MesesTranscurridos)
|
||||
Dim NoMesesTrascurridos2 = DateDiff(DateInterval.Month, FechaI, FechaF)
|
||||
|
||||
TxtMesesUso.Text = (DateDiff(DateInterval.Month, FechaI, FechaF) + 1).ToString()
|
||||
'TxtMesesUso.Text = If(Diff > 0.5, NoMesesTrascurridos, NoMesesTrascurridos2).ToString()
|
||||
TxtMesesUso.Text = NoMesesTrascurridos2
|
||||
CalculaPorcentajeAjuste()
|
||||
End Sub
|
||||
|
||||
@@ -5126,7 +5145,7 @@ Partial Class PV
|
||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPUFactura.Text.ToDouble).FormatoNumero
|
||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPrecio.Text.ToDouble).FormatoNumero
|
||||
|
||||
Dim CargoActual As Decimal = 0
|
||||
Dim CargoAnterior As Decimal = 0
|
||||
@@ -5155,8 +5174,8 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
|
||||
TxtDescuentoAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero
|
||||
TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}."
|
||||
TxtDescuentoAjuste.Text = ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero
|
||||
TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}."
|
||||
End If
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
@@ -5190,7 +5209,7 @@ Partial Class PV
|
||||
'End Function
|
||||
|
||||
Private Sub GuardaAjuste()
|
||||
TxtPUFactura.Text = TxtPrecio.Text
|
||||
TxtPrecio.Text = TxtPrecio.Text
|
||||
UpAjuste.Update()
|
||||
|
||||
Dim CargoAnterior As Double = 0
|
||||
@@ -5214,7 +5233,7 @@ Partial Class PV
|
||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||
Row("PS") = DdlPSAjuste.SelectedItem.Text
|
||||
Row("CveVenta") = DdlFacturas.SelectedValue
|
||||
Row("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||
Row("PUFactura") = TxtPrecio.Text.ToDouble
|
||||
Row("Cantidad") = 1
|
||||
Dim CveUM As Integer = -1
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
@@ -5244,7 +5263,7 @@ Partial Class PV
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CvePS") = DdlPSAjuste.SelectedValue
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PS") = DdlPSAjuste.SelectedItem.Text
|
||||
TmpDTAjustes.Rows(IndexAjuste)("CveVenta") = DdlFacturas.SelectedValue
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("PUFactura") = TxtPrecio.Text.ToDouble
|
||||
TmpDTAjustes.Rows(IndexAjuste)("Cantidad") = 1
|
||||
Dim CveUM As Integer = -1
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
@@ -5271,7 +5290,7 @@ Partial Class PV
|
||||
End If
|
||||
End If
|
||||
|
||||
Dr("Descuento") = Math.Round((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
|
||||
Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
|
||||
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
@@ -5308,8 +5327,8 @@ Partial Class PV
|
||||
DivAjuste.Attributes.Add("class", "col-md-6")
|
||||
DivDatosVenta.Attributes.Remove("class")
|
||||
DivDatosVenta.Attributes.Add("class", "col-md-6")
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPUFactura.ClientID});")
|
||||
TxtPUFactura.Text = TxtPrecio.Text
|
||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPrecio.ClientID});")
|
||||
TxtPrecio.Text = TxtPrecio.Text
|
||||
Else
|
||||
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
||||
If Gvr.RowType = DataControlRowType.DataRow Then
|
||||
@@ -5390,7 +5409,7 @@ Partial Class PV
|
||||
Row("CveVentaDetalle") = -1
|
||||
Row("PU") = Gvr.DataKey("Cargo").ToDouble
|
||||
Row("CveBCIUsado") = Gvr.FCDropDownList("DdlBCIUsado").SelectedValue.ToEntero
|
||||
Row("CveModeloAuto") = Gvr.FCDropDownList("DdlModeloAuto").SelectedValue.ToEntero
|
||||
Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero
|
||||
TmpDTRecepcionUsados.Rows.Add(Row)
|
||||
|
||||
End If
|
||||
@@ -5403,13 +5422,13 @@ Partial Class PV
|
||||
Next
|
||||
StrCargos.Remove(StrCargos.Length - 1, 1)
|
||||
|
||||
If TotalCantidad > TmpDT.FiltraParametros($"EsCargo = True AND CvePS IN ({StrCargos})").SUMD("Cantidad") Then
|
||||
Dim drt As DataRow() = TmpDT.Select("CvePS = " & CvePS)
|
||||
TmpDT.Rows.Remove(drt(0))
|
||||
'If TotalCantidad > TmpDT.FiltraParametros($"EsCargo = True AND CvePS IN ({StrCargos})").SUMD("Cantidad") Then
|
||||
' Dim drt As DataRow() = TmpDT.Select("CvePS = " & CvePS)
|
||||
' TmpDT.Rows.Remove(drt(0))
|
||||
|
||||
Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
' Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = True AND CvePS IN ({StrCargos})").Rows
|
||||
|
||||
@@ -5677,14 +5696,16 @@ Partial Class PV
|
||||
params.Add(New ReportParameter("PorcentajeAjuste", TxtPorcentajeAjuste.Text.Trim))
|
||||
|
||||
'Informacion Acumulador
|
||||
|
||||
params.Add(New ReportParameter("CodEnsamble", If(TxtCodEnsamble.Text.Length > 7, TxtCodEnsamble.Text.Trim.Substring(0, 7), "")))
|
||||
params.Add(New ReportParameter("CodLinea", TxtCodLinea.Text.Trim))
|
||||
params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim))
|
||||
|
||||
'Informacion Vehiculo
|
||||
params.Add(New ReportParameter("MarcaAuto", ""))
|
||||
params.Add(New ReportParameter("TipoAuto", ""))
|
||||
params.Add(New ReportParameter("MarcaAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Marca", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")))
|
||||
params.Add(New ReportParameter("TipoAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Modelo", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")))
|
||||
|
||||
'Informacion Consumidor
|
||||
|
||||
params.Add(New ReportParameter("Direccion", LblDireccion.Text))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
<%-- 14 --%>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Articulo" ItemStyle-HorizontalAlign="Left" />
|
||||
<%-- 15 --%>
|
||||
<asp:BoundField DataField="Costo" HeaderText="Costo" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="CostoTotal" HeaderText="Costo" ItemStyle-HorizontalAlign="Right" />
|
||||
<%-- 16 --%>
|
||||
<asp:BoundField DataField="PLista" HeaderText="P.L." DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%-- 17 --%>
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de Pago" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" OnSelectedIndexChanged="RblTipoCambio_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de Pago" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
|
||||
@@ -2952,26 +2952,24 @@
|
||||
<asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="DivDdlCuentaTarjetaCredito" style="margin-right:-40px" >
|
||||
<div class="col-md-6" runat="server" id="DivDdlCuentaTarjetaCredito" style="margin-right: -40px">
|
||||
<asp:DropDownList ID="DdlCuentaTarjetaCredito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" 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="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" id="DivMesesSinIntereses" visible="false" style="text-align:right;">
|
||||
<div class="col-md-3" runat="server" id="DivMesesSinIntereses" visible="false" style="text-align: right;">
|
||||
<asp:DropDownList ID="DDlMesesSinIntereses" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="80%">
|
||||
<asp:ListItem Value="-1">MSI</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>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVDDlMesesSinIntereses" runat="server" ControlToValidate="DDlMesesSinIntereses" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />campo <b>''Meses sin intereses''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CEDDlMesesSinIntereses" runat="server" HighlightCssClass="vco" TargetControlID="RFVDDlMesesSinIntereses" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="chequesie1">
|
||||
@@ -3004,8 +3002,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chequesie1">
|
||||
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Transf.:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
@@ -3022,11 +3020,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="chequesie1" runat="server" id ="DivContadoOtros" visible="false">
|
||||
<div class="chequesie1" runat="server" id="DivContadoOtros" visible="false">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true" OnSelectedIndexChanged="DdlOtroFormaPago_SelectedIndexChanged">
|
||||
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true" OnSelectedIndexChanged="DdlOtroFormaPago_SelectedIndexChanged">
|
||||
<asp:ListItem Value="-1">Otros</asp:ListItem>
|
||||
<asp:ListItem Value="1">Credito</asp:ListItem>
|
||||
<asp:ListItem Value="2">Debito</asp:ListItem>
|
||||
@@ -3040,12 +3038,12 @@
|
||||
<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>
|
||||
<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>
|
||||
@@ -3053,13 +3051,13 @@
|
||||
<asp:ListItem Value="6">6M</asp:ListItem>
|
||||
<asp:ListItem Value="9">9M</asp:ListItem>
|
||||
<asp:ListItem Value="12">12M</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
@@ -3072,14 +3070,25 @@
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
|
||||
|
||||
<asp:CompareValidator ID="CVImporteContado" runat="server" ControlToValidate="TxtImporteContado" Display="None" ErrorMessage="Importe excedido." Operator="LessThanEqual" Type="Double" ValidationGroup="GrpAgregarPago"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteContado" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<%-- <asp:CompareValidator ID="CVImporteContado" runat="server" ControlToValidate="TxtImporteContado" Display="None" ErrorMessage="Importe excedido." Operator="LessThanEqual" Type="Double" ValidationGroup="GrpAgregarPago"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteContado" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<br></br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<label class="col-md-2">Cambio:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<br></br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3434,7 +3443,7 @@
|
||||
<asp:RequiredFieldValidator ID="RFVNCPSAnt" runat="server" InitialValue="-1" ControlToValidate="DdlNCPSAnt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VGAnticiposClientes"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERFVNCPSAnt" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPSAnt" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivFechaAnticipoCliente" runat="server" visible="false">
|
||||
@@ -5763,7 +5772,7 @@
|
||||
<asp:RequiredFieldValidator ID="RFVNCPS" runat="server" InitialValue="-1" ControlToValidate="DdlNCPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalAplicarNC"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4">
|
||||
<asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label>
|
||||
<asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" />
|
||||
</div>
|
||||
@@ -5812,13 +5821,13 @@
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col-md-2">
|
||||
<asp:Literal ID="LtlTitleImportesRem" runat="server" Visible="false" Text="Importe Remisiones:"></asp:Literal>
|
||||
<asp:Literal ID="LtlTitleImportesRem" runat="server" Visible="false" Text="Importe Remisiones:"></asp:Literal>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div id="DivTxtRemNC" runat="server" visible="false">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">$</span>
|
||||
<asp:TextBox ID="TxtImportesRemisionesNC" ClientIDMode="Static" Text="0.00" CssClass="form-control input-sm" runat="server" Enabled="false"/>
|
||||
<asp:TextBox ID="TxtImportesRemisionesNC" ClientIDMode="Static" Text="0.00" CssClass="form-control input-sm" runat="server" Enabled="false" />
|
||||
</div>
|
||||
<ajax:FilteredTextBoxExtender ID="FTIRNC" runat="server" TargetControlID="TxtImportesRemisionesNC" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
@@ -5841,7 +5850,7 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#ModalAplicarRemisionesNC">
|
||||
Aplicar Remisiones
|
||||
Aplicar Remisiones
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -5954,7 +5963,7 @@
|
||||
<input type="text" id="TxtBusquedaRemNC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaRemNC','{0}')", GvRemisionesNC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaRemNC','{0}')", GvRemisionesNC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div class="row" style="max-height: 10px">
|
||||
<div class="row" style="max-height: 10px">
|
||||
<div class="col-md-12" style="height: 440px; overflow: auto">
|
||||
<asp:GridView ID="GvRemisionesNC" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||
@@ -6370,8 +6379,7 @@
|
||||
$get('TxtTotalGv').value = FormatoNumero(TotalImportes, 2);
|
||||
$get('TxtNCImporte').value = FormatoNumero(total, 2);
|
||||
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
|
||||
{
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
CompararNC();
|
||||
}
|
||||
|
||||
@@ -6400,8 +6408,7 @@
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
|
||||
{
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
CompararNC();
|
||||
}
|
||||
}
|
||||
@@ -6413,13 +6420,12 @@
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
|
||||
{
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
CompararNC();
|
||||
}
|
||||
}
|
||||
|
||||
function LimitaCantidadRNCMasivo(TxtImporte,Saldo, Chk) {
|
||||
function LimitaCantidadRNCMasivo(TxtImporte, Saldo, Chk) {
|
||||
var ImporteNuevo = TxtImporte.value;
|
||||
Chk.checked = true;
|
||||
|
||||
@@ -6432,8 +6438,7 @@
|
||||
TxtImporte.value = FormatoNumero(ImporteNuevo, 2);
|
||||
}
|
||||
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
|
||||
{
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
CompararNC();
|
||||
}
|
||||
}
|
||||
@@ -6476,8 +6481,7 @@
|
||||
|
||||
TxtTotal.value = FormatoNumero(TotalConPorcentaje, 2);
|
||||
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
|
||||
{
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
CompararNC();
|
||||
}
|
||||
}
|
||||
@@ -6812,15 +6816,20 @@
|
||||
|
||||
var TotalOtrosContado = 0;
|
||||
|
||||
try{
|
||||
try {
|
||||
if ($('#DdlOtroFormaPago').val() != "-1") {
|
||||
TotalOtrosContado = ToDouble($get("TxtImporteOtrosContado").value);
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
|
||||
}
|
||||
} catch (e) { }
|
||||
|
||||
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado;
|
||||
var totalVenta = ToDouble($get('TxtTotal').value);
|
||||
|
||||
if (total > totalVenta) {
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||
} else {
|
||||
$get("TxtCambio").value = "0.00";
|
||||
}
|
||||
|
||||
$get("TxtImporteContado").value = total;
|
||||
}
|
||||
@@ -7431,7 +7440,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function showDivEC() {
|
||||
$('#<%= TxtRFCCliente.ClientID %>').val('');
|
||||
$('#<%= TxtNombreCliente.ClientID %>').val('');
|
||||
@@ -7463,7 +7472,7 @@
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -7475,8 +7484,7 @@
|
||||
}
|
||||
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1')
|
||||
{
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
CompararNC();
|
||||
}
|
||||
$('#ModalAplicarRemisionesNC').modal('hide');
|
||||
|
||||
@@ -3383,7 +3383,7 @@ Partial Class Ventas
|
||||
GvPS.DataBind()
|
||||
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
|
||||
UpContado.Update()
|
||||
UpPS.Update()
|
||||
@@ -4102,7 +4102,7 @@ Partial Class Ventas
|
||||
CalculaTotalesVenta(False)
|
||||
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
|
||||
'CARGA ANTICIPOS
|
||||
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
|
||||
@@ -4333,7 +4333,7 @@ Partial Class Ventas
|
||||
HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2)
|
||||
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
|
||||
If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||
DdlVendedor.Enabled = False
|
||||
@@ -5623,7 +5623,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub GvPS_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvPS.RowUpdating
|
||||
'Dim TipoDescuento As Integer
|
||||
Dim Cantidad, PU, Descuento As Decimal
|
||||
Dim Cantidad, PU, Descuento, CantidadInventario As Decimal
|
||||
Dim CuentaPredial As String
|
||||
|
||||
Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
@@ -5631,6 +5631,7 @@ Partial Class Ventas
|
||||
Descuento = Math.Round(GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal, NumeroDecimales)
|
||||
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
||||
|
||||
|
||||
Dim DatarowPS As DataRow = Nothing
|
||||
DatarowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=TmpDT.Rows(e.RowIndex)("CvePS").ToString.ToEntero).FiltroPrimero("") ' Estado = -1
|
||||
|
||||
@@ -5648,10 +5649,21 @@ Partial Class Ventas
|
||||
|
||||
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||
Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero
|
||||
|
||||
CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString.ToDecimal
|
||||
Dim ValidaExistencia As Boolean = True
|
||||
If CantidadInventario > 0 Then 'si ya hay algo surtido, que no valide existencia
|
||||
ValidaExistencia = False
|
||||
End If
|
||||
|
||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, -1, UsuarioActual.CveEmpresa, -1, 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)
|
||||
Dim Existencia As Decimal
|
||||
If ValidaExistencia Then
|
||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, -1, UsuarioActual.CveEmpresa, -1, 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)
|
||||
End If
|
||||
|
||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
@@ -5673,7 +5685,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False AndAlso Not RegistroxOC Then
|
||||
If ValidaExistencia AndAlso DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False AndAlso Not RegistroxOC Then
|
||||
'VALIDA EXISTENCIA
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS}") < TxtCantidad.Text.ToDouble Then
|
||||
@@ -5853,7 +5865,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
|
||||
UpPS.Update()
|
||||
UpContado.Update()
|
||||
@@ -5876,7 +5888,7 @@ Partial Class Ventas
|
||||
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
|
||||
UpContado.Update()
|
||||
End Sub
|
||||
@@ -6985,6 +6997,10 @@ Partial Class Ventas
|
||||
MensajeAlert.AppendFormat("<br/><br/><b> Se generó una Nota de crédito Folio: {0} amortizando el anticipo </b><br/>", ObjFacturaDevolucion.Folio)
|
||||
End If
|
||||
|
||||
If RBLPago.SelectedValue.ToEntero = 2 And TxtCambio.Text.ToDecimal > 0 Then
|
||||
MensajeAlert.AppendFormat("<br/><br/>Su cambio es de <b>${0}</b><br/>", TxtCambio.Text.ToDecimal.FormatoNumero(2))
|
||||
End If
|
||||
|
||||
'MUESTA ALERT OK
|
||||
' si es elrol 1165-Ventas,EMp:80, o la empresa 119, recarga ventas, para seguir registrando-.
|
||||
Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";"))
|
||||
@@ -10288,6 +10304,10 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'If DrPago("CveTipoMovimiento").ToString.ToEntero = 8 Then '13
|
||||
' DrPago("Importe") = DrPago("Importe").ToString.ToDecimal - TxtCambio.Text.ToDecimal
|
||||
'End If
|
||||
|
||||
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString.ToEntero)
|
||||
|
||||
If CveIEPago > 0 Then
|
||||
@@ -10804,7 +10824,7 @@ Partial Class Ventas
|
||||
ViewState("FolioFiscal") = drv("FolioFiscal").ToString
|
||||
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
|
||||
UpContado.Update()
|
||||
If factura.CveCliente > 0 Then
|
||||
@@ -14601,7 +14621,7 @@ Partial Class Ventas
|
||||
HdnIVAOriginal.Value = TxtIVA.Text
|
||||
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
CVImporteContado.ValueToCompare = Total.ToString
|
||||
'CVImporteContado.ValueToCompare = Total.ToString
|
||||
|
||||
If MensajeCveSAT IsNot Nothing AndAlso MensajeCveSAT.ToString.Length > 0 Then
|
||||
Alert($"Los siguientes conceptos hace falta especificar clave SAT <br/><br/> {MensajeCveSAT.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
@@ -16430,7 +16450,7 @@ Partial Class Ventas
|
||||
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
|
||||
Dim abonado = DtPagos.SUM("Importe")
|
||||
Dim saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
||||
CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
||||
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
||||
|
||||
CargaGridContado()
|
||||
UpContado.Update()
|
||||
@@ -16444,7 +16464,12 @@ Partial Class Ventas
|
||||
|
||||
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||
|
||||
If DtPagos.SUM("Importe").ToString.ToDecimal + total > TxtTotal.Text.ToDecimal Then
|
||||
If TxtCambio.Text.ToDecimal > 0 And TxtImporteEfectivo.Text.ToDecimal < TxtCambio.Text.ToDecimal Then
|
||||
Alert("Debe haber un pago en efectivo y ser mayor que el cambio. Si no, ser pago exacto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If (DtPagos.SUM("Importe").ToString.ToDecimal + total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
|
||||
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -16457,7 +16482,7 @@ Partial Class Ventas
|
||||
DrEfectivo("TipoMovimiento") = "Pago en Efectivo"
|
||||
DrEfectivo("CveCuenta") = DdlCuentaEfectivo.SelectedValue
|
||||
DrEfectivo("Cuenta") = DdlCuentaEfectivo.SelectedItem.Text
|
||||
DrEfectivo("Importe") = TxtImporteEfectivo.Text
|
||||
DrEfectivo("Importe") = TxtImporteEfectivo.Text.ToDecimal - TxtCambio.Text.ToDecimal
|
||||
DrEfectivo("Folio") = CargaFolioContado(DdlCuentaEfectivo.SelectedValue.ToEntero, 6)
|
||||
DrEfectivo("Observaciones") = ""
|
||||
DrEfectivo("Tipo") = "Caja Chica"
|
||||
@@ -16642,7 +16667,7 @@ Partial Class Ventas
|
||||
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
|
||||
abonado = DtPagos.SUM("Importe")
|
||||
saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
||||
CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
||||
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
||||
|
||||
CargaGridContado()
|
||||
UpContado.Update()
|
||||
@@ -16659,7 +16684,7 @@ Partial Class Ventas
|
||||
Retorno = True
|
||||
End If
|
||||
|
||||
If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
|
||||
If (DtPagos.SUM("Importe").ToString.ToDecimal + Total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
|
||||
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
|
||||
Retorno = True
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user