Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -96,13 +96,15 @@
|
||||
|
||||
</tr><tr> <td>Crédito al Salario</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCredSalario" runat="server" Width="75px"></asp:TextBox></td></tr></table>
|
||||
<asp:TextBox ID="TxtCredSalario" runat="server" Width="75px"></asp:TextBox></td>
|
||||
|
||||
</tr></table>
|
||||
</asp:Panel>
|
||||
<asp:Panel ID="PnlFiniquito" runat="server" Visible="false">
|
||||
<table>
|
||||
<asp:Panel ID="PnlFiniquito" runat="server" Visible="true">
|
||||
<table border="0" id="TbIEPersonal" runat="server" Visible="false" >
|
||||
<tr><td>Personal:</td><td><asp:DropDownList CssClass="select2me" ID="DdlNominaPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="200px"> </asp:DropDownList></td></tr>
|
||||
</table>
|
||||
<table border="0" id="TbIE" runat="server" visible="false">
|
||||
<table border="0" id="TbIE" runat="server" visible="true">
|
||||
<tr><td>Movimiento:</td><td><asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar" Width="250px"></asp:DropDownList></td></tr>
|
||||
<tr><td>Cuenta Bancaria:</td><td><asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" Width="250px" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardar"></asp:DropDownList></td></tr>
|
||||
<tr><td>Folio:</td><td><asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm" Width="70px"></asp:TextBox></td></tr>
|
||||
|
||||
@@ -51,6 +51,7 @@ Partial Class AC_RegNomina
|
||||
|
||||
CargaPresupuestos()
|
||||
CargaMeta()
|
||||
CargaCombosIE()
|
||||
TxtImporte.Enabled = False
|
||||
CreaDTDetalles()
|
||||
BtnAgregar.Enabled = False
|
||||
@@ -232,6 +233,10 @@ Partial Class AC_RegNomina
|
||||
Dim total As Double = LbTotal.Text.ToDouble
|
||||
LbTotal.Text = (total + dr("Importe").ToString.ToDouble).ToString.FormatoNumero
|
||||
|
||||
If RBLPago.selectedvalue = "1" Then
|
||||
txttotal.text = LbTotal.Text.todecimal.FormatoNumero
|
||||
End If
|
||||
|
||||
CboMeta.SelectedIndex = -1
|
||||
CboUnidadAdministrativa.Items.Clear()
|
||||
CboFuenteFinanciamiento.Items.Clear()
|
||||
@@ -241,6 +246,8 @@ Partial Class AC_RegNomina
|
||||
TxtImporte.Text = ""
|
||||
TxtImporte.Enabled = False
|
||||
BtnAgregar.Enabled = False
|
||||
|
||||
|
||||
Else
|
||||
Alert("El importe supera el capital disponible. Por favor de revisar y modificar", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -270,6 +277,9 @@ Partial Class AC_RegNomina
|
||||
ChkDevengar.Checked = True : ChkEjercer.Checked = True : ChkPagar.Checked = True
|
||||
ChkEjercer.Enabled = True : ChkPagar.Enabled = True
|
||||
tbGeneral.Visible = True
|
||||
TbIEPersonal.visible = False
|
||||
PnlFiniquito.visible = True
|
||||
CargaCombosIE()
|
||||
Case "2"
|
||||
PnlNomina.Visible = False : PnlFiniquito.Visible = True
|
||||
ChkEjercer.Checked = False : ChkEjercer.Enabled = False
|
||||
@@ -278,7 +288,7 @@ Partial Class AC_RegNomina
|
||||
ChkDevengar.Checked = True
|
||||
trGasto.Visible = True
|
||||
tbGeneral.Visible = True
|
||||
|
||||
TbIEPersonal.visible = True
|
||||
DdlNominaPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("IdCtaContPersonal > 0")
|
||||
DdlNominaPersonal.DataBind()
|
||||
TbIE.Visible = False
|
||||
@@ -287,19 +297,7 @@ Partial Class AC_RegNomina
|
||||
ChkDevengar.Checked = True : ChkEjercer.Checked = True : ChkPagar.Checked = True
|
||||
trGasto.Visible = False
|
||||
tbGeneral.Visible = False
|
||||
|
||||
DdlTipoTransaccion.Items.Clear()
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros(String.Format("Tipo = '{0}'", If(RBLPago.SelectedValue = "3", "Ing", "Egs")))
|
||||
DdlTipoTransaccion.DataBind()
|
||||
|
||||
DdlNominaPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("IdCtaContPersonal > 0")
|
||||
DdlNominaPersonal.DataBind()
|
||||
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas
|
||||
DdlCuenta.DataSource = dt
|
||||
DdlCuenta.DataBind()
|
||||
TbIE.Visible = True
|
||||
CargaCombosIE()
|
||||
|
||||
If RBLPago.SelectedValue = "4" Then
|
||||
trGasto.Visible = True
|
||||
@@ -311,6 +309,23 @@ Partial Class AC_RegNomina
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub CargaCombosIE()
|
||||
|
||||
DdlTipoTransaccion.Items.Clear()
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros(String.Format("Tipo = '{0}' and Estatus = 1", If(RBLPago.SelectedValue = "3", "Ing", "Egs")))
|
||||
DdlTipoTransaccion.DataBind()
|
||||
|
||||
DdlNominaPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("IdCtaContPersonal > 0")
|
||||
DdlNominaPersonal.DataBind()
|
||||
DdlNominaPersonal.items.insert(0, New listitem("-", "-1"))
|
||||
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas
|
||||
DdlCuenta.DataSource = dt
|
||||
DdlCuenta.DataBind()
|
||||
TbIE.Visible = True
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
|
||||
'Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
||||
'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
|
||||
@@ -351,6 +366,8 @@ Partial Class AC_RegNomina
|
||||
Dim Total As Decimal = DtDetalle.SUMD("Importe")
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
Dim Concepto As String = TxtConcepto.Text.Trim
|
||||
Dim GeneraIE As Boolean = False
|
||||
|
||||
|
||||
Dim IdCtaISPT As Integer = 640
|
||||
Dim IdCtaCreditoSalario As Integer = 635
|
||||
@@ -379,10 +396,15 @@ Partial Class AC_RegNomina
|
||||
If dr IsNot Nothing Then
|
||||
IdCtaPersonal = dr("IdCtaContPersonal").ToString.ToEntero
|
||||
End If
|
||||
Else
|
||||
If Seleccion = "1" Then
|
||||
CtaPuente = 0
|
||||
GeneraIE = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Seleccion.Contiene("3", "4") Then
|
||||
If Seleccion.Contiene("1", "3", "4") Then
|
||||
|
||||
Dim dr As DataRow
|
||||
dr = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue))
|
||||
@@ -440,57 +462,57 @@ Partial Class AC_RegNomina
|
||||
|
||||
If TieneError Then MensajeError = "Error Tipo 1"
|
||||
|
||||
If Seleccion.Contiene("1", "2", "3") Then
|
||||
'If Seleccion.Contiene("1", "2", "3") Then
|
||||
|
||||
Total = DtDetalle.SUMD("Importe")
|
||||
If Seleccion = "3" Then Total = TxtTotal.Text.ToDecimal
|
||||
Dim objACPI As New ClsAC()
|
||||
' Total = DtDetalle.SUMD("Importe")
|
||||
' If Seleccion = "3" Then Total = TxtTotal.Text.ToDecimal
|
||||
' Dim objACPI As New ClsAC()
|
||||
|
||||
If objACPI.GetPresupuestoIngresos(CvePresupuestoIngreso, UsuarioActual.Empresa.EjercicioActual, True, UsuarioActual.CveEmpresa) Then
|
||||
If objACPI.DtResultados.Rows.Count > 0 Then
|
||||
drt = objACPI.DtResultados.Rows(0)
|
||||
' If objACPI.GetPresupuestoIngresos(CvePresupuestoIngreso, UsuarioActual.Empresa.EjercicioActual, True, UsuarioActual.CveEmpresa) Then
|
||||
' If objACPI.DtResultados.Rows.Count > 0 Then
|
||||
' drt = objACPI.DtResultados.Rows(0)
|
||||
|
||||
If RBLPago.SelectedValue.Contiene("1", "2") Then
|
||||
' If RBLPago.SelectedValue.Contiene("1", "2") Then
|
||||
|
||||
'se debe de registrar el ingreso
|
||||
'DEVENGO EL INGRESO
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaPorEjecutar").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' 'se debe de registrar el ingreso
|
||||
' 'DEVENGO EL INGRESO
|
||||
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaPorEjecutar").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
'CARGO la deuda del cliente
|
||||
'If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
'abono,
|
||||
' 'CARGO la deuda del cliente
|
||||
' 'If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' 'abono,
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaMatriz").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaMatriz").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
|
||||
|
||||
End If
|
||||
If RBLPago.SelectedValue.Contiene("1", "3") Then
|
||||
'RECAUDO EL INGRESO
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' End If
|
||||
' If RBLPago.SelectedValue.Contiene("1", "3") Then
|
||||
' 'RECAUDO EL INGRESO
|
||||
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaRecaudado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaRecaudado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Seleccion = "1" AndAlso Not objAC.AddMovimiento(IDPoliza, CtaPuente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' If Seleccion = "1" AndAlso Not objAC.AddMovimiento(IDPoliza, CtaPuente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
If Not objAC.AddMovimiento(IDPoliza, CtaCliente, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
' If Not objAC.AddMovimiento(IDPoliza, CtaCliente, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
' Else
|
||||
' TieneError = True
|
||||
' End If
|
||||
' Else
|
||||
' TieneError = True
|
||||
' End If
|
||||
|
||||
objACPI.Dispose()
|
||||
' objACPI.Dispose()
|
||||
|
||||
End If
|
||||
'End If
|
||||
|
||||
If IdCtaPersonal > 0 Then
|
||||
|
||||
@@ -499,52 +521,54 @@ Partial Class AC_RegNomina
|
||||
'cuando es el pago a personal, se carga, los demas casos se abona
|
||||
If Seleccion.Contiene("1", "2", "4") Then If Not objAC.AddMovimiento(IDPoliza, IdCtaPersonal, If(Seleccion = "4", False, True), Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
CtaPuente = 0 ' para que no se inserte mas abajo
|
||||
GeneraIE = True
|
||||
End If
|
||||
|
||||
If Seleccion.Contiene("3", "4") Then
|
||||
'registro un IE
|
||||
ObjIE = New ClsBancos
|
||||
ObjIE.IniciaTransacSQL()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim CvePrePoliza = ObjMov.AddPrePolizas("Banc", 2, Importe, Importe, 1, Fecha, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim Obs As String = TxtConcepto.Text
|
||||
Dim Folio As String
|
||||
If Seleccion.Contiene("1", "3", "4") AndAlso GeneraIE Then
|
||||
'registro un IE
|
||||
ObjIE = New ClsBancos
|
||||
ObjIE.IniciaTransacSQL()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim CvePrePoliza = ObjMov.AddPrePolizas("Banc/RegNomina", 2, Importe, Importe, 1, Fecha, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim Obs As String = TxtConcepto.Text
|
||||
Dim Folio As String
|
||||
|
||||
Folio = TxtFolio.Text.Trim
|
||||
Dim CveConceptoCargo As Integer = 30
|
||||
Dim CveConceptoAbono As Integer = 28
|
||||
Total = TxtTotal.Text.ToDecimal
|
||||
Folio = TxtFolio.Text.Trim
|
||||
Dim CveConceptoCargo As Integer = 30
|
||||
Dim CveConceptoAbono As Integer = 28
|
||||
Total = TxtTotal.Text.ToDecimal
|
||||
|
||||
If Seleccion = "4" Then Total = DtDetalle.SUMD("Importe")
|
||||
If Seleccion = "4" Then Total = DtDetalle.SUMD("Importe")
|
||||
|
||||
'cuando saco el egreso invierto los concepto
|
||||
If Seleccion = "3" Then
|
||||
CveConceptoCargo = 29
|
||||
CveConceptoAbono = 30
|
||||
End If
|
||||
'cuando saco el egreso invierto los concepto
|
||||
If Seleccion = "3" Then
|
||||
CveConceptoCargo = 29
|
||||
CveConceptoAbono = 30
|
||||
ElseIf Seleccion = "1" Then
|
||||
CveConceptoCargo = 95
|
||||
CveConceptoAbono = 30
|
||||
Obs = "NOMINA PAGADA"
|
||||
End If
|
||||
|
||||
'lo envia como transferencia recibida
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, Folio, Obs, Total, 1, 1.0, Obs, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CveIE > 0 Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Total, "", CveConceptoCargo, Obs, Fecha, 0, -1, CveIE, CvePersonal:=DdlNominaPersonal.SelectedValue.ToEntero, ImporteMX:=Total) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Total, "", CveConceptoAbono, Obs, Fecha, 0, -1, CveIE, CvePersonal:=DdlNominaPersonal.SelectedValue.ToEntero, ImporteMX:=Total) Then
|
||||
MsgError = "no se pudo insertar el detalle de la póliza 2"
|
||||
End If
|
||||
Else
|
||||
MsgError = "no se pudo insertar el detalle de la póliza"
|
||||
If CveIE > 0 Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Total, "", CveConceptoCargo, Obs, Fecha, 0, -1, CveIE, CvePersonal:=DdlNominaPersonal.SelectedValue.ToEntero, ImporteMX:=Total) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Total, "", CveConceptoAbono, Obs, Fecha, 0, -1, CveIE, CvePersonal:=DdlNominaPersonal.SelectedValue.ToEntero, ImporteMX:=Total) Then
|
||||
MsgError = "no se pudo insertar el detalle de la póliza 2"
|
||||
End If
|
||||
|
||||
ObjIE.UpdateIEPrePoliza(Fecha, objAC.Folio.ToString, IDPoliza, CvePrePoliza, CveIE, -1)
|
||||
Else
|
||||
TieneError = True
|
||||
MsgError = "no se pudo insertar el detalle de la póliza"
|
||||
End If
|
||||
|
||||
'Registra el movimiento total
|
||||
If Not objAC.AddMovimiento(IDPoliza, IdCtaBancaria, If(Seleccion = "3", False, True), Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
ObjIE.UpdateIEPrePoliza(Fecha, objAC.Folio.ToString, IDPoliza, CvePrePoliza, CveIE, -1)
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
'Registra el movimiento total
|
||||
If Not objAC.AddMovimiento(IDPoliza, IdCtaBancaria, If(Seleccion = "3", False, True), Total, "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -566,7 +590,6 @@ Partial Class AC_RegNomina
|
||||
Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble
|
||||
If Importe <> 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaDevolucionISPT, If(Importe > 0, False, True), Math.Abs(Importe), "", Concepto, 0, Fecha, "") Then TieneError = True
|
||||
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
@@ -4543,7 +4543,7 @@ Public Class ClsContabilidad
|
||||
Public Function UpdateCuenta(CveCuenta As Integer, Nombre As String, Tipo As String, CtaMayor As Integer, CveMoneda As Integer, Optional DigAgrupador As Integer = -1,
|
||||
Optional CveAgrupadorSAT As Integer = -1, Optional NomIdioma As String = "", Optional CveConceptoAdmin As Integer = -1, Optional CveProveedor As Integer = -1,
|
||||
Optional CveCliente As Integer = -1, Optional CveClasificacion As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1,
|
||||
Optional CveBancoCuenta As Integer = -1, Optional CveAlmacen As Integer = -1, Optional Afectable As Integer = -1) As Boolean
|
||||
Optional CveBancoCuenta As Integer = -1, Optional CveAlmacen As Integer = -1, Optional Afectable As Integer = -1, Optional Codigo As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_UpdateCuentas")
|
||||
@@ -4565,6 +4565,8 @@ Public Class ClsContabilidad
|
||||
.Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@Afectable", SqlDbType.Int).Value = Afectable
|
||||
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -1437,7 +1437,7 @@ Public Class ClsMovimientos
|
||||
Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
|
||||
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing) As Boolean
|
||||
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepRecuperacion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
@@ -6151,7 +6151,7 @@ Public Class ClsPaginas
|
||||
params.Add(New CrystalParametro("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
|
||||
Else
|
||||
params.Add(New CrystalParametro("ClienteContactoMail", Vta.Cliente.MailCotizacion))
|
||||
params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
|
||||
params.Add(New CrystalParametro("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico)))
|
||||
|
||||
End If
|
||||
|
||||
@@ -6720,7 +6720,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal))
|
||||
ElseIf Vta.CveCliente.ToEntero > 0 Then
|
||||
params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion))
|
||||
params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.TelefonoGenerico, Vta.Cliente.Telefono)))
|
||||
params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico)))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(17) Then
|
||||
|
||||
@@ -113,14 +113,14 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">Notificar</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trCuentaDeposito" runat="server" visible="false">
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
<asp:Label class="col-md-2 truncate" ID="LblObservaciones" runat="server" Style="width: 130px;" Text="Observaciones "> </asp:Label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="100%" Rows="3" TextMode="MultiLine" CssClass="form-control input-sm" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" Width="100%" Rows="3" TextMode="MultiLine" CssClass="form-control input-sm" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -140,43 +140,62 @@
|
||||
<div class="col-md-2" runat="server" id="DivFaltante">
|
||||
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante"/>
|
||||
</div>
|
||||
<div class="col-md-3" id="DivComision" style="display: none">
|
||||
<label style="width: 105px; ">Importe:</label>
|
||||
<div class="col-md-2" id="DivComision" style="display: none">
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblSubproyecto" >SubProyecto:</label>
|
||||
<div class="col-md-2" style="display: none" id="divSubProyecto">
|
||||
<div class="col-md-1" id="DivIVA" style="display: none">
|
||||
<label>IVA:</label>
|
||||
<asp:TextBox runat="server" ID="TxtIVA" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-3" style="display: none" id="divSubProyecto">
|
||||
<label class="col-md-1 truncate" style="width: 110px; display: none" id="LblSubproyecto" >SubProyecto:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblClasificacion">Clasificación:</label>
|
||||
<div class="col-md-2" style="display: none" id="divClasificacion">
|
||||
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
|
||||
<div class="col-md-4" style="display: none" id="divClasificacion">
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacion">Clasificación:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2" runat="server" id="Div1">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento"/>
|
||||
</div>
|
||||
<div class="col-md-3" id="DivDescuento" style="display: none">
|
||||
<label style="width: 105px; ">Importe:</label>
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblSubproyectoDescuento" >SubProyecto:</label>
|
||||
<div class="col-md-2" style="display: none" id="divSubProyectoDescuento">
|
||||
<div class="col-md-3" style="display: none" id="divSubProyectoDescuento">
|
||||
<label class="col-md-1 truncate" style="width: 110px; display: none" id="LblSubproyectoDescuento" >SubProyecto:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblClasificacionDescuento">Clasificación:</label>
|
||||
<div class="col-md-2" style="display: none" id="divClasificacionDescuento">
|
||||
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="display: none" id="divClasificacionDescuento">
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacionDescuento">Clasificación:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
@@ -253,6 +272,7 @@
|
||||
var comision = 0;
|
||||
var descuento = 0;
|
||||
var saldo = 0;
|
||||
var IVA = 0
|
||||
|
||||
function FnSuma(chk, cantidad) {
|
||||
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
||||
@@ -295,6 +315,26 @@
|
||||
debugger;
|
||||
} else {
|
||||
|
||||
//debugger;
|
||||
}
|
||||
}
|
||||
var txtcomision = ToDouble($('#C_TxtIVA').val());
|
||||
if (txtcomision != 0) {
|
||||
var comisionNegativa = 0;
|
||||
if (txtcomision < 0) {
|
||||
comisionNegativa = txtcomision * -1;
|
||||
}
|
||||
if (comisionNegativa > saldo) {
|
||||
$('#C_TxtIVA').val(0);
|
||||
comision = 0;
|
||||
descuento = 0;
|
||||
txtcomision = 0;
|
||||
alert("No es posible poner un importe IVA superior a lo seleccionado");
|
||||
saldo = 0;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
||||
debugger;
|
||||
} else {
|
||||
|
||||
//debugger;
|
||||
}
|
||||
}
|
||||
@@ -336,7 +376,7 @@
|
||||
$('#C_TxtComision').val(0)
|
||||
alert("No es posible poner una comision superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + comision2 + descuento;
|
||||
saldo = ValorTotalSeleccionado + comision2 + descuento + IVA;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
comision = ToDouble($('#C_TxtComision').val())
|
||||
}
|
||||
@@ -351,15 +391,33 @@
|
||||
}
|
||||
if (comisionNegativa > ValorTotalSeleccionado) {
|
||||
$('#C_TxtDescuento').val(descuento)
|
||||
alert("No es posible poner una comision superior a lo seleccionado")
|
||||
alert("No es posible poner un descuento superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + comision2 + comision;
|
||||
saldo = ValorTotalSeleccionado + comision2 + comision + IVA;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
descuento = ToDouble($('#C_TxtDescuento').val())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function txtSumaIVA(txt) {
|
||||
var comision2 = ToDouble($('#C_TxtIVA').val());
|
||||
var comisionNegativa = 0;
|
||||
if (comision2 < 0) {
|
||||
comisionNegativa = comision2 * -1;
|
||||
}
|
||||
if (comisionNegativa > ValorTotalSeleccionado) {
|
||||
$('#C_TxtIVA').val(descuento)
|
||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + descuento + comision + comision2;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
IVA = ToDouble($('#C_TxtIVA').val())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CheckFaltante(chk) {
|
||||
if (chk.checked == true) {
|
||||
$('#DivComision').css("display", "block");
|
||||
@@ -367,12 +425,16 @@
|
||||
$('#divSubProyecto').css("display", "block");
|
||||
$('#LblClasificacion').css("display", "block");
|
||||
$('#divClasificacion').css("display", "block");
|
||||
$('#DivIVA').css("display", "block");
|
||||
|
||||
} else {
|
||||
$('#DivComision').css("display", "none");
|
||||
$('#LblSubproyecto').css("display", "none");
|
||||
$('#divSubProyecto').css("display", "none");
|
||||
$('#LblClasificacion').css("display", "none");
|
||||
$('#divClasificacion').css("display", "none");
|
||||
$('#DivIVA').css("display", "none");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ Partial Class Bancos_DepositosCaja
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
|
||||
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
|
||||
TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(event);")
|
||||
|
||||
|
||||
CargaCuentas()
|
||||
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
||||
@@ -88,6 +90,7 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim TotalImportePrePoliza As Decimal
|
||||
Dim Comision As Decimal = TxtComision.Text.ToDecimal
|
||||
Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal
|
||||
Dim IVA As Decimal = TxtIVA.Text.ToDecimal
|
||||
|
||||
|
||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||
@@ -101,7 +104,7 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
TotalImportePrePoliza = TotalImporte
|
||||
If Comision <> 0 Then
|
||||
TotalImporte = TotalImporte + Comision + Descuento
|
||||
TotalImporte = TotalImporte + Comision + Descuento + IVA
|
||||
'Comision = -(Comision) ' se inverte el valor, va cargada
|
||||
'Descuento = -(Descuento) ' se inverte el valor, va cargada
|
||||
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
|
||||
@@ -162,10 +165,20 @@ Partial Class Bancos_DepositosCaja
|
||||
If ChkFaltante.Checked Then
|
||||
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
OcurrioError = True
|
||||
If Comision <> 0 Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If IVA <> 0 Then
|
||||
IVA = CDec(0.16)
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, IVA, DdlClasificacion.SelectedItem.Text, 14, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<label>Observaciones:</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static" Width="100%"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static" Width="100%"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -367,14 +367,14 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Observaciones: </label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="100%" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" Width="100%" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2 control-label">Notificar: </label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" runat="server" MaxLength="12" Width="100%" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNotificarA" runat="server" MaxLength="100" Width="100%" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Observaciones:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Observaciones:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtObservacionesPrestamo" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservacionesPrestamo" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObsPrestamo" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -241,7 +241,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Observaciones:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
<div class="col-md-2 input-icon">
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
<label>Observaciones:</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtObservacionesPrestamo" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservacionesPrestamo" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObsPrestamo" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -336,7 +336,7 @@
|
||||
<label>Observaciones:</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -114,13 +114,13 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2">Notificar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-2">Observaciones:</div>
|
||||
<div class="col-xs-10">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="100%" Rows="3" TextMode="MultiLine" ForeColor="Black"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" Width="100%" Rows="3" TextMode="MultiLine" ForeColor="Black"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="100%" Rows="3" TextMode="MultiLine" ForeColor="Black"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" Width="100%" Rows="3" TextMode="MultiLine" ForeColor="Black"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Observaciones:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtObservacionesPrestamo" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservacionesPrestamo" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObsPrestamo" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -226,7 +226,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Observaciones:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Observaciones:</label>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
<div class="col-md-2 input-icon">
|
||||
|
||||
@@ -250,14 +250,14 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 control-label">Observaciones: </label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="100%" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" Width="100%" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2 control-label">Notificar: </label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" runat="server" MaxLength="12" Width="100%" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNotificarA" runat="server" MaxLength="100" Width="100%" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" CssClass="form-control input-sm" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" CssClass="form-control input-sm" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
</div>
|
||||
<label class="col-md-1">Observaciones:</label>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3944,7 +3944,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8" style="width: 100%; text-align: left">
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="97%" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Width="97%" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
@@ -136,10 +136,15 @@
|
||||
if (document.getElementById("hdnEsThickbox").value == "S") {
|
||||
parent.CargaProveedor(c);
|
||||
parent.tb_remove();
|
||||
window.close();
|
||||
parent.$('#ajax').modal('hide');
|
||||
|
||||
}
|
||||
else {
|
||||
window.opener.CargaProveedor(c);
|
||||
window.close();
|
||||
parent.$('#ajax').modal('hide');
|
||||
|
||||
}
|
||||
}
|
||||
function IrOI(c) {
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
<tr style="background-color: #DAEAFA;">
|
||||
<td>Observaciones</td>
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones</label>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
@@ -82,11 +81,7 @@
|
||||
<asp:LinkButton ID="LnkComprobante" runat="server" Visible="false" data-toggle="modal" data-target="#ModalUpload" Style="color: #686868;"><i class="fa fa-upload" style="color:#686868;"></i> Cargar Comprobante</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkComprobante" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
@@ -147,7 +142,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Movimiento:</label>
|
||||
@@ -162,7 +157,7 @@
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2">Notificar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -624,7 +619,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1870,6 +1870,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Catch ex As Exception
|
||||
Alert("Error al descargar el paquete", TipoMensaje.MsgError)
|
||||
End Try
|
||||
ObjCompra.Dispose()
|
||||
ObjIE.Dispose()
|
||||
End Sub
|
||||
Private Function ImprimirPolizaPDF(IdPoliza As Integer) As String
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
@@ -1982,6 +1984,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Response.Flush() ' send it to the client to download
|
||||
HttpContext.Current.Response.SuppressContent = True
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||
Response.End()
|
||||
|
||||
End If
|
||||
result = True
|
||||
@@ -2324,30 +2327,26 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim Path As String
|
||||
Dim dt As DataTable = DtMovimientos.FiltraParametros("", "", filtro)
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim TieneComprobante As Boolean = True
|
||||
Dim TieneComprobante As Boolean = False
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
|
||||
If TieneComprobante Then
|
||||
If Row("CveConceptoContable").ToString.ToEntero = 30 Then
|
||||
If Row("CveIE").ToString.ToEntero > 0 Then
|
||||
If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
TieneComprobante = True
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
TieneComprobante = True
|
||||
Exit For
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
ObjIE.Dispose()
|
||||
Return TieneComprobante
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="far fa-file-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
@@ -79,12 +78,7 @@
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkComprobante" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
@@ -151,7 +145,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Movimiento:</label>
|
||||
@@ -165,7 +159,7 @@
|
||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||
<label class="col-md-2">Notificar:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="100" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
||||
@@ -669,7 +663,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -201,6 +201,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
Tick = DateTime.Now.Ticks.ToString
|
||||
|
||||
CveMoneda = 1
|
||||
ViewState("CvePrePoliza") = 0
|
||||
ViewState("CvePeriodo") = "0"
|
||||
@@ -434,11 +436,14 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If dr("FolioPoliza").ToString.ToEntero > 0 Then
|
||||
divContabilizada.Visible = True
|
||||
LblFolio.Text = dr("FolioPoliza").ToString
|
||||
Folio = dr("FolioPoliza").ToString
|
||||
|
||||
End If
|
||||
Else
|
||||
If dr("IdPoliza").ToString.ToEntero > 0 Then
|
||||
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
|
||||
divContabilizada.Visible = True
|
||||
IdPoliza = dr("IdPoliza").ToString.ToEntero
|
||||
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
|
||||
'sino está contabilizada, se activa el botón
|
||||
BtnContabilizar.Visible = True
|
||||
@@ -515,7 +520,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If CveConceptoContable.Contiene(30) Then
|
||||
LnkImprimirPDF.Visible = True
|
||||
LnkComprobante.Visible = True
|
||||
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
|
||||
End If
|
||||
|
||||
@@ -2002,23 +2006,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
#Region "Paquete Egresos"
|
||||
Protected Sub LnkImprimirPDF_Click(sender As Object, e As EventArgs)
|
||||
Dim Pathpdf As New List(Of String)
|
||||
Dim Path As String
|
||||
Try
|
||||
|
||||
Path = ImprimirPolizaPDF(IdPoliza)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
|
||||
MergePdfFiles(Pathpdf.ToArray)
|
||||
If File.Exists(Path) Then
|
||||
Directory.Delete(String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Error al descargar la poliza", TipoMensaje.MsgError)
|
||||
End Try
|
||||
ImprimirPolizaPDF(IdPoliza)
|
||||
End Sub
|
||||
Private Function ImprimirPolizaPDF(IdPoliza As Integer) As String
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
@@ -2054,93 +2042,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
ruta = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||
End If
|
||||
Bytes = StreamPDF(ruta, dtVC, params, "ppoliza")
|
||||
If Not File.Exists(String.Format("{0}{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)) Then
|
||||
DirectoryExistsCreate(String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, Tick))
|
||||
File.WriteAllBytes(String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString), Bytes)
|
||||
End If
|
||||
ImprimirbytesPDF(StreamPDF(ruta, dtVC, params, "ppoliza"), String.Format("{0}-{1}", TipoPoliza, dr("FolioPoliza").ToString), "PDF", True)
|
||||
|
||||
End If
|
||||
Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Function
|
||||
Private Sub MergePdfFiles(ByVal pdfFiles() As String)
|
||||
Dim result As Boolean = False
|
||||
Dim pdfCount As Integer = 0
|
||||
Dim f As Integer = 0
|
||||
Dim fileName As String
|
||||
Dim reader As iTextSharp.text.pdf.PdfReader = Nothing
|
||||
Dim pageCount As Integer = 0
|
||||
Dim pdfDoc As iTextSharp.text.Document = Nothing
|
||||
Dim writer As PdfWriter = Nothing
|
||||
Dim cb As PdfContentByte = Nothing
|
||||
|
||||
Dim page As PdfImportedPage = Nothing
|
||||
Dim rotation As Integer = 0
|
||||
|
||||
|
||||
Try
|
||||
pdfCount = pdfFiles.Length
|
||||
If pdfCount > 0 Then
|
||||
fileName = pdfFiles(f)
|
||||
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
||||
pageCount = reader.NumberOfPages
|
||||
pdfDoc = New iTextSharp.text.Document(reader.GetPageSizeWithRotation(1), 18, 18, 18, 18)
|
||||
writer = PdfWriter.GetInstance(pdfDoc, New FileStream(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio), FileMode.Create))
|
||||
|
||||
With pdfDoc
|
||||
.Open()
|
||||
End With
|
||||
cb = writer.DirectContent
|
||||
While f < pdfCount
|
||||
Dim i As Integer = 0
|
||||
While i < pageCount
|
||||
i += 1
|
||||
pdfDoc.SetPageSize(reader.GetPageSizeWithRotation(i))
|
||||
pdfDoc.NewPage()
|
||||
page = writer.GetImportedPage(reader, i)
|
||||
rotation = reader.GetPageRotation(i)
|
||||
If rotation = 90 Then
|
||||
cb.AddTemplate(page, 0, -1.0F, 1.0F, 0, 0, reader.GetPageSizeWithRotation(i).Height)
|
||||
ElseIf rotation = 270 Then
|
||||
cb.AddTemplate(page, 0, 1.0F, -1.0F, 0, reader.GetPageSizeWithRotation(i).Width + 60, -30)
|
||||
Else
|
||||
cb.AddTemplate(page, 1.0F, 0, 0, 1.0F, 0, 0)
|
||||
End If
|
||||
End While
|
||||
f += 1
|
||||
If f < pdfCount Then
|
||||
fileName = pdfFiles(f)
|
||||
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
||||
pageCount = reader.NumberOfPages
|
||||
End If
|
||||
End While
|
||||
|
||||
|
||||
pdfDoc.Close()
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio))
|
||||
|
||||
If Archivo.Exists Then
|
||||
HttpContext.Current.Response.Clear()
|
||||
HttpContext.Current.Response.ClearContent()
|
||||
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
HttpContext.Current.Response.TransmitFile(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio))
|
||||
Response.Flush() ' send it to the client to download
|
||||
HttpContext.Current.Response.SuppressContent = True
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||
|
||||
End If
|
||||
result = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -304,7 +304,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
|
||||
End If
|
||||
|
||||
|
||||
TxtCuenta.Enabled = True
|
||||
Guardar.Visible = True
|
||||
updatos.Visible = True
|
||||
updatos.Update()
|
||||
@@ -330,7 +330,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero,
|
||||
TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin,
|
||||
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen) Then
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", "")) Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
@@ -658,10 +658,10 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Case 3
|
||||
pnlOpcion2.Visible = True
|
||||
pnlOpcion3.Visible = True
|
||||
If DdlClasificacion.Items.Count < 2 Then
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
End If
|
||||
'If DdlClasificacion.Items.Count < 2 Then
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
'End If
|
||||
Case 4
|
||||
pnlOpcion4.Visible = True
|
||||
Case 5
|
||||
|
||||
@@ -1946,7 +1946,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=iif(Parameters!ClienteContactoMail.Value = "","","Teléfono: ")</Value>
|
||||
<Value>=iif(Parameters!ClienteTelefono.Value = "","","Teléfono: ")</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -3927,6 +3927,97 @@
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
<Textbox Name="Textbox74">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha Impresión:</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Globals!ExecutionTime</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>g</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.00882cm</Top>
|
||||
<Left>0.12568cm</Left>
|
||||
<Height>0.46771cm</Height>
|
||||
<Width>6.86562cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox75">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Usuario Imprimio:</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!UsuarioImprimio.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>g</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.01927cm</Top>
|
||||
<Left>9.07541cm</Left>
|
||||
<Height>0.46771cm</Height>
|
||||
<Width>6.86562cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox48">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -3948,55 +4039,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox35</rd:DefaultName>
|
||||
<Top>0.01763cm</Top>
|
||||
<Left>18.52109cm</Left>
|
||||
<Top>0.00882cm</Top>
|
||||
<Left>18.54098cm</Left>
|
||||
<Height>0.50624cm</Height>
|
||||
<Width>2.5cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox74">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha Impresión:</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Now.ToString("dd/MM/yyyy hh:mm tt")</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.01763cm</Top>
|
||||
<Left>0.1715cm</Left>
|
||||
<Height>0.46771cm</Height>
|
||||
<Width>6.86562cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -4634,6 +4681,7 @@
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="ID2">
|
||||
<MIMEType>image/png</MIMEType>
|
||||
|
||||
@@ -1297,7 +1297,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>7.37059cm</Top>
|
||||
<Top>7.18009cm</Top>
|
||||
<Left>0.28014cm</Left>
|
||||
<Height>0.05496cm</Height>
|
||||
<Width>20.88652cm</Width>
|
||||
@@ -1313,67 +1313,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Observaciones.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=iif(CDbl(Parameters!Kilometraje.Value) < 0, "","Kilometraje: "& Parameters!Kilometraje.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>7.46082cm</Top>
|
||||
<Left>2.01402cm</Left>
|
||||
<Height>0.51608cm</Height>
|
||||
<Width>19.15264cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox4">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -1421,7 +1360,7 @@
|
||||
<Left>4.32565cm</Left>
|
||||
<Height>2.70968cm</Height>
|
||||
<Width>7.93893cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1501,7 +1440,7 @@
|
||||
<Left>12.68838cm</Left>
|
||||
<Height>2.70968cm</Height>
|
||||
<Width>5.11312cm</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1535,7 +1474,7 @@
|
||||
<Left>18.23008cm</Left>
|
||||
<Height>0.96018cm</Height>
|
||||
<Width>2.79101cm</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
@@ -1571,7 +1510,7 @@
|
||||
<Left>18.23008cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.79101cm</Width>
|
||||
<ZIndex>7</ZIndex>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
@@ -1622,7 +1561,7 @@
|
||||
<Left>18.23008cm</Left>
|
||||
<Height>0.86903cm</Height>
|
||||
<Width>2.79101cm</Width>
|
||||
<ZIndex>8</ZIndex>
|
||||
<ZIndex>7</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
@@ -1713,7 +1652,7 @@
|
||||
<Left>0.28014cm</Left>
|
||||
<Height>1.09007cm</Height>
|
||||
<Width>9.71199cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<ZIndex>8</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1793,7 +1732,7 @@
|
||||
<Left>10.06268cm</Left>
|
||||
<Height>0.7927cm</Height>
|
||||
<Width>9.71199cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1905,7 +1844,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=iif(Parameters!ClienteContactoMail.Value = "","","Teléfono: ")</Value>
|
||||
<Value>=iif(Parameters!ClienteTelefono.Value = "","","Teléfono: ")</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -1974,7 +1913,7 @@
|
||||
<Left>0.25136cm</Left>
|
||||
<Height>0.74611cm</Height>
|
||||
<Width>13.82025cm</Width>
|
||||
<ZIndex>11</ZIndex>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2007,7 +1946,7 @@
|
||||
<Left>14.07729cm</Left>
|
||||
<Height>0.57354cm</Height>
|
||||
<Width>2.90753cm</Width>
|
||||
<ZIndex>12</ZIndex>
|
||||
<ZIndex>11</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2045,7 +1984,7 @@
|
||||
<Left>1.74571cm</Left>
|
||||
<Height>1.05328cm</Height>
|
||||
<Width>17.71415cm</Width>
|
||||
<ZIndex>13</ZIndex>
|
||||
<ZIndex>12</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true)</Hidden>
|
||||
</Visibility>
|
||||
@@ -2184,7 +2123,7 @@
|
||||
<Left>0.22108cm</Left>
|
||||
<Height>2.03224cm</Height>
|
||||
<Width>20.79751cm</Width>
|
||||
<ZIndex>14</ZIndex>
|
||||
<ZIndex>13</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2214,7 +2153,7 @@
|
||||
<Left>0.24983cm</Left>
|
||||
<Height>0.05496cm</Height>
|
||||
<Width>20.88652cm</Width>
|
||||
<ZIndex>15</ZIndex>
|
||||
<ZIndex>14</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2268,7 +2207,7 @@
|
||||
<Left>17.09066cm</Left>
|
||||
<Height>0.64028cm</Height>
|
||||
<Width>3.90165cm</Width>
|
||||
<ZIndex>16</ZIndex>
|
||||
<ZIndex>15</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2435,7 +2374,7 @@
|
||||
<Left>0.16383cm</Left>
|
||||
<Height>2.44366cm</Height>
|
||||
<Width>15.5106cm</Width>
|
||||
<ZIndex>17</ZIndex>
|
||||
<ZIndex>16</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2470,7 +2409,7 @@
|
||||
<Left>6.21617in</Left>
|
||||
<Height>0.17708in</Height>
|
||||
<Width>0.94607in</Width>
|
||||
<ZIndex>18</ZIndex>
|
||||
<ZIndex>17</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2505,7 +2444,7 @@
|
||||
<Left>6.21616in</Left>
|
||||
<Height>0.17966in</Height>
|
||||
<Width>0.94607in</Width>
|
||||
<ZIndex>19</ZIndex>
|
||||
<ZIndex>18</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2540,7 +2479,7 @@
|
||||
<Left>6.21616in</Left>
|
||||
<Height>0.18819in</Height>
|
||||
<Width>0.94607in</Width>
|
||||
<ZIndex>20</ZIndex>
|
||||
<ZIndex>19</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2575,7 +2514,7 @@
|
||||
<Left>6.22658in</Left>
|
||||
<Height>0.17119in</Height>
|
||||
<Width>0.94607in</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<ZIndex>20</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2611,7 +2550,7 @@
|
||||
<Left>6.237in</Left>
|
||||
<Height>0.19596in</Height>
|
||||
<Width>0.94607in</Width>
|
||||
<ZIndex>22</ZIndex>
|
||||
<ZIndex>21</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2647,7 +2586,7 @@
|
||||
<Left>7.16224in</Left>
|
||||
<Height>0.17708in</Height>
|
||||
<Width>0.98426in</Width>
|
||||
<ZIndex>23</ZIndex>
|
||||
<ZIndex>22</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2682,7 +2621,7 @@
|
||||
<Left>7.16224in</Left>
|
||||
<Height>0.17966in</Height>
|
||||
<Width>0.98425in</Width>
|
||||
<ZIndex>24</ZIndex>
|
||||
<ZIndex>23</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2717,7 +2656,7 @@
|
||||
<Left>7.17266in</Left>
|
||||
<Height>0.18819in</Height>
|
||||
<Width>0.98425in</Width>
|
||||
<ZIndex>25</ZIndex>
|
||||
<ZIndex>24</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2753,7 +2692,7 @@
|
||||
<Left>7.17266in</Left>
|
||||
<Height>0.17119in</Height>
|
||||
<Width>0.98425in</Width>
|
||||
<ZIndex>26</ZIndex>
|
||||
<ZIndex>25</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2789,7 +2728,7 @@
|
||||
<Left>7.18308in</Left>
|
||||
<Height>0.19596in</Height>
|
||||
<Width>0.98425in</Width>
|
||||
<ZIndex>27</ZIndex>
|
||||
<ZIndex>26</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2819,7 +2758,7 @@
|
||||
<Left>0.10579cm</Left>
|
||||
<Height>0.05496cm</Height>
|
||||
<Width>20.88652cm</Width>
|
||||
<ZIndex>28</ZIndex>
|
||||
<ZIndex>27</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2858,7 +2797,7 @@
|
||||
<Left>0.19008cm</Left>
|
||||
<Height>0.40655cm</Height>
|
||||
<Width>12.88812cm</Width>
|
||||
<ZIndex>29</ZIndex>
|
||||
<ZIndex>28</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2877,13 +2816,118 @@
|
||||
<Left>1.15361cm</Left>
|
||||
<Height>2.413cm</Height>
|
||||
<Width>2.75323cm</Width>
|
||||
<ZIndex>30</ZIndex>
|
||||
<ZIndex>29</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Image>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Observaciones.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=iif(Parameters!Kilometraje.Value = "-1", "","Kilometraje: "& Parameters!Kilometraje.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate)</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>7.20863cm</Top>
|
||||
<Left>1.16095cm</Left>
|
||||
<Height>0.62233cm</Height>
|
||||
<Width>9.17089cm</Width>
|
||||
<ZIndex>30</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox27">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Acepto ajuste </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>12pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>_______________________</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>12pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>7.38663cm</Top>
|
||||
<Left>10.47295cm</Left>
|
||||
<Height>0.64039cm</Height>
|
||||
<Width>9.53276cm</Width>
|
||||
<ZIndex>31</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF((Sum(IIF(UCase(Fields!Clasificacion.Value) = "AJUSTE" , 1, 0), "DsOC") > 0),false,true)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>19.04565cm</Height>
|
||||
<Style />
|
||||
|
||||
6226
Empresas/159/Formatos/Factura.rdlc
Normal file
6226
Empresas/159/Formatos/Factura.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
6225
Empresas/160/Formatos/Factura.rdlc
Normal file
6225
Empresas/160/Formatos/Factura.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
6226
Empresas/161/Formatos/Factura.rdlc
Normal file
6226
Empresas/161/Formatos/Factura.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
6226
Empresas/162/Formatos/Factura.rdlc
Normal file
6226
Empresas/162/Formatos/Factura.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
6225
Empresas/163/Formatos/Factura.rdlc
Normal file
6225
Empresas/163/Formatos/Factura.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -369,15 +369,19 @@ Partial Class Inventarios_Kardex
|
||||
Private Sub Imprimir(Optional reporte As String = "PDF")
|
||||
|
||||
Dim DtKardex As DataTable = Nothing
|
||||
DtKardex = CargarKardex(ddlProducto2.SelectedValue.ToEntero)
|
||||
If (Not IsNothing(DtKardex)) Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
If IO.File.Exists(String.Format("{0}/Formatos/Kardex.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/Kardex.rdlc", UsuarioActual.CveEmpresa), DtKardex, params, "ReporteKardex", reporte)
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Kardex.rdlc", DtKardex, params, "Reporte Kardex", reporte)
|
||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
DtKardex = CargarKardex(ddlProducto2.SelectedValue.ToEntero)
|
||||
If (Not IsNothing(DtKardex)) Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
If IO.File.Exists(String.Format("{0}/Formatos/Kardex.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/Kardex.rdlc", UsuarioActual.CveEmpresa), DtKardex, params, "ReporteKardex", reporte)
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Kardex.rdlc", DtKardex, params, "Reporte Kardex", reporte)
|
||||
End If
|
||||
DtKardex.Dispose()
|
||||
End If
|
||||
DtKardex.Dispose()
|
||||
Else
|
||||
Alert("No hay informacion cargada", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -385,61 +389,65 @@ Partial Class Inventarios_Kardex
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
Dim Movimientos As New ClsInventarios
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim Movimientos As New ClsInventarios
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
|
||||
Dim Almacen = If(ddlAlmacen.SelectedValue = "-1", "", $" <b>Almacén:</b> {ddlAlmacen.SelectedItem.Text}")
|
||||
Dim UM = If(DdlUnidadMedida.SelectedValue = "-1", "", $" <b>Unidad de Medida:</b> {DdlUnidadMedida.SelectedItem.Text}")
|
||||
Dim FechaIn As String = If(TxtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {TxtFechaI.Text}")
|
||||
Dim FechaFn As String = If(TxtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {TxtFechaF.Text}")
|
||||
Dim EntradaSalida As String = ""
|
||||
Dim Almacen = If(ddlAlmacen.SelectedValue = "-1", "", $" <b>Almacén:</b> {ddlAlmacen.SelectedItem.Text}")
|
||||
Dim UM = If(DdlUnidadMedida.SelectedValue = "-1", "", $" <b>Unidad de Medida:</b> {DdlUnidadMedida.SelectedItem.Text}")
|
||||
Dim FechaIn As String = If(TxtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {TxtFechaI.Text}")
|
||||
Dim FechaFn As String = If(TxtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {TxtFechaF.Text}")
|
||||
Dim EntradaSalida As String = ""
|
||||
|
||||
If cbEntrada.Checked And cbSalida.Checked Then
|
||||
EntradaSalida = " Entradas y Salidas"
|
||||
ElseIf cbEntrada.Checked And cbSalida.Checked = False Then
|
||||
EntradaSalida = " Solo Entradas"
|
||||
ElseIf cbEntrada.Checked = False And cbSalida.Checked Then
|
||||
EntradaSalida = " Solo Salidas"
|
||||
End If
|
||||
If cbEntrada.Checked And cbSalida.Checked Then
|
||||
EntradaSalida = " Entradas y Salidas"
|
||||
ElseIf cbEntrada.Checked And cbSalida.Checked = False Then
|
||||
EntradaSalida = " Solo Entradas"
|
||||
ElseIf cbEntrada.Checked = False And cbSalida.Checked Then
|
||||
EntradaSalida = " Solo Salidas"
|
||||
End If
|
||||
|
||||
Dim CveTiposAlmacen = ""
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
Next
|
||||
Dim CveTiposAlmacen = ""
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
Next
|
||||
|
||||
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
||||
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
||||
|
||||
Dim SerieAgrupado As String = If(TxtSerie.Text = "", "", $"<b>Existencia y costos calculada por numero de serie:</b> {TxtSerie.Text} ")
|
||||
Dim SerieAgrupado As String = If(TxtSerie.Text = "", "", $"<b>Existencia y costos calculada por numero de serie:</b> {TxtSerie.Text} ")
|
||||
|
||||
If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then
|
||||
If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim dt As DataTable = Movimientos.DtResultados
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Producto", ddlProducto2.SelectedText))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {SerieAgrupado}{EntradaSalida}{Almacen}{UM}{FechaIn}{FechaFn}"))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim dt As DataTable = Movimientos.DtResultados
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Producto", ddlProducto2.SelectedText))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {SerieAgrupado}{EntradaSalida}{Almacen}{UM}{FechaIn}{FechaFn}"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepKardex.rdlc", dt, params, "ReporteKardex", Formato)
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepKardex.rdlc", dt, params, "ReporteKardex", Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Debes seleccionar un Producto/Servicio", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -450,7 +458,7 @@ Partial Class Inventarios_Kardex
|
||||
Protected Sub LnkEditarFecha_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
CveMovimiento = gvRow.DataKey("CveMovimiento").ToEntero
|
||||
TxtFecha.Text = gvRow.DataKey("FechaMovto").ToDateTime.ToString("yyyy-MM-ddTHH:mm")
|
||||
TxtFecha.Text = gvRow.DataKey("FechaMovto").ToDateTime.ToString("yyyy-MM-ddTHH: mm")
|
||||
RegistraScript("$('#DModalEditarFecha').modal()")
|
||||
UpModalEditarFecha.Update()
|
||||
End Sub
|
||||
|
||||
@@ -173,8 +173,6 @@
|
||||
|
||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
@@ -185,28 +183,39 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpFecha" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align: center;">
|
||||
<asp:TextBox ID="txtFechaActualizar" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></asp:TextBox>
|
||||
<div class="col-md-4"> </div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright" style="padding-left: 0px !important;">
|
||||
<div class="input-group input-sm dater" data-date-format="dd/mm/yyyy" style="width: 50%;">
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="btnFechaActualizar" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<asp:TextBox ID="txtFechaActualizar" ClientIDMode="Static" runat="server" Width="100%" CssClass="form-control input-sm" CausesValidation="true" MaxLength="18"></asp:TextBox>
|
||||
<label style=" padding-bottom: 30px; width: 70%;" for="<%= txtFechaActualizar.ClientID.ToString()%>">Fecha:</label>
|
||||
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicioAdd" Display="None" CssClass="help-block errorimput" runat="server" ControlToValidate="txtFechaActualizar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR</span></b>:<br>El campo <b>''Fecha''</b> es necesario." ValidationGroup="Actualiza"></asp:RequiredFieldValidator>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaActualiar" runat="server" TargetControlID="txtFechaActualizar" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaActualiar" TargetControlID="txtFechaActualizar" PopupButtonID="btnFechaActualizar" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaActualiar" runat="server" ControlToValidate="txtFechaActualizar" Display="None" ErrorMessage="La fecha no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Actualiza"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaActualiar" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaActualiar" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
<%-- <div class="col-md-2" runat="server" style="margin-top: 3px;width:130px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="txtFechaActualizar" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="btnFechaActualizar" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
|
||||
</span>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaActualiar" runat="server" TargetControlID="txtFechaActualizar" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaActualiar" TargetControlID="txtFechaActualizar" PopupButtonID="btnFechaActualizar" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaActualiar" runat="server" ControlToValidate="txtFechaActualizar" Display="None" ErrorMessage="La fecha no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Actualiza"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaActualiar" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaActualiar" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: center;">
|
||||
<asp:TextBox ID="txtFechaActualizarFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 80px;"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="btnFechaActualizarFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaActualiarFin" runat="server" TargetControlID="txtFechaActualizarFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaActualiarFin" TargetControlID="txtFechaActualizarFin" PopupButtonID="btnFechaActualizarFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaActualiarFin" runat="server" ControlToValidate="txtFechaActualizarFin" Display="None" ErrorMessage="La fecha no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Actualiza"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaActualiarFin" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaActualiarFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -226,6 +235,13 @@
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('#C_datetimepicker').datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'd.m.Y'
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -158,6 +158,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
GvSolicitudes.Columns[0].Visible = true;
|
||||
LnkGuardar.Visible = true;
|
||||
LnkCambiarFecha.Visible = false;
|
||||
|
||||
UPAcciones.Update();
|
||||
UPDatos.Update();
|
||||
}
|
||||
@@ -184,7 +185,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
if (Gvr.FCCheckBox("ChkOrdenCompra").Checked)
|
||||
{
|
||||
FechaInicio = txtFechaActualizar.Text.ToDateTime();
|
||||
FechaFin = txtFechaActualizarFin.Text.ToDateTime();
|
||||
FechaFin = txtFechaActualizar.Text.ToDateTime();
|
||||
CveEvento = Gvr.DataKey("CveEvento").ToEntero();
|
||||
if (ObjEvento.UpdateEvento("-1", "-1", -1, -1, -1, FechaInicio, FechaFin, -1, "-1", CveEvento))
|
||||
{
|
||||
|
||||
@@ -565,8 +565,8 @@ function CargaPickers() {
|
||||
TThis.datetimepicker({
|
||||
dayOfWeekStart: 1,
|
||||
lang: 'es',
|
||||
format: 'd/m/Y H:i',
|
||||
formatDate: 'd/m/Y H:i',
|
||||
format: 'd/m/Y',
|
||||
formatDate: 'd/m/Y',
|
||||
step: 30
|
||||
});
|
||||
if (datetimeButton && datetimeButton.length) {
|
||||
|
||||
@@ -348,25 +348,6 @@ Partial Class Sistemas_PopUpAddUsuario
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each Row As GridViewRow In GvModulosApp.Rows
|
||||
If Row.DataKey("CveProcesoAcceso") <> "" Then
|
||||
'checo si el permiso que tiene es del rol, de ser así, nada más actualizo los denegados
|
||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'permisos que el rol, no le está otorgando, y serán únicos para el usuario
|
||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
|
||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Row.FCCheckBox("ChkPermitir").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
ElseIf CveUsuario > 0 Then
|
||||
|
||||
@@ -994,7 +994,7 @@ Partial Class Clientes
|
||||
|
||||
Private Sub CargaResponsables()
|
||||
Dim Dt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("True", "Nombre")
|
||||
DdlResponsable.DataSource = Dt.FiltraParametros("", "", {"CveUsuario", "Nombre"})
|
||||
DdlResponsable.DataSource = Dt.FiltraParametros("Estatus = 1", "", {"CveUsuario", "Nombre"})
|
||||
DdlResponsable.DataBind()
|
||||
DdlResponsable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones</label>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
<div class="col-md-2 input-icon">
|
||||
|
||||
@@ -231,6 +231,10 @@
|
||||
<asp:LinkButton ID="LBNotaCredito" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Nota de Crédito"
|
||||
data-toggle="modal" data-target="#ModalAplicarNC" Visible="false" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAplicarRNCDevolucion" runat="server" Visible="false" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar RNC por devolución"
|
||||
OnClick="LnkAplicarRNCDevolucion_Click" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAplicaDevolucion" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Devolución"
|
||||
data-toggle="modal" data-target="#DivAplicaDevolucion" Visible="false" />
|
||||
@@ -6749,6 +6753,83 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<%--APLICAR REMISIONES DE NC DE DEVOLUCION--%>
|
||||
<div id="ModalAplicaRNCDevolucion" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpRNCDevolucion" class="modal-dialog rowpadding modal-lg" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Aplicar Remisiones de Nota de Crédito</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Devoluciones</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||
<div class="row" style="margin-right: 10px;" align="right">
|
||||
<input type="text" id="TxtBusquedaRNCDev" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaRNCDev','{0}')", GvRNCDevoluciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaRNCDev','{0}')", GvRNCDevoluciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="max-height: 440px; overflow: auto">
|
||||
<asp:GridView ID="GvRNCDevoluciones" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCCargo" runat="server" Width="75px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:Button Text="Aplicar Remisiones" ID="BtnAplicarRNCDevoluciones" OnClick="BtnAplicarRNCDevoluciones_Click" CssClass="btn btn-primary" runat="server" ValidationGroup="VGAplicarRNC" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="ModalSaldarVenta" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpSaldarVenta" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -8932,23 +9013,23 @@
|
||||
function showDivAgregarSucursal() {
|
||||
|
||||
$('#<%= TxtNombreSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtDireccionSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtNumExtSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtNumIntSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtCPSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtColoniaSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtTelefonoSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtCiudadSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtLocalidadSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtEstadoSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtPaisSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtCorreoSucursal.ClientID %>').val('');
|
||||
$('#divAgregarSucursal').modal();
|
||||
}
|
||||
$('#<%= TxtDireccionSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtNumExtSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtNumIntSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtCPSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtColoniaSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtTelefonoSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtCiudadSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtLocalidadSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtEstadoSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtPaisSucursal.ClientID %>').val('');
|
||||
$('#<%= TxtCorreoSucursal.ClientID %>').val('');
|
||||
$('#divAgregarSucursal').modal();
|
||||
}
|
||||
|
||||
function hideDivAgregarSucursal() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
function hideDivAgregarSucursal() {
|
||||
$('#divAgregarSucursal').modal('hide');
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -9403,6 +9403,15 @@ Partial Class Ventas
|
||||
ObjFactura.CveVentaPadre = DtVentasNC.Rows(0)("CveVenta").ToString().ToEntero()
|
||||
ObjFactura.SerieFolioPadre = DtVentasNC.Rows(0)("FolioFiscal").ToString()
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Dev" AndAlso ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
||||
Dim ObjRNC = ListaRemisionesNC.FirstOrDefault
|
||||
If ObjRNC IsNot Nothing Then
|
||||
ObjFactura.CveVentaPadre = ObjRNC.CveVentaPadre
|
||||
ObjFactura.SerieFolioPadre = ObjRNC.SerieFolioPadre
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero()
|
||||
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||
DdlVendedor.Enabled = False
|
||||
@@ -24798,6 +24807,11 @@ Partial Class Ventas
|
||||
AplicaNCMasiva = False
|
||||
AplicaNC = False
|
||||
LBNotaCredito.Visible = True
|
||||
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LnkAplicarRNCDevolucion.Visible = True
|
||||
End If
|
||||
|
||||
'LkNotaCredito.Visible = False
|
||||
|
||||
TxtNCPorcentaje.Attributes.Add("onkeyup", "CalculaImporteNC();")
|
||||
@@ -24848,6 +24862,9 @@ Partial Class Ventas
|
||||
|
||||
AplicaNCMasiva = True
|
||||
LBNotaCredito.Visible = True
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LnkAplicarRNCDevolucion.Visible = True
|
||||
End If
|
||||
'LkNotaCredito.Visible = False
|
||||
DivGvCxC.Visible = True
|
||||
CargaCxC()
|
||||
@@ -25391,6 +25408,12 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvRNCDevoluciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRNCDevoluciones.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCBonChkDesc({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCBonChkDesc({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDescNCBonificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCBonificaciones.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -25516,26 +25539,31 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False)
|
||||
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False, Optional TipoDoctoNC As String = "Egs")
|
||||
|
||||
Try
|
||||
Me.AplicaDocumentoNuevoNC = AplicaNuevoDocumento
|
||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del producto. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
Else
|
||||
'VALIDA CLAVES SAT
|
||||
If DrPS("SATClavePS").ToString() = "" Then
|
||||
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con producto SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If DrPS("SATClaveUnidadMedida").ToString() = "" Then
|
||||
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con Unidad Medida SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
Dim DrPS As DataRow = Nothing
|
||||
|
||||
If CvePS > 0 AndAlso TipoDoctoNC = "Egs" Then
|
||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información del producto. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
Else
|
||||
'VALIDA CLAVES SAT
|
||||
If DrPS("SATClavePS").ToString() = "" Then
|
||||
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con producto SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If DrPS("SATClaveUnidadMedida").ToString() = "" Then
|
||||
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con Unidad Medida SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not AplicaImpuestosLocales Then
|
||||
If TmpDTImpuestos IsNot Nothing Then
|
||||
TmpDTImpuestos.Rows.Clear()
|
||||
@@ -25737,7 +25765,7 @@ Partial Class Ventas
|
||||
Else
|
||||
If DdlTipoComprobante.SelectedValue = "Ant" Then CveAnticipo = CveVenta
|
||||
|
||||
DdlTipoComprobante.SelectedValueExist("Egs")
|
||||
DdlTipoComprobante.SelectedValueExist(TipoDoctoNC)
|
||||
'verifica el total de multiples facturas
|
||||
Dim Acumulado12 As Decimal = 0
|
||||
Dim UltimoRenglon As Integer = 1
|
||||
@@ -25768,7 +25796,10 @@ Partial Class Ventas
|
||||
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||
End If
|
||||
|
||||
ElseIf TipoDoctoNC = "Dev" Then
|
||||
CrearDTNCDevolucion(ListaRemisionesNC, TmpDT, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||
Else
|
||||
|
||||
For Each Dr As DataRow In DtImpuestos.Rows
|
||||
Acumulado12 += Dr("ImportePU").ToString().ToDecimal.RoundSQL + Dr("ImporteIVA").ToString().ToDecimal.RoundSQL + Dr("ImporteIEPS").ToString().ToDecimal
|
||||
If UltimoRenglon = DtImpuestos.Rows.Count Then
|
||||
@@ -25795,7 +25826,16 @@ Partial Class Ventas
|
||||
CalculaTotalesVenta(RecalculaImpuestosLocales:=AplicaImpuestosLocales)
|
||||
|
||||
TrTipoRelacion.Visible = True
|
||||
DdlTiposRelacion.SelectedValueExist("1")
|
||||
If TipoDoctoNC = "Egs" Then
|
||||
DdlTiposRelacion.SelectedValueExist("1")
|
||||
ElseIf TipoDoctoNC = "Dev" Then
|
||||
If DdlTipoComprobante.Items.FindByValue("Dev") Is Nothing Then
|
||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Devolucion", "Dev"))
|
||||
End If
|
||||
DdlTipoComprobante.SelectedValueExist("Dev")
|
||||
DdlTiposRelacion.SelectedValueExist("3")
|
||||
End If
|
||||
|
||||
DdlSubProyectoDatos.Enabled = False
|
||||
|
||||
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
|
||||
@@ -25804,6 +25844,7 @@ Partial Class Ventas
|
||||
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
||||
CargaNCDT(CveVenta, TT)
|
||||
End If
|
||||
|
||||
'verifica el tipo de cambio que se actualice
|
||||
If DdlMoneda.SelectedValue <> "1" Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
@@ -25812,6 +25853,7 @@ Partial Class Ventas
|
||||
UpPS.Update()
|
||||
|
||||
LBNotaCredito.Visible = False
|
||||
LnkAplicarRNCDevolucion.Visible = False
|
||||
CambiaTipoDocto()
|
||||
|
||||
End If
|
||||
@@ -26160,6 +26202,88 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CrearDTNCDevolucion(ListaNC As List(Of Modelos.Factura), ByRef TmpDTCargo As DataTable, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String)
|
||||
For Each RNC In ListaNC
|
||||
Dim UltimoRenglonRNC As Integer = 1
|
||||
Dim TotalAcumuladoRNC As Decimal = 0
|
||||
Dim Terminar As Boolean = False
|
||||
|
||||
For Each RowRNC As DataRow In RNC.DtDetalle.FiltraParametros("", Orderby:="PU").Rows
|
||||
|
||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=RowRNC("CvePS").ToString().ToEntero()).FiltroPrimero("")
|
||||
|
||||
Dim Cantidad As Decimal = RowRNC("Cantidad").ToString().ToDecimal()
|
||||
|
||||
Dim CvePSCargo As Integer = RowRNC("CvePS").ToString().ToEntero()
|
||||
|
||||
Dim ImportePU = RowRNC("PU").ToString().ToDecimal
|
||||
|
||||
Dim Obs As String = ""
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (Cantidad * ImportePU)
|
||||
|
||||
Dim ImporteIVA = (TotalCalculableImpuestos * RowRNC("PorcentajeIVA").ToString().ToDecimal).RoundSQL(2)
|
||||
Dim ImporteIEPS = (TotalCalculableImpuestos * RowRNC("PorcentajeIEPS").ToString().ToDecimal).RoundSQL(2)
|
||||
Dim ImporteRetIVA = (TotalCalculableImpuestos * RowRNC("PorcentajeRetIVA").ToString().ToDecimal).RoundSQL(2)
|
||||
Dim ImporteRetISR = (TotalCalculableImpuestos * RowRNC("PorcentajeRetISR").ToString().ToDecimal).RoundSQL(2)
|
||||
Dim ImporteTotal = TotalCalculableImpuestos
|
||||
|
||||
TotalAcumuladoRNC += (TotalCalculableImpuestos + ImporteIVA + ImporteIEPS - ImporteRetIVA - ImporteRetISR).RoundSQL
|
||||
|
||||
'SI EL IMPORTE ES MAYOR REALIZA EL AJUSTE
|
||||
If TotalAcumuladoRNC > RNC.TotalRemNCAplicado Then
|
||||
Terminar = True
|
||||
'RESTA LO SUMANDO DEL ACUMULADO
|
||||
TotalAcumuladoRNC -= (TotalCalculableImpuestos + ImporteIVA + ImporteIEPS - ImporteRetIVA - ImporteRetISR)
|
||||
|
||||
Dim Diferencia As Decimal = RNC.TotalRemNCAplicado - TotalAcumuladoRNC
|
||||
|
||||
Dim TotalPartida As Decimal = (TotalCalculableImpuestos + ImporteIVA + ImporteIEPS - ImporteRetIVA - ImporteRetISR)
|
||||
|
||||
Dim PorcentajePorAplicar As Decimal = (Diferencia / TotalPartida)
|
||||
|
||||
Cantidad = Cantidad * PorcentajePorAplicar
|
||||
|
||||
TotalCalculableImpuestos = (Cantidad * ImportePU)
|
||||
ImporteIVA = (TotalCalculableImpuestos * RowRNC("PorcentajeIVA").ToString().ToDecimal).RoundSQL(2)
|
||||
ImporteIEPS = (TotalCalculableImpuestos * RowRNC("PorcentajeIEPS").ToString().ToDecimal).RoundSQL(2)
|
||||
ImporteRetIVA = (TotalCalculableImpuestos * RowRNC("PorcentajeRetIVA").ToString().ToDecimal).RoundSQL(2)
|
||||
ImporteRetISR = (TotalCalculableImpuestos * RowRNC("PorcentajeRetISR").ToString().ToDecimal).RoundSQL(2)
|
||||
|
||||
ImporteTotal = TotalCalculableImpuestos
|
||||
|
||||
TotalAcumuladoRNC += (TotalCalculableImpuestos + ImporteIVA + ImporteIEPS - ImporteRetIVA - ImporteRetISR).RoundSQL
|
||||
End If
|
||||
|
||||
'SI ES EL ULTIMO REGLON REALIZA UN AJUSTE
|
||||
If UltimoRenglonRNC = RNC.DtDetalle.Rows.Count OrElse Terminar Then
|
||||
Dim Ajuste As Decimal = 0
|
||||
If Math.Abs(RNC.TotalRemNCAplicado - TotalAcumuladoRNC) > 0.00 Then
|
||||
Ajuste = RNC.TotalRemNCAplicado - TotalAcumuladoRNC
|
||||
|
||||
If ImporteIVA > 0 Then
|
||||
ImporteIVA += Ajuste
|
||||
ElseIf ImporteIEPS > 0 Then
|
||||
ImporteIEPS += Ajuste
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
UltimoRenglonRNC += 1
|
||||
|
||||
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowRNC("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowRNC("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowRNC("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowRNC("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowRNC("CveVentaDetalle").ToString().ToEntero())
|
||||
|
||||
If Terminar Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Next
|
||||
End Sub
|
||||
Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal, Optional NCDescuento As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional NivelTotal As Integer = 1, Optional AplicaNCUsado As Boolean = False) As DataTable
|
||||
Dim Total As Decimal = 0, SubTotal As Decimal = 0, Saldo As Decimal = 0
|
||||
|
||||
@@ -26367,6 +26491,7 @@ Partial Class Ventas
|
||||
HplDownPDF.Visible = False
|
||||
HLSaldarVenta.Visible = False
|
||||
LBNotaCredito.Visible = False
|
||||
LnkAplicarRNCDevolucion.Visible = False
|
||||
LiComplementoPago.Visible = False
|
||||
HlCuentaTerminal.Visible = False
|
||||
LiLnkGuias.Visible = False
|
||||
@@ -26743,6 +26868,7 @@ Partial Class Ventas
|
||||
HplDownPDF.Visible = False
|
||||
HLSaldarVenta.Visible = False
|
||||
LBNotaCredito.Visible = False
|
||||
LnkAplicarRNCDevolucion.Visible = False
|
||||
LiComplementoPago.Visible = False
|
||||
HlCuentaTerminal.Visible = False
|
||||
LiLnkGuias.Visible = False
|
||||
@@ -31150,4 +31276,68 @@ Partial Class Ventas
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
Protected Sub LnkAplicarRNCDevolucion_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim DtNC As DataTable = Nothing
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||
DtNC = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND TipoRNC = 3 AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
GvRNCDevoluciones.DataSource = DtNC
|
||||
GvRNCDevoluciones.DataBind()
|
||||
|
||||
UpRNCDevolucion.Update()
|
||||
|
||||
RegistraScript("$('#ModalAplicaRNCDevolucion').modal('show');")
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAplicarRNCDevoluciones_Click(sender As Object, e As EventArgs)
|
||||
Me.AplicaRNCXDetalle = False
|
||||
|
||||
If ListaRemisionesNC Is Nothing Then
|
||||
ListaRemisionesNC = New List(Of Modelos.Factura)
|
||||
Else
|
||||
ListaRemisionesNC.Clear()
|
||||
End If
|
||||
|
||||
If ListaNCBonificacion Is Nothing Then
|
||||
ListaNCBonificacion = New List(Of Modelos.Factura)
|
||||
Else
|
||||
ListaNCBonificacion.Clear()
|
||||
End If
|
||||
|
||||
Dim TotalRemNCAplicado As Decimal = 0
|
||||
|
||||
For Each GvRow As GridViewRow In GvRNCDevoluciones.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkAplicar").Checked Then
|
||||
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
|
||||
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
|
||||
|
||||
If RemNC.TotalRemNCAplicado <= 0 Then
|
||||
Alert($"Debe asignar un importe en la siguiente remisión: <b>{RemNC.SerieFolio}</b>", TipoMensaje.MsgAdvertencia)
|
||||
ListaRemisionesNC.Clear()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ListaRemisionesNC.Add(RemNC)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
|
||||
TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
UpAplicarNC.Update()
|
||||
|
||||
AplicarNC(-1, NCDescuento:=False, EsNCAmortizacion:=False, AplicaImpuestosLocales:=True, AplicaNuevoDocumento:=True, AplicoNCFacturaActual:=True, TipoDoctoNC:="Dev")
|
||||
|
||||
RegistraScript("$('#ModalAplicaRNCDevolucion').modal('hide');")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -236,6 +236,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user