This commit is contained in:
@@ -155,7 +155,7 @@ Public Class ClsContabilidad
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
If ex.Message.Contains("50015;") Then
|
If ex.Message.Contains("50015;") Then
|
||||||
OnError("No se puede registrar una póliza en un periodo Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
Else
|
Else
|
||||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End If
|
End If
|
||||||
@@ -504,7 +504,7 @@ Public Class ClsContabilidad
|
|||||||
If ex.Message.Contains("50015;") Then
|
If ex.Message.Contains("50015;") Then
|
||||||
OnError("No se puede eliminar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("No se puede eliminar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
Else
|
Else
|
||||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al Eliminar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
@@ -536,7 +536,11 @@ Public Class ClsContabilidad
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
If ex.Message.Contains("50015;") Then
|
||||||
|
OnError("No se puede eliminar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
Else
|
||||||
OnError("Ocurrió un error al eliminar el detalle de la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al eliminar el detalle de la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
@@ -790,9 +794,17 @@ Public Class ClsContabilidad
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex1 As SqlException
|
Catch ex1 As SqlException
|
||||||
|
If ex1.Message.Contains("50015;") Then
|
||||||
|
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
Else
|
||||||
OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
If ex.Message.Contains("50015;") Then
|
||||||
|
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
Else
|
||||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
@@ -949,7 +961,11 @@ Public Class ClsContabilidad
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
If ex.Message.Contains("50015;") Then
|
||||||
|
OnError("No se puede actualizar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
Else
|
||||||
OnError("Ocurrió un error al bloquear o desbloquear las prepolizas detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al bloquear o desbloquear las prepolizas detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
@@ -1276,6 +1292,11 @@ Public Class ClsContabilidad
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not OcurrioError Then
|
||||||
|
If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa) Then
|
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa) Then
|
||||||
@@ -1283,11 +1304,7 @@ Public Class ClsContabilidad
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not OcurrioError Then
|
|
||||||
If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If Empresa.Funcionalidad(522).ToString = "1" And Empresa.UsaContabilidad Then
|
'If Empresa.Funcionalidad(522).ToString = "1" And Empresa.UsaContabilidad Then
|
||||||
|
|
||||||
@@ -1741,7 +1758,12 @@ Public Class ClsContabilidad
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
|
If ex.Message.Contains("50015;") Then
|
||||||
|
OnError("No se puede actualizar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
Else
|
||||||
OnError("Ocurrió un error al actualizar prepoliza del movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al actualizar prepoliza del movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|||||||
@@ -2681,7 +2681,7 @@ Namespace Modelos
|
|||||||
CveCuentaContabilizacion = 0
|
CveCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Else
|
Else
|
||||||
ObjFactura.SeGuardoPrePoliza = True
|
ObjFactura.SeGuardoPrePoliza = True
|
||||||
@@ -2750,8 +2750,8 @@ Namespace Modelos
|
|||||||
If idCuentaContabilizacion > 0 Then
|
If idCuentaContabilizacion > 0 Then
|
||||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=objContPaqi) Then
|
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=objContPaqi) Then
|
||||||
Else
|
Else
|
||||||
ErrorList.Add("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
'ErrorList.Add("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||||
ErrorPrepoliza = True
|
'ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ErrorList.Add(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas))
|
ErrorList.Add(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas))
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el movimiento y complemento?" data-btn-ok-label="si" Style="color: #686868;"> <i class="fa fa-pencil"></i> Cancelar Complemento</asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el movimiento y complemento?" data-btn-ok-label="si" Style="color: #686868;"> <i class="fa fa-pencil"></i> Cancelar</asp:LinkButton>
|
||||||
|
|
||||||
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil"--%>
|
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil"--%>
|
||||||
|
|
||||||
@@ -233,6 +233,9 @@
|
|||||||
<asp:DropDownList ID="DdlPersonal" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm input-medium select2me" Visible="false" Width="100%" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged" AutoPostBack="true">
|
<asp:DropDownList ID="DdlPersonal" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm input-medium select2me" Visible="false" Width="100%" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged" AutoPostBack="true">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|
||||||
|
<asp:Label runat="server" ID="LblPagarA" Visible="false"></asp:Label>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:CheckBox ID="ChkAbonoCuenta" CssClass="md-checksd" ClientIDMode="Static" runat="server" Text="Abono en Cuenta"></asp:CheckBox>
|
<asp:CheckBox ID="ChkAbonoCuenta" CssClass="md-checksd" ClientIDMode="Static" runat="server" Text="Abono en Cuenta"></asp:CheckBox>
|
||||||
|
|||||||
@@ -646,7 +646,8 @@ Partial Class Bancos_IE
|
|||||||
Anexo.Visible = False
|
Anexo.Visible = False
|
||||||
DdlCliente.Enabled = False
|
DdlCliente.Enabled = False
|
||||||
DdlProveedores.Enabled = False
|
DdlProveedores.Enabled = False
|
||||||
DdlPersonal.Enabled = False
|
DdlPersonal.Visible = False
|
||||||
|
|
||||||
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
@@ -847,14 +848,24 @@ Partial Class Bancos_IE
|
|||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
DdlCliente.SelectedText = ObjIE.PagueseA
|
DdlCliente.SelectedText = ObjIE.PagueseA
|
||||||
DdlCliente.SelectedValue = CveCliente.ToString
|
DdlCliente.SelectedValue = CveCliente.ToString
|
||||||
DdlCliente.Visible = True
|
|
||||||
|
DdlCliente.Visible = False
|
||||||
DdlCliente.Enabled = False
|
DdlCliente.Enabled = False
|
||||||
|
|
||||||
|
LblPagarA.Visible = True
|
||||||
|
LblPagarA.Text = ObjIE.PagueseA
|
||||||
|
|
||||||
' LnkEmitirComplemento.Visible = True
|
' LnkEmitirComplemento.Visible = True
|
||||||
ElseIf CveProveedor > 0 Then
|
ElseIf CveProveedor > 0 Then
|
||||||
DdlProveedores.SelectedText = ObjIE.PagueseA
|
DdlProveedores.SelectedText = ObjIE.PagueseA
|
||||||
DdlProveedores.SelectedValue = CveProveedor.ToString
|
DdlProveedores.SelectedValue = CveProveedor.ToString
|
||||||
DdlProveedores.Visible = True
|
DdlProveedores.Visible = False
|
||||||
DdlProveedores.Enabled = False
|
DdlProveedores.Enabled = False
|
||||||
|
|
||||||
|
LblPagarA.Visible = True
|
||||||
|
LblPagarA.Text = ObjIE.PagueseA
|
||||||
|
|
||||||
|
|
||||||
'Se prepara para la generacion del envio de correo con notificacion de pago
|
'Se prepara para la generacion del envio de correo con notificacion de pago
|
||||||
LnkEnviarMailPago.Attributes.Add("onclick", "$('#ModalDivMail').modal();")
|
LnkEnviarMailPago.Attributes.Add("onclick", "$('#ModalDivMail').modal();")
|
||||||
LnkEnviarMailPago.Visible = True
|
LnkEnviarMailPago.Visible = True
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -5192,7 +5192,6 @@ Partial Class Compras_Compras
|
|||||||
Dim tipoCambioPago As Decimal
|
Dim tipoCambioPago As Decimal
|
||||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||||
Dim idCuentaContabilizacion As Long = 1
|
Dim idCuentaContabilizacion As Long = 1
|
||||||
Dim BanderaContilizar = True
|
|
||||||
Dim CveCuentaContabilizacion As Long = 1
|
Dim CveCuentaContabilizacion As Long = 1
|
||||||
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
||||||
Dim DT As DataTable = Nothing
|
Dim DT As DataTable = Nothing
|
||||||
@@ -6072,7 +6071,6 @@ Partial Class Compras_Compras
|
|||||||
If OCVinculada Or CveConceptoContableAlmacen.Contiene(237, 240) Then
|
If OCVinculada Or CveConceptoContableAlmacen.Contiene(237, 240) Then
|
||||||
ConceptoContabilizacion = CveConceptoContableAlmacen
|
ConceptoContabilizacion = CveConceptoContableAlmacen
|
||||||
End If
|
End If
|
||||||
BanderaContilizar = If(ConceptoContabilizacion = 205, False, True)
|
|
||||||
Dim UsaComplementariaFleteImportaciones As Boolean = False
|
Dim UsaComplementariaFleteImportaciones As Boolean = False
|
||||||
|
|
||||||
Select Case ConceptoContabilizacion
|
Select Case ConceptoContabilizacion
|
||||||
@@ -6990,6 +6988,12 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Simplificacion de PrePolizas
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||||
|
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorPrepolizaDescuadre = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
@@ -7000,7 +7004,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If ObjContaAC IsNot Nothing AndAlso Not ErrorPrepoliza AndAlso Not ErrorPrepolizaDescuadre AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
If ObjContaAC IsNot Nothing AndAlso Not ErrorPrepoliza AndAlso Not ErrorPrepolizaDescuadre AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
If BanderaContilizar Then
|
|
||||||
If idCuentaContabilizacion > 0 Then
|
If idCuentaContabilizacion > 0 Then
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
||||||
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
@@ -7015,7 +7018,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -7614,12 +7616,7 @@ Partial Class Compras_Compras
|
|||||||
MsgAccionAceptar = "location.href =""Compras.aspx"""
|
MsgAccionAceptar = "location.href =""Compras.aspx"""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA
|
'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 119) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then
|
If UsuarioActual.CveEmpresa.Contiene(1, 119) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then
|
||||||
@@ -11223,10 +11220,10 @@ Partial Class Compras_Compras
|
|||||||
Dim dr1 As DataRow = TmpDT.Rows(Index)
|
Dim dr1 As DataRow = TmpDT.Rows(Index)
|
||||||
Dim dr As DataRow = TmpDT.NewRow
|
Dim dr As DataRow = TmpDT.NewRow
|
||||||
dr.ItemArray = dr1.ItemArray
|
dr.ItemArray = dr1.ItemArray
|
||||||
Dim IVA = dr1("IVA").ToString.ToDouble / (dr1("Cantidad").ToString.ToDouble * dr1("PU").ToString.ToDouble)
|
|
||||||
dr1("Cantidad") = (dr1("Cantidad").ToString.ToDouble - Cantidad.ToDouble)
|
dr1("Cantidad") = (dr1("Cantidad").ToString.ToDouble - Cantidad.ToDouble)
|
||||||
dr1("IVA") = IVA * dr1("Cantidad").ToString.ToDouble * dr1("PU").ToString.ToDouble
|
|
||||||
dr1("Total") = dr1("PU").ToString.ToDouble * dr1("Cantidad").ToString.ToDouble
|
dr1("Total") = dr1("PU").ToString.ToDouble * dr1("Cantidad").ToString.ToDouble
|
||||||
|
dr1("IVA") = Math.Round(dr1("IVAPorcentaje").ToString.ToDouble * dr1("Total").ToString.ToDouble, 6)
|
||||||
|
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
|
|
||||||
dr("CvePersonal") = 0
|
dr("CvePersonal") = 0
|
||||||
@@ -11234,8 +11231,8 @@ Partial Class Compras_Compras
|
|||||||
dr("CveActivoFijo") = 0
|
dr("CveActivoFijo") = 0
|
||||||
dr("CodAF") = 0
|
dr("CodAF") = 0
|
||||||
dr("Cantidad") = Cantidad.ToDouble
|
dr("Cantidad") = Cantidad.ToDouble
|
||||||
dr("IVA") = IVA * dr("Cantidad").ToString.ToDouble * dr("PU").ToString.ToDouble
|
|
||||||
dr("Total") = dr("PU").ToString.ToDouble * Cantidad.ToDouble
|
dr("Total") = dr("PU").ToString.ToDouble * Cantidad.ToDouble
|
||||||
|
dr("IVA") = Math.Round(dr("IVAPorcentaje").ToString.ToDouble * dr("Total").ToString.ToDouble, 6)
|
||||||
TmpDT.Rows.InsertAt(dr, Index)
|
TmpDT.Rows.InsertAt(dr, Index)
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
|
|
||||||
@@ -11435,6 +11432,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
dr1("Cantidad") = (dr1("Cantidad").ToString.ToDouble - Cantidad.ToDouble)
|
dr1("Cantidad") = (dr1("Cantidad").ToString.ToDouble - Cantidad.ToDouble)
|
||||||
dr1("Total") = dr1("PU").ToString.ToDouble * dr1("Cantidad").ToString.ToDouble
|
dr1("Total") = dr1("PU").ToString.ToDouble * dr1("Cantidad").ToString.ToDouble
|
||||||
|
dr1("IVA") = Math.Round(dr1("IVAPorcentaje").ToString.ToDouble * dr1("Total").ToString.ToDouble, 6)
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
|
|
||||||
|
|
||||||
@@ -11442,6 +11440,7 @@ Partial Class Compras_Compras
|
|||||||
dr("CodAF") = ""
|
dr("CodAF") = ""
|
||||||
dr("Cantidad") = Cantidad.ToDouble
|
dr("Cantidad") = Cantidad.ToDouble
|
||||||
dr("Total") = dr("PU").ToString.ToDouble * Cantidad.ToDouble
|
dr("Total") = dr("PU").ToString.ToDouble * Cantidad.ToDouble
|
||||||
|
dr("IVA") = Math.Round(dr("IVAPorcentaje").ToString.ToDouble * dr("Total").ToString.ToDouble, 6)
|
||||||
|
|
||||||
TmpDT.Rows.InsertAt(dr, Index + 1)
|
TmpDT.Rows.InsertAt(dr, Index + 1)
|
||||||
|
|
||||||
@@ -16756,6 +16755,8 @@ Partial Class Compras_Compras
|
|||||||
Row("CveClasificacionOG") = DdlACGeneral5.SelectedValue.ToEntero
|
Row("CveClasificacionOG") = DdlACGeneral5.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
TmpDT.Rows.IndexOf(Row)
|
TmpDT.Rows.IndexOf(Row)
|
||||||
|
|
||||||
@@ -16857,6 +16858,10 @@ Partial Class Compras_Compras
|
|||||||
DrPS("CveTipoGasto") = DdlTipoGasto.SelectedValue.ToEntero
|
DrPS("CveTipoGasto") = DdlTipoGasto.SelectedValue.ToEntero
|
||||||
DrPS("TipoGasto") = If(DdlTipoGasto.SelectedValue.ToEntero > 0, DdlTipoGasto.SelectedItem.Text, "")
|
DrPS("TipoGasto") = If(DdlTipoGasto.SelectedValue.ToEntero > 0, DdlTipoGasto.SelectedItem.Text, "")
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then
|
||||||
|
DrPS("AplicaCostoIndirecto") = "0"
|
||||||
|
End If
|
||||||
|
|
||||||
'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!!
|
'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!!
|
||||||
'Dim IVA = (TxtIVAModal.Text.ToDouble / 100)
|
'Dim IVA = (TxtIVAModal.Text.ToDouble / 100)
|
||||||
Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)
|
Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)
|
||||||
|
|||||||
@@ -624,6 +624,11 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
|
||||||
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
|
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
|
||||||
End If
|
End If
|
||||||
|
If CveCajaChica > 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor, Contabilizable:=False) Then
|
||||||
|
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal).RoundSQL(6) Else PorcentajePago = 1
|
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal).RoundSQL(6) Else PorcentajePago = 1
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ Partial Class Compras_RepRembolsoComprobaciones
|
|||||||
Dim ObjComp As New ClsCompras()
|
Dim ObjComp As New ClsCompras()
|
||||||
Dim ObjMov As New ClsContabilidad(ObjComp.IniciaTransacSQL)
|
Dim ObjMov As New ClsContabilidad(ObjComp.IniciaTransacSQL)
|
||||||
Dim ObjAC As ClsContPAQi = Nothing
|
Dim ObjAC As ClsContPAQi = Nothing
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjAC.IniciaTransacSQL()
|
ObjAC.IniciaTransacSQL()
|
||||||
End If
|
End If
|
||||||
@@ -198,7 +198,7 @@ Partial Class Compras_RepRembolsoComprobaciones
|
|||||||
Msg.AppendFormat("Se unificaron todas las compras con éxito")
|
Msg.AppendFormat("Se unificaron todas las compras con éxito")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaAC AndAlso Not TieneError Then
|
If UsuarioActual.Empresa.UsaContabilidad AndAlso Not TieneError Then
|
||||||
If ObjAC Is Nothing Then
|
If ObjAC Is Nothing Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -617,7 +617,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!Folio.Value</Value>
|
<Value>=IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value)</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Bahnschrift</FontFamily>
|
<FontFamily>Bahnschrift</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
@@ -1739,7 +1739,7 @@ Celular: </Value>
|
|||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!VendedorMail.Value</Value>
|
<Value>SERVICIOSESPECIALIZADOSENTI@GMAIL.COM</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>bahnschrift</FontFamily>
|
<FontFamily>bahnschrift</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
@@ -1755,7 +1755,7 @@ Celular: </Value>
|
|||||||
<Top>0.86675cm</Top>
|
<Top>0.86675cm</Top>
|
||||||
<Left>0.31387cm</Left>
|
<Left>0.31387cm</Left>
|
||||||
<Height>1.8206cm</Height>
|
<Height>1.8206cm</Height>
|
||||||
<Width>6.29968cm</Width>
|
<Width>7.42333cm</Width>
|
||||||
<ZIndex>8</ZIndex>
|
<ZIndex>8</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
|
|||||||
@@ -198,7 +198,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>|www.adsistemas.mx | julian@adsistemas.mx|</Value>
|
<Value>|www.adssistemas.mx | julian@adssistemas.mx|</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>www.adsistemas.mx|facturacion@adssistemas.mx</Value>
|
<Value>www.adssistemas.mx|facturacion@adssistemas.mx</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -8,14 +8,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#DivShipment {
|
|
||||||
z-index: 1999;
|
|
||||||
}
|
|
||||||
|
|
||||||
#DivStop {
|
|
||||||
z-index: 2000;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -257,11 +249,13 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtLocName" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Name''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtLocName" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Name''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtLocName.ClientID.ToString()%>">Name:</label>
|
<label for="<%= TxtLocName.ClientID.ToString()%>">Name:</label>
|
||||||
</div>
|
</div>
|
||||||
|
<form method="post">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtLocID" CssClass="form-control " runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtLocID" CssClass="form-control " runat="server"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtLocID" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Location''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtLocID" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Location''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtLocID.ClientID.ToString()%>">Location ID:</label>
|
<label for="<%= TxtLocID.ClientID.ToString()%>">Location ID:</label>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
<div class="portlet light smmallpadding traspasorow bordered">
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
@@ -306,21 +300,29 @@
|
|||||||
<div class="row v-center">
|
<div class="row v-center">
|
||||||
<label class="col-md-12" style="color: gray">Early Arrival Time:</label>
|
<label class="col-md-12" style="color: gray">Early Arrival Time:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||||
<asp:TextBox ID="TxtFechaStopI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
<asp:TextBox ID="TxtFechaStopI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaIStop" runat="server" ControlToValidate="TxtFechaStopI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Early Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFechaIStop" runat="server" ControlToValidate="TxtFechaStopI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Early Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="row v-center">
|
<div class="row v-center">
|
||||||
<label class="col-md-12" style="color: gray">Late Arrival Time:</label>
|
<label class="col-md-12" style="color: gray">Late Arrival Time:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||||
<asp:TextBox ID="TxtFechaStopF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
<asp:TextBox ID="TxtFechaStopF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaFStop" runat="server" ControlToValidate="TxtFechaStopF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Late Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFechaFStop" runat="server" ControlToValidate="TxtFechaStopF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Late Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEF" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEF" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlStopType" runat="server" Width="100%" CssClass="form-control input-sm select2me">
|
<asp:DropDownList ID="DdlStopType" runat="server" Width="100%" CssClass="form-control input-sm select2me">
|
||||||
@@ -346,10 +348,17 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVStopRole" runat="server" ControlToValidate="DdlStopRole" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Role''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVStopRole" runat="server" ControlToValidate="DdlStopRole" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Role''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= DdlStopRole.ClientID.ToString()%>">Stop Role:</label>
|
<label for="<%= DdlStopRole.ClientID.ToString()%>">Stop Role:</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row v-center">
|
||||||
|
<div class="col-md-9">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtLoc" CssClass="form-control " runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtLoc" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
<label for="<%= TxtLoc.ClientID.ToString()%>">Search Location:</label>
|
<label for="<%= TxtLoc.ClientID.ToString()%>">Search Location:</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 v-center">
|
||||||
|
<button type="button" class="btn btn-primary" onclick="BtnBuscar();">Buscar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="portlet light smmallpadding traspasorow bordered">
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
@@ -510,6 +519,9 @@
|
|||||||
var markersEvent = [];
|
var markersEvent = [];
|
||||||
var markerEvent;
|
var markerEvent;
|
||||||
|
|
||||||
|
var searchBox;
|
||||||
|
var searchBoxEvent;
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initMap();
|
initMap();
|
||||||
Sys.Application.add_load(function (s, e) {
|
Sys.Application.add_load(function (s, e) {
|
||||||
@@ -517,9 +529,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#DivShipment').on('hidden.bs.modal', function () {
|
|
||||||
return false;
|
//$("form").submit(function (event) {
|
||||||
});
|
// event.preventDefault();
|
||||||
|
//});
|
||||||
|
|
||||||
function initMap() {
|
function initMap() {
|
||||||
|
|
||||||
@@ -544,12 +557,60 @@
|
|||||||
directionsDisplayEvent.setOptions({ suppressMarkers: true });
|
directionsDisplayEvent.setOptions({ suppressMarkers: true });
|
||||||
directionsDisplayEvent.setMap(mapEvent);
|
directionsDisplayEvent.setMap(mapEvent);
|
||||||
|
|
||||||
var searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
||||||
var searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
||||||
|
|
||||||
|
$("#<%= TxtLoc.ClientID%>").bind('keypress', function (e) {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#<%= TxtLoc2.ClientID%>").bind('keypress', function (e) {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
searchBox.addListener('places_changed', function () {
|
searchBox.addListener('places_changed', function () {
|
||||||
var places = searchBox.getPlaces();
|
var places = searchBox.getPlaces();
|
||||||
|
BuscarDireccion(places);
|
||||||
|
});
|
||||||
|
|
||||||
|
searchBoxEvent.addListener('places_changed', function () {
|
||||||
|
var places = searchBoxEvent.getPlaces();
|
||||||
|
if (places.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var bounds = new google.maps.LatLngBounds();
|
||||||
|
places.forEach(function (place) {
|
||||||
|
if (!place.geometry) {
|
||||||
|
console.log("Returned place contains no geometry");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var lat = place.geometry.location.lat();
|
||||||
|
var lng = place.geometry.location.lng();
|
||||||
|
|
||||||
|
SetMapPinEvent(lat, lng);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
map.addListener('bounds_changed', function () {
|
||||||
|
searchBox.setBounds(map.getBounds());
|
||||||
|
});
|
||||||
|
|
||||||
|
mapEvent.addListener('bounds_changed', function () {
|
||||||
|
searchBoxEvent.setBounds(mapEvent.getBounds());
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
function BtnBuscar() {
|
||||||
|
var input = document.getElementById("<%= TxtLoc.ClientID%>");
|
||||||
|
|
||||||
|
google.maps.event.trigger(input, 'focus', {});
|
||||||
|
google.maps.event.trigger(input, 'keydown', { keyCode: 13 });
|
||||||
|
google.maps.event.trigger(this, 'focus', {});
|
||||||
|
}
|
||||||
|
function BuscarDireccion(places) {
|
||||||
if (places.length == 0) {
|
if (places.length == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -602,35 +663,6 @@
|
|||||||
map.setCenter(bounds.getCenter());
|
map.setCenter(bounds.getCenter());
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
searchBoxEvent.addListener('places_changed', function () {
|
|
||||||
var places = searchBoxEvent.getPlaces();
|
|
||||||
if (places.length == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var bounds = new google.maps.LatLngBounds();
|
|
||||||
places.forEach(function (place) {
|
|
||||||
if (!place.geometry) {
|
|
||||||
console.log("Returned place contains no geometry");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var lat = place.geometry.location.lat();
|
|
||||||
var lng = place.geometry.location.lng();
|
|
||||||
|
|
||||||
SetMapPinEvent(lat, lng);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
map.addListener('bounds_changed', function () {
|
|
||||||
searchBox.setBounds(map.getBounds());
|
|
||||||
});
|
|
||||||
|
|
||||||
mapEvent.addListener('bounds_changed', function () {
|
|
||||||
searchBoxEvent.setBounds(mapEvent.getBounds());
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function cargapin(lat, lng) {
|
function cargapin(lat, lng) {
|
||||||
setTimeout(function () { SetMapPinEvent(lat, lng) }, 1000);
|
setTimeout(function () { SetMapPinEvent(lat, lng) }, 1000);
|
||||||
@@ -682,6 +714,7 @@
|
|||||||
}
|
}
|
||||||
markers = [];
|
markers = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDirecciones(lat, lng) {
|
function getDirecciones(lat, lng) {
|
||||||
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
||||||
$.getJSON(url, function (data) {
|
$.getJSON(url, function (data) {
|
||||||
@@ -693,8 +726,6 @@
|
|||||||
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
||||||
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
||||||
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
||||||
|
|
||||||
$('#DivShipment').modal({ backdrop: 'static', keyboard: false });
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
<asp:ListItem Value="9" Text="ContaSIG - Cuentas Contables" Enabled="True"></asp:ListItem>
|
<asp:ListItem Value="9" Text="ContaSIG - Cuentas Contables" Enabled="True"></asp:ListItem>
|
||||||
<asp:ListItem Value="10" Text="Cont - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
<asp:ListItem Value="10" Text="Cont - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
||||||
<asp:ListItem Value="11" Text="ContaSIG - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
<asp:ListItem Value="11" Text="ContaSIG - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="12" Text="Almacen" Enabled="True"></asp:ListItem>
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -449,7 +449,26 @@ Partial Class General_SaldosIniciales
|
|||||||
Alert("El nombre de la diescisieteava columna debe ser 'Clave Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la diescisieteava columna debe ser 'Clave Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
ElseIf RblFormato.SelectedValue = "12" Then
|
||||||
|
If Not dt.Columns(0).ColumnName = "CodigoPS" Then
|
||||||
|
Alert("El nombre de la primera columna debe ser 'CodigoPS'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(1).ColumnName = "Almacen" Then
|
||||||
|
Alert("El nombre de la segunda columna debe ser 'Almacen'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(2).ColumnName = "Existencia" Then
|
||||||
|
Alert("El nombre de la tercera columna debe ser 'Existencia'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(3).ColumnName = "Valor" Then
|
||||||
|
Alert("El nombre de la cuarta columna debe ser 'Valor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1501,7 +1520,29 @@ Partial Class General_SaldosIniciales
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
ElseIf RblFormato.SelectedValue = "12" Then
|
||||||
|
Dim ObjMovimientos As New ClsInventarios
|
||||||
|
ObjMovimientos.IniciaTransacSQL()
|
||||||
|
Try
|
||||||
|
For Each almacenSinRepetir As DataRow In dt.FiltraParametros("", DistinctColumns:={"Almacen"}).Rows
|
||||||
|
Dim almacenActual As String = almacenSinRepetir("Almacen").ToString
|
||||||
|
Dim CveAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveAlmacen", $"Almacen = {almacenActual}").ToEntero
|
||||||
|
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"Almacen = {almacenActual}").Rows
|
||||||
|
Dim CvePS As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CvePS", $"PSCodigo = {nuevaEntrada("CodigoPS")}").ToEntero
|
||||||
|
If CvePS > 0 Then
|
||||||
|
Dim Cantidad As Double = nuevaEntrada("Existencia").ToString.ToDouble
|
||||||
|
Dim Valor As Double = nuevaEntrada("Valor").ToString.ToDouble
|
||||||
|
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, 1, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||||
|
If ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, -1, CvePS, (Valor / Cantidad), -1, -1) Then
|
||||||
|
Alert("Movimiento terminado con exito")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
ObjMovimientos.Dispose()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1528,6 +1569,8 @@ Partial Class General_SaldosIniciales
|
|||||||
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
|
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
|
||||||
ElseIf RblFormato.SelectedValue = "9" Then
|
ElseIf RblFormato.SelectedValue = "9" Then
|
||||||
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
|
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
|
||||||
|
ElseIf RblFormato.SelectedValue = "12" Then
|
||||||
|
Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoAlmacen.xlsx"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Archivo As New IO.FileInfo(Directorio)
|
Dim Archivo As New IO.FileInfo(Directorio)
|
||||||
|
|||||||
@@ -1311,9 +1311,8 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''VALIDA EXISTENCIA
|
''VALIDA EXISTENCIA
|
||||||
|
If Not TipoDocto.Contiene("Dev") Then
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
@@ -1335,6 +1334,8 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Gvr.DataKey("AplicaSerieLote") = "True" Then
|
If Gvr.DataKey("AplicaSerieLote") = "True" Then
|
||||||
TdSeriePS.Visible = True
|
TdSeriePS.Visible = True
|
||||||
|
|||||||
@@ -2700,8 +2700,27 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlFacturas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="SerieFolio" DataValueField="CveVenta" OnSelectedIndexChanged="DdlFacturas_SelectedIndexChanged" Width="100%" AutoPostBack="true">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlFacturas.ClientID.ToString()%>">Facturas:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-9">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlPSAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" OnSelectedIndexChanged="DdlPSAjuste_selectedindexchange" Width="100%" AutoPostBack="true">
|
||||||
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlPSAjuste" CssStyle="width: 100%;" CssClassDdl="select2me form-control" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange" />
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50" ></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEPUFactura" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUFactura"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
|
<label for="<%= TxtPUFactura.ClientID.ToString()%>">PU Factura:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2811,7 +2830,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-3">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||||
<%--<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
<%--<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||||
@@ -2828,6 +2847,9 @@
|
|||||||
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
|
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -924,6 +924,14 @@ Partial Class PV
|
|||||||
ViewState("DtPagos") = value
|
ViewState("DtPagos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property DtPUFacturas As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("DtPUFacturas"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtPUFacturas") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PROPIEDADES ACUMULADORES"
|
#Region "PROPIEDADES ACUMULADORES"
|
||||||
@@ -996,6 +1004,8 @@ Partial Class PV
|
|||||||
EsCreaApartirDe = False
|
EsCreaApartirDe = False
|
||||||
RequiereAlmacenDestino = False
|
RequiereAlmacenDestino = False
|
||||||
TmpDTComplementos = New DataTable
|
TmpDTComplementos = New DataTable
|
||||||
|
DtPUFacturas = New DataTable
|
||||||
|
|
||||||
Modalidad = ""
|
Modalidad = ""
|
||||||
Index = -1
|
Index = -1
|
||||||
|
|
||||||
@@ -1680,6 +1690,7 @@ Partial Class PV
|
|||||||
UpComplementos.Update()
|
UpComplementos.Update()
|
||||||
|
|
||||||
CargarAlmacenes()
|
CargarAlmacenes()
|
||||||
|
CargaFacturasAjuste()
|
||||||
Else
|
Else
|
||||||
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
|
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -2684,6 +2695,10 @@ Partial Class PV
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "SELECTED INDEX CHANGE"
|
#Region "SELECTED INDEX CHANGE"
|
||||||
|
Protected Sub DdlFacturas_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaPSAjuste()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub DdlPSIndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
|
Private Sub DdlPSIndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
|
||||||
|
|
||||||
If Not CveCliente > 0 Then
|
If Not CveCliente > 0 Then
|
||||||
@@ -4848,9 +4863,22 @@ Partial Class PV
|
|||||||
TmpDTAjustes.Columns.Add("Cantidad", GetType(Decimal))
|
TmpDTAjustes.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
TmpDTAjustes.Columns.Add("CveUM", GetType(Integer))
|
TmpDTAjustes.Columns.Add("CveUM", GetType(Integer))
|
||||||
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
|
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||||
|
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
|
||||||
|
TmpDTAjustes.Columns.Add("PUFactura", GetType(Integer))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaFacturasAjuste()
|
||||||
|
DdlFacturas.Items.Clear()
|
||||||
|
Dim ObjVenta As New ClsVentas
|
||||||
|
If ObjVenta.GetVentas(UsuarioActual.CveEmpresa, "Ing", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||||
|
DdlFacturas.DataSource = ObjVenta.DtResultados
|
||||||
|
DdlFacturas.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
End If
|
||||||
|
ObjVenta.Dispose()
|
||||||
|
DdlFacturas.DataBind()
|
||||||
|
UpAjuste.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaAjuste()
|
Private Sub CargaAjuste()
|
||||||
Dim ObjAcum As New ClsAcumuladores
|
Dim ObjAcum As New ClsAcumuladores
|
||||||
@@ -4859,6 +4887,9 @@ Partial Class PV
|
|||||||
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
DdlFacturas.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
@@ -4872,19 +4903,9 @@ Partial Class PV
|
|||||||
DdlTipoUso.DataBind()
|
DdlTipoUso.DataBind()
|
||||||
DdlTipoDefecto.DataBind()
|
DdlTipoDefecto.DataBind()
|
||||||
GvRecepcionUsados.DataBind()
|
GvRecepcionUsados.DataBind()
|
||||||
|
DdlFacturas.DataBind()
|
||||||
|
|
||||||
DdlPSAjuste.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141) = "1")
|
CargaPSAjuste()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(141) = "1" Then
|
|
||||||
DdlPSAjuste.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
|
||||||
DdlPSAjuste.SelectedText = "Seleccione"
|
|
||||||
DdlPSAjuste.SelectedValue = "-1"
|
|
||||||
Else
|
|
||||||
DdlPSAjuste.ddl.Items.Clear()
|
|
||||||
DdlPSAjuste.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
|
||||||
DdlPSAjuste.ddl.DataBind()
|
|
||||||
DdlPSAjuste.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
End If
|
|
||||||
|
|
||||||
CreaDTmpDTAjustes()
|
CreaDTmpDTAjustes()
|
||||||
CreaDTmpDTRecepcionUsados()
|
CreaDTmpDTRecepcionUsados()
|
||||||
@@ -4894,6 +4915,29 @@ Partial Class PV
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaPSAjuste()
|
||||||
|
DdlPSAjuste.Items.Clear()
|
||||||
|
DtPUFacturas.Rows.Clear()
|
||||||
|
|
||||||
|
If DdlFacturas.SelectedValue.ToEntero > 0 Then
|
||||||
|
TxtPUFactura.Enabled = False
|
||||||
|
Dim ObjVenta As New ClsVentas
|
||||||
|
If ObjVenta.GetVentaDetalle(DdlFacturas.SelectedValue.ToEntero) Then
|
||||||
|
DdlPSAjuste.DataSource = ObjVenta.DtResultados
|
||||||
|
DtPUFacturas = ObjVenta.DtResultados
|
||||||
|
End If
|
||||||
|
ObjVenta.Dispose()
|
||||||
|
Else
|
||||||
|
TxtPUFactura.Enabled = True
|
||||||
|
TxtPUFactura.Text = ""
|
||||||
|
DdlPSAjuste.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||||
|
End If
|
||||||
|
DdlPSAjuste.DataBind()
|
||||||
|
DdlPSAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
DtPUFacturas.AcceptChanges()
|
||||||
|
UpAjuste.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub Ajuste()
|
Private Sub Ajuste()
|
||||||
LimpiaAjuste()
|
LimpiaAjuste()
|
||||||
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.FiltraParametros($"ConsecutivoVenta = {ConsecutivoVenta}").Rows.Count > 0 Then
|
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.FiltraParametros($"ConsecutivoVenta = {ConsecutivoVenta}").Rows.Count > 0 Then
|
||||||
@@ -4920,15 +4964,22 @@ Partial Class PV
|
|||||||
TxtPorcentajeAjuste.Text = ""
|
TxtPorcentajeAjuste.Text = ""
|
||||||
TxtPoliza.Text = ""
|
TxtPoliza.Text = ""
|
||||||
TxtImporteAjuste.Text = ""
|
TxtImporteAjuste.Text = ""
|
||||||
DdlPSAjuste.SelectedValue = "-1"
|
DdlPSAjuste.SelectedIndex = 0
|
||||||
DdlPSAjuste.SelectedText = "Seleccione"
|
|
||||||
ChkAjuste.Checked = False
|
ChkAjuste.Checked = False
|
||||||
DivAjuste.Visible = False
|
DivAjuste.Visible = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaAjusteDetalle()
|
Private Sub CargaAjusteDetalle()
|
||||||
Dim Dr As DataRow = TmpDTAjustes.FiltraParametros($"ConsecutivoVenta = {ConsecutivoVenta}").Rows(0)
|
Dim Dr As DataRow = Nothing
|
||||||
|
IndexAjuste = 0
|
||||||
|
For Each Dr2 As DataRow In TmpDTAjustes.Rows
|
||||||
|
If Dr2("ConsecutivoVenta").ToString.ToEntero = ConsecutivoVenta Then
|
||||||
|
Dr = Dr2
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
IndexAjuste += 1
|
||||||
|
Next
|
||||||
If Dr IsNot Nothing Then
|
If Dr IsNot Nothing Then
|
||||||
IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr)
|
IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr)
|
||||||
DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString)
|
DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString)
|
||||||
@@ -4943,8 +4994,11 @@ Partial Class PV
|
|||||||
TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString
|
TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString
|
||||||
TxtPoliza.Text = Dr("NumPoliza").ToString
|
TxtPoliza.Text = Dr("NumPoliza").ToString
|
||||||
TxtImporteAjuste.Text = Dr("Importe").ToString
|
TxtImporteAjuste.Text = Dr("Importe").ToString
|
||||||
DdlPSAjuste.SelectedValue = Dr("CvePS").ToString
|
DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString)
|
||||||
DdlPSAjuste.SelectedText = Dr("PS").ToString
|
CargaPSAjuste()
|
||||||
|
DdlPSAjuste.SelectedValueExist(Dr("CvePS").ToString)
|
||||||
|
TxtPUFactura.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(4)
|
||||||
|
TxtPUFactura.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
||||||
@@ -4957,6 +5011,23 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlPSAjuste_selectedindexchange(sender As Object, e As EventArgs)
|
Protected Sub DdlPSAjuste_selectedindexchange(sender As Object, e As EventArgs)
|
||||||
|
If DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
|
||||||
|
Dim Index As Integer = DdlPSAjuste.SelectedIndex
|
||||||
|
Dim Contador As Integer = 1
|
||||||
|
Dim PUFactura As Decimal = 0
|
||||||
|
For Each Dr As DataRow In DtPUFacturas.Rows
|
||||||
|
If Index = Contador Then
|
||||||
|
PUFactura = Dr("PU").ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
Contador += 1
|
||||||
|
Next
|
||||||
|
TxtPUFactura.Text = PUFactura.FormatoNumero(4)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
|
||||||
|
TxtPUFactura.Text = ""
|
||||||
|
End If
|
||||||
|
|
||||||
CalculaPorcentajeAjuste()
|
CalculaPorcentajeAjuste()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -4964,6 +5035,10 @@ Partial Class PV
|
|||||||
CalculaPorcentajeAjuste()
|
CalculaPorcentajeAjuste()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnCalcularImporteAjuste_Click(sender As Object, e As EventArgs)
|
||||||
|
CalculaPorcentajeAjuste()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CalculaPorcentajeAjuste()
|
Private Sub CalculaPorcentajeAjuste()
|
||||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" Then
|
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" Then
|
||||||
Dim CveMarca As Integer = -1
|
Dim CveMarca As Integer = -1
|
||||||
@@ -4974,7 +5049,7 @@ Partial Class PV
|
|||||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||||
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
||||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * AsignaPUFijo(DdlPSAjuste.SelectedValue.ToEntero)).FormatoNumero
|
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPUFactura.Text.ToDouble).FormatoNumero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjAcum.Dispose()
|
ObjAcum.Dispose()
|
||||||
@@ -4982,30 +5057,30 @@ Partial Class PV
|
|||||||
UpAjuste.Update()
|
UpAjuste.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function AsignaPUFijo(CvePS As Integer) As Double
|
'Private Function AsignaPUFijo(CvePS As Integer) As Double
|
||||||
Select Case CvePS
|
' Select Case CvePS
|
||||||
Case 360449
|
' Case 360449
|
||||||
Return 500
|
' Return 500
|
||||||
Case 360450
|
' Case 360450
|
||||||
Return 1000
|
' Return 1000
|
||||||
Case 360451
|
' Case 360451
|
||||||
Return 2000
|
' Return 2000
|
||||||
Case 360452
|
' Case 360452
|
||||||
Return 3000
|
' Return 3000
|
||||||
Case 360453
|
' Case 360453
|
||||||
Return 4000
|
' Return 4000
|
||||||
Case 360455
|
' Case 360455
|
||||||
Return 5000
|
' Return 5000
|
||||||
Case 365353
|
' Case 365353
|
||||||
Return 6000
|
' Return 6000
|
||||||
Case 360454
|
' Case 360454
|
||||||
Return 1500 'lth. acumulador
|
' Return 1500 'lth. acumulador
|
||||||
Case 370810
|
' Case 370810
|
||||||
Return 2500 'lth. 1872
|
' Return 2500 'lth. 1872
|
||||||
Case Else
|
' Case Else
|
||||||
Return 5000
|
' Return 5000
|
||||||
End Select
|
' End Select
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
Private Sub GuardaAjuste()
|
Private Sub GuardaAjuste()
|
||||||
Dim CargoAnterior As Double = 0
|
Dim CargoAnterior As Double = 0
|
||||||
@@ -5015,7 +5090,7 @@ Partial Class PV
|
|||||||
Row = TmpDTAjustes.NewRow
|
Row = TmpDTAjustes.NewRow
|
||||||
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||||
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||||
Row("CveTipoDefecto") = DdlTipoDefecto.ToEntero
|
Row("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||||
Row("CodigoEnsamble") = TxtCodEnsamble.Text
|
Row("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||||
Row("CodigoLinea") = TxtCodLinea.Text
|
Row("CodigoLinea") = TxtCodLinea.Text
|
||||||
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||||
@@ -5027,7 +5102,9 @@ Partial Class PV
|
|||||||
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||||
Row("ConsecutivoVenta") = ConsecutivoVenta
|
Row("ConsecutivoVenta") = ConsecutivoVenta
|
||||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||||
Row("PS") = DdlPSAjuste.SelectedText
|
Row("PS") = DdlPSAjuste.SelectedItem.Text
|
||||||
|
Row("CveVenta") = DdlFacturas.SelectedValue
|
||||||
|
Row("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||||
Row("Cantidad") = 1
|
Row("Cantidad") = 1
|
||||||
Dim CveUM As Integer = -1
|
Dim CveUM As Integer = -1
|
||||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -5043,7 +5120,7 @@ Partial Class PV
|
|||||||
ElseIf ModalidadAjuste = "U" Then
|
ElseIf ModalidadAjuste = "U" Then
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
TmpDTAjustes.Rows(IndexAjuste)("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
TmpDTAjustes.Rows(IndexAjuste)("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CveTipoDefecto") = DdlTipoDefecto.ToEntero
|
TmpDTAjustes.Rows(IndexAjuste)("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoEnsamble") = TxtCodEnsamble.Text
|
TmpDTAjustes.Rows(IndexAjuste)("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoLinea") = TxtCodLinea.Text
|
TmpDTAjustes.Rows(IndexAjuste)("CodigoLinea") = TxtCodLinea.Text
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoInspeccion") = TxtCodInspeccion.Text
|
TmpDTAjustes.Rows(IndexAjuste)("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||||
@@ -5055,7 +5132,9 @@ Partial Class PV
|
|||||||
TmpDTAjustes.Rows(IndexAjuste)("Importe") = TxtImporteAjuste.Text.ToDouble
|
TmpDTAjustes.Rows(IndexAjuste)("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta
|
TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CvePS") = DdlPSAjuste.SelectedValue
|
TmpDTAjustes.Rows(IndexAjuste)("CvePS") = DdlPSAjuste.SelectedValue
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("PS") = DdlPSAjuste.SelectedText
|
TmpDTAjustes.Rows(IndexAjuste)("PS") = DdlPSAjuste.SelectedItem.Text
|
||||||
|
TmpDTAjustes.Rows(IndexAjuste)("CveVenta") = DdlFacturas.SelectedValue
|
||||||
|
TmpDTAjustes.Rows(IndexAjuste)("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("Cantidad") = 1
|
TmpDTAjustes.Rows(IndexAjuste)("Cantidad") = 1
|
||||||
Dim CveUM As Integer = -1
|
Dim CveUM As Integer = -1
|
||||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -5082,7 +5161,7 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dr("Descuento") = Math.Round((AsignaPUFijo(DdlPSAjuste.SelectedValue.ToEntero) - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
|
Dr("Descuento") = Math.Round((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
|
||||||
|
|
||||||
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
|
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
|
||||||
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||||
@@ -5390,4 +5469,6 @@ Partial Class PV
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -40,14 +40,14 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-blue">
|
<div class="caption font-blue">
|
||||||
<i class="fa fa-file-text-o font-blue"></i>
|
<i class="fa fa-file-text-o font-blue"></i>
|
||||||
<span class="caption-subject bold uppercase">Facturas emitidas en el sat sin registrar (<%= GVConciliacionemitidasSAT.Rows.Count %>)</span>
|
<span class="caption-subject bold uppercase">Facturas emitidas en el sat sin registrar <asp:Literal ID="Ltlsinregistrar" runat="server"></asp:Literal> de <asp:Literal ID="ltlTotal" runat="server"></asp:Literal></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<a href="javascript:;" class="collapse"></a>
|
<a href="javascript:;" class="collapse"></a>
|
||||||
</div>
|
</div>
|
||||||
<div style="float: right;">
|
<div style="float: right;"><label id="Contador"></label>
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="FiltrarTabla('TxtBusqueda','GVConciliacionemitidasSAT')" style="display: inline-block; margin-right: -20px; width: 150px;">
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="FiltrarTabla('#TxtBusqueda','.GVConciliacionemitidasSAT','#Contador')" style="display: inline-block; margin-right: -20px; width: 150px;">
|
||||||
<a href="javascript:;" onclick="FiltrarTabla('TxtBusqueda','GVConciliacionemitidasSAT')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold blue"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
|
<a href="javascript:;" onclick="FiltrarTabla('#TxtBusqueda','.GVConciliacionemitidasSAT','#Contador')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold blue"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body ">
|
<div class="portlet-body ">
|
||||||
@@ -101,11 +101,12 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="">
|
<asp:TemplateField HeaderText="">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" NavigateUrl='<%# Eval("CveVenta","/Ventas/Ventas.aspx?CveVenta={0}") %>' CssClass="btn btn-circle btn-sm btn-success" Visible='<%# (Eval("CveVenta").ToString() =="" ? false :true) %>' ><i class="fa fa-info"></i>r</asp:HyperLink>
|
<asp:HyperLink runat="server" NavigateUrl='<%# Eval("CveVenta","/Ventas/Ventas.aspx?CveVenta={0}") %>' CssClass="btn btn-circle btn-sm btn-success" Visible='<%# (Eval("CveVenta").ToString() =="" ? false :true) %>'><i class="fa fa-info"></i>r</asp:HyperLink>
|
||||||
<asp:LinkButton ID="LnkRegistrar" Visible='<%# Eval("CveVenta").ToString() =="" %>' runat="server" data-toggle="tooltip" ToolTip="Registrar" CssClass="btn btn-circle btn-sm blue" OnClick="LnkRegistrar_Click"><i class="fa fa-plus"></i></asp:LinkButton>
|
<asp:LinkButton ID="LnkRegistrar" Visible='<%# Eval("CveVenta").ToString() =="" %>' runat="server" data-toggle="tooltip" ToolTip="Registrar" CssClass="btn btn-circle btn-sm blue" OnClick="LnkRegistrar_Click"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
<HeaderStyle CssClass ="SearchADHeader" />
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -153,6 +154,15 @@
|
|||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script>
|
<script>
|
||||||
$('#DModalDefaults').modal();
|
$('#DModalDefaults').modal();
|
||||||
|
|
||||||
|
function FiltrarTabla(idtxt, idtable, idcontador) {
|
||||||
|
if ($('' + idtxt).val() == '') { $('table' + idtable + ' tr').css('display', 'table-row'); }
|
||||||
|
else { $('table' + idtable + ' tr:not(.ADtr):not(.SearchADHeader)').css('display', 'none'); $('table' + idtable + ' tr:contains("' + $('' + idtxt).val() + '")').css('display', 'table-row'); }
|
||||||
|
if ($('' + idcontador).length > 0) {
|
||||||
|
$('' + idcontador).html('(' + $('' + idtable + ' tr:not(.ADtr):not(.SearchADHeader):visible').length +'/'+ $('' + idtable + ' tr:not(.ADtr):not(.SearchADHeader)').length + ')');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using Extensiones;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using ADSistemaLibrary.SatXml;
|
using ADSistemaLibrary.SatXml;
|
||||||
|
//using ADS_CFDI_SAT;
|
||||||
|
|
||||||
public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -52,6 +53,8 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
ClsVentas ObjV = new ClsVentas();
|
ClsVentas ObjV = new ClsVentas();
|
||||||
ObjV.ConciliacionemitidasSATGet(UsuarioActual.CveEmpresa);
|
ObjV.ConciliacionemitidasSATGet(UsuarioActual.CveEmpresa);
|
||||||
GVConciliacionemitidasSAT.DataSource = ObjV.DtResultados.FiltraParametros("", "CveVenta");
|
GVConciliacionemitidasSAT.DataSource = ObjV.DtResultados.FiltraParametros("", "CveVenta");
|
||||||
|
Ltlsinregistrar.Text = $"{ObjV.DtResultados.COUNT("FolioFiscal","CveVenta IS NULL")}";
|
||||||
|
ltlTotal.Text = $"{ObjV.DtResultados.Rows.Count}";
|
||||||
ObjV.Dispose();
|
ObjV.Dispose();
|
||||||
GVConciliacionemitidasSAT.DataBind();
|
GVConciliacionemitidasSAT.DataBind();
|
||||||
UpDatosReporte.Update();
|
UpDatosReporte.Update();
|
||||||
@@ -229,6 +232,39 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
int CvePsReconstruccion = DdlPS.SelectedValue.ToEntero();
|
int CvePsReconstruccion = DdlPS.SelectedValue.ToEntero();
|
||||||
int CveSubProyectoReconstruccion = DdlSubProyectoDatos.SelectedValue.ToEntero();
|
int CveSubProyectoReconstruccion = DdlSubProyectoDatos.SelectedValue.ToEntero();
|
||||||
//Modelos.Factura.MMensajeFactura resp;
|
//Modelos.Factura.MMensajeFactura resp;
|
||||||
|
|
||||||
|
string Moneda = objxml.comprobante.Moneda;
|
||||||
|
if (objxml.comprobante.Version == "3.2")
|
||||||
|
{
|
||||||
|
switch (Moneda)
|
||||||
|
{
|
||||||
|
case "Peso Mexicano": Moneda = "MXN"; break;
|
||||||
|
case "Dolar Americano": Moneda = "USD"; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
string formadepago = objxml.comprobante.FormaPago;
|
||||||
|
string metododepago = objxml.comprobante.MetodoPago;
|
||||||
|
if (objxml.comprobante.Version == "3.2")
|
||||||
|
{
|
||||||
|
switch (objxml.comprobante.MetodoPago)//si es correcto estan invertidos
|
||||||
|
{
|
||||||
|
case "TRANSFERENCIA ELECTRONICA": formadepago = "03"; break;
|
||||||
|
default: formadepago = objxml.comprobante.MetodoPago; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (objxml.comprobante.Version == "3.2")
|
||||||
|
{
|
||||||
|
switch (objxml.comprobante.FormaPago)//si es correcto estan invertidos
|
||||||
|
{
|
||||||
|
case "PAGO EN UNA SOLA EXHIBICION": metododepago = "PUE"; break;
|
||||||
|
default: metododepago = objxml.comprobante.FormaPago; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Modelos.Factura objfact = new Modelos.Factura(UsuarioActual)
|
Modelos.Factura objfact = new Modelos.Factura(UsuarioActual)
|
||||||
{
|
{
|
||||||
TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.TextoLimpio,//?que es esto
|
TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.TextoLimpio,//?que es esto
|
||||||
@@ -242,8 +278,8 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
TipoCambio = objxml.comprobante.TipoCambio,
|
TipoCambio = objxml.comprobante.TipoCambio,
|
||||||
//ConvertirPesos =false,//?para que sirve
|
//ConvertirPesos =false,//?para que sirve
|
||||||
MonedaSAT = objxml.comprobante.Moneda,
|
MonedaSAT = objxml.comprobante.Moneda,
|
||||||
CveMoneda = GlobalDTMonedas.FiltroPrimeroValor("CveMoneda", $" AbreviaturaSAT= '{objxml.comprobante.Moneda}' ").ToEntero(),
|
CveMoneda = GlobalDTMonedas.FiltroPrimeroValor("CveMoneda", $" AbreviaturaSAT= '{Moneda}' ").ToEntero(),
|
||||||
Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $" AbreviaturaSAT= '{objxml.comprobante.Moneda}' "),
|
Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $" AbreviaturaSAT= '{Moneda}' "),
|
||||||
TipoDocto = objxml.comprobante.TipoDeComprobanteSIG,
|
TipoDocto = objxml.comprobante.TipoDeComprobanteSIG,
|
||||||
RefDocto = "",
|
RefDocto = "",
|
||||||
CveMesa = -1,
|
CveMesa = -1,
|
||||||
@@ -292,11 +328,11 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
objfact.CveAlmacen = -1;
|
objfact.CveAlmacen = -1;
|
||||||
objfact.CveFormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("CveFormaPago", $"ClaveFormaPagoSAT = '{objxml.comprobante.FormaPago}'").ToEntero();
|
objfact.CveFormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("CveFormaPago", $"ClaveFormaPagoSAT = '{formadepago}'").ToEntero();
|
||||||
objfact.FormaPagoSAT33 = objxml.comprobante.FormaPago;
|
objfact.FormaPagoSAT33 = objxml.comprobante.FormaPago;
|
||||||
objfact.FormaPago33 = objxml.comprobante.FormaPagoTexto;
|
objfact.FormaPago33 = objxml.comprobante.FormaPagoTexto;
|
||||||
objfact.CveMetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("CveMetodoPago", $" ClaveMetodoPagoSAT = '{objxml.comprobante.MetodoPago}'").ToEntero();
|
objfact.CveMetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("CveMetodoPago", $" ClaveMetodoPagoSAT = '{metododepago}'").ToEntero();
|
||||||
objfact.CveMetodoPago = GlobalDTVtaMetodoPago.FiltroPrimeroValor("CveMetodoPago", $" ClaveMetodoPagoSAT = '{objxml.comprobante.MetodoPago}'").ToEntero();
|
objfact.CveMetodoPago = GlobalDTVtaMetodoPago.FiltroPrimeroValor("CveMetodoPago", $" ClaveMetodoPagoSAT = '{metododepago}'").ToEntero();
|
||||||
objfact.ClaveMetodoPagoSAT = objxml.comprobante.MetodoPago;
|
objfact.ClaveMetodoPagoSAT = objxml.comprobante.MetodoPago;
|
||||||
objfact.MetodoPago33 = objxml.comprobante.MetodoPagoTexto;
|
objfact.MetodoPago33 = objxml.comprobante.MetodoPagoTexto;
|
||||||
objfact.CveUsoCFDI = get_GlobalDTSATUsosCFDI(-1).FiltroPrimeroValor("CveUsoCFDI", $"UsoCFDI = '{objxml.receptor.UsoCFDI}'").ToEntero();
|
objfact.CveUsoCFDI = get_GlobalDTSATUsosCFDI(-1).FiltroPrimeroValor("CveUsoCFDI", $"UsoCFDI = '{objxml.receptor.UsoCFDI}'").ToEntero();
|
||||||
@@ -304,16 +340,16 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
objfact.ClaveUsoCFDI = objxml.receptor.UsoCFDI;
|
objfact.ClaveUsoCFDI = objxml.receptor.UsoCFDI;
|
||||||
objfact.CveClienteSucursal = -1;
|
objfact.CveClienteSucursal = -1;
|
||||||
|
|
||||||
objfact.DtDetalle = CreaDTDetalle(UsuarioActual, objxml.conceptos, objfact.CveSubProyecto, CvePsReconstruccion);
|
objfact.DtDetalle = CreaDTDetalle(UsuarioActual, objxml.conceptos, objfact.CveSubProyecto, CvePsReconstruccion, objxml);
|
||||||
|
|
||||||
|
|
||||||
|
objfact.TipoCambioDolares = objxml.comprobante.TipoCambio;
|
||||||
objfact.SubTotal = objxml.comprobante.SubTotal;
|
objfact.SubTotal = objxml.comprobante.SubTotal;
|
||||||
objfact.Descuento = objxml.comprobante.Descuento;
|
objfact.Descuento = objxml.comprobante.Descuento;
|
||||||
objfact.Amortizacion = 0;
|
objfact.Amortizacion = 0;
|
||||||
objfact.IVA = objxml.Impuestos.Where(x => x.Impuesto == "002" && x.Tipo == "Traslados").Sum(item => item.Importe);
|
objfact.IVA = objxml.Impuestos.Where(x => (x.Impuesto == "002" || x.Impuesto == "IVA") && x.Tipo == "Traslados").Sum(item => item.Importe);
|
||||||
objfact.RetIVA = objxml.Impuestos.Where(x => x.Impuesto == "002" && x.Tipo == "Retenciones").Sum(item => item.Importe);
|
objfact.RetIVA = objxml.Impuestos.Where(x => (x.Impuesto == "002" || x.Impuesto == "IVA") && x.Tipo == "Retenciones").Sum(item => item.Importe);
|
||||||
objfact.RetISR = objxml.Impuestos.Where(x => x.Impuesto == "001" && x.Tipo == "Retenciones").Sum(item => item.Importe);
|
objfact.RetISR = objxml.Impuestos.Where(x => (x.Impuesto == "001" || x.Impuesto == "ISR") && x.Tipo == "Retenciones").Sum(item => item.Importe);
|
||||||
objfact.IEPS = objxml.Impuestos.Where(x => x.Impuesto == "003").Sum(item => item.Importe);
|
objfact.IEPS = objxml.Impuestos.Where(x => (x.Impuesto == "003" || x.Impuesto == "IEPS")).Sum(item => item.Importe);
|
||||||
objfact.Total = objxml.comprobante.Total;
|
objfact.Total = objxml.comprobante.Total;
|
||||||
objfact.TotalOtrosConceptos = 0;
|
objfact.TotalOtrosConceptos = 0;
|
||||||
|
|
||||||
@@ -328,7 +364,7 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
}
|
}
|
||||||
return objfact;
|
return objfact;
|
||||||
}
|
}
|
||||||
private DataTable CreaDTDetalle(Usuario UsuarioActual, List<CFDIConcepto> conceptos, int CveSubProyecto, int CvePsReconstruccion)
|
private DataTable CreaDTDetalle(Usuario UsuarioActual, List<CFDIConcepto> conceptos, int CveSubProyecto, int CvePsReconstruccion, XmlSatCFDI objxml)
|
||||||
{
|
{
|
||||||
bool continuar = true;
|
bool continuar = true;
|
||||||
var TmpDT = new DataTable();
|
var TmpDT = new DataTable();
|
||||||
@@ -433,9 +469,24 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
|
|
||||||
}
|
}
|
||||||
DrSubProyecto = get_GlobalDTSubProyectos(-1, CveSubProyecto, UsuarioActual.CveEmpresa).Rows[0];
|
DrSubProyecto = get_GlobalDTSubProyectos(-1, CveSubProyecto, UsuarioActual.CveEmpresa).Rows[0];
|
||||||
|
|
||||||
|
|
||||||
|
if (objxml.comprobante.Version == "3.2")
|
||||||
|
{
|
||||||
|
item.ClaveUnidad = item.Unidad;
|
||||||
|
switch (item.ClaveUnidad)
|
||||||
|
{
|
||||||
|
case "TON": item.ClaveUnidad = "A75"; break;
|
||||||
|
case "No aplica": item.ClaveUnidad = "ACT"; break;
|
||||||
|
case "LITROS": item.ClaveUnidad = "E32"; break;
|
||||||
|
case "M3-KM": item.ClaveUnidad = "M73"; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
DrUmSat = GlobalDTPSATUM.FiltroPrimero(string.Format("SATClaveUnidadMedida='{0}'", item.ClaveUnidad));
|
DrUmSat = GlobalDTPSATUM.FiltroPrimero(string.Format("SATClaveUnidadMedida='{0}'", item.ClaveUnidad));
|
||||||
}
|
}
|
||||||
if (continuar && DrUmSat == null ) { continuar = false; strErrores.AppendLine($"No se encontro la unidad de medida en el catalogo del sat '{item.ClaveUnidad}', favor de contactar a soporte tecnico."); }
|
if (continuar && DrUmSat == null) { continuar = false; strErrores.AppendLine($"No se encontro la unidad de medida en el catalogo del sat '{item.ClaveUnidad}', favor de contactar a soporte tecnico."); }
|
||||||
if (continuar)
|
if (continuar)
|
||||||
{
|
{
|
||||||
DrUm = get_GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveUnidadMedidaSAT={0}", DrUmSat["CveSATUnidadMedida"]));
|
DrUm = get_GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveUnidadMedidaSAT={0}", DrUmSat["CveSATUnidadMedida"]));
|
||||||
@@ -475,24 +526,34 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
Row["CveTipoPS"] = DrPS["CveTipoPS"];
|
Row["CveTipoPS"] = DrPS["CveTipoPS"];
|
||||||
Row["CveTipoInvPS"] = DrPS["Inv_CveMetodoInventario"];
|
Row["CveTipoInvPS"] = DrPS["Inv_CveMetodoInventario"];
|
||||||
Row["CveTamaño"] = DrPS["CveTamaño"];
|
Row["CveTamaño"] = DrPS["CveTamaño"];
|
||||||
ADSistemaLibrary.SatXml.CFDIConceptoImpuesto impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "002" && x.Tipo == "Traslado");
|
CFDIConceptoImpuesto impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "002" && x.Tipo == "Traslado");
|
||||||
decimal sumaimpuesto=0;
|
decimal sumaimpuesto = 0;
|
||||||
decimal PorcentajeIVA = 0;
|
decimal PorcentajeIVA = 0;
|
||||||
if (impuesto != null)
|
if (impuesto != null)
|
||||||
{
|
{
|
||||||
decimal decimpuesto = 0;
|
decimal decimpuesto = 0;
|
||||||
decimal.TryParse(impuesto.TasaOCuota, out decimpuesto);
|
decimal.TryParse(impuesto.TasaOCuota, out decimpuesto);
|
||||||
PorcentajeIVA = decimpuesto/100;
|
PorcentajeIVA = decimpuesto / 100;
|
||||||
Row["PorcentajeIVA"] = decimpuesto / 100;
|
Row["PorcentajeIVA"] = PorcentajeIVA;
|
||||||
Row["ImporteIVA"] = decimpuesto / 100;// impuesto.Importe;//Math.Round(item.Importe * (decimpuesto/100), 2);
|
Row["ImporteIVA"] = impuesto.Importe ;// impuesto.Importe;//Math.Round(item.Importe * (decimpuesto/100), 2);
|
||||||
sumaimpuesto += impuesto.Importe;
|
sumaimpuesto += impuesto.Importe;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Row["PorcentajeIVA"] = 0;
|
Row["PorcentajeIVA"] = 0;
|
||||||
Row["ImporteIVA"] = 0;
|
Row["ImporteIVA"] = 0;
|
||||||
|
if (objxml.comprobante.Version == "3.2")
|
||||||
|
{
|
||||||
|
if (item.Importe > 0)
|
||||||
|
{
|
||||||
|
PorcentajeIVA = .16M;
|
||||||
|
Row["PorcentajeIVA"] = PorcentajeIVA;
|
||||||
|
Row["ImporteIVA"] = item.Importe * PorcentajeIVA;//Math.Round(((item.Importe / (1 + PorcentajeIVA))*.16M),2);
|
||||||
|
|
||||||
}
|
}
|
||||||
Row["IVA"] = Row["PorcentajeIVA"];
|
}
|
||||||
|
}
|
||||||
|
Row["IVA"] = Row["ImporteIVA"];
|
||||||
impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "003" && x.Tipo == "Traslado");
|
impuesto = item.Impuestos.FirstOrDefault(x => x.Impuesto == "003" && x.Tipo == "Traslado");
|
||||||
if (impuesto != null)
|
if (impuesto != null)
|
||||||
{
|
{
|
||||||
@@ -541,7 +602,7 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
Row["TipoDescuento"] = "2";
|
Row["TipoDescuento"] = "2";
|
||||||
|
|
||||||
//Row["Total"] = item.Importe - sumaimpuesto;
|
//Row["Total"] = item.Importe - sumaimpuesto;
|
||||||
Row["Total"] = item.Importe /(1+ PorcentajeIVA);
|
Row["Total"] = item.Importe / (1 + PorcentajeIVA);
|
||||||
Row["TotalImporte"] = item.Importe;
|
Row["TotalImporte"] = item.Importe;
|
||||||
|
|
||||||
Row["SATClaveProdServ"] = item.ClaveProdServ;
|
Row["SATClaveProdServ"] = item.ClaveProdServ;
|
||||||
@@ -579,14 +640,12 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
//SatCFDI
|
|
||||||
namespace ADS_CFDI_SAT
|
namespace ADS_CFDI_SAT
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// clase para contener los valores de un xml CFDI
|
/// clase para contener los valores de un xml CFDI cambio norama
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class XmlSatCFDI
|
public class XmlSatCFDI
|
||||||
{
|
{
|
||||||
@@ -660,6 +719,7 @@ namespace ADS_CFDI_SAT
|
|||||||
|
|
||||||
return lcon;
|
return lcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static XmlSatCFDI readXML(string fileUrl)
|
public static XmlSatCFDI readXML(string fileUrl)
|
||||||
{
|
{
|
||||||
XmlSatCFDI xmlCFDI = new XmlSatCFDI();
|
XmlSatCFDI xmlCFDI = new XmlSatCFDI();
|
||||||
@@ -677,7 +737,11 @@ namespace ADS_CFDI_SAT
|
|||||||
//(canread = xtr.Read()) para evitar ciclos infinitos, todos los .Read() los guardo en la variable Canread y en los while reviso primero esta variable
|
//(canread = xtr.Read()) para evitar ciclos infinitos, todos los .Read() los guardo en la variable Canread y en los while reviso primero esta variable
|
||||||
if (File.Exists(fileUrl))
|
if (File.Exists(fileUrl))
|
||||||
{
|
{
|
||||||
using (XmlTextReader xtr = new XmlTextReader(fileUrl))
|
XmlReaderSettings settings = new XmlReaderSettings();
|
||||||
|
settings.ConformanceLevel = ConformanceLevel.Fragment;
|
||||||
|
settings.IgnoreWhitespace = true;
|
||||||
|
settings.IgnoreComments = true;
|
||||||
|
using (XmlReader xtr = XmlReader.Create(fileUrl, settings))
|
||||||
{
|
{
|
||||||
|
|
||||||
while ((canread = xtr.Read()) && !(xtr.NodeType == XmlNodeType.Element && xtr.Name == keyComprobante))
|
while ((canread = xtr.Read()) && !(xtr.NodeType == XmlNodeType.Element && xtr.Name == keyComprobante))
|
||||||
@@ -686,40 +750,40 @@ namespace ADS_CFDI_SAT
|
|||||||
}
|
}
|
||||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyComprobante)
|
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyComprobante)
|
||||||
{
|
{
|
||||||
xmlCFDI.comprobante.xmlns_cfdi = xtr.GetAttribute("xmlns:cfdi");
|
|
||||||
xmlCFDI.comprobante.xmlns_xsi = xtr.GetAttribute("xmlns:xsi");
|
|
||||||
xmlCFDI.comprobante.xsi_schemaLocation = xtr.GetAttribute("xsi:schemaLocation");
|
|
||||||
xmlCFDI.comprobante.Version = xtr.GetAttribute("Version");
|
|
||||||
xmlCFDI.comprobante.Serie = xtr.GetAttribute("Serie");
|
|
||||||
xmlCFDI.comprobante.Folio = xtr.GetAttribute("Folio");
|
|
||||||
xmlCFDI.comprobante.Fecha = xtr.GetAttribute("Fecha");
|
|
||||||
xmlCFDI.comprobante.Moneda = xtr.GetAttribute("Moneda");
|
|
||||||
decimal SubTotal = 0;
|
|
||||||
decimal.TryParse(xtr.GetAttribute("SubTotal"), out SubTotal);
|
|
||||||
xmlCFDI.comprobante.SubTotal = SubTotal;
|
|
||||||
|
|
||||||
decimal Total = 0;
|
|
||||||
decimal.TryParse(xtr.GetAttribute("Total"), out Total);
|
|
||||||
xmlCFDI.comprobante.Total = Total;
|
|
||||||
|
|
||||||
decimal Descuento = 0;
|
|
||||||
decimal.TryParse(xtr.GetAttribute("Descuento"), out Descuento);
|
|
||||||
xmlCFDI.comprobante.Descuento = Descuento;
|
|
||||||
|
|
||||||
decimal TipoCambio = 0;
|
|
||||||
decimal.TryParse(xtr.GetAttribute("TipoCambio"), out TipoCambio);
|
|
||||||
xmlCFDI.comprobante.TipoCambio = TipoCambio;
|
|
||||||
|
|
||||||
xmlCFDI.comprobante.TipoDeComprobante = xtr.GetAttribute("TipoDeComprobante");
|
|
||||||
xmlCFDI.comprobante.FormaPago = xtr.GetAttribute("FormaPago");
|
|
||||||
xmlCFDI.comprobante.MetodoPago = xtr.GetAttribute("MetodoPago");
|
|
||||||
xmlCFDI.comprobante.CondicionesDePago = xtr.GetAttribute("CondicionesDePago");
|
|
||||||
xmlCFDI.comprobante.LugarExpedicion = xtr.GetAttribute("LugarExpedicion");
|
|
||||||
xmlCFDI.comprobante.Confirmacion = xtr.GetAttribute("Confirmacion");
|
|
||||||
xmlCFDI.comprobante.NoCertificado = xtr.GetAttribute("NoCertificado");
|
|
||||||
xmlCFDI.comprobante.Sello = xtr.GetAttribute("Sello");
|
|
||||||
xmlCFDI.comprobante.Certificado = xtr.GetAttribute("Certificado");
|
|
||||||
int Nivel = xtr.Depth;
|
int Nivel = xtr.Depth;
|
||||||
|
bool cont = xtr.MoveToFirstAttribute();
|
||||||
|
while (cont)
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (xtr.Name.ToUpper())
|
||||||
|
{
|
||||||
|
case "XMLNS:CFDI": xmlCFDI.comprobante.xmlns_cfdi = xtr.Value; break;
|
||||||
|
case "XMLNS:XSI": xmlCFDI.comprobante.xmlns_xsi = xtr.Value; break;
|
||||||
|
case "XSI:SCHEMALOCATION": xmlCFDI.comprobante.xsi_schemaLocation = xtr.Value; break;
|
||||||
|
case "VERSION": xmlCFDI.comprobante.Version = xtr.Value; break;
|
||||||
|
case "SERIE": xmlCFDI.comprobante.Serie = xtr.Value; break;
|
||||||
|
case "FOLIO": xmlCFDI.comprobante.Folio = xtr.Value; break;
|
||||||
|
case "FECHA": xmlCFDI.comprobante.Fecha = xtr.Value; break;
|
||||||
|
case "MONEDA": xmlCFDI.comprobante.Moneda = xtr.Value; break;
|
||||||
|
case "SUBTOTAL": decimal SubTotal = 0; decimal.TryParse(xtr.Value, out SubTotal); xmlCFDI.comprobante.SubTotal = SubTotal; break;
|
||||||
|
case "TOTAL": decimal Total = 0; decimal.TryParse(xtr.Value, out Total); xmlCFDI.comprobante.Total = Total; break;
|
||||||
|
case "DESCUENTO": decimal Descuento = 0; decimal.TryParse(xtr.Value, out Descuento); xmlCFDI.comprobante.Descuento = Descuento; break;
|
||||||
|
case "TIPOCAMBIO": decimal TipoCambio = 0; decimal.TryParse(xtr.Value, out TipoCambio); xmlCFDI.comprobante.TipoCambio = TipoCambio; break;
|
||||||
|
case "TIPODECOMPROBANTE": xmlCFDI.comprobante.TipoDeComprobante = xtr.Value; break;
|
||||||
|
case "FORMAPAGO": xmlCFDI.comprobante.FormaPago = xtr.Value; break;
|
||||||
|
case "FORMADEPAGO": xmlCFDI.comprobante.FormaPago = xtr.Value; break;
|
||||||
|
case "METODOPAGO": xmlCFDI.comprobante.MetodoPago = xtr.Value; break;
|
||||||
|
case "METODODEPAGO": xmlCFDI.comprobante.MetodoPago = xtr.Value; break;
|
||||||
|
case "CONDICIONESDEPAGO": xmlCFDI.comprobante.CondicionesDePago = xtr.Value; break;
|
||||||
|
case "LUGAREXPEDICION": xmlCFDI.comprobante.LugarExpedicion = xtr.Value; break;
|
||||||
|
case "CONFIRMACION": xmlCFDI.comprobante.Confirmacion = xtr.Value; break;
|
||||||
|
case "NOCERTIFICADO": xmlCFDI.comprobante.NoCertificado = xtr.Value; break;
|
||||||
|
case "SELLO": xmlCFDI.comprobante.Sello = xtr.Value; break;
|
||||||
|
case "CERTIFICADO": xmlCFDI.comprobante.Certificado = xtr.Value; break;
|
||||||
|
}
|
||||||
|
cont = xtr.MoveToNextAttribute();
|
||||||
|
}
|
||||||
|
cont = xtr.MoveToFirstAttribute();
|
||||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||||
while (canread && xtr.Depth > Nivel)
|
while (canread && xtr.Depth > Nivel)
|
||||||
{
|
{
|
||||||
@@ -727,8 +791,18 @@ namespace ADS_CFDI_SAT
|
|||||||
{
|
{
|
||||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyCfdiRelacionados)
|
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyCfdiRelacionados)
|
||||||
{
|
{
|
||||||
string TipoRelacion = xtr.GetAttribute("TipoRelacion");
|
|
||||||
int cDepth = xtr.Depth;
|
int cDepth = xtr.Depth;
|
||||||
|
|
||||||
|
string TipoRelacion = null;
|
||||||
|
cont = xtr.MoveToFirstAttribute();
|
||||||
|
while (cont)
|
||||||
|
{
|
||||||
|
switch (xtr.Name.ToUpper())
|
||||||
|
{
|
||||||
|
case "TIPORELACION": TipoRelacion = xtr.Value; break;
|
||||||
|
}
|
||||||
|
cont = xtr.MoveToNextAttribute();
|
||||||
|
}
|
||||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||||
while (canread && xtr.Depth > cDepth)
|
while (canread && xtr.Depth > cDepth)
|
||||||
{
|
{
|
||||||
@@ -745,22 +819,40 @@ namespace ADS_CFDI_SAT
|
|||||||
}
|
}
|
||||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyEmisor)
|
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyEmisor)
|
||||||
{
|
{
|
||||||
xmlCFDI.emisor.RegimenFiscal = xtr.GetAttribute("RegimenFiscal");
|
|
||||||
xmlCFDI.emisor.Nombre = xtr.GetAttribute("Nombre");
|
|
||||||
xmlCFDI.emisor.Rfc = xtr.GetAttribute("Rfc");
|
|
||||||
|
|
||||||
|
|
||||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
int curentNivel = xtr.Depth;
|
||||||
|
cont = xtr.MoveToFirstAttribute();
|
||||||
|
while (cont)
|
||||||
|
{
|
||||||
|
switch (xtr.Name.ToUpper())
|
||||||
|
{
|
||||||
|
case "REGIMENFISCAL": xmlCFDI.emisor.RegimenFiscal = xtr.Value; break;
|
||||||
|
case "NOMBRE": xmlCFDI.emisor.Nombre = xtr.Value; break;
|
||||||
|
case "RFC": xmlCFDI.emisor.Rfc = xtr.Value; break;
|
||||||
|
}
|
||||||
|
cont = xtr.MoveToNextAttribute();
|
||||||
|
}
|
||||||
|
while ((canread = xtr.Read()) && !(xtr.NodeType == XmlNodeType.Element && curentNivel >= xtr.Depth)) { }//continua hasta que no tenga nodos y (el nodo sea tipo elemnto y ete en el mismo nivel)
|
||||||
}
|
}
|
||||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyReceptor)
|
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyReceptor)
|
||||||
{
|
{
|
||||||
xmlCFDI.receptor.Rfc = xtr.GetAttribute("Rfc");
|
int curentNivel = xtr.Depth;
|
||||||
xmlCFDI.receptor.Nombre = xtr.GetAttribute("Nombre");
|
cont = xtr.MoveToFirstAttribute();
|
||||||
xmlCFDI.receptor.ResidenciaFiscal = xtr.GetAttribute("ResidenciaFiscal");
|
while (cont)
|
||||||
xmlCFDI.receptor.NumRegIdTrib = xtr.GetAttribute("NumRegIdTrib");
|
{
|
||||||
xmlCFDI.receptor.UsoCFDI = xtr.GetAttribute("UsoCFDI");
|
switch (xtr.Name.ToUpper())
|
||||||
|
{
|
||||||
|
case "RFC": xmlCFDI.receptor.Rfc = xtr.Value; break;
|
||||||
|
case "NOMBRE": xmlCFDI.receptor.Nombre = xtr.Value; break;
|
||||||
|
case "RESIDENCIAFISCAL": xmlCFDI.receptor.ResidenciaFiscal = xtr.Value; break;
|
||||||
|
case "NUMREGIDTRIB": xmlCFDI.receptor.NumRegIdTrib = xtr.Value; break;
|
||||||
|
case "USOCFDI": xmlCFDI.receptor.UsoCFDI = xtr.Value; break;
|
||||||
|
}
|
||||||
|
cont = xtr.MoveToNextAttribute();
|
||||||
|
}
|
||||||
|
|
||||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
while ((canread = xtr.Read()) && !(xtr.NodeType == XmlNodeType.Element && curentNivel >= xtr.Depth)) { }//continua hasta que no tenga nodos y (el nodo sea tipo elemnto y ete en el mismo nivel)
|
||||||
}
|
}
|
||||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyConceptos)
|
if (xtr.NodeType == XmlNodeType.Element && xtr.Name == keyConceptos)
|
||||||
{
|
{
|
||||||
@@ -770,25 +862,27 @@ namespace ADS_CFDI_SAT
|
|||||||
{
|
{
|
||||||
if (xtr.Name == "cfdi:Concepto")
|
if (xtr.Name == "cfdi:Concepto")
|
||||||
{
|
{
|
||||||
CFDIConcepto concepto = new CFDIConcepto();
|
|
||||||
concepto.ClaveProdServ = xtr.GetAttribute("ClaveProdServ");
|
|
||||||
concepto.NoIdentificacion = xtr.GetAttribute("NoIdentificacion");
|
|
||||||
concepto.Cantidad = xtr.GetAttribute("Cantidad");
|
|
||||||
concepto.ClaveUnidad = xtr.GetAttribute("ClaveUnidad");
|
|
||||||
concepto.Unidad = xtr.GetAttribute("Unidad");
|
|
||||||
decimal ValorUnitario = 0;
|
|
||||||
decimal.TryParse(xtr.GetAttribute("ValorUnitario"), out ValorUnitario);
|
|
||||||
concepto.ValorUnitario = ValorUnitario;
|
|
||||||
decimal Importe = 0;
|
|
||||||
decimal.TryParse(xtr.GetAttribute("Importe"), out Importe);
|
|
||||||
concepto.Importe = Importe;
|
|
||||||
decimal DDescuento = 0;
|
|
||||||
decimal.TryParse(xtr.GetAttribute("Descuento"), out DDescuento);
|
|
||||||
concepto.Descuento = DDescuento;
|
|
||||||
concepto.Descripcion = xtr.GetAttribute("Descripcion");
|
|
||||||
|
|
||||||
int cDepthb = xtr.Depth;
|
int cDepthb = xtr.Depth;
|
||||||
|
CFDIConcepto concepto = new CFDIConcepto();
|
||||||
|
|
||||||
|
cont = xtr.MoveToFirstAttribute();
|
||||||
|
while (cont)
|
||||||
|
{
|
||||||
|
switch (xtr.Name.ToUpper())
|
||||||
|
{
|
||||||
|
case "CLAVEPRODSERV": concepto.ClaveProdServ = xtr.Value; break;
|
||||||
|
case "NOIDENTIFICACION": concepto.NoIdentificacion = xtr.Value; break;
|
||||||
|
case "CANTIDAD": concepto.Cantidad = xtr.Value; break;
|
||||||
|
case "CLAVEUNIDAD": concepto.ClaveUnidad = xtr.Value; break;
|
||||||
|
case "UNIDAD": concepto.Unidad = xtr.Value; break;
|
||||||
|
case "VALORUNITARIO": decimal ValorUnitario = 0; decimal.TryParse(xtr.Value, out ValorUnitario); concepto.ValorUnitario = ValorUnitario; ; break;
|
||||||
|
case "IMPORTE": decimal Importe = 0; decimal.TryParse(xtr.Value, out Importe); concepto.Importe = Importe; ; break;
|
||||||
|
case "DESCUENTO": decimal DDescuento = 0; decimal.TryParse(xtr.Value, out DDescuento); concepto.Descuento = DDescuento; ; break;
|
||||||
|
case "DESCRIPCION": concepto.Descripcion = xtr.Value; break;
|
||||||
|
}
|
||||||
|
cont = xtr.MoveToNextAttribute();
|
||||||
|
}
|
||||||
|
xtr.MoveToFirstAttribute();
|
||||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||||
while (canread && xtr.Depth > cDepthb)
|
while (canread && xtr.Depth > cDepthb)
|
||||||
{
|
{
|
||||||
@@ -850,14 +944,14 @@ namespace ADS_CFDI_SAT
|
|||||||
while (canread && xtr.Depth > cDepth)
|
while (canread && xtr.Depth > cDepth)
|
||||||
{
|
{
|
||||||
CFDIImpuesto impuest = new CFDIImpuesto();
|
CFDIImpuesto impuest = new CFDIImpuesto();
|
||||||
if (xtr.Name == "cfdi:Traslado" || xtr.Name == "cfdi:Retencion")
|
if (xtr.Name == "cfdi:Traslado" || xtr.Name == "cfdi:Retencion" && xmlCFDI.comprobante.Version != null)
|
||||||
{
|
{
|
||||||
impuest.Tipo = xtr.LocalName == "Traslado" ? "Traslados" : (xtr.LocalName == "Retencion" ? "Retenciones" : "");
|
impuest.Tipo = xtr.LocalName == "Traslado" ? "Traslados" : (xtr.LocalName == "Retencion" ? "Retenciones" : "");
|
||||||
impuest.Impuesto = xtr.GetAttribute("Impuesto");
|
impuest.Impuesto = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("Impuesto") : xtr.GetAttribute("impuesto");
|
||||||
impuest.TipoFactor = xtr.GetAttribute("TipoFactor");
|
impuest.TipoFactor = xtr.GetAttribute("TipoFactor");
|
||||||
impuest.TasaOCuota = xtr.GetAttribute("TasaOCuota");
|
impuest.TasaOCuota = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("TasaOCuota") : xtr.GetAttribute("tasa");
|
||||||
decimal ImImporte = 0;
|
decimal ImImporte = 0;
|
||||||
decimal.TryParse(xtr.GetAttribute("Importe"), out ImImporte);
|
decimal.TryParse((xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("Importe") : xtr.GetAttribute("importe")), out ImImporte);
|
||||||
impuest.Importe = ImImporte;
|
impuest.Importe = ImImporte;
|
||||||
xmlCFDI.Impuestos.Add(impuest);
|
xmlCFDI.Impuestos.Add(impuest);
|
||||||
}
|
}
|
||||||
@@ -871,7 +965,7 @@ namespace ADS_CFDI_SAT
|
|||||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||||
while (canread && xtr.Depth > cDepth)
|
while (canread && xtr.Depth > cDepth)
|
||||||
{
|
{
|
||||||
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "TimbreFiscalDigital")
|
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "TimbreFiscalDigital" && xmlCFDI.comprobante.Version != null)
|
||||||
{
|
{
|
||||||
xmlCFDI.complemento.xmlns_tfd = xtr.GetAttribute("xmlns:tfd");
|
xmlCFDI.complemento.xmlns_tfd = xtr.GetAttribute("xmlns:tfd");
|
||||||
xmlCFDI.complemento.xsi_schemaLocation = xtr.GetAttribute("xsi:schemaLocation");
|
xmlCFDI.complemento.xsi_schemaLocation = xtr.GetAttribute("xsi:schemaLocation");
|
||||||
@@ -879,9 +973,9 @@ namespace ADS_CFDI_SAT
|
|||||||
xmlCFDI.complemento.UUID = xtr.GetAttribute("UUID");
|
xmlCFDI.complemento.UUID = xtr.GetAttribute("UUID");
|
||||||
xmlCFDI.complemento.FechaTimbrado = xtr.GetAttribute("FechaTimbrado");
|
xmlCFDI.complemento.FechaTimbrado = xtr.GetAttribute("FechaTimbrado");
|
||||||
xmlCFDI.complemento.RfcProvCertif = xtr.GetAttribute("RfcProvCertif");
|
xmlCFDI.complemento.RfcProvCertif = xtr.GetAttribute("RfcProvCertif");
|
||||||
xmlCFDI.complemento.SelloCFD = xtr.GetAttribute("SelloCFD");
|
xmlCFDI.complemento.SelloCFD = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("SelloCFD") : xtr.GetAttribute("selloCFD");
|
||||||
xmlCFDI.complemento.NoCertificadoSAT = xtr.GetAttribute("NoCertificadoSAT");
|
xmlCFDI.complemento.NoCertificadoSAT = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("NoCertificadoSAT") : xtr.GetAttribute("noCertificadoSAT");
|
||||||
xmlCFDI.complemento.SelloSAT = xtr.GetAttribute("SelloSAT");
|
xmlCFDI.complemento.SelloSAT = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("SelloSAT") : xtr.GetAttribute("selloSAT");
|
||||||
|
|
||||||
}
|
}
|
||||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||||
@@ -897,10 +991,8 @@ namespace ADS_CFDI_SAT
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (xmlCFDI.comprobante.Version == "3.3")
|
if (xmlCFDI.comprobante.Version == "3.3" || xmlCFDI.comprobante.Version == "3.2")
|
||||||
{
|
{
|
||||||
return xmlCFDI;
|
return xmlCFDI;
|
||||||
}
|
}
|
||||||
@@ -914,7 +1006,7 @@ namespace ADS_CFDI_SAT
|
|||||||
public void ImprimirPDF(string NombreArchivo)
|
public void ImprimirPDF(string NombreArchivo)
|
||||||
{
|
{
|
||||||
XmlSatCFDI objxml = this;
|
XmlSatCFDI objxml = this;
|
||||||
string rutaReporte = string.Format("{0}{1}", Directory.GetParent(System.Reflection.Assembly.GetExecutingAssembly().Location).FullName, "\\Empresas\\Grales\\Formatos\\CFDIV3.rdlc");
|
string rutaReporte = string.Format("{0}{1}", Directory.GetParent(System.Reflection.Assembly.GetExecutingAssembly().Location).Parent.FullName, "\\Empresas\\Grales\\Formatos\\CFDIV3.rdlc");
|
||||||
|
|
||||||
|
|
||||||
ClbNegBICFDv3_2.ClsNegCBBGenerar QR = new ClbNegBICFDv3_2.ClsNegCBBGenerar();
|
ClbNegBICFDv3_2.ClsNegCBBGenerar QR = new ClbNegBICFDv3_2.ClsNegCBBGenerar();
|
||||||
@@ -1081,44 +1173,6 @@ namespace ADS_CFDI_SAT
|
|||||||
public decimal Descuento { get; set; }
|
public decimal Descuento { get; set; }
|
||||||
public decimal TipoCambio { get; set; }
|
public decimal TipoCambio { get; set; }
|
||||||
public string TipoDeComprobante { get; set; }
|
public string TipoDeComprobante { get; set; }
|
||||||
public string TipoDeComprobanteSIG
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
string retorno = "";
|
|
||||||
|
|
||||||
if (Version == "3.3")
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch (TipoDeComprobante)
|
|
||||||
{
|
|
||||||
case "I":
|
|
||||||
retorno = "Ing";
|
|
||||||
break;
|
|
||||||
case "E":
|
|
||||||
retorno = "Egs";
|
|
||||||
break;
|
|
||||||
case "P":
|
|
||||||
retorno = "PA";
|
|
||||||
break;
|
|
||||||
//case "T":
|
|
||||||
// retorno = "Traslado";
|
|
||||||
// break;
|
|
||||||
//case "N":
|
|
||||||
// retorno = "Nómina";
|
|
||||||
// break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { retorno = TipoDeComprobante; }
|
|
||||||
return retorno;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string TipoDeComprobanteTexto
|
public string TipoDeComprobanteTexto
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -1149,6 +1203,89 @@ namespace ADS_CFDI_SAT
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Version == "3.2")
|
||||||
|
{
|
||||||
|
switch (TipoDeComprobante)
|
||||||
|
{
|
||||||
|
case "ingreso":
|
||||||
|
retorno = "Ing";
|
||||||
|
break;
|
||||||
|
case "egreso":
|
||||||
|
retorno = "Egs";
|
||||||
|
break;
|
||||||
|
case "P":
|
||||||
|
retorno = "PA";
|
||||||
|
break;
|
||||||
|
//case "T":
|
||||||
|
// retorno = "Traslado";
|
||||||
|
// break;
|
||||||
|
//case "N":
|
||||||
|
// retorno = "Nómina";
|
||||||
|
// break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
retorno = TipoDeComprobante;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { retorno = TipoDeComprobante; }
|
||||||
|
return retorno;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string TipoDeComprobanteSIG
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string retorno = "";
|
||||||
|
if (Version == "3.3")
|
||||||
|
{
|
||||||
|
switch (TipoDeComprobante)
|
||||||
|
{
|
||||||
|
case "I":
|
||||||
|
retorno = "Ing";
|
||||||
|
break;
|
||||||
|
case "E":
|
||||||
|
retorno = "Egs";
|
||||||
|
break;
|
||||||
|
case "P":
|
||||||
|
retorno = "PA";
|
||||||
|
break;
|
||||||
|
//case "T":
|
||||||
|
// retorno = "Traslado";
|
||||||
|
// break;
|
||||||
|
//case "N":
|
||||||
|
// retorno = "Nómina";
|
||||||
|
// break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Version == "3.2")
|
||||||
|
{
|
||||||
|
switch (TipoDeComprobante)
|
||||||
|
{
|
||||||
|
case "ingreso":
|
||||||
|
retorno = "Ing";
|
||||||
|
break;
|
||||||
|
case "egreso":
|
||||||
|
retorno = "Egs";
|
||||||
|
break;
|
||||||
|
case "P":
|
||||||
|
retorno = "PA";
|
||||||
|
break;
|
||||||
|
//case "T":
|
||||||
|
// retorno = "Traslado";
|
||||||
|
// break;
|
||||||
|
//case "N":
|
||||||
|
// retorno = "Nómina";
|
||||||
|
// break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else { retorno = TipoDeComprobante; }
|
else { retorno = TipoDeComprobante; }
|
||||||
return retorno;
|
return retorno;
|
||||||
}
|
}
|
||||||
@@ -1184,6 +1321,7 @@ namespace ADS_CFDI_SAT
|
|||||||
case "30": retorno = "Aplicación de anticipos"; break;
|
case "30": retorno = "Aplicación de anticipos"; break;
|
||||||
case "31": retorno = "Intermediario pagos"; break;
|
case "31": retorno = "Intermediario pagos"; break;
|
||||||
case "99": retorno = "Por definir"; break;
|
case "99": retorno = "Por definir"; break;
|
||||||
|
default: retorno = FormaPago; break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return retorno;
|
return retorno;
|
||||||
@@ -1200,6 +1338,7 @@ namespace ADS_CFDI_SAT
|
|||||||
{
|
{
|
||||||
case "PUE": retorno = "Pago en una sola exhibición"; break;
|
case "PUE": retorno = "Pago en una sola exhibición"; break;
|
||||||
case "PPD": retorno = "Pago en parcialidades o diferido"; break;
|
case "PPD": retorno = "Pago en parcialidades o diferido"; break;
|
||||||
|
default: retorno = MetodoPago; break;
|
||||||
}
|
}
|
||||||
return retorno;
|
return retorno;
|
||||||
}
|
}
|
||||||
@@ -1487,4 +1626,8 @@ namespace ADS_CFDI_SAT
|
|||||||
public decimal Impuesto_Importe { get; set; }
|
public decimal Impuesto_Importe { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
@@ -3398,10 +3398,10 @@ Partial Class Ventas
|
|||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
End If
|
End If
|
||||||
|
If LblFolioFiscal.Text.Trim = "" Then HplFolioFiscalModal.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ing", "Ant", "Dev") AndAlso LblFolioFiscal.Text.Trim = "" Then HplFolioFiscalModal.Visible = True
|
|
||||||
|
|
||||||
Select Case DbRowVenta("TipoDocto").ToString
|
Select Case DbRowVenta("TipoDocto").ToString
|
||||||
Case "Ing"
|
Case "Ing"
|
||||||
@@ -10680,6 +10680,11 @@ Partial Class Ventas
|
|||||||
#Region " VISTA PREVIA NEW "
|
#Region " VISTA PREVIA NEW "
|
||||||
Private Sub VistaPreviaNew()
|
Private Sub VistaPreviaNew()
|
||||||
|
|
||||||
|
If Not CveCliente > 0 And Not CveEmpresaCRM > 0 Then
|
||||||
|
Alert("Es necesario seleccionar el cliente al cual se le va a facturar.", TipoMensaje.MsgAdvertencia, "AbrirVentana(""/Ventas/PopUpBuscarClientes.aspx?Opt=Fact"", 800, 547, ""N"", ""PopUpBuscar"")")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
CreaObjetosVenta(True)
|
CreaObjetosVenta(True)
|
||||||
|
|
||||||
If ObjFactura Is Nothing Or ObjFactura.Cliente Is Nothing Then
|
If ObjFactura Is Nothing Or ObjFactura.Cliente Is Nothing Then
|
||||||
@@ -14897,12 +14902,12 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
'If ValorInventario <> 0 Then
|
If ValorInventario <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
'End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
Reference in New Issue
Block a user