This commit is contained in:
2019-10-22 11:17:52 -07:00
19 changed files with 2754 additions and 2533 deletions

View File

@@ -584,11 +584,11 @@
</asp:DropDownList>
<label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivCargoUsado" visible="false">
<label>Cargo Usado:</label>
<asp:CheckBox ID="ChkCargoUsado" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
</div>
<div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivBonificacionUsado" visible="false">
<label>Bonificación Usado:</label>
<asp:CheckBox ID="ChkBonificacionUsado" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" />
</div>

View File

@@ -1650,6 +1650,8 @@ Partial Class Clientes
DivEsDistribuidor.Visible = True
TabUsados.Visible = True
DivCargoUsado.Visible = True
DivBonificacionUsado.Visible = True
CargaUsados()
End If

View File

@@ -557,7 +557,7 @@
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlIEPSPorcentaje" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Enabled="false">
<asp:DropDownList ID="DdlIEPSPorcentaje" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Enabled="false" AutoPostBack="true" OnSelectedIndexChanged="DdlIEPSPorcentaje_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
<asp:ListItem Text="0%" Value="0.00"></asp:ListItem>
<asp:ListItem Text="3%" Value="0.03"></asp:ListItem>

View File

@@ -2597,5 +2597,16 @@ Partial Class ProductosyServicios
#End Region
Protected Sub DdlIEPSPorcentaje_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlIEPSPorcentaje.SelectedIndexChanged
Select Case DdlIEPSPorcentaje.SelectedValue
Case "0.09"
DdlCategoriaToxicidad.SelectedValueExist("001")
Case "0.07"
DdlCategoriaToxicidad.SelectedValueExist("002")
Case "0.06"
DdlCategoriaToxicidad.SelectedValueExist("003")
Case Else
DdlCategoriaToxicidad.SelectedValueExist("000")
End Select
End Sub
End Class

View File

@@ -3434,6 +3434,7 @@
<asp:RequiredFieldValidator ID="RFVNCPSAnt" runat="server" InitialValue="-1" ControlToValidate="DdlNCPSAnt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VGAnticiposClientes"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERFVNCPSAnt" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPSAnt" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" id="DivFechaAnticipoCliente" runat="server" visible="false">
@@ -5762,6 +5763,10 @@
<asp:RequiredFieldValidator ID="RFVNCPS" runat="server" InitialValue="-1" ControlToValidate="DdlNCPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalAplicarNC"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENCPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPS" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-4">
<asp:Label ID="LblNCSaldoAnticipo" runat="server" Text=""></asp:Label>
<asp:CheckBox ID="ChkAplicaNCAnticipo" runat="server" Text="Aplicar a Anticipo" Visible="false" />
</div>
</div>
<div class="row form-group">
<div class="col-md-2">
@@ -5929,7 +5934,7 @@
</div>
<div class="modal-footer">
<button id="CancelarAplicarNC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
<asp:Button Text="AplicarNC" ID="BtnAplicarNC" OnClick="BtnAplicarNC_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalAplicarNC" runat="server" />
<asp:Button Text="Aplicar NC" ID="BtnAplicarNC" OnClick="BtnAplicarNC_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalAplicarNC" runat="server" />
</div>
</div>
</ContentTemplate>

View File

@@ -3567,6 +3567,12 @@ Partial Class Ventas
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
'LkNotaCredito.Visible = True
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
'visualizo el saldo de anticipos, para cuando se aplique una Nota de crédito, decida si afecta anticipos o a DSV
LblNCSaldoAnticipo.Visible = True
ChkAplicaNCAnticipo.Visible = True
ChkAplicaNCAnticipo.Checked = True
If DbRowVenta("SaldoAnticipo").ToString.ToDouble <= 0 Then ChkAplicaNCAnticipo.Checked = False : ChkAplicaNCAnticipo.Enabled = False
LblNCSaldoAnticipo.Text = String.Format("Saldo Anticipo: $ {0}", DbRowVenta("SaldoAnticipo").ToString.ToDouble.FormatoNumero)
Case "Dev"
DdlTipoComprobante.Items.Insert(0, New ListItem("Devolucion", "Dev"))
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
@@ -6859,6 +6865,10 @@ Partial Class Ventas
If CveVenta > 0 Then MensajeAlert = New StringBuilder
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
If Opcion = "Cot" And UsuarioActual.CveEmpresa = 141 Then
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
End If
If ArchivoCotizacion.Exists Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
Else
@@ -9974,7 +9984,7 @@ Partial Class Ventas
'cuando es NC, por amortización de anticipo, no debe de registrar el concepto 11,
'pero cuando es NC y se aplicó anticipo, debe de restarle el importe
If ObjFactura.TipoDocto.Contiene("Egs") And CveAnticipo > 0 Then
If ObjFactura.TipoDocto.Contiene("Egs") And CveAnticipo > 0 AndAlso ChkAplicaNCAnticipo.Checked = True Then
ConceptoContableAplicar = 11
CveVentaAplicar = CveAnticipo
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
@@ -15836,16 +15846,18 @@ Partial Class Ventas
'CONVERTIR REMISION - TIPO MONEDA -PESO A DOLARES
If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
Dim Importe As Decimal
Dim TCC As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
For Each Row As DataRow In TmpDT.Rows
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, 6)
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * TCC, 6)
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales)
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDecimal * TCC, NumeroDecimales)
Importe = Row("Total").ToString.ToDecimal - Row("Descuento").ToString.ToDecimal
Row("ImporteIEPS") = Math.Round(Importe * Row("PorcentajeIEPS").ToString.ToDecimal, NumeroDecimales)
Row("ImporteIVA") = Math.Round(Importe * Row("PorcentajeIVA").ToString.ToDecimal, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(Importe * Row("PorcentajeRetIVA").ToString.ToDecimal, NumeroDecimales)
Row("ImporteRetISR") = Math.Round(Importe * Row("PorcentajeRetISR").ToString.ToDecimal, NumeroDecimales)
Next
Dim ImpuestosLocales As Double = 0