Soporte Ventas en Facturar remision con amortizacion

Soporte Compras Convertir pesos a dolares con impuestos
Correciones en Ordenes de Servicio
This commit is contained in:
Raul Pimienta
2019-09-09 15:20:20 -07:00
parent 02cce830a1
commit 91d5de0186
3 changed files with 26 additions and 19 deletions

View File

@@ -15936,15 +15936,15 @@ Partial Class Compras_Compras
End If End If
For Each Dr As DataRow In TmpDT.Rows For Each Dr As DataRow In TmpDT.Rows
Dr("PU") = Dr("PU").ToString.ToDouble * TipoCambioTemp Dr("PU") = Dr("PU").ToString.ToDecimal * TipoCambioTemp
Dr("IVA") = Dr("IVA").ToString.ToDouble * TipoCambioTemp Dr("IVA") = Dr("IVA").ToString.ToDecimal * TipoCambioTemp
Dr("RetIVA") = Dr("RetIVA").ToString.ToDouble * TipoCambioTemp Dr("RetIVA") = Dr("RetIVA").ToString.ToDecimal * TipoCambioTemp
Dr("RetISR") = Dr("RetISR").ToString.ToDouble * TipoCambioTemp Dr("RetISR") = Dr("RetISR").ToString.ToDecimal * TipoCambioTemp
Dr("IEPSPS") = Dr("IEPSPS").ToString.ToDouble * TipoCambioTemp Dr("IEPSPS") = Dr("IEPSPS").ToString.ToDecimal * TipoCambioTemp
Dr("Descuento") = Dr("Descuento").ToString.ToDouble * TipoCambioTemp Dr("Descuento") = Dr("Descuento").ToString.ToDecimal * TipoCambioTemp
Dr("OtrosGastos") = Dr("OtrosGastos").ToString.ToDouble * TipoCambioTemp Dr("OtrosGastos") = Dr("OtrosGastos").ToString.ToDecimal * TipoCambioTemp
Dim Total = (Dr("Cantidad").ToString.ToDouble * Dr("PU").ToString.ToDouble) - Dr("Descuento").ToString.ToDouble + Dr("OtrosGastos").ToString.ToDouble Dim Total = (Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal) - Dr("Descuento").ToString.ToDecimal + Dr("OtrosGastos").ToString.ToDecimal
Dr("Total") = Total Dr("Total") = Total
Next Next
@@ -15953,22 +15953,23 @@ Partial Class Compras_Compras
UpPS.Update() UpPS.Update()
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") TxtSubTotal.Text = (TmpDT.SUMD("Total") + TmpDT.SUMD("Descuento")).FormatoNumero
TxtSubTotal2.Text = (TxtSubTotal2.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") TxtSubTotal2.Text = TmpDT.SUMD("Total").FormatoNumero()
TxtIVA.Text = (TxtIVA.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") TxtIVA.Text = TmpDT.SUMD("IVA").FormatoNumero()
'IPP CAMBIADO - 5 DICIEMBRE 2016 'IPP CAMBIADO - 5 DICIEMBRE 2016
'TxtTotal.Text = (TxtSubTotal2.Text.ToDouble + TxtIVA.Text.ToDouble).ToString.FormatoNumero.Replace(","c, "") 'TxtTotal.Text = (TxtSubTotal2.Text.ToDouble + TxtIVA.Text.ToDouble).ToString.FormatoNumero.Replace(","c, "")
TxtTotal.Text = (TxtTotal.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") TxtTotal.Text = (TmpDT.SUMD("Total") + TmpDT.SUMD("IVA") + TmpDT.SUMD("IEPSPS") - TmpDT.SUMD("RetIVA") - TmpDT.SUMD("RetISR")).FormatoNumero
SubTotalOriginal = TxtSubTotal.Text.ToDouble SubTotalOriginal = TxtSubTotal.Text.ToDouble
SubTotal2Original = TxtSubTotal2.Text.ToDouble SubTotal2Original = TxtSubTotal2.Text.ToDouble
If TrDescuento.Visible Then TxtDescuento.Text = (TxtDescuento.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") If TrDescuento.Visible Then TxtDescuento.Text = (TmpDT.SUMD("Descuento")).ToString.FormatoNumero
If TrRetIVA.Visible Then TxtRetIVA.Text = (TxtRetIVA.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") If TrRetIVA.Visible Then TxtRetIVA.Text = (TmpDT.SUMD("RetIVA")).ToString.FormatoNumero
If TrRetISR.Visible Then TxtRetISR.Text = (TxtRetISR.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") If TrRetISR.Visible Then TxtRetISR.Text = (TmpDT.SUMD("RetISR")).ToString.FormatoNumero
If TrIEPS.Visible Then TxtIEPS.Text = (TxtIEPS.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") If TrIEPS.Visible Then TxtIEPS.Text = (TmpDT.SUMD("IEPSPS")).ToString.FormatoNumero
If TrOtrosImpuestos.Visible Then TxtOtrosImpuestos.Text = (TxtOtrosImpuestos.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") If TrOtrosImpuestos.Visible Then TxtOtrosImpuestos.Text = (TmpDT.SUMD("OtrosGastos")).ToString.FormatoNumero
If TrRedondeo.Visible Then TxtRedondeo.Text = (TxtRedondeo.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "") If TrRedondeo.Visible Then TxtRedondeo.Text = (TxtRedondeo.Text.ToDouble * TipoCambioTemp).ToString.FormatoNumero.Replace(","c, "")

View File

@@ -2172,6 +2172,7 @@ Partial Class OS_OrdenesServicios
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR 'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
If ErrorExistencia Then If ErrorExistencia Then
Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError) Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError)
TieneError = True
End If End If
If Not TieneError Then If Not TieneError Then

View File

@@ -7285,6 +7285,8 @@ Partial Class Ventas
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}") ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString.ToEntero > 0, "Ing", DdlTipoComprobante.SelectedValue) ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString.ToEntero > 0, "Ing", DdlTipoComprobante.SelectedValue)
'ObjFactura.RefDocto = TxtDocto.Text.Trim 'ObjFactura.RefDocto = TxtDocto.Text.Trim
ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1) ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1)
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero, -1) 'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero, -1)
@@ -8971,7 +8973,7 @@ Partial Class Ventas
End If End If
End If End If
If ErrorList.Count = 0 Then If ErrorList.Count = 0 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
'Agregamos las remisiones a la tabla 'Agregamos las remisiones a la tabla
If DtRemisionesPS IsNot Nothing AndAlso DtRemisionesPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then If DtRemisionesPS IsNot Nothing AndAlso DtRemisionesPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
Dim CveVentaDetalle As Integer = 0 Dim CveVentaDetalle As Integer = 0
@@ -10196,7 +10198,7 @@ Partial Class Ventas
End If End If
'Si es Facturacion de una remision cancelamos, traspasamos saldos y agregamos evento a la bitacora 'Si es Facturacion de una remision cancelamos, traspasamos saldos y agregamos evento a la bitacora
If RemisionesLista.Count > 0 Then If RemisionesLista.Count > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
'se verifica que el documento que se está generando sea "Ing", "Ant" 'se verifica que el documento que se está generando sea "Ing", "Ant"
If Not ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then If Not ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
@@ -21590,6 +21592,7 @@ Partial Class Ventas
DdlTipoComprobante.Items.Insert(1, New ListItem("Anticipos", "Ant")) DdlTipoComprobante.Items.Insert(1, New ListItem("Anticipos", "Ant"))
DdlTipoComprobante.SelectedIndex = 0 DdlTipoComprobante.SelectedIndex = 0
DdlTipoComprobante.SelectedValueExist(CveTipoDocto) DdlTipoComprobante.SelectedValueExist(CveTipoDocto)
CambiaTipoComprobante() CambiaTipoComprobante()
Dim MensajeRemisiones As New StringBuilder Dim MensajeRemisiones As New StringBuilder
@@ -21639,6 +21642,8 @@ Partial Class Ventas
UPEstimaciones.Update() UPEstimaciones.Update()
UPCondicionesPago.Update() UPCondicionesPago.Update()
HuboCambioRemi = Not HuboCambioRemi HuboCambioRemi = Not HuboCambioRemi
RegistraScript("$('#DivRemisiones').modal('hide');", "DivRemisionesHide") RegistraScript("$('#DivRemisiones').modal('hide');", "DivRemisionesHide")
End Sub End Sub
Private Sub VerificaRemisiones(ByRef dt As DataTable) Private Sub VerificaRemisiones(ByRef dt As DataTable)