Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
11962
Ventas/Clientes.aspx
11962
Ventas/Clientes.aspx
File diff suppressed because it is too large
Load Diff
@@ -820,6 +820,10 @@ Partial Class Clientes
|
||||
UpFiscalContable.Update()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
DivTipoRetenciones.Visible = True
|
||||
End If
|
||||
|
||||
If Request("CveEmpresaCRM") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresaCRM")) AndAlso Request("CveEmpresaCRM").ToEntero > 0 Then
|
||||
ViewState("CveEmpresaCRM") = Request("CveEmpresaCRM")
|
||||
CargaDatosCRM()
|
||||
@@ -1374,7 +1378,8 @@ Partial Class Clientes
|
||||
TxtGiro.Text = ObjClientes.Giro
|
||||
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString
|
||||
TxtCC.Text = ObjClientes.NotificarA
|
||||
ChkMail.Checked = ObjClientes.EnviarFactura
|
||||
ChkMail.Checked = ObjClientes.EnviarFactura
|
||||
DdlTipoRetencion.SelectedValueExist(ObjClientes.DtResultados(0)("CveTipoRetencion").ToString)
|
||||
TxtRetIVA.Text = ObjClientes.RetIVA.ToString
|
||||
TxtRetISR.Text = ObjClientes.RetISR.ToString
|
||||
ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
|
||||
@@ -2411,7 +2416,7 @@ Partial Class Clientes
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero,
|
||||
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) Then
|
||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero()) Then
|
||||
|
||||
ViewState("CveCliente") = ObjClientes.CveCliente
|
||||
|
||||
@@ -2505,7 +2510,8 @@ Partial Class Clientes
|
||||
AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, 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(),
|
||||
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) Then
|
||||
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()) Then
|
||||
|
||||
|
||||
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||
@@ -9934,6 +9940,6 @@ Partial Class Clientes
|
||||
Acum.Dispose()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
@@ -5018,7 +5018,7 @@ Partial Class PV
|
||||
|
||||
Private Sub CargaAjuste()
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlFolioGarantia.DataSource = ObjAcum.DtResultados
|
||||
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
@@ -812,7 +812,7 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpTurno" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="width: 30%;display: flex;flex-direction:row;color:white;background-color:#c49f47">
|
||||
<asp:UpdatePanel ID="UpTurno" runat="server" UpdateMode="Conditional" Visible="false" class="portlet light xspadding bordered whitoutcol" style="width: 20%;display: flex;flex-direction:row;color:white;background-color:#c49f47">
|
||||
<ContentTemplate>
|
||||
<div id="DivTurno" runat="server" style="width:100%;text-align:center;">
|
||||
Turno: <asp:Label runat="server" ID="LblTurno"></asp:Label>
|
||||
@@ -1367,9 +1367,20 @@
|
||||
<tr id="TrRetIVA" runat="server" align="right" style="display: none;">
|
||||
<td style="border: 1px none white"><b>Ret. IVA:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtRetIVA" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
|
||||
<asp:TextBox ID="TxtRetIVA" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label ID="LblRetIVA" runat="server" BorderStyle="None" Text="0.00"></asp:Label> (%)</td>
|
||||
<asp:Label ID="LblRetIVA" runat="server" BorderStyle="None" Text="0.00"></asp:Label> (%)
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoRetencion" Visible="false" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoRetencion_SelectedIndexChanged" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Retención" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Arrendamiento" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Servicios Profesionales" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Fletes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Servicios" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="TrRetISR" runat="server" align="right" style="display: none;">
|
||||
@@ -3240,11 +3251,8 @@
|
||||
<asp:TextBox ID="TxtObsAlmacen" runat="server" Rows="2" TextMode="MultiLine" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr align="left" id="TrKilometraje" runat="server" visible ="false">
|
||||
<td>Kilometraje </td>
|
||||
</tr>
|
||||
<tr align="left" id="TrKilometrajeTxt" runat="server" visible ="false">
|
||||
<td>
|
||||
<asp:TextBox ID="TxtKilometraje" runat="server" Rows="1" TextMode="MultiLine" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||
<td>Kilometraje
|
||||
<asp:TextBox ID="TxtKilometraje" runat="server" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -2523,7 +2523,8 @@ Partial Class Ventas
|
||||
DivDdlCuentaTarjetaCredito.Attributes.Add("class", "col-md-4")
|
||||
DivContadoOtros.Visible = True
|
||||
TrKilometraje.Visible = True
|
||||
TrKilometrajeTxt.Visible = True
|
||||
TrPedido.Visible = False
|
||||
' TrKilometrajeTxt.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -2582,8 +2583,9 @@ Partial Class Ventas
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
UpTurno.Update()
|
||||
UpTurno.Visible = True
|
||||
Else
|
||||
UpTurno.Visible = False
|
||||
'Ingresar un nuevo Turno
|
||||
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
|
||||
End If
|
||||
@@ -4111,6 +4113,7 @@ Partial Class Ventas
|
||||
|
||||
'Sección Detalle
|
||||
DdlMoneda.Enabled = False
|
||||
DdlTipoRetencion.Enabled = False
|
||||
TxtFechaEjecucion.ReadOnly = True
|
||||
ImgCalendarFechaEje.Enabled = False
|
||||
'DdlSucursalEjecucion.Enabled = False
|
||||
@@ -4699,6 +4702,9 @@ Partial Class Ventas
|
||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||
|
||||
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
|
||||
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
|
||||
|
||||
ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
|
||||
If ObjCliente.RetieneIVAFletes Then
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
@@ -5920,6 +5926,20 @@ Partial Class Ventas
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal)
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero
|
||||
TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text
|
||||
@@ -6462,22 +6482,32 @@ Partial Class Ventas
|
||||
End If
|
||||
'Valida si en caso de que el detalle tenga llantas o polizas se agreguén kilometraje/serie en la parte de observaciones(solo para el caso de empresas llanteras)
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
|
||||
If txtkilometraje.text.toentero = 0 Then
|
||||
'cuando es la clasificacion de llantas
|
||||
Dim FaltaObservacion As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion = 20342").ToEntero
|
||||
If FaltaObservacion = 20342 Then
|
||||
Alert("No se ha especificado el <strong>kilometraje</strong>.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If TxtObsFact.Text = "" Then
|
||||
Dim FaltaObservacion As Integer = -1
|
||||
For Each PS As GridViewRow In GvPS.Rows
|
||||
Dim PsRenglon As GridViewRow = PS
|
||||
Dim CveClasificacion As Integer = PsRenglon.DataKey("CveClasificacion").ToEntero
|
||||
If CveClasificacion = 20345 Or CveClasificacion = 20342 Then
|
||||
FaltaObservacion = CveClasificacion
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'For Each PS As GridViewRow In GvPS.Rows
|
||||
' Dim PsRenglon As GridViewRow = PS
|
||||
' Dim CveClasificacion As Integer = PsRenglon.DataKey("CveClasificacion").ToEntero
|
||||
' If CveClasificacion = 20345 Or CveClasificacion = 20342 Then
|
||||
' FaltaObservacion = CveClasificacion
|
||||
' Exit For
|
||||
' End If
|
||||
'
|
||||
FaltaObservacion = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion = 20345").ToEntero
|
||||
'cuando es la clasificacion de polizas
|
||||
If FaltaObservacion = 20345 Then
|
||||
Alert("No se ha especificado la <strong>serie</strong> para la poliza en la sección de Observaciones", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
ElseIf FaltaObservacion = 20342 Then
|
||||
Alert("No se ha especificado el <strong>kilometraje</strong> para la llanta en el sección de Observaciones", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -7581,10 +7611,10 @@ Partial Class Ventas
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False)
|
||||
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False)
|
||||
|
||||
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
|
||||
Else
|
||||
ObjFactura = New Modelos.Factura
|
||||
End If
|
||||
@@ -9125,7 +9155,7 @@ Partial Class Ventas
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||
Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then
|
||||
Kilometraje:=TxtKilometraje.Text.todouble) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
@@ -14215,6 +14245,20 @@ Partial Class Ventas
|
||||
Row("PorcentajeIVA") = DrPS("IVA")
|
||||
End If
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso DrPS("CveTipoPS").ToString().ToEntero() = 1 Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
||||
@@ -14276,7 +14320,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'AGREGA PS ADICIONAL
|
||||
If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso Not UsuarioActual.TienePermisoProceso(284) AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso Not UsuarioActual.TienePermisoProceso(285) AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then
|
||||
|
||||
For Each Dr As DataRow In GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows
|
||||
Dim CvePSAdicional As Integer = Dr("CvePSAdicional").ToString.ToEntero
|
||||
@@ -16408,7 +16452,7 @@ Partial Class Ventas
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero,
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
@@ -18433,7 +18477,8 @@ Partial Class Ventas
|
||||
CancelarRefacturada()
|
||||
End If
|
||||
|
||||
CreaObjetosVenta()
|
||||
CreaObjetosVenta(EsCancelacion:=True)
|
||||
|
||||
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveVenta > 0 Then
|
||||
@@ -18451,9 +18496,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
If ChkDevAlm.Checked Then
|
||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
End If
|
||||
|
||||
resp = ObjFactura.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar)
|
||||
End If
|
||||
@@ -22080,7 +22122,7 @@ Partial Class Ventas
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero,
|
||||
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
|
||||
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then
|
||||
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
|
||||
OcurrioError = True
|
||||
End If
|
||||
@@ -23857,10 +23899,12 @@ Partial Class Ventas
|
||||
CargaRNC()
|
||||
RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
|
||||
#Region "P O L I Z A - V I R T U A L"
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||
Dim DtUsados As DataTable = Nothing
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetGarantiasDetalle(ObjFactura.CveVenta) Then
|
||||
If ObjAcum.GetGarantiasPolizaVirtual(ObjFactura.CveVenta) Then
|
||||
DtUsados = ObjAcum.DtResultados.Copy()
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
@@ -23984,5 +24028,39 @@ Partial Class Ventas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
||||
For Each RowServicio As DataRow In TmpDT.Rows
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso RowServicio("CveTipoPS").ToString().ToEntero() = 1 Then
|
||||
ClienteRetIVA = 0.06D
|
||||
End If
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal()
|
||||
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL()
|
||||
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
|
||||
|
||||
Next
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
|
||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||
If PorcentajeRetIVA > 0 Then
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
UpPS.Update()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user