Browse Source

Color green coffee rows red if remaining quantity is negative

Neal Wilson 6 years ago
parent
commit
a8b9c38784
Signed by: neal <neal@typica.us> GPG Key ID: D6F25C90DD5819DF
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      config/Windows/newbatch.xml

+ 8
- 0
config/Windows/newbatch.xml View File

@@ -343,6 +343,11 @@
343 343
                                 }
344 344
                                 displayValue -= change;
345 345
                             }
346
+							var rowColor = QBrush("black");
347
+							if(displayValue < 0)
348
+							{
349
+								rowColor = QBrush("red");
350
+							}
346 351
                             var bagCount = (displayValue / bagConversion).toFixed(2);
347 352
                             switch(unitBox.currentIndex)
348 353
                             {
@@ -362,6 +367,9 @@
362 367
                                 table.setData(r, 2, displayValue, 0);
363 368
                                 table.setData(r, 2, displayValue, 2);
364 369
                                 table.resizeColumnToContents(2);
370
+								table.setData(r, 0, rowColor, 9);
371
+								table.setData(r, 1, rowColor, 9);
372
+								table.setData(r, 2, rowColor, 9);
365 373
                             }
366 374
                         }
367 375
                     }

Loading…
Cancel
Save