Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -227,6 +227,12 @@
|
||||
OnSelectedIndexChanged="DdlSubProyectoGral_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyectoGral" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyectoGral" Display="None"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyectoGral" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyectoGral" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -2425,6 +2425,12 @@ Partial Class OC_OC
|
||||
#Region " AGREGAR "
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
|
||||
|
||||
If ModalidadSubProyectoGeneral And DdlSubProyectoGral.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe seleccionar una Sucursal", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'VALIDA CVEPS
|
||||
If DdlP2.SelectedValue().ToEntero <= 0 Then
|
||||
Alert("El campo <b>'Producto/Servicio'</b> es necesario, por favor seleccione uno.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2491,6 +2497,16 @@ Partial Class OC_OC
|
||||
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
|
||||
Dim CantidadVentaMinima As Decimal = DrPS("VentaMinima").ToString.ToDecimal
|
||||
|
||||
Dim CveSubProyectoVal As Integer = DdlSubProyecto.SelectedValue.ToString.ToEntero
|
||||
|
||||
If ModalidadSubProyectoGeneral Then
|
||||
CveSubProyectoVal = DdlSubProyectoGral.SelectedValue.ToEntero
|
||||
SubProyecto = DdlSubProyectoGral.SelectedItem.Text
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If CantidadVentaMinima > 0 AndAlso TxtCant.Text.ToDecimal > 0 Then
|
||||
If TxtCant.Text.ToDecimal Mod CantidadVentaMinima <> 0 Then
|
||||
Alert(String.Format("El producto se vende solo en cantidades de <b>{0:####.####}</b>", CantidadVentaMinima))
|
||||
@@ -2509,9 +2525,11 @@ Partial Class OC_OC
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
AddPS(TxtCant.Text.ToDecimal, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS,
|
||||
CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto,
|
||||
DdlSubProyecto.SelectedValue.ToEntero, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer,
|
||||
CveSubProyectoVal, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer,
|
||||
IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero,
|
||||
DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR, CveCultivoCuadroDetalle:=DdlCultivosCuadro.SelectedValue.ToEntero, Cuadro:=DdlCultivosCuadro.SelectedItem.Text)
|
||||
|
||||
@@ -2949,9 +2967,16 @@ Partial Class OC_OC
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
Dim tCveSubProyecto As Integer = UsuarioActual.CveSubProyecto
|
||||
If ModalidadSubProyectoGeneral Then tCveSubProyecto = DdlSubProyectoGral.SelectedValue.ToEntero
|
||||
|
||||
If tCveSubProyecto <= 0 Then
|
||||
tCveSubProyecto = GetCveSubProyectoDetalles()
|
||||
End If
|
||||
|
||||
|
||||
If Not TieneError Then ' AGREGAR REQUISICION
|
||||
If OC.AddOrdenCompra("REQ", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CboE.SelectedValue.ToEntero, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
||||
If OC.AddOrdenCompra("REQ", tCveSubProyecto, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CboE.SelectedValue.ToEntero, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
||||
LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal,
|
||||
RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal,
|
||||
RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim,
|
||||
@@ -3184,7 +3209,16 @@ Partial Class OC_OC
|
||||
End If
|
||||
|
||||
|
||||
If OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
||||
Dim tCveSubProyectoVal As Integer = -1
|
||||
If ModalidadSubProyectoGeneral Then
|
||||
tCveSubProyectoVal = DdlSubProyectoGral.SelectedValue.ToEntero
|
||||
If tCveSubProyectoVal <= 0 Then
|
||||
tCveSubProyectoVal = GetCveSubProyectoDetalles()
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If OC.UpdateOrdenCompra(tCveSubProyectoVal, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
||||
LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero,
|
||||
DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
|
||||
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
|
||||
@@ -9952,9 +9986,9 @@ Partial Class OC_OC
|
||||
|
||||
If Respuesta Then
|
||||
If Recargar Then
|
||||
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto} CveMovmiento: {CveMovimiento}", TipoMensaje.MsgInformacion, "window.location.reload();")
|
||||
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto}", TipoMensaje.MsgInformacion, "window.location.reload();")
|
||||
Else
|
||||
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto} CveMovmiento: {CveMovimiento}", TipoMensaje.MsgInformacion)
|
||||
Alert($"Movimiento Guardado Correctamente Folio:{FolioMto}", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user