Bläddra i källkod

Color green coffee rows red if remaining quantity is negative

Neal Wilson 8 år sedan
förälder
incheckning
a8b9c38784
Signerad av: neal <neal@typica.us> GPG-nyckel ID: D6F25C90DD5819DF
1 ändrade filer med 8 tillägg och 0 borttagningar
  1. 8
    0
      config/Windows/newbatch.xml

+ 8
- 0
config/Windows/newbatch.xml Visa fil

343
                                 }
343
                                 }
344
                                 displayValue -= change;
344
                                 displayValue -= change;
345
                             }
345
                             }
346
+							var rowColor = QBrush("black");
347
+							if(displayValue < 0)
348
+							{
349
+								rowColor = QBrush("red");
350
+							}
346
                             var bagCount = (displayValue / bagConversion).toFixed(2);
351
                             var bagCount = (displayValue / bagConversion).toFixed(2);
347
                             switch(unitBox.currentIndex)
352
                             switch(unitBox.currentIndex)
348
                             {
353
                             {
362
                                 table.setData(r, 2, displayValue, 0);
367
                                 table.setData(r, 2, displayValue, 0);
363
                                 table.setData(r, 2, displayValue, 2);
368
                                 table.setData(r, 2, displayValue, 2);
364
                                 table.resizeColumnToContents(2);
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
                     }

Laddar…
Avbryt
Spara