Results 1 to 5 of 5

Thread: Discounts (A2k)

  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Discounts (A2k)

    Many of our contracts involve discounts.
    Our work providors stipulate discounts on various levels of repair which can be vastly varied.
    e.g
    One client expects Nil disc off labour but 10% off parts.
    Another expects 8% bottom line
    Another expects Nil off labour, 7.5% off parts (Only if we achieve 11.5% from our supplier) & 6% of paint and materials.

    I have a separate table of course for all our clients, with different discount profiles.

    Here's what I'm looking for :

    I need these discounts to show as an estimate is progressed through the system.
    At the moment, with our old system, discounts are only shown in the parts screen, which is suffice.
    Some parts may have been rush ordered, affecting our discount from our supplier, so we would not give discount on some individual parts.
    So you see if we have a list of 10 parts for one particular job, we may only give discount on 8 items or so.
    By this I need control over individual items, as opposed to just knocking a lump off the bottom.

    My question is, which is the best way to approach this. I know I can easily use DLookups form the profile table and apply the discounts overall from there, or eaven apply the discounts from report level.

    I'm asking this before I tackle this important section of my database.
    Advice please.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Discounts (A2k)

    This is a situation where you need to store information in two different places. Ordinarily, relational design would dictate that you use a query to look up the discount for an estimate in the profile table. But in this case, you must store the discount information in the estimate details table, so that it can be modified for each individual estimate detail.

    The following is rather vague, because I don't know the exact structure of your tables, but the general idea is as follows:

    When the operator enters a part, the AfterUpdate event of the control looks up the discount for parts in the profile for that customer, and puts that in the discount text box. This text box is not bound to the discount field in the profile table, but to the discount field in the estimate details table. So the operator can change the discount manually if needed.

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Discounts (A2k)

    Hans
    Thanks for that, it's exactly how it should work.
    On my parts and estimating form (they're separate) I have a lookup text which looks for the discount structure dependant on client. This is obviously bound, but I'm thinking I can use this value in the after update, what do you think ?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Discounts (A2k)

    Yes, you shouldn't have a lookup expression in the control source of the discount text box, but use the lookup expression in the AfterUpdate event of the part control. If the control source of the discount text box is an expression, the operator can't edit the value, but if the value is set by an event, the operator can intervene manually to change or clear the discount. The text box should be bound to a new discount field in the table that contains the details for this particular part in this particular estimate.

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Discounts (A2k)

    Again Thanks.
    Have a good weekend.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •