Fri, 28 Dec 2018 23:18:42 +0100
Some pH calculations cane use twice as much loops, probably because we have better float precision then the original pascal code. More variables to prevent html reads. Use predicted mash pH (the grist in demi water) to calculate the pH shift from the tapwater to the target pH. It's better but not right yet. Or it is right and brouwhulp is far off.
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
3 | page_header('Brouwwater voorraad', 'inv_waters'); |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | ?> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | <div id="jqxgrid"></div> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | <div style="margin-top: 30px;"> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | <div id="cellbegineditevent"></div> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | <div style="margin-top: 10px;" id="cellendeditevent"></div> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | </div> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | <!-- Popup editor window. --> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | <div id="popupWindow"> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
14 | <div>Wijzig brouwwater.</div> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | <div style="overflow: hidden;"> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | <table> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | <tr> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
18 | <td style="vertical-align: top; float: right;">Water naam:</td> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | <td align="left" colspan="3" style="vertical-align: top;"><input id="name" /></td> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | </tr> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | <tr> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
22 | <td style="vertical-align: top; float: right;">Calcium (Ca) mg/l:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
23 | <td><div id="calcium"></div></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
24 | <td style="vertical-align: top; float: right;">Magnesium (Mg) mg/l:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
25 | <td><div id="magnesium"></div></td> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | </tr> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | <tr> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
28 | <td style="vertical-align: top; float: right;">Natrium (Na) mg/l:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
29 | <td><div id="sodium"></div></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
30 | <td style="vertical-align: top; float: right;">Chloride (Cl) mg/l:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
31 | <td><div id="chloride"></div></td> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | </tr> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
33 | <tr> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
34 | <td style="vertical-align: top; float: right;">Sulfaat (CaSO4) mg/l:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
35 | <td><div id="sulfate"></div></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
36 | <td style="vertical-align: top; float: right;">Zuurgraad (pH):</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
37 | <td><div id="ph"></div></td> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
38 | </tr> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
39 | <tr> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
40 | <td style="vertical-align: top; float: right;">Bicarbonaat (HCO3) mg/l:</td> <!-- Input for total_alkalinity --> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
41 | <td><div id="bicarbonate"></div></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
42 | <td style="vertical-align: top; float: right;">Totale alkaliteit (CaCO3) mg/l:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
43 | <td><div id="total_alkalinity"></div></td> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
44 | </tr> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
45 | <tr> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
46 | <td style="vertical-align: top; float: right;">Opmerkingen:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
47 | <td colspan="3"><textarea id="notes"></textarea></td> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | </tr> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
49 | <tr> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
50 | <td style="vertical-align: top; float: right;">Onbeperkt op voorraad:</td> |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
47
diff
changeset
|
51 | <td colspan="3"><div id="unlimited_stock"></div></td> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
52 | </tr> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
53 | <tr> |
47
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
54 | <td style="vertical-align: top; float: right;">Voorraad:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
55 | <td><div id="inventory"></div></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
56 | <td style="vertical-align: top; float: right;">Prijs per liter:</td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
57 | <td><div id="cost"></div></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
58 | </tr> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
59 | <tr> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
60 | <td style="padding-top: 10px; float: right;"><input type="button" id="Delete" value="Delete" /></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
61 | <td></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
62 | <td></td> |
94cd5ac04b6a
Changed always_on_stock to unlimited_stock. Fixed html page. Added tooltips. Changed grid columns layout.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
63 | <td style="padding-top: 10px;"><input style="margin-right: 5px;" type="button" id="Save" value="Save" /><input id="Cancel" type="button" value="Cancel" /></td> |
21
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | </tr> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | </table> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
66 | </div> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
67 | </div> |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
68 | |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
69 | <?php |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
70 | confirm_delete(); |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
71 | page_footer(); |
acb2d8098f19
Added inventory miscs and water sources.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
72 | ?> |