Change this to flowchart.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Change this to flowchart.

Post by answerhappygod »

Change this to flowchart.
Change This To Flowchart 1
Change This To Flowchart 1 (141.92 KiB) Viewed 27 times
In[15]:= stock = Import[FileName Join[{NotebookDirectory[], "CPE112_TermProject.xlsx"}]][[1]; history = Import[FileName Join[{NotebookDirectory], "CPE112_TermProject.xlsx"}]][2]; summary = Import[FileName Join[{NotebookDirectory], "CPE112_TermProject.xlsx"}]][3]; date DateObject[Today, "Day"]; AppendTo[stock[1]], "Selection"]; For[i = 2, i ≤ Length[stock], i++, If[stocki, 3 * "", stocki, 1] = date; stocki, 9]] = date + Quantity[stocki, 8], "Days"]; AppendTo[stock, RadioButton[Dynamic[selector], i]]; ] ]; Manipulate[ (*Display dis shit*) Column[{ Text[Style[" Date: "Dynamic[date], "All"]], Dynamic[TextGrid [Page[stockButton, historyButton, summaryButton], Alignment → (Center, Center), ItemStyle → Medium, Frame → All, Background → Selecting[selector, stockButton]]] }] (*Controller tings like button and shit*) {stockButton, True, ControlType → None}, {historyButton, False, Control Type → None}, {summaryButton, False, ControlType → None}, Column[{ Row[{Button[" Stock "₂ If[! stockButton, stockButton = True ;]; If[historyButton, historyButton = False;]; If[summaryButton, summaryButton = False;]; ] }], Row[{Button[" History Log "₂ If[stockButton, stockButton = False;]; If[! historyButton, historyButton = True;]; If[summaryButton, summaryButton = False;]; ] }], Row[{Button[" Summary Log
If[stockButton, stockButton = False;]; If[historyButton, historyButton = False;]; If[! summary Button, summaryButton = True ;]; ] }], Row[{"Product Name ", InputField[Dynamic[name], String], Autofiller[selector];]}], Button["Autofill", Row[{"Order Quantity ", InputField[Dynamic[order], Number]}], Row[{"Reorder Threshold ", InputField[Dynamic[threshold], Number]}], Row[{"Product Life ", InputField[Dynamic[life], Number]}], Button["Order", { NewOrder[name, order, threshold, life, selector]; For[i = 2, i ≤ Length[stock], i++, If[stock[i, 3] ⋆ "", stock = Delete[stock, {i, -1}]; AppendTo[stock, RadioButton[Dynamic[selector], i]]; ]; }], Row[{"Today Sold Quantity , InputField[Dynamic[today Sold], Number]}], Button["Update Selected Data", Updating[todaySold, selector]], " Button["Delete Selected Data", stock = Delete[stock, selector]; For[i = 2, i ≤ Length[stock], i++, If[stocki, 3] = "", stock = Delete[stock, {i, -1}]; AppendTo[stock[, RadioButton[Dynamic[selector], il]; ]; 1; 1; ],
11 Button["Next Day", Nextday;] }], ControlPlacement → {Right} " (*Initialization*) Initialization >> ( Selecting[selector_, stockButton_] := Module[ {arr}, arr {None, {Darker[ Green], , , , , If[stockButton, For[j = 2, j≤ Length [stock], j++, If[stock[j, 6] < stock[j, 7], arr[2, j] = Red; ]; If[stock[j, 6] ≤ 0(*||DateDifference[stock[j, -2], date]<0*), arr[2, j] = Lighter[Gray]; ] 1; arr[2, selector]] = Orange; 1; Return[arr] ]; Updating[todaySold_, selector_] := Module[ 0, If[todaySold == Null, Return[]]; If[todaySold > stock[[selector, 6], Return, If[stock[[selector, 6] ≤ 0, stock[selector, 6]] = 0;, {stock[[selector, 5]]= stock[selector, 5] + today Sold; stock[selector, 6] = stock[selector, 6]- todaySold; Export[FileName Join[{NotebookDirectory], "HistoryLog.xlsx"}], stock]; } Click To Simulate", ]; ,}};
]; 6] < 1, If[stock[selector, stock[selector, 2]] = False;] 1; NewOrder[name_, order_, threshold_, life, selector_] := Module[ {arr}, arr = {date + Quantity [3, "Days"], False, name, order, 0, order, threshold, life, date + Quantity[(life+3), "Days"],}; stock = Insert[stock, arr, selector + 1]; Export[FileName Join[{NotebookDirectory[], "History Log.xlsx"}], stock]; 1; Autofiller[selector] := Module[ 0, name = stock[selector, 3]; threshold = stock@[selector, 7]; life stock[[selector, 8]; 1; Nextday] := Module[ 0, date= date + Quantity[1, "Days"]; For[i = 2, i ≤ Length[stock], i++, If[DateDifference[stocki, 1]], date] ≤ 0, stock[[1, 2]] = True; 1; 1; Page[stockButton_, historyButton_, summaryButton] := Module[ {page), If[stockButton, page = stock; ]; If[historyButton, page = history; ]; If[summary Button, page=summary; ]; Return[page]; 1; ];
Date: Wed 1 Jun 2022 Order arrive ty date Wed 1 Jun 2022 Wed 1 Jun 2022 Wed 1 Jun 2022 Wed 1 Jun 2022 Wed 1 Jun 2022 Wed 1 Jun Availabli Product name On-hand Sold Quantity Quantity (unit) (unit) True Potato 100. 0. True Apple 100. 0. True Banana 100. 0. True Cabbage 100. 0. True Waterma lon 100. 0. True Pumpkin 100. 0. Remaini ng Stock Reorder Threshold (unit) 100. 30. 100. 40. 100. 30. 100. 30. 100. 40. 100. 10. Expiratio n (days) 28. 14. 7. 7. 14. 7. Expiratio Selectio n Date n Wed 29 Jun 2022 Wed 15 Jun 2022 Wed 8 Jun 2022 Wed 8 Jun 2022 Wed 15 Jun 2022 Wed 8 Jun Stock History Log Summary Log Potato Product Name Order Quantity Reorder Threshold Product Life Today Sold Quantity Order Update Selected Data Delete Selected Data Click To Simulate Next Day Autofill +
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply