1 2 Previous Next 20 Replies Latest reply on Dec 16, 2016 6:53 AM by globe11123

    Previously Received Goods

    globe11123

      I'm stuck trying to work out how to show the previous delivered quantity from the previous goods in.

       

      So far I've tried copying the received value (GOODSINLINE::Qty_Received) to a global variable on PURCHASE_ORDER_DETAILS::variable_previously_received.

      When another Goods-In record is created a loop is made through the details on the purchase_order to bring up the correct product codes.

       

      At this point I was think that If I set the variable of PURCHASE_ORDER_DETAILS::variable_previously_received before a new record has been created I could use this plus the value already stored within GOODSINLINE::Previously_Received to show different values across all of the GOODSIN.

       

      I have tried to just have the value purely stored on purchase_order_details but this would mean across i.e. 6 deliveries the previously delivered value would be the same.

       

      SO CONFUSED

       

      Creating new goods in record

       

      Screen Shot 2016-12-16 at 08.43.08.png

       

      Adding goods into stock - part

       

      Screen Shot 2016-12-16 at 08.43.41.png

        • 1. Re: Previously Received Goods
          David Moyer

          Hi,

          ... to a global variable on PURCHASE_ORDER_DETAILS::variable_previously_received

          The thing I want to note is that global variables are not persistent between sessions.  So, if you're a client on a hosted database, closing your connection and reopening it will reset your global variables.  Also, your global variable is shared across all SKU's, not just the current one.

          • 2. Re: Previously Received Goods
            globe11123

            In that case scrap that idea. Even when i tried this when it was a normal field the previously_received + $var never added up.

             

            From what I've done so far It only ever overwrites what was previously received, but i want it to add up the received amount from the previous goods in but only to the level that it is at.

             

            Probably going about this the wrong way.

            • 3. Re: Previously Received Goods
              wimdecorte

              It is not very clear to me what you are trying to achieve.  Can you explain in plain words what you want to see done?  Looking at the script and the TO names is confusing.

               

              You have Purchase Order.  You then receive goods into inventory.... then what?

              • 4. Re: Previously Received Goods
                globe11123

                Purchase order details such as products and quantities is copied over to every new goods in record.

                 

                As there could be several deliveries for each product contained on the purchase order.

                And each delivery creates a goods in record which has lines on it. On these lines I wanted to be able to create a calculation or field that shows the previously received quantity.

                 

                If there was several deliveries you would see that this value is equal to the quantity recieved + the quantity previously received?

                 

                Does that make more sense?

                 

                I do have a field which tells me how much is left to deliver also.

                Screen Shot 2016-12-16 at 12.03.46.png

                The table occurence is update as it joins the purchase order details to the goods in details so that values can be updated.

                • 5. Re: Previously Received Goods
                  David Moyer

                  Do you have a table for Products/SKU's?  Is Previously Received based on the SKU? or is it based on the SKU within a single purchase order?

                  • 6. Re: Previously Received Goods
                    globe11123

                    Yes I have a products table.

                     

                    It is based upon the product on a single purchase order which may have multiple goods in records.

                    • 7. Re: Previously Received Goods
                      David Moyer

                      that was a dumb question - sorry.  Your Previously Received field needs to be in your PO Line Item table.

                      • 8. Re: Previously Received Goods
                        globe11123

                        I have tried this before.

                         

                        The value across all goods in details related to that purchase order would be = to that value.

                         

                        I wanted to make it so that if you when into the purchase order you would see this.

                         

                        These would be seperate goods in notes. But seen from the view of GOODSINLINE portal?

                         

                        PURCHASE_ORDER_ID          GOODSIN_ID               (Previously_Recieved)??         GOODSINLINE::Qty_Delivered

                        10                                             1234                             0                                              200

                        10                                             1235                             200                                          50

                        10                                             1236                             250                                          500

                        10                                             1237                             750                                          250

                         

                        Wouldn't PO Line item remain 1200 in what you suggested across all related goods-in?

                        • 9. Re: Previously Received Goods
                          David Moyer

                          I misunderstood.  In that case, the Previously Received field should be based on the PO, and would be a Summary field totaling the related Qty_Delivered.  Then, it would no longer be a line item.  However, you could have a field on the line-item level that carries the running sum, calculated at the time of creation ... quantity delivered plus PO::PreviouslyReceived (and would need to be populated before populating the ::Qty_Delivered field).

                          Edited some.

                          • 10. Re: Previously Received Goods
                            David Moyer

                            sorry - I think I'm taking you in the wrong direction via tunnel-vision.  I'm taking a step back.

                            • 11. Re: Previously Received Goods
                              globe11123

                              My brain is frazzled from trying to work this out. I appreciate the help though.

                               

                              Still no clearer

                              • 12. Re: Previously Received Goods
                                erolst

                                I'm imagining this along the lines of

                                 

                                Transaction (purchase,sale) -< Delivery --< LineItem (qty,+,-) >-- Product

                                 

                                Now find all line items that belong to a given purchase, sort by date, display a total running by delivery date, and use either a calc field, or a regular field and a script, to get and display the previous value.

                                 

                                Sorry if all this is missing the mark ... but then we'd need a clearer picture of your tables and their (basic) relationships.

                                1 of 1 people found this helpful
                                • 13. Re: Previously Received Goods
                                  wimdecorte

                                  globe11123 wrote:

                                   

                                  Purchase order details such as products and quantities is copied over to every new goods in record.

                                   

                                  Why?  A "Goods In" record is a Delivery, correct?  And as each delivery can cover multiple POs you need a join table between "delivery" and 'PO'.  But you would never copy over any data from POs to a delivery record.

                                   

                                  (sometimes it helps to name the entities for what they are - 'delivery' is easier to understand than 'goods in'.  'goods in' could be understood by an outsider as the line item on a delivery)

                                   

                                   

                                  globe11123 wrote:

                                   

                                  On these lines I wanted to be able to create a calculation or field that shows the previously received quantity.

                                   

                                   

                                  Why?  What is the business value of seeing that info?

                                  That could turn out to be a very expensive calculation if you do down that route.

                                   

                                  With the proper structure all you need is a relationship from the delivery line items to the delivery line items for the same product.  The last related record will show you the qty received.  You don't need to bring that data over.

                                  • 14. Re: Previously Received Goods
                                    David Moyer

                                    assuming you have a table for POs, a table for line items ordered and a table for line items received, this should be a decent model ...

                                    1 2 Previous Next