Loading...
 

History: Work_Custom_Pricing

Preview of version: 51

This profile is a showcase of how to setup trackers to allow defining work orders in one tracker, and linked them to billable tasks from another one, allowing to define a custom price aside of the guide and get some of the items selected summed in another field of tracker1. The tracker also demonstrates how item link field currently allows to create and link items in a second tracker on the fly and get them stored while adding the new item in the first tracker.

These pages will be created:

Some tracker items are created for the price guide to ease the usage of the system.

YAML
permissions: preferences: feature_trackers: y feature_search: y feature_search_fulltext: n feature_wiki_argvariable: y feature_syntax_highlighter: y feature_jquery_tablesorter: y unified_incremental_update: y wikiplugin_tabs: y wikiplugin_button: y wikiplugin_param: y wikiplugin_tracker: y wikiplugin_trackerlist: y wikiplugin_list: y trackerfield_dropdownother: y trackerfield_autoincrement: y trackerfield_currency: y trackerfield_dynamiclist: y trackerfield_math: y ajax_inline_edit: y ajax_inline_edit_trackerlist: y


Tracker 1: Work Orders

YAML
objects: - type: tracker ref: work_orders data: name: Work orders description: > This is where the work orders are stored sort_default_order: desc list_default_status: opc hide_list_empty_fields: y restrict_end: 0 form_classes: section_format: tab restrict_start: 0 show: - status - type: tracker_field ref: work_orders_general data: name: General permname: general tracker: $profileobject:work_orders$ options: level: 3 toggle: o type: header order: 5 flags: - public - type: tracker_field ref: work_orders_WOID data: name: 'WO#' permname: woWOID tracker: $profileobject:work_orders$ options: samerow: 1 autocomplete: n exact: n type: text_field order: 10 flags: - list - searchable - public - mandatory - type: tracker_field ref: work_orders_name data: name: Name permname: woName tracker: $profileobject:work_orders$ options: samerow: 1 type: text_field order: 20 flags: - link - list - searchable - public - mandatory - type: tracker_field ref: work_orders_status data: name: Status permname: woStatus tracker: $profileobject:work_orders$ options: options: - 0-Received from client - 0-Received from client - 1-Confirmed by us - 2-Assigned to Account Manager - 3-Bid by contractor - 4-Assigned to contractor - 5-Work done by contractor - 6-Work accepted by our company - 7-Invoice Received from Contractor - 8-Contractor Paid - 9-Client Invoiced - 10-Client payment received type: dropdown order: 30 flags: - list - public - type: tracker_field ref: work_orders_workPrice data: name: Work Price permname: woWorkPrice tracker: $profileobject:work_orders$ options: trackerId: $profileobject:work_order_line_items$ displayFieldsList: - $profileobject:work_order_line_items_workDescription$ - $profileobject:work_order_line_items_units$ - $profileobject:work_order_line_items_clientPricePerUnit$ - $profileobject:work_order_line_items_overridePriceForClient$ - $profileobject:work_order_line_items_keywordsClient$ - $profileobject:work_order_line_items_contractorPricePerUnit$ - $profileobject:work_order_line_items_overridePriceForContractor$ - $profileobject:work_order_line_items_keywordsContractor$ displayFieldsListType: table status: opc addItems: Add preSelectFieldMethod: exact displayOneItem: multi selectMultipleValues: 1 indexRemote: - 0 type: item_link order: 40 flags: - list - public - type: tracker_field ref: work_orders_workPriceFinalForClient data: name: Work Price, final (for Client) permname: woWorkPriceFinalForClient tracker: $profileobject:work_orders$ options: calculation: | (add (for-each (list (split-list (content woWorkPrice) (separator ,) (key id) ) ) (formula (tracker-field (object "trackeritem" id) (field woliOverridePriceForClient) ) ) ) ) recalculate: save type: math order: 50 flags: - list - public - type: tracker_field ref: work_orders_workPriceFinalForContractor data: name: Work Price, final (for Contractor) permname: woWorkPriceFinalForContractor tracker: $profileobject:work_orders$ options: calculation: | (add (for-each (list (split-list (content woWorkPrice) (separator ,) (key id) ) ) (formula (tracker-field (object "trackeritem" id) (field woliOverridePriceForContractor) ) ) ) ) recalculate: save type: math order: 60 flags: - list - public - type: tracker_field ref: work_orders_location data: name: Location permname: location tracker: $profileobject:work_orders$ options: level: 3 toggle: o type: header order: 70 flags: - public - type: tracker_field ref: work_orders_address data: name: Address permname: woAddress tracker: $profileobject:work_orders$ options: samerow: 1 type: text_field order: 80 flags: - list - public - type: tracker_field ref: work_orders_zipCode data: name: Zip Code permname: woZipCode tracker: $profileobject:work_orders$ options: samerow: 1 type: numeric order: 90 flags: - list - public - type: tracker_field ref: work_orders_map data: name: Map permname: woMap tracker: $profileobject:work_orders$ options: use_as_item_location: 1 list_width: 200 list_height: 200 item_width: 500 item_height: 400 sourceFieldsList: - > $profileobject:work_orders_address$ sourceSearchEvent: indexalways type: map order: 100 flags: - list - public - type: tracker_field ref: work_orders_otherInfos data: name: Other infos permname: otherInfos tracker: $profileobject:work_orders$ options: level: 3 toggle: o type: header order: 200 flags: - public - type: tracker_field ref: work_orders_workOrderInstructions data: name: work order instructions permname: woWorkOrderInstructions tracker: $profileobject:work_orders$ options: distinct: n wysiwyg: n samerow: 1 type: text_area order: 210 flags: - public - type: tracker_field ref: work_orders_estimatedCompletionDate data: name: Estimated Completion Date permname: woEstimatedCompletionDate tracker: $profileobject:work_orders$ options: datetime: d blankdate: blank type: datetime order: 250 flags: - list - public - type: tracker_field ref: work_orders_user data: name: user permname: woUser tracker: $profileobject:work_orders$ options: type: user order: 300 flags: - public - type: tracker_option ref: work_orders_sort_default_field data: tracker: $profileobject:work_orders$ name: sort_default_field value: > $profileobject:work_orders_WOID$ - type: tracker_option ref: work_orders_popup_fields data: tracker: $profileobject:work_orders$ name: popup_fields value: > $profileobject:work_orders_workOrderInstructions$


Tracker 2: Work Price Guide

YAML
objects: - type: tracker ref: work_price_guide data: name: Work Price Guide description: list_default_status: opc hide_list_empty_fields: y restrict_end: 0 form_classes: restrict_start: 0 - type: tracker_field ref: work_price_guide_workCategory data: name: Work category permname: wpgWorkCategory tracker: $profileobject:work_price_guide$ options: options: - | Appliance - remove - | Appliance - replace - Boarding - | Cap - dryer vent - | Cap - exposed drain - | Cap - exposed wire - | Cap - gas/water line - | Carpet - clean - | Clean - fireplace & chimney - | Clean - gutters - Garden work type: dropdown order: 0 flags: - list - public - type: tracker_field ref: work_price_guide_workDescription data: name: Work description permname: wpgWorkDescription tracker: $profileobject:work_price_guide$ options: samerow: 1 type: text_field order: 10 flags: - link - list - public - mandatory - type: tracker_field ref: work_price_guide_uM data: name: U/M permname: wpgUM tracker: $profileobject:work_price_guide$ options: options: - Unit - HRS type: dropdown order: 20 flags: - list - public - type: tracker_field ref: work_price_guide_clientPricePerUnit data: name: Price Per Unit (from Client) permname: wpgClientPricePerUnit tracker: $profileobject:work_price_guide$ options: samerow: 1 size: 7 locale: en_US.UTF-8 currency: USD symbol: i all_symbol: 1 type: currency order: 30 description: > What you will get paid by your client for the work to do once done (that you subcontracted to a Contractor) flags: - list - public - type: tracker_field ref: work_price_guide_contractorPricePerUnit data: name: Price Per Unit (for Contractor) permname: wpgContractorPricePerUnit tracker: $profileobject:work_price_guide$ options: samerow: 1 size: 7 locale: en_US.UTF-8 currency: USD symbol: i all_symbol: 1 type: currency order: 40 description: > What you will pay the contractor for the work done (subcontracted to them, based on the request of your client) flags: - list - public - type: tracker_option ref: work_price_guide_sort_default_field data: tracker: $profileobject:work_price_guide$ name: sort_default_field value: modification


Tracker 3: Work Order Line Items

YAML
objects: - type: tracker ref: work_order_line_items data: name: Work Order Line Items description: restrict_end: 0 form_classes: restrict_start: 0 - type: tracker_field ref: work_order_line_items_workDescription data: name: Work description permname: woliWorkDescription tracker: $profileobject:work_order_line_items$ options: trackerId: $profileobject:work_price_guide$ fieldId: $profileobject:work_price_guide_workDescription$ displayFieldsList: - 0 displayFieldsListType: dropdown status: opc preSelectFieldMethod: exact displayOneItem: multi indexRemote: - 0 type: item_link order: 10 flags: - link - list - public - mandatory - type: tracker_field ref: work_order_line_items_units data: name: Units permname: woliUnits tracker: $profileobject:work_order_line_items$ options: trackerId: $profileobject:work_price_guide$ filterFieldIdThere: $profileobject:work_price_guide_workDescription$ filterFieldIdHere: > $profileobject:work_order_line_items_workDescription$ listFieldIdThere: $profileobject:work_price_guide_uM$ statusThere: opc hideBlank: 1 type: item_list_dynamic order: 20 flags: - list - searchable - public - type: tracker_field ref: > work_order_line_items_clientPricePerUnit data: name: Price Per Unit (from Client) permname: woliClientPricePerUnit tracker: $profileobject:work_order_line_items$ options: trackerId: $profileobject:work_price_guide$ filterFieldIdThere: $profileobject:work_price_guide_workDescription$ filterFieldIdHere: > $profileobject:work_order_line_items_workDescription$ listFieldIdThere: $profileobject:work_price_guide_clientPricePerUnit$ statusThere: opc hideBlank: 1 type: item_list_dynamic order: 30 flags: - list - searchable - public - type: tracker_field ref: work_order_line_items_overridePriceForClient data: name: Override Price (for Client) permname: woliOverridePriceForClient tracker: $profileobject:work_order_line_items$ options: samerow: 1 size: 7 locale: en_US.UTF-8 currency: USD symbol: i all_symbol: 1 type: currency order: 40 flags: - list - searchable - public - type: tracker_field ref: work_order_line_items_keywordsClient data: name: Override Reason (for Client) permname: woliKeywordsClient tracker: $profileobject:work_order_line_items$ options: samerow: 1 autocomplete: n exact: n type: text_field order: 50 description: > Reason to Override for Client (Keywords), i.e. free text to facilitate aggregating in a later stage the work items with overidden prices to Clients due to a common reason (client, type of work, special promotion, etc.) flags: - list - searchable - public - type: tracker_field ref: > work_order_line_items_contractorPricePerUnit data: name: Price Per Unit (for Contractor) permname: woliContractorPricePerUnit tracker: $profileobject:work_order_line_items$ options: trackerId: $profileobject:work_price_guide$ filterFieldIdThere: $profileobject:work_price_guide_workDescription$ filterFieldIdHere: > $profileobject:work_order_line_items_workDescription$ listFieldIdThere: $profileobject:work_price_guide_contractorPricePerUnit$ statusThere: opc hideBlank: 1 type: item_list_dynamic order: 60 flags: - list - searchable - public - type: tracker_field ref: work_order_line_items_overridePriceForContractor data: name: Override Price (for Contractor) permname: woliOverridePriceForContractor tracker: $profileobject:work_order_line_items$ options: samerow: 1 size: 7 locale: en_US.UTF-8 currency: USD symbol: i all_symbol: 1 type: currency order: 70 flags: - list - searchable - public - type: tracker_field ref: work_order_line_items_keywordsContractor data: name: Override Reason (for Contractor) permname: woliKeywordsContractor tracker: $profileobject:work_order_line_items$ options: samerow: 1 autocomplete: n exact: n type: text_field order: 80 description: > Reason to Override for Contractor (Keywords), i.e. free text to facilitate aggregating in a later stage the work items with overidden prices to Contractors due to a common reason (contractor, type of work, special promotion, etc.) flags: - list - searchable - public - type: tracker_option ref: work_order_line_items_sort_default_field data: tracker: $profileobject:work_order_line_items$ name: sort_default_field value: modification


Modules

YAML
objects: - type: module ref: module_menupage_wcp data: name: menupage params: pagemenu: $wcp_menupage_include groups: - Anonymous - Registered order: 2 position: left


Sample data

In Tracker1: Work orders

YAML
objects: - type: tracker_item ref: wo_001 data: tracker: $Work_Custom_Pricing:work_orders status: open values: - [ $Work_Custom_Pricing:work_orders_WOID, 1 ] - [ $Work_Custom_Pricing:work_orders_name, "Check current status of the abandoned house ABC (The first Work Order: take pics, etc)" ] - [ $Work_Custom_Pricing:work_orders_status, "1-Confirmed by us" ] - [ $Work_Custom_Pricing:work_orders_address, "Avinguda de Vallcarca, 118. Barcelona. Spain" ] - type: tracker_item ref: wo_002 data: tracker: $Work_Custom_Pricing:work_orders status: pending values: - [ $Work_Custom_Pricing:work_orders_WOID, 2 ] - [ $Work_Custom_Pricing:work_orders_name, "Clean the house (from corruption)" ] - [ $Work_Custom_Pricing:work_orders_status, "0-Received from client" ] - [ $Work_Custom_Pricing:work_orders_address, "Calle de Génova, 13, 28004 Madrid" ] - type: tracker_item ref: wo_003 data: tracker: $Work_Custom_Pricing:work_orders status: open values: - [ $Work_Custom_Pricing:work_orders_WOID, 3 ] - [ $Work_Custom_Pricing:work_orders_name, "Extend Rurban Gardens near the farm house XYZ" ] - [ $Work_Custom_Pricing:work_orders_status, "0-Received from client" ] - [ $Work_Custom_Pricing:work_orders_address, "Can Masdéu, 08035 Barcelona" ]


In Tracker2: Work Price Guide

YAML
objects: - type: tracker_item ref: wpg_001 data: tracker: $Work_Custom_Pricing:work_price_guide status: open values: - [ $Work_Custom_Pricing:work_price_guide_workCategory, "Appliance - remove" ] - [ $Work_Custom_Pricing:work_price_guide_workDescription, "Remove old appliances from the abandoned house" ] - [ $Work_Custom_Pricing:work_price_guide_uM, "HRS" ] - [ $Work_Custom_Pricing:work_price_guide_clientPricePerUnit, "20" ] - [ $Work_Custom_Pricing:work_price_guide_contractorPricePerUnit, "10" ] - type: tracker_item ref: wpg_002 data: tracker: $Work_Custom_Pricing:work_price_guide status: open values: - [ $Work_Custom_Pricing:work_price_guide_workCategory, "Carpet - clean" ] - [ $Work_Custom_Pricing:work_price_guide_workDescription, "Clear carpets of each room of the house" ] - [ $Work_Custom_Pricing:work_price_guide_uM, "HRS" ] - [ $Work_Custom_Pricing:work_price_guide_clientPricePerUnit, "30" ] - [ $Work_Custom_Pricing:work_price_guide_contractorPricePerUnit, "15" ] - type: tracker_item ref: wpg_003 data: tracker: $Work_Custom_Pricing:work_price_guide status: open values: - [ $Work_Custom_Pricing:work_price_guide_workCategory, "Fix structures" ] - [ $Work_Custom_Pricing:work_price_guide_workDescription, "Fix wooden fence at the garden" ] - [ $Work_Custom_Pricing:work_price_guide_uM, "HRS" ] - [ $Work_Custom_Pricing:work_price_guide_clientPricePerUnit, "16" ] - [ $Work_Custom_Pricing:work_price_guide_contractorPricePerUnit, "8" ]


In Tracker3: Work Order Line Items

YAML
objects: - type: tracker_item ref: woli_001 data: tracker: $Work_Custom_Pricing:work_order_line_items status: open values: - [ $Work_Custom_Pricing:work_order_line_items_workDescription, $Work_Custom_Pricing:wpg_002 ] - [ $Work_Custom_Pricing:work_order_line_items_units, $Work_Custom_Pricing:wpg_002 ] - [ $Work_Custom_Pricing:work_order_line_items_clientPricePerUnit, $Work_Custom_Pricing:wpg_002 ] - [ $Work_Custom_Pricing:work_order_line_items_overridePriceForClient, "28" ] - [ $Work_Custom_Pricing:work_order_line_items_keywordsClient, "lower price after delay" ] - [ $Work_Custom_Pricing:work_order_line_items_contractorPricePerUnit, $Work_Custom_Pricing:wpg_002 ] - [ $Work_Custom_Pricing:work_order_line_items_overridePriceForContractor, "16" ] - [ $Work_Custom_Pricing:work_order_line_items_keywordsContractor, "special deal 2016 Fall" ] - type: tracker_item ref: woli_002 data: tracker: $Work_Custom_Pricing:work_order_line_items status: open values: - [ $Work_Custom_Pricing:work_order_line_items_workDescription, $Work_Custom_Pricing:wpg_003 ] - [ $Work_Custom_Pricing:work_order_line_items_units, $Work_Custom_Pricing:wpg_003 ] - [ $Work_Custom_Pricing:work_order_line_items_clientPricePerUnit, $Work_Custom_Pricing:wpg_003 ] - [ $Work_Custom_Pricing:work_order_line_items_overridePriceForClient, "15" ] - [ $Work_Custom_Pricing:work_order_line_items_keywordsClient, "lower price after delay" ] - [ $Work_Custom_Pricing:work_order_line_items_contractorPricePerUnit, $Work_Custom_Pricing:wpg_003 ] - [ $Work_Custom_Pricing:work_order_line_items_overridePriceForContractor, "10" ] - [ $Work_Custom_Pricing:work_order_line_items_keywordsContractor, "friends" ] - type: tracker_item ref: woli_003 data: tracker: $Work_Custom_Pricing:work_order_line_items status: open values: - [ $Work_Custom_Pricing:work_order_line_items_workDescription, $Work_Custom_Pricing:wpg_003 ] - [ $Work_Custom_Pricing:work_order_line_items_units, $Work_Custom_Pricing:wpg_003 ] - [ $Work_Custom_Pricing:work_order_line_items_clientPricePerUnit, $Work_Custom_Pricing:wpg_003 ] - [ $Work_Custom_Pricing:work_order_line_items_overridePriceForClient, "12" ] - [ $Work_Custom_Pricing:work_order_line_items_keywordsClient, "campaign to get more clients" ] - [ $Work_Custom_Pricing:work_order_line_items_contractorPricePerUnit, $Work_Custom_Pricing:wpg_003 ] - [ $Work_Custom_Pricing:work_order_line_items_overridePriceForContractor, "7" ] - [ $Work_Custom_Pricing:work_order_line_items_keywordsContractor, "adjusted prices during campaign to get more clients" ]



Wiki pages

Add a page to allow adding items, and the instructions page

This will include: Profile_Work_Custom_Pricing_page

YAML
instructions: Work Custom Pricing Instructions preferences: enable: [ feature_wiki ] objects: - type: wiki_page ref: wcp_page data: name: Work Orders description: Interface to manage work orders lang: en mode: create_or_update content: wikicontent:Profile_Work_Custom_Pricing_page - type: wiki_page ref: wcp_instructions_page data: name: Work Custom Pricing Instructions description: Instructions on how to use this profile lang: en mode: create_or_update content: wikicontent:Profile_Work_Custom_Pricing_instructions_page - type: wiki_page ref: wcp_menupage_include data: name: Menu from WCP description: Custom Wiki Menu for the Work Custom Pricing Profile lang: en mode: create_or_update content: wikicontent:Profile_Work_Custom_Pricing_menupage_include



History

Advanced
Information Version
Sat 15 of Oct, 2016 02:00 GMT-0000 Xavier de Pedro removed fgal id for teh time being since the profile doesn't succeed due to some issue with file gals: PHP Warning: preg_match() expects parameter 2 to be string, object given in /var/www/html/16.x/l 60
Sat 15 of Oct, 2016 02:00 GMT-0000 Xavier de Pedro removed fgal id for teh time being since the profile doesn't succeed due to some issue with file gals: PHP Warning: preg_match() expects parameter 2 to be string, object given in /var/www/html/16.x/l 59
Sat 15 of Oct, 2016 01:54 GMT-0000 Xavier de Pedro fixed case issues 58
Sat 15 of Oct, 2016 01:49 GMT-0000 Xavier de Pedro many fixes to the woli tracker (I need some sleep indeed) 57
Sat 15 of Oct, 2016 01:37 GMT-0000 Xavier de Pedro added file gallery and fixed references to it 56
Sat 15 of Oct, 2016 01:30 GMT-0000 Xavier de Pedro updated the WOLI tracker with more fields, re-sorted, sections, etc. TODO: create a file gallery and ref to it properly in the new fields here 55
Thu 06 of Oct, 2016 20:41 GMT-0000 Xavier de Pedro added searchable to many fields and remove from list by default the non critical ones 54
Thu 06 of Oct, 2016 20:37 GMT-0000 Xavier de Pedro namings 53
Thu 06 of Oct, 2016 20:27 GMT-0000 Xavier de Pedro shortened names 52
Thu 06 of Oct, 2016 20:22 GMT-0000 Xavier de Pedro added feature to edit inline tracker item fields 51
Thu 06 of Oct, 2016 19:56 GMT-0000 Xavier de Pedro added some addresses for the wo 50
Thu 06 of Oct, 2016 13:30 GMT-0000 Xavier de Pedro fixed dynamic reference to the corresponding dynamic item field matching values 49
Thu 06 of Oct, 2016 13:28 GMT-0000 Xavier de Pedro testing a hypothesis 48
Thu 06 of Oct, 2016 13:27 GMT-0000 Xavier de Pedro fixed wrong reference to the needed tracker for the units to work in woli (thanks kroky6) 47
Thu 06 of Oct, 2016 13:19 GMT-0000 Xavier de Pedro converted values for item link from hardcoded strings to the dynamic references to the values in the other tracker 46
Thu 06 of Oct, 2016 13:14 GMT-0000 Xavier de Pedro everything is fine 45
Thu 06 of Oct, 2016 13:04 GMT-0000 Xavier de Pedro typos 44
Thu 06 of Oct, 2016 13:02 GMT-0000 Xavier de Pedro fixed missnaming of keywords fields 43
Thu 06 of Oct, 2016 12:59 GMT-0000 Xavier de Pedro added a few items for tracker3 42
Thu 06 of Oct, 2016 12:26 GMT-0000 Xavier de Pedro added a few changes based on the new fields to be used 41
Thu 06 of Oct, 2016 11:29 GMT-0000 Xavier de Pedro added field wpg_client price per unit 40
Thu 06 of Oct, 2016 11:15 GMT-0000 Xavier de Pedro take 4 to fix module 39
Thu 06 of Oct, 2016 11:05 GMT-0000 Xavier de Pedro changed the way we call the menupage 38
Thu 06 of Oct, 2016 11:02 GMT-0000 Xavier de Pedro change position 37
Thu 06 of Oct, 2016 11:00 GMT-0000 Xavier de Pedro added link to menu page 36