Correciones en facturacion masiva
This commit is contained in:
@@ -1021,6 +1021,7 @@ Partial Class Contratos_Default
|
||||
If ObjContratos.DtResultados.Rows(0)("CvePeriodo").ToString().ToEntero() > 0 Then
|
||||
DdlPeriodo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CvePeriodo").ToString().ToEntero())
|
||||
DdlPeriodo_SelectedIndexChanged(DdlPeriodo, EventArgs.Empty)
|
||||
DdlDiaFact.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("DiaMesFacturacion").ToString())
|
||||
End If
|
||||
UpFacCiclica.Update()
|
||||
|
||||
@@ -1235,6 +1236,16 @@ Partial Class Contratos_Default
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ChkAplicaFacCiclica.Checked AndAlso DdlPeriodo.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe seleccionar un periodo para la facturación ciclica", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ChkAplicaFacCiclica.Checked AndAlso DdlDiaFact.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe seleccionar un día para la facturación ciclica", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim TieneError = False
|
||||
Dim Modificado = False
|
||||
' Dim Extension = Session("FileExtension").ToString
|
||||
@@ -1508,7 +1519,8 @@ Partial Class Contratos_Default
|
||||
For Ciclo As Integer = 1 To CiclosComercialesEnMeses
|
||||
Dim FechaRef As DateTime = FechaI.AddMonths(PeriodoMeses * Ciclo)
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month)
|
||||
Dim DiaMes As Integer = If(FechaRef.Day < DdlDiaFact.SelectedValue.ToEntero(), lastDayOfMonth, DdlDiaFact.SelectedValue.ToEntero())
|
||||
|
||||
Dim DiaMes As Integer = If(lastDayOfMonth < DdlDiaFact.SelectedValue.ToEntero(), lastDayOfMonth, DdlDiaFact.SelectedValue.ToEntero())
|
||||
|
||||
Dim FechaFact = New DateTime(FechaRef.Year, FechaRef.Month, DiaMes)
|
||||
FechaFact = If(FechaFact > FechaF, FechaF, FechaFact)
|
||||
@@ -2304,7 +2316,7 @@ Partial Class Contratos_Default
|
||||
If ObjContratos.RemoveContratosDetalle(CveContratoDetalle, CveContrato) Then
|
||||
TmpDT.Rows.Remove(DbRow)
|
||||
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
||||
LbTotalGeneralInsumos.Text = GvInsumos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.FCLiteral("LtTotal").Text.ToDouble).ToString.FormatoNumero
|
||||
LbTotalGeneralInsumos.Text = GvInsumos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.FCLabel("LtTotal").Text.ToDouble).ToString.FormatoNumero
|
||||
Else
|
||||
Alert("Ocurrió un error al eliminar el detalle (Producto/Servicio). Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user