--Mejoras en facturacion masiva
This commit is contained in:
@@ -1973,6 +1973,16 @@
|
||||
<asp:Button ID="BtnVerPlantilla" runat="server" Text="Ver Plantilla" CssClass="btn btn-sm btn-primary" Width="100%" OnClick="BtnVerPlantilla_Click"/>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate ">Observación General:</label>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ID="TxtObsGeneral" runat="server" Width="100%" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:Button ID="BtnVerPlantilla2" runat="server" Text="Ver Plantilla" CssClass="btn btn-sm btn-primary" Width="100%" OnClick="BtnVerPlantilla2_Click"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
|
||||
@@ -1383,7 +1383,8 @@ Partial Class Contratos_Default
|
||||
CveAlmacenOrigen:=DdlAlmacenOrigen.SelectedValue.ToEntero, CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, PorcentajeComision:=TxtPorcentajeComision.Text.ToEntero,
|
||||
TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero,
|
||||
CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=DdlClienteDireccionEnvio.SelectedValue.ToEntero, AplicaImpuestosLocales:=ChkImpuestosLocales.Checked,
|
||||
CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=If(DdlDiaFact.SelectedValue.ToEntero() < 0, 0, DdlDiaFact.SelectedValue.ToEntero()), CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero()) Then
|
||||
CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=If(DdlDiaFact.SelectedValue.ToEntero() < 0, 0, DdlDiaFact.SelectedValue.ToEntero()),
|
||||
CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero(), ObservacionesGenerales:=TxtObsGeneral.Text.Trim) Then
|
||||
|
||||
|
||||
TieneError = Not GuardaFianzas(ObjContratos)
|
||||
@@ -4028,7 +4029,8 @@ Partial Class Contratos_Default
|
||||
TxtUbicacion.Text, TxtResponsable.Text, DdlSubProyectoContrato.SelectedValue.ToEntero, TxtPorIVA.Text.ToDouble, TxtPorAnticipo.Text.ToDouble, TxtPorAmortizacionAnticipo.Text.ToDouble,
|
||||
TxtPorGarantia.Text.ToDouble, "." & Session("FileExtension").ToString, "", CveContrato, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, Minimo, Maximo, Total,
|
||||
DdlMoneda.SelectedValue.ToEntero, ModalidadDetalle, If(UsuarioActual.Empresa.CvePlataforma = 3, 1, CveEstatusInicial), TipoContrato, TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero, CveAlmacenOrigen:=DdlAlmacenOrigen.SelectedValue.ToEntero, CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, PorcentajeComision:=TxtPorcentajeComision.Text.ToEntero,
|
||||
TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero, CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero, CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero)
|
||||
TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero, CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero, CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero,
|
||||
ObservacionesGenerales:=TxtObsGeneral.Text.Trim)
|
||||
|
||||
|
||||
If CveContratoHijo > 0 Then
|
||||
@@ -4578,6 +4580,61 @@ Partial Class Contratos_Default
|
||||
Plantilla = Plantilla.ToString().Replace("{FINMESANTERIOR}", mesAnterior)
|
||||
End If
|
||||
|
||||
Alert(Plantilla)
|
||||
End Sub
|
||||
Protected Sub BtnVerPlantilla2_Click(sender As Object, e As EventArgs)
|
||||
Dim Plantilla As String = TxtObsGeneral.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
|
||||
|
||||
@@ -142,6 +142,14 @@ Partial Class Contratos_FacturacionMasiva
|
||||
Row("Observaciones") = Row("Observaciones").ToString().Replace("{MES}", nombreMes)
|
||||
End If
|
||||
|
||||
If Row("Observaciones").ToString().Contains("{MESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Row("Observaciones") = Row("Observaciones").ToString().Replace("{MESANTERIOR}", nombreMes)
|
||||
End If
|
||||
|
||||
If Row("Observaciones").ToString().Contains("{AÑO}") Then
|
||||
Row("Observaciones") = Row("Observaciones").ToString().Replace("{AÑO}", DateTime.Now.Year.ToString())
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user