Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -689,6 +689,13 @@
|
||||
<label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivRepresentanteLegal" runat="server" visible="false">
|
||||
<asp:TextBox runat="server" ID="TxtRepresentanteLegal" CssClass="form-control" MaxLength="100" />
|
||||
<label for="<%= TxtRepresentanteLegal.ClientID.ToString()%>">Representante Legal:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div runat="server" id="DivEsDistribuidor" visible="false" class="col-md-4 form-group form-md-line-input input-iconright">
|
||||
|
||||
@@ -751,6 +751,10 @@ Partial Class Clientes
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
divRegimen.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivRepresentanteLegal.Visible = True
|
||||
End If
|
||||
|
||||
If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero() > 0 Then
|
||||
@@ -1873,6 +1877,8 @@ Partial Class Clientes
|
||||
RdTipoPersona.SelectedValue = If(ObjClientes.TipoPersona, "1", "0")
|
||||
RdTipoPersona_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
TxtRepresentanteLegal.Text = ObjClientes.RepresentanteLegal
|
||||
|
||||
End If
|
||||
UpActivacionPortal.Update()
|
||||
UpModalPersonaFisica.Update()
|
||||
@@ -2686,7 +2692,7 @@ Partial Class Clientes
|
||||
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
|
||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona) Then
|
||||
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text) Then
|
||||
|
||||
ViewState("CveCliente") = ObjClientes.CveCliente
|
||||
|
||||
@@ -2783,7 +2789,7 @@ Partial Class Clientes
|
||||
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
|
||||
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
|
||||
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||
NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona) Then
|
||||
NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text) Then
|
||||
|
||||
|
||||
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||
|
||||
@@ -1018,6 +1018,7 @@ Partial Class RepVentaDetalle
|
||||
|
||||
|
||||
Dim RutaFormato = String.Format("{0}Formatos\RepVentaDetalle.rdlc", UsuarioActual.Empresa.Ruta)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
@@ -1033,14 +1034,19 @@ Partial Class RepVentaDetalle
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("TipoDocto", TipoDocto))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Grupo} {TipoDocto} {FechaIn} {FechaFn} {FechaIEjec} {FechaFEjec} {CveCliente} {CveSucursal} {CveSucursalEjec} {Vendedor} {CveUsuario} {CveEstatusFactura} {CondicionesPago} "))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not Archivo.Exists Then
|
||||
RutaFormato = "Empresas/Grales/Formatos/RepVentaDetalle.rdlc"
|
||||
End If
|
||||
|
||||
ImprimirPDF(RutaFormato, dt, params, String.Format("ReporteVentaDetalle-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -9443,6 +9443,8 @@ Partial Class Ventas
|
||||
'ContPAQ El movimiento 1 es el de Venta
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
AutoConta = AutocontaMatriz(AutoConta)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "Egs", "Dev") Then
|
||||
AutoConta = False
|
||||
End If
|
||||
@@ -12983,7 +12985,11 @@ Partial Class Ventas
|
||||
If ObjFactura.CveMoneda = 2 AndAlso ObjFactura.TipoCambio > 0 Then
|
||||
tipoCambio = ObjFactura.TipoCambio
|
||||
ElseIf ObjFactura.CveMoneda = 2 AndAlso ObjFactura.TipoCambio <= 1 Then
|
||||
tipoCambio = GlobalTipoCambio(ObjFactura.Fecha).ToString().ToDecimal
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
tipoCambio = GlobalTipoCambio(ObjFactura.Fecha.AddDays(-1)).ToString().ToDecimal
|
||||
Else
|
||||
tipoCambio = GlobalTipoCambio(ObjFactura.Fecha).ToString().ToDecimal
|
||||
End If
|
||||
Else
|
||||
tipoCambio = 1
|
||||
End If
|
||||
@@ -13194,7 +13200,13 @@ Partial Class Ventas
|
||||
If tipoCambio > 1 Then
|
||||
TipoCambioNC = tipoCambio
|
||||
Else
|
||||
TipoCambioNC = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
TipoCambioNC = GlobalTipoCambio(TxtFecha.Text.ToDate.AddDays(-1)).ToDecimal
|
||||
Else
|
||||
TipoCambioNC = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'APLICA NC SALDOS DIRECTOS
|
||||
@@ -13228,7 +13240,11 @@ Partial Class Ventas
|
||||
|
||||
Dim TCFluctuacion As Decimal = Dr("TCCambioValuacion").ToString().ToDecimal
|
||||
If TCFluctuacion = 1 AndAlso TipoCambioNC > 1 Then
|
||||
TCFluctuacion = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
TCFluctuacion = GlobalTipoCambio(TxtFecha.Text.ToDate.AddDays(-1)).ToDecimal
|
||||
Else
|
||||
TCFluctuacion = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero() = 2 AndAlso Not Dr("TCCambioValuacion").ToString().ToDecimal > 1 Then
|
||||
@@ -13299,8 +13315,13 @@ Partial Class Ventas
|
||||
|
||||
'SI LA NC ES EN DOLARES Y PERO VIENE DE UN ANTICIPO EN PESOS
|
||||
If (Not UsuarioActual.CveEmpresa.Contiene(72, 80, 146)) AndAlso ObjFactura.CveMoneda = 2 Then
|
||||
|
||||
Dim tipoCambioAnticipo = GlobalTipoCambio(row2.DataKey("Fecha").ToString().ToDate).ToDecimal
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
tipoCambioAnticipo = GlobalTipoCambio(row2.DataKey("Fecha").ToString().ToDate.AddDays(-1)).ToDecimal
|
||||
End If
|
||||
|
||||
If row2.DataKey("CveMoneda").ToString.ToEntero = 2 Then
|
||||
IdCtaContable = IdCtaContAnticiposExtranjera
|
||||
End If
|
||||
@@ -14836,7 +14857,11 @@ Partial Class Ventas
|
||||
If ObjFactura.CveMoneda = 2 AndAlso ObjFactura.TipoCambio > 0 Then
|
||||
tipoCambio = Factura.TipoCambio
|
||||
ElseIf ObjFactura.CveMoneda = 2 AndAlso ObjFactura.TipoCambio <= 1 Then
|
||||
tipoCambio = GlobalTipoCambio(Factura.Fecha).ToString().ToDecimal
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
tipoCambio = GlobalTipoCambio(Factura.Fecha.AddDays(-1)).ToString().ToDecimal
|
||||
Else
|
||||
tipoCambio = GlobalTipoCambio(Factura.Fecha).ToString().ToDecimal
|
||||
End If
|
||||
Else
|
||||
tipoCambio = 1
|
||||
End If
|
||||
@@ -15523,6 +15548,7 @@ Partial Class Ventas
|
||||
|
||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
|
||||
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
|
||||
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
|
||||
@@ -20252,6 +20278,8 @@ Partial Class Ventas
|
||||
If GenerarPrePolizaNueva Then
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
AutoConta = AutocontaMatriz(AutoConta)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "Egs", "Dev") Then
|
||||
AutoConta = False
|
||||
End If
|
||||
@@ -21654,11 +21682,20 @@ Partial Class Ventas
|
||||
ChkConvertirDolares.Enabled = Not UsuarioActual.TienePermisoProceso(324)
|
||||
Case "2"
|
||||
TxtTipoCambioDlls.Text = "1"
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate.AddDays(-1)).ToString()
|
||||
Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
|
||||
End If
|
||||
TrConversionTipoCambio.Visible = True
|
||||
ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
|
||||
|
||||
Case Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate.AddDays(-1)).ToString()
|
||||
Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
|
||||
End If
|
||||
TrConversionTipoCambio.Visible = True
|
||||
End Select
|
||||
|
||||
@@ -28059,8 +28096,16 @@ Partial Class Ventas
|
||||
|
||||
'verifica el tipo de cambio que se actualice
|
||||
If DdlMoneda.SelectedValue <> "1" Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString()
|
||||
Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
If DdlTipoComprobante.SelectedValue = "Ant" Then CveAnticipo = CveVenta
|
||||
|
||||
@@ -28146,7 +28191,13 @@ Partial Class Ventas
|
||||
|
||||
'verifica el tipo de cambio que se actualice
|
||||
If DdlMoneda.SelectedValue <> "1" Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString()
|
||||
Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
End If
|
||||
|
||||
End If
|
||||
LblTCValuacion.Visible = False
|
||||
UpPS.Update()
|
||||
@@ -29254,7 +29305,13 @@ Partial Class Ventas
|
||||
TipoCambioFactura = 1
|
||||
End If
|
||||
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString()
|
||||
Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
End If
|
||||
|
||||
DivEstatusFac.Visible = False
|
||||
|
||||
'REINICIALIZA TABS
|
||||
@@ -35139,5 +35196,27 @@ Partial Class Ventas
|
||||
Alert(sb.ToString(), TipoMensaje.MsgInformacion)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function AutocontaMatriz(AutoConta As Boolean) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
Dim DTSubproyectoActual As DataTable = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
|
||||
If (DTSubproyectoActual.Rows(0)("TipoSucursal").ToString.ToEntero = 1) Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
End If
|
||||
|
||||
Else
|
||||
Respuesta = AutoConta
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user