3 Replies Latest reply on Nov 11, 2013 7:18 AM by philmodjunk

    show summary of used material with bill of material

    WeirdMan

      Title

      show summary of used material with bill of material

      Post

           Hi, I created a program to show material used in a day. Basic structure is I have a recipe (resep), connector from recipe to material, daily usage (harian), connector from daily usage to recipe.

           I copied the portal from recipe that shows material used to daily usage layout. But it turns out that same item is shown multiple times if I use multiple recipe that use same material in a day.

           E.g. I use 2 different recipes that use flour. Flour is appeared 2 times in daily usage.

           I want to make flour only appear once, that is sum of those recipes usage. How do I do it? Create a summary field? Do I need repetitions for summary field? I'm not familiar with repetitions.

      diagram.JPG

        • 1. Re: show summary of used material with bill of material
          philmodjunk

               Does ResepKeharian record your usage data for a given date?

               Does it do so with one record for each item in the BOM for a recipe used on that day? (So if two recipes call for flour, you have two records for that date that show flour consumed, one for each recipe?)

               If so, then summary fields can be used to compute total usage of each type of material from your BOM. Define this field in ResepKeharian and create your report on a layout based on this same table. Design the layout to be viewed in list view. Remove the body layout part and replace it with a sub summary layout part "when sorted by" a field that identifies each type of material. Put the material name field ("Flour") and the summary field in the sub summary layout part.

               You then perform a find to find all records from the specified date or range of dates and sort your records by the same field that you set up as the "when sorted by" field in the sub summary layout part. Please note that your layout will be blank if the records are not sorted in a sort order that includes this field.

          • 2. Re: show summary of used material with bill of material
            WeirdMan

                 No, ResepKeHarian only records which recipes is used on what date, and how many recipes is used in a day. No material is recorded on ResepKeHarian. Should I put the summary field on recipe table? Do Harian table unnecessary (I create that table to use portal only)?

                 the way I create to view which material is used is by using portal that show materials used in recipe. I copied the excact same portal from recipe layout.

            • 3. Re: show summary of used material with bill of material
              philmodjunk

                   I suggest then that you add a table for doing so. a script can loop though the records for a recipe's ingredients and create one record for each ingredient, logging the quantity as the ingredient quantity times the Recipe's specified yield. (Amount of Flour for one Cake times 500 cakes produced from the recipe.) You then have a table from which to produce a summary report showing total ingredients consumed on a for a given day's production or any other time interval you need.

                   Such records can be Transaction records in an inventory ledger for logging both the production of your food items and the consumption of your ingredients

                   You may find this link to be of interest: Managing Inventory using a Transactions Ledger