Skip to content

Commit 5704b6c

Browse files
authored
Merge pull request #193 from globaldyne/v11.8
V11.8
2 parents 77b5d2d + 3f548bf commit 5704b6c

26 files changed

+541
-188
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
# CHANGELOG
2+
### Version 11.8
3+
- Error handling for Formula Make page
4+
- Readme file update
5+
- Return 100 in purity if no data by default
6+
- Increase quantity storage for formulas
7+
- Update formulas status badges
8+
- Update ingredient advanced search filter
9+
- Improve lids and bottles add/edit/update
10+
- Prevent prices to be set to 0
11+
- Prevent Finished product generation if no or invalid prices or supplier info is detected
12+
- User registration and login error handling improvements
13+
- System installation error handling improvements
14+
215
### Version 11.7
316
- Formulation: Make sure dilutant is disabled if material is at 100%
417
- Formulation: Auto remove/add decimal point in quantity depending user's input

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ This is a FREE software provided as is without ANY warranty under MIT license.
3030
* Multiple suppliers per ingredient
3131
* Calculate costs against specific supplier
3232
* Fetch the price automatically (Depends on suppliers platform)
33+
* Dark mode support
34+
* SDS generation for ingredients
35+
* IFRA document generation for formulations
36+
* Document html templates
37+
* Batch history
3338

3439
For full features list please visit
3540

VERSION.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11.7
1+
11.8

core/finished_formula_data.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
$concentration = $_POST['concentration'];
4545
$carrier_id = $_POST['carrier_id'];
4646
$lid_id = $_POST['lid_id'];
47-
47+
4848
$bottle = mysqli_fetch_array(mysqli_query($conn, "SELECT price,ml,name FROM bottles WHERE id = '$bottle_id' AND price != 0 "));
4949

5050
$carrier_cost = mysqli_fetch_array(mysqli_query($conn, "SELECT price,size FROM suppliers WHERE ingID = '$carrier_id'"));
51-
51+
5252
if($_POST['lid_id']){
5353
$lid = mysqli_fetch_array(mysqli_query($conn, "SELECT price,style FROM lids WHERE id = '$lid_id'"));
5454
}else{
@@ -166,8 +166,11 @@
166166
}
167167

168168
}
169-
170-
$carrier_sub_cost = number_format($carrier_cost['price'] / $carrier_cost['size'] * $carrier, $settings['qStep']);
169+
if($carrier_cost['price'] && $carrier_cost['size'] && $carrier){
170+
$carrier_sub_cost = number_format($carrier_cost['price'] / $carrier_cost['size'] * $carrier, $settings['qStep']);
171+
} else {
172+
$carrier_sub_cost = 0;
173+
}
171174

172175
$m['sub_total_quantity'] = number_format(array_sum($new_tot), $settings['qStep']);
173176
$m['carrier_quantity'] = number_format($carrier, $settings['qStep']);
@@ -180,7 +183,7 @@
180183
$m['total_quantity'] = (float)number_format( array_sum($new_tot) + $carrier,$settings['qStep']);
181184
$m['quantity_unit'] = (string)$settings['mUnit'];
182185
$m['sub_concentration'] = (float)number_format(array_sum($conc_tot),$settings['qStep']);
183-
$m['carrier_concentration'] = (float)number_format($carrier * 100 / $bottle['ml'],$settings['qStep']);
186+
$m['carrier_concentration'] = (float)number_format($carrier ?? 100 * 100 / $bottle['ml'],$settings['qStep']);
184187
$m['sub_cost'] = (float)number_format(array_sum($tot),$settings['qStep']);
185188
$m['bottle_cost'] = (float)number_format($bottle['price'],$settings['qStep']);
186189
$m['total_cost'] = (float)number_format(array_sum($tot) + $lid['price'] + $carrier_sub_cost + $bottle['price'], $settings['qStep']);

core/getIngInfo.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
break;
3030
}
3131
} else {
32-
$response[$filter] = "No data";
32+
$response[$filter] = (int)100;
3333
}
3434
}
3535

@@ -38,4 +38,4 @@
3838
return;
3939
}
4040

41-
?>
41+
?>

css/sb-admin-2.css

+179-10
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,189 @@
55
*/
66

77
/*!
8-
* Bootstrap v4.3.1 (https://getbootstrap.com/)
8+
* Bootstrap v5 (https://getbootstrap.com/)
99
* Copyright 2011-2019 The Bootstrap Authors
1010
* Copyright 2011-2019 Twitter, Inc.
1111
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1212
*/
13-
:root {
14-
15-
--breakpoint-xs: 0;
16-
--breakpoint-sm: 576px;
17-
--breakpoint-md: 768px;
18-
--breakpoint-lg: 992px;
19-
--breakpoint-xl: 1200px;
20-
--font-family-sans-serif: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
21-
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
13+
:root,
14+
[data-bs-theme=light] {
15+
--pv2-blue: #2c7be5;
16+
--pv2-indigo: #727cf5;
17+
--pv2-purple: #6b5eae;
18+
--pv2-pink: #ff679b;
19+
--pv2-red: #e63757;
20+
--pv2-orange: #fd7e14;
21+
--pv2-yellow: #f5803e;
22+
--pv2-green: #00d27a;
23+
--pv2-teal: #02a8b5;
24+
--pv2-cyan: #27bcfd;
25+
--pv2-black: #000;
26+
--pv2-white: #fff;
27+
--pv2-gray: #748194;
28+
--pv2-gray-dark: #4d5969;
29+
--pv2-gray-100: #f9fafd;
30+
--pv2-gray-200: #edf2f9;
31+
--pv2-gray-300: #d8e2ef;
32+
--pv2-gray-400: #b6c1d2;
33+
--pv2-gray-500: #9da9bb;
34+
--pv2-gray-600: #748194;
35+
--pv2-gray-700: #5e6e82;
36+
--pv2-gray-800: #4d5969;
37+
--pv2-gray-900: #344050;
38+
--pv2-gray-1000: #232e3c;
39+
--pv2-gray-1100: #0b1727;
40+
--pv2-primary: #2c7be5;
41+
--pv2-secondary: #748194;
42+
--pv2-success: #00d27a;
43+
--pv2-info: #27bcfd;
44+
--pv2-warning: #f5803e;
45+
--pv2-danger: #e63757;
46+
--pv2-light: #f9fafd;
47+
--pv2-dark: #0b1727;
48+
--pv2-primary-rgb: 44, 123, 229;
49+
--pv2-secondary-rgb: 116, 129, 148;
50+
--pv2-success-rgb: 0, 210, 122;
51+
--pv2-info-rgb: 39, 188, 253;
52+
--pv2-warning-rgb: 245, 128, 62;
53+
--pv2-danger-rgb: 230, 55, 87;
54+
--pv2-light-rgb: 249, 250, 253;
55+
--pv2-dark-rgb: 11, 23, 39;
56+
--pv2-primary-text-emphasis: #215cac;
57+
--pv2-secondary-text-emphasis: #5d6776;
58+
--pv2-success-text-emphasis: #00894f;
59+
--pv2-info-text-emphasis: #197aa4;
60+
--pv2-warning-text-emphasis: #ac5a2b;
61+
--pv2-danger-text-emphasis: #b82c46;
62+
--pv2-light-text-emphasis: #646465;
63+
--pv2-dark-text-emphasis: #91979e;
64+
--pv2-primary-bg-subtle: #d9e7fa;
65+
--pv2-secondary-bg-subtle: #e6e8ec;
66+
--pv2-success-bg-subtle: #d9f8eb;
67+
--pv2-info-bg-subtle: #d8f3ff;
68+
--pv2-warning-bg-subtle: #fde6d8;
69+
--pv2-danger-bg-subtle: #fbdbe1;
70+
--pv2-light-bg-subtle: #fdfefe;
71+
--pv2-dark-bg-subtle: #08101b;
72+
--pv2-primary-border-subtle: #abcaf5;
73+
--pv2-secondary-border-subtle: #c7cdd4;
74+
--pv2-success-border-subtle: #99edca;
75+
--pv2-info-border-subtle: #a9e4fe;
76+
--pv2-warning-border-subtle: #fbccb2;
77+
--pv2-danger-border-subtle: #f5afbc;
78+
--pv2-light-border-subtle: #edf2f9;
79+
--pv2-dark-border-subtle: #9da9bb;
80+
--pv2-white-rgb: 255, 255, 255;
81+
--pv2-black-rgb: 0, 0, 0;
82+
--pv2-font-sans-serif: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
83+
--pv2-font-monospace: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
84+
--pv2-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
85+
--pv2-body-font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
86+
--pv2-body-font-size: 1rem;
87+
--pv2-body-font-weight: 400;
88+
--pv2-body-line-height: 1.5;
89+
--pv2-body-color: #5e6e82;
90+
--pv2-body-color-rgb: 94, 110, 130;
91+
--pv2-body-bg: #edf2f9;
92+
--pv2-body-bg-rgb: 237, 242, 249;
93+
--pv2-emphasis-color: #000;
94+
--pv2-emphasis-color-rgb: 0, 0, 0;
95+
--pv2-secondary-color: #344050;
96+
--pv2-secondary-color-rgb: 52, 64, 80;
97+
--pv2-secondary-bg: #d8e2ef;
98+
--pv2-secondary-bg-rgb: 216, 226, 239;
99+
--pv2-tertiary-color: #748194;
100+
--pv2-tertiary-color-rgb: 116, 129, 148;
101+
--pv2-tertiary-bg: #f9fafd;
102+
--pv2-tertiary-bg-rgb: 249, 250, 253;
103+
--pv2-heading-color: var(--pv2-secondary-color);
104+
--pv2-link-color: #2c7be5;
105+
--pv2-link-color-rgb: 44, 123, 229;
106+
--pv2-link-decoration: none;
107+
--pv2-link-hover-color: #2362b7;
108+
--pv2-link-hover-color-rgb: 35, 98, 183;
109+
--pv2-link-hover-decoration: underline;
110+
--pv2-code-color: #ff679b;
111+
--pv2-highlight-color: #5e6e82;
112+
--pv2-highlight-bg: #fde6d8;
113+
--pv2-border-width: 1px;
114+
--pv2-border-style: solid;
115+
--pv2-border-color: #d8e2ef;
116+
--pv2-border-color-translucent: rgba(0, 0, 0, 0.175);
117+
--pv2-border-radius: 0.25rem;
118+
--pv2-border-radius-sm: 0.25rem;
119+
--pv2-border-radius-lg: 0.375rem;
120+
--pv2-border-radius-xl: 1rem;
121+
--pv2-border-radius-xxl: 2rem;
122+
--pv2-border-radius-2xl: var(--pv2-border-radius-xxl);
123+
--pv2-border-radius-pill: 50rem;
124+
--pv2-box-shadow: 0 7px 14px 0 rgba(65, 69, 88, 0.1), 0 3px 6px 0 rgba(0, 0, 0, 0.07);
125+
--pv2-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
126+
--pv2-box-shadow-lg: 0 1rem 4rem rgba(0, 0, 0, 0.175);
127+
--pv2-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
128+
--pv2-focus-ring-width: 0.25rem;
129+
--pv2-focus-ring-opacity: 0.25;
130+
--pv2-focus-ring-color: rgba(44, 123, 229, 0.25);
131+
--pv2-form-valid-color: #00d27a;
132+
--pv2-form-valid-border-color: #00d27a;
133+
--pv2-form-invalid-color: #e63757;
134+
--pv2-form-invalid-border-color: #e63757;
135+
}
136+
137+
[data-bs-theme=dark] {
138+
color-scheme: dark;
139+
--pv2-body-color: #9da9bb;
140+
--pv2-body-color-rgb: 157, 169, 187;
141+
--pv2-body-bg: #0b1727;
142+
--pv2-body-bg-rgb: 11, 23, 39;
143+
--pv2-emphasis-color: #fff;
144+
--pv2-emphasis-color-rgb: 255, 255, 255;
145+
--pv2-secondary-color: #d8e2ef;
146+
--pv2-secondary-color-rgb: 216, 226, 239;
147+
--pv2-secondary-bg: #344050;
148+
--pv2-secondary-bg-rgb: 52, 64, 80;
149+
--pv2-tertiary-color: #748194;
150+
--pv2-tertiary-color-rgb: 116, 129, 148;
151+
--pv2-tertiary-bg: #162231;
152+
--pv2-tertiary-bg-rgb: 22, 34, 49;
153+
--pv2-primary-text-emphasis: #abcaf5;
154+
--pv2-secondary-text-emphasis: #c7cdd4;
155+
--pv2-success-text-emphasis: #73e6b6;
156+
--pv2-info-text-emphasis: #93defe;
157+
--pv2-warning-text-emphasis: #fbc6a8;
158+
--pv2-danger-text-emphasis: #f4a5b3;
159+
--pv2-light-text-emphasis: #646465;
160+
--pv2-dark-text-emphasis: #91979e;
161+
--pv2-primary-bg-subtle: #0f2b50;
162+
--pv2-secondary-bg-subtle: #292d34;
163+
--pv2-success-bg-subtle: #003f25;
164+
--pv2-info-bg-subtle: #0c384c;
165+
--pv2-warning-bg-subtle: #562d16;
166+
--pv2-danger-bg-subtle: #5c1623;
167+
--pv2-light-bg-subtle: #fdfefe;
168+
--pv2-dark-bg-subtle: #08101b;
169+
--pv2-primary-border-subtle: #163e73;
170+
--pv2-secondary-border-subtle: #3a414a;
171+
--pv2-success-border-subtle: #00693d;
172+
--pv2-info-border-subtle: #145e7f;
173+
--pv2-warning-border-subtle: #7b401f;
174+
--pv2-danger-border-subtle: #731c2c;
175+
--pv2-light-border-subtle: #5e6e82;
176+
--pv2-dark-border-subtle: #4d5969;
177+
--pv2-heading-color: var(--pv2-secondary-color);
178+
--pv2-link-color: #2c7be5;
179+
--pv2-link-hover-color: #2362b7;
180+
--pv2-link-color-rgb: 44, 123, 229;
181+
--pv2-link-hover-color-rgb: 35, 98, 183;
182+
--pv2-code-color: #ff679b;
183+
--pv2-highlight-color: #9da9bb;
184+
--pv2-highlight-bg: #623319;
185+
--pv2-border-color: rgba(255, 255, 255, 0.05);
186+
--pv2-border-color-translucent: rgba(0, 0, 0, 0.175);
187+
--pv2-form-valid-color: #66e4af;
188+
--pv2-form-valid-border-color: #00d27a;
189+
--pv2-form-invalid-color: #f0879a;
190+
--pv2-form-invalid-border-color: #e63757;
22191
}
23192

24193
*,

css/vault.css

+91
Original file line numberDiff line numberDiff line change
@@ -1533,3 +1533,94 @@ th.dt-center, td.dt-center {
15331533
.final-concentration-details {
15341534
display: inline-block;
15351535
}
1536+
1537+
.bootstrap-select > .dropdown-toggle.bs-placeholder, .bootstrap-select > .dropdown-toggle.bs-placeholder:active, .bootstrap-select > .dropdown-toggle.bs-placeholder:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder:disabled { background-color: var(--bs-secondary-bg);
1538+
opacity: 1;
1539+
}
1540+
1541+
/* -------------------------------------------------------------------------- */
1542+
/* Badges */
1543+
/* -------------------------------------------------------------------------- */
1544+
.badge-subtle-primary {
1545+
color: var(--pv2-primary-text-emphasis);
1546+
background-color: var(--pv2-primary-bg-subtle);
1547+
}
1548+
.badge-subtle-primary[href]:hover, .badge-subtle-primary[href]:focus {
1549+
text-decoration: none;
1550+
color: var(--pv2-primary-text-emphasis);
1551+
background-color: var(--pv2-primary-bg-subtle);
1552+
}
1553+
1554+
.badge-subtle-secondary {
1555+
color: var(--pv2-secondary-text-emphasis);
1556+
background-color: var(--pv2-secondary-bg-subtle);
1557+
}
1558+
.badge-subtle-secondary[href]:hover, .badge-subtle-secondary[href]:focus {
1559+
text-decoration: none;
1560+
color: var(--pv2-secondary-text-emphasis);
1561+
background-color: var(--pv2-secondary-bg-subtle);
1562+
}
1563+
1564+
.badge-subtle-success {
1565+
color: var(--pv2-success-text-emphasis);
1566+
background-color: var(--pv2-success-bg-subtle);
1567+
}
1568+
.badge-subtle-success[href]:hover, .badge-subtle-success[href]:focus {
1569+
text-decoration: none;
1570+
color: var(--pv2-success-text-emphasis);
1571+
background-color: var(--pv2-success-bg-subtle);
1572+
}
1573+
1574+
.badge-subtle-info {
1575+
color: var(--pv2-info-text-emphasis);
1576+
background-color: var(--pv2-info-bg-subtle);
1577+
}
1578+
.badge-subtle-info[href]:hover, .badge-subtle-info[href]:focus {
1579+
text-decoration: none;
1580+
color: var(--pv2-info-text-emphasis);
1581+
background-color: var(--pv2-info-bg-subtle);
1582+
}
1583+
1584+
.badge-subtle-warning {
1585+
color: var(--pv2-warning-text-emphasis);
1586+
background-color: var(--pv2-warning-bg-subtle);
1587+
}
1588+
.badge-subtle-warning[href]:hover, .badge-subtle-warning[href]:focus {
1589+
text-decoration: none;
1590+
color: var(--pv2-warning-text-emphasis);
1591+
background-color: var(--pv2-warning-bg-subtle);
1592+
}
1593+
1594+
.badge-subtle-danger {
1595+
color: var(--pv2-danger-text-emphasis);
1596+
background-color: var(--pv2-danger-bg-subtle);
1597+
}
1598+
.badge-subtle-danger[href]:hover, .badge-subtle-danger[href]:focus {
1599+
text-decoration: none;
1600+
color: var(--pv2-danger-text-emphasis);
1601+
background-color: var(--pv2-danger-bg-subtle);
1602+
}
1603+
1604+
.badge-subtle-light {
1605+
color: var(--pv2-light-text-emphasis);
1606+
background-color: var(--pv2-light-bg-subtle);
1607+
}
1608+
.badge-subtle-light[href]:hover, .badge-subtle-light[href]:focus {
1609+
text-decoration: none;
1610+
color: var(--pv2-light-text-emphasis);
1611+
background-color: var(--pv2-light-bg-subtle);
1612+
}
1613+
1614+
.badge-subtle-dark {
1615+
color: var(--pv2-dark-text-emphasis);
1616+
background-color: var(--pv2-dark-bg-subtle);
1617+
}
1618+
.badge-subtle-dark[href]:hover, .badge-subtle-dark[href]:focus {
1619+
text-decoration: none;
1620+
color: var(--pv2-dark-text-emphasis);
1621+
background-color: var(--pv2-dark-bg-subtle);
1622+
}
1623+
1624+
.progress-bar {
1625+
color: var(--bs-light) !important;
1626+
}

0 commit comments

Comments
 (0)