@aderis-erp/cli 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/access-groups.js +18 -6
- package/dist/commands/account-transaction-allocations.js +18 -6
- package/dist/commands/account-transactions.js +18 -6
- package/dist/commands/accounts.js +18 -6
- package/dist/commands/agent-runs.js +18 -6
- package/dist/commands/audit-log.js +18 -6
- package/dist/commands/bank-accounts.js +18 -6
- package/dist/commands/bank-integrations.js +18 -6
- package/dist/commands/business-partners.js +18 -6
- package/dist/commands/credit-card-accounts.js +18 -6
- package/dist/commands/documents.js +18 -6
- package/dist/commands/dunning-configs.js +18 -6
- package/dist/commands/dunning-reminders.js +18 -6
- package/dist/commands/dunning-runs.js +18 -6
- package/dist/commands/employees.js +18 -6
- package/dist/commands/event-processor-mappings.js +18 -6
- package/dist/commands/files-internal.js +18 -6
- package/dist/commands/health.js +18 -6
- package/dist/commands/inbox.js +18 -6
- package/dist/commands/integrations.js +18 -6
- package/dist/commands/item-categories.js +18 -6
- package/dist/commands/items.js +18 -6
- package/dist/commands/journal-lines.js +18 -6
- package/dist/commands/journals.js +18 -6
- package/dist/commands/ledgers.js +18 -6
- package/dist/commands/office-locations.js +18 -6
- package/dist/commands/payment-methods.js +18 -6
- package/dist/commands/payment-runs.js +18 -6
- package/dist/commands/payment-terms.js +18 -6
- package/dist/commands/price-lists.js +18 -6
- package/dist/commands/processor-mappings.js +18 -6
- package/dist/commands/processors.js +18 -6
- package/dist/commands/reports.js +18 -6
- package/dist/commands/salary-types.js +18 -6
- package/dist/commands/sales-invoices.js +18 -6
- package/dist/commands/sales-orders.js +18 -6
- package/dist/commands/saved-views.js +18 -6
- package/dist/commands/tags.js +18 -6
- package/dist/commands/tax-codes.js +18 -6
- package/dist/commands/tax-matrix.js +18 -6
- package/dist/commands/tenants.js +18 -6
- package/dist/commands/text-templates.js +18 -6
- package/dist/commands/tools.js +18 -6
- package/dist/commands/vat-declarations.js +18 -6
- package/dist/commands/vendor-invoices.js +18 -6
- package/dist/commands/webhooks.js +18 -6
- package/dist/commands/workflows.js +18 -6
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -1012,12 +1012,24 @@ export default class Integrations extends Command {
|
|
|
1012
1012
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1013
1013
|
}
|
|
1014
1014
|
getValue(row, col) {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1015
|
+
if (!col.includes('.'))
|
|
1016
|
+
return String(row[col] ?? '');
|
|
1017
|
+
const parts = col.split('.');
|
|
1018
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1019
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1020
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1021
|
+
const walk = (o, idx) => {
|
|
1022
|
+
if (idx >= parts.length)
|
|
1023
|
+
return [o];
|
|
1024
|
+
if (o == null)
|
|
1025
|
+
return [];
|
|
1026
|
+
if (Array.isArray(o))
|
|
1027
|
+
return o.flatMap(item => walk(item, idx));
|
|
1028
|
+
if (typeof o === 'object')
|
|
1029
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1030
|
+
return [];
|
|
1031
|
+
};
|
|
1032
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1021
1033
|
}
|
|
1022
1034
|
printTable(data, fields) {
|
|
1023
1035
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1017,12 +1017,24 @@ export default class ItemCategories extends Command {
|
|
|
1017
1017
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1018
1018
|
}
|
|
1019
1019
|
getValue(row, col) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
if (!col.includes('.'))
|
|
1021
|
+
return String(row[col] ?? '');
|
|
1022
|
+
const parts = col.split('.');
|
|
1023
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1024
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1025
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1026
|
+
const walk = (o, idx) => {
|
|
1027
|
+
if (idx >= parts.length)
|
|
1028
|
+
return [o];
|
|
1029
|
+
if (o == null)
|
|
1030
|
+
return [];
|
|
1031
|
+
if (Array.isArray(o))
|
|
1032
|
+
return o.flatMap(item => walk(item, idx));
|
|
1033
|
+
if (typeof o === 'object')
|
|
1034
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1035
|
+
return [];
|
|
1036
|
+
};
|
|
1037
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1026
1038
|
}
|
|
1027
1039
|
printTable(data, fields) {
|
|
1028
1040
|
const { cols, items } = this.getColumns(data, fields);
|
package/dist/commands/items.js
CHANGED
|
@@ -1017,12 +1017,24 @@ export default class Items extends Command {
|
|
|
1017
1017
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1018
1018
|
}
|
|
1019
1019
|
getValue(row, col) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
if (!col.includes('.'))
|
|
1021
|
+
return String(row[col] ?? '');
|
|
1022
|
+
const parts = col.split('.');
|
|
1023
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1024
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1025
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1026
|
+
const walk = (o, idx) => {
|
|
1027
|
+
if (idx >= parts.length)
|
|
1028
|
+
return [o];
|
|
1029
|
+
if (o == null)
|
|
1030
|
+
return [];
|
|
1031
|
+
if (Array.isArray(o))
|
|
1032
|
+
return o.flatMap(item => walk(item, idx));
|
|
1033
|
+
if (typeof o === 'object')
|
|
1034
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1035
|
+
return [];
|
|
1036
|
+
};
|
|
1037
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1026
1038
|
}
|
|
1027
1039
|
printTable(data, fields) {
|
|
1028
1040
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1009,12 +1009,24 @@ export default class JournalLines extends Command {
|
|
|
1009
1009
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1010
1010
|
}
|
|
1011
1011
|
getValue(row, col) {
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1012
|
+
if (!col.includes('.'))
|
|
1013
|
+
return String(row[col] ?? '');
|
|
1014
|
+
const parts = col.split('.');
|
|
1015
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1016
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1017
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1018
|
+
const walk = (o, idx) => {
|
|
1019
|
+
if (idx >= parts.length)
|
|
1020
|
+
return [o];
|
|
1021
|
+
if (o == null)
|
|
1022
|
+
return [];
|
|
1023
|
+
if (Array.isArray(o))
|
|
1024
|
+
return o.flatMap(item => walk(item, idx));
|
|
1025
|
+
if (typeof o === 'object')
|
|
1026
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1027
|
+
return [];
|
|
1028
|
+
};
|
|
1029
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1018
1030
|
}
|
|
1019
1031
|
printTable(data, fields) {
|
|
1020
1032
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1033,12 +1033,24 @@ export default class Journals extends Command {
|
|
|
1033
1033
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1034
1034
|
}
|
|
1035
1035
|
getValue(row, col) {
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1036
|
+
if (!col.includes('.'))
|
|
1037
|
+
return String(row[col] ?? '');
|
|
1038
|
+
const parts = col.split('.');
|
|
1039
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1040
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1041
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1042
|
+
const walk = (o, idx) => {
|
|
1043
|
+
if (idx >= parts.length)
|
|
1044
|
+
return [o];
|
|
1045
|
+
if (o == null)
|
|
1046
|
+
return [];
|
|
1047
|
+
if (Array.isArray(o))
|
|
1048
|
+
return o.flatMap(item => walk(item, idx));
|
|
1049
|
+
if (typeof o === 'object')
|
|
1050
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1051
|
+
return [];
|
|
1052
|
+
};
|
|
1053
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1042
1054
|
}
|
|
1043
1055
|
printTable(data, fields) {
|
|
1044
1056
|
const { cols, items } = this.getColumns(data, fields);
|
package/dist/commands/ledgers.js
CHANGED
|
@@ -1030,12 +1030,24 @@ export default class Ledgers extends Command {
|
|
|
1030
1030
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1031
1031
|
}
|
|
1032
1032
|
getValue(row, col) {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1033
|
+
if (!col.includes('.'))
|
|
1034
|
+
return String(row[col] ?? '');
|
|
1035
|
+
const parts = col.split('.');
|
|
1036
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1037
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1038
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1039
|
+
const walk = (o, idx) => {
|
|
1040
|
+
if (idx >= parts.length)
|
|
1041
|
+
return [o];
|
|
1042
|
+
if (o == null)
|
|
1043
|
+
return [];
|
|
1044
|
+
if (Array.isArray(o))
|
|
1045
|
+
return o.flatMap(item => walk(item, idx));
|
|
1046
|
+
if (typeof o === 'object')
|
|
1047
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1048
|
+
return [];
|
|
1049
|
+
};
|
|
1050
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1039
1051
|
}
|
|
1040
1052
|
printTable(data, fields) {
|
|
1041
1053
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1017,12 +1017,24 @@ export default class OfficeLocations extends Command {
|
|
|
1017
1017
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1018
1018
|
}
|
|
1019
1019
|
getValue(row, col) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
if (!col.includes('.'))
|
|
1021
|
+
return String(row[col] ?? '');
|
|
1022
|
+
const parts = col.split('.');
|
|
1023
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1024
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1025
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1026
|
+
const walk = (o, idx) => {
|
|
1027
|
+
if (idx >= parts.length)
|
|
1028
|
+
return [o];
|
|
1029
|
+
if (o == null)
|
|
1030
|
+
return [];
|
|
1031
|
+
if (Array.isArray(o))
|
|
1032
|
+
return o.flatMap(item => walk(item, idx));
|
|
1033
|
+
if (typeof o === 'object')
|
|
1034
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1035
|
+
return [];
|
|
1036
|
+
};
|
|
1037
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1026
1038
|
}
|
|
1027
1039
|
printTable(data, fields) {
|
|
1028
1040
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1023,12 +1023,24 @@ export default class PaymentMethods extends Command {
|
|
|
1023
1023
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1024
1024
|
}
|
|
1025
1025
|
getValue(row, col) {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1026
|
+
if (!col.includes('.'))
|
|
1027
|
+
return String(row[col] ?? '');
|
|
1028
|
+
const parts = col.split('.');
|
|
1029
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1030
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1031
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1032
|
+
const walk = (o, idx) => {
|
|
1033
|
+
if (idx >= parts.length)
|
|
1034
|
+
return [o];
|
|
1035
|
+
if (o == null)
|
|
1036
|
+
return [];
|
|
1037
|
+
if (Array.isArray(o))
|
|
1038
|
+
return o.flatMap(item => walk(item, idx));
|
|
1039
|
+
if (typeof o === 'object')
|
|
1040
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1041
|
+
return [];
|
|
1042
|
+
};
|
|
1043
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1032
1044
|
}
|
|
1033
1045
|
printTable(data, fields) {
|
|
1034
1046
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1032,12 +1032,24 @@ export default class PaymentRuns extends Command {
|
|
|
1032
1032
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1033
1033
|
}
|
|
1034
1034
|
getValue(row, col) {
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1035
|
+
if (!col.includes('.'))
|
|
1036
|
+
return String(row[col] ?? '');
|
|
1037
|
+
const parts = col.split('.');
|
|
1038
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1039
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1040
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1041
|
+
const walk = (o, idx) => {
|
|
1042
|
+
if (idx >= parts.length)
|
|
1043
|
+
return [o];
|
|
1044
|
+
if (o == null)
|
|
1045
|
+
return [];
|
|
1046
|
+
if (Array.isArray(o))
|
|
1047
|
+
return o.flatMap(item => walk(item, idx));
|
|
1048
|
+
if (typeof o === 'object')
|
|
1049
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1050
|
+
return [];
|
|
1051
|
+
};
|
|
1052
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1041
1053
|
}
|
|
1042
1054
|
printTable(data, fields) {
|
|
1043
1055
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1018,12 +1018,24 @@ export default class PaymentTerms extends Command {
|
|
|
1018
1018
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1019
1019
|
}
|
|
1020
1020
|
getValue(row, col) {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1021
|
+
if (!col.includes('.'))
|
|
1022
|
+
return String(row[col] ?? '');
|
|
1023
|
+
const parts = col.split('.');
|
|
1024
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1025
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1026
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1027
|
+
const walk = (o, idx) => {
|
|
1028
|
+
if (idx >= parts.length)
|
|
1029
|
+
return [o];
|
|
1030
|
+
if (o == null)
|
|
1031
|
+
return [];
|
|
1032
|
+
if (Array.isArray(o))
|
|
1033
|
+
return o.flatMap(item => walk(item, idx));
|
|
1034
|
+
if (typeof o === 'object')
|
|
1035
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1036
|
+
return [];
|
|
1037
|
+
};
|
|
1038
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1027
1039
|
}
|
|
1028
1040
|
printTable(data, fields) {
|
|
1029
1041
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1023,12 +1023,24 @@ export default class PriceLists extends Command {
|
|
|
1023
1023
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1024
1024
|
}
|
|
1025
1025
|
getValue(row, col) {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1026
|
+
if (!col.includes('.'))
|
|
1027
|
+
return String(row[col] ?? '');
|
|
1028
|
+
const parts = col.split('.');
|
|
1029
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1030
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1031
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1032
|
+
const walk = (o, idx) => {
|
|
1033
|
+
if (idx >= parts.length)
|
|
1034
|
+
return [o];
|
|
1035
|
+
if (o == null)
|
|
1036
|
+
return [];
|
|
1037
|
+
if (Array.isArray(o))
|
|
1038
|
+
return o.flatMap(item => walk(item, idx));
|
|
1039
|
+
if (typeof o === 'object')
|
|
1040
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1041
|
+
return [];
|
|
1042
|
+
};
|
|
1043
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1032
1044
|
}
|
|
1033
1045
|
printTable(data, fields) {
|
|
1034
1046
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1015,12 +1015,24 @@ export default class ProcessorMappings extends Command {
|
|
|
1015
1015
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1016
1016
|
}
|
|
1017
1017
|
getValue(row, col) {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1018
|
+
if (!col.includes('.'))
|
|
1019
|
+
return String(row[col] ?? '');
|
|
1020
|
+
const parts = col.split('.');
|
|
1021
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1022
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1023
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1024
|
+
const walk = (o, idx) => {
|
|
1025
|
+
if (idx >= parts.length)
|
|
1026
|
+
return [o];
|
|
1027
|
+
if (o == null)
|
|
1028
|
+
return [];
|
|
1029
|
+
if (Array.isArray(o))
|
|
1030
|
+
return o.flatMap(item => walk(item, idx));
|
|
1031
|
+
if (typeof o === 'object')
|
|
1032
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1033
|
+
return [];
|
|
1034
|
+
};
|
|
1035
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1024
1036
|
}
|
|
1025
1037
|
printTable(data, fields) {
|
|
1026
1038
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1021,12 +1021,24 @@ export default class Processors extends Command {
|
|
|
1021
1021
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1022
1022
|
}
|
|
1023
1023
|
getValue(row, col) {
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1024
|
+
if (!col.includes('.'))
|
|
1025
|
+
return String(row[col] ?? '');
|
|
1026
|
+
const parts = col.split('.');
|
|
1027
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1028
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1029
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1030
|
+
const walk = (o, idx) => {
|
|
1031
|
+
if (idx >= parts.length)
|
|
1032
|
+
return [o];
|
|
1033
|
+
if (o == null)
|
|
1034
|
+
return [];
|
|
1035
|
+
if (Array.isArray(o))
|
|
1036
|
+
return o.flatMap(item => walk(item, idx));
|
|
1037
|
+
if (typeof o === 'object')
|
|
1038
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1039
|
+
return [];
|
|
1040
|
+
};
|
|
1041
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1030
1042
|
}
|
|
1031
1043
|
printTable(data, fields) {
|
|
1032
1044
|
const { cols, items } = this.getColumns(data, fields);
|
package/dist/commands/reports.js
CHANGED
|
@@ -1010,12 +1010,24 @@ export default class Reports extends Command {
|
|
|
1010
1010
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1011
1011
|
}
|
|
1012
1012
|
getValue(row, col) {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1013
|
+
if (!col.includes('.'))
|
|
1014
|
+
return String(row[col] ?? '');
|
|
1015
|
+
const parts = col.split('.');
|
|
1016
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1017
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1018
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1019
|
+
const walk = (o, idx) => {
|
|
1020
|
+
if (idx >= parts.length)
|
|
1021
|
+
return [o];
|
|
1022
|
+
if (o == null)
|
|
1023
|
+
return [];
|
|
1024
|
+
if (Array.isArray(o))
|
|
1025
|
+
return o.flatMap(item => walk(item, idx));
|
|
1026
|
+
if (typeof o === 'object')
|
|
1027
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1028
|
+
return [];
|
|
1029
|
+
};
|
|
1030
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1019
1031
|
}
|
|
1020
1032
|
printTable(data, fields) {
|
|
1021
1033
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1017,12 +1017,24 @@ export default class SalaryTypes extends Command {
|
|
|
1017
1017
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1018
1018
|
}
|
|
1019
1019
|
getValue(row, col) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
if (!col.includes('.'))
|
|
1021
|
+
return String(row[col] ?? '');
|
|
1022
|
+
const parts = col.split('.');
|
|
1023
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1024
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1025
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1026
|
+
const walk = (o, idx) => {
|
|
1027
|
+
if (idx >= parts.length)
|
|
1028
|
+
return [o];
|
|
1029
|
+
if (o == null)
|
|
1030
|
+
return [];
|
|
1031
|
+
if (Array.isArray(o))
|
|
1032
|
+
return o.flatMap(item => walk(item, idx));
|
|
1033
|
+
if (typeof o === 'object')
|
|
1034
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1035
|
+
return [];
|
|
1036
|
+
};
|
|
1037
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1026
1038
|
}
|
|
1027
1039
|
printTable(data, fields) {
|
|
1028
1040
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1045,12 +1045,24 @@ export default class SalesInvoices extends Command {
|
|
|
1045
1045
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1046
1046
|
}
|
|
1047
1047
|
getValue(row, col) {
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1048
|
+
if (!col.includes('.'))
|
|
1049
|
+
return String(row[col] ?? '');
|
|
1050
|
+
const parts = col.split('.');
|
|
1051
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1052
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1053
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1054
|
+
const walk = (o, idx) => {
|
|
1055
|
+
if (idx >= parts.length)
|
|
1056
|
+
return [o];
|
|
1057
|
+
if (o == null)
|
|
1058
|
+
return [];
|
|
1059
|
+
if (Array.isArray(o))
|
|
1060
|
+
return o.flatMap(item => walk(item, idx));
|
|
1061
|
+
if (typeof o === 'object')
|
|
1062
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1063
|
+
return [];
|
|
1064
|
+
};
|
|
1065
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1054
1066
|
}
|
|
1055
1067
|
printTable(data, fields) {
|
|
1056
1068
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1043,12 +1043,24 @@ export default class SalesOrders extends Command {
|
|
|
1043
1043
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1044
1044
|
}
|
|
1045
1045
|
getValue(row, col) {
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1046
|
+
if (!col.includes('.'))
|
|
1047
|
+
return String(row[col] ?? '');
|
|
1048
|
+
const parts = col.split('.');
|
|
1049
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1050
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1051
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1052
|
+
const walk = (o, idx) => {
|
|
1053
|
+
if (idx >= parts.length)
|
|
1054
|
+
return [o];
|
|
1055
|
+
if (o == null)
|
|
1056
|
+
return [];
|
|
1057
|
+
if (Array.isArray(o))
|
|
1058
|
+
return o.flatMap(item => walk(item, idx));
|
|
1059
|
+
if (typeof o === 'object')
|
|
1060
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1061
|
+
return [];
|
|
1062
|
+
};
|
|
1063
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1052
1064
|
}
|
|
1053
1065
|
printTable(data, fields) {
|
|
1054
1066
|
const { cols, items } = this.getColumns(data, fields);
|
|
@@ -1011,12 +1011,24 @@ export default class SavedViews extends Command {
|
|
|
1011
1011
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1012
1012
|
}
|
|
1013
1013
|
getValue(row, col) {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1014
|
+
if (!col.includes('.'))
|
|
1015
|
+
return String(row[col] ?? '');
|
|
1016
|
+
const parts = col.split('.');
|
|
1017
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1018
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1019
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1020
|
+
const walk = (o, idx) => {
|
|
1021
|
+
if (idx >= parts.length)
|
|
1022
|
+
return [o];
|
|
1023
|
+
if (o == null)
|
|
1024
|
+
return [];
|
|
1025
|
+
if (Array.isArray(o))
|
|
1026
|
+
return o.flatMap(item => walk(item, idx));
|
|
1027
|
+
if (typeof o === 'object')
|
|
1028
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1029
|
+
return [];
|
|
1030
|
+
};
|
|
1031
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1020
1032
|
}
|
|
1021
1033
|
printTable(data, fields) {
|
|
1022
1034
|
const { cols, items } = this.getColumns(data, fields);
|
package/dist/commands/tags.js
CHANGED
|
@@ -1017,12 +1017,24 @@ export default class Tags extends Command {
|
|
|
1017
1017
|
return { cols: flatten ? cols : cols.slice(0, 8), items: items };
|
|
1018
1018
|
}
|
|
1019
1019
|
getValue(row, col) {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
if (!col.includes('.'))
|
|
1021
|
+
return String(row[col] ?? '');
|
|
1022
|
+
const parts = col.split('.');
|
|
1023
|
+
// Walk the dot-path; descending through an array branches into every
|
|
1024
|
+
// element so leaf values get collected from each one. Multiple leaves are
|
|
1025
|
+
// joined with ';' (e.g. dunningReminders.id -> "uuid1;uuid2").
|
|
1026
|
+
const walk = (o, idx) => {
|
|
1027
|
+
if (idx >= parts.length)
|
|
1028
|
+
return [o];
|
|
1029
|
+
if (o == null)
|
|
1030
|
+
return [];
|
|
1031
|
+
if (Array.isArray(o))
|
|
1032
|
+
return o.flatMap(item => walk(item, idx));
|
|
1033
|
+
if (typeof o === 'object')
|
|
1034
|
+
return walk(o[parts[idx]], idx + 1);
|
|
1035
|
+
return [];
|
|
1036
|
+
};
|
|
1037
|
+
return walk(row, 0).filter(v => v !== undefined && v !== null).map(v => String(v)).join(';');
|
|
1026
1038
|
}
|
|
1027
1039
|
printTable(data, fields) {
|
|
1028
1040
|
const { cols, items } = this.getColumns(data, fields);
|