Sat, 11 May 2019 23:13:40 +0200
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
290 | 1 | /***************************************************************************** |
2 | * Copyright (C) 2019 | |
3 | * | |
4 | * Michiel Broek <mbroek at mbse dot eu> | |
5 | * | |
6 | * This file is part of BMS | |
7 | * | |
8 | * This is free software; you can redistribute it and/or modify it | |
9 | * under the terms of the GNU General Public License as published by the | |
10 | * Free Software Foundation; either version 2, or (at your option) any | |
11 | * later version. | |
12 | * | |
13 | * BrewCloud is distributed in the hope that it will be useful, but | |
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | * General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free | |
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
21 | *****************************************************************************/ | |
22 | ||
23 | ||
24 | $(document).ready(function () { | |
25 | var source = { | |
26 | datatype: "json", | |
27 | cache: false, | |
28 | datafields: [ | |
29 | { name: 'record', type: 'number' }, | |
30 | { name: 'name', type: 'string' }, | |
31 | { name: 'code', type: 'string' }, | |
292
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
32 | { name: 'date', type: 'string' }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
33 | { name: 'style', type: 'string' }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
34 | { name: 'og', type: 'float' }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
35 | { name: 'fg', type: 'float' }, |
290 | 36 | { name: 'batch_size', type: 'float' }, |
37 | ], | |
38 | id: 'record', | |
39 | url: "includes/db_product.php?select=archname" | |
40 | }; | |
41 | var dataAdapter = new $.jqx.dataAdapter(source); | |
42 | // initialize jqxGrid | |
43 | $("#jqxgrid").jqxGrid({ | |
44 | width: 1280, | |
45 | height: 630, | |
46 | source: dataAdapter, | |
47 | theme: theme, | |
48 | columns: [ | |
49 | { text: 'Naam', datafield: 'name' }, | |
292
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
50 | { text: 'Stijl', datafield: 'style', width: 250 }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
51 | { text: 'OG', datafield: 'og', width: 80, cellsformat: 'f3' }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
52 | { text: 'FG', datafield: 'fg', width: 80, cellsformat: 'f3' }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
53 | { text: 'Datum', datafield: 'date', width: 120 }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
54 | { text: 'Code', datafield: 'code', width: 100 }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
55 | { text: 'Liters', datafield: 'batch_size', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
56 | { text: '', datafield: 'Edit', width: 80, align: 'center', columntype: 'button', cellsrenderer: function () { |
290 | 57 | return "Bekijk"; |
58 | }, buttonclick: function (row) { | |
59 | var datarecord = dataAdapter.records[row]; | |
60 | var url= "prod_edit.php?record=" + datarecord.record + "&select=archname&return=prod_archive_name.php"; | |
61 | window.location.href = url; | |
62 | } | |
63 | } | |
64 | ], | |
65 | }); | |
66 | }); |