-merge EntregaAlmacen.aspx
This commit is contained in:
@@ -384,30 +384,34 @@ Partial Class Vta_CatDocumentosClientes
|
||||
If ActualizarDocumentacion Then
|
||||
|
||||
_formato = GuardarArchivo(CveDocumentacion)
|
||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, UsuarioActual.Empresa.CveEmpresa, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0)) Then
|
||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
||||
Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion)
|
||||
CargaDocumentacion()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.Empresa.CveEmpresa) Then
|
||||
If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
|
||||
CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero
|
||||
_formato = GuardarArchivo(CveDocumentacion)
|
||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.Empresa.CveEmpresa) Then
|
||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
||||
Alert("Documento agregado correctamente.", TipoMensaje.MsgInformacion)
|
||||
CargaDocumentacion()
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
ActualizarDocumentacion = False
|
||||
|
||||
CargaDocumentacion()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -171,6 +171,13 @@
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
|
||||
.orange{
|
||||
color:orange;
|
||||
background-color:orange;
|
||||
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
@@ -3940,7 +3947,7 @@
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgDownLoadFormato" CssClass="btn btn-circle btn-sm orange" OnClick="DownLoadFormato_ClickDocumentacion" runat="server"
|
||||
<asp:LinkButton ID="ImgDownLoadFormato" CssClass="btn btn-circle btn-sm orange" OnClick="DownLoadFormato_ClickDocumentacion" runat="server"
|
||||
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -3953,10 +3960,9 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<%--<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>--%>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkDownLoadDoc" CssClass="btn btn-circle btn-sm blue" OnClick="DownLoad_ClickDocumentacion" runat="server"
|
||||
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
|
||||
Text="<i class='fa fa-download' style='color:white' title='Descargar Documento'></i>" CausesValidation="False" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -6826,10 +6826,12 @@ Partial Class Clientes
|
||||
UPGvDocumentosCliente.Update()
|
||||
'UpGvDocumentosFirma2.Update()
|
||||
End Sub
|
||||
Public Sub UploadModal_ClickDocumentacionFirmaContrato(sender As Object, e As EventArgs)
|
||||
Public Sub UploadModal_ClickDocumentacionFirmaContrato(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim chkEstatus As CheckBox
|
||||
|
||||
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
|
||||
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||
Documentacion = GvRow.DataKey("Documentacion")
|
||||
@@ -6849,7 +6851,29 @@ Partial Class Clientes
|
||||
UpTituloFirma.Update()
|
||||
|
||||
RegistraScript("$('#ModalUploadFirmaContratoDocumento').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
GvdocumentosEventosDescarga()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub GvdocumentosEventosDescarga()
|
||||
|
||||
For Each GvRow As GridViewRow In GvDocumentosCliente.Rows
|
||||
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim LnkDownLoadDoc As LinkButton = GvRow.FCLinkButton("LnkDownLoadDoc")
|
||||
Dim ImgDownLoadFormato As LinkButton = GvRow.FCLinkButton("ImgDownLoadFormato")
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GuardarDocumentosClientes(Optional _CveDocumentacionExcluir As Integer = -1)
|
||||
|
||||
Dim hasError As Boolean = True
|
||||
@@ -7072,18 +7096,38 @@ Partial Class Clientes
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||
|
||||
Dim stringDescargaDocumento As String = ""
|
||||
If GvRow.DataKey("Documentacion") = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\Formatos\Pagaré.docx", UsuarioActual.CveEmpresa)
|
||||
Dim stringDescargaDocumento As String = ""
|
||||
|
||||
If GvRow.DataKey("Documentacion") = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
|
||||
stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\Formatos\Pagaré.docx", UsuarioActual.CveEmpresa)
|
||||
TxtDireccionAval.Text = ""
|
||||
TxtAval.Text = ""
|
||||
RegistraScript("$('#ModalDivPagare').modal('show')")
|
||||
|
||||
Else
|
||||
stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
|
||||
End If
|
||||
linkDescargaPagare = stringDescargaDocumento
|
||||
|
||||
TxtDireccionAval.Text = ""
|
||||
TxtAval.Text = ""
|
||||
RegistraScript("$('#ModalDivPagare').modal('show')")
|
||||
|
||||
stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
|
||||
|
||||
linkDescargaPagare = stringDescargaDocumento
|
||||
|
||||
Dim File = New FileInfo(linkDescargaPagare)
|
||||
|
||||
If File.Exists Then
|
||||
|
||||
Response.Clear()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name)
|
||||
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||
Response.ContentType = "text/octet-stream"
|
||||
Response.Flush()
|
||||
Response.TransmitFile(File.FullName)
|
||||
Response.End()
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimirPagare(sender As Object, e As EventArgs) Handles BtnAgregarPagare.Click
|
||||
@@ -7153,7 +7197,7 @@ Partial Class Clientes
|
||||
|
||||
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString()
|
||||
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
|
||||
'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim LnkDownLoadDoc As LinkButton = e.Row.FCLinkButton("LnkDownLoadDoc")
|
||||
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
||||
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
||||
@@ -7204,11 +7248,13 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
If documentacionFormato = "" Then
|
||||
'ImgDownLoadFormato.Visible = False
|
||||
ImgDownLoadFormato.Visible = False
|
||||
LnkDownLoadDoc.Visible = False
|
||||
Else
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
||||
LnkDownLoadDoc.Visible = True
|
||||
Else
|
||||
LnkDownLoadDoc.Visible = True
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString().ToDate().ToString("dd/MM/yyyy")
|
||||
@@ -7221,6 +7267,7 @@ Partial Class Clientes
|
||||
|
||||
LnkDownLoadDoc.Visible = True
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)
|
||||
|
||||
'If extencion.Length > 0 Then
|
||||
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveCliente & Documentacion & "." & extencion)
|
||||
'Else
|
||||
@@ -7261,6 +7308,7 @@ Partial Class Clientes
|
||||
Dim PathRoot As String = Server.MapPath("/")
|
||||
Dim PathSource As String
|
||||
Dim pathDesti As String
|
||||
Dim fname As String = ""
|
||||
|
||||
PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & documento
|
||||
pathDesti = PathRoot & "Temp\" & CveCliente & documento
|
||||
@@ -7269,26 +7317,46 @@ Partial Class Clientes
|
||||
File.Delete(pathDesti)
|
||||
End If
|
||||
|
||||
File.Copy(PathSource, pathDesti)
|
||||
|
||||
Dim objDoc As New clsGemBoxDocument(pathDesti)
|
||||
Dim objRH As New ClsRH
|
||||
Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString()
|
||||
|
||||
|
||||
objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(-1, UsuarioActual.CveEmpresa)) ' Pendiente
|
||||
objRH.Dispose()
|
||||
|
||||
|
||||
|
||||
objDoc.Guardar(pathDesti)
|
||||
|
||||
File.Copy(PathSource, pathDesti)
|
||||
|
||||
Dim fileinfo As New FileInfo(pathDesti)
|
||||
fname = fileinfo.Name
|
||||
|
||||
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)
|
||||
baseUrl = baseUrl & "/temp/" & fileinfo.Name
|
||||
|
||||
RegistraDescargaJavaScript(baseUrl)
|
||||
If fileinfo.Extension.ToUpper = ".XLS" Or fileinfo.Extension.ToUpper = ".XLSX" Then
|
||||
|
||||
|
||||
Try
|
||||
Dim objDoc As New clsGemBoxDocument(pathDesti)
|
||||
Dim objRH As New ClsRH
|
||||
Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString()
|
||||
|
||||
|
||||
objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(-1, UsuarioActual.CveEmpresa)) ' Pendiente
|
||||
objRH.Dispose()
|
||||
|
||||
objDoc.Guardar(pathDesti)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim FileD = New FileInfo(pathDesti)
|
||||
|
||||
If FileD.Exists Then
|
||||
|
||||
Response.Clear()
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileD.Name)
|
||||
Response.AddHeader("Content-Length", FileD.Length.ToString())
|
||||
Response.ContentType = "text/octet-stream"
|
||||
Response.Flush()
|
||||
Response.TransmitFile(FileD.FullName)
|
||||
Response.End()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
<asp:DropDownList ID="DdlIngreso" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="RazonSocial" DataValueField="CveIE" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDeudor" runat="server" ControlToValidate="DdlIngreso" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ingresos''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDeudor" runat="server" HighlightCssClass="vco" TargetControlID="RFVDeudor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:HiddenField ID="HdnIngresoImporte" Value="0" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
@@ -78,22 +78,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
ViewState("IdCuentaBancariaComplementaria") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCuentaBancaria As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaBancaria").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuentaBancaria") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCuentaBancariaComplementaria As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaBancariaComplementaria").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuentaBancariaComplementaria") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property NombreComercial As String
|
||||
Get
|
||||
Return ViewState("NombreComercial").ToString
|
||||
@@ -158,38 +143,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveCuentaCliente As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaCliente").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuentaCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly Property CveCuentaMonedaExtranjera As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaMonedaExtranjera").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property CveCuentaComplementaria As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaComplementaria").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property CveCuentaRetIVA As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaRetIVA").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly Property CveCuentaRetISR As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaRetISR").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Private Property Mail As String
|
||||
Get
|
||||
If ViewState("Mail") Is Nothing Then
|
||||
@@ -301,7 +254,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
If CargaCliente(CveCliente, CveMonedaFiltro) Then
|
||||
|
||||
IdCuentaBancaria = 0
|
||||
CveCuentaBancaria = 0
|
||||
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
||||
|
||||
@@ -397,12 +349,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
|
||||
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
||||
|
||||
ViewState("CveCuentaCliente") = ObjCliente.CveCuentaClientes
|
||||
ViewState("CveCuentaMonedaExtranjera") = ObjCliente.CveCuentaMonedaExtranjera
|
||||
ViewState("CveCuentaComplementaria") = ObjCliente.CveCuentaComplementaria
|
||||
ViewState("CveCuentaRetIVA") = ObjCliente.CveCuentaRetIVA
|
||||
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
|
||||
|
||||
ViewState("IdCtaAnticipo") = ObjCliente.IdCtaContAnticipos
|
||||
ViewState("IdCtaContMonedaExtranjeraAnticipo") = ObjCliente.IdCtaMonedaExtranjeraAnticipos
|
||||
ViewState("IdCtaContMonedaComplementariaAnticipo") = ObjCliente.IdCtaContCompAnticipos
|
||||
@@ -483,8 +429,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
IdCuentaBancariaComplementaria = dr("IdCtaContableComplementaria").ToString.ToEntero
|
||||
|
||||
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
CveCuentaBancariaComplementaria = dr("IdCtaContableComplementariaSIG").ToString.ToEntero
|
||||
ValidaCuentaDePagoFormaDePago()
|
||||
End If
|
||||
|
||||
@@ -720,6 +664,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'valida que no exceda lo seleccionado. con el valor del ie
|
||||
If (RblTipoPago.SelectedValue = "3" AndAlso HdnIngresoImporte.value.todecimal < txttotal.text.todecimal) Then
|
||||
Alert("Importe excedido para la aplicación", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Cuenta As String = ""
|
||||
Dim CuentaDeposito As String = ""
|
||||
|
||||
@@ -843,6 +793,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim tipoCambioPago As Decimal
|
||||
Dim tipoCambioVentaValuacion As Decimal = 1
|
||||
Dim TipoCambioGeneral As Decimal = 1
|
||||
Dim CveSubProyectoContabilizar As Integer = -1
|
||||
Dim CveSubProyectoMaximo As Integer = -1
|
||||
Dim CuentasContablesInvalidas As New StringBuilder
|
||||
Dim CuentasContablesInvalidasSIG As New StringBuilder
|
||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||
@@ -914,12 +866,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim importeMX As Decimal
|
||||
Dim FechaMovimiento As Date = TxtFechaDocumento.Text
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim ConceptoMovimiento As String = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreComercial, gvr.DataKey("SerieFolio").ToString, TxtFolio.Text.Trim)
|
||||
Dim Referencia As String = gvr.DataKey("SerieFolio").ToString
|
||||
Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
Dim CveSubProyectoContabilizar As Integer = -1
|
||||
CveSubProyectoContabilizar = -1
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
If CveSubProyecto > 0 Then CveSubProyectoMaximo = CveSubProyecto
|
||||
|
||||
Select Case ConceptoContable
|
||||
Case 2 'Pago Cliente
|
||||
@@ -945,25 +897,22 @@ Partial Class Ventas_ClientesAbonar
|
||||
If gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
IdCtaContable = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente)
|
||||
ConceptoContable = If(EsAnticipoEspecial, 3, ConceptoContable)
|
||||
CveCuenta = If(EsAnticipoEspecial, -1, CveCuentaCliente)
|
||||
Else
|
||||
ConceptoMovimiento += $" TC:{tipoCambioVentaValuacion} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria)
|
||||
CveCuenta = If(EsAnticipoEspecial, -1, CveCuentaComplementaria)
|
||||
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||
importeMX = ImporteMovimiento
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa = 119, 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa = 119, 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera)
|
||||
CveCuenta = If(EsAnticipoEspecial, -1, CveCuentaMonedaExtranjera)
|
||||
ConceptoContable = If(EsAnticipoEspecial, 3, ConceptoContable)
|
||||
End If
|
||||
|
||||
If EsAnticipoEspecial Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Referencia, 2, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Referencia, 95, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Referencia, 2, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Referencia, 95, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
@@ -1010,16 +959,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 313 'Ret Iva Servicios
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
@@ -1092,16 +1031,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetISR <> 0 Then
|
||||
CveCuenta = CveCuentaRetISR
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 13 'Iva por Trasladar
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -1126,15 +1056,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVAXTrasladar As Integer = 0
|
||||
Dim CveCuentaIVAxTrasladar As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
|
||||
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString.ToEntero
|
||||
End If
|
||||
|
||||
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Case 62 'Ret IVA Trasladado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
@@ -1175,16 +1102,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 314 'Ret Iva Servicios Traslado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
@@ -1257,16 +1174,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetISR <> 0 Then
|
||||
CveCuenta = CveCuentaRetISR
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 61 'Iva Trasladado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -1291,15 +1199,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVATrasladado As Integer = 0
|
||||
Dim CveCuentaIVATrasladado As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
|
||||
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString.ToEntero
|
||||
End If
|
||||
|
||||
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
||||
CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
||||
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Case 38 'IEPS por trasladar
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
@@ -1324,7 +1229,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
CveSubProyectoContabilizar = CveSubProyecto
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
|
||||
Case 39 'IEPS Trasladado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -1348,7 +1252,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
CveSubProyectoContabilizar = CveSubProyecto
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
|
||||
Case 64 'Ganancia
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
|
||||
@@ -1530,7 +1433,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
' CveCuenta = CveCuentaCliente
|
||||
' End If
|
||||
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=importeMX, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
|
||||
@@ -1538,7 +1441,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
' IdCtaContable = IdCtaContComplementaria
|
||||
' CveCuenta = CveCuentaComplementaria
|
||||
' If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 227, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 227, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, , ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
' importeMX = ImporteMovimiento
|
||||
@@ -1557,7 +1460,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ConceptoMovimiento, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ConceptoMovimiento, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero, ImporteMX:=importeMX) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1575,13 +1478,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If (CveCuenta < 1 Or CveCuentaBancaria < 1) Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
@@ -1598,19 +1495,22 @@ Partial Class Ventas_ClientesAbonar
|
||||
Next
|
||||
|
||||
If RblTipoPago.SelectedValue = "1" Then
|
||||
|
||||
CveSubProyectoContabilizar = CveSubProyectoMaximo
|
||||
|
||||
If tipoCambioPago > 1 AndAlso CveMoneda = 2 Then
|
||||
If IdCuentaBancariaComplementaria > 0 OrElse CveCuentaBancariaComplementaria > 0 Then
|
||||
If IdCuentaBancariaComplementaria > 0 Then
|
||||
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), CveCuenta:=CveCuentaBancariaComplementaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
@@ -1620,7 +1520,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1631,7 +1531,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1647,11 +1547,11 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), CveCuenta:=CveCuentaBancariaComplementaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
@@ -1661,7 +1561,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1672,7 +1572,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -3179,15 +3079,19 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged
|
||||
'saco la moneda de la selección
|
||||
|
||||
hdnIngresoImporte.Value = 0
|
||||
If DdlIngreso.SelectedValue.ToEntero > 0 Then
|
||||
Dim Banco As New ClsBancos
|
||||
|
||||
If Banco.GetBancosIE(DdlIngreso.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
CveMonedaPago = Banco.CveMoneda
|
||||
Dim Deudores As New ClsMovimientos
|
||||
If Deudores.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then
|
||||
hdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.Selectedvalue))
|
||||
End If
|
||||
Deudores.Dispose()
|
||||
End If
|
||||
IdCuentaBancariaComplementaria = 0
|
||||
CveCuentaBancariaComplementaria = 0
|
||||
Banco.Dispose()
|
||||
Else
|
||||
CveMonedaPago = -1
|
||||
|
||||
@@ -458,7 +458,9 @@ Partial Class Ventas_Promociones
|
||||
Dim TieneError = False
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
If ObjVentas.UpdatePromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha), DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CvePromocion, DdlSubProyecto.SelectedValue.ToEntero, DdlMarca.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.UpdatePromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
|
||||
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||
CvePromocion, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SELECTEDVALUE.TOENTERO, UsuarioActual.CveEmpresa, CveMarca:=DdlMarca.SelectedValue.ToEntero) Then
|
||||
|
||||
For Each Dr As DataRow In TempDT.FiltraParametros("Estatus = 0").Rows
|
||||
If Not ObjVentas.AddPromocionesDetalle(CvePromocion, Dr("CvePS").ToString.ToEntero, Dr("CveTipoPromocion").ToString.ToEntero, Dr("Promocion").ToString.ToDouble, Dr("PUAnterior").ToString.ToDouble, Dr("PUPromocion").ToString.ToDouble,
|
||||
|
||||
@@ -170,17 +170,10 @@
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label id="lblEsDistribuidor" runat="server" visible="false" class="col-md-1 truncate">Es Distrubuidor:</label>
|
||||
<div class="col-md-2" id="divEsDistribuidor" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">F. Conciliado inicio:</div>
|
||||
<div class="col-md-1">
|
||||
<div class="col-md-1" style="padding-left: 0px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaAplicadoI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -209,6 +202,46 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label id="lblEsDistribuidor" runat="server" visible="false" class="col-md-1 truncate">Es Distribuidor:</label>
|
||||
<div class="col-md-2" id="divEsDistribuidor" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">F. Registro IE inicio:</div>
|
||||
<div class="col-md-1" style="padding-left: 0px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaRegistroIEI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioRegistroIEI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaRegistroIEI" runat="server" TargetControlID="TxtFechaRegistroIEI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtFechaRegistroIEI" PopupButtonID="imgCalendarioRegistroIEI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaRegistroIEI" runat="server" ControlToValidate="TxtFechaRegistroIEI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaRegistroIEI" runat="server" ControlToValidate="TxtFechaRegistroIEI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFRegistroIEI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaRegistroIEI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">F. Registro IE Fin:</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaRegistroIEF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioRegistroIEF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaRegistroIEF" runat="server" TargetControlID="TxtFechaRegistroIEF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtFechaRegistroIEF" PopupButtonID="imgCalendarioRegistroIEF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaRegistroIEF" runat="server" ControlToValidate="TxtFechaRegistroIEF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaRegistroIEF" runat="server" ControlToValidate="TxtFechaRegistroIEF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -129,13 +129,16 @@ Partial Class Ventas_RepRecuperacion
|
||||
End If
|
||||
|
||||
Dim FechaAplicadoI As Date = If(IsDate(TxtFechaAplicadoI.Text), TxtFechaAplicadoI.Text.ToDate, MinFecha)
|
||||
Dim FechaAplicadoF As Date = If(IsDate(TxtFechaAplicadoF.Text), TxtFechaAplicadoF.Text.ToDate, MaxFecha)
|
||||
Dim FechaAplicadoF As Date = If(IsDate(TxtFechaAplicadoF.Text), TxtFechaAplicadoF.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim FechaRegistroIEI As Date = If(IsDate(TxtFechaRegistroIEI.Text), TxtFechaRegistroIEI.Text.ToDate, MinFecha)
|
||||
Dim FechaRegistroIEF As Date = If(IsDate(TxtFechaRegistroIEF.Text), TxtFechaRegistroIEF.Text.ToDate, MaxFecha)
|
||||
|
||||
|
||||
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
|
||||
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
|
||||
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF) Then
|
||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF) Then
|
||||
GvDatos.DataSource = ObjMovtos.DtResultados
|
||||
DtDatos = ObjMovtos.DtResultados
|
||||
Else
|
||||
@@ -158,12 +161,14 @@ Partial Class Ventas_RepRecuperacion
|
||||
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Css As String = "Texto"
|
||||
Dim FechaI, FechaF, FechaAplicadoI, FechaAplicadoF As String
|
||||
Dim FechaI, FechaF, FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF As String
|
||||
Dim CveClienteSucursal As Integer = -1
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
FechaAplicadoI = If(IsDate(TxtFechaAplicadoI.Text.Trim()), TxtFechaAplicadoI.Text.Trim(), MinFecha.ToShortDateString.ToString)
|
||||
FechaAplicadoF = If(IsDate(TxtFechaAplicadoF.Text.Trim()), TxtFechaAplicadoF.Text.Trim(), MaxFecha.ToShortDateString.ToString)
|
||||
FechaAplicadoF = If(IsDate(TxtFechaAplicadoF.Text.Trim()), TxtFechaAplicadoF.Text.Trim(), MaxFecha.ToShortDateString.ToString)
|
||||
FechaRegistroIEI = If(IsDate(TxtFechaRegistroIEI.Text.Trim()), TxtFechaRegistroIEI.Text.Trim(), MinFecha.ToShortDateString.ToString)
|
||||
FechaRegistroIEF = If(IsDate(TxtFechaRegistroIEF.Text.Trim()), TxtFechaRegistroIEF.Text.Trim(), MaxFecha.ToShortDateString.ToString)
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
@@ -175,15 +180,15 @@ Partial Class Ventas_RepRecuperacion
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Liga4 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}",
|
||||
Dim Liga4 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 2, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF)
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 2, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF)
|
||||
|
||||
e.Row.FCHyperLink("HplPagado").NavigateUrl = Liga4
|
||||
|
||||
Dim Liga5 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}",
|
||||
Dim Liga5 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF)
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF)
|
||||
|
||||
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
|
||||
|
||||
|
||||
@@ -178,16 +178,9 @@
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label id="lblEsDistribuidor" runat="server" visible="false" class="col-md-1 truncate">Es Distrubuidor:</label>
|
||||
<div class="col-md-2" id="divEsDistribuidor" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Fecha Aplicado Inicio: </div>
|
||||
<div class="col-md-1">
|
||||
|
||||
<div class="col-md-1 truncate">Fecha Aplicado Inicio: </div>
|
||||
<div class="col-md-1" style="padding-left: 0px !important;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaAplicadoI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -216,7 +209,47 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label id="lblEsDistribuidor" runat="server" visible="false" class="col-md-1 truncate">Es Distribuidor:</label>
|
||||
<div class="col-md-2" id="divEsDistribuidor" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">F. Registro IE inicio:</div>
|
||||
<div class="col-md-1" style="padding-left: 0px !important;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; ">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaRegistroIEI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioRegistroIEI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaRegistroIEI" runat="server" TargetControlID="TxtFechaRegistroIEI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtFechaRegistroIEI" PopupButtonID="imgCalendarioRegistroIEI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaRegistroIEI" runat="server" ControlToValidate="TxtFechaRegistroIEI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaRegistroIEI" runat="server" ControlToValidate="TxtFechaRegistroIEI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFRegistroIEI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaRegistroIEI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">F. Registro IE Fin:</div>
|
||||
<div class="col-md-1" >
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding-left: 0px !important;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaRegistroIEF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioRegistroIEF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaRegistroIEF" runat="server" TargetControlID="TxtFechaRegistroIEF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtFechaRegistroIEF" PopupButtonID="imgCalendarioRegistroIEF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaRegistroIEF" runat="server" ControlToValidate="TxtFechaRegistroIEF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaRegistroIEF" runat="server" ControlToValidate="TxtFechaRegistroIEF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -85,7 +85,7 @@ Partial Class Ventas_RepRecuperacionDetalle
|
||||
Private Sub CargaCombos()
|
||||
Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto,
|
||||
CveEstatus, CveResponsable, CveAgrupador, CveBanco, CveCuenta, CveClienteSucursal, CveMoneda, CveClienteClasificacion As Integer
|
||||
Dim FechaI, FechaF, TipoDocto, TipoCambio, FechaAplicadoI, FechaAplicadoF As String
|
||||
Dim FechaI, FechaF, TipoDocto, TipoCambio, FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF As String
|
||||
|
||||
'Carga Clientes
|
||||
If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then
|
||||
@@ -146,15 +146,25 @@ Partial Class Ventas_RepRecuperacionDetalle
|
||||
txtFechaI.Text = FechaI
|
||||
End If
|
||||
|
||||
FechaAplicadoI = If(Request("FechaAplicadoI") IsNot Nothing, Request("FechaAplicadoI").ToString, "-1").ToString
|
||||
FechaAplicadoF = If(Request("FechaAplicadoF") IsNot Nothing, Request("FechaAplicadoF").ToString, "-1").ToString
|
||||
FechaAplicadoI = If(Request("FechaAplicadoI") IsNot Nothing And Request("FechaAplicadoI").ToString <> "01/01/1900", Request("FechaAplicadoI").ToString, "-1").ToString
|
||||
FechaAplicadoF = If(Request("FechaAplicadoF") IsNot Nothing And Request("FechaAplicadoF").ToString <> "01/01/9999", Request("FechaAplicadoF").ToString, "-1").ToString
|
||||
|
||||
FechaRegistroIEI = If(Request("FechaRegistroIEI") IsNot Nothing And Request("FechaRegistroIEI").ToString <> "01/01/1900", Request("FechaRegistroIEI").ToString, "-1").ToString
|
||||
FechaRegistroIEF = If(Request("FechaRegistroIEF") IsNot Nothing And Request("FechaRegistroIEF").ToString <> "01/01/9999", Request("FechaRegistroIEF").ToString, "-1").ToString
|
||||
|
||||
If FechaAplicadoF <> "-1" Then
|
||||
TxtFechaAplicadoF.Text = FechaAplicadoF
|
||||
End If
|
||||
If FechaAplicadoI <> "-1" Then
|
||||
TxtFechaAplicadoI.Text = FechaAplicadoI
|
||||
End If
|
||||
|
||||
If FechaRegistroIEF <> "-1" Then
|
||||
TxtFechaRegistroIEF.Text = FechaRegistroIEF
|
||||
End If
|
||||
If FechaRegistroIEI <> "-1" Then
|
||||
TxtFechaRegistroIEI.Text = FechaRegistroIEI
|
||||
End If
|
||||
|
||||
|
||||
TipoDocto = IfNull(Request("TipoDocto"), "-1").ToString
|
||||
CveClienteSucursal = IfNull(Request("CveClienteSucursal"), "-1").ToString.ToEntero
|
||||
@@ -232,14 +242,21 @@ Partial Class Ventas_RepRecuperacionDetalle
|
||||
TCEspecifico = TxtEspecifico.Text.ToDecimal
|
||||
Else
|
||||
TCEspecifico = -1
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim FechaAplicadoI As Date = If(IsDate(TxtFechaAplicadoI.Text), TxtFechaAplicadoI.Text.ToDate, MinFecha)
|
||||
Dim FechaAplicadoF As Date = If(IsDate(TxtFechaAplicadoF.Text), TxtFechaAplicadoF.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim FechaRegistroIEI As Date = If(IsDate(TxtFechaRegistroIEI.Text), TxtFechaRegistroIEI.Text.ToDate, MinFecha)
|
||||
Dim FechaRegistroIEF As Date = If(IsDate(TxtFechaRegistroIEF.Text), TxtFechaRegistroIEF.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetRepRecuperacionDetalle(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero,
|
||||
DdlClienteSucursal.SelectedValue.ToEntero, -1,
|
||||
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
|
||||
DdlTipoDocto.SelectedValue, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, Grupo:=Grupo,
|
||||
TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, Tipo:=Tipo,
|
||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=TxtFechaAplicadoI.Text.ToDate, FechaAplicadoF:=TxtFechaAplicadoF.Text.ToDate) Then
|
||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF) Then
|
||||
|
||||
GvDatos.DataSource = ObjMovtos.DtResultados
|
||||
DtDatos = ObjMovtos.DtResultados
|
||||
|
||||
@@ -8543,10 +8543,11 @@
|
||||
}
|
||||
|
||||
//Suma Totales
|
||||
function FnSuma() {
|
||||
$get('TxtSubTotal2').value = FormatoNumero(ToDouble($get('TxtSubTotal').value) - ToDouble($get('LblDescuentos').innerHTML) - ToDouble($get('LblAmortizacion').innerHTML), 2);
|
||||
var totalVenta = ToDouble($get('TxtSubTotal2').value) + ToDouble($get('TxtIVA').value) + ToDouble($get('TxtIEPS') ? ToDouble($get('TxtIEPS').value) : 0) - ToDouble($get('TxtRetIVA').value) - ToDouble($get('TxtRetISR').value);
|
||||
function FnSuma() {
|
||||
debugger;
|
||||
$get('TxtSubTotal2').value = FormatoNumero(ToDouble($get('TxtSubTotal').value) - ToDouble($get('LblDescuentos').innerHTML) - ToDouble($get('LblAmortizacion').innerHTML), 2);
|
||||
var totalVenta = ToDouble($get('TxtSubTotal2').value) + ToDouble($get('TxtIVA').value) + ToDouble($get('TxtIEPS') ? ToDouble($get('TxtIEPS').value) : 0) - ToDouble($get('TxtRetIVA') ? $get('TxtRetIVA').value : 0) - ToDouble($get('TxtRetISR') ? $get('TxtRetISR').value:0);
|
||||
|
||||
$("#<%=GvImpuestosLocales2.ClientID%> input[type='text']").each(function () {
|
||||
|
||||
if ($(this).attr("class") == '5') // cuando es traslado de impuesto local, se suma
|
||||
|
||||
@@ -9961,9 +9961,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'RMF. faltan impuestos locales
|
||||
If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows.Count > 0 Then
|
||||
If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows.Count > 0 Then
|
||||
|
||||
For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 1").Rows
|
||||
For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows
|
||||
If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then
|
||||
Dim ret As New CFDIRetencionesLocales With
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user