2 Replies Latest reply on Oct 26, 2015 3:34 AM by ivanlow

    Bar Inventory

    ivanlow

      Hi, I'm new to FMP. So far so good I build all the tables relationship without any problem, but I was not able to get pass 1 calculation. I have many bottles in the bar, some capacity is 750ml and some 700ml. For that I created a field just to store that information. So when come to the sales, we count by 0.030ml per shot. As I accumulate the sales through out the day, I might end up 0.780. I just cannot figure out how to make it calculate when reach 0.700 can count as one while have a decimal value of 0.080 which result 1.080ml. Can you help me? Thanks.

        • 1. Re: Bar Inventory
          greatgrey

          Yes it is simple just use

          Bottles to day =

          Int ( Amount used today / Bottle size ) //number of whole bottles used//

          + Mod ( Amount used today; Bottle size) //part of bottle used//

           

             and make sure the "Do not replace existing value of field (if any)" box is unchecked. if you use this as a field formula and not in a script.

          edit

          this needs to be stored separate from the "Amount used today" or you will have a big headache trying to keep it straight.

          • 2. Re: Bar Inventory
            ivanlow

            Thank you very much. My problem is solved.