3 Replies Latest reply on Mar 15, 2012 8:32 AM by willrollo

    Creating a credit note

      Title

      Creating a credit note

      Post

      I have a few table all linked up and working.

       

      Cutomers----Invoice details------Line items---products.

       

      Quotes----Orders----Invoices (each related to the Primary Key from the invoices table)

       

      I have created a "credit table' that i have related to the Invoice table's Foreign Key field. 

      On the create credit script, the user is taken to a layout, very similar to the invoice layout, and can tick various lines from the portal to LINES so that a credit can be raised. 

      However, I have only got as far as creating a new credit - but with the name and address fields (which i want to look up from the Invoice table) and also the LINES portal is empty. I dont want the original invoice to be affected which is whyi amusing look ups but they arent really autofilling evenwhen I put the set field script in the new credit script. I think it may have something to do with the realtionships etc etc.. ANy help or suggestion son how this can be done or if there is a standard format for this would be great..

      Thank you

        • 1. Re: Creating a credit note
          /files/a35eb97ba1/2012-03-14_07.31.06_pm.png 1179x341
          • 2. Re: Creating a credit note
            philmodjunk

            Given the relationship between Credit to Invoice details to Customers:

            Customers::pk_Customers_id = Invoice details::_kf_customer_id
            Credit::_kf_invoice_id = Invoice details::PrimaryKey

            You have two options for displaying customer data:

            1) You can place fields from customers directly on the credit layout.
            2) You can define fields in Credit for each customer field and use the Looked up value field option to copy the data from customers to Credit.

            Many businesses use Option 2 for invoices and all other such transactions as they want a record of what data was current at the time the transaction was processed rather than the current values of those fields--which may have been updated after the fact. If that sounds like a good idea to you, I suggest setting up such fields in Invoice details and then using those fields from Invoice Details on any layouts based on Quotes, Orders, Invoices or Credit.

            For selecting the items to be listed with Credit, there are several options possible. I suggest that you use one of the following two approaches. Both require creating a new CreditLineItems table to list the items and quantities selected for credit.

            1) Start with an empty portal to CreditLineItems. Select from a conditional value list or a portal to lines to create a record with the same product ID in the portal.

            2) Use a script to duplicate the entire list of Lines items, then use an empty Qty field to select and specify items to be included in the Credit calculations.

            The relationships would look like this:

            Credit::__pk_Credit Number = CreditLineItems::_kf_Credit Number

            CreditLineItems::_kf_product_id = CreditedProducts::kp_product_id

            CreditedProucts would be a new occurrence of the Products table. For reporting purposes, it may be useful to use an occurrence of Lines for CreditLineItems so that reports of items sold can include and deduct amounts for items credited.

            • 3. Re: Creating a credit note

              HI Phil

              Thank you for the suggested solutions and advice. I think I will come back to you on this as it seems like quite a tricky solution. I just need to finish my payments layout so will start the credit reports/layouts/tables then..

              Thank you

              will