Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2559,7 +2559,7 @@ Partial Class Compras_Compras
|
||||
GvCreditosRelacionados.DataSource = ObjBancos.DtResultados
|
||||
GvCreditosRelacionados.Visible = True
|
||||
GvCreditosRelacionados.DataBind()
|
||||
romCreditosTabla.Visible = True
|
||||
'romCreditosTabla.Visible = True
|
||||
GvCreditos.Visible = False
|
||||
GvCreditosRelacionados.Visible = True
|
||||
|
||||
@@ -4187,7 +4187,7 @@ Partial Class Compras_Compras
|
||||
Dim DifCreCompra As Decimal = 0
|
||||
Dim TotalCreditos As Decimal = 0
|
||||
Dim MensualidadMultipleTotal As Decimal = 0
|
||||
Dim CveUltimoCreditoDetalleInterno As Integer
|
||||
' Dim CveUltimoCreditoDetalleInterno As Integer
|
||||
|
||||
For Each GvRow As GridViewRow In GvCreditos.Rows
|
||||
|
||||
@@ -4201,22 +4201,22 @@ Partial Class Compras_Compras
|
||||
|
||||
TotalCreditos = TotalCreditos + CapitalMiltiple + InteresMiltiple
|
||||
MensualidadMultipleTotal = MensualidadMultipleTotal + MensualidadMultiple
|
||||
CveUltimoCreditoDetalleInterno = GvRow.DataKey("CveCreditoDetalle").ToEntero
|
||||
'CveUltimoCreditoDetalleInterno = GvRow.DataKey("CveCreditoDetalle").ToEntero
|
||||
|
||||
ElseIf AmbosMiltiple > 0 Then
|
||||
|
||||
TotalCreditos = TotalCreditos + AmbosMiltiple
|
||||
MensualidadMultipleTotal = MensualidadMultipleTotal + MensualidadMultiple
|
||||
CveUltimoCreditoDetalleInterno = GvRow.DataKey("CveCreditoDetalle").ToEntero
|
||||
'CveUltimoCreditoDetalleInterno = GvRow.DataKey("CveCreditoDetalle").ToEntero
|
||||
EstatusCredito = GvRow.DataKey("Estatus").ToEntero
|
||||
End If
|
||||
Next
|
||||
|
||||
If TotalCreditos <> TxtTotal.Text.ToDecimal Then
|
||||
Alert($"El importe de La factura no concide con el total de los creditos, diferencia: { (TotalCreditos - TxtTotal.Text.ToDecimal).FormatoNumero(2)}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
'If TotalCreditos <> TxtTotal.Text.ToDecimal Then
|
||||
' Alert($"El importe de La factura no concide con el total de los creditos, diferencia: { (TotalCreditos - TxtTotal.Text.ToDecimal).FormatoNumero(2)}", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
''VERIFICA SI LOS PRODUCTOS/SERVICIOS EXISTEN EN EL CATALOGO DEL SAT
|
||||
@@ -4833,9 +4833,9 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
|
||||
If RBLPago.SelectedValue.ToEntero = 4 And EstatusCredito.Contiene(1, 101) Then
|
||||
CveEstatusFactura = 6
|
||||
End If
|
||||
'If RBLPago.SelectedValue.ToEntero = 4 And EstatusCredito.Contiene(1, 101) Then
|
||||
' CveEstatusFactura = 6
|
||||
'End If
|
||||
|
||||
|
||||
'Compra
|
||||
@@ -5996,6 +5996,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If RBLPago.SelectedValue.ToEntero = 4 And EstatusCredito.Contiene(2, 102) Then 'SI ES CRÉDITO Y ESTA PAGADO
|
||||
|
||||
'aqui meter for, con validaciones de estatus de creditos
|
||||
For Each Row2 As DataRow In TmpDT.Rows
|
||||
|
||||
importeMovimiento = TxtTotal.Text.ToDecimal 'TmpDT.SUM("Total", String.Format("ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And CveClasificacion = {0} And CveSubProyecto = {1} And ISNULL(CveTipoGasto, 0) = {2} Then", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal
|
||||
@@ -6041,20 +6042,64 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, importeMN, 41, Referencia, Concepto, CtaProveedorAcreedores, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, importeMN, 41, Referencia, Concepto, CtaProveedorAcreedores, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
' ErrorPrepoliza = True
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
'daskldaskldmaskldanmlksd
|
||||
If importeMovimiento <> 0 Then
|
||||
Dim Pago As New CompraPago
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.CveIE = CveIE
|
||||
Pago.CveMonedaPago = 1
|
||||
Pago.CveCompraAmortizacion = -1
|
||||
Pago.CveCreditoDetalle = CveCreditoDetalle
|
||||
'Pago.OtroGastoIngreso = OtrosGastosIngresos
|
||||
For Each gvRowCredito As GridViewRow In GvCreditos.Rows
|
||||
|
||||
Dim ImportePagoCredito As Decimal = If(gvRowCredito.FCTextBox("TxtAmbos").Text.ToDecimal > 0, gvRowCredito.FCTextBox("TxtAmbos").Text.ToDecimal, (gvRowCredito.FCTextBox("TxtCapital").Text.ToDecimal + gvRowCredito.FCTextBox("TxtInteres").Text.ToDecimal))
|
||||
Dim TotalMensualidadCredito As Decimal = gvRowCredito.DataKey("Total").ToDecimal
|
||||
Dim CveMonedaCredito As Integer = gvRowCredito.DataKey("CveMoneda").ToEntero
|
||||
|
||||
Dim OtrosGastosIngresosCredito As Decimal = gvRowCredito.FCTextBox("TxtComision").Text.ToDecimal
|
||||
Dim CveIECredito As Integer = gvRowCredito.DataKey("CveIE").ToEntero
|
||||
Dim CveCreditoDetalleTemp As Integer = gvRowCredito.DataKey("CveCreditoDetalle").ToEntero
|
||||
|
||||
Dim Pago As New CompraPago
|
||||
Pago.ImportePago = CompraActual.Total
|
||||
Pago.CveIE = CveIECredito
|
||||
Pago.CveMonedaPago = 1
|
||||
Pago.CveCompraAmortizacion = -1
|
||||
Pago.CveProveedor = CveProveedor
|
||||
Pago.CveCreditoDetalle = CveCreditoDetalleTemp
|
||||
Pago.TipoPago = "Egsc"
|
||||
|
||||
If OtrosGastosIngresosCredito <> 0 Then
|
||||
Pago.OtroGastoIngreso = OtrosGastosIngresosCredito
|
||||
End If
|
||||
|
||||
ErrorCreditosCompra = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
If ErrorCreditosCompra Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim ImporteDifCredito As Decimal = TotalMensualidadCredito - ImportePagoCredito
|
||||
|
||||
If ImporteDifCredito > 0 Then
|
||||
|
||||
Dim ImportePagoCreditoMN As Decimal = ImportePagoCredito * tipoCambioActual
|
||||
Dim ImporteDifCreditoMN As Decimal = ImporteDifCredito * tipoCambioActual
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDifCredito, ImporteDifCreditoMN, 59, Referencia, Concepto, IdCtaContable, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIECredito, CveCreditoDetalle:=CveCreditoDetalleTemp, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, ImporteDifCredito), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDifCredito, ImporteDifCreditoMN, 21, Referencia, Concepto, CtaProveedorAcreedores, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIECredito, CveCreditoDetalle:=CveCreditoDetalleTemp, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, ImporteDifCredito), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
End If
|
||||
|
||||
@@ -6094,6 +6139,10 @@ Partial Class Compras_Compras
|
||||
IdCtaContable = CtaProveedorExtranjera
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Case 30 'Bancos
|
||||
importeMovimiento = importeBanco + importeCajaChica 'Uno de los dos debe ser 0
|
||||
If CveMonedaPago = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
|
||||
@@ -11787,7 +11836,7 @@ Partial Class Compras_Compras
|
||||
tdNumeroReembolso.Visible = False
|
||||
End If
|
||||
EsContado = False
|
||||
romCreditosTabla.Visible = False
|
||||
'romCreditosTabla.Visible = False
|
||||
Case "2" 'Contado
|
||||
PnlContado.Visible = True
|
||||
TxtNumeroReembolso.Text = ""
|
||||
@@ -11810,7 +11859,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
EsContado = True
|
||||
romCreditosTabla.Visible = False
|
||||
'romCreditosTabla.Visible = False
|
||||
Case "3" 'Reembolso/Comprobacion
|
||||
PnlContado.Visible = True
|
||||
|
||||
@@ -11867,7 +11916,7 @@ Partial Class Compras_Compras
|
||||
Case "6"
|
||||
DdlCuentaCajaChicaReembolso.Visible = True
|
||||
End Select
|
||||
romCreditosTabla.Visible = False
|
||||
'romCreditosTabla.Visible = False
|
||||
Case "4"
|
||||
EsContado = False
|
||||
CargaCreditosDisponibles()
|
||||
@@ -11879,6 +11928,11 @@ Partial Class Compras_Compras
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivContadoModal"))
|
||||
End If
|
||||
|
||||
|
||||
If RBLPago.SelectedValue.ToEntero = 4 Then ' Créditos Financieros
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivCreditoFinacieroModal"))
|
||||
End If
|
||||
|
||||
LtlTituloPago.Text = If(EsContado, "Contado", "Reembolso")
|
||||
|
||||
DivContado.Visible = EsContado
|
||||
@@ -11942,20 +11996,20 @@ Partial Class Compras_Compras
|
||||
Case "1" ' Bancos
|
||||
PnlContadoBancos.Visible = True
|
||||
TxtDocumentoImporte.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
||||
ChkCreditoMultiple.Visible = False
|
||||
'ChkCreditoMultiple.Visible = False
|
||||
RfvTxtNumeroReembolso.Enabled = False
|
||||
TxtNumeroReembolso.Text = ""
|
||||
TxtRembolsoNumero.Text = ""
|
||||
Case "2" ' F y E
|
||||
PnlContadoFyE.Visible = True
|
||||
CargaFuncionariosEmpleados()
|
||||
ChkCreditoMultiple.Visible = False
|
||||
'ChkCreditoMultiple.Visible = False
|
||||
RfvTxtNumeroReembolso.Enabled = True
|
||||
TxtRembolsoNumero.Text = ""
|
||||
TxtNumeroReembolso.Text = ""
|
||||
Case "3" ' Creditos
|
||||
PnlContadoCreditos.Visible = True
|
||||
ChkCreditoMultiple.Visible = True
|
||||
'ChkCreditoMultiple.Visible = True
|
||||
CargaCreditos()
|
||||
RfvTxtNumeroReembolso.Enabled = False
|
||||
RfvTxtNumeroReembolso.Text = ""
|
||||
@@ -11963,13 +12017,13 @@ Partial Class Compras_Compras
|
||||
Case "4" ' Deudores
|
||||
PnlContadoDeudores.Visible = True
|
||||
CargaDeudores()
|
||||
ChkCreditoMultiple.Visible = False
|
||||
'ChkCreditoMultiple.Visible = False
|
||||
RfvTxtNumeroReembolso.Enabled = False
|
||||
TxtNumeroReembolso.Text = ""
|
||||
TxtRembolsoNumero.Text = ""
|
||||
Case "5" ' ACREEDORES
|
||||
PnlContadoAcreedores.Visible = True
|
||||
ChkCreditoMultiple.Visible = True
|
||||
'ChkCreditoMultiple.Visible = True
|
||||
CargaAcreedores()
|
||||
RfvTxtNumeroReembolso.Enabled = False
|
||||
TxtNumeroReembolso.Text = ""
|
||||
@@ -11977,7 +12031,7 @@ Partial Class Compras_Compras
|
||||
Case "6" ' Caja Chica
|
||||
PnlContadoCajaChica.Visible = True
|
||||
TxtDocumentoImporteCaja.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
||||
ChkCreditoMultiple.Visible = False
|
||||
'ChkCreditoMultiple.Visible = False
|
||||
RfvTxtNumeroReembolso.Enabled = True
|
||||
TxtNumeroReembolso.Text = ""
|
||||
TxtRembolsoNumero.Text = ""
|
||||
@@ -18793,7 +18847,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If ChkCreditoMultiple.Checked Then
|
||||
|
||||
romCreditosTabla.Visible = True
|
||||
'romCreditosTabla.Visible = True
|
||||
Dim ObjBancos As New ClsBancos
|
||||
|
||||
If ObjBancos.GetCreditosDetalleCompras(UsuarioActual.CveEmpresa, CveProveedor, -1, -1, -1) Then
|
||||
@@ -18860,11 +18914,11 @@ Partial Class Compras_Compras
|
||||
GvCreditos.DataSource = Nothing
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
romCreditosTabla.Visible = True
|
||||
'romCreditosTabla.Visible = True
|
||||
GvCreditos.DataBind()
|
||||
|
||||
Else
|
||||
romCreditosTabla.Visible = False
|
||||
'romCreditosTabla.Visible = False
|
||||
End If
|
||||
|
||||
UpGvCreditos.Update()
|
||||
|
||||
Reference in New Issue
Block a user