public InputDeliveryAddForm(IAcreedorInfo acreedor, PedidoProveedorInfo pedido, Form parent) : this(parent, ETipoAlbaranes.Todos) { SetProvider(acreedor); SetSerie(SerieInfo.Get(pedido.OidSerie, false), true); AddPedidoAction(pedido); }
internal static string SELECT(IAcreedorInfo source) { return(SELECT(new QueryConditions() { Acreedor = source })); }
/// <summary> /// Copia los atributos del objeto /// </summary> /// <param name="source">Objeto origen</param> protected void CopyValues(AlbaranFacturaProveedorInfo source, IAcreedorInfo acreedor, InputInvoiceInfo factura, InputDeliveryInfo albaran) { if (source == null) { return; } Oid = source.Oid; _base.Record.OidAlbaran = source.OidAlbaran; _base.Record.OidFactura = source.OidFactura; SerieInfo serie = SerieInfo.Get(factura.OidSerie, false); _base.CodigoFactura = factura.Codigo; _total_factura = factura.Total; _numero_serie = serie.Identificador; _fecha_factura = factura.Fecha; _prevision = factura.Prevision; //INNER JOIN _codigo_cliente = acreedor.Codigo; _nombre = acreedor.Nombre; _telefonos = acreedor.Telefono; _dias_pago = albaran.Fecha.Subtract(factura.Fecha).Days; }
public static ProviderBase New(IAcreedorInfo source) { ProviderBase obj = new ProviderBase(); obj.CopyValues(source); return(obj); }
public static string SELECT(IAcreedorInfo acreedor) { QueryConditions conditions = new QueryConditions { Acreedor = acreedor }; conditions.TipoAcreedor[0] = acreedor.ETipoAcreedor; if (acreedor.ETipoAcreedor == ETipoAcreedor.Empleado) return Employee.SELECT_PAGOS_NOMINAS(conditions); else return SELECT_BASE(conditions); }
public virtual void CopyValues(IAcreedorInfo source) { if (source == null) { return; } _record.CopyValues(source.ProviderBase.Record); CopyCommonValues(source); }
public LineaPedidoProveedor NewItem(PedidoProveedor parent, IAcreedorInfo acreedor, ProductInfo producto) { LineaPedidoProveedor item = LineaPedidoProveedor.NewChild(parent, acreedor, producto); this.AddItem(item); parent.CalculaTotal(); return(item); }
/// Constructor /// </summary> public InputDeliveryLineUIForm(InputDeliveryLine line, InputDelivery delivery, SerieInfo serie, IAcreedorInfo provider, Form parent) : base(true, parent) { InitializeComponent(); _entity = line; _delivery = delivery; _serie = serie; _provider = provider; }
protected void SetAcreedor(IAcreedorInfo source) { if (source == null) { return; } _provider = source; Providers_BS.DataSource = _provider; }
private void Acreedor_BT_Click(object sender, EventArgs e) { _tipo_titular = (ETipoTitular)(long)TipoTitular_CB.SelectedValue; switch (_tipo_titular) { case ETipoTitular.Despachante: { CustomAgentSelectForm form = new CustomAgentSelectForm(this, EEstado.Active); if (form.ShowDialog(this) == DialogResult.OK) { _acreedor = (IAcreedorInfo)form.Selected; Acreedor_TB.Text = _acreedor.Nombre; } } break; case ETipoTitular.Naviera: { ShippingCompanySelectForm form = new ShippingCompanySelectForm(this, EEstado.Active); if (form.ShowDialog(this) == DialogResult.OK) { _acreedor = (IAcreedorInfo)form.Selected; Acreedor_TB.Text = _acreedor.Nombre; } } break; case ETipoTitular.Proveedor: { ProveedorList list = ProveedorList.GetList(EEstado.Active, false); SupplierSelectForm form = new SupplierSelectForm(this, list); if (form.ShowDialog(this) == DialogResult.OK) { _acreedor = (IAcreedorInfo)form.Selected; Acreedor_TB.Text = _acreedor.Nombre; } } break; case ETipoTitular.TransportistaOrigen: case ETipoTitular.TransportistaDestino: { TransporterSelectForm form = new TransporterSelectForm(this, TransporterList.GetList(false)); if (form.ShowDialog(this) == DialogResult.OK) { _acreedor = (IAcreedorInfo)form.Selected; Acreedor_TB.Text = _acreedor.Nombre; } } break; } }
public static string SELECT(IAcreedorInfo item) { QueryConditions conditions = new QueryConditions { TipoAcreedor = new ETipoAcreedor[1] { item.ETipoAcreedor }, Acreedor = item }; return(SELECT(conditions)); }
public InputInvoiceAddForm(InputDeliveryInfo albaran, IAcreedorInfo emisor, Form parent) : base(new object[2] { albaran, emisor }, parent) { InitializeComponent(); SetFormData(); _mf_type = ManagerFormType.MFAdd; SetEmisor(emisor); SetSerie(SerieInfo.Get(albaran.OidSerie, false), true); _albaran = albaran; }
public static ProductList GetList(IAcreedorInfo provider, SerieInfo serie, bool childs) { QueryConditions conditions = new QueryConditions { Acreedor = provider, TipoAcreedor = new ETipoAcreedor[1] { provider.ETipoAcreedor }, Serie = serie }; return(GetList(ProductList.SELECT(conditions), childs)); }
public static LineaPedidoProveedor NewChild(PedidoProveedor parent, IAcreedorInfo acreedor, ProductInfo producto) { if (!CanAddObject()) { throw new System.Security.SecurityException(moleQule.Resources.Messages.USER_NOT_ALLOWED); } LineaPedidoProveedor obj = DataPortal.Create <LineaPedidoProveedor>(new CriteriaCs(-1)); obj.CopyFrom(parent, acreedor, producto); return(obj); }
public static ProductoProveedorList GetChildList(IAcreedorInfo parent, bool childs) { CriteriaEx criteria = ProductoProveedor.GetCriteria(ProductoProveedor.OpenSession()); criteria.Query = ProductoProveedorList.SELECT(parent); criteria.Childs = childs; ProductoProveedorList list = DataPortal.Fetch <ProductoProveedorList>(criteria); CloseSession(criteria.SessionCode); return(list); }
public static ProductList GetList(IAcreedorInfo acreedor, SerieInfo serie, bool childs, bool cache) { ProductList list; if (!Cache.Instance.Contains(typeof(ProductList))) { list = ProductList.GetList(acreedor, serie, childs); Cache.Instance.Save(typeof(ProductList), list); } else { list = Cache.Instance.Get(typeof(ProductList)) as ProductList; } return(list); }
protected override void SetProvider(IAcreedorInfo source) { if (source == null) { return; } base.SetProvider(source); if (_entity.Conceptos.Count == 0) { _entity.AddProductosAcreedor(_provider, _serie); } Lines_BS.ResetBindings(false); }
protected virtual void CrearAlbaranAction() { if (_entity.EEstado != moleQule.Base.EEstado.Abierto) { return; } ExecuteAction(molAction.Save); if (_action_result == DialogResult.OK) { _acreedor = Datos_Acreedor.DataSource as IAcreedorInfo; InputDeliveryAddForm form = new InputDeliveryAddForm(_acreedor, _entity.GetInfo(), this); form.ShowDialog(); } }
private void TipoTitular_CB_SelectedIndexChanged(object sender, EventArgs e) { ETipoTitular tipoTitular = (ETipoTitular)(long)TipoTitular_CB.SelectedValue; Cliente_GB.Enabled = (tipoTitular == ETipoTitular.Todos); Acreedor_GB.Enabled = (tipoTitular == ETipoTitular.Todos); if (tipoTitular == ETipoTitular.Todos) { TodosCliente_CkB.Checked = true; TodosAcreedor_CkB.Checked = true; _cliente = null; _acreedor = null; Cliente_TB.Text = string.Empty; Acreedor_TB.Text = string.Empty; } }
protected virtual void SetProvider(IAcreedorInfo source) { if (source == null) { return; } _provider = source; Providers_BS.DataSource = _provider; if (source.OidAcreedor != _entity.OidAcreedor || source.ETipoAcreedor != _entity.ETipoAcreedor) { _entity.CopyFrom(source); if (_entity.Conceptos.Count > 0) { foreach (InputDeliveryLine item in _entity.Conceptos) { item.SetPrice(_provider); } _entity.CalculateTotal(); } } DiasPago_TB.Text = _entity.DiasPago.ToString("00"); //Cargamos los precios especiales del proveedor if (_provider.Productos == null) { _provider.LoadChilds(typeof(ProductoProveedor), false); } if (_provider.ETipoAcreedor != ETipoAcreedor.Proveedor) { SetStore(null); AddConceptoStock_TI.Enabled = false; } else { AddConceptoStock_TI.Enabled = true; } _provider_orders = PedidoProveedorList.GetByAcreedorList(_entity.OidAcreedor, _entity.ETipoAcreedor, false); }
protected void CopyValues(InputInvoiceInfo factura, IAcreedorInfo acreedor, bool get_QRCode) { if (factura == null) { return; } Oid = factura.Oid; _base.CopyValues(factura); if (acreedor != null) { _telefonos = acreedor.Telefono; } if (get_QRCode) { _qr_code_print.LoadQRCode(_qr_code_print.Encode(QREncodeVersion.v1, moleQule.Common.Structs.ETipoEntidad.FacturaRecibida, this), QRCodeVersion.v8); } }
public virtual void CopyFrom(PedidoProveedor pedido, IAcreedorInfo acreedor, ProductInfo producto) { OidPedido = pedido.Oid; OidProducto = producto.Oid; OidKit = 0; OidAlmacen = pedido.OidAlmacen; OidExpediente = pedido.OidExpediente; Concepto = producto.Nombre; FacturacionPeso = (producto.ETipoFacturacion == ETipoFacturacion.Peso); CodigoProductoAcreedor = producto.CodigoArticuloAcreedor; Almacen = pedido.IDAlmacen; Expediente = pedido.Expediente; CantidadKilos = 1; CantidadBultos = 1; AjustaCantidad(producto); SetPrecio(acreedor, producto); }
protected void SetEmisor(IAcreedorInfo emisor) { // if (_entity.AlbaranesFacturas.Count > 0) // { // InputDeliveryInfo albaran = InputDeliveryInfo.Get(_entity.AlbaranesFacturas[0].OidAlbaran, emisor.ETipoAcreedor, false); // if (albaran == null || albaran.OidAcreedor != emisor.OidAcreedor) // { // PgMng.ShowInfoException(Resources.Messages.FACTURA_CON_ALBARANES); // return; // } // } Datos_Emisor.DataSource = ProviderBase.New(emisor); _entity.CopyFrom(emisor); SetCuenta(emisor); Datos_Emisor.ResetBindings(false); }
public void CopyCommonValues(IAcreedorInfo source) { if (source == null) { return; } _oid_acreedor = source.OidAcreedor; _cuenta_asociada = source.CuentaAsociada; _tarjeta_asociada = source.TarjetaAsociada; _impuesto = source.Impuesto; _p_impuesto = source.PImpuesto; //IUser _user.Oid = source.OidUser; _user.Name = source.Username; _user.EEstado = source.EUserStatus; _user.CreationDate = source.CreationDate; _user.LastLoginDate = source.LastLoginDate; }
protected void SetAcreedor(IAcreedorInfo source) { if (source == null) { return; } _acreedor = source; Datos_Acreedor.DataSource = _acreedor; _entity.CopyFrom(_acreedor); //Cargamos los precios especiales del proveedor if (source.Productos == null) { source.LoadChilds(typeof(ProductoProveedor), false); } Cache.Instance.Remove(typeof(ProductList)); }
protected void SetCuenta(IAcreedorInfo emisor) { if (emisor != null && _company != null) { if (_entity.EMedioPago == EMedioPago.Giro) { if (emisor.CuentaAsociada != string.Empty) { _entity.CuentaBancaria = emisor.CuentaAsociada; } else { _entity.CuentaBancaria = _company.CuentaBancaria; } } else { _entity.CuentaBancaria = emisor.CuentaBancaria; } } }
private void TipoMovimiento_CB_SelectedIndexChanged(object sender, EventArgs e) { _bank_line_type = (EBankLineType)(long)TipoMovimiento_CB.SelectedValue; Cliente_GB.Enabled = (_bank_line_type == EBankLineType.Cobro); Acreedor_GB.Enabled = (_bank_line_type == EBankLineType.PagoFactura); switch (_bank_line_type) { case EBankLineType.PagoFactura: TodosCliente_CkB.Checked = true; _cliente = null; Cliente_TB.Text = string.Empty; break; case EBankLineType.Cobro: TodosAcreedor_CkB.Checked = true; _acreedor = null; Acreedor_TB.Text = string.Empty; break; default: TodosCliente_CkB.Checked = true; _cliente = null; Cliente_TB.Text = string.Empty; TodosAcreedor_CkB.Checked = true; _acreedor = null; Acreedor_TB.Text = string.Empty; break; } }
private void SelectProviderAction(ESchema schemaType) { if (schemaType == ESchema.Source) { ProviderSelectForm form = new ProviderSelectForm(this, EEstado.Active); if (form.ShowDialog(this) == DialogResult.OK) { _source_provider = form.Selected as IAcreedorInfo; DestinationHolder_TB.Text = _source_provider.Nombre; } } else { if (_destination_company == null) { ProgressInfoMng.ShowInfo(Resources.Messages.NO_COMPANY_SELECTED); return; } _source_company = AppContext.ActiveSchema as CompanyInfo; AppContext.Principal.ChangeUserSchema(_destination_company); ProviderSelectForm form = new ProviderSelectForm(this, EEstado.Active); if (form.ShowDialog(this) == DialogResult.OK) { _destination_provider = form.Selected as IAcreedorInfo; DestinationHolder_TB.Text = _destination_provider.Nombre; _config.DestinationHolder = _destination_provider; } AppContext.Principal.ChangeUserSchema(_source_company); } }
public static string SELECT(IAcreedorInfo source) { return(Payment.SELECT(source, false)); }
public InputDeliveryLineAddForm(InputDelivery delivery, SerieInfo serie, IAcreedorInfo provider, Form parent) : base(null, delivery, serie, provider, parent) { InitializeComponent(); SetFormData(); }