Cambios BDH, ajuste y garantia
This commit is contained in:
@@ -4450,15 +4450,17 @@ Partial Class Contratos_Default
|
||||
|
||||
Select Case TipoContrato
|
||||
Case 7 'Contrato Comodato
|
||||
SufijoContrato = "COM"
|
||||
SufijoContrato = "COMODATO"
|
||||
Case 8 'Contrato Consignacion
|
||||
SufijoContrato = "CONSIG"
|
||||
SufijoContrato = "CONSIGNACION"
|
||||
Case 9 'Contrato de Arrendamiento
|
||||
SufijoContrato = "ARRENDAMIENTO"
|
||||
Case 10 'Contrato de Financiamiento
|
||||
SufijoContrato = "FIN"
|
||||
SufijoContrato = "FINANCIAMIENTO"
|
||||
Case 13 'Contrato Servicio Administrado de Impresion (?)
|
||||
SufijoContrato = "MPS"
|
||||
Case 28 'Convenio Precio Fijo
|
||||
SufijoContrato = "CON"
|
||||
SufijoContrato = "CONVENIO"
|
||||
End Select
|
||||
|
||||
Dim Serie As String = String.Format("-{0}-{1}", DateTime.Today.Year, SufijoContrato)
|
||||
@@ -4504,6 +4506,61 @@ Partial Class Contratos_Default
|
||||
UpFacCiclica.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnVerPlantilla_Click(sender As Object, e As EventArgs)
|
||||
Dim Plantilla As String = TxtObservaciones.Text
|
||||
|
||||
If Plantilla.Contains("{DIA}") Then
|
||||
Plantilla = Plantilla.Replace("{DIA}", DateTime.Now.Day.ToString())
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{MES}") Then
|
||||
Dim fecha As DateTime = DateTime.Now
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{AÑO}") Then
|
||||
Plantilla = Plantilla.Replace("{AÑO}", DateTime.Now.Year.ToString())
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{TC}") Then
|
||||
Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{MESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{INICIOMESANTERIOR}", mesAnterior)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim LastDayOfMonth = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||
|
||||
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{FINMESANTERIOR}", mesAnterior)
|
||||
End If
|
||||
|
||||
Alert(Plantilla)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user