1 Oct 2005 04:39
Re: Multi-join relationships?
On Sep 28, 2005, at 7:25 AM, Ugo Di Luca wrote: > First of all, may be I should ask some enligthment on what exactly > is a PriceSheet in your mind. > Is it a grid, is it tied to a Customer, a Date Range ? > > Having the Price Sheet in Invoice actually doesn't seem natural *to > me*. > Price Sheet would be pulled into the Line Items from the beginning. > If one day you inherit a system where before Invoices are Quotes > and Orders and Deliveries, > well the same Price Sheet should apply for all successive documents > leading to any final Invoice. > Price Sheet is a separate table from Invoice. Each invoice is assigned to a price sheet, either automatically based on date, or manually in case of an override. The prices can't be pulled into line items at the time of creation because the price might change. This isn't a standard invoice system. Comparisons will be done after the fact. More than one price sheet will be used. So I should have said that Invoice has a many-to-many relation to Price Sheet, not a many- to-one. But for reporting purposes, the relationship needs to be from Line Items into the Price Sheet table, based on the (multiple) foreign keys into Price Sheet stored in the Invoice table. regards,(Continue reading)
RSS Feed