Reports
This commit is contained in:
parent
31faa435a2
commit
bcf7f296c7
|
|
@ -41,6 +41,7 @@ enum ClientReportFields {
|
|||
balance,
|
||||
credit_balance,
|
||||
paid_to_date,
|
||||
total,
|
||||
id_number,
|
||||
vat_number,
|
||||
contact_full_name,
|
||||
|
|
@ -231,6 +232,9 @@ ReportResult clientReport(
|
|||
case ClientReportFields.contact_last_login:
|
||||
value = convertTimestampToDateString(contact.lastLogin);
|
||||
break;
|
||||
case ClientReportFields.total:
|
||||
value = client.balance + client.paidToDate;
|
||||
break;
|
||||
case ClientReportFields.balance:
|
||||
value = client.balance;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -526,8 +526,15 @@ ReportColumnType getReportColumnType(String column, BuildContext context) {
|
|||
return ReportColumnType.dateTime;
|
||||
} else if (['date', 'due_date'].contains(column)) {
|
||||
return ReportColumnType.date;
|
||||
} else if (['balance', 'paid_to_date', 'amount', 'quantity', 'pridce', 'cost']
|
||||
.contains(column)) {
|
||||
} else if ([
|
||||
'balance',
|
||||
'paid_to_date',
|
||||
'amount',
|
||||
'quantity',
|
||||
'pridce',
|
||||
'cost',
|
||||
'total',
|
||||
].contains(column)) {
|
||||
return ReportColumnType.number;
|
||||
} else if (['is_active'].contains(column)) {
|
||||
return ReportColumnType.bool;
|
||||
|
|
|
|||
Loading…
Reference in New Issue