","selectedCurrencyFilter":null,"footerCellFilter":null,"validators":{"required":true},"allowCellFocus":true,"enableCellEditOnFocus":true,"enableSorting":false,"delete":false,"cellEditableCondition":true,"editableCellTemplate":"ui-grid/cellEditor"},{"name":"Expense_Type","width":"300","type":"MultiChoiceSelectList","enableCellEdit":true,"id":"gridcol-1525702331870","cellTemplate":"","selectedCurrencyFilter":null,"footerCellFilter":null,"question":{"disabled":false,"SelectedValue":null,"Answer":null,"dbSettings":{"useDB":false},"show":true,"class":"gridSelectList","ClientID":"","flex":100,"multiple":false,"Choices":[{"Label":"Transportation (Airline Tickets, Rental Car, UBER, Taxi, Parking, Tolls)","Value":"Transportation","showEditPanel":false},{"Label":"Meals","Value":"Meals","showEditPanel":false},{"Label":"Customer Entertainment","Value":"Entertainment","showEditPanel":false},{"Label":"Office & Computer Supplies","Value":"Supplies","showEditPanel":false},{"Label":"Other","Value":"Other","showEditPanel":false}],"Label":"Expense_Type","QuestionType":"MultiChoiceSelectList"},"validators":{"required":true},"allowCellFocus":false,"enableCellEditOnFocus":false,"enableSorting":false,"delete":false,"editableCellTemplate":"","cellEditableCondition":true},{"name":"Amount","width":"150","type":"currency","enableCellEdit":true,"id":"gridcol-1525702495956","customCellClass":"","headerCellClass":"","cellTemplate":" {{grid.getCellValue(row, col) | intCurrency:\"en-us\"}}","selectedCurrencyFilter":"en-us","footerCellFilter":"intCurrency:\"en-us\"","aggregationType":2,"validators":{"required":true},"allowCellFocus":true,"enableCellEditOnFocus":true,"enableSorting":false,"delete":false,"cellEditableCondition":true,"editableCellTemplate":"ui-grid/cellEditor"},{"name":"Receipt","width":"300","type":"FileAttachment","enableCellEdit":true,"id":"gridcol-1525713904967","cellTemplate":"","selectedCurrencyFilter":null,"footerCellFilter":null,"question":{"QuestionType":"FileAttachment","Label":"File Attachment: ","flex":100,"ClientID":"","class":"gridFileAttachment","show":true,"Answer":[],"events":{"onChange":null}},"validators":{"required":false},"allowCellFocus":false,"enableCellEditOnFocus":false,"enableSorting":false,"delete":false,"cellEditableCondition":true,"editableCellTemplate":"ui-grid/cellEditor"}],"maxHeight":350,"rowsSpecified":0,"minRowsToShow":"4","enableSorting":true,"enableFiltering":false,"enableCellEditOnFocus":false,"enableCellEdit":true},"Answer":null,"show":true,"class":"","ClientID":"grdDynamicGrid","flex":100,"type":"Question_Type","Label":"Dynamic Grid","QuestionType":"Grid","displayName":"Grid"},{"hidden":false,"stopBlurSave":false,"islive":false,"originalAnswer":null,"isdirty":false,"loaded":true,"showEditPanel":false,"id":1525789250935,"new":false,"Answer":null,"format":{"currency":{"id":"en-us","useCurrency":true},"digitsAfterDecimal":2},"events":{"onFocus":null,"onBlur":null,"onChange":null},"validation":{"regExMessage":"This field is not valid","regEx":null,"maxMessage":"This field is too long","max":null,"minMessage":"This field is too short","min":null,"requiredMessage":"This field is required","required":false},"show":true,"class":"","ClientID":"numHiddenTotalExpenses","flex":100,"type":"Question_Type","Label":"Hidden_Total_Expenses (for start rules, notifications, reports)","QuestionType":"Number","displayName":"Number"},{"stopBlurSave":true,"showEditPanel":false,"islive":false,"ClientID":1525724771946,"id":1525724771946,"isdirty":false,"loaded":true,"events":{"onFocus":null,"onBlur":null,"onChange":null},"new":true,"show":true,"type":"FormTool_Type","formtext":"
\nSubtotals by Expense Category
\n
","QuestionType":"FormText","displayName":"Form Text"}]}],"icon":"crop_square","displayName":"Container"},{"showEditPanel":false,"new":true,"ClientID":"1525724421511c","id":"1525724421511c","type":"Container_Type","show":true,"open":true,"readonly":false,"columns":[{"items":[{"readonly":true,"stopBlurSave":false,"islive":false,"originalAnswer":null,"isdirty":false,"loaded":true,"showEditPanel":false,"id":1525724444553,"new":false,"Answer":null,"format":{"currency":{"id":"en-us","useCurrency":true},"digitsAfterDecimal":2},"events":{"onFocus":null,"onBlur":null,"onChange":null},"validation":{"regExMessage":"This field is not valid","regEx":null,"maxMessage":"This field is too long","max":null,"minMessage":"This field is too short","min":null,"requiredMessage":"This field is required","required":false},"show":true,"class":"","ClientID":"numTransportation","flex":100,"type":"Question_Type","Label":"Transportation","QuestionType":"Number","displayName":"Number"}]},{"items":[{"readonly":true,"stopBlurSave":false,"islive":false,"originalAnswer":null,"isdirty":false,"loaded":true,"showEditPanel":false,"id":1525724568168,"new":false,"Answer":null,"format":{"currency":{"id":"en-us","useCurrency":true},"digitsAfterDecimal":2},"events":{"onFocus":null,"onBlur":null,"onChange":null},"validation":{"regExMessage":"This field is not valid","regEx":null,"maxMessage":"This field is too long","max":null,"minMessage":"This field is too short","min":null,"requiredMessage":"This field is required","required":false},"show":true,"class":"","ClientID":"numMeals","flex":100,"type":"Question_Type","Label":"Meals","QuestionType":"Number","displayName":"Number"}]},{"items":[{"readonly":true,"stopBlurSave":false,"islive":false,"originalAnswer":null,"isdirty":false,"loaded":true,"showEditPanel":false,"id":1525724618514,"new":false,"Answer":null,"format":{"currency":{"id":"en-us","useCurrency":true},"digitsAfterDecimal":2},"events":{"onFocus":null,"onBlur":null,"onChange":null},"validation":{"regExMessage":"This field is not valid","regEx":null,"maxMessage":"This field is too long","max":null,"minMessage":"This field is too short","min":null,"requiredMessage":"This field is required","required":false},"show":true,"class":"","ClientID":"numEntertainment","flex":100,"type":"Question_Type","Label":"Customer Entertainment","QuestionType":"Number","displayName":"Number"}]},{"items":[{"hidden":false,"readonly":true,"stopBlurSave":false,"islive":false,"originalAnswer":null,"isdirty":false,"loaded":true,"showEditPanel":false,"id":1525724642224,"new":false,"Answer":null,"format":{"currency":{"id":"en-us","useCurrency":true},"digitsAfterDecimal":2},"events":{"onFocus":null,"onBlur":null,"onChange":null},"validation":{"regExMessage":"This field is not valid","regEx":null,"maxMessage":"This field is too long","max":null,"minMessage":"This field is too short","min":null,"requiredMessage":"This field is required","required":false},"show":true,"class":"","ClientID":"numSupplies","flex":100,"type":"Question_Type","Label":"Supplies","QuestionType":"Number","displayName":"Number"}]},{"items":[{"readonly":true,"stopBlurSave":false,"islive":false,"originalAnswer":null,"isdirty":false,"loaded":true,"showEditPanel":false,"id":1525724695372,"new":false,"Answer":null,"format":{"currency":{"id":"en-us","useCurrency":true},"digitsAfterDecimal":2},"events":{"onFocus":null,"onBlur":null,"onChange":null},"validation":{"regExMessage":"This field is not valid","regEx":null,"maxMessage":"This field is too long","max":null,"minMessage":"This field is too short","min":null,"requiredMessage":"This field is required","required":false},"show":true,"class":"","ClientID":"numOther","flex":100,"type":"Question_Type","Label":"Other","QuestionType":"Number","displayName":"Number"}]}],"displayName":"Container"}],"showSectionOutline":true,"showAsCollapsible":true,"icon":"crop_square","Label":"Employee Reimbursement Form","displayName":"Section"},{"displayName":"Section","Label":"Reimbursement & Expense Comments","showAsCollapsible":true,"showSectionOutline":true,"contents":[{"displayName":"Container","icon":"crop_square","columns":[{"items":[{"displayName":"Radio Buttons","QuestionType":"DbRadioButton","Label":"Preferred Method of Reimbursement","Choices":[{"Label":"ACH","Value":"ACH","showEditPanel":false},{"Label":"Check Mailed To Home Address on Record","Value":"Check Mailed To Home Address on Record","showEditPanel":false},{"Label":"Check Picked Up In Finance Office","Value":"Check Picked Up In Finance Office","showEditPanel":false}],"columnOrRow":"row","type":"Question_Type","flex":100,"ClientID":1530028293106,"class":"","show":true,"dbSettings":{"useDB":false},"validation":{"required":false,"requiredMessage":"This field is required","min":null,"minMessage":"This field is too short","max":null,"maxMessage":"This field is too long","regEx":null,"regExMessage":"This field is not valid"},"events":{"onChange":null,"onBlur":null,"onFocus":null},"Answer":null,"new":false,"id":1530028293106,"showEditPanel":false,"loaded":true,"isdirty":false,"originalAnswer":null,"islive":false,"stopBlurSave":false},{"displayName":"Long Text","QuestionType":"LongText","Label":"Enter Comments Here","type":"Question_Type","flex":100,"ClientID":1530026870297,"class":"","show":true,"validation":{"required":false,"requiredMessage":"This field is required","min":null,"minMessage":"This field is too short","max":null,"maxMessage":"This field is too long","regEx":null,"regExMessage":"This field is not valid"},"events":{"onChange":null,"onBlur":null,"onFocus":null},"Answer":null,"new":false,"id":1530026870297,"showEditPanel":false,"loaded":true,"isdirty":false,"originalAnswer":null,"islive":false,"stopBlurSave":false}]}],"readonly":false,"open":true,"show":true,"type":"Container_Type","id":"1530026834807c","ClientID":"1530026834807c","new":true,"showEditPanel":false}],"readonly":false,"type":"Section_Type","ClientID":"1530026834807s","id":"1530026834807s","class":"","expandOnLoad":true,"open":true,"show":true,"ui":{"backgroundColor":"#757575","textColor":"#000"},"new":true,"showEditPanel":false,"displayLabel":"Reimbursement & Expense Comments"}],"_id":"5b5f8193bba304146457505a","name":"Employee Reimbursement Form","sid":"ff9d2a25-cf09-42be-9467-fe8c62f6d52e","categorySid":"dd75c996-57e1-49d5-bed6-02d734bfd4bf","isTemplate":false,"rules":[],"css":".currency {\n text-align: right !important;\n}\n.highlighted {\n background-color: lightyellow !important;\n}","script":"/*******************************************************************************\r\n *\r\n * Global Variables to Support Programmatic Access to Questions & Components\r\n *\r\n * ****************************************************************************/\r\nvar grdDynamicGrid = intForm.getElementByClientID('grdDynamicGrid');\r\nvar numHiddenTotalExpenses = intForm.getElementByClientID('numHiddenTotalExpenses');\r\nvar numTransportation = intForm.getElementByClientID('numTransportation');\r\nvar numMeals = intForm.getElementByClientID('numMeals');\r\nvar numEntertainment = intForm.getElementByClientID('numEntertainment');\r\nvar numSupplies = intForm.getElementByClientID('numSupplies');\r\nvar numOther = intForm.getElementByClientID('numOther');\r\n\r\n/*******************************************************************************\r\n *\r\n * Initialize expense total and subtotals to zero if not prefilled\r\n *\r\n * ****************************************************************************/\r\nif (numHiddenTotalExpenses.Answer === null) numHiddenTotalExpenses.Answer = 0;\r\nif (numTransportation.Answer === null) numTransportation.Answer = 0;\r\nif (numMeals.Answer === null) numMeals.Answer = 0;\r\nif (numEntertainment.Answer === null) numEntertainment.Answer = 0;\r\nif (numSupplies.Answer === null) numSupplies.Answer = 0;\r\nif (numOther.Answer === null) numOther.Answer = 0;\r\n\r\n/*******************************************************************************\r\n *\r\n * Apply Class for Right Formatting to Currency Column\r\n * \r\n * NOTE: Because as of 6/25/2018, only the first \"header\" can be successfully\r\n * assigned in the User Inteface. Issue reported, so this JS is a work-around\r\n * \r\n * ****************************************************************************/\r\ngrdDynamicGrid.gridOptions.columnDefs[3].headerCellClass = \"currency highlighted\";\r\ngrdDynamicGrid.gridOptions.columnDefs[3].footerCellClass = \"currency highlighted\"; \r\ngrdDynamicGrid.gridOptions.columnDefs[3].cellClass = \"currency\";\r\ngrdDynamicGrid.refreshGrid();\r\n\r\n/*******************************************************************************\r\n *\r\n * When Dynamic Grid is Changed, access row / column data as needed\r\n *\r\n * NOTE: Use underscores instead of spaces for names of grid columns you wish to\r\n * access via dot-notation. Underscores will be replaced with spaces in column\r\n * headings that appear, except in the pop-up dialog associated with [ADD ROW]\r\n *\r\n * ****************************************************************************/\r\ngrdDynamicGrid.events.onChange = function() {\r\n //\r\n // Initialize Total and Subtotals\r\n //\r\n numHiddenTotalExpenses.Answer = 0;\r\n\r\n numTransportation.Answer = 0;\r\n numMeals.Answer = 0;\r\n numEntertainment.Answer = 0;\r\n numSupplies.Answer = 0;\r\n numOther.Answer = 0;\r\n //\r\n // Loop through any rows in grid\r\n //\r\n for (var i = 0; i < grdDynamicGrid.Answer.length; i++) {\r\n //\r\n // If Employees_Covered is null, default to 1\r\n //\r\n if (grdDynamicGrid.Answer[i].Employees_Covered === null)\r\n grdDynamicGrid.Answer[i].Employees_Covered = 1;\r\n //\r\n // Grab Amount in Row\r\n //\r\n var amount = 0;\r\n if (grdDynamicGrid.Answer[i].Amount !== null)\r\n amount = parseFloat(grdDynamicGrid.Answer[i].Amount); // parseFloat prevents concatenate\r\n //\r\n // Apply Amount to Hidden Total & Appropriate Expense Type Subtotal\r\n //\r\n numHiddenTotalExpenses.Answer += amount;\r\n if (grdDynamicGrid.Answer[i].Expense_Type.Answer === 'Transportation')\r\n numTransportation.Answer += amount;\r\n else if (grdDynamicGrid.Answer[i].Expense_Type.Answer === 'Meals')\r\n numMeals.Answer += amount;\r\n else if (grdDynamicGrid.Answer[i].Expense_Type.Answer === 'Entertainment')\r\n numEntertainment.Answer += amount;\r\n else if (grdDynamicGrid.Answer[i].Expense_Type.Answer === 'Supplies')\r\n numSupplies.Answer += amount;\r\n else if (grdDynamicGrid.Answer[i].Expense_Type.Answer === 'Other')\r\n numOther.Answer += amount;\r\n }\r\n\r\n} // end of grdDynamicGrid onChange\r\n\r\n// Helpful Statements for Console Exposure of the Grid Object \r\n// console.clear();\r\n// console.log(JSON.stringify(grdDynamicGrid, undefined, 2));","createdDate":"2018-06-25T20:02:37.849Z","__v":0,"modifiedDate":"2018-07-30T21:33:09.066Z"} ]]>