Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4,6 +4,7 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Net.Http
|
||||
Imports CrystalDecisions.CrystalReports.Engine
|
||||
Imports Extensiones
|
||||
Imports Modelos.Factura
|
||||
|
||||
@@ -469,6 +470,28 @@ Partial Class Ventas_PVCobranza
|
||||
Else
|
||||
e.Row.FCLinkButton("BtnPagar").Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Fecha") <> Now.ToShortDateString Then
|
||||
e.Row.FCLinkButton("BtnPagar").Enabled = False
|
||||
e.Row.FCLinkButton("BtnPagar").Text = "Cobrar"
|
||||
'e.Row.FCLinkButton("BtnPagar").CssClass = "btn btn-xs default"
|
||||
e.Row.FCLinkButton("BtnPagar").OnClientClick =
|
||||
"bootbox.dialog({" &
|
||||
"message: 'No se puede realizar un cobro a una remisión de días anteriores.<br/> Favor de cancelar la remisión y generarla con fecha actual. ', " &
|
||||
"className: 'header-yellow', " &
|
||||
"onEscape: function() {}, " &
|
||||
"title: '<i class=""fa fa-warning""></i> Advertencia', " &
|
||||
"buttons: { " &
|
||||
"success: { label: '', className: 'hide', callback: function() {} }, " &
|
||||
"danger: { label: '', className: 'hide', callback: function() {} }, " &
|
||||
"main: { label: 'Aceptar', className: 'yellow', callback: function() {} } " &
|
||||
"} " &
|
||||
"});" &
|
||||
"return false;"
|
||||
|
||||
'e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#3598dc")
|
||||
'e.Row.CssClass = "blue-madison"
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -819,6 +842,14 @@ Partial Class Ventas_PVCobranza
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
|
||||
If MsgError = "" Then
|
||||
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=respFactura.CveVenta) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjVentas2.Commit()
|
||||
Dim msBuild As New StringBuilder()
|
||||
@@ -877,33 +908,34 @@ Partial Class Ventas_PVCobranza
|
||||
msBuild.AppendFormat("{0}", pdfNC)
|
||||
End If
|
||||
|
||||
If respNC IsNot Nothing Then
|
||||
For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows
|
||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}",
|
||||
dr("CveIE").ToString,
|
||||
dr("CveVenta").ToString,
|
||||
respNC.Factura.CveCliente,
|
||||
respNC.CveVenta,
|
||||
respNC.Factura.Total))}"">Imprimir Saldo Aplicado {dr("Folio").ToString}</a><br/>")
|
||||
Next
|
||||
Else
|
||||
For Each dr As DataRow In respFactura.Factura.DtAnticiposAplicados.Rows
|
||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}",
|
||||
dr("CveIE").ToString,
|
||||
dr("CveVenta").ToString,
|
||||
respFactura.Factura.CveCliente,
|
||||
respFactura.CveVenta,
|
||||
respFactura.Factura.Total))}"">Imprimir Saldo Aplicado {dr("Folio").ToString}</a><br/>")
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If Not String.IsNullOrEmpty(MsgTimbrado) Then
|
||||
msBuild.AppendFormat("<br/>{0}<br/>", MsgTimbrado)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If respNC IsNot Nothing Then
|
||||
For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows
|
||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}&SALDO={5}",
|
||||
dr("CveIE").ToString,
|
||||
dr("CveVenta").ToString,
|
||||
respNC.Factura.CveCliente,
|
||||
respNC.CveVenta,
|
||||
respNC.Factura.Total,
|
||||
(respNC.Factura.Total - respNC.Factura.DtAnticiposAplicados.SUM("Importe"))))}"">Imprimir historial {dr("Folio").ToString}</a><br/>")
|
||||
Next
|
||||
Else
|
||||
For Each dr As DataRow In respFactura.Factura.DtAnticiposAplicados.Rows
|
||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}&SALDO={5}",
|
||||
dr("CveIE").ToString,
|
||||
dr("CveVenta").ToString,
|
||||
respFactura.Factura.CveCliente,
|
||||
respFactura.CveVenta,
|
||||
respFactura.Factura.Total,
|
||||
(respFactura.Factura.Total - respFactura.Factura.DtAnticiposAplicados.SUM("Importe"))))}"">Imprimir historial {dr("Folio").ToString}</a><br/>")
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user