Reports
This commit is contained in:
parent
1f78c43d61
commit
734f74df50
|
|
@ -691,11 +691,12 @@ class ReportResult {
|
||||||
return value.toLowerCase().contains(filter.toLowerCase());
|
return value.toLowerCase().contains(filter.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool matchAmount({String filter, double amount}) {
|
static bool matchAmount({String filter, num amount}) {
|
||||||
final String range = filter.replaceAll(',', '-') + '-';
|
final String range = filter.replaceAll(',', '-') + '-';
|
||||||
final List<String> parts = range.split('-');
|
final List<String> parts = range.split('-');
|
||||||
final min = parseDouble(parts[0]);
|
final min = parseDouble(parts[0]);
|
||||||
final max = parseDouble(parts[1]);
|
final max = parts.length > 1 ? parseDouble(parts[1]) : 0;
|
||||||
|
|
||||||
if (amount < min || (max > 0 && amount > max)) {
|
if (amount < min || (max > 0 && amount > max)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -862,8 +863,9 @@ class ReportResult {
|
||||||
)).toList(),
|
)).toList(),
|
||||||
))
|
))
|
||||||
else
|
else
|
||||||
if (getReportColumnType(column, context) ==
|
if (
|
||||||
ReportColumnType.number)
|
[ReportColumnType.number, ReportColumnType.duration,].contains(
|
||||||
|
getReportColumnType(column, context)))
|
||||||
DataCell(TextFormField(
|
DataCell(TextFormField(
|
||||||
controller: textEditingControllers[column],
|
controller: textEditingControllers[column],
|
||||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue