Add task columns
This commit is contained in:
parent
db393aa146
commit
2ad541ebb2
|
|
@ -999,6 +999,20 @@ class ProductItemFields {
|
||||||
static const String custom4 = 'custom4';
|
static const String custom4 = 'custom4';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TaskItemFields {
|
||||||
|
static const String productKey = 'product_key';
|
||||||
|
static const String description = 'description';
|
||||||
|
static const String rate = 'rate';
|
||||||
|
static const String tax = 'tax';
|
||||||
|
static const String hours = 'hours';
|
||||||
|
static const String lineTotal = 'line_total';
|
||||||
|
static const String discount = 'discount';
|
||||||
|
static const String custom1 = 'custom1';
|
||||||
|
static const String custom2 = 'custom2';
|
||||||
|
static const String custom3 = 'custom3';
|
||||||
|
static const String custom4 = 'custom4';
|
||||||
|
}
|
||||||
|
|
||||||
abstract class InvoiceItemEntity
|
abstract class InvoiceItemEntity
|
||||||
implements Built<InvoiceItemEntity, InvoiceItemEntityBuilder> {
|
implements Built<InvoiceItemEntity, InvoiceItemEntityBuilder> {
|
||||||
factory InvoiceItemEntity({String productKey, double quantity}) {
|
factory InvoiceItemEntity({String productKey, double quantity}) {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_focusNode = FocusScopeNode();
|
_focusNode = FocusScopeNode();
|
||||||
_controller = TabController(vsync: this, length: 10);
|
_controller = TabController(vsync: this, length: 11);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -90,10 +90,8 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
Tab(text: localization.quoteDetails),
|
Tab(text: localization.quoteDetails),
|
||||||
Tab(text: localization.creditDetails),
|
Tab(text: localization.creditDetails),
|
||||||
Tab(text: localization.productColumns),
|
Tab(text: localization.productColumns),
|
||||||
Tab(text: localization.totalFields),
|
|
||||||
/*
|
|
||||||
Tab(text: localization.taskColumns),
|
Tab(text: localization.taskColumns),
|
||||||
*/
|
Tab(text: localization.totalFields),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: AppTabForm(
|
body: AppTabForm(
|
||||||
|
|
@ -538,11 +536,30 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
prefix: 'product',
|
prefix: 'product',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
/*
|
|
||||||
FormCard(
|
FormCard(
|
||||||
child: MultiSelectList(
|
child: MultiSelectList(
|
||||||
options: [],
|
options: [
|
||||||
defaultSelected: [],
|
TaskItemFields.productKey,
|
||||||
|
TaskItemFields.description,
|
||||||
|
TaskItemFields.hours,
|
||||||
|
TaskItemFields.rate,
|
||||||
|
TaskItemFields.tax,
|
||||||
|
TaskItemFields.discount,
|
||||||
|
TaskItemFields.lineTotal,
|
||||||
|
TaskItemFields.custom1,
|
||||||
|
TaskItemFields.custom2,
|
||||||
|
TaskItemFields.custom3,
|
||||||
|
TaskItemFields.custom4,
|
||||||
|
].map((field) => '\$task.$field').toList(),
|
||||||
|
defaultSelected: [
|
||||||
|
TaskItemFields.productKey,
|
||||||
|
TaskItemFields.description,
|
||||||
|
TaskItemFields.rate,
|
||||||
|
TaskItemFields.hours,
|
||||||
|
TaskItemFields.discount,
|
||||||
|
TaskItemFields.tax,
|
||||||
|
TaskItemFields.lineTotal,
|
||||||
|
].map((field) => '\$task.$field').toList(),
|
||||||
selected: settings.getFieldsForSection(kPdfFieldsTaskColumns),
|
selected: settings.getFieldsForSection(kPdfFieldsTaskColumns),
|
||||||
onSelected: (values) {
|
onSelected: (values) {
|
||||||
viewModel.onSettingsChanged(settings.setFieldsForSection(
|
viewModel.onSettingsChanged(settings.setFieldsForSection(
|
||||||
|
|
@ -553,7 +570,6 @@ class _InvoiceDesignState extends State<InvoiceDesign>
|
||||||
prefix: 'task',
|
prefix: 'task',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
*/
|
|
||||||
FormCard(
|
FormCard(
|
||||||
child: MultiSelectList(
|
child: MultiSelectList(
|
||||||
options: [
|
options: [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue