From 3011936a3bbebf5d83e03cbf65061c40f124ed60 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 21 Oct 2019 19:26:42 -0700 Subject: [PATCH] =?UTF-8?q?Edici=C3=B3n=20de=20remisi=C3=B3n=20de=20d?= =?UTF-8?q?=C3=B3lares=20a=20pesos.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx | 7 ++++++- Ventas/Ventas.aspx.vb | 24 ++++++++++++++++-------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 6a2ce3a9a..b27e93fb5 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -3434,6 +3434,7 @@ +
@@ -5762,6 +5763,10 @@
+
+ + +
@@ -5929,7 +5934,7 @@
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e93d30672..27961920c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -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")))) @@ -9978,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 @@ -15840,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