{"version":3,"sources":["1initializers.js","2helpers.js","budgetlineitemviews.js","budgetmodels.js","budgetmodificationviews.js","budgetviewsviews.js","bulkeditlineitemsview.js","changerequests/1initializers.js","changerequests/changerequestdatatables.js","changerequests/changerequesteditviews.js","changerequests/changerequestlistviews.js","changerequests/changerequestmanagementviews.js","changerequests/changerequestmodels.js","changerequests/changerequestsettingsviews.js","costcodeviews.js","costtypeviews.js","erpadmin/1initializers.js","erpadmin/erpadminmodels.js","erpadmin/erpadminviews.js","financialmarkups/financialmarkups.js","forecastviews.js","integrations/1initializers.js","integrations/integrations.js","integrations/settings.js","lineitemviews.js","productionquantities/1initializers.js","productionquantities/productionquantitiesaddviews.js","productionquantities/productionquantitiesdatatables.js","productionquantities/productionquantitieseditviews.js","productionquantities/productionquantitieslistviews.js","productionquantities/productionquantitiesmodels.js","projectbudgetview.js","rfq/1initializers.js","rfq/rfqbatchviews.js","rfq/rfqdatatables.js","rfq/rfqeditviews.js","rfq/rfqlistviews.js","rfq/rfqmodels.js","rfq/rfqresponseviews.js","settingsmodels.js","subjobviews.js","taxcodeviews.js"],"names":["PJQ","collections","budget","models","views","constants","accountingMethod","AMOUNT","UNIT_QUANTITY","modules","routes","route","name","callback","app","initNavigator","activeItem","projectId","projectWall","initProjectNavigator","parseInt","addRoutes","helpers","costCodes","getDivisionSortValue","division","_","size","toLowerCase","numsOnly","formatHelpers","numbersOnly","num","isNaN","sortDivisions","divisions","sortBy","erp","renderERPButtons","$el","options","_this","this","html","defaults","pushSupported","canPush","canPushChanges","disablePushReason","pullSupported","canPull","disablePullReason","canUnlink","unlinkSupported","canLink","linkSupported","isStale","status","integrations","syncStatuses","STALE","isPending","PENDING","isReviewing","REVIEWING","isApproved","APPROVED","isFailed","FAILED","isSynced","SYNCED","isRejected","REJECTED","templating","TemplateRenderer","parseMarkup","empty","pulling","isPulling","pullingLoader","Loader","find","loadingText","remove","pushing","isPushing","pushingLoader","unlinking","isUnlinking","unlinkLoader","getERPIcon","iconClass","colorClass","syncStatusDescriptions","getERPBadge","externalObject","badgeClass","badgeIcon","text","title","data","externalNumber","rejectReason","error","budgetHelpers","columnTypes","SOURCE","CALCULATED","columnFormats","MONEY","PERCENT","INTEGER","getColumnSources","def","columnSources","session","erpIntegration","union","map","getBudgetColumns","col","extend","isErp","source","canCalculate","format","isSource","AddBudgetLineItemsModal","BaseModal","template","Template","BUDGET","width","maxWidth","isShowCloseButton","onSave","noop","isAdmin","events","click .go-to-cost-codes","click .btn-save","click .btn-cancel","beforeModalCreated","_beforeModalCreated","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","collection","LineItems","project","isFetched","fetchCostCodes","sent","fetchCostTypes","costTypes","fetchUnitsOfMeasure","unitsOfMeasure","render","stop","apply","arguments","renderData","afterRender","renderLineItemsView","lineItemsView","LineItemsView","el","$","lineItemModel","LineItem","canEdit","canDelete","canChangeAccountingMethod","isBudget","onAccountingMethodChanged","bind","value","onLineItemAdd","onLineItemDelete","importLineItems","$uploader","fileUploader","files","FileUploaderGrid","useApiV2","allowedExtensions","maxFiles","style","onSuccess","file","loader","uploadId","processImport","add","renderLineItems","attr","goToCostCodes","router","navigate","id","toString","trigger","removeModal","save","validate","addLineItems","cancel","modals","SaveDontSave","header","body","onDontSave","EditLineItemBudgetModal","focus .input-dollars-full,.input-percent,.input-hours","keyup .input-quantity, .input-unit-price","fetchSubJobs","subJobs","model","Binder","watchElements","useDecimalPercentFields","inputHelpers","inputMaskDecimal","inputs","Selectpicker","defaultValue","get","isIntChoices","onChange","setAccountingMethod","unitOfMeasureSelector","hideDisabled","inputMaskCurrency","calculateUnitTotal","selectInput","e","currentTarget","focusInput","setTimeout","select","unitPrice","getMoneyInputValue","parent","quantity","parseFloat","val","formatCurrency","method","set","budgetedCost","unitId","getValue","$hours","Math","ceil","success","restore","BaseLineItem","BaseModel","isAPIv2","idAttribute","getTaxAmount","taxRate","taxable","round","getUnRoundedTaxAmount","resetMarkup","markupAmount","verticalMarkupAmount","horizontalMarkupAmount","markupValues","getMarkupAmount","financialMarkups","_result","_this2","length","undefined","values","markupVals","getMarkups","hAmount","vAmount","each","mVal","cid","amount","isVertical","isApplied","markup","result","vertical","horizontal","getAmountRemaining","getGrandTotal","getRetainage","getRetainageReleased","getSubTotal","_options$lineItems","_this3","totalMarkups","lineItems","_markup$get","_markup$get2","findWhere","markupCostCodes","markupCostTypes","filteredLineItems","filter","li","lineItemId","includes","_markup$get3","isAppliedLI","liAmount","changeRequests","ChangeRequestLineItem","costs","revenue","silent","_this$get","_this$get2","isAppliedLineItem","_this$get3","endpoint","urlHelpers","generateEndpoint","parse","erpSyncStatus","exObj","lastSync","Date","ForecastLineItem","budgetId","Budget","ajax","Request","post","done","notifications","notify","successNotify","message","merge","fail","errorNotify","fetchForView","viewId","updateLocked","isLocked","startLocked","toJSON","patch","makeERPUrl","integration","externalId","BudgetModification","SubJob","CostCode","getDisplayName","syncERP","res","xhr","err","unlinkERP","responseJSON","type","TaxCode","CostType","UnitOfMeasure","BillingPeriodSettings","params","push","parameter","billingPeriods","BillingPeriods","afterSave","BillingPeriod","BudgetView","columns","ViewColumns","beforeSave","column","sources","calculations","ViewColumn","ViewColumnCalculations","ViewColumnCalculation","TaxCodes","BaseCollection","SubJobs","CostTypes","CostCodes","hasDivisions","costCode","getForDivision","dSearch","c","div","getDivisions","uniq","_costCode$get","endpointArr","saveBulk","subJobId","pushERP","objectHelpers","refinedType","cc","deleteAll","delete","UnitsOfMeasure","BudgetModifications","ForecastLineItems","BudgetViews","Snapshots","AddBudgetModificationsModal","subTemplates","modification","click .btn-add-modification","_beforeModalCreated2","_callee2","_context2","_this4","lineItemChoices","item","costType","choice","addModification","fromLineItemId","toLineItemId","notes","renderModification","renderSubTemplate","fromSelect","choices","noneSelectedText","isLiveSearch","toSelect","fnRender","ViewBudgetModificationsModal","lineItem","fetch","fnLineItemRow","row","filteredData","dataTables","DataTable","rowId","paging","order","language","zeroRecords","minWidth","extraClasses","BudgetsViewsEditorModal","columnEditorEmpty","maxHeight","onDelete","click .btn-create-view","click .budget-view-option","click .btn-return","click .btn-edit-columns","click .budget-view-column","click .btn-delete-column","click .create-source","click .create-calculated","click .edit-view","click .delete-view","click .set-default-view","modes","CREATE","EDIT","VIEW","blankView","description","companyId","budgetViews","mode","budgetView","renderViewMode","renderEditMode","renderCreateMode","renderColumns","renderColumnConfiguration","templateColumnTable","isHideSearch","scrollY","scrollCollapse","dataTable","onRowDoubleClick","editView","contextMenuOptions","actions","isShown","onClick","setViewIsDefault","isDanger","deleteView","orderable","icons","join","searchable","setModalWidth","animate","createView","isDefault","defaultViewClicked","target","view","getRow","closest","currentDefault","refresh","editViewClicked","isNew","viewBudgetViews","hasChanged","saveView","changeTemplate","deleteViewClicked","destroy","columnsSorted","cancelColumnEdit","columnsChanged","deleteColumn","stopPropagation","$target","$item","editColumnClicked","removeClass","addClass","editColumn","columnsSortable","Sortable","items","connectWith","onStop","columnEditor","$editor","$menuItem","ViewColumnEditor","onNameChange","createSourceColumn","createCalculatedColumn","isValid","markInvalid","calc","index","BaseView","calculation","keyup .view-name","click .btn-add-calculation","click .btn-remove-calculation","beforeFirstRender","fetchERPIntegration","focus","renderCalculations","colSource","src","nameChanged","isMultiple","statuses","addCalculation","renderCalculation","$calc","deleteCalculation","BulkEditLineItemsModal","enableStoredMaterials","enableRetainage","_this5","attribute","unset","inputMaskPercent","_this6","attributes","key","changeRequestId","rfqId","ChangeRequestDataTable","emptyTable","toggleRowClass","onViewChangeRequest","click .btn-view-change-request","click .btn-view-prime-contract","click .btn-view-pcco","click .btn-view-commitment","click .btn-view-cco","click .select-line-item","click .select-all-line-items","click .btn-new-pcco","click .btn-new-cco","click .btn-new-commitment","click .btn-send-rfq","click .btn-existing-cco","click .btn-existing-pcco","click .btn-existing-commitment","beforeDataTableRender","_this$options$project","pageLength","settings","rowsPerPage","canAddCommitments","hasPermission","canViewCommitments","canAddCommitmentChangeOrders","canAddContractChangeOrders","canViewPrimeContracts","companySettings","rowCallback","getDefaultFilter","userSettings","afterSearch","afterHeaderRender","_this7","filterChoices","filterType","STATUS_FILTER","changeRequestStatus","changeRequestStatusNames","OTHER_FILTER","isGrouped","statusFilter","otherFilter","setFilter","getFilterData","getFilter","contains","costNotAttached","revenueNotAttached","canAttachLineItemCost","canAttachLineItemRevenue","createdRow","eq","slice","hide","getColumns","includeAllColumns","columnData","some","concat","expandedItems","expandAll","_this8","isSelected","selectedLineItems","every","toggleRow","checkbox","erpIcon","primeContractId","scopeNames","className","visible","includeColumns","customFields","customField","columnsDefault","defaultContent","columnName","dateHelpers","getDateString","dateFormats","DATE_TIME","titleSettings","companyName","_PJQ$constants$change","startsWith","fieldValue","getCustomFieldValue","commitments","customFieldType","BOOLEAN","CHOICE","DATE","DATETIME","toLocaleString","toFixed","getLineItemColumns","_this$options$subJobs","_this$options$costCod","_this$options$costTyp","_vendor$companyName","vendor","commitmentId","ccoId","pccoId","changeRequest","scope","INTERNAL","toggleAllChildRows","self","expand","expandedRowIds","rows","toggleChildRow","renderToggleAllIcon","selectLineItem","_this9","parentCid","$selectAllToggle","cr","isChecked","prop","reject","sCid","updateBulkActionsButton","selectAllLineItems","nonAppliedLines","nonAppliedCids","difference","tr","_this10","bulkActionsButton","contractsSubmenu","commitmentsSubmenu","addCCOButton","addSubcontractButtons","sendRFQButton","compact","canSendRFQ","allPrimeContractIdsMatch","array","canAttachCosts","canAttachRevenue","newCommitment","_this11","commitmentType","hasClass","PURCHASE_ORDER","SUBCONTRACT","selLineItems","flatten","vendors","vendorIds","changeRequestLineItemId","liVendor","indexOf","CommitmentEditModal","fromChangeRequest","contractedContact","commitment","onCreateFromLineItems","newCommitmentChangeOrder","_this12","_onSave","commitmentIds","getSelectedCommitmentIds","selCommitmentId","SelectCommitmentsModal","isSingleChoice","selectedCommitmentId","filterStatuses","commitmentStatus","headerSubText","_callee3","_context3","abrupt","ChangeOrderEditModal","changeOrder","_x","_getSelectedCommitmentIds","_callee4","_this13","_context4","sendRFQs","_sendRFQs","_callee5","projectCommitments","fnSendRFQ","lineItemCt","rfqItemsCt","_this14","_context5","Commitments","withLineItems","rfq","RFQBatchModal","YesNo","onYes","isShowOkButton","okButtonText","onOk","isShowSecondaryButton","secondaryButtonColorClass","secondaryButtonText","onSecondary","_x2","newContractChangeOrder","_newContractChangeOrder","_callee6","primeContract","_this15","_context6","primeContracts","PrimeContract","_x3","addToExistingCommitment","_this16","_onSave2","DRAFT","PURCHASE_ORDER_PROCESSING","SUBCONTRACT_OUT_FOR_BID","OUT_FOR_SIGNATURE","SUBMITTED","PURCHASE_ORDER_PARTIALLY_RECEIVED","PURCHASE_ORDER_RECEIVED","_callee7","_context7","_x4","addToExistingCommitmentChangeOrder","_onSave3","_this17","SelectCommitmentChangeOrdersModal","changeOrderStatus","NO_CHARGE","IN_REVIEW","NOT_PRICING","PRICING","NOT_PROCEEDING","PROCEEDING","REVISED","_callee8","_context8","changeOrderId","_x5","addToExistingContractChangeOrder","_onSave4","_this18","SelectChangeOrdersModal","_callee9","_context9","_x6","viewCommitmentClicked","viewCommitment","Commitment","viewCommitmentChangeOrderClicked","viewCommitmentChangeOrder","ChangeOrder","getRowChildData","_this19","getRowChildColumns","onChildRowToggle","node","preserveScrollRender","scrollTop","window","viewChangeRequestClicked","invoice","viewPrimeContractClicked","viewPrimeContract","PrimeContractEditModal","viewPrimeContractChangeOrderClicked","viewPrimeContractChangeOrder","ChangeRequestEditModal","click .btn-add-line-item","click .btn-close","click .btn-submit","click .btn-save-email","click .btn-delete","click .btn-push-erp","click .btn-undo-push-erp","click .btn-unlink-erp","click .btn-export","click .btn-export-costs","click .btn-export-revenue","click .btn-email","click .nav-link","click .btn-view-rfq","_beforeModalCreated3","_callee10","customFieldValues","_this20","_context10","fetchChangeRequestSettings","fetchChangeRequestCustomFields","getSetting","fetchERPObject","fieldNumber","fieldTypeId","fieldType","ChangeRequest","primeContractNumber","client","clientId","statusId","markupItems","markupItem","costCodeId","costTypeId","beforeRender","canAdd","canEditLineItems","canViewRFQs","canEditStatus","fnGetGreaterStatuses","st","VOID","disabledStatuses","isERPSynced","syncStatus","activeView","checkFieldVisible","checkFieldRequired","_this21","activateView","stopListening","listenTo","renderERP","renderGeneral","renderMarkups","updateCounts","GENERAL","LINEITEMS","MARKUPS","RFQ","activeViewChanged","hash","replace","renderRFQ","tab","_this$model$get","_this$model$get2","_this22","disabled","statusPicker","newStatus","dirtyAttributes","revenueSource","REVENUE","revenueSourceNames","MANUAL","refreshLineItems","OWNER_CHANGE","contractCompanyPicker","contacts","ContactsSelectInput","selectedContact","displayContactsBlock","customFieldsForm","CustomFieldsForm","isEdit","fieldValues","isDirty","attachments","canUpload","previewImageDimension","attachment","showRevenue","showMarkup","copyCostToRevenue","renderLineItemsTable","_this23","canApplyChangeRequestCosts","canApplyChangeRequestRevenue","enableSelection","showSubTotal","showGrandTotal","onLineItemChange","onChangeOrderView","onCommitmentView","onSendRFQ","requests","selectedIds","markupsView","FinancialMarkupsList","_this24","fetchRFQs","then","rfqDataTable","_row$contractedContac","_row$contractedContac2","rfqStatusNames","dom","viewRFQ","RFQEditModal","addRow","onRFQAdd","newRFQ","viewRFQClicked","$erp","hasAvailableAction","PUSH_CHANGE_REQUESTS","pushChangeRequest","undoPushERP","undoPush","unlinkChangeRequest","fieldName","coreFieldSettings","fieldSettings","exportRevenue","export","exportCosts","exportClicked","_this25","withRevenue","withCosts","downloadFile","saveEmail","email","savePush","_this26","submitChangeRequest","submit","saveChangeRequest","_this27","setInputError","$description","clearError","showError","newMarkupLines","getChanged","deleteChangeRequest","hasAssociatedLineItems","DeleteCancel","_this$options$project2","_this$options$project3","projectName","trim","subject","ComposeEmailModal","share","close","ChangeRequestsList","totals","click .btn-settings","click .btn-add-change-request","click .btn-delete-change-request","_beforeFirstRender","_callee11","_context11","ChangeRequests","groupId","fetchChangeRequestUserSettings","hideHeader","renderView","off","on","initChangeRequest","viewChangeRequest","renderStats","$totals","getTotalAmountsByStatus","pending","changeRequestStatusBuckets","projected","PROJECTED","approved","getDataTableInstance","_onCreateFromLineItems","_this28","orderCookie","cookies","CHANGE_REQUEST_ORDER_COOKIE","headerData","isStandardListView","getSettings","CHANGE_REQUESTS","colReorder","fixedColumnsLeft","fixedColumnsRight","realtime","columnOrderChanged","_callee12","_context12","resetData","_x7","exportChangeRequestList","cookieHelpers","getCookie","JSON","Array","isArray","changeTerms","createdOn","client.companyName","reports","NewReport","reportTypes","CHANGE_REQUEST","columnOrder","addChangeRequest","SelectPrimeContractsModal","primeContractStatus","contract","deleteChangeRequestClicked","removeRow","editSettings","ChangeRequestSettingsModal","changeRequestsView","SelectChangeRequestsModal","change .select-change-request","selectedChangeRequests","isNumber","selectChangeRequest","not","selectedChangeRequest","dtChangeRequest","onChangeRequestSelected","selChangeRequest","onCancel","ChangeRequestManagement","changeRequestTotals","shown.bs.tab .nav-tabs","canViewChangeRequests","rfqs","rfqView","activateTab","renderRFQView","renderChangeRequestsView","isActivating","tabActivated","vw","activeTab","show","_this29","_this30","RFQList","RFQs","getActiveTab","updateTotalsCount","$changeRequestsSpan","$rfqSpan","arr","ChangeRequestLineItems","ChangeRequestAttachments","FinancialMarkups","Contact","_this31","Promise","resolve","Error","providers","QBO","toEmails","ccEmails","response","markups","costOnly","costsOnly","ChangeRequestAttachment","File","CustomField","CustomFieldChoice","Settings","parseNumberFormat","numberFormat","additionalData","token","isText","label","parseDateFormatToken","dateFormatId","parseDateString","counter","padStart","substr","fieldTypes","TEXT","INT","choiceName","replaceAll","input","commitmentNumberTokenDateFormat","DD","getDate","MM","getMonth","YY","getFullYear","YYYY","MMDDYYYY","URL_DATE","ChangeRequestUserSettings","viewSettings","setting","bucket","total","Files","CustomFields","CustomFieldChoices","change .select-column","click .btn-edit-company-default","click button.settings-save","_beforeRender","_callee13","_context13","t0","defaultStatusFilter","selectedColumns","defaultFilter","defaultFilterSelectPicker","onHide","currentView","selectView","editCompanySettings","forCompany","setValue","undelegateEvents","columnSelected","sender","fnOnSave","settingTemp","columnTemp","ProjectCostCodeSettings","_beforeFirstRender2","_callee14","_context14","fetchBudget","enableSubJobs","_this32","CostCodeSettings","enableSubJobsChanged","onPullERP","SubJobSettings","CostCodeSettingsModal","pickerOptions","subJob","click .btn-import-cost-codes","click .btn-add-cost-code","click .btn-add-standard","click .btn-edit-cost-code","click .btn-delete-cost-code","click .btn-delete-all","click .btn-pull-erp","change .cb-enable-sub-jobs","_beforeFirstRender3","_callee15","_context15","allCostCodes","where","renderCostCodeTable","divisionNames","sort","sortHelpers","sortAlphaNum","i","guid","sortOrder","getDataTable","afterDataTableRender","getRowChildTable","childOpts","dtOptions","_this33","parentData","hideColumnHeaders","editCostCode","deleteCostCode","importClicked","UploadCostCodesModal","hasStaleCostCodes","projectSyncStatus","isProjectReviewing","PUSH_PROJECT_COST_CODES","PULL_PROJECT_COST_CODES","PUSH_COMPANY_COST_CODES","erpButtons","badge","_this$erpButtons","_this34","pushCostCodes","_this34$erpButtons","reset","pullERP","_this$erpButtons2","_this35","PULL_COMPANY_COST_CODES","pullCostCodes","newCostCodes","_this35$erpButtons","addStandard","CostCodePickerModal","showDisabledAsSelected","isCostCodeDisabled","pCostCode","savedCostCodes","addClicked","editClicked","EditCostCodeModal","deleteClicked","msg","ct","warningNotify","keydown .input-percent","change .input-percent","_beforeModalCreated4","_callee16","_context16","DISABLE_EDIT_COST_CODE_TYPE_FILTER","disableEditingCostTypeFilter","disableEditingCostCodeName","setDefaultValues","AutocompleteInput","isDisabled","formatPercent","onClose","$code","code","isCodeValid","errorText","click .btn-save-new","click .btn-save-all","isSaving","saveNew","dt","saveAll","_this36","uploadTemplateCallback","onDrop","_this37","selectedCostCodes","CostCodePicker","onSelectionChanged","picker","selectedCostCodeIds","selectecCostCodeCodes","disabledCostCodeIds","keyup .input-search","click .btn-clear-filters","click .cost-codes-all-select","click .division-select","click .cost-code-select","click .division-expand","renderCostCodes","searchFilter","$clearFilters","isCostCodeSelected","setDisabledDivisions","setSelectedDivisions","isRendered","getDivisionCostCodesContainer","clearFilters","selectAll","override","checkboxes","selectionChanged","$element","selectDivision","$costCodes","is","cb","expandDivisionClicked","expandDivision","container","icon","siblings","hideError","errorAlert","Alert","isPrepend","CostTypeSettings","click .btn-add-cost-type","click .btn-edit-cost-type","click .btn-delete-cost-type","_beforeFirstRender4","_callee17","_context17","_this38","renderCostTypeTable","_this39","editCostType","deleteCostType","hasStaleCostTypes","PUSH_COST_TYPES","PULL_COST_TYPES","_this$erpButtons3","_this40","pushCostTypes","_this40$erpButtons","_this$erpButtons4","_this41","pullCostTypes","_this41$erpButtons","EditCostTypeModal","_beforeModalCreated5","_callee18","_context18","inputmask","mask","repeat","placeholder","definitions","a","validator","cardinality","renderIntegrationFields","_externalObj$data","_this42","ACUMATICA","_externalObj$data2","defaultNonStockItem","externalObj","nonStockItem","SelectPickerEditorInput","isFormInput","editButtonText","showSaveButton","defaultDisplayValue","inventoryID","getChoices","_this42$erpIntegratio","fnCallback","settingsData","nonStockItems","fetchSettingsData","setSetting","$name","_this43","updateCostTypeData","erpAdmin","_PJQ$collections$erpA","_PJQ$models$erpAdmin","_PJQ$views$erpAdmin","_PJQ$constants$erpAdm","viewOptions","feature","ERPObject","erpObject","relatedObjects","relatedItem","createNewContactCompany","approve","_this44","pull","linkContactCompany","company","archive","removeFromArchive","ERPObjects","internalModel","statusIds","objects","projects","getFeatureCounts","externalModel","_this45","setInternalModel","setStatusIds","refreshModels","_this46","linkSuggested","objs","_this47","obj","Object","assign","features","cont_comp","canSuggestMatches","provider","_ref","_data$externalNumber","suggestMatches","erpObj","checkedText","selectedERPItems","internalId","_this48","suggestedId","SAGE300","unshift","enabled","SYNC_PROJECTS","_ref2","_data$externalNumber2","subjob","costcode","isImported","_ref3","_item$externalNumber","SYNC_PRIME_CONTRACTS","pcco","SYNC_PRIME_CONTRACT_CHANGE_ORDERS","ar_inv","SYNC_RECEIVABLE_INVOICES","SYNC_COMMITMENTS","commitmentTypeNames","cco","SYNC_COMMITMENT_CHANGE_ORDERS","ap_inv","SYNC_PAYABLE_INVOICES","d_cost","SYNC_DIRECT_COSTS","directcosts","directCostTypeNames","ERPAdminManagement","approvalItem","emptyQueue","click .btn-add-project","click .btn-link-project","click .feature-nav-item a","click .filter-nav-item a","click .approve-button, .reject-button, .link-button","click .btn-submit-approve","click .btn-submit-reject","click .btn-add-vendor","click .btn-link-vendor","click .btn-refresh","click .btn-archive","click .btn-remove-from-archive","click .select-erp-item","click .select-all-erp-items","click .btn-import-items","change .cb-suggest-matches","click .btn-link-suggested","click .btn-link-all-suggested","click .btn-link-suggested-selected","_beforeFirstRender5","_callee19","defaultFeature","_context19","fetchSyncData","syncData","getProvider","changeFeature","getFeatures","_this49","ftr","renderFeatureCounts","renderApprovalItems","fetchERPObjects","_fetchERPObjects","_callee21","_this50","_context21","_ref4","_callee20","_context20","externalModelName","handleError","_x8","_x9","featureChanged","_featureChanged","_callee22","_context22","_x10","_changeFeature","_callee24","_this51","_context24","_ref5","_callee23","filters","_context23","readyToImport","readyToExport","CACHED","catch","counts","_x12","_x11","readyToExportCount","readyToImportCount","failedToExportCount","archivedCount","filterChanged","_filterChanged","_callee25","_context25","_x13","_this52","$featurePane","filteredModels","featureName","displayName","filterName","providerName","append","fnRenderEmptyQueue","groupedModels","groupBy","$approvalItemOuter","renderApprovalItem","match","ARCHIVED","itemTable","addProject","addCostCode","addVendor","linkVendor","approvalInputs","field","Datepicker","datepickerOptions","datePicker","defaultDate","prefix","#","handleApprovalAction","$approvalItem","slideDown","SelectImportVendorModal","erpVendor","_this53","contactCompany","successText","onNo","approveItem","_this54","approveContainer","inputEl","inputValue","required","rejectItem","_this55","cols","erpItemSelected","handleSelectedERPItemsButtons","selectAllERPItems","alteredModel","m","addVendorClicked","actionButtonContainer","linkVendorClicked","SelectContactsModal","context","contexts","COMPANIES","selectedCompany","suggestMatchesChanged","linkSuggestedSelectedClicked","linkSuggestedClicked","$row","linkAllSuggestedClicked","toggleLoader","_this56","linkObjs","linkedCount","refreshRow","archiveClicked","rowEl","removeFromArchiveClicked","addProjectClicked","_this57","Project","linkProjectClicked","linkProject","addCostCodeClicked","_this58","createNewCostCodes","addCostCodes","_this59","costCodesExternalIds","externalIds","_refresh","_callee26","date","_this60","_context26","internalModelName","projectsSyncedOn","toISOString","vendorsSyncedOn","costCodesSyncedOn","change .select-vendor","selectedVendors","selectVendor","selectedVendor","dtVendor","onVendorSelected","selVendor","FinancialMarkup","calculate","compoundAmt","amt","_lineItem$get","_lineItem$get2","sortedMarkups","amts","liMarkup","tMarkup","canVoid","autoVoid","click .btn-add-markup","click .btn-edit-markup","click .btn-delete-markup","_beforeFirstRender6","_callee27","_context27","_this61","tableData","editMarkup","sortableOptions","b","deleteMarkup","formatDecimal","_costCode$getDisplayN","appliedCostCodeId","canResize","addMarkup","percent","isCompounding","costCodeIds","costTypeIds","void","editMarkupClicked","_this62","EditFinancialMarkupModal","hasBeenAdded","makeSortable","deleteMarkupClicked","_this63","markupModel","focus .input-percent","click .applied-markup","_beforeModalCreated6","_callee28","_context28","_this64","costCodePicker","populateCostCodePicker","costTypePicker","appliedSubJobPicker","filteredCostCodes","appliedCostCodePicker","updateChoices","appliedCostTypePicker","disable","filteredAppliedCostCodes","_this64$appliedSubJob","_this64$appliedSubJob2","selectedAppliedSubJob","filteredCostTypes","enable","appliedCostCode","filteredAppliedCostTypes","toggleAppliedMarkup","$checkbox","$appliedMarkupContainer","isVerticalCheckbox","groupedCostCodes","isAppliedMarkup","AddBudgetLineItemForecastModal","click .btn-delete-line-item","click .btn-switch-method","validateForm","valid","$manual","$calculated","resetAddForm","deleteLineItem","calculateSubTotal","addLineItem","newLineItem","groups","subtotal","switchMethod","put","SYNC_VENDORS","SYNC_SUB_JOBS","SYNC_BUDGET","CAN_ADD_MARKUPS_AFTER_SYNC","PUSH_VENDORS","UNLINK_VENDOR","PUSH_PROJECT","LINK_PROJECT","UNLINK_PROJECT","PROJECT_SPECIFIC_COST_CODES","PUSH_SUB_JOBS","PULL_SUB_JOBS","PUSH_COMPANY_TAX_CODES","PULL_COMPANY_TAX_CODES","PUSH_BUDGET","PULL_BUDGET","PUSH_COMMITMENTS","PUSH_COMMITMENTS_WITH_VENDOR","PULL_COMMITMENTS","PULL_COMMITMENTS_DOC_CLERK_REQUIRED","UNLINK_COMMITMENTS","PUSH_COMMITMENT_CHANGE_ORDERS","PULL_COMMITMENT_CHANGE_ORDERS","COMMITMENT_CO_SOV_FILTER_TO_COMMITMENT_SOV","UNLINK_COMMITMENT_CHANGE_ORDERS","PUSH_PRIME_CONTRACTS","PUSH_PRIME_CONTRACTS_WITH_CLIENT","PULL_PRIME_CONTRACTS","PRIME_CONTRACT_SOV_BUDGET_CODE_NOT_REQUIRED","UNLINK_PRIME_CONTRACTS","PUSH_PRIME_CONTRACT_CHANGE_ORDERS","PUSH_CONTRACT_CO_WITHOUT_PRIME_CONTRACT","PRIME_CONTRACT_CO_SOV_REQUIRE_LINKED_CONTRACT_CO","PRIME_CONTRACT_CO_SOV_BUDGET_CODE_NOT_REQUIRED","UNLINK_PRIME_CONTRACT_CHANGE_ORDERS","PUSH_DIRECT_COSTS","PULL_DIRECT_COSTS","UNLINK_DIRECT_COSTS","PUSH_PAYABLE_INVOICES","PUSH_PAYABLE_INVOICES_WO_SYNCED_COMMMITMENT","PULL_PAYABLE_INVOICES","PULL_RECEIVABLE_PAYMENTS","PULL_PAYABLE_PAYMENTS","UNLINK_PAYABLE_INVOICES","REQUIRE_SYNCED_COST_TYPES","REQUIRE_SYNCED_COST_CODES","PUSH_RECEIVABLE_INVOICES","PUSH_RECEIVABLE_INVOICES_WO_SYNCED_CONTRACT","PULL_RECEIVABLE_INVOICES","UNLINK_RECEIVABLE_INVOICES","CREATE_TAX_CODES","RELATE_CCO_LINE_TO_COMMITMENT_LINE","logoURL","shortName","supportedVersions","availableActions","linkProjectAlert","budgetColumns","failedToExport","archived","buttonClass","buttonText","SAGE100","INTACCT","-2","0","1","2","3","4","5","6","Integration","_this65","_this66","pushVendor","contact","companyExternalObject","unlinkVendor","contactCompanyId","fetchUnlinkedProjects","_fetchUnlinkedProjects","_callee29","_context29","fetchProjects","fetchLinkedProjects","_fetchLinkedProjects","_callee30","_context30","_fetchProjects","_callee31","synced","_this67","_args31","_context31","erpProjects","pushProject","_this68","_this69","unlinkProject","_this70","pushSubJobs","_this71","pullSubJobs","_this72","_this73","_this74","_this75","_this76","dryRun","_this77","_this78","forLinking","pullTaxCodes","_this79","pushBudget","_this80","pullBudget","_this81","pushCommitment","_this82","pullCommitments","_this83","unlinkCommitment","_this84","_this85","_this86","pushCommitmentChangeOrder","_this87","pullCommitmentChangeOrders","_this88","unlinkCommitmentChangeOrder","_this89","pushPrimeContract","_this90","pullPrimeContracts","_this91","unlinkPrimeContract","_this92","pushPrimeContractChangeOrder","_this93","pullPrimeContractChangeOrders","_this94","unlinkPrimeContractChangeOrder","_this95","pushDirectCost","directcost","_this96","pullDirectCosts","_this97","unlinkDirectCost","directCost","_this98","pushPayableInvoice","_this99","pullPayableInvoicePayments","_this100","unlinkPayableInvoice","_this101","pushReceivableInvoice","_this102","pullReceivableInvoicePayments","_this103","unlinkReceivableInvoice","_this104","getShortName","pvd","action","authorize","_this105","isAgave","linkToken","AgaveLink","openLink","sourceSystem","agaveSourceSystem","showSandboxSourceSystems","publicToken","document","location","url","_this106","Integrations","LinkERPProjectModal","change .select-project","_beforeModalCreated7","_callee32","_context32","_this107","selectedProject","_row$data$name","_row$data$city","city","_row$data$state","state","deferRender","selectProject","parents","_this108","IntegrationsList","click .btn-connect","click .btn-disconnect","fetchIntegrations","getIntegration","initOptions","integrationName","handleIntegrationType","ig","toUpperCase","integrationClicked","integrationType","QBOIntegrationSettings","SageHH2IntegrationSettings","navigator","refreshCommands","AcumaticaIntegrationSettings","SageIntacctIntegrationSettings","authorizeIntegration","_this109","authorized","disconnectIntegration","change .input-projects","change .input-import-single-item","change .input-export-single-item","change .input-sync-costs","click .btn-re-auth","click .btn-unlink","_beforeModalCreated8","_callee33","_context33","newAuth","_this110","incomeAccount","requiredAst","fetchAccounts","incomeAccounts","account","expenseAccount","expenseAccounts","paymentAccount","paymentAccounts","incomeDefaultItem","fetchProducts","products","product","forIncome","expenseDefaultItem","forExpense","costDefaultGroupId","costDefaultCostTypeId","_this111","_data$expenseAccounts","_data$incomeAccounts","_data$paymentAccounts","_this112","_data$products","reAuthorize","_this113","exportSingleItem","syncProjects","syncCosts","importSingleItem","setSettings","afterChange","renderAlerts","_this114","click .btn-save, .btn-authorize","click .btn-edit-auth","click .btn-cancel-auth","_this115","isAuthorized","editingAuthorization","_this116","version","renderCustomizationLink","defaultIncomeAccountGroup","accountGroupID","accountGroups","defaultSalesSubaccount","subaccountID","subaccounts","subaccount","defaultCreditTerms","termsID","creditTerms","cls","primeContractCOClass","classID","primeContractCOClasses","commitmentCOClass","commitmentCOClasses","vendorClass","vendorClasses","ver","fileName","$pkg","apiV2Url","editAuthorization","cancelEditingAuthorization","_this117","VistaIntegrationSettings","_this118","_this119","fnGetAccounts","accounts","glAccounts","glAccount","normalBalance","accountNo","defaultPayableAccount","defaultReceivableAccount","selectPickerOptions","recordNo","defaultItem","itemId","defaultEntity","locationId","entities","entity","_this120","invoiceHeader","changeRequestHeader","isSubmitting","isCostCodeRequired","isCostTypeRequired","filterToPrimeContractItems","canImportBudget","onTotalsChanged","enableTax","billedToDate","approvedChanges","showBilling","click .btn-view-change-order","click .btn-import-budget","click .btn-import-file","click .btn-import-contracts","click .btn-add-all-line-items","click .btn-autofill-amounts","click .btn-save-line-item","change .input-progress-percent","click .btn-add-from-change-requests","click .btn-add-from-commitments","click .select-cr-li","click .btn-total-fn","click .btn-edit-bulk","click .btn-delete-bulk","click .btn-edit-line-item-vendor","keyup .input-budgeted-hours","addStandardCostCodes","$btn","getLineItemForInput","sendRFQClicked","_beforeFirstRender7","_callee34","_context34","addingNewContractLineItems","isReceivableInvoices","invoicing","ReceivableInvoiceLineItem","isInvoices","PayableInvoiceLineItem","isDirectCosts","isChangeRequests","isPCCO","ChangeOrderLineItem","isCCO","isCommitments","CommitmentLineItem","filterToCommitmentCostCodes","requirePrimeContractItem","fetchTaxCodes","taxCodes","accountingMethodPicker","getVisibleLineItems","renderActions","updateAccountingMethodSelector","renderTotals","minimumProgressPercent","$input","totalProgressPercent","importBudget","newLineItems","number","importFile","renderUploader","importContracts","_this121","_this122","downloadImportTemplate","billed","renderTableFooter","_this123","_PJQ$app$session$erpI","fnBudgetCodeCols","_this123$options$fina","_this123$options$fina2","opt","_toConsumableArray","renderFooter","max","getMaterialsStored","taxAmount","getTotalCompleteAndStored","getBalanceToFinish","getWorkRetainageRemaining","getMaterialRetainageRemaining","_this$options$commitm","commitmentLineItemId","commitmentLineItem","_this$options$financi","_row$get","_this$options$financi2","getContactAnchor","useCompanyName","_this123$options$fina3","_this$options$financi3","hrs","_this$options$financi4","_this123$options$fina4","_this123$options$fina5","unitOfMeasure","_this123$options$fina6","_this$options$financi5","taxCode","lineItemHoursChanged","$dataTable","autoWidth","fixedHeader","footer","hasFooter","renderInputs","first","prepend","onRowRemoved","totalButtonClicked","fnName","fn","_this124","$footer","visibleCols","totalRows","sTotal","vMarkup","rtTotal","rrTotal","tTotal","grandTotal","clickFn","onApprovedChangesClicked","bold","onBilledToDateClicked","$totalRow","colOffset","txt","updateCommitmentForChangeRequestLineItem","_commitment$contracte","_commitment$contracte2","budgetCodes","bcSplit","split","vendorId","commitmentNumber","_PJQ$app$session$erpI2","_this125","addListeners","binder","delegate","modelSelectorAttribute","fnCommitmentLineToChoice","commitmentLinePickerCollection","SelectPickerCollection","pickerSelector","valueAttribute","isBlockSubtext","suggested","others","fnCommitmentToChoice","_commitment$contracte3","_commitment$contracte4","subtext","commitmentPickerCollection","_commitment$contracte5","fnVendorToChoice","_commitment$contracte6","vendorPickerCollection","foundIds","matchCommitments","currentCommitment","nextInput","possibleLineItems","lineItemPickerCollection","getPossibleLineItemOptions","selectedItem","fetchPrimeContract","primeContractLineItemPickerCollection","getPrimeContractItemChoices","toggleInput","subJobPickerCollection","costCodeSelectorCollection","pickers","getCostCodeOptions","allowedCostTypeIds","costTypeSelectorCollection","getCostTypeOptions","hasSubJobs","budgetLineItem","$line","getLineItemElement","change","taxCodeSelectorCollection","taxCodeId","unit","focusLineItem","updateLineItemRow","_this126","subTotal","progress","amtRemain","prevInput","_a$get","_b$get","lineItemPicker","getPickerForId","toggle","pcLineItemPicker","subJobPicker","vendorPicker","commitmentPicker","_this127","opts","percentUpdate","stored","nem","committed","totalProgress","billableNow","progressAmount","materialRetainage","workRetainagePercent","workRetainage","materialRetainagePercent","getWorkRetainageTotal","workRetainageReleasedPercent","retainage","workRetainageReleased","getMaterialRetainageTotal","materialRetainageReleasedPercent","materialRetainageReleased","_this127$options$fina","_this127$options$fina2","appliedMarkupId","_this$options$financi6","_this$options$financi7","_this128","_this$options$financi8","_this$options$financi9","_this129","_this127$options$fina3","_this127$options$fina4","cost","console","log","getPossibleLineItems","pLineItem","_contractNumber","contractNumber","contractLines","changes","_this130","budgeted","unBudgeted","c1","c2","_this131","allowedCostTypes","filterUnsyncedCostTypes","erpObjectFetched","getLineItemRow","_this132","budgetedHours","amountRemaining","fnAdd","fetchPossibleLineItems","pLineItems","timeout","addFromChangeRequests","_this133","changeRequestIds","availableLineItems","costLineItemId","revenueLineItemId","progressQuantity","progressPercent","addFromCommitments","_this134","addAllPossibleLineItems","changed","existingLineItem","autofillAmounts","_this135","getAutofillAmounts","autoFillItem","invoiceItem","materialsNew","validateLineItem","updateCell","$cell","costCodeCol","costTypeCol","uomCol","contractItemCol","nodes","wasValidated","saveLineItem","deleteLineItemClicked","bulkDeleteLineItems","_this136","_this137","bulkEditLineItems","_this138","viewChangeOrder","lineItemSelected","_this139","disableCommitmentsButtons","disableContractsButtons","addLineItemsToCommitment","_this140","_onSave5","_callee35","_context35","_x14","createCommitmentFromLineItems","addLineItemsToPCCO","_onSave6","_this141","_callee36","_context36","_x15","createPCCOFromLineItems","_createPCCOFromLineItems","_callee37","_context37","addLineItemsToCCO","_onSave7","_this142","_callee38","_context38","_x16","_this143","liCid","createCCOFromLineItems","_this144","_onSave8","_callee39","_context39","_x17","productionQuantities","productionQuantityId","ProductionQuantitiesAddModal","click .btn-add-production-quantity","click .btn-import","_beforeModalCreated9","_callee40","_context40","ProductionQuantities","_this145","AddProductionQuantitiesDatatable","onDeleteProductionQuantity","deleteProductionQuantity","addProductionQuantity","newModel","ProductionQuantity","saveProductionQuantities","_this146","newModels","newModelsJSON","newProductionQuantities","_this147","_this148","validateProductionQuantity","productionQuantity","InstalledQuantitiesAddModal","_beforeModalCreated10","_callee41","_context41","InstalledQuantities","permissions","_this149","addInstalledQuantitiesView","InstalledQuantitiesAdd","timeCardId","newQuantities","saveQuantities","TimeCardQuantitiesAddModal","timeCardQuantities","_beforeModalCreated11","_callee42","_context42","_this150","quantityViews","$outer","timeCards","timeCard","collapse","quantitiesView","_this151","click .btn-add-quantity","click .btn-delete-quantity","_beforeFirstRender8","_callee43","_context43","renderDatatable","_this152","AddInstalledQuantitiesDatatable","deleteQuantity","_this153","includedColumns","_this154","filteredSubJobs","uomPicker","uomSelectorCollection","_this155","selectedCostCode","filteredUOM","DatePickerCollection","datePickerOptions","_this156","_this157","addQuantity","InstalledQuantity","installedOn","_this158","modelsToSave","modelsToSaveJSON","savedQuantities","_this159","validateQuantity","installedOnCol","deleteQuantityClicked","ProductionQuantitiesDatatable","click .btn-edit-production-quantity","click .btn-delete-production-quantity","without","uom","minimumFractionDigits","maximumFractionDigits","installedQuantities","installedQuantity","_row$get2","installed","viewProductionQuantityClicked","viewProductionQuantity","onViewProductionQuantity","deleteProductionQuantityClicked","InstalledQuantitiesDatatable","click .btn-view-quantity","click .btn-view-time-card","_this$options$project4","canViewTimeCard","timeCardSettings","timecards","TimeCardSettings","moment","viewTimeCardClicked","viewTimeCard","_this160","fnRenderTimeCard","TimeCard","TimeCardDetailsModal","viewQuantityClicked","viewQuantity","onViewQuantity","onDeleteQuantity","ProductionQuantityEditModal","click .btn-add-installed-quantities","_beforeModalCreated12","_callee44","_context44","addInstalledQuantities","_this161","_this161$model$instal","saveProductionQuantity","_this162","ProductionQuantitiesList","click .add-budgeted-quantities","click .add-installed-quantities","_beforeFirstRender9","_callee45","_context45","initProductionQuantity","_this163","PRODUCTION_QUANTITIES_ORDER_COOKIE","columnWidthCookie","PRODUCTION_QUANTITIES_COLUMNS_WIDTH","_type$toLowerCase","PRODUCTION_QUANTITIES","addBudgetedQuantities","_this164","_this165","ProjectBudgetDataTable","childRowToggle","rowOverride","selector","child","childDataTables","childDt","parentId","renderChildRow","$icon","childClass","$childTable","class","childData","childTable","isBackboneCollection","isBackboneModel","ProjectBudget","groupByCookie","click .btn-link-erp","click .btn-add-line-items","click .btn-edit-budget","click .btn-edit-forecast","click .btn-view-modifications","click .btn-view-prime-contracts","click .btn-view-commitments","click .btn-view-receivable-invoices","click .btn-view-payable-invoices","click .btn-view-direct-costs","click .btn-lock-budget","click .btn-unlock-budget","keyup .budget-search","click .expand-all-items","_beforeFirstRender10","_callee46","gbCookie","_context46","force","currentBudget","fetchBudgetSnapshots","snapshots","fetchBudgetViews","setActiveView","canUnlock","fetchBudgetForActiveView","getDataForLevel","hasUnsynced","budgetStatus","reviewing","level","groupByLevel","groupByCostCode","lineItemIds","budgetCode","_lineItem$columnData$","liVal","_this166","parentTable","contextMenuActions","isLastLevel","addLineItemToBudget","editLineItemBudget","viewLineItemModifications","editLineItemForecast","isUnBudgeted","drawCallback","snapshotSelect","createSnapshot","groupBySelector","setGroupBy","viewSelector","manageViews","erpStatus","erpReviewing","isSnapshot","expandChildTables","renderChildTable","setCookie","minutes","getMinutesFromHoursDecimal","cVal","$footerCol","getFormattedTime","lockBudget","linkERP","erpProject","_this$erpButtons5","_this$erpButtons6","_this$erpButtons7","_this167","_this167$erpButtons","exportBudget","searchBudget","searchVal","filteredIds","search","draw","unlockBudget","canClickColumnData","sValue","numOnly","classes","reduce","timeValue","timeDecimal","floor","hours","_val","_val2","$tr","$expandIcon","expandAllClicked","editLineItemBudgetClicked","editLineItemForecastClicked","viewLineItemReceivableInvoicesClicked","viewLineItemReceivableInvoices","ModalViewReceivableInvoices","showAllBillingPeriods","viewLineItemPayableInvoicesClicked","viewLineItemPayableInvoices","ModalViewPayableInvoices","viewLineItemPrimeContractsClicked","viewLineItemPrimeContracts","ModalViewPrimeContracts","viewLineItemPrimeContractChangeOrdersClicked","viewLineItemPrimeContractChangeOrders","ModalViewChangeOrders","viewLineItemCommitmentChangeOrdersClicked","viewLineItemCommitmentChangeOrders","viewLineItemCommitmentsClicked","viewLineItemCommitments","ModalViewCommitments","viewLineItemDirectCostsClicked","viewLineItemDirectCosts","ModalViewDirectCosts","filterLineItems","filterText","wait","itm","addBudgetModifications","modifications","_this168","fromLine","toLine","viewLineItemModificationsClicked","bv","click .cb-send","click .cb-send-all","_beforeModalCreated13","_callee47","_this$options$changeR","_this$options$changeR2","_this$options$changeR3","_this$options$changeR4","_this$options$lineIte","_context47","batch","dueDate","Attachments","contractedContactId","assignees","assigneeIds","distributeToIds","user","send","renderForm","renderDataTable","sendAllChanged","_this169","checked","request","_this170","newDate","_this171","lineBinder","_commitment$contracte7","_commitment$contracte8","_model$commitment","_model$contractedCont","_commitment$contracte9","_commitment$contracte10","companyPickerCollection","_currentCommitment$co","_commitment","_model$commitment2","_model$contractedCont2","_matchCommitments$0$c","invoiceContact","sendChanged","_this172","validateBatchItem","batchItem","companyNode","commitmentNode","_this173","req","batchRes","_this174","RFQDataTable","assignee","onViewRFQ","click .btn-send-request","click .btn-update-response","click .impact-response>button","_beforeModalCreated14","_callee48","_context48","changeRequestNumber","rfqStatus","_this$options$project5","_this$model$contracte","pContactId","isAssignee","CLOSED","canRespond","REVISE","canSendRequest","renderResponse","_this175","fnSave","sendRequest","oldStatus","companyPicker","PROJECTCONTACTS","hideUsers","canViewContacts","assigneePicker","selectedContacts","pluck","distributeToPicker","distributeTo","hasOwnProperty","responseAttachments","updateResponseClicked","updateResponse","_this176","hasCostImpact","RFQResponseModal","onSubmit","submitResponse","impactResponseChanged","_this177","_this178","respond","_this179","sendQuoteRequest","saveRFQ","_this180","quoteAmount","deleteRFQ","click .btn-add-rfq","click .btn-delete-rfq","_beforeFirstRender11","_callee49","_context49","initRFQ","_this181","addRFQ","deleteRFQClicked","SelectRFQModal","change .select-rfq","selectedRFQs","selectRFQ","selectedRFQ","dtRFQ","onRFQSelected","selRFQ","responseBy","Contacts","_this$contractedConta","_this182","Attachment","_beforeModalCreated15","_callee50","_this$options$hasCost","_this$model$get3","_this$model$get4","_context50","comment","clone","_this183","_this184","click .btn-add-sub-job","click .btn-edit-sub-job","click .btn-delete-sub-job","click .btn-edit-cost-codes","renderSubJobTable","_this185","newSubJobsCount","_this186","editSubJob","editCostCodes","deleteSubJob","EditSubJobModal","editCostCodesClicked","isNameValid","sj","TaxCodeSettings","click .btn-add-tax-code","click .btn-edit-tax-code","click .btn-delete-tax-code","renderTaxCodeTable","_this187","editTaxCode","deleteTaxCode","EditTaxCodeModal","_this188","newTaxCodes","rate"],"mappings":"4+PAAAA,IAAAC,YAAAC,OAAAF,IAAAC,YAAAC,OAAAF,IAAAC,YAAAC,OAAA,GACAF,IAAAG,OAAAD,OAAAF,IAAAG,OAAAD,OAAAF,IAAAG,OAAAD,OAAA,GACAF,IAAAI,MAAAF,OAAAF,IAAAI,MAAAF,OAAAF,IAAAI,MAAAF,OAAA,GAEAF,IAAAK,UAAAH,OAAA,CACAI,iBAAA,CACAC,OAAA,EACAC,cAAA,IAIAR,IAAAS,QAAAP,OAAA,CACAQ,OAAA,CACA,CACAC,MAAA,SACAC,KAAA,SACAC,SAAA,WACAb,IAAAc,IAAAC,cAAA,CACAC,WAAA,aAIA,CACAL,MAAA,6BACAC,KAAA,SACAC,SAAA,SAAAI,GACAjB,IAAAS,QAAAS,YAAAC,qBAAAC,SAAAH,GAAA,YAGA,CACAN,MAAA,gCACAC,KAAA,SACAC,SAAA,SAAAI,GACAjB,IAAAS,QAAAS,YAAAC,qBAAAC,SAAAH,GAAA,eAGA,CACAN,MAAA,8BACAC,KAAA,SACAC,SAAA,SAAAI,GACAjB,IAAAS,Q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PJQ.collections.budget = PJQ.collections.budget ? PJQ.collections.budget : {};\r\nPJQ.models.budget = PJQ.models.budget ? PJQ.models.budget : {};\r\nPJQ.views.budget = PJQ.views.budget ? PJQ.views.budget : {};\r\n\r\nPJQ.constants.budget = {\r\n\taccountingMethod: {\r\n\t\tAMOUNT: 0,\r\n\t\tUNIT_QUANTITY: 1\r\n\t},\r\n};\r\n\r\nPJQ.modules.budget = {\r\n\troutes: [\r\n\t\t{\r\n\t\t\troute: \"budget\",\r\n\t\t\tname: 'budget',\r\n\t\t\tcallback: function () {\r\n\t\t\t\tPJQ.app.initNavigator({\r\n\t\t\t\t\tactiveItem: \"budget\"\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\t\t{\r\n\t\t\troute: 'projects/:projectId/budget',\r\n\t\t\tname: 'budget',\r\n\t\t\tcallback: function (projectId) {\r\n\t\t\t\tPJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"budget\");\r\n\t\t\t}\r\n\t\t},\r\n\t\t{\r\n\t\t\troute: 'projects/:projectId/costcodes',\r\n\t\t\tname: 'budget',\r\n\t\t\tcallback: function (projectId) {\r\n\t\t\t\tPJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"costcodes\");\r\n\t\t\t}\r\n\t\t},\r\n\t\t{\r\n\t\t\troute: 'projects/:projectId/subjobs',\r\n\t\t\tname: 'budget',\r\n\t\t\tcallback: function (projectId) {\r\n\t\t\t\tPJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"subjobs\");\r\n\t\t\t}\r\n\t\t}\r\n\t]\r\n};\r\n\r\nPJQ.app.addRoutes(PJQ.modules.budget.routes);\r\n","PJQ.collections.budget = PJQ.collections.budget ? PJQ.collections.budget : {};\nPJQ.models.budget = PJQ.models.budget ? PJQ.models.budget : {};\nPJQ.views.budget = PJQ.views.budget ? PJQ.views.budget : {};\n\nPJQ.helpers.costCodes = {\n getDivisionSortValue: function (division) {\n if (_.size(division) === 0 || division.toLowerCase() === 'no division') {\n return -1;\n }\n\n let numsOnly = PJQ.helpers.formatHelpers.numbersOnly(division);\n if (_.size(numsOnly) > 0) {\n let num = parseInt(numsOnly);\n if (!isNaN(num)) {\n return num;\n }\n }\n return division;\n },\n sortDivisions: function (divisions) {\n return _.sortBy(divisions, function (division) {\n return PJQ.helpers.costCodes.getDivisionSortValue(division.name);\n })\n }\n}\n\nPJQ.helpers.erp = {\n renderERPButtons: function ($el, options) {\n options = _.defaults(options, {\n pushSupported: false,\n canPush: options.pushSupported === true,\n canPushChanges: options.pushSupported === true,\n disablePushReason: null,\n pullSupported: false,\n canPull: options.pullSupported === true,\n disablePullReason: null,\n canUnlink: options.unlinkSupported === true,\n canLink: options.linkSupported === true\n });\n\n let html = '';\n options.isStale = options.status === PJQ.constants.integrations.erp.syncStatuses.STALE;\n options.isPending = options.status === PJQ.constants.integrations.erp.syncStatuses.PENDING;\n options.isReviewing = options.status === PJQ.constants.integrations.erp.syncStatuses.REVIEWING;\n options.isApproved = options.status === PJQ.constants.integrations.erp.syncStatuses.APPROVED;\n options.isFailed = options.status === PJQ.constants.integrations.erp.syncStatuses.FAILED;\n options.isSynced = options.status === PJQ.constants.integrations.erp.syncStatuses.SYNCED;\n options.isRejected = options.status === PJQ.constants.integrations.erp.syncStatuses.REJECTED;\n if (options.isSynced) {\n options.canPush = false;\n options.disablePushReason = \"No changes to sync\";\n } else if (options.isApproved) {\n options.canPush = false;\n options.canPull = false;\n options.disablePushReason = \"Approved - Sync to ERP system in process\";\n options.disablePullReason = \"Approved - Sync to ERP system in process\";\n }\n\n if (options.pushSupported) {\n if (options.isReviewing) {\n html += ``;\n } else if ((options.canPushChanges && (options.isSynced || options.isStale)) || ((options.isRejected || options.isFailed || options.isPending) && options.pushSupported)) {\n html += ``;\n }\n }\n\n if (options.pullSupported && (options.canPull || options.status == null || options.isSynced)) {\n html += ``;\n }\n\n if (options.canLink && options.isPending) {\n html += ``;\n } else if (options.canUnlink && options.isSynced) {\n html += ``;\n }\n\n if (_.size(html) > 0) {\n $el.html(PJQ.templating.TemplateRenderer.parseMarkup(html, options));\n } else {\n $el.empty();\n }\n\n return {\n pulling: (isPulling) => {\n if (isPulling) {\n this.pullingLoader = new PJQ.Loader($el.find('.btn-pull-erp'), {\n loadingText: null\n });\n } else if (this.pullingLoader) {\n this.pullingLoader.remove();\n this.pullingLoader = null;\n }\n },\n pushing: (isPushing) => {\n if (isPushing) {\n this.pushingLoader = new PJQ.Loader($el.find('.btn-push-erp'), {\n loadingText: null\n });\n } else if (this.pushingLoader) {\n this.pushingLoader.remove();\n this.pushingLoader = null;\n }\n },\n unlinking: (isUnlinking) => {\n if (isUnlinking) {\n this.unlinkLoader = new PJQ.Loader($el.find('.btn-unlinking-erp'), {\n loadingText: null\n });\n } else if (this.unlinkLoader) {\n this.unlinkLoader.remove();\n this.unlinkLoader = null;\n }\n }\n };\n },\n getERPIcon: function (status) {\n let iconClass = '',\n colorClass = '';\n switch (status) {\n case PJQ.constants.integrations.erp.syncStatuses.REVIEWING:\n iconClass = 'fa-clock';\n colorClass = 'text-primary';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.REJECTED:\n iconClass = 'fa-triangle-exclamation';\n colorClass = 'text-warning';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.APPROVED:\n iconClass = 'fa-link-simple';\n colorClass = 'text-purple';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.SYNCED:\n iconClass = 'fa-link-simple';\n colorClass = 'text-success';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.FAILED:\n iconClass = 'fa-link-simple-slash';\n colorClass = 'text-danger';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.STALE:\n iconClass = 'fa-link-simple';\n colorClass = 'text-secondary';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.PENDING:\n default:\n return '';\n }\n return '';\n },\n getERPBadge: function (status, externalObject, options) {\n let badgeClass = '',\n badgeIcon = '';\n switch (status) {\n case PJQ.constants.integrations.erp.syncStatuses.REVIEWING:\n badgeIcon = 'fa-clock';\n badgeClass = 'badge-primary';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.REJECTED:\n badgeIcon = 'fa-triangle-exclamation';\n badgeClass = 'badge-danger';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.APPROVED:\n badgeIcon = 'fa-link-simple';\n badgeClass = 'badge-purple';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.SYNCED:\n badgeIcon = 'fa-link-simple';\n badgeClass = 'badge-success';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.FAILED:\n badgeIcon = 'fa-link-simple-slash';\n badgeClass = 'badge-danger';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.STALE:\n badgeIcon = 'fa-link-simple';\n badgeClass = 'badge-secondary';\n break;\n case PJQ.constants.integrations.erp.syncStatuses.PENDING:\n default:\n return '';\n }\n\n let text = '',\n appendText = '',\n title = PJQ.constants.integrations.erp.syncStatusDescriptions[status];\n if (externalObject != null) {\n if (externalObject.data != null && _.size(externalObject.data.externalNumber) > 0) {\n text = '' + externalObject.data.externalNumber + ''\n }\n\n if (externalObject.status === PJQ.constants.integrations.erp.syncStatuses.REJECTED && _.size(externalObject.rejectReason) > 0) {\n title = externalObject.rejectReason;\n } else if (externalObject.status === PJQ.constants.integrations.erp.syncStatuses.FAILED && _.size(externalObject.error) > 0) {\n title = externalObject.error;\n }\n }\n return '' + text + '' + appendText;\n }\n};\n\nPJQ.modules.budget = {\n routes: [\n {\n route: \"budget\",\n name: 'budget',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"budget\"\n });\n }\n },\n {\n route: 'projects/:projectId/budget',\n name: 'budget',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"budget\");\n }\n },\n {\n route: 'projects/:projectId/costcodes',\n name: 'budget',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"costcodes\");\n }\n },\n {\n route: 'projects/:projectId/subjobs',\n name: 'budget',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"subjobs\");\n }\n }\n ]\n};\n\nPJQ.constants.budgetHelpers = {\n columnTypes: {\n SOURCE: 'source',\n CALCULATED: 'calculated'\n },\n columnFormats: {\n MONEY: 'money',\n PERCENT: 'percent',\n INTEGER: 'int'\n },\n getColumnSources: function () {\n let def = PJQ.constants.budgetHelpers.columnSources;\n if (PJQ.app.session.erpIntegration != null) {\n return _.union(def, _.map(PJQ.app.session.erpIntegration.getBudgetColumns(), function (col) {\n return _.extend(col, {isErp: true});\n }));\n }\n return def;\n },\n columnSources: [\n {\n name: 'Description',\n source: 'Description',\n canCalculate: false,\n format: 'string'\n },\n {\n name: 'Budgeted Hours',\n source: 'BudgetedHours',\n canCalculate: true,\n format: 'time'\n },\n {\n name: 'Original Budget',\n source: 'BudgetedCost',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Budget Modifications',\n source: 'BudgetModification',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Revised Budget',\n source: 'RevisedBudget',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Pending Budget Changes',\n source: 'PendingBudgetChanges',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Projected Budget',\n source: 'ProjectedBudget',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Contracts',\n source: 'PrimeContractValues',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Contract Change Orders',\n source: 'PrimeContractChangeOrderValues',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Committed Costs',\n source: 'CommittedCosts',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Pending Cost Changes',\n source: 'PendingCosts',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Commitments',\n source: 'CommitmentValues',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Commitment Change Orders',\n source: 'CommitmentChangeOrderValues',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Direct Costs',\n source: 'DirectCostValues',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Payable Invoices',\n source: 'PayableInvoiceValues',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Payable Invoice Payments',\n source: 'PayablePayments',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Receivable Invoices',\n source: 'ReceivableInvoiceValues',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Receivable Invoice Payments',\n source: 'ReceivablePayments',\n canCalculate: true,\n isSource: true,\n format: 'money'\n },\n {\n name: 'Time Cards',\n source: 'TimeCardValues',\n canCalculate: true,\n isSource: true,\n format: 'decimal'\n },\n {\n name: 'Projected Costs',\n source: 'ProjectedCosts',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Forecast To Complete',\n source: 'ForecastToComplete',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Notes',\n source: 'Notes',\n canCalculate: false,\n format: 'string'\n },\n {\n name: 'Unit Price',\n source: 'UnitPrice',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Quantity',\n source: 'Quantity',\n canCalculate: true,\n format: 'integer',\n }\n ]\n}\n\nPJQ.app.addRoutes(PJQ.modules.budget.routes);\n","PJQ.views.budget.AddBudgetLineItemsModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-add-line-items'),\r\n width: '90%',\r\n maxWidth: 1200,\r\n isShowCloseButton: true,\r\n onSave: _.noop,\r\n isAdmin: true\r\n },\r\n events: {\r\n 'click .go-to-cost-codes': 'goToCostCodes',\r\n 'click .btn-save': 'save',\r\n 'click .btn-cancel': 'cancel'\r\n },\r\n beforeModalCreated: async function () {\r\n this.collection = new PJQ.collections.budget.LineItems();\r\n this.accountingMethod = 0;\r\n this.options.project = PJQ.app.session.project;\r\n\r\n this.isFetched = false;\r\n this.costCodes = await this.options.project.fetchCostCodes();\r\n this.costTypes = await this.options.project.fetchCostTypes();\r\n this.unitsOfMeasure = await this.options.project.fetchUnitsOfMeasure();\r\n this.isFetched = true;\r\n this.render();\r\n },\r\n renderData: function () {\r\n return {\r\n collection: this.collection,\r\n costCodes: this.costCodes != null ? this.costCodes.models : [],\r\n costTypes: this.costTypes != null ? this.costTypes.models : [],\r\n unitsOfMeasure: this.unitsOfMeasure != null ? this.unitsOfMeasure.models : [],\r\n accountingMethod: this.accountingMethod\r\n }\r\n },\r\n afterRender: function () {\r\n this.renderLineItemsView();\r\n },\r\n renderLineItemsView: function () {\r\n if(this.lineItemsView){\r\n this.lineItemsView.remove();\r\n }\r\n \r\n this.lineItemsView = new PJQ.views.budget.LineItemsView({\r\n el: this.$('.line-items-view'),\r\n collection: this.collection,\r\n lineItemModel: PJQ.models.budget.LineItem,\r\n accountingMethod: 0,\r\n canEdit: true,\r\n canDelete: true,\r\n canChangeAccountingMethod: true,\r\n isBudget: true,\r\n onAccountingMethodChanged: _.bind(function (value) {\r\n\r\n }, this),\r\n onLineItemAdd: _.bind(function () {\r\n\r\n }, this),\r\n onLineItemDelete: _.bind(function () {\r\n\r\n }, this)\r\n });\r\n },\r\n importLineItems: function () {\r\n let $uploader = this.$('.import-uploader');\r\n if (this.fileUploader == null) {\r\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\r\n el: $uploader,\r\n useApiV2: true,\r\n allowedExtensions: ['xls', 'xlsx', 'csv'],\r\n maxFiles: 1,\r\n style: 'grid',\r\n onSuccess: _.bind(function (file) {\r\n let loader = new PJQ.Loader($uploader);\r\n if (this.options.budget != null && _.size(file.uploadId) > 0) {\r\n this.options.budget.processImport(file.uploadId, _.bind(function (data) {\r\n this.fileUploader.remove();\r\n loader.remove();\r\n this.fileUploader = null;\r\n this.collection.add(data);\r\n this.renderLineItems();\r\n }, this));\r\n }\r\n }, this)\r\n });\r\n } else {\r\n // Hide file uploader if button is clicked again\r\n $uploader.attr('hidden', !$uploader.attr('hidden'));\r\n }\r\n },\r\n goToCostCodes: function () {\r\n PJQ.app.router.navigate(\"projects/\" + (this.options.project.id).toString() + \"/costcodes\", {\r\n trigger: true\r\n });\r\n this.removeModal();\r\n },\r\n save: function () {\r\n if (this.lineItemsView.validate()) {\r\n this.options.budget.addLineItems(this.collection.models, _.bind(function () {\r\n this.options.onSave(this.collection.models);\r\n this.removeModal();\r\n }, this));\r\n }\r\n },\r\n cancel: function () {\r\n if (_.size(this.collection.models) > 0) {\r\n new PJQ.views.modals.SaveDontSave({\r\n header: \"Unsaved Changes\",\r\n body: \"Do you want to save changes?\",\r\n onSave: _.bind(function () {\r\n this.save();\r\n }, this),\r\n onDontSave: _.bind(function () {\r\n this.removeModal();\r\n }, this)\r\n });\r\n } else {\r\n this.removeModal();\r\n }\r\n }\r\n});\r\n\r\n\r\nPJQ.views.budget.EditLineItemBudgetModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-edit-line-item-budget'),\r\n maxWidth: 600,\r\n isShowCloseButton: true,\r\n onSave: _.noop,\r\n isAdmin: true\r\n },\r\n events: {\r\n 'focus .input-dollars-full,.input-percent,.input-hours': 'selectInput',\r\n 'keyup .input-quantity, .input-unit-price': 'calculateUnitTotal',\r\n 'click .btn-save': 'save',\r\n 'click .btn-cancel': 'cancel'\r\n },\r\n beforeModalCreated: function () {\r\n this.isFetched = false;\r\n PJQ.app.session.project.fetchSubJobs(_.bind(function (subJobs) {\r\n this.subJobs = subJobs;\r\n PJQ.app.session.project.fetchCostCodes(_.bind(function (costCodes) {\r\n this.costCodes = costCodes;\r\n PJQ.app.session.project.fetchCostTypes(_.bind(function (costTypes) {\r\n this.costTypes = costTypes;\r\n PJQ.app.session.project.fetchUnitsOfMeasure(_.bind(function (unitsOfMeasure) {\r\n this.unitsOfMeasure = unitsOfMeasure;\r\n\r\n this.isFetched = true;\r\n this.render();\r\n }, this));\r\n }, this));\r\n }, this));\r\n }, this));\r\n },\r\n renderData: function () {\r\n return {\r\n model: this.model,\r\n budget: this.options.budget,\r\n subJobs: this.subJobs != null ? this.subJobs : [],\r\n costCodes: this.costCodes != null ? this.costCodes : [],\r\n costTypes: this.costTypes != null ? this.costTypes : [],\r\n unitsOfMeasure: this.unitsOfMeasure != null ? this.unitsOfMeasure.models : [],\r\n isFetched: this.isFetched\r\n }\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n new PJQ.Binder(this.$el, this.model, {\r\n watchElements: [\r\n 'input'\r\n ],\r\n useDecimalPercentFields: true,\r\n });\r\n\r\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-hours'), 1);\r\n\r\n new PJQ.inputs.Selectpicker({\r\n el: this.$('.select-accounting-method'),\r\n defaultValue: this.model.get('accountingMethod'),\r\n isIntChoices: true,\r\n onChange: _.bind(function (value) {\r\n this.setAccountingMethod(value);\r\n }, this)\r\n });\r\n\r\n this.unitOfMeasureSelector = new PJQ.inputs.Selectpicker({\r\n el: this.$('.select-unit-of-measure'),\r\n defaultValue: this.model.get('unitId'),\r\n isIntChoices: true,\r\n hideDisabled: true\r\n });\r\n\r\n PJQ.helpers.inputHelpers.inputMaskCurrency(this.$('.input-dollars-full'), 2, true);\r\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-quantity'), 2);\r\n this.calculateUnitTotal();\r\n },\r\n selectInput: function (e) {\r\n let el = $(e.currentTarget)[0];\r\n if (this.focusInput !== el) {\r\n this.focusInput = el;\r\n setTimeout(_.bind(function () {\r\n this.focusInput.select();\r\n }, this), 100);\r\n }\r\n },\r\n calculateUnitTotal: function () {\r\n let unitPrice = PJQ.helpers.inputHelpers.getMoneyInputValue(this.$('.input-unit-price').parent()),\r\n quantity = parseFloat(this.$('.input-quantity').val());\r\n this.$('.unit-total').html(PJQ.helpers.formatHelpers.formatCurrency(quantity * unitPrice));\r\n },\r\n setAccountingMethod: function (method) {\r\n this.model.set('accountingMethod', method);\r\n this.render();\r\n },\r\n save: function () {\r\n if (this.model.get('accountingMethod') === 0) {\r\n let budgetedCost = PJQ.helpers.inputHelpers.getMoneyInputValue(this.$('.input-budgeted-cost'));\r\n this.model.set('budgetedCost', budgetedCost != null ? budgetedCost : 0);\r\n } else {\r\n let quantity = this.$('.input-quantity').val(),\r\n unitPrice = PJQ.helpers.inputHelpers.getMoneyInputValue(this.$('.input-unit-price'));\r\n this.model.set({\r\n unitId: this.unitOfMeasureSelector.getValue(),\r\n quantity: _.size(quantity) > 0 ? parseFloat(quantity) : 0,\r\n unitPrice: unitPrice != null ? unitPrice : 0\r\n })\r\n }\r\n\r\n let $hours = this.$('.input-budgeted-hours');\r\n this.model.set('budgetedHours', Math.ceil(parseFloat($hours.val()) * 60));\r\n\r\n this.model.save(null, {\r\n success: _.bind(function () {\r\n this.options.onSave(this.model);\r\n this.removeModal();\r\n }, this)\r\n }, this);\r\n },\r\n cancel: function () {\r\n this.model.restore();\r\n this.removeModal();\r\n }\r\n});\r\n","// Models\r\nPJQ.models.budget.BaseLineItem = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n getTaxAmount: function () {\r\n let taxRate = this.get('taxRate'),\r\n taxable = this.get('amount') + this.get('markupAmount');\r\n return Math.round(taxable * (taxRate / 10000));\r\n },\r\n getUnRoundedTaxAmount: function () {\r\n let taxRate = this.get('taxRate'),\r\n taxable = this.get('amount') + this.get('markupAmount');\r\n return taxable * (taxRate / 10000);\r\n },\r\n resetMarkup: function () {\r\n this.set({\r\n markupAmount: 0,\r\n verticalMarkupAmount: 0,\r\n horizontalMarkupAmount: 0,\r\n markupValues: null\r\n });\r\n },\r\n getMarkupAmount: function (financialMarkups, options = {}) {\r\n let values = this.get('markupValues');\r\n if (financialMarkups != null) {\r\n values = {};\r\n\r\n let markupVals = financialMarkups.getMarkups([this]),\r\n hAmount = 0,\r\n vAmount = 0;\r\n _.each(markupVals, (mVal) => {\r\n values[mVal.cid] = {\r\n amount: mVal.amount,\r\n isVertical: mVal.isVertical\r\n };\r\n if(mVal.isApplied || this.markup || this.get('appliedMarkupId') > 0) {\r\n vAmount += 0;\r\n hAmount += 0;\r\n } else if (mVal.isVertical) {\r\n vAmount += mVal.amount\r\n } else {\r\n hAmount += mVal.amount;\r\n }\r\n });\r\n\r\n this.set({\r\n markupAmount: vAmount + hAmount,\r\n verticalMarkupAmount: vAmount,\r\n horizontalMarkupAmount: hAmount,\r\n markupValues: values\r\n });\r\n } else if (this.get('markupAmount') == null) {\r\n this.set({\r\n markupAmount: 0,\r\n verticalMarkupAmount: 0,\r\n horizontalMarkupAmount: 0\r\n });\r\n }\r\n\r\n if (options.cid != null) {\r\n let val = values[options.cid];\r\n if (val == null) {\r\n return 0;\r\n }\r\n return val.amount;\r\n }\r\n\r\n let result = null;\r\n if (options.vertical) {\r\n result = this.get('verticalMarkupAmount');\r\n } else if (options.horizontal) {\r\n result = this.get('horizontalMarkupAmount');\r\n }\r\n return result ?? this.get('markupAmount');\r\n },\r\n getAmountRemaining: function (financialMarkups, options = {}) {\r\n return this.getGrandTotal(financialMarkups, options) - this.get('progressAmount') - this.get('progressTaxAmount')\r\n - this.get('materialsStored') + this.getRetainage() - this.getRetainageReleased();\r\n },\r\n getSubTotal: function (financialMarkups, options = {}) {\r\n if (options == null) {\r\n options = {};\r\n }\r\n\r\n let amount;\r\n if((this.markup || this.get('appliedMarkupId') > 0) && !options.totalMarkups) {\r\n amount = 0;\r\n if(_.size(options.lineItems?.models) > 0){\r\n let markup = this.markup ? this.markup : financialMarkups.findWhere({id: this.get('appliedMarkupId')}),\r\n markupCostCodes = markup?.get('costCodeIds') ?? [],\r\n markupCostTypes = markup?.get('costTypeIds') ?? [];\r\n\r\n let filteredLineItems = _.filter(options.lineItems.models, (li) => {\r\n return li.markup == null && financialMarkups.findWhere({lineItemId: li.id}) == null &&\r\n (_.size(markupCostCodes) === 0 || markupCostCodes.includes(li.get('costCodeId'))) &&\r\n (_.size(markupCostTypes) === 0 || markupCostTypes.includes(li.get('costTypeId')));\r\n });\r\n\r\n _.each(filteredLineItems, (li) => {\r\n let isAppliedLI = li.markup != null || li.get('appliedMarkupId') != null,\r\n liAmount = this instanceof PJQ.models.changeRequests.ChangeRequestLineItem && !options.costs ? li.get('revenue') : li.get('amount')\r\n\r\n if(markup.get('isCompounding')){\r\n liAmount = liAmount + amount;\r\n }\r\n\r\n amount += isAppliedLI ? 0 : ((markup?.get('percent') ?? 0)/10000) * liAmount;\r\n });\r\n\r\n this.set({\r\n amount: amount,\r\n revenue: amount,\r\n unitPrice: amount\r\n }, {silent: true});\r\n }\r\n } else if (this instanceof PJQ.models.changeRequests.ChangeRequestLineItem && !options.costs) {\r\n amount = this.get('revenue') ?? 0;\r\n } else {\r\n amount = this.get('amount') ?? 0;\r\n }\r\n let markupAmount = this.getMarkupAmount(financialMarkups, {horizontal: options.totalMarkups !== true, isAppliedLineItem: options.isAppliedLineItem});\r\n return amount + markupAmount;\r\n },\r\n getRetainage: function () {\r\n return this.get('workRetainage') + this.get('materialRetainage');\r\n },\r\n getRetainageReleased: function () {\r\n return this.get('workRetainageReleased') + this.get('materialRetainageReleased');\r\n },\r\n getGrandTotal: function (financialMarkups, options = {}) {\r\n return this.getSubTotal(financialMarkups, options) + (this.get('taxAmount') ?? 0);\r\n }\r\n});\r\n\r\nPJQ.models.budget.LineItem = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.get('budgetId')\r\n },\r\n {\r\n endpoint: 'lineitems',\r\n value: this.id\r\n }\r\n ]);\r\n },\r\n parse: function (model) {\r\n if (model) {\r\n if (model.amount != null && model.budgetedCost == null) {\r\n model.budgetedCost = model.amount;\r\n }\r\n }\r\n return model;\r\n },\r\n erpSyncStatus: function () {\r\n let exObj = this.get('externalObject'),\r\n status = exObj != null && typeof exObj.status === 'number' ? exObj.status : 0;\r\n if (status !== PJQ.constants.integrations.erp.syncStatuses.SYNCED) {\r\n return status;\r\n }\r\n\r\n return _.size(exObj.lastSync) === 0 || new Date(this.get('modifiedOn')) > new Date(exObj.lastSync) ? PJQ.constants.integrations.erp.syncStatuses.STALE : status;\r\n },\r\n});\r\n\r\nPJQ.models.budget.ForecastLineItem = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.options.budgetId\r\n },\r\n {\r\n endpoint: 'lineitems',\r\n value: this.get('lineItemId')\r\n },\r\n {\r\n endpoint: 'forecast'\r\n }\r\n ]);\r\n }\r\n});\r\n\r\nPJQ.models.budget.Budget = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n if (this.id > 0) {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.id\r\n }\r\n ]);\r\n }\r\n\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.get('projectId')\r\n },\r\n {\r\n endpoint: 'budgets'\r\n }\r\n ]);\r\n },\r\n parse: function (model) {\r\n if (!model)\r\n return model;\r\n\r\n this.lineItems = new PJQ.collections.budget.LineItems(model.lineItems, {\r\n budgetId: model.id\r\n });\r\n return model;\r\n },\r\n addLineItems: function (lineItems, callback) {\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.id\r\n },\r\n {\r\n endpoint: 'lineitems'\r\n }\r\n ]),\r\n isAPIv2: true,\r\n data: lineItems\r\n }).post().done(_.bind(function (data) {\r\n PJQ.notifications.notify.successNotify({\r\n message: 'Budget line items added'\r\n });\r\n this.lineItems.add(data, {merge: true});\r\n if (typeof callback === 'function') {\r\n callback(true);\r\n }\r\n }, this)).fail(function () {\r\n PJQ.notifications.notify.errorNotify({\r\n message: 'Failed to add budget line items'\r\n });\r\n if (typeof callback === 'function') {\r\n callback(false);\r\n }\r\n });\r\n },\r\n processImport: function (uploadId, callback) {\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: PJQ.app.session.project.id,\r\n },\r\n {\r\n endpoint: 'budgets'\r\n },\r\n {\r\n endpoint: 'lineitems'\r\n },\r\n {\r\n endpoint: 'import',\r\n value: uploadId\r\n }\r\n ]),\r\n isAPIv2: true\r\n }).post().done(_.bind(function (data) {\r\n if (typeof callback === 'function') {\r\n callback(data);\r\n }\r\n }, this)).fail(function () {\r\n if (typeof callback === 'function') {\r\n callback(null);\r\n }\r\n });\r\n },\r\n fetchForView: function (viewId, callback) {\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.id\r\n },\r\n {\r\n endpoint: 'views',\r\n value: viewId\r\n }\r\n ]),\r\n isAPIv2: true\r\n }).get().done(_.bind(function (data) {\r\n if (typeof callback === 'function') {\r\n callback(data);\r\n }\r\n }, this)).fail(function () {\r\n if (typeof callback === 'function') {\r\n callback(null);\r\n }\r\n });\r\n },\r\n updateLocked: function (isLocked, callback) {\r\n let startLocked = this.get('isLocked');\r\n if (startLocked !== isLocked) {\r\n this.set('isLocked', isLocked);\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.get('id')\r\n }\r\n ]),\r\n isAPIv2: true,\r\n data: this.toJSON()\r\n }).patch().done(_.bind(_.bind(function (data) {\r\n PJQ.notifications.notify.successNotify({\r\n message: 'Budget locked'\r\n });\r\n if (typeof callback === 'function') {\r\n callback(true);\r\n }\r\n }, this))).fail(_.bind(function () {\r\n this.set('isLocked', startLocked);\r\n PJQ.notifications.notify.errorNotify({\r\n message: 'Failed to lock budget'\r\n });\r\n if (typeof callback === 'function') {\r\n callback(false);\r\n }\r\n }, this));\r\n }\r\n },\r\n makeERPUrl: function (integration) {\r\n let externalId = this.externalId();\r\n if (_.size(externalId) === 0) {\r\n return '';\r\n }\r\n\r\n switch (integration.get('name')) {\r\n default:\r\n return '';\r\n }\r\n },\r\n});\r\n\r\nPJQ.models.budget.BudgetModification = PJQ.models.BaseModel.extend({\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.get('budgetId')\r\n },\r\n {\r\n endpoint: 'modifications'\r\n }\r\n ]);\r\n }\r\n});\r\n\r\nPJQ.models.budget.SubJob = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n if (this.id > 0) {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'subjobs',\r\n value: this.id\r\n }\r\n ]);\r\n }\r\n\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.get('projectId')\r\n },\r\n {\r\n endpoint: 'subjobs',\r\n value: this.id\r\n }\r\n ]);\r\n }\r\n});\r\n\r\nPJQ.models.budget.CostCode = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n if (this.get('projectId') > 0 && !(this.id > 0)) {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.get('projectId')\r\n },\r\n {\r\n endpoint: 'costcodes',\r\n value: this.id\r\n }\r\n ]);\r\n }\r\n\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'costcodes',\r\n value: this.id\r\n }\r\n ]);\r\n },\r\n getDisplayName: function () {\r\n let name = this.get('name');\r\n if (_.size(name) > 0) {\r\n return this.get('code') + ' - ' + name\r\n }\r\n return this.get('code');\r\n },\r\n syncERP: function (callback) {\r\n new PJQ.ajax.Request({\r\n endpoint: this.endpoint() + '/syncerp',\r\n isAPIv2: true,\r\n }).post().done(_.bind(function (res) {\r\n if (res && _.size(res.externalId) > 0) {\r\n this.set('externalObject', res);\r\n }\r\n if (typeof callback === 'function') {\r\n callback(res);\r\n }\r\n }, this)).fail(_.bind(function (xhr, err, result) {\r\n callback(null, err);\r\n }, this));\r\n },\r\n unlinkERP: function (callback) {\r\n new PJQ.ajax.Request({\r\n endpoint: this.endpoint() + '/unlinkerp',\r\n isAPIv2: true,\r\n }).post().done(_.bind(function () {\r\n this.set('externalId', null);\r\n if (typeof callback === 'function') {\r\n callback(true);\r\n }\r\n }, this)).fail(_.bind(function (xhr) {\r\n if (typeof callback === 'function') {\r\n let err;\r\n if (xhr.responseJSON != null) {\r\n err = xhr.responseJSON.type;\r\n } else {\r\n err = null;\r\n }\r\n callback(false, err);\r\n }\r\n }, this));\r\n }\r\n});\r\n\r\nPJQ.models.budget.TaxCode = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'taxcodes',\r\n value: this.id\r\n }\r\n ]);\r\n }\r\n});\r\n\r\nPJQ.models.budget.CostType = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'costtypes',\r\n value: this.id\r\n }\r\n ]);\r\n }\r\n});\r\n\r\nPJQ.models.budget.UnitOfMeasure = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'unitsofmeasure',\r\n value: this.id\r\n }\r\n ]);\r\n }\r\n});\r\n\r\nPJQ.models.budget.BillingPeriodSettings = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'projectId',\r\n endpoint: function () {\r\n let params = []\r\n if (this.get('allowAutomate')) {\r\n params.push({\r\n parameter: 'allowAutomate',\r\n value: true\r\n });\r\n }\r\n\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.get('projectId')\r\n },\r\n {\r\n endpoint: 'billingperiods'\r\n },\r\n {\r\n endpoint: 'settings'\r\n }\r\n ], params);\r\n },\r\n parse: function (model) {\r\n if (model) {\r\n this.billingPeriods = new PJQ.collections.budget.BillingPeriods(model.billingPeriods);\r\n }\r\n return model;\r\n },\r\n afterSave: function () {\r\n this.isFetched = false;\r\n }\r\n});\r\n\r\nPJQ.models.budget.BillingPeriod = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.get('projectId') ? this.get('projectId') : this.options.projectId\r\n },\r\n {\r\n endpoint: 'billingperiods',\r\n value: this.id\r\n }\r\n ]);\r\n },\r\n // openPeriod: function (callback) {\r\n // new PJQ.ajax.Request({\r\n // endpoint: this.endpoint() + '/open',\r\n // isAPIv2: true\r\n // }).put().done(_.bind(function (res) {\r\n // PJQ.notifications.notify.successNotify({\r\n // message: 'Billing period opened'\r\n // });\r\n // if (typeof callback === 'function') {\r\n // callback(res);\r\n // }\r\n // }, this)).fail(_.bind(function (xhr, err, result) {\r\n // PJQ.notifications.notify.errorNotify({\r\n // message: 'Failed to open billing period'\r\n // });\r\n // }, this));\r\n // },\r\n // closePeriod: function (callback) {\r\n // new PJQ.ajax.Request({\r\n // endpoint: this.endpoint() + '/close',\r\n // isAPIv2: true\r\n // }).put().done(_.bind(function (res) {\r\n // PJQ.notifications.notify.successNotify({\r\n // message: 'Billing period closed'\r\n // });\r\n // if (typeof callback === 'function') {\r\n // callback(res);\r\n // }\r\n // }, this)).fail(_.bind(function (xhr, err, result) {\r\n // PJQ.notifications.notify.errorNotify({\r\n // message: 'Failed to close billing period'\r\n // });\r\n // }, this));\r\n // }\r\n});\r\n\r\nPJQ.models.budget.BudgetView = PJQ.models.BaseModel.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n idAttribute: 'id',\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'settings',\r\n value: 'budgets'\r\n },\r\n {\r\n endpoint: 'views',\r\n value: this.id\r\n }\r\n ]);\r\n },\r\n parse: function (model) {\r\n if (!model)\r\n return model;\r\n\r\n if (model.columns) {\r\n this.columns = new PJQ.collections.budget.ViewColumns(model.columns);\r\n }\r\n\r\n return model;\r\n },\r\n beforeSave: function () {\r\n _.each(this.columns.models, function (column) {\r\n if (column.get('type') === PJQ.constants.budgetHelpers.columnTypes.CALCULATED) {\r\n let options = {\r\n sources: column.calculations.toJSON()\r\n }\r\n column.set('options', options);\r\n }\r\n })\r\n this.set('columns', this.columns.toJSON());\r\n }\r\n});\r\n\r\nPJQ.models.budget.ViewColumn = PJQ.models.BaseModel.extend({\r\n parse: function (model) {\r\n if (!model)\r\n return;\r\n\r\n if (model.options) {\r\n if (model.options.sources && model.type === PJQ.constants.budgetHelpers.columnTypes.CALCULATED) {\r\n this.calculations = new PJQ.collections.budget.ViewColumnCalculations(model.options.sources);\r\n } else {\r\n this.calculations = new PJQ.collections.budget.ViewColumnCalculations();\r\n }\r\n }\r\n\r\n return model;\r\n }\r\n});\r\n\r\nPJQ.models.budget.ViewColumnCalculation = PJQ.models.BaseModel.extend();\r\n\r\n// Collections\r\nPJQ.collections.budget.TaxCodes = PJQ.collections.BaseCollection.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n model: PJQ.models.budget.TaxCode,\r\n endpoint: function () {\r\n if (this.options.projectId > 0) {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.options.projectId\r\n },\r\n {\r\n endpoint: 'taxcodes'\r\n }\r\n ]);\r\n } else {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'taxcodes'\r\n }\r\n ]);\r\n }\r\n }\r\n});\r\n\r\nPJQ.collections.budget.SubJobs = PJQ.collections.BaseCollection.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n model: PJQ.models.budget.SubJob,\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.options.projectId\r\n },\r\n {\r\n endpoint: 'subjobs'\r\n }\r\n ]);\r\n },\r\n});\r\n\r\nPJQ.collections.budget.CostTypes = PJQ.collections.BaseCollection.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n model: PJQ.models.budget.CostType,\r\n endpoint: function () {\r\n if (this.options.projectId > 0) {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.options.projectId\r\n },\r\n {\r\n endpoint: 'costtypes'\r\n }\r\n ]);\r\n } else {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'costtypes'\r\n }\r\n ]);\r\n }\r\n }\r\n});\r\n\r\nPJQ.collections.budget.CostCodes = PJQ.collections.BaseCollection.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n model: PJQ.models.budget.CostCode,\r\n endpoint: function () {\r\n if (this.options.projectId > 0) {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.options.projectId\r\n },\r\n {\r\n endpoint: 'costcodes'\r\n }\r\n ]);\r\n } else {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'costcodes'\r\n }\r\n ]);\r\n }\r\n },\r\n hasDivisions: function () {\r\n return null != _.find(this.models, function (costCode) {\r\n return _.size(costCode.get('division')) > 0;\r\n })\r\n },\r\n getForDivision: function (division) {\r\n let dSearch = (_.size(division) === 0 || division.toLowerCase() === 'no division') ? '' : division,\r\n empty = _.size(dSearch) === 0;\r\n return _.filter(this.models, (c) => {\r\n let div = c.get('division');\r\n return (empty && _.size(div) === 0) || div === dSearch;\r\n });\r\n },\r\n getDivisions: function () {\r\n return _.uniq(_.map(this.models, function (costCode) {\r\n return costCode.get('division') ?? '';\r\n }));\r\n },\r\n processImport: function (uploadId, projectId, callback) {\r\n let endpointArr = [];\r\n if (projectId > 0) {\r\n endpointArr.push({\r\n endpoint: 'projects',\r\n value: projectId\r\n });\r\n }\r\n\r\n endpointArr.push(...[\r\n {\r\n endpoint: 'costcodes'\r\n },\r\n {\r\n endpoint: 'import',\r\n value: uploadId\r\n }\r\n ]);\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint(endpointArr),\r\n isAPIv2: true\r\n }).post().done(_.bind(function (data) {\r\n if (typeof callback === 'function') {\r\n callback(data);\r\n }\r\n }, this)).fail(function () {\r\n if (typeof callback === 'function') {\r\n callback(null);\r\n }\r\n });\r\n },\r\n saveBulk: function (costCodes, subJobId, callback) {\r\n if (_.size(costCodes) > 0) {\r\n let params = [];\r\n if (subJobId > 0) {\r\n params.push({\r\n parameter: 'subJobId',\r\n value: subJobId\r\n })\r\n }\r\n\r\n let endpointArr = [];\r\n if (this.options.projectId > 0) {\r\n endpointArr.push({\r\n endpoint: 'projects',\r\n value: this.options.projectId\r\n });\r\n }\r\n\r\n endpointArr.push(...[\r\n {\r\n endpoint: 'costcodes'\r\n },\r\n {\r\n endpoint: 'bulk'\r\n }\r\n ]);\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint(endpointArr, params),\r\n isAPIv2: true,\r\n data: {\r\n costCodes: costCodes\r\n }\r\n }).post().done(_.bind(function (data) {\r\n this.add(data);\r\n if (typeof callback === 'function') {\r\n callback(data);\r\n }\r\n }, this)).fail(function () {\r\n if (typeof callback === 'function') {\r\n callback(null);\r\n }\r\n });\r\n }\r\n },\r\n pushERP: function (callback) {\r\n new PJQ.ajax.Request({\r\n endpoint: this.endpoint() + '/syncerp',\r\n isAPIv2: true\r\n }).post().done(_.bind(function (res) {\r\n if (PJQ.helpers.objectHelpers.refinedType(res) === 'array') {\r\n _.each(res, function (cc) {\r\n let model = this.get(cc.id);\r\n if (model != null) {\r\n model.set('externalObject', cc.externalObject, {silent: true});\r\n }\r\n }, this)\r\n }\r\n if (typeof callback === 'function') {\r\n callback(res);\r\n }\r\n }, this)).fail(_.bind(function (xhr, err, result) {\r\n if (typeof callback === 'function') {\r\n callback(false, err);\r\n }\r\n }, this));\r\n },\r\n deleteAll: function (callback) {\r\n new PJQ.ajax.Request({\r\n endpoint: this.endpoint(),\r\n isAPIv2: true\r\n }).delete().done(_.bind(function (res) {\r\n if (typeof callback === 'function') {\r\n callback(res);\r\n }\r\n }, this)).fail(_.bind(function (xhr, err, result) {\r\n if (typeof callback === 'function') {\r\n callback(false, err);\r\n }\r\n }, this));\r\n }\r\n});\r\n\r\nPJQ.collections.budget.UnitsOfMeasure = PJQ.collections.BaseCollection.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n model: PJQ.models.budget.UnitOfMeasure,\r\n endpoint: function () {\r\n if (this.options.projectId > 0) {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.options.projectId\r\n },\r\n {\r\n endpoint: 'unitsofmeasure'\r\n }\r\n ]);\r\n } else {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'unitsofmeasure'\r\n }\r\n ]);\r\n }\r\n }\r\n});\r\n\r\nPJQ.collections.budget.BillingPeriods = PJQ.collections.BaseCollection.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n model: PJQ.models.budget.BillingPeriod\r\n});\r\n\r\nPJQ.collections.budget.LineItems = PJQ.collections.BaseCollection.extend({\r\n model: PJQ.models.budget.LineItem\r\n});\r\n\r\nPJQ.collections.budget.BudgetModifications = PJQ.collections.BaseCollection.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n model: PJQ.models.budget.BudgetModification,\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.options.budgetId\r\n },\r\n {\r\n endpoint: 'modifications'\r\n }\r\n ]);\r\n }\r\n});\r\n\r\nPJQ.collections.budget.ViewColumns = PJQ.collections.BaseCollection.extend({\r\n model: PJQ.models.budget.ViewColumn\r\n});\r\n\r\nPJQ.collections.budget.ViewColumnCalculations = PJQ.collections.BaseCollection.extend({\r\n model: PJQ.models.budget.ViewColumnCalculation\r\n});\r\n\r\nPJQ.collections.budget.ForecastLineItems = PJQ.collections.BaseCollection.extend({\r\n model: PJQ.models.budget.ForecastLineItem\r\n});\r\n\r\nPJQ.collections.budget.BudgetViews = PJQ.collections.BaseCollection.extend({\r\n model: PJQ.models.budget.BudgetView,\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'settings',\r\n value: 'budgets'\r\n },\r\n {\r\n endpoint: 'views'\r\n }\r\n ]);\r\n }\r\n});\r\n\r\nPJQ.collections.budget.Snapshots = PJQ.collections.BaseCollection.extend({\r\n defaults: {\r\n isAPIv2: true\r\n },\r\n endpoint: function () {\r\n return PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: this.options.projectId\r\n },\r\n {\r\n endpoint: 'budgets'\r\n },\r\n {\r\n endpoint: 'snapshots'\r\n }\r\n ]);\r\n }\r\n});\r\n","PJQ.views.budget.AddBudgetModificationsModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-add-budget-modifications'),\r\n subTemplates: {\r\n modification: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'add-budget-modification')\r\n },\r\n maxWidth: 800,\r\n isShowCloseButton: true,\r\n onSave: _.noop\r\n },\r\n events: {\r\n 'click .btn-save': 'save',\r\n 'click .btn-add-modification': 'addModification'\r\n },\r\n beforeModalCreated: async function () {\r\n this.isFetched = false;\r\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\r\n this.budget = this.options.budget;\r\n\r\n this.costCodes = await this.options.project.fetchCostCodes();\r\n this.costTypes = await this.options.project.fetchCostTypes();\r\n\r\n this.collection = new PJQ.collections.budget.BudgetModifications();\r\n this.isFetched = true;\r\n this.render();\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n this.lineItemChoices = _.sortBy(_.map(this.budget.lineItems.models, (item) => {\r\n let costCode = this.costCodes.get(item.get('costCodeId')),\r\n costType = this.costTypes.get(item.get('costTypeId'));\r\n return {\r\n id: item.id,\r\n costCode: costCode,\r\n costType: costType,\r\n name: '' + costCode.getDisplayName() + ' - ' + costType.get('name')\r\n };\r\n }), (choice) => {\r\n return choice.costCode.getDisplayName() + ' ' + choice.costType.get('name');\r\n });\r\n\r\n if (_.size(this.collection.models) === 0) {\r\n this.addModification();\r\n }\r\n },\r\n addModification: function () {\r\n let model = new PJQ.models.budget.BudgetModification({\r\n budgetId: this.budget.id,\r\n fromLineItemId: null,\r\n toLineItemId: null,\r\n amount: 0,\r\n notes: ''\r\n });\r\n\r\n this.collection.add(model);\r\n this.renderModification(model);\r\n },\r\n renderModification: function (model) {\r\n this.renderSubTemplate(true, this.options.subTemplates.modification, this.$('.budget-modifications'), {\r\n model: model,\r\n costCodes: this.costCodes,\r\n costTypes: this.costTypes,\r\n lineItems: this.budget.lineItems.models\r\n }, _.bind(function (el) {\r\n PJQ.helpers.inputHelpers.inputMaskCurrency(el.find('.input-dollars-full'), 2);\r\n new PJQ.Binder(el, model, {\r\n watchElements: [\r\n 'input'\r\n ]\r\n });\r\n\r\n model.fromSelect = new PJQ.inputs.Selectpicker({\r\n el: el.find('.line-item-from'),\r\n choices: this.lineItemChoices,\r\n noneSelectedText: 'Select Line Item',\r\n isLiveSearch: true,\r\n onChange: _.bind(function (value) {\r\n model.set('fromLineItemId', value);\r\n }, this),\r\n defaultValue: null\r\n });\r\n\r\n model.toSelect = new PJQ.inputs.Selectpicker({\r\n el: el.find('.line-item-to'),\r\n choices: this.lineItemChoices,\r\n isLiveSearch: true,\r\n noneSelectedText: 'Select Line Item',\r\n onChange: _.bind(function (value) {\r\n model.set('toLineItemId', value);\r\n }, this),\r\n defaultValue: null\r\n });\r\n }, this));\r\n },\r\n save: function () {\r\n let fnRender = _.bind(function () {\r\n if (typeof this.options.onSave === 'function') {\r\n this.options.onSave(this.collection.models);\r\n }\r\n this.removeModal();\r\n }, this)\r\n\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets',\r\n value: this.budget.id\r\n },\r\n {\r\n endpoint: 'modifications'\r\n }\r\n ]),\r\n isAPIv2: true,\r\n data: this.collection.models\r\n }).post().done(_.bind(_.bind(function () {\r\n fnRender();\r\n }, this)));\r\n }\r\n});\r\n\r\nPJQ.views.budget.ViewBudgetModificationsModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-view-budget-modifications'),\r\n maxWidth: 1000,\r\n isShowCloseButton: true,\r\n onSave: _.noop,\r\n lineItem: null\r\n },\r\n events: {},\r\n beforeModalCreated: function () {\r\n this.collection = new PJQ.collections.budget.BudgetModifications(null, {\r\n budgetId: this.options.budget.id\r\n });\r\n this.collection.fetch({\r\n success: _.bind(function () {\r\n PJQ.app.session.project.fetchCostTypes(_.bind(function (costTypes) {\r\n this.costTypes = costTypes;\r\n PJQ.app.session.project.fetchCostCodes(_.bind(function (costCodes) {\r\n this.costCodes = costCodes;\r\n this.render();\r\n }, this));\r\n }, this));\r\n }, this)\r\n });\r\n },\r\n renderData: function () {\r\n return {}\r\n },\r\n afterRender: function () {\r\n if (this.collection != null && this.collection.isFetched) {\r\n let fnLineItemRow = _.bind(function (data, type, row) {\r\n let lineItem = this.options.budget.lineItems.get(data);\r\n if (lineItem != null) {\r\n let costCode = this.costCodes.get(lineItem.get('costCodeId'));\r\n let costType = this.costTypes.get(lineItem.get('costTypeId'));\r\n\r\n return costCode.get('name') + ' - ' + costType.get('code');\r\n }\r\n return 'N/A';\r\n }, this);\r\n\r\n let filteredData = this.options.lineItem != null ? _.filter(this.collection.models, function (model) {\r\n return model.get('fromLineItemId') === this.options.lineItem.id || model.get('toLineItemId') === this.options.lineItem.id\r\n }, this) : this.collection.models;\r\n new PJQ.views.dataTables.DataTable({\r\n el: this.$('.modifications-table'),\r\n data: filteredData,\r\n rowId: \"id\",\r\n paging: _.size(filteredData) > 10,\r\n order: [0, 'asc'],\r\n language: {\r\n zeroRecords: 'This line item has no budget modifications'\r\n },\r\n columns: [\r\n {\r\n \"data\": \"attributes.fromLineItemId\",\r\n \"title\": \"From\",\r\n \"minWidth\": 200,\r\n \"render\": fnLineItemRow\r\n },\r\n {\r\n \"data\": \"attributes.toLineItemId\",\r\n \"title\": \"To\",\r\n \"minWidth\": 200,\r\n \"render\": fnLineItemRow\r\n },\r\n {\r\n \"data\": \"attributes.amount\",\r\n \"title\": \"Amount\",\r\n \"width\": 150,\r\n \"render\": _.bind(function (data, type, row) {\r\n let extraClasses = '';\r\n if (this.options.lineItem != null) {\r\n if ((row.get('fromLineItemId') === this.options.lineItem.id && row.get('amount') < 0)\r\n || (row.get('toLineItemId') === this.options.lineItem.id && row.get('amount') > 0)) {\r\n extraClasses = 'text-success';\r\n } else {\r\n extraClasses = 'text-danger';\r\n }\r\n }\r\n return '' + PJQ.helpers.formatHelpers.formatCurrency(data) + '';\r\n }, this)\r\n },\r\n {\r\n \"data\": \"attributes.notes\",\r\n \"title\": \"Notes\"\r\n }\r\n ]\r\n })\r\n }\r\n }\r\n});","PJQ.views.budget.BudgetsViewsEditorModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-view-editor'),\r\n subTemplates: {\r\n columns: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'column-editor-columns'),\r\n columnEditorEmpty: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'view-column-editor-empty')\r\n },\r\n maxWidth: '900',\r\n maxHeight: '600',\r\n onSave: null,\r\n onDelete: null\r\n },\r\n events: {\r\n 'click .btn-create-view': 'createView',\r\n 'click .budget-view-option': 'changeTemplate',\r\n 'click .btn-return': 'viewBudgetViews',\r\n 'click .btn-save': 'saveView',\r\n 'click .btn-edit-columns': 'configureColumns',\r\n 'click .btn-cancel': 'cancelColumnEdit',\r\n 'click .budget-view-column': 'editColumnClicked',\r\n 'click .btn-delete-column': 'deleteColumn',\r\n 'click .create-source': 'createSourceColumn',\r\n 'click .create-calculated': 'createCalculatedColumn',\r\n 'click .edit-view': 'editViewClicked',\r\n 'click .delete-view': 'deleteViewClicked',\r\n 'click .set-default-view': 'defaultViewClicked'\r\n },\r\n modes: {\r\n CREATE: 'CREATE',\r\n EDIT: 'EDIT',\r\n VIEW: 'VIEW'\r\n },\r\n beforeModalCreated: function () {\r\n let blankView = new PJQ.models.budget.BudgetView({\r\n name: \"Blank View\",\r\n description: 'Blank view with minimum amount of columns.',\r\n companyId: -1,\r\n columns: []\r\n });\r\n\r\n this.budgetViews = new PJQ.collections.budget.BudgetViews();\r\n this.mode = this.options.mode ? this.options.mode : this.modes.VIEW;\r\n if (!this.budgetViews.isFetched) {\r\n this.budgetViews.fetch({\r\n success: _.bind(function () {\r\n this.budgetViews.add(blankView);\r\n this.render();\r\n }, this)\r\n })\r\n } else {\r\n this.render();\r\n }\r\n },\r\n renderData: function () {\r\n return {\r\n budgetViews: this.budgetViews,\r\n budgetView: this.budgetView,\r\n mode: this.mode,\r\n modes: this.modes,\r\n template: this.template\r\n }\r\n },\r\n afterRender: function () {\r\n new PJQ.Binder(this.$el, this.budgetView, {\r\n watchElements: [\r\n 'input'\r\n ]\r\n });\r\n\r\n if (this.mode === this.modes.VIEW) {\r\n this.renderViewMode();\r\n } else if (this.mode === this.modes.EDIT) {\r\n this.renderEditMode();\r\n } else if (this.mode === this.modes.CREATE) {\r\n this.renderCreateMode();\r\n }\r\n },\r\n renderEditMode: function () {\r\n this.renderColumns();\r\n this.renderColumnConfiguration()\r\n },\r\n renderCreateMode: function () {\r\n this.templateColumnTable = new PJQ.views.dataTables.DataTable({\r\n el: this.$('.views-columns-table'),\r\n data: this.template.get('columns'),\r\n rowId: \"cid\",\r\n isHideSearch: true,\r\n paging: false,\r\n order: [0, 'asc'],\r\n language: {\r\n zeroRecords: 'No columns'\r\n },\r\n scrollY: \"40vh\",\r\n scrollCollapse: true,\r\n columns: [\r\n {\r\n \"data\": \"name\",\r\n \"title\": \"Column Name\",\r\n \"width\": \"50%\"\r\n },\r\n {\r\n \"data\": \"type\",\r\n \"title\": \"Type\",\r\n \"width\": \"50%\"\r\n }\r\n ]\r\n })\r\n },\r\n renderViewMode: function () {\r\n this.dataTable = new PJQ.views.dataTables.DataTable({\r\n el: this.$('.views-table'),\r\n data: _.filter(this.budgetViews.models, function (model) {\r\n if (model.get('companyId') !== -1) {\r\n return model;\r\n }\r\n }),\r\n rowId: \"cid\",\r\n isHideSearch: true,\r\n paging: false,\r\n order: [1, 'asc'],\r\n language: {\r\n zeroRecords: 'No custom views exist. Press \"Create View\" to get started.'\r\n },\r\n scrollY: \"40vh\",\r\n scrollCollapse: true,\r\n onRowDoubleClick: _.bind(function (row) {\r\n this.editView(row.data());\r\n }, this),\r\n contextMenuOptions: {\r\n actions: [\r\n {\r\n name: 'Edit View',\r\n isShown: _.bind(function (row) {\r\n return true;\r\n }, this),\r\n onClick: _.bind(function (row) {\r\n this.editView(row.data());\r\n }, this)\r\n },\r\n {\r\n name: 'Set as Default View',\r\n isShown: _.bind(function (row) {\r\n return !row.get('isDefault');\r\n }, this),\r\n onClick: _.bind(function (row) {\r\n this.setViewIsDefault(row.data());\r\n }, this)\r\n },\r\n {\r\n name: 'Delete View',\r\n isDanger: true,\r\n isShown: _.bind(function (row) {\r\n return !row.get('isDefault');\r\n }, this),\r\n onClick: _.bind(function (row) {\r\n this.deleteView(row.data());\r\n }, this)\r\n }\r\n ]\r\n },\r\n columns: [\r\n {\r\n \"data\": null,\r\n \"title\": '',\r\n \"orderable\": false,\r\n \"render\": _.bind(function (data, type, row) {\r\n let icons = [];\r\n\r\n if (row.get('isDefault')) {\r\n icons.push(\"\");\r\n }\r\n\r\n return '
' + icons.join('') + '
';\r\n }, this)\r\n },\r\n {\r\n \"data\": \"attributes.name\",\r\n \"title\": \"View Name\"\r\n },\r\n {\r\n \"data\": \"attributes.description\",\r\n \"title\": \"View Description\"\r\n },\r\n {\r\n \"data\": \"\",\r\n \"title\": \"\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"width\": \"160px\",\r\n \"render\": _.bind(function (data, type, row) {\r\n let html = '
';\r\n if (!row.get('isDefault')) {\r\n html += '' +\r\n '' +\r\n '
';\r\n } else {\r\n html += ''\r\n }\r\n return html;\r\n }, this)\r\n }\r\n ]\r\n });\r\n },\r\n setModalWidth: function (width) {\r\n this.options.maxWidth = width;\r\n this.$('.modal-dialog').animate({\r\n maxWidth: width\r\n }, 200);\r\n },\r\n createView: function () {\r\n this.budgetView = new PJQ.models.budget.BudgetView({\r\n name: \"\",\r\n description: \"\",\r\n isDefault: false\r\n });\r\n this.mode = this.modes.CREATE;\r\n this.template = this.budgetViews.models[0];\r\n this.render();\r\n this.setModalWidth(1000);\r\n },\r\n defaultViewClicked: function (e) {\r\n let target = $(e.currentTarget),\r\n view = this.dataTable.getRow(target.closest('tr')).data();\r\n this.setViewIsDefault(view);\r\n },\r\n setViewIsDefault: function (view, isDefault = true) {\r\n let currentDefault = _.find(this.budgetViews.models, function (model) {\r\n return model.get('isDefault');\r\n }, this)\r\n\r\n if (currentDefault != null) {\r\n currentDefault.set('isDefault', false);\r\n }\r\n view.set('isDefault', isDefault);\r\n view.save(null, {\r\n success: _.bind(function () {\r\n this.dataTable.refresh();\r\n PJQ.notifications.notify.successNotify({\r\n message: 'Default View Changed'\r\n });\r\n }, this)\r\n })\r\n },\r\n editViewClicked: function (e) {\r\n let target = $(e.currentTarget),\r\n view = this.dataTable.getRow(target.closest('tr')).data();\r\n this.editView(view);\r\n },\r\n editView: function (view) {\r\n this.mode = this.modes.EDIT;\r\n this.budgetView = view;\r\n let fnRender = _.bind(function () {\r\n this.render();\r\n this.setModalWidth(1000);\r\n }, this)\r\n if (!this.budgetView.isNew() && !this.budgetView.isFetched) {\r\n this.budgetView.fetch({\r\n success: _.bind(function () {\r\n fnRender();\r\n }, this)\r\n })\r\n } else {\r\n fnRender();\r\n }\r\n },\r\n viewBudgetViews: function () {\r\n if (this.budgetView != null && this.budgetView.hasChanged()) {\r\n new PJQ.views.modals.SaveDontSave({\r\n header: \"Unsaved Changes\",\r\n body: \"Do you want to save changes?\",\r\n onSave: _.bind(function () {\r\n this.saveView()\r\n }, this),\r\n onDontSave: _.bind(function () {\r\n this.budgetView.restore();\r\n this.budgetView = null;\r\n this.mode = this.modes.VIEW;\r\n this.render();\r\n this.setModalWidth(900);\r\n }, this)\r\n });\r\n } else {\r\n this.mode = this.modes.VIEW;\r\n this.render();\r\n this.setModalWidth(900);\r\n }\r\n\r\n },\r\n changeTemplate: function (e) {\r\n let $target = $(e.currentTarget),\r\n cid = $target.data('cid');\r\n this.template = this.budgetViews.get(cid);\r\n this.render();\r\n },\r\n saveView: function () {\r\n if (this.validate()) {\r\n if (this.mode === this.modes.CREATE && this.template != null) {\r\n this.budgetView.columns = new PJQ.collections.budget.ViewColumns(this.template.columns.models);\r\n this.mode = this.modes.EDIT;\r\n this.render();\r\n } else {\r\n let isNew = this.budgetView.isNew();\r\n this.budgetView.save(null, {\r\n success: _.bind(function () {\r\n if (isNew) {\r\n this.budgetViews.add(this.budgetView);\r\n }\r\n this.mode = this.modes.VIEW;\r\n this.render();\r\n this.setModalWidth(900);\r\n PJQ.notifications.notify.successNotify({\r\n message: \"View successfully saved\"\r\n });\r\n\r\n if (typeof this.options.onSave === 'function') {\r\n this.options.onSave(this.budgetView, this.budgetViews);\r\n }\r\n }, this)\r\n })\r\n }\r\n }\r\n },\r\n deleteViewClicked: function (e) {\r\n let target = $(e.currentTarget),\r\n view = this.dataTable.getRow(target.closest('tr')).data();\r\n this.deleteView(view);\r\n },\r\n deleteView: function (view) {\r\n this.budgetViews.remove(view);\r\n view.destroy({\r\n success: _.bind(function () {\r\n if (typeof this.options.onDelete === 'function') {\r\n this.options.onDelete(view, this.budgetViews);\r\n }\r\n }, this)\r\n });\r\n this.render();\r\n },\r\n columnsSorted: function () {\r\n this.budgetView.columns.models = _.map(this.$('.budget-view-column'), function (el) {\r\n return this.budgetView.columns.get($(el).data('cid'));\r\n }, this);\r\n\r\n this.render();\r\n },\r\n cancelColumnEdit: function () {\r\n let columnsChanged = false;\r\n _.each(this.budgetView.columns.models, function (model) {\r\n if (model.hasChanged()) {\r\n columnsChanged = true;\r\n }\r\n }, this)\r\n if (columnsChanged) {\r\n new PJQ.views.modals.SaveDontSave({\r\n header: \"Unsaved Changes\",\r\n body: \"Do you want to save changes?\",\r\n onSave: _.bind(function () {\r\n this.saveView()\r\n }, this),\r\n onDontSave: _.bind(function () {\r\n this.mode = this.modes.EDIT;\r\n _.each(this.budgetView.columns.models, function (model) {\r\n if (model.hasChanged()) {\r\n model.restore();\r\n }\r\n }, this)\r\n this.render();\r\n }, this)\r\n });\r\n } else {\r\n this.mode = this.modes.EDIT;\r\n this.render();\r\n }\r\n },\r\n deleteColumn: function (e) {\r\n e.stopPropagation();\r\n\r\n let $target = $(e.currentTarget),\r\n $item = $target.closest('.budget-list-item'),\r\n cid = $target.closest('.budget-list-item').data('cid');\r\n this.budgetView.columns.remove(cid);\r\n $item.remove();\r\n },\r\n editColumnClicked: function (e) {\r\n let $target = $(e.currentTarget),\r\n cid = $target.data('cid'),\r\n column = this.budgetView.columns.get(cid);\r\n\r\n this.$('.selected-list-item').removeClass('selected-list-item');\r\n $target.addClass('selected-list-item');\r\n\r\n this.editColumn(column);\r\n },\r\n editColumn: function (column) {\r\n // this.$('.selected-list-item').removeClass('selected-list-item');\r\n // $target.addClass('selected-list-item');\r\n this.renderColumnConfiguration(column);\r\n },\r\n renderColumns: function () {\r\n this.renderSubTemplate(false, this.options.subTemplates.columns, this.$('.select-budget-columns'), {\r\n budgetView: this.budgetView\r\n }, _.bind(function (el) {\r\n this.columnsSortable = new PJQ.Sortable(this.$('.modal-content'), {\r\n items: '.budget-view-column',\r\n connectWith: '.budget-view-column',\r\n onStop: _.bind(function () {\r\n this.columnsSorted();\r\n }, this)\r\n });\r\n }, this));\r\n },\r\n renderColumnConfiguration: function (column) {\r\n if (this.columnEditor) {\r\n this.columnEditor.remove()\r\n }\r\n\r\n let $editor = this.$('.column-config');\r\n if (column == null) {\r\n this.renderSubTemplate(true, this.options.subTemplates.columnEditorEmpty, $editor);\r\n return;\r\n }\r\n\r\n let $menuItem = $('.budget-list-item[data-cid=\"' + column.cid + '\"] .column-name');\r\n this.columnEditor = new PJQ.views.budget.ViewColumnEditor({\r\n el: $editor,\r\n column: column,\r\n budgetView: this.budgetView,\r\n onNameChange: function () {\r\n $menuItem.text(column.get('name'));\r\n }\r\n })\r\n },\r\n createSourceColumn: function () {\r\n let column = new PJQ.models.budget.ViewColumn({\r\n type: PJQ.constants.budgetHelpers.columnTypes.SOURCE,\r\n name: '',\r\n format: null,\r\n options: {}\r\n });\r\n this.budgetView.columns.add(column);\r\n this.editColumn(column);\r\n this.renderColumns();\r\n },\r\n createCalculatedColumn: function () {\r\n let column = new PJQ.models.budget.ViewColumn({\r\n type: PJQ.constants.budgetHelpers.columnTypes.CALCULATED,\r\n name: '',\r\n format: PJQ.constants.budgetHelpers.columnFormats.MONEY,\r\n options: {}\r\n })\r\n this.budgetView.columns.add(column);\r\n this.editColumn(column);\r\n this.renderColumns();\r\n },\r\n validate: function () {\r\n let isValid = true;\r\n if (this.mode === this.modes.EDIT) {\r\n _.each(this.budgetView.columns.models, function (model) {\r\n let $menuItem = $('.budget-list-item[data-cid=\"' + model.cid + '\"]');\r\n $menuItem.removeClass('budget-list-item-error')\r\n let markInvalid = _.bind(function (model) {\r\n $menuItem.addClass('budget-list-item-error')\r\n }, this)\r\n if (model.get('type') === PJQ.constants.budgetHelpers.columnTypes.CALCULATED) {\r\n _.each(model.calculations.models, function (calc, index) {\r\n if (calc.get('source') == null) {\r\n isValid = false;\r\n markInvalid(model);\r\n }\r\n\r\n if (index > 0 && calc.get('operator') == null) {\r\n isValid = false;\r\n markInvalid(model);\r\n }\r\n }, this)\r\n } else if (model.get('source') == null) {\r\n isValid = false;\r\n markInvalid(model);\r\n }\r\n\r\n if (_.size(model.get('format')) === 0 &&\r\n model.get('source') !== \"GroupName\" &&\r\n model.get('source') !== \"CostTypeId\" &&\r\n model.get('source') !== \"Notes\") {\r\n isValid = false;\r\n markInvalid(model);\r\n }\r\n }, this)\r\n }\r\n return isValid;\r\n }\r\n});\r\n\r\nPJQ.views.budget.ViewColumnEditor = PJQ.views.BaseView.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'view-column-editor'),\r\n subTemplates: {\r\n calculation: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'view-calculation')\r\n },\r\n onNameChange: null\r\n },\r\n events: {\r\n 'keyup .view-name': 'nameChanged',\r\n 'click .btn-add-calculation': 'addCalculation',\r\n 'click .btn-remove-calculation': 'deleteCalculation'\r\n },\r\n beforeFirstRender: function () {\r\n this.column = this.options.column;\r\n this.budgetView = this.options.budgetView;\r\n\r\n this.isFetched = false;\r\n PJQ.app.session.fetchERPIntegration(_.bind(function (erp) {\r\n this.erpIntegration = erp;\r\n this.isFetched = true;\r\n this.render();\r\n }, this));\r\n },\r\n renderData: function () {\r\n return {\r\n column: this.column,\r\n isFetched: this.isFetched\r\n }\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n new PJQ.Binder(this.$el, this.column, {\r\n watchElements: [\r\n 'input'\r\n ]\r\n });\r\n\r\n if (_.size(this.column.get('name')) === 0) {\r\n this.$('.view-name').focus();\r\n }\r\n\r\n if (_.size(this.column.get('format')) === 0) {\r\n this.column.set('format', 'money');\r\n }\r\n\r\n new PJQ.inputs.Selectpicker({\r\n el: this.$('.select-format'),\r\n defaultValue: this.column.get('format'),\r\n onChange: _.bind(function (value) {\r\n this.column.set('format', value);\r\n }, this)\r\n });\r\n\r\n if (this.column.get('type') === PJQ.constants.budgetHelpers.columnTypes.CALCULATED) {\r\n this.renderCalculations();\r\n } else if (this.column.get('type') === PJQ.constants.budgetHelpers.columnTypes.SOURCE) {\r\n let source = this.column.get('source'),\r\n choices = _.map(PJQ.constants.budgetHelpers.getColumnSources(), function (source) {\r\n return {\r\n id: source.source,\r\n name: source.name + (source.isErp ? ('ERP') : '')\r\n };\r\n });\r\n new PJQ.inputs.Selectpicker({\r\n el: this.$('.select-source'),\r\n defaultValue: source,\r\n choices: choices,\r\n onChange: _.bind(function (value) {\r\n let colSource = _.find(PJQ.constants.budgetHelpers.getColumnSources(), function (src) {\r\n return src.source === value;\r\n });\r\n if (_.size(this.column.get('name')) === 0) {\r\n this.column.set('name', colSource.name);\r\n this.$('.view-name', colSource.name);\r\n this.nameChanged();\r\n }\r\n\r\n this.column.set({\r\n source: value,\r\n format: colSource.format,\r\n options: {}\r\n });\r\n this.render();\r\n }, this)\r\n });\r\n\r\n new PJQ.inputs.Selectpicker({\r\n el: this.$('.source-status-filter'),\r\n noneSelectedText: 'No Status Filters',\r\n isMultiple: true,\r\n defaultValue: this.column.get('options') != null ? _.map(this.column.get('options').statuses, function (value) {\r\n return value.toString();\r\n }) : null,\r\n onChange: _.bind(function (value) {\r\n let statuses = _.map(value, function (id) {\r\n return parseInt(id);\r\n }, this),\r\n options = {\r\n \"statuses\": statuses\r\n }\r\n this.column.set('options', options);\r\n }, this),\r\n title: 'No Filters'\r\n });\r\n }\r\n },\r\n nameChanged: function () {\r\n if (typeof this.options.onNameChange === 'function') {\r\n this.options.onNameChange(this.column);\r\n }\r\n },\r\n renderCalculations: function () {\r\n this.$('.calculation-container').empty();\r\n\r\n if (_.size(this.column.calculations.models) === 0) {\r\n this.addCalculation();\r\n } else {\r\n _.each(this.column.calculations.models, function (model) {\r\n this.renderCalculation(model);\r\n }, this)\r\n }\r\n },\r\n renderCalculation: function (calculation) {\r\n this.renderSubTemplate(true, this.options.subTemplates.calculation, this.$('.calculation-container'), {\r\n model: calculation\r\n }, _.bind(function (el) {\r\n let $calc = $(el);\r\n new PJQ.Binder($calc, calculation, {\r\n watchElements: [\r\n 'input'\r\n ]\r\n });\r\n\r\n new PJQ.inputs.Selectpicker({\r\n el: $calc.find('.operator'),\r\n noneSelectedText: null,\r\n defaultValue: calculation.get('operator'),\r\n onChange: _.bind(function (value) {\r\n calculation.set('operator', value);\r\n }, this),\r\n title: 'Select Operator'\r\n });\r\n\r\n let choices = _.map(PJQ.constants.budgetHelpers.getColumnSources(), function (source) {\r\n return {\r\n id: source.source,\r\n name: source.name + (source.isErp ? ('ERP') : '')\r\n };\r\n });\r\n new PJQ.inputs.Selectpicker({\r\n el: $calc.find('.select-source'),\r\n noneSelectedText: null,\r\n choices: choices,\r\n defaultValue: calculation.get('source'),\r\n onChange: _.bind(function (value) {\r\n calculation.set('source', value);\r\n this.render();\r\n }, this),\r\n title: 'Select Column'\r\n });\r\n\r\n if (calculation.get('source') === \"PrimeContractValues\" || calculation.get('source') === \"PrimeContractChangeOrderValues\"\r\n || calculation.get('source') === \"CommitmentValues\" || calculation.get('source') === \"CommitmentChangeOrderValues\"\r\n || calculation.get('source') === \"DirectCostValues\" || calculation.get('source') === \"PayableInvoiceValues\"\r\n || calculation.get('source') === \"ReceivableInvoiceValues\") {\r\n new PJQ.inputs.Selectpicker({\r\n el: $calc.find('.select-source-filter'),\r\n noneSelectedText: 'No Status Filters',\r\n isMultiple: true,\r\n defaultValue: calculation.get('options') != null ? _.map(calculation.get('options').statuses, function (value) {\r\n return value.toString();\r\n }) : null,\r\n onChange: _.bind(function (value) {\r\n let statuses = _.map(value, function (id) {\r\n return parseInt(id);\r\n }, this),\r\n options = {\r\n \"statuses\": statuses\r\n }\r\n calculation.set('options', options);\r\n }, this),\r\n title: 'No Filters'\r\n });\r\n }\r\n\r\n }, this));\r\n },\r\n addCalculation: function () {\r\n let calculation = new PJQ.models.budget.ViewColumnCalculation({\r\n source: null\r\n });\r\n if (_.size(this.column.calculations.models) === 0) {\r\n let calculations = [calculation];\r\n calculations.push(new PJQ.models.budget.ViewColumnCalculation({\r\n source: null\r\n }));\r\n\r\n this.column.calculations.add(calculations);\r\n this.renderCalculations();\r\n } else {\r\n this.column.calculations.add(calculation);\r\n this.renderCalculations();\r\n }\r\n },\r\n deleteCalculation: function (e) {\r\n let $target = $(e.currentTarget),\r\n cid = $target.data('cid'),\r\n calculation = this.column.calculations.get(cid);\r\n\r\n this.column.calculations.remove(calculation);\r\n this.renderCalculations();\r\n }\r\n});\r\n","PJQ.views.budget.BulkEditLineItemsModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-bulk-edit-line-items'),\n maxWidth: 400,\n onSave: null\n },\n events: {\n 'click .btn-save': 'save'\n },\n beforeModalCreated: function () {\n if(_.size(this.options.lineItems) === 0){\n return;\n }\n\n this.model = new PJQ.models.BaseModel();\n },\n renderData: function () {\n return {\n lineItems: this.options.lineItems,\n model: this.model,\n enableStoredMaterials: this.options.enableStoredMaterials,\n enableRetainage: this.options.enableRetainage\n }\n },\n afterRender: function() {\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input'\n ],\n onChange: ($el, attribute, value) => {\n if(_.size($el.val()) > 0){\n this.model.set(attribute, value);\n }\n else{\n this.model.unset(attribute);\n }\n }\n });\n\n PJQ.helpers.inputHelpers.inputMaskCurrency(this.$('.input-dollars-full'), 2, true);\n PJQ.helpers.inputHelpers.inputMaskPercent(this.$('.input-percent'), 2, true);\n },\n save: function() {\n _.each(this.options.lineItems, (lineItem) => {\n _.each(this.model.attributes, (value, key) => {\n lineItem.set(key, value/100)\n });\n });\n\n if(typeof this.options.onSave === 'function'){\n this.options.onSave();\n }\n this.removeModal();\n }\n});","PJQ.collections.changeRequests = PJQ.collections.changeRequests ? PJQ.collections.changeRequests : {};\nPJQ.models.changeRequests = PJQ.models.changeRequests ? PJQ.models.changeRequests : {};\nPJQ.views.changeRequests = PJQ.views.changeRequests ? PJQ.views.changeRequests : {};\n\nPJQ.modules.changeRequests = {\n routes: [\n {\n route: 'projects/:projectId/changerequests',\n name: 'changerequests',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"changerequests\");\n }\n },\n {\n route: 'projects/:projectId/changerequests/:changeRequestId',\n name: 'changerequest',\n callback: function (projectId, changeRequestId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"changerequests\", {\n changeRequestId: parseInt(changeRequestId)\n });\n }\n },\n {\n route: 'projects/:projectId/changerequests/rfq',\n name: 'rfq1',\n callback: function (projectId, changeRequestId, rfqId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"changerequests\", {\n view: 'rfq'\n });\n }\n },\n {\n route: 'projects/:projectId/rfq/:rfqId',\n name: 'rfq2',\n callback: function (projectId, rfqId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"changerequests\", {\n view: 'rfq',\n rfqId: parseInt(rfqId),\n });\n }\n },\n {\n route: 'projects/:projectId/changerequests/rfq/:rfqId',\n name: 'rfq3',\n callback: function (projectId, rfqId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"changerequests\", {\n rfqId: parseInt(rfqId),\n view: 'rfq'\n });\n }\n },\n {\n route: 'projects/:projectId/changerequests/:changeRequestId/rfq/:rfqId',\n name: 'rfq4',\n callback: function (projectId, changeRequestId, rfqId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"changerequests\", {\n changeRequestId: parseInt(changeRequestId),\n rfqId: parseInt(rfqId),\n view: 'rfq'\n });\n }\n }\n ]\n};\n\nPJQ.app.addRoutes(PJQ.modules.changeRequests.routes);","PJQ.views.changeRequests.ChangeRequestDataTable = PJQ.views.dataTables.DataTable.extend({\n defaults: {\n language: {\n emptyTable: 'No Change Requests have been created yet',\n zeroRecords: \"No Change Requests matched the search criteria\"\n },\n subTemplates: {\n header: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'data-table-header-change-requests')\n },\n toggleRowClass: '.toggle-row',\n onViewChangeRequest: null\n },\n events: {\n 'click .btn-view-change-request': 'viewChangeRequestClicked',\n 'click .btn-view-prime-contract': 'viewPrimeContractClicked',\n 'click .btn-view-pcco': 'viewPrimeContractChangeOrderClicked',\n 'click .btn-view-commitment': 'viewCommitmentClicked',\n 'click .btn-view-cco': 'viewCommitmentChangeOrderClicked',\n 'click .select-line-item': 'selectLineItem',\n 'click .select-all-line-items': 'selectAllLineItems',\n 'click .btn-new-pcco': 'newContractChangeOrder',\n 'click .btn-new-cco': 'newCommitmentChangeOrder',\n 'click .btn-new-commitment': 'newCommitment',\n 'click .btn-send-rfq': 'sendRFQs',\n 'click .btn-existing-cco': 'addToExistingCommitmentChangeOrder',\n 'click .btn-existing-pcco': 'addToExistingContractChangeOrder',\n 'click .btn-existing-commitment': 'addToExistingCommitment'\n },\n beforeDataTableRender: function () {\n this.options.pageLength = this.options.settings ? this.options.settings.rowsPerPage : 10;\n this.options.project = this.options.project ?? PJQ.app.session.project;\n\n this.canAddCommitments = this.options.project.hasPermission('commitments.canAdd');\n this.canViewCommitments = this.options.project.hasPermission('commitments.canView');\n this.canAddCommitmentChangeOrders = this.options.project.hasPermission('commitmentChangeOrders.canAdd');\n this.canAddContractChangeOrders = this.options.project.hasPermission('primeContractChangeOrders.canAdd');\n this.canViewPrimeContracts = this.options.project.hasPermission('primeContracts.canView');\n\n if (this.options.companySettings.get('enableStandardListView')) {\n this.options.rowCallback = (row, data, index) => {\n $(row).addClass('section-row');\n };\n }\n },\n getDefaultFilter: function () {\n let defaultFilter = {};\n defaultFilter = this.options.userSettings.get('defaultStatusFilter');\n return defaultFilter;\n },\n afterSearch: function () {\n if (typeof this.options.afterSearch === 'function') {\n this.options.afterSearch();\n }\n },\n afterHeaderRender: function () {\n let filterChoices = [];\n\n filterChoices.push({\n id: PJQ.constants.changeRequests.filterType.STATUS_FILTER,\n name: 'Status',\n choices: _.map(PJQ.constants.changeRequests.changeRequestStatus, (choice) => {\n return {\n id: choice,\n name: PJQ.constants.changeRequests.changeRequestStatusNames[choice]\n };\n })\n });\n\n if (this.options.companySettings.get('enableStandardListView')) {\n filterChoices.push({\n id: PJQ.constants.changeRequests.filterType.OTHER_FILTER,\n name: '',\n choices: [\n {\n id: -1,\n name: 'Cost Not Attached'\n },\n {\n id: -2,\n name: 'Revenue Not Attached'\n }\n ]\n });\n }\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.change-requests-filter'),\n defaultValue: this.getDefaultFilter(),\n choices: filterChoices,\n isIntChoices: true,\n isMultiple: true,\n isGrouped: true,\n noneSelectedText: 'No Filters',\n onChange: (value) => {\n let statusFilter = null,\n otherFilter = null;\n _.each(value, (filter, key) => {\n if (key === PJQ.constants.changeRequests.filterType.STATUS_FILTER) {\n statusFilter = filter;\n } else if (key === PJQ.constants.changeRequests.filterType.OTHER_FILTER) {\n otherFilter = filter;\n }\n });\n\n this.setFilter(PJQ.constants.changeRequests.filterType.STATUS_FILTER, statusFilter);\n this.setFilter(PJQ.constants.changeRequests.filterType.OTHER_FILTER, otherFilter);\n }\n });\n\n },\n getFilterData: function () {\n let statusFilter = this.getFilter(PJQ.constants.changeRequests.filterType.STATUS_FILTER),\n otherFilter = this.getFilter(PJQ.constants.changeRequests.filterType.OTHER_FILTER);\n if (_.size(statusFilter) === 0 && _.size(otherFilter) === 0) {\n return this.options.data;\n }\n\n let res = _.filter(this.options.data, function (row) {\n return (_.size(statusFilter) === 0 || _.contains(statusFilter, row.get('statusId')));\n });\n\n if (_.size(otherFilter) > 0) {\n let costNotAttached = _.contains(otherFilter, -1),\n revenueNotAttached = _.contains(otherFilter, -2);\n res = _.filter(res, function (row) {\n if (costNotAttached) {\n return _.find(row.lineItems.models, (lineItem) => {\n return row.canAttachLineItemCost(lineItem);\n });\n }\n\n if (revenueNotAttached) {\n return _.find(row.lineItems.models, (lineItem) => {\n return row.canAttachLineItemRevenue(lineItem);\n });\n }\n\n return false;\n });\n }\n\n return res;\n },\n createdRow(row, data, index) {\n if (this.options.companySettings.get('enableStandardListView')) {\n let $secondCell = $('td', row).eq(1);\n $secondCell.attr('colspan', 7);\n $('td', row).slice(2, 8).hide();\n }\n },\n getColumns: function (includeAllColumns = false) {\n let columns = [];\n\n if (this.options.companySettings.get('enableStandardListView')) {\n if (!includeAllColumns) {\n columns.push({\n \"columnData\": \"\",\n \"data\": \"\",\n \"orderable\": false,\n \"title\": this.options.data.some(item => _.size(item.lineItems.models) > 0) ? ` 0 || (this.options.expandAll && this.expandedItems == null) ? 'fa-minus-circle' : 'fa-plus-circle')} toggle-all-rows\" style=\"cursor: pointer\">` : '',\n \"width\": \"20px\",\n \"render\": _.bind(function (data, type, row) {\n let isSelected = this.options.selectedLineItems && _.size(row.lineItems) > 0 ? _.every(row.lineItems.models, item => _.contains(this.options.selectedLineItems, item.cid)) : false,\n toggleRow = '',\n checkbox = '',\n erpIcon = PJQ.helpers.erp.getERPIcon(row.erpSyncStatus());\n\n if (_.size(row.lineItems.models) > 0) {\n toggleRow += ``;\n if (row.lineItems.some(item => item.get('appliedMarkupId') == null || item.get('appliedMarkupId') === 0)) {\n checkbox += `
0 ? 'mr-2' : ''}\">\n
\n \n
\n \n
\n
\n
`;\n } else {\n checkbox += '
';\n }\n }\n\n return `
${toggleRow}${checkbox}${erpIcon}
`;\n }, this)\n });\n }\n columns.push(\n {\n \"columnData\": \"id\",\n \"data\": \"id\",\n \"title\": \"Title\",\n \"width\": '120px',\n \"render\": _.bind(function (data, type, row) {\n let title = `
${row.get('number')} ${_.size(row.get('title')) > 0 ? ` - ${row.get('title')}` : ''}
`;\n return '';\n }, this)\n },\n {\n \"columnData\": \"costCodeId\",\n \"data\": \"costCodeId\",\n \"title\": \"Budget Code\",\n \"render\": _.bind(function (data, type, row) {\n return ``;\n }, this)\n },\n {\n \"columnData\": \"description\",\n \"data\": \"description\",\n \"title\": \"Description\",\n \"render\": _.bind(function (data, type, row) {\n return \"\"\n }, this)\n },\n {\n \"columnData\": \"vendor\",\n \"data\": \"vendor\",\n \"title\": \"Company\",\n \"render\": _.bind(function (data, type, row) {\n return \"\"\n }, this)\n },\n {\n \"columnData\": \"commitmentId\",\n \"data\": \"commitmentId\",\n \"title\": \"Commitment\",\n \"render\": _.bind(function (data, type, row) {\n return \"\"\n }, this)\n },\n {\n \"columnData\": \"primeContractId\",\n \"data\": \"primeContractId\",\n \"title\": \"Contract\",\n \"render\": _.bind(function (data, type, row) {\n let primeContractId = row.get('primeContractId');\n return primeContractId && this.canViewPrimeContracts ? `${row.get('primeContractNumber')}` : '';\n }, this)\n },\n {\n \"columnData\": \"scope\",\n \"data\": \"scope\",\n \"title\": \"Scope\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.constants.changeRequests.scopeNames[row.get('scope')];\n }, this)\n },\n {\n \"columnData\": \"status\",\n \"data\": \"statusId\",\n \"title\": \"Status\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.constants.changeRequests.changeRequestStatusNames[row.get('statusId')]\n }, this)\n },\n {\n \"columnData\": \"totalAmount\",\n \"data\": \"totalAmount\",\n \"title\": \"Cost\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('amount'));\n }, this)\n },\n {\n \"columnData\": \"totalRevenue\",\n \"data\": \"totalRevenue\",\n \"title\": \"Revenue\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('revenue'));\n }, this)\n },\n {\n \"columnData\": \"markupAmount\",\n \"data\": \"markupAmount\",\n \"title\": \"Markup\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('markupAmount'));\n }, this)\n },\n {\n \"columnData\": \"taxAmount\",\n \"data\": \"taxAmount\",\n \"title\": \"Tax\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('taxAmount'));\n }, this)\n },\n {\n \"columnData\": \"amount\",\n \"data\": \"amount\",\n \"title\": \"Total\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.getGrandTotal());\n }, this)\n },\n {\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n return '
';\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"90px\",\n \"className\": \"text-center\",\n \"visible\": true\n }\n );\n } else {\n let includeColumns = ['status', 'primeContract', 'client.companyName', 'number', 'title', 'description', 'scope', 'createdOn', 'amount', 'revenue', 'markupAmount', 'taxAmount', 'grandTotal'];\n\n if (this.options.customFields) {\n _.each(this.options.customFields.models, _.bind(function (customField) {\n includeColumns.push('fieldValue' + customField.get('fieldNumber'));\n }, this));\n }\n\n if (!includeAllColumns) {\n if (this.options.settings && _.size(this.options.settings.columns) > 0)\n includeColumns = this.options.settings.columns;\n else\n includeColumns = this.options.settings && this.options.settings.columnsDefault ? this.options.settings.columnsDefault : includeColumns;\n\n columns.push(\n {\n \"columnData\": \"childData\",\n \"data\": null,\n \"title\": \"\",\n \"width\": \"40px\",\n \"orderable\": false,\n \"searchable\": false,\n \"defaultContent\": '',\n \"render\": function (data, type, row) {\n let toggle = '',\n erpIcon = '';\n erpIcon += PJQ.helpers.erp.getERPIcon(row.erpSyncStatus());\n toggle += ` 0 ? 'mr-2' : ''}\" data-type=\"\" data-id=\"${row.id}\" style=\"cursor: pointer\">`;\n\n return `
${erpIcon}
`;\n }\n });\n }\n\n _.each(includeColumns, _.bind(function (columnName) {\n switch (columnName) {\n case 'status':\n columns.push({\n \"columnData\": \"status\",\n \"data\": \"attributes.statusId\",\n \"title\": \"Status\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.constants.changeRequests.changeRequestStatusNames[row.get('statusId')]\n }, this)\n });\n break;\n case 'primeContract':\n columns.push({\n \"columnData\": \"primeContract\",\n \"title\": \"Contract\",\n \"data\": \"attributes.primeContractNumber\",\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n if (type === 'sort' || type === 'type') {\n return row.get('primeContractNumber');\n }\n\n if (this.canViewPrimeContracts) {\n return '' + row.get('primeContractNumber') + '';\n }\n return data;\n }, this)\n },);\n break;\n case 'number':\n columns.push({\n \"columnData\": \"number\",\n \"data\": \"attributes.number\",\n \"title\": \"Number\",\n \"render\": _.bind(function (data, type, row) {\n return '' + row.get('number') + '';\n }, this)\n });\n break;\n case 'title':\n columns.push({\n \"columnData\": \"title\",\n \"data\": \"attributes.title\",\n \"title\": \"Title\"\n });\n break;\n case 'description':\n columns.push({\n \"columnData\": \"description\",\n \"data\": \"attributes.description\",\n \"title\": \"Description\"\n });\n break;\n case 'createdOn':\n columns.push({\n \"columnData\": \"createdOn\",\n \"data\": \"attributes.createdOn\",\n \"title\": 'Created',\n \"width\": '90px',\n \"render\": _.bind(function (data, type, row) {\n if (_.size(data) === 0) {\n return '';\n } else if (type === 'sort' || type === 'type') {\n return data ? new Date(data) : null;\n }\n return PJQ.helpers.dateHelpers.getDateString(new Date(data), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n }, this)\n });\n break;\n case 'client.companyName':\n columns.push({\n \"columnData\": \"client.companyName\",\n \"title\": \"Client\",\n \"titleSettings\": \"Client\",\n \"render\": _.bind(function (data, type, row) {\n return row.get('client') ? row.get('client').companyName : 'N/A';\n }, this)\n });\n break;\n case 'scope':\n columns.push({\n \"columnData\": \"scope\",\n \"data\": \"attributes.scope\",\n \"title\": \"Scope\",\n \"width\": \"100px\",\n \"render\": (data, type, row) => {\n return PJQ.constants.changeRequests.scopeNames[data] ?? '';\n }\n });\n break;\n case 'amount':\n columns.push({\n \"columnData\": \"amount\",\n \"data\": \"attributes.amount\",\n \"width\": \"10%\",\n \"title\": \"Cost\",\n \"className\": \"text-align-right\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('amount'));\n }, this)\n });\n break;\n case 'revenue':\n columns.push({\n \"columnData\": \"revenue\",\n \"data\": \"attributes.revenue\",\n \"width\": \"10%\",\n \"title\": \"Revenue\",\n \"className\": \"text-align-right\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('revenue'));\n }, this)\n });\n break;\n case 'taxAmount':\n columns.push({\n \"columnData\": \"taxAmount\",\n \"data\": \"attributes.taxAmount\",\n \"title\": \"Tax\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this)\n });\n break;\n case 'markupAmount':\n columns.push({\n \"columnData\": \"markupAmount\",\n \"data\": \"attributes.markupAmount\",\n \"title\": \"Markup\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this)\n });\n break;\n case 'grandTotal':\n columns.push({\n \"columnData\": \"grandTotal\",\n \"data\": \"attributes.amount\",\n \"title\": \"Grand Total\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.getGrandTotal());\n }, this)\n });\n break;\n default:\n if (columnName.startsWith('fieldValue')) {\n _.each(this.options.customFields.models, function (customField) {\n if (columnName === 'fieldValue' + customField.get('fieldNumber')) {\n columns.push({\n \"columnData\": 'fieldValue' + customField.get('fieldNumber'),\n \"title\": customField.get('name'),\n \"render\": function (data, type, row) {\n let fieldValue = row.getCustomFieldValue(customField.get('id'));\n fieldValue = (fieldValue !== null) ? fieldValue : '';\n switch (customField.get('fieldTypeId')) {\n case PJQ.constants.commitments.customFieldType.BOOLEAN:\n if (fieldValue != null)\n fieldValue = fieldValue ? 'Yes' : 'No';\n break;\n case PJQ.constants.commitments.customFieldType.CHOICE:\n let choices = [];\n // convert single choice value into array so that the logic below can work for both types.\n if (typeof fieldValue === 'number')\n fieldValue = [fieldValue];\n\n _.each(customField.choices.models, _.bind(function (choice) {\n if (_.find(fieldValue, function (value) {\n return value === choice.get('id');\n }))\n choices.push(choice.get('name'));\n }, this));\n\n fieldValue = choices.join((', '));\n break;\n case PJQ.constants.commitments.customFieldType.DATE:\n if (fieldValue) {\n if (type !== 'sort' && type !== 'type')\n fieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n }\n if (fieldValue === undefined)\n fieldValue = '';\n\n break;\n case PJQ.constants.commitments.customFieldType.DATETIME:\n if (fieldValue) {\n if (type !== 'sort' && type !== 'type')\n fieldValue = PJQ.helpers.dateHelpers.getDateString(new Date(fieldValue), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME, true);\n }\n if (fieldValue === undefined)\n fieldValue = '';\n\n break;\n case PJQ.constants.commitments.customFieldType.INTEGER:\n if (type !== 'sort' && type !== 'type' && fieldValue) {\n fieldValue = parseInt(fieldValue).toLocaleString();\n }\n break;\n case PJQ.constants.commitments.customFieldType.MONEY:\n if (type === 'sort' || type === 'type') {\n if (fieldValue && fieldValue !== '$')\n fieldValue = parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue, true));\n else\n fieldValue = 0;\n } else {\n fieldValue = PJQ.helpers.formatHelpers.formatCurrency(parseInt(PJQ.helpers.formatHelpers.numbersOnly(fieldValue)));\n }\n break;\n case PJQ.constants.commitments.customFieldType.PERCENT:\n if (type === 'sort' || type === 'type') {\n if (fieldValue && fieldValue !== '$')\n fieldValue = parseFloat(PJQ.helpers.formatHelpers.numbersOnly(fieldValue, true)).toFixed(2);\n else\n fieldValue = 0;\n } else {\n fieldValue = fieldValue ? fieldValue.toString() + '%' : '';\n }\n\n break;\n }\n\n return fieldValue;\n }\n });\n }\n });\n }\n break;\n }\n }, this));\n\n if (!includeAllColumns) {\n columns.push({\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n return '
';\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"90px\",\n \"className\": \"text-center\",\n \"visible\": true\n });\n }\n }\n\n return columns;\n },\n getLineItemColumns: function () {\n return [\n {\n \"columnData\": \"\",\n \"data\": \"\",\n \"title\": \"\",\n \"width\": \"20px\",\n \"render\": _.bind(function (data, type, row) {\n let isSelected = this.options.selectedLineItems ? _.contains(this.options.selectedLineItems, row.cid) : false;\n\n if (row.get('appliedMarkupId') > 0) {\n return '';\n } else {\n return `
\n
\n
\n \n
\n \n
\n
\n
\n
`;\n }\n }, this)\n },\n {\n \"columnData\": \"changeRequestId\",\n \"data\": \"changeRequestId\",\n \"title\": \"Change Request\",\n \"render\": _.bind(function (data, type, row) {\n return ``;\n }, this)\n },\n {\n \"columnData\": \"costCodeId\",\n \"data\": \"costCodeId\",\n \"title\": \"Budget Code\",\n \"render\": _.bind(function (data, type, row) {\n let subJob = this.options.subJobs?.get(row.get('subJobId')),\n costCode = this.options.costCodes?.get(row.get('costCodeId')),\n costType = this.options.costTypes?.get(row.get('costTypeId')),\n budgetCode;\n return '
' + costCode.getDisplayName() + '
' + costType.get('name') + '
';\n }, this)\n },\n {\n \"columnData\": \"description\",\n \"data\": \"description\",\n \"title\": \"Description\",\n \"render\": _.bind(function (data, type, row) {\n return row.get('description');\n }, this)\n },\n {\n \"columnData\": \"vendor\",\n \"data\": \"vendor\",\n \"title\": \"Company\",\n \"render\": _.bind(function (data, type, row) {\n let vendor = row.get('vendor');\n return `${vendor?.companyName ?? \"\"}`\n }, this)\n },\n {\n \"columnData\": \"commitmentId\",\n \"data\": \"commitmentId\",\n \"title\": \"Commitment\",\n \"render\": _.bind(function (data, type, row) {\n let commitmentId = row.get('commitmentId'),\n ccoId = row.get('ccoId'),\n html = '';\n\n if (row.get('costLineItemId') > 0) {\n html += ''\n }\n\n if (row.get('costLineItemId') > 0 || !this.options.canEdit) {\n if (commitmentId > 0) {\n html += '
' + row.get('commitmentNumber') + '
';\n } else if (ccoId > 0) {\n html += '
' + row.get('ccoNumber') + '
';\n }\n }\n return '
' + html + '
';\n }, this)\n },\n {\n \"columnData\": \"primeContractId\",\n \"data\": \"primeContractId\",\n \"title\": \"Contract\",\n \"render\": _.bind(function (data, type, row) {\n let pccoId = row.get('pccoId'),\n html = '';\n\n if (row.get('revenueLineItemId') > 0) {\n html += ''\n }\n\n if (row.get('revenueLineItemId') > 0 && pccoId > 0) {\n if (pccoId > 0) {\n html += '
' + row.get('pccoNumber') + '
';\n }\n }\n return '
' + html + '
';\n }, this)\n },\n {\n \"columnData\": \"scope\",\n \"data\": \"scope\",\n \"title\": \"\",\n \"render\": _.bind(function (data, type, row) {\n return '';\n }, this)\n },\n {\n \"columnData\": \"statusId\",\n \"data\": \"statusId\",\n \"title\": \"Status\",\n \"render\": _.bind(function (data, type, row) {\n return '';\n }, this)\n },\n {\n \"columnData\": \"amount\",\n \"data\": \"amount\",\n \"title\": \"Cost\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('amount'));\n }, this)\n },\n {\n \"columnData\": \"revenue\",\n \"data\": \"revenue\",\n \"visible\": false,\n \"title\": \"Revenue\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('revenue'));\n }, this)\n },\n {\n \"columnData\": \"markupAmount\",\n \"data\": \"markupAmount\",\n \"title\": \"Markup\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('markupAmount'));\n }, this)\n },\n {\n \"columnData\": \"taxAmount\",\n \"data\": \"taxAmount\",\n \"title\": \"Tax\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('taxAmount'));\n }, this)\n },\n {\n \"columnData\": \"amount\",\n \"data\": \"amount\",\n \"title\": \"Subtotal\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.getGrandTotal(null, {costs: this.changeRequest.get('scope') === PJQ.constants.changeRequests.scope.INTERNAL}));\n }, this)\n },\n {\n \"columnData\": \"\",\n \"data\": \"\",\n \"title\": \"\",\n \"render\": (data, type, row) => {\n return '';\n }\n }\n ]\n },\n toggleAllChildRows: function (e) {\n let self = this,\n expand = _.size(this.expandedRowIds) === 0;\n this.dataTable.rows().every(function () {\n let changeRequest = this.data();\n if (_.size(changeRequest.lineItems) > 0) {\n self.toggleChildRow(this, expand);\n }\n });\n this.renderToggleAllIcon();\n },\n selectLineItem: function (e) {\n if (this.options.selectedLineItems == null) {\n this.options.selectedLineItems = [];\n }\n\n let $target = $(e.currentTarget),\n row = $target.closest('tr'),\n cid = row.data('row-id'),\n parentCid = row.data('parent-id'),\n parentRow = this.$(`tr#${parentCid}`),\n $selectAllToggle = parentRow.find('.select-all-line-items'),\n changeRequest = _.find(this.options.data, function (cr) {\n return cr.cid === parentCid;\n }),\n isChecked = $target.prop('checked');\n\n if (_.size(cid) > 0) {\n if (isChecked) {\n this.options.selectedLineItems.push(cid);\n } else {\n this.options.selectedLineItems = _.reject(this.options.selectedLineItems, function (sCid) {\n return sCid === cid;\n });\n }\n }\n\n $selectAllToggle.prop('checked', _.every(changeRequest.lineItems.models, item => _.contains(this.options.selectedLineItems, item.cid)));\n this.updateBulkActionsButton();\n },\n selectAllLineItems: function (e) {\n let $target = $(e.currentTarget),\n parentCid = $target.closest('tr').attr('id'),\n changeRequest = _.find(this.options.data, function (cr) {\n return cr.cid === parentCid;\n });\n\n if (this.options.selectedLineItems == null) {\n this.options.selectedLineItems = [];\n }\n\n let nonAppliedLines = _.filter(changeRequest.lineItems.models, function (li) {\n return li.get('appliedMarkupId') == null || li.get('appliedMarkupId') === 0;\n });\n\n let nonAppliedCids = _.map(nonAppliedLines, 'cid');\n\n if ($target.prop('checked')) {\n this.options.selectedLineItems = _.union(this.options.selectedLineItems, nonAppliedCids);\n } else {\n this.options.selectedLineItems = _.difference(this.options.selectedLineItems, nonAppliedCids);\n }\n\n this.$(`tr#${parentCid}`).find('.select-line-item').prop('checked', $target.prop('checked'));\n this.$(`tr[data-parent-id=\"${changeRequest.cid}\"]`).each((index, tr) => {\n $(tr).find('.select-line-item').prop('checked', $target.prop('checked'));\n });\n\n this.updateBulkActionsButton();\n },\n updateBulkActionsButton: function () {\n let bulkActionsButton = this.$('.btn-bulk-actions'),\n contractsSubmenu = this.$('.contracts-submenu'),\n commitmentsSubmenu = this.$('.commitments-submenu'),\n addCCOButton = this.$('.btn-add-cco'),\n addSubcontractButtons = this.$('.btn-new-commitment'),\n sendRFQButton = this.$('.btn-send-rfq');\n\n let changeRequests = _.uniq(_.map(this.options.selectedLineItems, (cid) => {\n return _.find(this.options.data, (cr) => {\n return _.some(cr.lineItems.models, (item) => item.cid === cid);\n });\n }));\n changeRequests = _.compact(changeRequests);\n\n if (_.size(this.options.selectedLineItems) > 0) {\n bulkActionsButton.removeClass('disabled');\n } else {\n bulkActionsButton.addClass('disabled');\n return;\n }\n\n let canSendRFQ = !_.some(changeRequests, (cr) => !cr.canSendRFQ()),\n allPrimeContractIdsMatch = _.every(changeRequests, (cr, index, array) =>\n cr.get('primeContractId') === array[0].get('primeContractId')\n ),\n canAttachCosts = true,\n canAttachRevenue = allPrimeContractIdsMatch;\n if (_.size(this.options.selectedLineItems) > 0) {\n this.$('.btn-create-new').removeClass('disabled');\n\n _.each(changeRequests, (changeRequest) => {\n _.each(changeRequest.lineItems.get(this.options.selectedLineItems), (lineItem) => {\n if (!changeRequest.canAttachLineItemCost(lineItem)) {\n canAttachCosts = false;\n }\n\n if (!changeRequest.canAttachLineItemRevenue(lineItem)) {\n canAttachRevenue = false;\n }\n });\n });\n }\n\n if (!canAttachRevenue || !this.canAddContractChangeOrders) {\n contractsSubmenu.addClass('disabled');\n } else {\n contractsSubmenu.removeClass('disabled');\n }\n\n if (!canAttachCosts) {\n commitmentsSubmenu.addClass('disabled');\n } else {\n commitmentsSubmenu.removeClass('disabled');\n }\n\n if (!this.canAddCommitments) {\n addSubcontractButtons.addClass('hidden');\n } else {\n addSubcontractButtons.removeClass('hidden');\n }\n\n if (!this.canAddCommitmentChangeOrders) {\n addCCOButton.addClass('hidden');\n } else {\n addCCOButton.removeClass('hidden');\n }\n\n if (!canSendRFQ) {\n sendRFQButton.addClass('disabled');\n } else {\n sendRFQButton.removeClass('disabled');\n }\n },\n newCommitment: function (e) {\n if (_.size(this.options.selectedLineItems) === 0) {\n return;\n }\n\n let commitmentType = $(e.currentTarget).hasClass('new-po') ? PJQ.constants.commitments.commitmentType.PURCHASE_ORDER : PJQ.constants.commitments.commitmentType.SUBCONTRACT,\n lineItems = [],\n selLineItems = _.flatten(_.map(this.options.data, (cr) => {\n return _.filter(cr.lineItems.models, (item) => _.contains(this.options.selectedLineItems, item.cid));\n })),\n vendors = [],\n vendorIds = [];\n _.each(selLineItems, function (lineItem) {\n if (lineItem.get('costLineItemId') == null) {\n lineItems.push(_.extend(lineItem.attributes, {\n id: null,\n changeRequestLineItemId: lineItem.id\n }));\n\n let liVendor = lineItem.get('vendor');\n if (vendors == null) {\n return;\n } else if (liVendor && vendorIds.indexOf(liVendor.id) === -1) {\n vendors.length > 0 ? null : vendors.push(liVendor);\n }\n }\n }, this);\n\n if (_.size(lineItems) > 0) {\n new PJQ.views.commitments.CommitmentEditModal({\n model: null,\n fromChangeRequest: this.model,\n contractedContact: vendors.length > 0 ? vendors[0] : null,\n commitmentType: commitmentType,\n lineItems: lineItems,\n onSave: _.bind(function (commitment) {\n if (typeof this.options.onCreateFromLineItems === 'function') {\n this.options.onCreateFromLineItems();\n }\n }, this),\n });\n }\n },\n newCommitmentChangeOrder: function (e) {\n if (_.size(this.options.selectedLineItems) === 0) {\n return;\n }\n\n let commitmentIds = this.getSelectedCommitmentIds(),\n selCommitmentId = null;\n if (_.size(commitmentIds) === 1) {\n selCommitmentId = commitmentIds[0];\n }\n\n new PJQ.views.commitments.SelectCommitmentsModal({\n isSingleChoice: true,\n project: this.options.project,\n selectedCommitmentId: selCommitmentId,\n filterStatuses: PJQ.constants.commitments.commitmentStatus.APPROVED,\n headerSubText: 'Select the Commitment you would like to create a Change Order for.',\n onSave: async (commitment) => {\n if (commitment == null) {\n return;\n }\n\n await commitment.fetch();\n\n let selLineItems = _.flatten(_.map(this.options.data, (cr) => {\n return _.filter(cr.lineItems.models, (item) => _.contains(this.options.selectedLineItems, item.cid));\n })),\n lineItems = [];\n\n _.each(selLineItems, function (lineItem) {\n if (lineItem.get('costLineItemId') == null) {\n lineItems.push(_.extend(lineItem.attributes, {\n id: null,\n changeRequestLineItemId: lineItem.id\n }));\n }\n }, this);\n\n if (_.size(lineItems) > 0) {\n new PJQ.views.commitments.ChangeOrderEditModal({\n commitment: commitment,\n lineItems: lineItems,\n onSave: _.bind(function (changeOrder) {\n if (typeof this.options.onCreateFromLineItems === 'function') {\n this.options.onCreateFromLineItems();\n }\n }, this),\n });\n }\n }\n });\n },\n getSelectedCommitmentIds: async function () {\n let selLineItems = _.flatten(_.map(this.options.data, (cr) => {\n return _.filter(cr.lineItems.models, (item) => _.contains(this.options.selectedLineItems, item.cid));\n }));\n\n return _.uniq(_.map(selLineItems, (item) => item.get('commitmentId')));\n },\n sendRFQs: async function (e) {\n let selLineItems = _.flatten(_.map(this.options.data, (cr) => {\n return _.filter(cr.lineItems.models, (item) => _.contains(this.options.selectedLineItems, item.cid));\n })),\n changeRequests = _.uniq(_.map(this.options.selectedLineItems, (cid) => {\n return _.find(this.options.data, (cr) => {\n return _.some(cr.lineItems.models, (item) => item.cid === cid);\n });\n })),\n projectCommitments = new PJQ.collections.commitments.Commitments([], {\n projectId: this.options.project.id,\n withLineItems: true\n });\n\n await projectCommitments.fetch();\n changeRequests = _.compact(changeRequests);\n\n let fnSendRFQ = (lineItems) => {\n new PJQ.views.rfq.RFQBatchModal({\n changeRequests: changeRequests,\n project: this.options.project,\n lineItems: lineItems,\n projectCommitments: projectCommitments\n });\n };\n\n let lineItemCt = _.size(selLineItems),\n rfqItemsCt = _.filter(selLineItems, (lineItem) => {\n return lineItem.get('rfqId') > 0;\n }).length;\n if (rfqItemsCt > 0) {\n if (rfqItemsCt === lineItemCt) {\n new PJQ.views.modals.YesNo({\n header: \"Send New RFQs?\",\n body: \"All of the selected line items are already associated with RFQs. Would you like to create them again?\",\n onYes: () => {\n fnSendRFQ(selLineItems);\n }\n });\n } else {\n new PJQ.views.BaseModal({\n header: \"Send RFQs\",\n body: \"Some of the selected line items are already associated with RFQs. Please choose from the options below.\",\n isShowOkButton: true,\n okButtonText: \"Create All (\" + lineItemCt + \")\",\n onOk: () => {\n fnSendRFQ(selLineItems);\n },\n isShowSecondaryButton: true,\n secondaryButtonColorClass: 'primary',\n secondaryButtonText: \"Create Missing (\" + rfqItemsCt + \")\",\n onSecondary: () => {\n fnSendRFQ(_.filter(selLineItems, (lineItem) => {\n return !(lineItem.get('rfqId') > 0);\n }));\n }\n });\n }\n } else {\n fnSendRFQ(selLineItems);\n }\n },\n newContractChangeOrder: async function (e) {\n if (_.size(this.options.selectedLineItems) === 0) {\n return;\n }\n\n let lineItems = [],\n selLineItems = _.flatten(_.map(this.options.data, (cr) => {\n return _.filter(cr.lineItems.models, (item) => _.contains(this.options.selectedLineItems, item.cid));\n })),\n changeRequestId = selLineItems[0].get('changeRequestId'),\n changeRequest = _.find(this.options.data, (cr) => cr.id === changeRequestId),\n primeContract = new PJQ.models.primeContracts.PrimeContract({\n id: changeRequest.get('primeContractId')\n });\n await primeContract.fetch();\n\n _.each(selLineItems, function (lineItem) {\n if (!lineItem.get('revenueLineItemId')) {\n lineItems.push(_.extend(lineItem.attributes, {\n id: null,\n amount: lineItem.get('revenue'),\n changeRequestLineItemId: lineItem.id\n }));\n }\n }, this);\n\n if (_.size(lineItems) > 0) {\n new PJQ.views.primeContracts.ChangeOrderEditModal({\n primeContract: primeContract,\n lineItems: lineItems,\n onSave: (commitment) => {\n if (typeof this.options.onCreateFromLineItems === 'function') {\n this.options.onCreateFromLineItems();\n }\n },\n });\n }\n },\n addToExistingCommitment: function (e) {\n if (_.size(this.options.selectedLineItems) === 0) {\n return;\n }\n\n let commitmentIds = this.getSelectedCommitmentIds(),\n selCommitmentId = null;\n if (_.size(commitmentIds) === 1) {\n selCommitmentId = commitmentIds[0];\n }\n\n new PJQ.views.commitments.SelectCommitmentsModal({\n isSingleChoice: true,\n project: this.options.project,\n selectedCommitmentId: selCommitmentId,\n headerSubText: 'Select the Commitment you would like to add these line items to',\n filterStatuses: [\n PJQ.constants.commitments.commitmentStatus.DRAFT,\n PJQ.constants.commitments.commitmentStatus.PURCHASE_ORDER_PROCESSING,\n PJQ.constants.commitments.commitmentStatus.SUBCONTRACT_OUT_FOR_BID,\n PJQ.constants.commitments.commitmentStatus.OUT_FOR_SIGNATURE,\n PJQ.constants.commitments.commitmentStatus.SUBMITTED,\n PJQ.constants.commitments.commitmentStatus.PURCHASE_ORDER_PARTIALLY_RECEIVED,\n PJQ.constants.commitments.commitmentStatus.PURCHASE_ORDER_RECEIVED\n ],\n onSave: async (commitment) => {\n if (commitment == null) {\n return;\n }\n\n await commitment.fetch();\n\n let selLineItems = _.flatten(_.map(this.options.data, (cr) => {\n return _.filter(cr.lineItems.models, (item) => _.contains(this.options.selectedLineItems, item.cid));\n }));\n _.each(selLineItems, function (lineItem) {\n if (lineItem.get('costLineItemId') == null) {\n commitment.lineItems.add(_.extend(lineItem.attributes, {\n id: null,\n commitmentId: commitment.id,\n changeRequestLineItemId: lineItem.id\n }));\n }\n }, this);\n\n new PJQ.views.commitments.CommitmentEditModal({\n model: commitment,\n fetch: false,\n onSave: _.bind(function (commitment) {\n if (typeof this.options.onCreateFromLineItems === 'function') {\n this.options.onCreateFromLineItems();\n }\n }, this),\n });\n }\n });\n },\n addToExistingCommitmentChangeOrder: function (e) {\n if (_.size(this.options.selectedLineItems) === 0) {\n return;\n }\n\n new PJQ.views.commitments.SelectCommitmentChangeOrdersModal({\n isSingleChoice: true,\n project: this.options.project,\n headerSubText: 'Select the Commitment Change Orders you would like to add these line items to.',\n filterStatuses: [\n PJQ.constants.commitments.changeOrderStatus.DRAFT,\n PJQ.constants.commitments.changeOrderStatus.NO_CHARGE,\n PJQ.constants.commitments.changeOrderStatus.IN_REVIEW,\n PJQ.constants.commitments.changeOrderStatus.NOT_PRICING,\n PJQ.constants.commitments.changeOrderStatus.PRICING,\n PJQ.constants.commitments.changeOrderStatus.NOT_PROCEEDING,\n PJQ.constants.commitments.changeOrderStatus.PROCEEDING,\n PJQ.constants.commitments.changeOrderStatus.REVISED\n ],\n onSave: async (changeOrder) => {\n if (changeOrder == null) {\n return;\n }\n\n await changeOrder.fetch();\n\n let selLineItems = _.flatten(_.map(this.options.data, (cr) => {\n return _.filter(cr.lineItems.models, (item) => _.contains(this.options.selectedLineItems, item.cid));\n }));\n _.each(selLineItems, function (lineItem) {\n if (lineItem.get('costLineItemId') == null) {\n changeOrder.lineItems.add(_.extend(lineItem.attributes, {\n id: null,\n changeOrderId: changeOrder.id,\n changeRequestLineItemId: lineItem.id\n }));\n }\n }, this);\n\n new PJQ.views.commitments.ChangeOrderEditModal({\n model: changeOrder,\n onSave: _.bind(function (changeOrder) {\n if (typeof this.options.onCreateFromLineItems === 'function') {\n this.options.onCreateFromLineItems();\n }\n }, this),\n });\n }\n });\n },\n addToExistingContractChangeOrder: function (e) {\n if (_.size(this.options.selectedLineItems) === 0) {\n return;\n }\n\n new PJQ.views.primeContracts.SelectChangeOrdersModal({\n isSingleChoice: true,\n project: this.options.project,\n headerSubText: 'Select the Contract Change Orders you would like to add these line items to.',\n filterStatuses: [\n PJQ.constants.primeContracts.changeOrderStatus.DRAFT,\n PJQ.constants.primeContracts.changeOrderStatus.NO_CHARGE,\n PJQ.constants.primeContracts.changeOrderStatus.IN_REVIEW,\n PJQ.constants.primeContracts.changeOrderStatus.NOT_PRICING,\n PJQ.constants.primeContracts.changeOrderStatus.PRICING,\n PJQ.constants.primeContracts.changeOrderStatus.NOT_PROCEEDING,\n PJQ.constants.primeContracts.changeOrderStatus.PROCEEDING,\n PJQ.constants.primeContracts.changeOrderStatus.REVISED\n ],\n onSave: async (changeOrder) => {\n if (changeOrder == null) {\n return;\n }\n\n await changeOrder.fetch();\n\n let selLineItems = _.flatten(_.map(this.options.data, (cr) => {\n return _.filter(cr.lineItems.models, (item) => _.contains(this.options.selectedLineItems, item.cid));\n }));\n _.each(selLineItems, function (lineItem) {\n if (lineItem.get('revenueLineItemId') == null) {\n changeOrder.lineItems.add(_.extend(lineItem.attributes, {\n id: null,\n changeOrderId: changeOrder.id,\n changeRequestLineItemId: lineItem.id\n }));\n }\n }, this);\n\n new PJQ.views.primeContracts.ChangeOrderEditModal({\n model: changeOrder,\n onSave: _.bind(function (changeOrder) {\n if (typeof this.options.onCreateFromLineItems === 'function') {\n this.options.onCreateFromLineItems();\n }\n }, this),\n });\n }\n });\n },\n viewCommitmentClicked: function (e) {\n let id = $(e.currentTarget).data('id');\n this.viewCommitment(id);\n },\n viewCommitment: function (commitmentId) {\n new PJQ.views.commitments.CommitmentEditModal({\n model: new PJQ.models.commitments.Commitment({\n id: commitmentId\n })\n });\n },\n viewCommitmentChangeOrderClicked: function (e) {\n let id = $(e.currentTarget).data('id');\n this.viewCommitmentChangeOrder(id);\n },\n viewCommitmentChangeOrder: function (changeOrderId) {\n new PJQ.views.commitments.ChangeOrderEditModal({\n model: new PJQ.models.commitments.ChangeOrder({\n id: changeOrderId\n })\n });\n },\n getRowChildData: function (row) {\n this.changeRequest = row.data();\n let fnReturnData = (lineItems) => {\n return _.sortBy(_.filter(lineItems, (item) => !item.get('delete')), function (model) {\n return model.get('id');\n });\n }\n\n let otherFilter = this.getFilter(PJQ.constants.changeRequests.filterType.OTHER_FILTER),\n costNotAttached = _.contains(otherFilter, -1),\n revenueNotAttached = _.contains(otherFilter, -2);\n return _.sortBy(_.filter(this.changeRequest.lineItems.models, (item) => {\n if (item.get('delete')) {\n return false;\n }\n\n if (costNotAttached) {\n return this.changeRequest.canAttachLineItemCost(item);\n } else if (revenueNotAttached) {\n return this.changeRequest.canAttachLineItemRevenue(item);\n }\n return true;\n }), function (model) {\n return model.get('id');\n });\n },\n getRowChildColumns: function (row) {\n return this.getLineItemColumns();\n },\n onChildRowToggle: function (row) {\n let $row = $(row.node());\n let $icon = $row.find('.toggle-row');\n },\n preserveScrollRender: function () {\n let scrollTop = $(window).scrollTop();\n this.render();\n $(window).scrollTop(scrollTop);\n },\n viewChangeRequestClicked: function (e) {\n if (typeof (this.options.onViewChangeRequest) === 'function') {\n let row = this.getRow((e.currentTarget).closest('tr')),\n invoice = row.data();\n if (invoice != null) {\n this.options.onViewChangeRequest(invoice);\n }\n }\n },\n viewPrimeContractClicked: function (e) {\n let id = $(e.currentTarget).data('id');\n this.viewPrimeContract(id);\n },\n viewPrimeContract: function (primeContractId) {\n new PJQ.views.primeContracts.PrimeContractEditModal({\n model: new PJQ.models.primeContracts.PrimeContract({\n id: primeContractId\n })\n });\n },\n viewPrimeContractChangeOrderClicked: function (e) {\n let id = $(e.currentTarget).data('id');\n this.viewPrimeContractChangeOrder(id);\n },\n viewPrimeContractChangeOrder: function (changeOrderId) {\n new PJQ.views.primeContracts.ChangeOrderEditModal({\n model: new PJQ.models.primeContracts.ChangeOrder({\n id: changeOrderId\n })\n });\n }\n});","PJQ.views.changeRequests.ChangeRequestEditModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-change-request-edit'),\n width: '95%',\n maxWidth: 1800,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-view-prime-contract': 'viewPrimeContract',\n 'click .btn-add-line-item': 'addLineItem',\n 'click .btn-close': 'close',\n 'click .btn-submit': 'submitChangeRequest',\n 'click .btn-save-email': 'saveEmail',\n 'click .btn-save': 'saveChangeRequest',\n 'click .btn-delete': 'deleteChangeRequest',\n 'click .btn-push-erp': 'pushERP',\n 'click .btn-undo-push-erp': 'undoPushERP',\n 'click .btn-unlink-erp': 'unlinkERP',\n 'click .btn-export': 'exportClicked',\n 'click .btn-export-costs': 'exportCosts',\n 'click .btn-export-revenue': 'exportRevenue',\n 'click .btn-email': 'email',\n 'click .nav-link': 'activeViewChanged',\n 'click .btn-view-rfq': 'viewRFQClicked'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n this.settings = await PJQ.app.session.fetchChangeRequestSettings();\n this.customFields = await this.options.project.fetchChangeRequestCustomFields();\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n\n if (this.erpIntegration != null && this.erpIntegration.getSetting('syncProjects')) {\n await this.options.project.fetchERPObject();\n }\n\n if (this.options.primeContract == null) {\n this.options.primeContract = new PJQ.models.primeContracts.PrimeContract({\n id: this.model.get('primeContractId')\n });\n }\n\n if (!this.options.primeContract.isFetched) {\n await this.options.primeContract.fetch();\n }\n\n if (this.model == null) {\n let customFieldValues = [];\n _.each(this.customFields.models, function (model, index) {\n let value = model.get('defaultValue') ? model.get('defaultValue') : '';\n if (model.get('fieldType') === 'CHOICE') {\n value = parseInt(value);\n }\n customFieldValues.push({\n fieldNumber: model.get('fieldNumber'),\n fieldTypeId: model.get('fieldTypeId'),\n fieldType: model.get('fieldType'),\n isMultiple: model.get('isMultiple'),\n value: value,\n id: model.get('id')\n })\n }, this);\n\n this.model = new PJQ.models.changeRequests.ChangeRequest({\n description: '',\n primeContractId: this.options.primeContract.id,\n primeContractNumber: this.options.primeContract.get('number'),\n client: this.options.primeContract.client,\n clientId: this.options.primeContract.get('clientId'),\n accountingMethod: this.options.primeContract.get('accountingMethod'),\n projectId: this.options.primeContract.get('projectId'),\n statusId: PJQ.constants.changeRequests.changeRequestStatus.DRAFT,\n customFieldValues: customFieldValues,\n markupItems: this.options.primeContract.markupItems.toJSON()\n });\n\n if(_.size(this.model.markupItems.models) > 0){\n _.each(this.model.markupItems.models, (markupItem) => {\n let isApplied = markupItem.get('appliedCostCodeId') > 0 && markupItem.get('appliedCostTypeId') > 0;\n\n if(isApplied){\n let lineItem = new PJQ.models.changeRequests.ChangeRequestLineItem({\n costCodeId: markupItem.get('appliedCostCodeId'),\n costTypeId: markupItem.get('appliedCostTypeId'),\n amount: 0,\n revenue: 0,\n description: markupItem.get('name')\n });\n markupItem.lineItem = lineItem;\n lineItem.markup = markupItem;\n this.model.lineItems.add(lineItem);\n }\n });\n }\n }\n\n if (!this.model.isNew()) {\n await this.model.fetch();\n }\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n this.options.canAdd = this.options.project.hasPermission('changeRequests.canAdd');\n this.options.canEdit = this.options.project.hasPermission('changeRequests.canEdit');\n this.options.canEditLineItems = this.options.canEdit;\n this.options.canViewPrimeContracts = this.options.project.hasPermission('primeContracts.canView');\n this.options.canViewRFQs = this.options.project.hasPermission('changeRequests.canViewRFQs');\n this.options.isAdmin = this.options.project.hasPermission('changeRequests.isAdmin');\n this.options.canDelete = this.options.isAdmin;\n this.options.canEditStatus = this.options.isAdmin;\n\n if (!this.isFetched || this.model.isNew()) {\n return;\n }\n\n let fnGetGreaterStatuses = (statusId) => {\n return _.filter(PJQ.constants.changeRequests.changeRequestStatus, (st) => {\n return st < statusId;\n });\n },\n status = this.model.get('statusId');\n if (status === PJQ.constants.changeRequests.changeRequestStatus.APPROVED\n || status === PJQ.constants.changeRequests.changeRequestStatus.VOID) {\n this.options.canEditLineItems = false;\n this.options.canEdit = PJQ.app.session.project.hasPermission('changeRequests.canEdit');\n this.options.canDelete = false;\n } else {\n this.options.canEdit = PJQ.app.session.project.hasPermission('changeRequests.canEdit');\n this.options.canEditLineItems = this.options.canEdit;\n this.options.canDelete = this.options.isAdmin;\n }\n\n let hasAssignedItems = _.some(this.model.lineItems.models, (lineItem) => {\n return lineItem.get('revenueLineItemId') > 0;\n });\n if (hasAssignedItems) {\n this.options.disabledStatuses = fnGetGreaterStatuses(PJQ.constants.changeRequests.changeRequestStatus.APPROVED);\n this.options.canEditLineItems = false;\n }\n\n if (this.model.isERPSynced()) {\n let syncStatus = this.model.erpSyncStatus();\n if (syncStatus === PJQ.constants.integrations.erp.syncStatuses.REVIEWING\n || syncStatus === PJQ.constants.integrations.erp.syncStatuses.APPROVED\n || syncStatus === PJQ.constants.integrations.erp.syncStatuses.FAILED\n || syncStatus === PJQ.constants.integrations.erp.syncStatuses.SYNCED\n ) {\n this.options.disabledStatuses = fnGetGreaterStatuses(PJQ.constants.commitments.commitmentStatus.APPROVED);\n this.options.canEdit = false;\n this.options.canEditLineItems = false;\n this.options.canDelete = false;\n }\n }\n },\n renderData: function () {\n return {\n model: this.model,\n customFields: this.customFields,\n erpIntegration: this.erpIntegration,\n canAdd: this.options.canAdd,\n canEditLineItems: this.options.canEditLineItems,\n canEdit: this.options.canEdit,\n canDelete: this.options.canDelete,\n isAdmin: this.options.isAdmin,\n canViewPrimeContracts: this.options.canViewPrimeContracts,\n canViewRFQs: this.options.canViewRFQs,\n isFetched: this.isFetched,\n activeView: this.options.activeView,\n views: this.views,\n checkFieldVisible: _.bind(this.checkFieldVisible, this),\n checkFieldRequired: _.bind(this.checkFieldRequired, this)\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.activateView(this.options.activeView);\n\n this.stopListening(this.model);\n this.listenTo(this.model, 'change:statusId', () => {\n this.renderERP();\n });\n this.stopListening(this.model.lineItems);\n this.listenTo(this.model.lineItems, 'update', () => {\n this.renderERP();\n });\n this.renderERP();\n\n this.renderGeneral();\n this.renderLineItems();\n this.renderMarkups();\n this.updateCounts();\n },\n updateCounts: function () {\n this.$('.count-line-items').text(_.size(this.model.lineItems.models));\n this.$('.count-markups').text(_.size(_.filter(this.model.markupItems.models, function (item) {\n return !item.get('delete');\n })));\n },\n views: {\n GENERAL: 'CR_General',\n LINEITEMS: 'CR_LineItems',\n MARKUPS: 'CR_Markups',\n RFQ: 'CR_RFQ'\n },\n activeViewChanged: function (e) {\n let view = e.target.hash ? e.target.hash.replace('#', '') : null;\n this.activateView(view);\n },\n activateView: function (view) {\n switch (view) {\n case this.views.GENERAL:\n case this.views.LINEITEMS:\n case this.views.MARKUPS:\n break;\n case this.views.RFQ:\n this.renderRFQ();\n break;\n default:\n view = this.views.GENERAL;\n break;\n }\n\n this.$('.nav-link[href=\"#' + view + '\"]').tab('show');\n this.options.activeView = view;\n },\n renderGeneral: function () {\n new PJQ.Binder(this.$el, this.model, {\n canEdit: !this.options.canEdit ? false : null,\n useDecimalPercentFields: true,\n watchElements: [\n 'input',\n 'textarea'\n ]\n });\n\n let choices = _.map(PJQ.constants.changeRequests.changeRequestStatus, (st) => {\n return {\n id: st,\n name: PJQ.constants.changeRequests.changeRequestStatusNames[st],\n disabled: this.options.disabledStatuses != null && this.options.disabledStatuses.indexOf(st) > -1\n }\n });\n this.statusPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-status'),\n choices: choices,\n isIntChoices: true,\n defaultValue: this.model.get('statusId'),\n canEdit: this.options.canEditStatus,\n onChange: _.bind(function (value) {\n let newStatus = value,\n oldStatus = this.model.get('statusId');\n this.model.set('statusId', newStatus);\n if (!this.model.isNew()) {\n this.model.save(null, {\n success: _.bind(function () {\n this.model.dirtyAttributes = {};\n if (typeof this.options.onSave === 'function')\n this.options.onSave(this.model, false);\n this.render();\n PJQ.notifications.notify.successNotify({\n message: 'Change Request saved successfully'\n });\n }, this)\n })\n }\n }, this)\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-revenue-source'),\n choices: [\n {\n id: PJQ.constants.changeRequests.revenueSource.REVENUE,\n name: PJQ.constants.changeRequests.revenueSourceNames[PJQ.constants.changeRequests.revenueSource.REVENUE]\n },\n {\n id: PJQ.constants.changeRequests.revenueSource.MANUAL,\n name: PJQ.constants.changeRequests.revenueSourceNames[PJQ.constants.changeRequests.revenueSource.MANUAL]\n }\n ],\n isIntChoices: true,\n defaultValue: this.model.get('revenueSource') ?? PJQ.constants.changeRequests.revenueSource.REVENUE,\n canEdit: this.options.canEdit,\n onChange: (value) => {\n this.model.set({\n revenueSource: value\n });\n this.refreshLineItems()\n }\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-scope'),\n choices: [\n {\n id: PJQ.constants.changeRequests.scope.OWNER_CHANGE,\n name: PJQ.constants.changeRequests.scopeNames[PJQ.constants.changeRequests.scope.OWNER_CHANGE]\n },\n {\n id: PJQ.constants.changeRequests.scope.INTERNAL,\n name: PJQ.constants.changeRequests.scopeNames[PJQ.constants.changeRequests.scope.INTERNAL]\n }\n ],\n isIntChoices: true,\n defaultValue: this.model.get('scope') ?? PJQ.constants.changeRequests.scope.OWNER_CHANGE,\n canEdit: this.options.canEdit,\n onChange: (value) => {\n this.model.set({\n revenueSource: PJQ.constants.changeRequests.revenueSource.MANUAL,\n scope: value\n });\n this.model.set('scope', value);\n\n if(value === PJQ.constants.changeRequests.scope.INTERNAL) {\n _.each(this.model.lineItems.models, (lineItem) => {\n lineItem.set('revenue', 0);\n });\n } else {\n _.each(this.model.lineItems.models, (lineItem) => {\n lineItem.set('revenue', lineItem.get('amount'));\n });\n }\n this.refreshLineItems()\n }\n });\n\n this.contractCompanyPicker = new PJQ.views.contacts.ContactsSelectInput({\n el: this.$('.client'),\n selectedContact: this.model.client,\n canEdit: false,\n displayContactsBlock: true\n });\n\n if (_.size(this.customFields) > 0) {\n this.customFieldsForm = new PJQ.views.customFields.CustomFieldsForm({\n el: this.$('.change-request-custom-fields'),\n isEdit: this.options.canEdit,\n isAdmin: this.options.isAdmin,\n collection: this.customFields,\n fieldValues: this.model.get('customFieldValues'),\n onChange: _.bind(function () {\n this.model.isDirty = true;\n }, this)\n });\n }\n\n if (this.checkFieldVisible('attachments')) {\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: this.$('.cr-file-uploader'),\n collection: this.model.attachments,\n canUpload: this.options.canEdit,\n useApiV2: true,\n canDelete: this.options.canEdit && this.options.isAdmin,\n previewImageDimension: 150,\n onSuccess: _.bind(function (file) {\n this.model.isDirty = true;\n }, this),\n onDelete: _.bind(function (attachment, callback) {\n if (attachment.get('id') > 0) {\n attachment.set('delete', true);\n } else {\n attachment.destroy();\n }\n\n this.model.isDirty = true;\n callback();\n }, this)\n });\n }\n },\n refreshLineItems: function () {\n if (this.lineItemsView != null) {\n this.lineItemsView.options.showRevenue = this.model.get('scope') !== PJQ.constants.changeRequests.scope.INTERNAL;\n this.lineItemsView.options.showMarkup = this.lineItemsView.options.showRevenue;\n this.lineItemsView.options.copyCostToRevenue = this.model.get('revenueSource') !== PJQ.constants.changeRequests.revenueSource.MANUAL && this.lineItemsView.options.showRevenue;\n this.lineItemsView.renderLineItemsTable();\n }\n },\n renderLineItems() {\n if(this.lineItemsView){\n this.lineItemsView.remove();\n }\n\n let showRevenue = this.model.get('scope') !== PJQ.constants.changeRequests.scope.INTERNAL,\n showMarkup = showRevenue;\n this.lineItemsView = new PJQ.views.budget.LineItemsView({\n el: this.$('.cr-line-items'),\n model: this.model,\n collection: this.model.lineItems,\n lineItemModel: PJQ.models.changeRequests.ChangeRequestLineItem,\n changeRequest: this.model,\n canEdit: this.options.canEditLineItems,\n canApplyChangeRequestCosts: this.options.isAdmin,\n canApplyChangeRequestRevenue: this.options.isAdmin && this.model.get('statusId') === PJQ.constants.changeRequests.changeRequestStatus.APPROVED,\n canSendRFQ: this.model.get('statusId') !== PJQ.constants.changeRequests.changeRequestStatus.APPROVED\n && this.model.get('statusId') !== PJQ.constants.changeRequests.changeRequestStatus.REJECTED\n && this.model.get('statusId') !== PJQ.constants.changeRequests.changeRequestStatus.VOID,\n canDelete: this.options.canEditLineItems,\n primeContract: this.options.primeContract,\n accountingMethod: this.model.get('accountingMethod'),\n showRevenue: showRevenue,\n showMarkup: showMarkup,\n copyCostToRevenue: showRevenue && this.model.get('revenueSource') !== PJQ.constants.changeRequests.revenueSource.MANUAL,\n canChangeAccountingMethod: this.options.canEditLineItems,\n financialMarkups: this.model.markupItems,\n enableSelection: true,\n showSubTotal: true,\n showGrandTotal: true,\n onCreateFromLineItems: () => {\n this.removeModal();\n },\n onLineItemChange: () => {\n this.model.isDirty = true;\n },\n onLineItemAdd: () => {\n this.model.isDirty = true;\n this.updateCounts();\n },\n onLineItemDelete: () => {\n this.model.isDirty = true;\n this.updateCounts();\n },\n onChangeOrderView: () => {\n this.removeModal();\n },\n onCommitmentView: () => {\n this.removeModal();\n },\n onSendRFQ: (data) => {\n let fnSendRFQ = (lineItems) => {\n new PJQ.views.rfq.RFQBatchModal({\n changeRequest: this.model,\n project: this.options.project,\n lineItems: lineItems,\n projectCommitments: data.projectCommitments,\n onSave: (res) => {\n this.model.rfq.add(res.requests);\n this.activateView(this.views.RFQ);\n }\n });\n },\n lineItems = this.model.lineItems.get(data.selectedIds);\n\n let lineItemCt = _.size(lineItems),\n rfqItemsCt = _.filter(lineItems, (lineItem) => {\n return lineItem.get('rfqId') > 0;\n }).length;\n if (rfqItemsCt > 0) {\n if (rfqItemsCt === lineItemCt) {\n new PJQ.views.modals.YesNo({\n header: \"Send New RFQs?\",\n body: \"All of the selected line items are already associated with RFQs. Would you like to create them again?\",\n onYes: () => {\n fnSendRFQ(lineItems);\n }\n });\n } else {\n new PJQ.views.BaseModal({\n header: \"Send RFQs\",\n body: \"Some of the selected line items are already associated with RFQs. Please choose from the options below.\",\n isShowOkButton: true,\n okButtonText: \"Create All (\" + lineItemCt + \")\",\n onOk: () => {\n fnSendRFQ(lineItems);\n },\n isShowSecondaryButton: true,\n secondaryButtonColorClass: 'primary',\n secondaryButtonText: \"Create Missing (\" + rfqItemsCt + \")\",\n onSecondary: () => {\n fnSendRFQ(_.filter(lineItems, (lineItem) => {\n return !(lineItem.get('rfqId') > 0);\n }));\n }\n });\n }\n } else {\n fnSendRFQ(lineItems);\n }\n }\n });\n },\n viewPrimeContract: function () {\n this.removeModal();\n new PJQ.views.primeContracts.PrimeContractEditModal({\n model: new PJQ.models.primeContracts.PrimeContract({\n id: this.model.get('primeContractId')\n })\n });\n },\n renderMarkups: function () {\n if (!this.options.isAdmin) {\n return;\n }\n\n this.markupsView = new PJQ.financialMarkups.views.FinancialMarkupsList({\n el: this.$('.cr-markups'),\n collection: this.model.markupItems,\n canEdit: false\n });\n },\n renderRFQ: function () {\n if (this.model.isNew() || !this.options.canViewRFQs) {\n return;\n }\n\n this.model.fetchRFQs().then(() => {\n this.rfqDataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('.cco-rfq'),\n data: this.model.rfq.models,\n isHideSearch: true,\n language: {\n emptyTable: 'No RFQs have been created yet',\n zeroRecords: \"No RFQs matched the search criteria\"\n },\n paging: false,\n order: [],\n columns: [\n {\n \"columnData\": \"\",\n \"data\": null,\n \"title\": \"\",\n \"width\": \"20px\",\n \"orderable\": false,\n \"searchable\": false,\n \"defaultContent\": '',\n \"render\": function (data, type, row) {\n return PJQ.helpers.erp.getERPIcon(row.erpSyncStatus());\n }\n },\n {\n \"columnData\": \"number\",\n \"data\": \"attributes.number\",\n \"title\": \"Number\",\n \"width\": \"100px\",\n \"render\": (data, type, row) => {\n return '' + row.get('number') + '';\n }\n },\n {\n \"columnData\": \"title\",\n \"data\": \"attributes.title\",\n \"title\": \"Title\"\n },\n {\n \"columnData\": \"scope\",\n \"data\": \"attributes.scope\",\n \"title\": \"Scope\"\n },\n {\n \"columnData\": \"lastSentOn\",\n \"data\": \"attributes.lastSentOn\",\n \"title\": 'Sent On',\n \"width\": '90px',\n \"render\": (data, type, row) => {\n if (_.size(data) === 0) {\n return '';\n }\n return PJQ.helpers.dateHelpers.getDateString(new Date(data), PJQ.helpers.dateHelpers.dateFormats.DATE);\n }\n },\n {\n \"columnData\": \"dueDate\",\n \"data\": \"attributes.dueDate\",\n \"title\": 'Due',\n \"width\": '90px',\n \"render\": (data, type, row) => {\n if (_.size(data) === 0) {\n return '';\n }\n return PJQ.helpers.dateHelpers.getDateString(new Date(data), PJQ.helpers.dateHelpers.dateFormats.DATE);\n }\n },\n {\n \"columnData\": \"contractedContact\",\n \"title\": \"Company\",\n \"titleSettings\": \"Company\",\n \"render\": (data, type, row) => {\n return row.contractedContact?.get('companyName') ?? '';\n }\n },\n {\n \"columnData\": \"amount\",\n \"data\": \"attributes.amount\",\n \"width\": \"10%\",\n \"title\": \"Quote\",\n \"className\": \"text-align-right\",\n \"render\": (data, type, row) => {\n if (row.get('responseOn') == null) {\n return '';\n } else if (row.get('hasCostImpact') === false) {\n return 'No Impact';\n }\n\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('amount'));\n }\n },\n {\n \"columnData\": \"status\",\n \"data\": \"attributes.statusId\",\n \"title\": \"Status\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.constants.rfq.rfqStatusNames[row.get('statusId')]\n }, this)\n },\n {\n \"title\": '',\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"90px\",\n \"className\": \"text-center\",\n \"visible\": true,\n \"render\": _.bind(function (data, type, row) {\n return '
';\n }, this)\n }],\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>',\n contextMenuOptions: {\n actions: [\n {\n name: 'View',\n onClick: _.bind(function (row) {\n this.viewRFQ(row.data());\n }, this),\n isShown: _.bind(function (row) {\n return true;\n }, this)\n }\n ]\n },\n onRowDoubleClick: _.bind(function (row) {\n let rfq = row.data();\n if (rfq != null) {\n rfq.fetch({\n success: _.bind(function () {\n this.viewRFQ(rfq);\n }, this)\n });\n }\n }, this)\n });\n })\n },\n viewRFQ: function (rfq) {\n isNew = rfq == null;\n new PJQ.views.rfq.RFQEditModal({\n model: rfq,\n changeRequest: this.model,\n onSave: _.bind(function (rfq) {\n if (isNew) {\n this.model.rfq.add(rfq);\n this.rfqDataTable.addRow(rfq);\n isNew = false;\n\n if (typeof this.options.onRFQAdd === 'function') {\n this.options.onRFQAdd(rfq);\n }\n }\n this.updateCounts();\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n }, this),\n onDelete: _.bind(function (rfq) {\n this.model.rfq.remove(rfq);\n this.rfqDataTable.render();\n this.updateCounts();\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n }, this)\n });\n },\n newRFQ: function () {\n this.viewRFQ();\n },\n viewRFQClicked: function (e) {\n let target = $(e.currentTarget),\n row = this.rfqDataTable.getRow(target.closest('tr'));\n this.viewRFQ(row.data());\n },\n renderERP: function () {\n let $erp = this.$('.erp-sync');\n if (!this.options.isAdmin || this.erpIntegration == null || !this.options.project.isERPSynced()\n || (this.model.get('statusId') !== PJQ.constants.changeRequests.changeRequestStatus.APPROVED)) {\n $erp.remove();\n return;\n }\n\n let canPush = this.commitment != null && this.commitment.erpSyncStatus() === PJQ.constants.integrations.erp.syncStatuses.SYNCED && this.model && _.size(this.model.lineItems) > 0;\n PJQ.helpers.erp.renderERPButtons($erp, {\n pushSupported: !this.model.isERPSynced() && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_CHANGE_REQUESTS),\n canPush: canPush,\n disablePushReason: canPush ? '' : this.model && _.size(this.model.lineItems) === 0 ? 'No line items exist for this change request' : 'The contract for this change request is not synced',\n status: this.model.erpSyncStatus()\n });\n },\n pushERP: function (callback) {\n if (this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_CHANGE_REQUESTS)) {\n this.erpIntegration.pushChangeRequest(this.model, _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Change Request pushed to ERP'\n });\n\n if (callback && typeof callback === 'function') {\n callback();\n } else {\n this.render();\n }\n }, this));\n }\n },\n undoPushERP: function () {\n if (this.model.erpSyncStatus() === PJQ.constants.integrations.erp.syncStatuses.REVIEWING) {\n this.erpIntegration.undoPush(this.model, _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Change Request removed from ERP approval'\n });\n this.render();\n }, this));\n }\n },\n unlinkERP: function () {\n if (this.erpIntegration != null) {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n this.erpIntegration.unlinkChangeRequest(this.model, _.bind(function (success) {\n if (success) {\n loader.remove();\n PJQ.notifications.notify.successNotify({\n message: 'Change Request unlinked from ERP'\n });\n this.render();\n }\n }, this));\n }\n },\n checkFieldVisible: function (fieldName) {\n if (this.coreFieldSettings) {\n let fieldSettings = this.coreFieldSettings.findWhere({fieldName: fieldName});\n if (fieldSettings != null) {\n return fieldSettings.get('isVisible');\n }\n }\n return true;\n },\n checkFieldRequired: function (fieldName) {\n if (this.coreFieldSettings) {\n let fieldSettings = this.coreFieldSettings.findWhere({fieldName: fieldName});\n if (fieldSettings != null) {\n return fieldSettings.get('isRequired');\n }\n }\n return false;\n },\n exportRevenue: function () {\n this.export(true, false);\n },\n exportCosts: function () {\n this.export(false, true);\n },\n exportClicked: function () {\n this.export();\n },\n export: function (withRevenue = true, withCosts = true) {\n let callback = () => {\n PJQ.files.downloadFile(PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'changerequests',\n value: this.model.get('id')\n },\n {\n endpoint: 'export',\n }\n ], [{\n parameter: 'showCosts',\n value: withCosts\n }, {\n parameter: 'showRevenue',\n value: withRevenue\n }]), {isAPIv2: true});\n };\n\n if (this.options.canEdit) {\n this.save(callback);\n } else {\n callback();\n }\n },\n saveEmail: function () {\n this.save(_.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Change Request saved successfully'\n });\n\n this.email();\n }, this));\n },\n savePush: function () {\n this.save(_.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Change Request saved successfully'\n });\n\n this.pushERP(() => {\n this.removeModal()\n });\n }, this));\n },\n submitChangeRequest: function () {\n this.model.submit(null, _.bind(function (result) {\n if (result) {\n PJQ.notifications.notify.successNotify({\n message: 'Change Request submitted successfully'\n });\n\n this.removeModal();\n }\n }, this));\n },\n saveChangeRequest: function () {\n this.save(() => {\n PJQ.notifications.notify.successNotify({\n message: 'Change Request saved successfully'\n });\n\n this.removeModal();\n });\n },\n validate: function () {\n let isValid = true;\n\n if (this.customFieldsForm != null && !this.customFieldsForm.validate())\n isValid = false;\n\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-number'), true);\n if ((!this.model.isNew() || this.checkFieldRequired('number')) && _.size(this.model.get('number')) === 0) {\n isValid = false;\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-number'), false);\n }\n\n if (this.checkFieldRequired('description')) {\n let $description = this.$('.change-request-description');\n PJQ.helpers.inputHelpers.setInputError($description, true);\n if (_.size(this.model.get('description')) === 0) {\n PJQ.helpers.inputHelpers.setInputError($description, false);\n isValid = false;\n }\n }\n\n if (this.checkFieldRequired('attachments')) {\n this.fileUploader.clearError();\n let hasValidAttachment = _.find(this.model.attachments.models, function (model) {\n return !model.get('delete')\n }, this) != null;\n\n if (!hasValidAttachment) {\n this.fileUploader.showError('Missing attachment', 100000);\n isValid = false;\n }\n }\n\n if (!isValid) {\n this.activateView(this.views.GENERAL);\n return isValid;\n }\n\n if (!this.lineItemsView.validate()) {\n isValid = false;\n\n this.activateView(this.views.LINEITEMS);\n return isValid;\n }\n\n return isValid;\n },\n save: function (callback) {\n if (!this.validate())\n return;\n\n let newMarkupLines = this.model.lineItems.filter(function (lineItem) {\n return lineItem.markup && lineItem.isNew();\n });\n this.model.lineItems.remove(newMarkupLines);\n\n this.model.save({\n customFields: this.customFieldsForm != null ? this.customFieldsForm.getChanged() : null,\n lineItems: this.model.lineItems.toJSON(),\n markupItems: this.model.markupItems.toJSON()\n }, {\n success: _.bind(function () {\n this.render();\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n\n PJQ.app.session.project.trigger('changeRequestChanged', this.model);\n if (typeof callback === 'function') {\n callback(true);\n }\n }, this)\n });\n },\n deleteChangeRequest: function () {\n let changeRequestId = this.model.id,\n hasAssociatedLineItems = _.size(_.filter(this.model.lineItems.models, function (lineItem) {\n return lineItem.get('ccoId') || lineItem.get('pccoId') || lineItem.get('commitmentId');\n }, this)) > 0;\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Delete\",\n body: hasAssociatedLineItems ? \"This Change Request has line items that are associated with other line items. Deleting it will also delete all associated line items. Are you sure you want to delete this Change Request?\" : \"Are you sure you want to delete this Change Request?\",\n onDelete: _.bind(function () {\n this.model.destroy({\n success: _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Change Request deleted successfully'\n });\n\n if (typeof this.options.onDelete === 'function')\n this.options.onDelete(changeRequestId);\n\n this.removeModal();\n }, this)\n });\n }, this)\n });\n },\n email: function () {\n let projectName = this.options.project?.get('projectName')?.trim();\n let subject = `A Change Request has been shared with you ${projectName && _.size(projectName) > 0 ? `for ${projectName}` : ''}`;\n new PJQ.views.email.ComposeEmailModal({\n header: \"Email Change Request\",\n project: PJQ.app.session.project,\n subject: subject,\n onSave: _.bind(function (data) {\n this.model.share(data, _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Change Request email sent'\n });\n }, this));\n }, this)\n });\n },\n close: function () {\n if (this.model.hasChanged() && this.options.canEdit) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.saveChangeRequest();\n this.removeModal();\n }, this),\n onDontSave: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});","PJQ.views.changeRequests.ChangeRequestsList = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'change-requests-list'),\n subTemplates: {\n totals: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'change-requests-totals')\n },\n changeRequestId: null\n },\n events: {\n 'click .btn-settings': 'editSettings',\n 'click .btn-add-change-request': 'addChangeRequest',\n 'click .btn-delete-change-request': 'deleteChangeRequestClicked',\n 'click .btn-export': 'exportChangeRequestList'\n },\n beforeFirstRender: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.changeRequests.ChangeRequests(null, {\n projectId: this.options.project.get('projectId'),\n groupId: this.options.groupId ? this.options.groupId : null,\n costTypeId: this.options.costTypeId ? this.options.costTypeId : null\n });\n }\n\n if (!this.collection.isFetched) {\n await this.collection.fetch();\n }\n\n this.customFields = await this.options.project.fetchChangeRequestCustomFields();\n this.userSettings = await PJQ.app.session.fetchChangeRequestUserSettings();\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n this.settings = await this.options.project.fetchChangeRequestSettings();\n\n if (this.settings.get('enableStandardListView')) {\n this.subJobs = await this.options.project.fetchSubJobs();\n this.costCodes = await this.options.project.fetchCostCodes();\n this.costTypes = await this.options.project.fetchCostTypes();\n }\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.options.isAdmin = PJQ.app.session.project.hasPermission('changeRequests.isAdmin');\n this.options.canAdd = PJQ.app.session.project.hasPermission('changeRequests.canAdd');\n },\n renderData: function () {\n return {\n collection: this.collection,\n isFetched: this.isFetched,\n isAdmin: this.options.isAdmin,\n hideHeader: this.options.hideHeader,\n canAdd: this.options.canAdd\n }\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.renderView();\n\n PJQ.app.session.project.off('changeRequestChanged');\n PJQ.app.session.project.on('changeRequestChanged', function (changeRequest) {\n this.collection.add(changeRequest);\n this.render();\n }, this);\n\n if (this.options.rfqId > 0) {\n let rfq = new PJQ.models.rfq.RFQ({\n id: this.options.rfqId\n });\n\n rfq.fetch({\n success: _.bind(function () {\n this.viewRFQ(rfq);\n }, this)\n });\n } else if (this.options.changeRequestId > 0) {\n let initChangeRequest = this.collection.get(this.options.changeRequestId);\n if (initChangeRequest != null) {\n this.viewChangeRequest(initChangeRequest);\n this.options.changeRequestId = null;\n }\n }\n this.renderStats();\n },\n renderStats: function () {\n let totals,\n $totals = this.$('.totals-outer');\n if (this.collection == null || !this.collection.isFetched) {\n $totals.empty();\n return;\n }\n\n totals = this.collection.getTotalAmountsByStatus();\n this.renderSubTemplate(false, this.options.subTemplates.totals, $totals, {\n pending: totals[PJQ.constants.changeRequests.changeRequestStatusBuckets.PENDING.name],\n projected: totals[PJQ.constants.changeRequests.changeRequestStatusBuckets.PROJECTED.name],\n approved: totals[PJQ.constants.changeRequests.changeRequestStatusBuckets.APPROVED.name]\n });\n },\n renderView: function () {\n if (this.dataTable) {\n this.dataTable.remove();\n this.dataTable = null;\n }\n\n this.dataTable = this.getDataTableInstance();\n },\n getDataTableInstance: function () {\n return new PJQ.views.changeRequests.ChangeRequestDataTable({\n el: this.$('.change-requests-data'),\n rowId: \"cid\",\n data: this.collection.models,\n orderCookie: PJQ.constants.cookies.CHANGE_REQUEST_ORDER_COOKIE,\n isAdmin: this.options.isAdmin,\n costCodes: this.costCodes,\n costTypes: this.costTypes,\n subJobs: this.subJobs,\n companySettings: this.settings,\n headerData: _.bind(function () {\n return {\n project: this.options.project,\n isAdmin: this.options.isAdmin,\n canAdd: this.options.canAdd,\n isStandardListView: this.settings.get('enableStandardListView'),\n };\n }, this),\n userSettings: this.userSettings,\n settings: this.userSettings.getSettings(PJQ.constants.changeRequests.view.CHANGE_REQUESTS),\n order: [[1, 'asc']],\n colReorder: {\n fixedColumnsLeft: 1,\n fixedColumnsRight: 1,\n realtime: false\n },\n columnOrderChanged: () => {\n this.userSettings.save();\n },\n onViewChangeRequest: (changeRequest) => {\n this.viewChangeRequest(changeRequest);\n },\n onRowDoubleClick: (row) => {\n if (row.data()) {\n this.viewChangeRequest(row.data());\n }\n },\n onCreateFromLineItems: async (lineItems) => {\n await this.collection.fetch();\n this.dataTable.resetData(this.collection.models);\n },\n contextMenuOptions: {\n actions: [\n {\n name: 'View',\n onClick: (row) => {\n this.viewChangeRequest(row.data());\n }\n }\n ]\n }\n });\n },\n exportChangeRequestList: function (e) {\n if (this.options.project == null) {\n return;\n }\n\n let type = 'excel',\n orderCookie = PJQ.helpers.cookieHelpers.getCookie(PJQ.constants.cookies.CHANGE_REQUEST_ORDER_COOKIE),\n order = orderCookie != null ? JSON.parse(orderCookie) : null,\n columns = this.userSettings.getSettings(PJQ.constants.changeRequests.view.CHANGE_REQUESTS).columns;\n\n // There is an extra column in the datatable for icons. Subtract 1 to get the correct order.\n if(order != null && Array.isArray(order[0]) && typeof order[0][0] === 'number'){\n order[0][0] = order[0][0] - 1;\n }\n\n // Some of the columns have different names than the report center definitions. This will change them to the correct names.\n let changeTerms = {\n \"createdOn\": \"created\",\n \"client.companyName\": \"client\",\n \"primeContract\": \"contract\",\n \"amount\": \"cost\"\n };\n columns = _.map(columns, column => changeTerms[column] || column);\n\n let report = new PJQ.models.reports.NewReport({\n type: PJQ.constants.reports.reportTypes.CHANGE_REQUEST.type,\n projectId: this.options.project ? this.options.project.id : null,\n options: {\n columns: columns,\n columnOrder: order\n }\n });\n report.export({format: type}).then(() => {\n\n });\n },\n viewChangeRequestClicked: function (e) {\n let row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n this.viewChangeRequest(row.data());\n },\n viewRFQ(rfq) {\n new PJQ.views.rfq.RFQEditModal({\n model: rfq,\n project: this.options.project\n });\n },\n viewChangeRequest: function (changeRequest, primeContract) {\n let isNew = primeContract != null;\n new PJQ.views.changeRequests.ChangeRequestEditModal({\n model: changeRequest,\n primeContract: primeContract,\n onSave: _.bind(function (changeRequest) {\n if (isNew) {\n this.collection.add(changeRequest);\n }\n this.renderView();\n }, this),\n onDelete: _.bind(function (changeRequest) {\n this.collection.remove(changeRequest);\n this.renderView();\n }, this)\n });\n },\n addChangeRequest: function () {\n new PJQ.views.primeContracts.SelectPrimeContractsModal({\n isSingleChoice: true,\n project: this.options.project,\n headerSubText: 'Select the Contract you would like to create a Change Request for.',\n filterStatuses: PJQ.constants.primeContracts.primeContractStatus.APPROVED,\n onSave: _.bind(function (contract) {\n this.viewChangeRequest(null, contract);\n }, this)\n });\n },\n deleteChangeRequestClicked: function (e) {\n let row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n this.deleteChangeRequest(row);\n },\n deleteChangeRequest: function (row) {\n if (row != null) {\n let changeRequest = row.data();\n if (changeRequest != null) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete Change Request\",\n body: \"Are you sure you want to delete this Change Request?\",\n onDelete: _.bind(function () {\n changeRequest.destroy({\n success: _.bind(function () {\n this.dataTable.removeRow(row);\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(changeRequest);\n }\n }, this)\n });\n }, this)\n });\n }\n }\n },\n editSettings: function () {\n new PJQ.views.changeRequests.ChangeRequestSettingsModal({\n changeRequestsView: this,\n settings: this.settings,\n onSave: _.bind(function () {\n this.renderView();\n PJQ.notifications.notify.successNotify({\n message: 'Settings updated successfully'\n });\n }, this)\n });\n }\n});\n\nPJQ.views.changeRequests.SelectChangeRequestsModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-select-change-requests'),\n width: '50%',\n maxWidth: 700,\n onSave: _.noop\n },\n events: {\n \"change .select-change-request\": \"selectChangeRequest\",\n \"click .btn-save\": \"save\",\n \"click .btn-cancel\": \"cancel\"\n },\n beforeModalCreated: function () {\n this.options.isAdmin = PJQ.app.session.project.hasPermission('changeRequests.isAdmin');\n this.selectedChangeRequests = [];\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.changeRequests.ChangeRequests(null, {\n projectId: this.options.project.get('projectId')\n });\n }\n\n if (this.collection.isFetched) {\n this.render();\n } else {\n this.collection.fetch({\n success: _.bind(function () {\n this.changeRequests = this.collection.models;\n\n if (this.options.primeContractId) {\n this.changeRequests = _.filter(this.changeRequests, function (model) {\n return model.get('primeContractId') === this.options.primeContractId\n }, this);\n }\n\n if (this.options.filterStatuses) {\n this.changeRequests = _.filter(this.changeRequests, function (model) {\n let statusId = model.get('statusId');\n\n if (_.isArray(this.options.filterStatuses)) {\n return _.includes(this.options.filterStatuses, statusId);\n } else if (_.isNumber(this.options.filterStatuses)) {\n return this.options.filterStatuses === statusId;\n }\n\n return false;\n\n }, this);\n }\n this.render();\n }, this)\n });\n }\n\n },\n renderData: function () {\n return {\n headerSubText: this.options.headerSubText,\n isSingleChoice: this.options.isSingleChoice\n }\n },\n afterRender: function () {\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('.change-requests-table'),\n data: this.changeRequests,\n isHideSearch: true,\n order: [],\n columns: [{\n \"data\": \"attributes.isSelected\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": _.bind(function (data) {\n return ('
');\n }, this)\n },\n {\n \"data\": \"attributes.number\",\n \"title\": \"Number\",\n \"orderable\": true\n },\n {\n \"data\": \"attributes.client.companyName\",\n \"title\": \"Client\",\n \"orderable\": true\n },\n {\n \"data\": \"attributes.description\",\n \"title\": \"Description\",\n \"orderable\": false\n },\n {\n \"data\": \"attributes.amount\",\n \"title\": \"Amount\",\n \"orderable\": false,\n \"className\": \"text-align-right\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this)\n }],\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n });\n },\n selectChangeRequest: function (e) {\n let target = $(e.currentTarget),\n changeRequest = this.dataTable.getRow(target.closest('tr')).data();\n\n if (this.options.isSingleChoice) {\n this.$('.select-change-request').not(target).text('Select').prop('checked', false);\n if (changeRequest.get('isSelected')) {\n changeRequest.set('isSelected', false);\n this.selectedChangeRequest = null;\n } else {\n changeRequest.set('isSelected', true);\n this.selectedChangeRequest = changeRequest;\n this.collection.get(changeRequest.id);\n _.each(this.collection.models, _.bind(function (dtChangeRequest) {\n if (changeRequest.id !== dtChangeRequest.id)\n dtChangeRequest.set('isSelected', false);\n }, this));\n }\n this.$('.btn-save').attr('disabled', this.selectedChangeRequest == null);\n\n if (typeof this.options.onChangeRequestSelected === 'function') {\n this.options.onChangeRequestSelected(this.selectedChangeRequest);\n }\n } else {\n if (changeRequest.get('isSelected')) {\n target.text('Select').addClass('btn-primary').removeClass('btn-secondary');\n changeRequest.set('isSelected', false);\n this.selectedChangeRequests = _.reject(this.selectedChangeRequests, function (selChangeRequest) {\n return selChangeRequest.id === changeRequest.id;\n });\n } else {\n target.text('Deselect').addClass('btn-secondary').removeClass('btn-primary');\n changeRequest.set('isSelected', true);\n this.selectedChangeRequests.push(changeRequest);\n }\n this.$('.btn-save').attr('disabled', this.selectedChangeRequests == null);\n\n if (typeof this.options.onChangeRequestSelected === 'function') {\n this.options.onChangeRequestSelected(this.selectedChangeRequests);\n }\n }\n },\n cancel: function () {\n if (this.options.onCancel) {\n this.options.onCancel();\n }\n this.removeModal();\n },\n save: function () {\n if (this.options.onSave) {\n this.options.onSave(this.selectedChangeRequest ? this.selectedChangeRequest : this.selectedChangeRequests);\n this.removeModal();\n }\n }\n});","PJQ.views.changeRequests.ChangeRequestManagement = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'change-request-management'),\n subTemplates: {\n changeRequestTotals: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'change-requests-totals')\n },\n changeRequestId: null,\n rfqId: null,\n view: null\n },\n events: {\n 'shown.bs.tab .nav-tabs': 'tabActivated',\n 'click .btn-settings': 'settings'\n },\n beforeFirstRender: function () {\n this.options.canViewChangeRequests = PJQ.app.session.project.hasPermission('changeRequests.canView');\n this.options.canViewRFQs = PJQ.app.session.project.hasPermission('changeRequests.canViewRFQs');\n this.options.isAdmin = PJQ.app.session.project.hasPermission('changeRequests.isAdmin');\n },\n renderData: function () {\n return {\n isFetched: this.isFetched,\n changeRequests: this.changeRequests,\n rfqs: this.rfqs,\n canViewChangeRequests: this.options.canViewChangeRequests,\n canViewRFQs: this.options.canViewRFQs,\n isAdmin: this.options.isAdmin\n }\n },\n afterRender: function () {\n this.changeRequestsView = null;\n this.rfqView = null;\n\n if (this.options.view != null) {\n this.activateTab(this.options.view);\n } else if (this.options.changeRequestId > 0 && this.options.canViewChangeRequests) {\n this.activateTab('changerequests');\n } else if (this.options.rfqId > 0 && this.options.canViewRFQs) {\n this.activateTab('rfq');\n } else if (this.options.canViewChangeRequests) {\n this.activateTab('changerequests');\n } else {\n this.activateTab('rfq');\n }\n },\n renderStats: function () {\n let totals,\n $totals = this.$('.totals-outer');\n switch (this.activeView) {\n case 'changerequests':\n if (this.changeRequestsView == null || this.changeRequestsView.collection == null || !this.changeRequestsView.collection.isFetched) {\n $totals.empty();\n return;\n }\n\n totals = this.changeRequestsView.collection.getTotalAmountsByStatus();\n this.renderSubTemplate(false, this.options.subTemplates.changeRequestTotals, $totals, {\n pending: totals[PJQ.constants.changeRequests.changeRequestStatusBuckets.PENDING.name],\n projected: totals[PJQ.constants.changeRequests.changeRequestStatusBuckets.PROJECTED.name],\n approved: totals[PJQ.constants.changeRequests.changeRequestStatusBuckets.APPROVED.name]\n });\n break;\n default:\n $totals.empty();\n return;\n }\n },\n activateTab: function (tab) {\n this.activeView = tab;\n switch (tab ? tab.toLowerCase() : null) {\n case 'rfq':\n tab = 'RFQ_List';\n this.renderRFQView();\n break;\n default:\n tab = 'CR_List';\n this.renderChangeRequestsView();\n break;\n }\n\n this.isActivating = true;\n this.$('.nav-link[href=\"#' + tab + '\"]').tab('show');\n this.isActivating = false;\n\n this.renderStats();\n },\n tabActivated: function (e) {\n if (this.isActivating) {\n return;\n }\n\n this.activeTab = $(e.target).attr('href');\n\n let vw;\n switch (this.activeTab) {\n case '#CR_List':\n vw = 'changerequests';\n this.$('.btn-settings').show();\n break;\n case '#RFQ_List':\n vw = 'rfq';\n this.$('.btn-settings').hide();\n break;\n }\n this.activateTab(vw);\n },\n renderChangeRequestsView: function () {\n PJQ.app.router.navigate('projects/' + this.options.project.id.toString() + '/changerequests', {\n trigger: false\n });\n if (this.changeRequestsView == null && this.options.canViewChangeRequests) {\n let fnRender = () => {\n this.changeRequestsView = new PJQ.views.changeRequests.ChangeRequestsList({\n el: this.$('.change-requests-pane'),\n project: PJQ.app.session.project,\n changeRequestId: this.options.changeRequestId,\n collection: this.changeRequests,\n hideHeader: true,\n afterRender: _.bind(this.renderStats, this),\n });\n this.options.changeRequestId = null;\n };\n\n if (this.changeRequests == null) {\n this.changeRequests = new PJQ.collections.changeRequests.ChangeRequests(null, {\n projectId: this.options.project.get('projectId')\n });\n this.changeRequests.fetch({\n success: _.bind(function () {\n fnRender();\n }, this)\n });\n } else {\n fnRender();\n }\n }\n },\n renderRFQView: function () {\n PJQ.app.router.navigate('projects/' + this.options.project.id.toString() + '/changerequests/rfq', {\n trigger: false\n });\n if (this.rfqView == null) {\n let fnRender = () => {\n this.rfqView = new PJQ.views.rfq.RFQList({\n el: this.$('.rfq-pane'),\n project: PJQ.app.session.project,\n rfqId: this.options.rfqId,\n collection: this.rfqs,\n afterRender: _.bind(this.renderStats, this),\n });\n this.options.rfqId = null;\n };\n\n if (this.rfqs == null) {\n this.rfqs = new PJQ.collections.rfq.RFQs(null, {\n projectId: this.options.project.get('projectId')\n });\n this.rfqs.fetch({\n success: () => {\n fnRender();\n }\n });\n } else {\n fnRender();\n }\n }\n },\n getActiveTab: function () {\n return this.$('.nav-item>.nav-link.active').attr('href');\n },\n settings: function () {\n switch (this.getActiveTab()) {\n case '#CR_List':\n if (this.changeRequestsView != null) {\n this.changeRequestsView.editSettings();\n }\n break;\n }\n },\n updateTotalsCount: function () {\n let $changeRequestsSpan = this.$('.commitments-total'),\n $rfqSpan = this.$('.rfq-total');\n\n $changeRequestsSpan.text(_.size(this.changeRequests.models));\n $rfqSpan.text(_.size(this.rfq.models));\n }\n});","//Models\nPJQ.models.changeRequests.ChangeRequest = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n let arr = [];\n if (this.isNew()) {\n arr.push({\n endpoint: 'projects',\n value: this.get('projectId')\n });\n }\n arr.push({\n endpoint: 'changerequests',\n value: this.id\n });\n return PJQ.helpers.urlHelpers.generateEndpoint(arr);\n },\n parse: function (model) {\n if (!model)\n return model;\n\n if (model.primeContract) {\n this.primeContract = model.primeContract;\n }\n\n this.lineItems = new PJQ.collections.changeRequests.ChangeRequestLineItems(model.lineItems);\n this.attachments = new PJQ.collections.changeRequests.ChangeRequestAttachments(model.attachments);\n this.rfq = new PJQ.collections.rfq.RFQs(model.rfq, {\n projectId: model.projectId,\n changeRequestId: model.id\n });\n\n this.markupItems = new PJQ.financialMarkups.collections.FinancialMarkups(model ? model.markupItems : null);\n\n if (model && model.client) {\n if (model.client instanceof PJQ.models.BaseModel) {\n this.client = model.client;\n } else {\n this.client = new PJQ.models.contacts.Contact(model.client);\n }\n } else {\n this.client = null;\n }\n\n return model;\n },\n fetchRFQs(callback) {\n return new Promise((resolve, reject) => {\n if (this.rfq != null && this.rfq.isFetched) {\n if (typeof callback === 'function') {\n callback(this.rfq);\n }\n resolve(this.rfq);\n return;\n }\n\n this.rfq = new PJQ.collections.rfq.RFQs([], {\n projectId: this.get('projectId'),\n changeRequestId: this.id\n });\n this.rfq.fetch({\n success: () => {\n if (typeof callback === 'function') {\n callback(this.rfq);\n }\n resolve(this.rfq);\n },\n error: () => {\n if (typeof callback === 'function') {\n callback(this.rfq);\n }\n reject(new Error(\"Failed to fetch change request rfqs\"));\n }\n })\n });\n },\n beforeSave: function () {\n let newMarkupLines = this.lineItems.filter(function (lineItem) {\n return lineItem.markup && lineItem.isNew();\n });\n this.lineItems.remove(newMarkupLines);\n\n this.set({\n lineItems: this.lineItems.toJSON(),\n attachments: this.attachments.toJSON(),\n markupItems: this.markupItems.toJSON()\n });\n },\n syncERP: function (callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/syncerp',\n isAPIv2: true,\n }).post().done(_.bind(function (res) {\n if (res && _.size(res.externalId) > 0) {\n this.set('externalObject', res);\n }\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this)).fail(_.bind(function (xhr, err, result) {\n if (typeof callback === 'function') {\n callback(null);\n }\n }, this));\n },\n unlinkERP: function (callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/unlinkerp',\n isAPIv2: true,\n }).post().done(_.bind(function () {\n this.set('externalObject', null);\n if (typeof callback === 'function') {\n callback(true);\n }\n }, this)).fail(_.bind(function (xhr) {\n if (typeof callback === 'function') {\n let err;\n if (xhr.responseJSON != null) {\n err = xhr.responseJSON.type;\n } else {\n err = null;\n }\n callback(false, err);\n }\n }, this));\n },\n makeERPUrl: function (integration) {\n let externalId = this.externalId();\n if (_.size(externalId) === 0) {\n return '';\n }\n\n switch (integration.get('name')) {\n case PJQ.constants.integrations.providers.QBO.name:\n // TODO: QBO Integration URL\n return 'https://app.sandbox.qbo.intuit.com/app/purchaseorder?txnId=' + externalId;\n default:\n return '';\n }\n },\n share: function (data, callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/email',\n isAPIv2: true,\n data: {\n subject: data != null ? data.subject : null,\n body: data != null ? data.body : null,\n toEmails: data != null ? data.toEmails : null,\n ccEmails: data != null ? data.ccEmails : null,\n }\n }).post().done(_.bind(function (response) {\n callback();\n }, this)).fail(_.bind(function (xhr, err, result) {\n //todo: error\n }, this));\n },\n getSubTotal: function (markups, costOnly) {\n if (costOnly) {\n return this.get('amount') + this.get('markupAmount');\n }\n\n return this.get('revenue') + this.get('markupAmount');\n },\n getGrandTotal: function () {\n let costsOnly = this.get('scope') === PJQ.constants.changeRequests.scope.INTERNAL;\n return this.getSubTotal(null, costsOnly) + this.get('taxAmount');\n },\n canAttachLineItemCost: function (lineItem) {\n if (this.get('statusId') === PJQ.constants.changeRequests.changeRequestStatus.VOID\n || this.get('statusId') === PJQ.constants.changeRequests.changeRequestStatus.REJECTED) {\n return false;\n }\n\n return !(lineItem.get('costLineItemId') > 0);\n },\n canAttachLineItemRevenue: function (lineItem) {\n if (this.get('statusId') !== PJQ.constants.changeRequests.changeRequestStatus.APPROVED\n || this.get('scope') === PJQ.constants.changeRequests.scope.INTERNAL) {\n return false;\n }\n\n return !(lineItem.get('revenueLineItemId') > 0);\n },\n canSendRFQ: function () {\n return this.get('statusId') === PJQ.constants.changeRequests.changeRequestStatus.APPROVED\n || this.get('statusId') === PJQ.constants.changeRequests.changeRequestStatus.REJECTED\n || this.get('statusId') === PJQ.constants.changeRequests.changeRequestStatus.VOID;\n }\n});\n\nPJQ.models.changeRequests.ChangeRequestLineItem = PJQ.models.budget.BaseLineItem.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id'\n});\n\nPJQ.models.changeRequests.ChangeRequestAttachment = PJQ.models.files.File.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id'\n});\n\nPJQ.models.changeRequests.CustomField = PJQ.models.customFields.CustomField.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'changerequests'\n },\n {\n endpoint: 'customfields',\n value: this.get('id')\n }\n ]);\n }\n});\n\nPJQ.models.changeRequests.CustomFieldChoice = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'changerequests'\n },\n {\n endpoint: 'customfields',\n value: this.get('customFieldId')\n },\n {\n endpoint: 'choices',\n value: this.get('id')\n }\n ]);\n }\n});\n\nPJQ.models.changeRequests.Settings = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'settingId',\n endpoint: function () {\n if (this.options.projectId > 0) {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.projectId\n },\n {\n endpoint: 'changerequests'\n },\n {\n endpoint: 'settings'\n }\n ]);\n }\n\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'changerequests'\n },\n {\n endpoint: 'settings'\n }\n ]);\n },\n parseNumberFormat: function (numberFormat, project, additionalData) {\n let result = '';\n\n _.each(numberFormat, _.bind(function (token) {\n if (token.isText)\n result += token.label;\n else if (token.token === 'today')\n result += this.parseDateFormatToken(new Date(), token.dateFormatId);\n else if (token.token === 'project.projectId')\n result += project.get('projectId').toString();\n else if (token.token === 'project.startDate')\n result += this.parseDateFormatToken(PJQ.helpers.dateHelpers.parseDateString(project.get('startDate'), false), token.dateFormatId);\n else if (token.token === 'counter')\n result += additionalData.counter.toString().padStart(4, '0');\n else if (token.token.startsWith('fieldValue')) {\n let fieldNumber = parseInt(token.token.substr(10));\n _.each(PJQ.app.session.project.customFields.models, _.bind(function (customField) {\n if (customField.get('fieldNumber') === fieldNumber) {\n _.each(PJQ.app.session.project.get('customFields'), _.bind(function (fieldValue) {\n if (fieldValue.fieldNumber === fieldNumber) {\n switch (customField.get('fieldType')) {\n case PJQ.constants.customFields.fieldTypes.TEXT:\n case PJQ.constants.customFields.fieldTypes.INT:\n result += fieldValue.value.toString();\n break;\n case PJQ.constants.customFields.fieldTypes.CHOICE:\n _.each(customField.get('choices'), _.bind(function (choice) {\n if (choice.id === fieldValue.value)\n result += choice.choiceName;\n }, this));\n break;\n case PJQ.constants.customFields.fieldTypes.DATE:\n result += this.parseDateFormatToken(PJQ.helpers.dateHelpers.parseDateString(fieldValue.value, false), token.dateFormatId);\n break;\n case PJQ.constants.customFields.fieldTypes.DATETIME:\n result += this.parseDateFormatToken(PJQ.helpers.dateHelpers.parseDateString(fieldValue.value, true), token.dateFormatId);\n break;\n }\n }\n }, this));\n }\n }, this));\n }\n }, this));\n\n return result.replaceAll(' ', '');\n },\n parseDateFormatToken: function (input, dateFormatId) {\n let result = null;\n\n switch (dateFormatId) {\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.DD:\n result = input.getDate().toString().padStart(2, '0');\n break;\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.MM:\n result = (input.getMonth() + 1).toString().padStart(2, '0');\n break;\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.YY:\n result = input.getFullYear().toString().substr(2);\n break;\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.YYYY:\n result = input.getFullYear().toString();\n break;\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.MMDDYYYY:\n result = PJQ.helpers.dateHelpers.getDateString(input, PJQ.helpers.dateHelpers.dateFormats.URL_DATE, false).replaceAll('-', '');\n break;\n }\n\n return result;\n }\n});\n\nPJQ.models.changeRequests.ChangeRequestUserSettings = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'settingId',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'changerequests'\n },\n {\n endpoint: 'settings'\n },\n {\n endpoint: 'user'\n }\n ]);\n },\n getSettings: function (view) {\n return _.find(this.attributes.viewSettings, _.bind(function (setting) {\n return setting.view === view;\n }, this));\n }\n});\n\n//Collections\nPJQ.collections.changeRequests.ChangeRequests = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.changeRequests.ChangeRequest,\n endpoint: function () {\n let params = [];\n if (this.options.groupId && this.options.costTypeId) {\n params.push({\n parameter: 'groupId',\n value: this.options.groupId\n }, {\n parameter: 'costTypeId',\n value: this.options.costTypeId\n });\n }\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.projectId\n },\n {\n endpoint: 'changerequests'\n }\n ], params);\n },\n getTotalAmountsByStatus: function () {\n let result = {};\n _.each(PJQ.constants.changeRequests.changeRequestStatusBuckets, function (bucket) {\n let total = 0;\n _.each(this.models, function (changeRequest) {\n if (bucket.statuses.indexOf(changeRequest.get('statusId')) !== -1) {\n total += changeRequest.get('amount');\n }\n });\n result[bucket.name] = total;\n }, this);\n return result;\n }\n});\n\nPJQ.collections.changeRequests.ChangeRequestLineItems = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.changeRequests.ChangeRequestLineItem,\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'changerequests',\n value: this.options.changeRequestId\n },\n {\n endpoint: 'lineitems'\n }\n ], params);\n }\n});\n\nPJQ.collections.changeRequests.ChangeRequestAttachments = PJQ.collections.files.Files.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.changeRequests.ChangeRequestAttachment,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'changerequests',\n value: this.options.changeRequestId\n },\n {\n endpoint: 'attachments'\n }\n ]);\n }\n});\n\nPJQ.collections.changeRequests.CustomFields = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.changeRequests.CustomField,\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'changerequests'\n },\n {\n endpoint: 'customfields'\n }\n ], params);\n }\n});\n\nPJQ.collections.changeRequests.CustomFieldChoices = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.changeRequests.CustomFieldChoice\n});","PJQ.views.changeRequests.ChangeRequestSettingsModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-change-request-settings'),\n minWidth: '600px',\n },\n events: {\n 'change .select-column': 'columnSelected',\n 'click .btn-edit-company-default': 'editCompanySettings',\n 'click button.settings-save': 'onSave'\n },\n beforeModalCreated: function () {\n this.userSettings = this.options.changeRequestsView.userSettings;\n this.customFields = this.options.changeRequestsView.customFields;\n },\n beforeRender: async function () {\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n this.options.settings = this.options.settings ? this.options.settings : await this.options.project.fetchChangeRequestSettings();\n // copy userSettings for our UI; we only update global userSettings object on save.\n this.options.userSettings = [];\n\n this.options.defaultStatusFilter = this.userSettings.get('defaultStatusFilter');\n _.each(this.userSettings.attributes.viewSettings, _.bind(function (setting) {\n let columns = this.options.changeRequestsView.dataTable.getColumns(true),\n selectedColumns = (_.size(setting.columns) > 0) ? setting.columns : setting.columnsDefault;\n _.each(columns, _.bind(function (column) {\n column.visible = selectedColumns.indexOf(column.columnData) !== -1\n }, this));\n\n this.options.userSettings.push({\n view: setting.view,\n rowsPerPage: setting.rowsPerPage,\n columns: columns\n });\n }, this));\n },\n renderData: function () {\n return {\n userSettings: this.userSettings,\n settings: this.options.settings\n }\n },\n afterRender: function () {\n let defaultFilter = {};\n defaultFilter = this.userSettings.get('defaultStatusFilter');\n\n this.defaultFilterSelectPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-filter-default'),\n isIntChoices: true,\n isMultiple: true,\n isGrouped: false,\n defaultValue: defaultFilter,\n onHide: _.bind(function () {\n this.options.defaultStatusFilter = this.defaultFilterSelectPicker.getValue();\n }, this)\n });\n\n this.rowsPerPage = new PJQ.inputs.Selectpicker({\n el: this.$('select.rows-per-page'),\n isIntChoices: true,\n onChange: _.bind(function (value) {\n this.currentView.rowsPerPage = value;\n }, this)\n });\n\n this.selectView(PJQ.constants.changeRequests.view.CHANGE_REQUESTS);\n },\n editCompanySettings: function () {\n this.userSettings = new PJQ.models.changeRequests.ChangeRequestUserSettings(null, {\n forCompany: true\n });\n this.userSettings.fetch({\n success: _.bind(function () {\n this.render();\n }, this)\n });\n },\n selectView: function (view) {\n this.currentView = _.find(this.options.userSettings, _.bind(function (setting) {\n return setting.view === view;\n }, this));\n\n this.rowsPerPage.setValue(this.currentView.rowsPerPage);\n\n if (this.dataTable) {\n this.dataTable.undelegateEvents();\n $(this.dataTable.el).empty();\n }\n\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('div.select-columns-datatable'),\n data: this.currentView.columns,\n isHideSearch: true,\n pageLength: 6,\n order: [],\n columns: [\n {\"data\": \"title\", \"title\": \"Column\", \"orderable\": false},\n {\n \"data\": \"visible\",\n \"title\": \"Show\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": _.bind(function (data) {\n return ('
');\n }, this),\n \"width\": '10%'\n }\n ],\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n });\n\n },\n columnSelected: function (sender) {\n this.dataTable.dataTable.row($(sender.currentTarget).closest('tr')).data().visible = $(sender.currentTarget).prop('checked');\n },\n onSave: function () {\n let fnOnSave = _.bind(function () {\n if (typeof this.options.onSave === 'function')\n this.options.onSave();\n this.removeModal();\n }, this);\n\n this.userSettings.set('defaultStatusFilter', this.options.defaultStatusFilter);\n\n _.each(this.options.userSettings, _.bind(function (settingTemp) {\n _.each(this.userSettings.get('viewSettings'), _.bind(function (setting) {\n if (settingTemp.view === setting.view) {\n setting.rowsPerPage = settingTemp.rowsPerPage;\n\n let columns = _.size(setting.columns) > 0 ? setting.columns.slice() : setting.columnsDefault.slice();\n\n // update columns\n _.each(settingTemp.columns, _.bind(function (column) {\n if (column.visible) {\n if (columns.indexOf(column.columnData) === -1)\n columns.push(column.columnData);\n }\n else {\n if (columns.indexOf(column.columnData) !== -1)\n columns = _.filter(columns, _.bind(function (columnTemp) {\n return columnTemp != column.columnData;\n }, this));\n }\n }, this));\n\n setting.columns = columns;\n }\n }, this));\n }, this));\n\n this.userSettings.save(null, {\n success: _.bind(function () {\n fnOnSave();\n }, this)\n });\n },\n});","PJQ.views.budget.ProjectCostCodeSettings = PJQ.views.BaseView.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'project-cost-code-settings')\r\n },\r\n events: {},\r\n beforeFirstRender: async function () {\r\n this.isFetched = false;\r\n\r\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\r\n if (this.options.project != null) {\r\n this.budget = await this.options.project.fetchBudget();\r\n this.subJobs = await this.options.project.fetchSubJobs();\r\n this.costCodes = await this.options.project.fetchCostCodes();\r\n\r\n await this.options.project.fetchERPObject();\r\n } else {\r\n this.costCodes = await PJQ.app.session.fetchCostCodes();\r\n }\r\n\r\n this.isFetched = true;\r\n this.render();\r\n },\r\n renderData: function () {\r\n return {\r\n budget: this.budget,\r\n isFetched: this.isFetched,\r\n enableSubJobs: _.size(this.subJobs) > 0 || this.options.enableSubJobs\r\n };\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n new PJQ.views.budget.CostCodeSettings({\r\n el: this.$('.cost-codes-outer'),\r\n project: this.options.project,\r\n enableSubJobs: this.options.enableSubJobs,\r\n enableSubJobsChanged: (enableSubJobs) => {\r\n this.options.enableSubJobs = enableSubJobs;\r\n this.render();\r\n },\r\n onPullERP: () => {\r\n this.render();\r\n }\r\n });\r\n\r\n if (_.size(this.subJobs) > 0 || this.options.enableSubJobs) {\r\n new PJQ.views.budget.SubJobSettings({\r\n el: this.$('.sub-jobs-outer'),\r\n project: this.options.project\r\n });\r\n }\r\n }\r\n});\r\n\r\nPJQ.views.budget.CostCodeSettingsModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-cost-code-settings'),\r\n maxWidth: 800,\r\n pickerOptions: {},\r\n onPullERP: null\r\n },\r\n events: {\r\n 'click .btn-close': 'close'\r\n },\r\n renderData: function () {\r\n return {\r\n project: this.options.project,\r\n subJob: this.options.subJob\r\n };\r\n },\r\n afterRender: function () {\r\n new PJQ.views.budget.CostCodeSettings({\r\n el: this.$('.cost-code-settings'),\r\n project: this.options.project,\r\n subJob: this.options.subJob,\r\n onPullERP: this.options.onPullERP\r\n });\r\n },\r\n close: function () {\r\n this.removeModal();\r\n }\r\n});\r\n\r\nPJQ.views.budget.CostCodeSettings = PJQ.views.BaseView.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'cost-code-settings'),\r\n enableSubJobsChanged: null,\r\n onPullERP: null\r\n },\r\n events: {\r\n 'click .btn-import-cost-codes': 'importClicked',\r\n 'click .btn-add-cost-code': 'addClicked',\r\n 'click .btn-add-standard': 'addStandard',\r\n 'click .btn-edit-cost-code': 'editClicked',\r\n 'click .btn-delete-cost-code': 'deleteClicked',\r\n 'click .btn-delete-all': 'deleteAll',\r\n 'click .btn-push-erp': 'pushERP',\r\n 'click .btn-undo-push-erp': 'undoPushERP',\r\n 'click .btn-pull-erp': 'pullERP',\r\n 'change .cb-enable-sub-jobs': 'enableSubJobsChanged'\r\n },\r\n beforeFirstRender: async function () {\r\n this.isFetched = false;\r\n this.options.project = this.options.project != null ? this.options.project : PJQ.app.session.project;\r\n\r\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\r\n if (this.options.project != null) {\r\n this.budget = await this.options.project.fetchBudget();\r\n this.subJobs = await this.options.project.fetchSubJobs();\r\n this.allCostCodes = await this.options.project.fetchCostCodes();\r\n\r\n if (this.erpIntegration != null && this.erpIntegration.getSetting('syncProjects')) {\r\n await this.options.project.fetchERPObject();\r\n }\r\n } else {\r\n this.allCostCodes = await PJQ.app.session.fetchCostCodes();\r\n }\r\n\r\n this.isFetched = true;\r\n this.render();\r\n },\r\n beforeRender: function () {\r\n if (!this.isFetched) {\r\n return false;\r\n }\r\n\r\n if (this.costCodes == null) {\r\n let cc;\r\n if (this.options.subJob != null) {\r\n cc = this.allCostCodes.where({subJobId: this.options.subJob.id});\r\n } else {\r\n cc = this.allCostCodes.where({subJobId: null});\r\n }\r\n this.costCodes = new PJQ.collections.budget.CostCodes(cc, {\r\n projectId: this.options.project ? this.options.project.id : null,\r\n subJobId: this.options.subJob ? this.options.subJob.id : null\r\n });\r\n }\r\n },\r\n renderData: function () {\r\n return {\r\n project: this.options.project,\r\n subJobs: this.subJobs,\r\n subJob: this.options.subJob,\r\n costCodes: this.costCodes,\r\n isFetched: this.isFetched,\r\n erpIntegration: this.erpIntegration,\r\n enableSubJobs: this.options.enableSubJobs,\r\n budget: this.budget\r\n };\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n this.renderCostCodeTable();\r\n this.renderERP();\r\n },\r\n renderCostCodeTable: function () {\r\n let hasDivisions = this.costCodes.hasDivisions(),\r\n data;\r\n if (hasDivisions) {\r\n let divisionNames = this.costCodes.getDivisions().sort(PJQ.helpers.sortHelpers.sortAlphaNum);\r\n data = _.map(divisionNames, (division, i) => {\r\n return {\r\n cid: PJQ.helpers.guid(),\r\n division: _.size(division) > 0 ? division : 'No Division',\r\n isFetched: true,\r\n sortOrder: i\r\n };\r\n })\r\n } else {\r\n data = this.costCodes.models;\r\n }\r\n\r\n if (this.dataTable && this.dataTable.dataTable) {\r\n this.dataTable.dataTable.destroy();\r\n this.dataTable = null;\r\n }\r\n\r\n this.dataTable = this.getDataTable({\r\n el: this.$(\".cost-codes-table\"),\r\n data: data,\r\n afterDataTableRender: _.bind(function () {\r\n // if (hasDivisions && this.dataTable && this.dataTable.dataTable) {\r\n // let self = this;\r\n // this.dataTable.dataTable.row().$('.toggle-row').each(function () {\r\n // self.dataTable.childRowToggle({currentTarget: this});\r\n // });\r\n // }\r\n }, this),\r\n getRowChildTable: _.bind(function (childOpts) {\r\n if (!hasDivisions) {\r\n return null;\r\n }\r\n return this.getDataTable(childOpts)\r\n }, this),\r\n getRowChildData: _.bind(function (row) {\r\n if (!hasDivisions) {\r\n return null;\r\n }\r\n\r\n let costCode = row.data();\r\n return _.sortBy(this.costCodes.getForDivision(costCode.division), function (costCode) {\r\n return costCode.get('code');\r\n });\r\n }, this),\r\n language: {\r\n zeroRecords: 'Click \"Add Cost Code\" to create a new Cost Code'\r\n }\r\n });\r\n },\r\n getDataTable: function (dtOptions) {\r\n let columns,\r\n hasDivisions = this.costCodes.hasDivisions();\r\n if (dtOptions.parentData == null && hasDivisions) {\r\n dtOptions = _.defaults(dtOptions, {\r\n order: [1, 'asc'],\r\n });\r\n columns = [\r\n {\r\n \"width\": \"15px\",\r\n \"columnData\": \"division\",\r\n \"data\": null,\r\n \"title\": \"\",\r\n \"className\": \"dt-center\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"defaultContent\": '',\r\n \"render\": function (data, type, row) {\r\n return '';\r\n }\r\n },\r\n {\r\n \"title\": \"Division\",\r\n \"data\": \"division\",\r\n \"orderable\": true,\r\n \"render\": function (data, type, row) {\r\n if (type === 'sort' || type === 'type') {\r\n return row.sortOrder;\r\n }\r\n return data;\r\n }\r\n }\r\n ];\r\n } else {\r\n dtOptions = _.defaults(dtOptions, {\r\n order: [1, 'asc'],\r\n hideColumnHeaders: hasDivisions,\r\n onRowDoubleClick: _.bind(function (row) {\r\n this.editCostCode(row.data());\r\n }, this),\r\n contextMenuOptions: {\r\n actions: [\r\n {\r\n name: 'Edit',\r\n onClick: (row) => {\r\n this.editCostCode(row.data());\r\n }\r\n },\r\n {\r\n name: 'Delete',\r\n isDanger: true,\r\n isShown: (row) => {\r\n return null == this.budget.lineItems.findWhere({costCodeId: row.data().id});\r\n },\r\n onClick: (row) => {\r\n this.deleteCostCode(row.data());\r\n }\r\n }\r\n ]\r\n },\r\n });\r\n columns = [\r\n {\r\n \"width\": \"15px\",\r\n \"columnData\": \"division\",\r\n \"data\": null,\r\n \"title\": \"\",\r\n \"className\": \"dt-center\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"defaultContent\": '',\r\n \"render\": (data, type, row) => {\r\n if (row.isERPSynced()) {\r\n return '
' + PJQ.helpers.erp.getERPIcon(row.erpSyncStatus()) + '
';\r\n }\r\n return '';\r\n }\r\n },\r\n {\r\n \"title\": \"Code\",\r\n \"data\": \"attributes.code\",\r\n \"width\": \"100px\",\r\n \"render\": (data, type, model) => {\r\n if (type === 'sort' || type === 'type') {\r\n return PJQ.helpers.costCodes.getDivisionSortValue(data);\r\n }\r\n return '' + data + '';\r\n }\r\n },\r\n {\r\n \"title\": \"Name\",\r\n \"data\": \"attributes.name\"\r\n },\r\n {\r\n \"data\": \"\",\r\n \"title\": \"\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"p-2\",\r\n \"width\": \"80px\",\r\n \"render\": (data, type, model) => {\r\n let canDelete = null == this.budget || null == this.budget.lineItems.findWhere({costCodeId: model.id}),\r\n res = '
';\r\n if (canDelete) {\r\n res += '';\r\n } else {\r\n res += '';\r\n }\r\n return res + '
';\r\n }\r\n }\r\n ];\r\n }\r\n\r\n dtOptions.rowId = \"cid\";\r\n dtOptions.paging = false;\r\n dtOptions.columns = columns;\r\n return new PJQ.views.dataTables.DataTable(dtOptions);\r\n },\r\n importClicked: function () {\r\n new PJQ.views.budget.UploadCostCodesModal({\r\n costCodes: this.costCodes,\r\n project: this.options.project,\r\n subJob: this.options.subJob,\r\n onSave: _.bind(function (costCodes) {\r\n this.costCodes.add(costCodes);\r\n this.render();\r\n }, this)\r\n });\r\n },\r\n enableSubJobsChanged: function (e) {\r\n this.options.enableSubJobs = $(e.currentTarget).prop('checked');\r\n if (typeof this.options.enableSubJobsChanged === 'function') {\r\n this.options.enableSubJobsChanged(this.options.enableSubJobs);\r\n }\r\n },\r\n renderERP: function () {\r\n if (this.erpIntegration == null || (this.options.project != null && !this.options.project.isERPSynced())) {\r\n return;\r\n }\r\n\r\n let hasStaleCostCodes = null != _.find(this.costCodes.models, function (costCode) {\r\n return costCode.erpSyncStatus() === PJQ.constants.integrations.erp.syncStatuses.PENDING\r\n || costCode.erpSyncStatus() === PJQ.constants.integrations.erp.syncStatuses.STALE;\r\n }),\r\n pushSupported,\r\n pullSupported,\r\n status;\r\n if (this.options.project) {\r\n let projectSyncStatus = this.options.project.erpSyncStatus(),\r\n isProjectReviewing = projectSyncStatus === PJQ.constants.integrations.erp.syncStatuses.REVIEWING;\r\n status = hasStaleCostCodes && !isProjectReviewing ? PJQ.constants.integrations.erp.syncStatuses.STALE : projectSyncStatus;\r\n pushSupported = this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_PROJECT_COST_CODES);\r\n pullSupported = this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_PROJECT_COST_CODES);\r\n } else {\r\n pushSupported = this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_COMPANY_COST_CODES);\r\n status = pushSupported && hasStaleCostCodes ? PJQ.constants.integrations.erp.syncStatuses.STALE : PJQ.constants.integrations.erp.syncStatuses.SYNCED;\r\n // We've changed how cost codes are handled. You now pull cost codes from ERP Admin.\r\n pullSupported = false;\r\n }\r\n this.erpButtons = PJQ.helpers.erp.renderERPButtons(this.$('.erp-sync'), {\r\n pushSupported: pushSupported,\r\n canPush: hasStaleCostCodes,\r\n disablePushReason: !hasStaleCostCodes ? 'All cost code changes have been pushed to ERP' : '',\r\n pullSupported: pullSupported,\r\n status: status\r\n });\r\n\r\n let badge = PJQ.helpers.erp.getERPBadge(status);\r\n this.$('.erp-badge').html('' + badge + '');\r\n },\r\n pushERP: function () {\r\n if ((this.options.project != null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_PROJECT_COST_CODES))\r\n || (this.options.project == null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_COMPANY_COST_CODES))) {\r\n this.erpButtons?.pushing(true);\r\n this.erpIntegration.pushCostCodes({\r\n project: this.options.project\r\n }, (res, err) => {\r\n this.erpButtons?.pushing(false);\r\n if (res == null) {\r\n return;\r\n }\r\n this.allCostCodes.reset(res);\r\n this.costCodes = null;\r\n PJQ.notifications.notify.successNotify({\r\n message: this.options.project ? 'Project Cost Codes pushed for ERP approval' : 'Cost Codes successfully pushed to ERP'\r\n });\r\n this.render();\r\n });\r\n }\r\n },\r\n undoPushERP: function () {\r\n if (this.options.project.erpSyncStatus() === PJQ.constants.integrations.erp.syncStatuses.REVIEWING) {\r\n this.erpIntegration.undoPush(this.options.project, _.bind(function () {\r\n PJQ.notifications.notify.successNotify({\r\n message: 'Project Cost Codes successfully removed from ERP approval'\r\n });\r\n this.render();\r\n }, this));\r\n }\r\n },\r\n pullERP: function () {\r\n if ((this.options.project != null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_PROJECT_COST_CODES))\r\n || (this.options.project == null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_COMPANY_COST_CODES))) {\r\n this.erpButtons?.pulling(true);\r\n this.erpIntegration.pullCostCodes(this.options.project, (newCostCodes, err) => {\r\n this.erpButtons?.pulling(false);\r\n if (newCostCodes == null) {\r\n return;\r\n }\r\n\r\n this.allCostCodes.reset(newCostCodes);\r\n this.costCodes = null;\r\n PJQ.notifications.notify.successNotify({\r\n message: _.size(newCostCodes).toString() + ' Cost Codes pulled from ERP'\r\n });\r\n if (typeof this.options.onPullERP === 'function') {\r\n this.options.onPullERP();\r\n } else {\r\n this.render();\r\n }\r\n });\r\n }\r\n },\r\n addStandard: function () {\r\n new PJQ.views.budget.CostCodePickerModal({\r\n title: 'Add Cost Codes To Project',\r\n pickerOptions: {\r\n showDisabledAsSelected: true,\r\n isCostCodeDisabled: _.bind(function (costCode) {\r\n return null != _.find(this.costCodes.models, function (pCostCode) {\r\n return pCostCode.get('code').toLowerCase() === costCode.get('code').toLowerCase();\r\n })\r\n }, this)\r\n },\r\n onSave: _.bind(function (newCostCodes) {\r\n if (_.size(newCostCodes) > 0) {\r\n this.costCodes.saveBulk(newCostCodes, this.options.subJob ? this.options.subJob.id : null, _.bind(function (savedCostCodes) {\r\n if (savedCostCodes) {\r\n if (this.options.project) {\r\n this.options.project.costCodes.add(savedCostCodes);\r\n }\r\n this.render();\r\n PJQ.notifications.notify.successNotify({\r\n message: _.size(savedCostCodes).toString() + ' Company Cost Codes added to project'\r\n });\r\n } else {\r\n // todo: error\r\n }\r\n }, this));\r\n }\r\n }, this)\r\n });\r\n },\r\n addClicked: function () {\r\n this.editCostCode(null);\r\n },\r\n editClicked: function (e) {\r\n let id = $(e.currentTarget).closest('tr').attr('id');\r\n if (_.size(id) > 0) {\r\n let costCode = this.costCodes.get(id);\r\n if (costCode != null) {\r\n this.editCostCode(costCode);\r\n }\r\n }\r\n },\r\n editCostCode: function (costCode) {\r\n new PJQ.views.budget.EditCostCodeModal({\r\n model: costCode,\r\n project: this.options.project,\r\n subJob: this.options.subJob,\r\n onSave: _.bind(function (costCode) {\r\n this.costCodes.add(costCode);\r\n if (this.options.project) {\r\n this.options.project.costCodes.add(costCode);\r\n }\r\n this.render();\r\n }, this),\r\n // onClose: _.bind(function (costCode) {\r\n // this.dataTable.refresh();\r\n // }, this),\r\n onDelete: _.bind(function (costCode) {\r\n if (costCode.id > 0) {\r\n this.deleteCostCode(costCode);\r\n }\r\n }, this)\r\n });\r\n },\r\n deleteClicked: function (e) {\r\n let target = $(e.currentTarget),\r\n cid = target.closest('tr').attr('id'),\r\n costCode = this.costCodes.get(cid);\r\n this.deleteCostCode(costCode);\r\n },\r\n deleteAll: function () {\r\n let msg,\r\n ct = _.size(this.costCodes.models);\r\n if (ct === 0) {\r\n return;\r\n }\r\n\r\n if (this.options.project != null) {\r\n msg = 'Are you sure you want to delete all Cost Codes from this project? This will only delete cost codes which are not on the budget.';\r\n } else {\r\n msg = 'Are you sure you want to delete all ' + ct + ' Company Cost Codes?';\r\n }\r\n new PJQ.views.modals.DeleteCancel({\r\n header: \"Confirm Deletion\",\r\n body: msg,\r\n onDelete: _.bind(function () {\r\n this.costCodes.deleteAll(_.bind(function (result) {\r\n if (this.options.project != null) {\r\n this.options.project.costCodes.reset(result);\r\n this.costCodes.reset(result);\r\n } else {\r\n this.costCodes.reset([]);\r\n }\r\n PJQ.notifications.notify.successNotify({\r\n message: (ct - _.size(this.costCodes.models)).toString() + ' Cost Codes deleted'\r\n });\r\n this.render();\r\n }, this));\r\n }, this)\r\n });\r\n },\r\n deleteCostCode: function (costCode) {\r\n new PJQ.views.modals.DeleteCancel({\r\n header: \"Confirm Deletion\",\r\n body: \"Are you sure you want to delete this Cost Code?\",\r\n onDelete: _.bind(function () {\r\n costCode.destroy({\r\n notify: false,\r\n success: _.bind(function () {\r\n if (this.options.project) {\r\n this.options.project.costCodes.remove(costCode);\r\n }\r\n this.costCodes.remove(costCode);\r\n this.render();\r\n }, this),\r\n error: function (model, xhr) {\r\n if (xhr.responseJSON != null && xhr.responseJSON.type === 'delete_code_with_line_item') {\r\n PJQ.notifications.notify.warningNotify({\r\n message: 'This cost code cannot be deleted because it is being used on budget line items.'\r\n });\r\n }\r\n }\r\n });\r\n }, this)\r\n });\r\n }\r\n});\r\n\r\nPJQ.views.budget.EditCostCodeModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-edit-cost-code'),\r\n maxWidth: 600\r\n },\r\n events: {\r\n 'click .btn-save': 'save',\r\n 'click .btn-close': 'close',\r\n 'click .btn-delete': 'delete',\r\n 'keydown .input-percent': 'numbersOnly',\r\n 'change .input-percent': 'formatPercent'\r\n },\r\n beforeModalCreated: async function () {\r\n if (this.model == null) {\r\n this.model = new PJQ.models.budget.CostCode({\r\n projectId: this.options.project ? this.options.project.id : null,\r\n subJobId: this.options.subJob ? this.options.subJob.id : null\r\n });\r\n }\r\n\r\n let fnRender = _.bind(function () {\r\n PJQ.app.session.fetchCostTypes(_.bind(function (costTypes) {\r\n this.costTypes = costTypes;\r\n this.isFetched = true;\r\n this.render();\r\n }, this));\r\n }, this);\r\n\r\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\r\n\r\n if(this.erpIntegration != null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.DISABLE_EDIT_COST_CODE_TYPE_FILTER)) {\r\n this.options.disableEditingCostTypeFilter = true;\r\n }\r\n\r\n if (this.options.project != null) {\r\n if(this.erpIntegration != null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_PROJECT_COST_CODES) && !this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_PROJECT_COST_CODES)) {\r\n this.options.disableEditingCostCodeName = true;\r\n }\r\n\r\n this.options.project.fetchCostCodes(_.bind(function (costCodes) {\r\n this.costCodes = costCodes;\r\n fnRender();\r\n }, this));\r\n } else {\r\n if(this.erpIntegration != null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_COMPANY_COST_CODES) && !this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_COMPANY_COST_CODES)) {\r\n this.options.disableEditingCostCodeName = true;\r\n }\r\n\r\n PJQ.app.session.fetchCostCodes(_.bind(function (costCodes) {\r\n this.costCodes = costCodes;\r\n fnRender();\r\n }, this));\r\n }\r\n },\r\n renderData: function () {\r\n return {\r\n model: this.model,\r\n costTypes: this.costTypes,\r\n isFetched: this.isFetched,\r\n disableEditingCostCodeName: this.options.disableEditingCostCodeName\r\n };\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n new PJQ.Binder(this.$el, this.model, {\r\n setDefaultValues: true,\r\n useDecimalPercentFields: true,\r\n watchElements: [\r\n 'input',\r\n 'select'\r\n ]\r\n });\r\n\r\n let divisions = this.costCodes.getDivisions();\r\n new PJQ.inputs.AutocompleteInput({\r\n el: this.$('.input-division'),\r\n source: divisions\r\n });\r\n\r\n new PJQ.inputs.Selectpicker({\r\n el: this.$('.select-cost-types'),\r\n isIntChoices: true,\r\n isMultiple: true,\r\n noneSelectedText: 'All Cost Types',\r\n isDisabled: this.options.disableEditingCostTypeFilter,\r\n defaultValue: this.model.get('costTypeIds')\r\n });\r\n },\r\n formatPercent: function (e) {\r\n let val = $(e.currentTarget).val();\r\n if (val !== \"\") {\r\n $(e.currentTarget).val(PJQ.helpers.formatHelpers.formatPercent(val));\r\n }\r\n },\r\n numbersOnly: function (e) {\r\n return PJQ.helpers.inputHelpers.numbersOnly(e, true, true);\r\n },\r\n close: function () {\r\n if (this.model.hasChanged()) {\r\n new PJQ.views.modals.SaveDontSave({\r\n header: \"Unsaved Changes\",\r\n body: \"Do you want to save changes?\",\r\n onSave: _.bind(function () {\r\n this.save();\r\n }, this),\r\n onDontSave: _.bind(function () {\r\n if (this.options.onClose) {\r\n this.options.onClose(this.model);\r\n }\r\n this.removeModal();\r\n }, this)\r\n });\r\n } else if (this.options.onClose) {\r\n this.options.onClose(this.model);\r\n this.removeModal();\r\n }\r\n },\r\n validate: function () {\r\n let $code = this.$('.input-code'),\r\n code = $code.val(),\r\n subJobId = this.model.get('subJobId'),\r\n isCodeValid = true,\r\n errorText = '';\r\n if (_.size(code) === 0) {\r\n isCodeValid = false;\r\n } else if (null != _.find(this.costCodes.models, _.bind(function (cc) {\r\n return cc.id !== this.model.id && (subJobId == null || subJobId === cc.get('subJobId')) && cc.get('code').toLowerCase() === code.toLowerCase();\r\n }, this))) {\r\n isCodeValid = false;\r\n errorText = 'This code already exists'\r\n }\r\n PJQ.helpers.inputHelpers.setInputError($code, isCodeValid, {\r\n errorText: errorText\r\n });\r\n return isCodeValid;\r\n },\r\n save: function () {\r\n if (this.validate()) {\r\n this.model.save(null, {\r\n success: _.bind(function () {\r\n if (typeof this.options.onSave === 'function') {\r\n this.options.onSave(this.model);\r\n }\r\n this.costCodes.add(this.model);\r\n this.removeModal();\r\n PJQ.notifications.notify.successNotify({\r\n message: 'Cost Code saved'\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n delete: function () {\r\n new PJQ.views.modals.DeleteCancel({\r\n header: \"Confirm Deletion\",\r\n body: \"Are you sure you want to delete this Cost Code?\",\r\n onDelete: _.bind(function () {\r\n if (typeof this.options.onDelete === 'function') {\r\n this.options.onDelete(this.model);\r\n }\r\n this.removeModal();\r\n }, this)\r\n });\r\n }\r\n});\r\n\r\nPJQ.views.budget.UploadCostCodesModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-upload-cost-codes'),\r\n maxWidth: 500,\r\n onSave: null\r\n },\r\n events: {\r\n 'click .btn-save-new': 'saveNew',\r\n 'click .btn-save-all': 'saveAll'\r\n },\r\n renderData: function () {\r\n return {\r\n data: this.data,\r\n isSaving: this.isSaving\r\n };\r\n },\r\n saveNew: function () {\r\n this.save(_.filter(this.data, function (dt) {\r\n return !(dt.id > 0);\r\n }))\r\n },\r\n saveAll: function () {\r\n this.save(this.data);\r\n },\r\n save: function (costCodes) {\r\n this.isSaving = true;\r\n this.render();\r\n this.$('.import-loading').removeClass('hidden');\r\n this.options.costCodes.saveBulk(costCodes, this.options.subJob ? this.options.subJob.id : null, (savedCostCodes) => {\r\n this.isSaving = false;\r\n if (savedCostCodes) {\r\n if (typeof this.options.onSave === 'function') {\r\n this.options.onSave(savedCostCodes);\r\n }\r\n this.removeModal();\r\n PJQ.notifications.notify.successNotify({\r\n message: _.size(savedCostCodes).toString() + ' Cost Codes imported'\r\n });\r\n } else {\r\n // todo: error\r\n }\r\n });\r\n },\r\n afterRender: function () {\r\n if (this.data == null) {\r\n let $uploader = this.$('.template-uploader');\r\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\r\n el: $uploader,\r\n useApiV2: true,\r\n allowedExtensions: ['xls', 'xlsx', 'csv'],\r\n uploadTemplateCallback: () => {\r\n PJQ.files.downloadFile(PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'costcodes'\r\n },\r\n {\r\n endpoint: 'import'\r\n },\r\n {\r\n endpoint: 'template'\r\n }\r\n ]), {isAPIv2: true});\r\n },\r\n maxFiles: 1,\r\n style: 'grid',\r\n onDrop: _.bind(function () {\r\n this.$('.import-processing').removeClass('hidden');\r\n this.$('.btn-close').prop('disabled', true);\r\n }, this),\r\n onSuccess: _.bind(function (file) {\r\n let loader = new PJQ.Loader($uploader);\r\n if (this.options.costCodes != null && _.size(file.uploadId) > 0) {\r\n this.options.costCodes.processImport(file.uploadId, this.options.project ? this.options.project.id : null, (data) => {\r\n this.fileUploader.remove();\r\n loader.remove();\r\n this.fileUploader = null;\r\n this.data = data;\r\n this.render();\r\n });\r\n }\r\n }, this)\r\n });\r\n }\r\n }\r\n});\r\n\r\nPJQ.views.budget.CostCodePickerModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-cost-code-picker'),\r\n maxWidth: 600,\r\n pickerOptions: {}\r\n },\r\n events: {\r\n 'click .btn-save': 'save',\r\n 'click .btn-close': 'close'\r\n },\r\n renderData: function () {\r\n return {\r\n options: this.options\r\n };\r\n },\r\n beforeModalCreated: function () {\r\n this.selectedCostCodes = [];\r\n },\r\n afterRender: function () {\r\n new PJQ.views.budget.CostCodePicker(_.defaults(this.options.pickerOptions, {\r\n el: this.$('.cc-picker'),\r\n costCodes: this.options.costCodes,\r\n onSelectionChanged: _.bind(function (costCodes) {\r\n this.selectedCostCodes = costCodes;\r\n }, this)\r\n }));\r\n },\r\n close: function () {\r\n if (typeof this.options.onClose === 'function') {\r\n this.options.onClose();\r\n }\r\n this.removeModal();\r\n },\r\n save: function () {\r\n if (typeof this.options.onSave === 'function') {\r\n this.options.onSave(this.selectedCostCodes);\r\n }\r\n this.removeModal();\r\n }\r\n});\r\n\r\nPJQ.views.budget.CostCodePicker = PJQ.views.BaseView.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'cost-code-picker-container'),\r\n subTemplates: {\r\n picker: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'cost-code-picker')\r\n },\r\n costCodes: null,\r\n selectedCostCodeIds: null,\r\n selectecCostCodeCodes: null,\r\n disabledCostCodeIds: null,\r\n onSelectionChanged: null,\r\n isCostCodeDisabled: null,\r\n showDisabledAsSelected: false\r\n },\r\n events: {\r\n \"keyup .input-search\": \"renderCostCodes\",\r\n \"click .btn-clear-filters\": \"clearFilters\",\r\n \"click .cost-codes-all-select\": \"selectAll\",\r\n \"click .division-select\": \"selectDivision\",\r\n \"click .cost-code-select\": \"selectionChanged\",\r\n \"click .division-expand\": \"expandDivisionClicked\"\r\n },\r\n beforeFirstRender: function () {\r\n this.selectedCostCodeIds = [];\r\n if (_.size(this.options.selectedCostCodeIds) > 0) {\r\n this.selectedCostCodeIds = this.options.selectedCostCodeIds;\r\n }\r\n\r\n this.isFetched = false;\r\n if (this.options.costCodes == null) {\r\n PJQ.app.session.fetchCostCodes(_.bind(function (costCodes) {\r\n this.costCodes = costCodes;\r\n this.isFetched = true;\r\n this.render();\r\n }, this));\r\n } else {\r\n this.costCodes = this.options.costCodes;\r\n this.isFetched = true;\r\n }\r\n },\r\n renderData: function () {\r\n return {\r\n costCodes: this.costCodes,\r\n isFetched: this.isFetched\r\n };\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n this.renderCostCodes();\r\n },\r\n renderCostCodes: function () {\r\n let searchFilter = this.$('.input-search').val().toLowerCase(),\r\n costCodes = [],\r\n $clearFilters = this.$('.btn-clear-filters');\r\n if (_.size(searchFilter) > 0) {\r\n $clearFilters.prop('disabled', false);\r\n _.each(this.costCodes.models, _.bind(function (costCode) {\r\n if (costCode.getDisplayName().toLowerCase().indexOf(searchFilter) > -1) {\r\n costCodes.push(costCode);\r\n }\r\n }, this));\r\n } else {\r\n $clearFilters.prop('disabled', true);\r\n costCodes = this.costCodes.models;\r\n }\r\n\r\n let divisions = null;\r\n if (this.costCodes.hasDivisions()) {\r\n divisions = {};\r\n _.each(costCodes, function (costCode) {\r\n let division = _.size(costCode.get('division')) > 0 ? costCode.get('division') : 'No Division';\r\n if (divisions[division] != null) {\r\n divisions[division].costCodes.push(costCode);\r\n } else {\r\n divisions[division] = {\r\n name: division,\r\n costCodes: [costCode]\r\n }\r\n }\r\n });\r\n }\r\n this.renderSubTemplate(false, this.options.subTemplates.picker, this.$('.cost-codes-container'), {\r\n isCostCodeDisabled: this.isCostCodeDisabled,\r\n isCostCodeSelected: this.isCostCodeSelected,\r\n costCodes: costCodes,\r\n divisions: divisions,\r\n selectedCostCodeIds: this.selectedCostCodeIds,\r\n isFetched: this.isFetched,\r\n options: this.options\r\n }, _.bind(function () {\r\n this.setDisabledDivisions();\r\n this.setSelectedDivisions();\r\n this.isRendered = true;\r\n }, this));\r\n },\r\n setSelectedDivisions: function () {\r\n let self = this;\r\n this.$('.division-select').each(function () {\r\n $(this).prop('checked', _.size(self.getDivisionCostCodesContainer($(this)).find('.cost-code-select').not(':checked')) === 0);\r\n });\r\n this.$('.cost-codes-all-select').prop('checked', !(this.$('.cost-code-select:not(:checked)').length > 0));\r\n },\r\n setDisabledDivisions: function () {\r\n let self = this;\r\n this.$('.division-select').each(function () {\r\n $(this).prop('disabled', _.size(self.getDivisionCostCodesContainer($(this)).find('.cost-code-select').not(':disabled')) === 0);\r\n });\r\n this.$('.cost-codes-all-select').prop('disabled', !(this.$('.cost-code-select:not(:disabled)').length > 0));\r\n },\r\n clearFilters: function () {\r\n this.$('.input-search').val('');\r\n this.renderCostCodes();\r\n },\r\n selectAll: function (override) {\r\n if (typeof override === 'boolean')\r\n this.$('.cost-codes-all-select').prop('checked', override);\r\n\r\n let checkboxes = this.$('.cost-code-select:not(:disabled)');\r\n if (this.$('.cost-codes-all-select').prop('checked')) {\r\n checkboxes.prop('checked', true);\r\n } else {\r\n checkboxes.prop('checked', false);\r\n }\r\n this.selectionChanged();\r\n },\r\n getDivisionCostCodesContainer: function ($element) {\r\n return $element.closest('.division-outer').find('.division-cost-codes');\r\n },\r\n selectDivision: function (e) {\r\n let $costCodes = this.getDivisionCostCodesContainer($(e.currentTarget)),\r\n isChecked = $(e.currentTarget).is(':checked');\r\n $costCodes.find('.cost-code-select,.division-select').not(':disabled').prop('checked', isChecked);\r\n this.selectionChanged();\r\n },\r\n selectionChanged: function () {\r\n let checkboxes = this.$('.cost-code-select:checked').not(':disabled');\r\n this.selectedCostCodeIds = _.map(checkboxes, function (cb) {\r\n return $(cb).data('id');\r\n });\r\n\r\n this.setSelectedDivisions();\r\n if (typeof this.options.onSelectionChanged === 'function') {\r\n this.options.onSelectionChanged(this.costCodes.get(this.selectedCostCodeIds));\r\n }\r\n },\r\n expandDivisionClicked: function (e) {\r\n this.expandDivision(this.getDivisionCostCodesContainer($(e.currentTarget)));\r\n },\r\n expandDivision: function (container) {\r\n let icon = container.siblings('i.division-expand');\r\n if (container.hasClass('hidden')) {\r\n container.removeClass('hidden');\r\n icon.removeClass('fa-chevron-right text-primary').addClass('fa-chevron-down text-muted');\r\n } else {\r\n container.addClass('hidden');\r\n icon.removeClass('fa-chevron-down text-muted').addClass('fa-chevron-right text-primary');\r\n }\r\n },\r\n isCostCodeSelected: function (costCode) {\r\n return this.selectedCostCodeIds.indexOf(costCode.id) !== -1;\r\n },\r\n isCostCodeDisabled: function (costCode) {\r\n if (typeof this.options.isCostCodeDisabled === 'function') {\r\n return this.options.isCostCodeDisabled(costCode);\r\n }\r\n return false;\r\n },\r\n showError: function (errorText) {\r\n this.hideError();\r\n this.errorAlert = new PJQ.Alert(this.$el, {\r\n type: 'danger',\r\n extraClasses: ['mt-1, mb-1'],\r\n text: errorText,\r\n isPrepend: true\r\n });\r\n },\r\n hideError: function () {\r\n if (this.errorAlert) {\r\n this.errorAlert.destroy();\r\n }\r\n }\r\n});","PJQ.views.budget.CostTypeSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'cost-type-settings')\n },\n events: {\n 'click .btn-add-cost-type': 'addClicked',\n 'click .btn-edit-cost-type': 'editClicked',\n 'click .btn-delete-cost-type': 'deleteClicked',\n 'click .btn-delete-all': 'deleteAll',\n 'click .btn-push-erp': 'pushERP',\n 'click .btn-pull-erp': 'pullERP',\n },\n beforeFirstRender: async function () {\n this.isFetched = false;\n\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n if (this.options.project != null) {\n this.budget = await this.options.project.fetchBudget();\n this.costTypes = await this.options.project.fetchCostTypes();\n\n if (this.erpIntegration != null && this.erpIntegration.getSetting('syncProjects')) {\n await this.options.project.fetchERPObject();\n }\n } else {\n this.costTypes = await PJQ.app.session.fetchCostTypes();\n }\n\n this.isFetched = true;\n this.render();\n },\n renderData: function () {\n return {\n project: this.options.project,\n costTypes: this.costTypes,\n isFetched: this.isFetched,\n erpIntegration: this.erpIntegration,\n budget: this.budget\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.stopListening(this.costTypes);\n this.listenTo(this.costTypes, 'update', () => {\n this.renderERP();\n });\n this.renderERP();\n\n this.renderCostTypeTable();\n },\n renderCostTypeTable: function () {\n if (this.dataTable && this.dataTable.dataTable) {\n this.dataTable.dataTable.destroy();\n this.dataTable = null;\n }\n\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".cost-types-table\"),\n data: this.costTypes.models,\n order: [1, 'asc'],\n onRowDoubleClick: _.bind(function (row) {\n this.editCostType(row.data());\n }, this),\n rowId: 'cid',\n paging: false,\n contextMenuOptions: {\n actions: [\n {\n name: 'Edit',\n onClick: (row) => {\n this.editCostType(row.data());\n }\n },\n {\n name: 'Delete',\n isDanger: true,\n isShown: (row) => {\n if (this.budget) {\n return null == this.budget.lineItems.findWhere({costTypeId: row.data().id});\n } else {\n return true;\n }\n },\n onClick: (row) => {\n this.deleteCostType(row.data());\n }\n }\n ]\n },\n columns: [\n {\n \"title\": \"\",\n \"data\": \"attributes.externalObject\",\n \"width\": \"5%\",\n \"orderable\": false,\n \"searchable\": false,\n \"defaultContent\": '',\n \"render\": (data, type, row) => {\n if (data) {\n return '';\n }\n return '';\n }\n },\n {\n \"data\": \"attributes.code\",\n \"title\": \"Code\",\n \"width\": \"15%\"\n },\n {\n \"data\": \"attributes.name\",\n \"title\": \"Name\"\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"p-2\",\n \"width\": \"80px\",\n \"render\": (data, type, model) => {\n let canDelete = null == this.budget || null == this.budget.lineItems.findWhere({costTypeId: model.id}),\n res = '
';\n if (canDelete) {\n res += '';\n } else {\n res += '';\n }\n return res + '
';\n }\n }\n ],\n language: {\n zeroRecords: 'Click \"Add Cost Type\" to create a new Cost Type'\n }\n });\n },\n renderERP: function () {\n if (this.erpIntegration == null) {\n return;\n }\n\n let hasStaleCostTypes = null != _.find(this.costTypes.models, function (costType) {\n return costType.erpSyncStatus() === PJQ.constants.integrations.erp.syncStatuses.PENDING\n || costType.erpSyncStatus() === PJQ.constants.integrations.erp.syncStatuses.STALE;\n }),\n pushSupported = this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_COST_TYPES),\n status = pushSupported && hasStaleCostTypes ? PJQ.constants.integrations.erp.syncStatuses.STALE : PJQ.constants.integrations.erp.syncStatuses.SYNCED,\n pullSupported = this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_COST_TYPES);\n this.erpButtons = PJQ.helpers.erp.renderERPButtons(this.$('.erp-sync'), {\n pushSupported: pushSupported,\n canPush: hasStaleCostTypes,\n disablePushReason: !hasStaleCostTypes ? 'All cost type changes have been pushed to ERP' : '',\n pullSupported: pullSupported,\n status: status\n });\n\n let badge = PJQ.helpers.erp.getERPBadge(status);\n this.$('.erp-badge').html('' + badge + '');\n },\n pushERP: function () {\n if (this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_COST_TYPES)) {\n this.erpButtons?.pushing(true);\n this.erpIntegration.pushCostTypes((res, err) => {\n this.erpButtons?.pushing(false);\n if (res == null) {\n return;\n }\n\n this.costTypes.reset(res);\n PJQ.notifications.notify.successNotify({\n message: 'Cost Types successfully pushed to ERP'\n });\n this.render();\n });\n }\n },\n pullERP: function () {\n if (this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_COST_TYPES)) {\n this.erpButtons?.pulling(true);\n this.erpIntegration.pullCostTypes((res, err) => {\n this.erpButtons?.pulling(false);\n if (res == null) {\n return;\n }\n\n this.costTypes.reset(res);\n PJQ.notifications.notify.successNotify({\n message: _.size(res).toString() + ' Cost Types pulled from ERP'\n });\n if (typeof this.options.onPullERP === 'function') {\n this.options.onPullERP();\n } else {\n this.render();\n }\n });\n }\n },\n addClicked: function () {\n this.editCostType(null);\n },\n editClicked: function (e) {\n let id = $(e.currentTarget).closest('tr').attr('id');\n if (_.size(id) > 0) {\n let costType = this.costTypes.get(id);\n if (costType != null) {\n this.editCostType(costType);\n }\n }\n },\n editCostType: function (costType) {\n new PJQ.views.budget.EditCostTypeModal({\n model: costType,\n project: this.options.project,\n onSave: _.bind(function (costType) {\n this.costTypes.add(costType);\n if (this.options.project) {\n this.options.project.costTypes.add(costType);\n }\n this.render();\n }, this),\n onDelete: _.bind(function (costType) {\n if (costType.id > 0) {\n this.deleteCostType(costType, false);\n }\n }, this)\n });\n },\n deleteClicked: function (e) {\n let target = $(e.currentTarget),\n cid = target.closest('tr').attr('id'),\n costCode = this.costTypes.get(cid);\n this.deleteCostType(costCode);\n },\n deleteAll: function () {\n let ct = _.size(this.costTypes.models);\n if (ct === 0) {\n return;\n }\n\n let msg = 'Are you sure you want to delete all ' + ct + ' Company Cost Types?';\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: msg,\n onDelete: _.bind(function () {\n\n }, this)\n });\n },\n deleteCostType: function (costType, showDialogue = true) {\n if (showDialogue) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this Cost Type?\",\n onDelete: _.bind(function () {\n costType.destroy({\n notify: false,\n success: _.bind(function () {\n this.costTypes.remove(costType);\n this.render();\n }, this),\n error: function (model, xhr) {\n if (xhr.responseJSON != null && xhr.responseJSON.type === 'delete_type_with_line_item') {\n PJQ.notifications.notify.warningNotify({\n message: 'This cost type cannot be deleted because it is being used on budget line items.'\n });\n }\n }\n });\n }, this)\n });\n } else {\n costType.destroy({\n notify: false,\n success: _.bind(function () {\n this.costTypes.remove(costType);\n this.render();\n }, this)\n });\n }\n }\n});\n\nPJQ.views.budget.EditCostTypeModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-edit-cost-type'),\n maxWidth: 600\n },\n events: {\n 'click .btn-save': 'save',\n 'click .btn-close': 'close',\n 'click .btn-delete': 'delete'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n\n if (this.model == null) {\n this.model = new PJQ.models.budget.CostType();\n }\n\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n\n this.costTypes = await PJQ.app.session.fetchCostTypes();\n\n this.isFetched = true;\n this.render();\n },\n renderData: function () {\n return {\n model: this.model,\n costTypes: this.costTypes,\n erpIntegration: this.erpIntegration,\n externalObject: this.model.get('externalObject'),\n isFetched: this.isFetched\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n new PJQ.Binder(this.$el, this.model, {\n setDefaultValues: true,\n watchElements: [\n 'input',\n 'select'\n ]\n });\n\n this.$(\".input-name\").inputmask({\n \"mask\": \"a\".repeat(50),\n placeholder: \"\",\n definitions: {\n 'a': {\n validator: \".\",\n cardinality: 1\n }\n }\n });\n\n this.$(\".input-code\").inputmask({\n \"mask\": \"a\".repeat(20),\n placeholder: \"\",\n definitions: {\n 'a': {\n validator: \"[0-9a-zA-Z]\",\n cardinality: 1\n }\n }\n });\n\n if (this.erpIntegration != null) {\n this.renderIntegrationFields();\n }\n },\n renderIntegrationFields: function () {\n if (this.erpIntegration == null) {\n return;\n }\n\n switch (this.erpIntegration.get('name')) {\n case PJQ.constants.integrations.providers.ACUMATICA.name:\n let defaultNonStockItem = this.erpIntegration.getSetting('defaultNonStockItem'),\n externalObj = this.model.get('externalObject');\n\n let nonStockItem = defaultNonStockItem;\n if (externalObj != null && externalObj.data?.nonStockItem != null) {\n nonStockItem = externalObj.data?.nonStockItem;\n }\n\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-non-stock'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Non-Stock Item',\n title: 'The Non-Stock Item used when syncing Commitments to Acumatica Subcontract and Purchase Order lines which use this cost type',\n showSaveButton: false,\n defaultDisplayValue: nonStockItem != null ? nonStockItem.inventoryID : null,\n value: nonStockItem != null ? nonStockItem.id : null,\n getChoices: (cb) => {\n let fnCallback = () => {\n cb(_.map(this.erpIntegration.settingsData.nonStockItems, function (item) {\n return {\n id: item.id,\n name: item.inventoryID\n };\n }));\n };\n if (this.erpIntegration.settingsData?.nonStockItems != null) {\n fnCallback();\n return;\n }\n\n this.erpIntegration.fetchSettingsData((data) => {\n fnCallback();\n }, {\n type: 'non_stock_items'\n });\n },\n onChange: (value) => {\n let item = this.erpIntegration.settingsData.nonStockItems.find((item) => item.id === value);\n if (item != null) {\n this.erpIntegration.setSetting('nonStockItem', item);\n }\n\n let exObj = this.model.get('externalObject');\n if (defaultNonStockItem?.id === item.id) {\n delete exObj.data.nonStockItem;\n } else {\n exObj.data.nonStockItem = item;\n }\n exObj.isDirty = true;\n this.model.set('externalObject', exObj);\n }\n });\n break;\n }\n },\n close: function () {\n if (this.model.hasChanged()) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n if (this.options.onClose) {\n this.options.onClose(this.model);\n }\n this.removeModal();\n }, this)\n });\n } else if (this.options.onClose) {\n this.options.onClose(this.model);\n this.removeModal();\n }\n },\n validate: function () {\n let isValid = true;\n\n let $name = this.$('.input-name');\n PJQ.helpers.inputHelpers.setInputError($name, true);\n if (this.model.get('name') == null || this.model.get('name').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($name, false);\n isValid = false;\n }\n\n let $code = this.$('.input-code');\n PJQ.helpers.inputHelpers.setInputError($code, true);\n if (this.model.get('code') == null || this.model.get('code').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($code, false);\n isValid = false;\n }\n\n return isValid;\n },\n save: function () {\n if (!this.validate()) {\n return;\n }\n\n let fnSaveERPObj = (cb) => {\n let exObj = this.model.get('externalObject');\n if (this.erpIntegration == null || exObj == null || !exObj.isDirty) {\n cb();\n return;\n }\n\n this.erpIntegration.updateCostTypeData(exObj, (res, err) => {\n cb();\n });\n }\n\n fnSaveERPObj(() => {\n this.model.save(null, {\n success: () => {\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n this.costTypes.add(this.model);\n\n this.removeModal();\n PJQ.notifications.notify.successNotify({\n message: 'Cost Type saved'\n });\n }\n });\n });\n },\n delete: function () {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this Cost Type?\",\n onDelete: _.bind(function () {\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(this.model);\n }\n this.removeModal();\n }, this)\n });\n }\n});","PJQ.collections.erpAdmin = PJQ.collections.erpAdmin ?? {};\nPJQ.models.erpAdmin = PJQ.models.erpAdmin ?? {};\nPJQ.views.erpAdmin = PJQ.views.erpAdmin ?? {};\nPJQ.constants.erpAdmin = PJQ.constants.erpAdmin ?? {};\n\nPJQ.modules.erpAdmin = {\n routes: [\n {\n route: \"erpadmin\",\n name: 'erpadmin',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\"\n });\n }\n },\n {\n route: \"erpadmin/project\",\n name: 'erpadmin-project',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'project'\n }\n });\n }\n },\n {\n route: \"erpadmin/costcode\",\n name: 'erpadmin-costcode',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'costcode'\n }\n });\n }\n },\n {\n route: \"erpadmin/subjob\",\n name: 'erpadmin-subjob',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'subjob'\n }\n });\n }\n },\n {\n route: \"erpadmin/cont_comp\",\n name: 'erpadmin-company',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'cont_comp'\n }\n });\n }\n },\n {\n route: \"erpadmin/budget\",\n name: 'erpadmin-budget',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'budget'\n }\n });\n }\n },\n {\n route: \"erpadmin/commitment\",\n name: 'erpadmin-commitment',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'commitment'\n }\n });\n }\n },\n {\n route: \"erpadmin/cco\",\n name: 'erpadmin-cco',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'cco'\n }\n });\n }\n },\n {\n route: \"erpadmin/ap_inv\",\n name: 'erpadmin-payableinvoices',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'ap_inv'\n }\n });\n }\n },\n {\n route: \"erpadmin/ar_inv\",\n name: 'erpadmin-receivableinvoices',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'ar_inv'\n }\n });\n }\n },\n {\n route: \"erpadmin/contract\",\n name: 'erpadmin-contract',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'contract'\n }\n });\n }\n },\n {\n route: \"erpadmin/pcco\",\n name: 'erpadmin-pcco',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'pcco'\n }\n });\n }\n },\n {\n route: \"erpadmin/d_cost\",\n name: 'erpadmin-directcosts',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"erpadmin\",\n viewOptions: {\n feature: 'd_cost'\n }\n });\n }\n },\n ]\n};\n\nPJQ.app.addRoutes(PJQ.modules.erpAdmin.routes);\n","// Models\nPJQ.models.erpAdmin.ERPObject = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'objects',\n value: this.erpObject.id\n }\n ]);\n },\n parse: function (model) {\n model = model ? model : {};\n\n model.id = model.erpObject.id;\n this.erpObject = model.erpObject;\n if (model.relatedObjects) {\n this.relatedItem = model.relatedObjects.relatedItem;\n this.project = model.relatedObjects.project;\n }\n\n return model;\n },\n createNewContactCompany: function (externalId, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'vendors'\n },\n {\n endpoint: 'pull',\n value: externalId\n }]),\n isAPIv2: true,\n }).post().done(_.bind(function (res) {\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this)).fail(_.bind(function (error) {\n if (typeof callback === 'function') {\n callback(false, error);\n }\n }, this));\n },\n approve: function (data, callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/approve',\n data: data,\n isAPIv2: true\n }).post().done((res) => {\n if (res && !res.error) {\n this.erpObject = res;\n }\n\n if (typeof callback === 'function') {\n callback(res);\n }\n }).fail((err) => {\n callback(null, err);\n });\n },\n reject: function (rejectReason, callback) {\n this.erpObject.rejectReason = rejectReason;\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/reject',\n data: this.erpObject,\n isAPIv2: true\n }).post().done(_.bind(function (res) {\n if (res && !res.error) {\n this.erpObject = res;\n }\n\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this));\n },\n pull: function (callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/pull',\n isAPIv2: true\n }).post().done(_.bind(function (res) {\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this));\n },\n linkContactCompany: function (company, externalId, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'vendors'\n },\n {\n endpoint: 'link',\n value: externalId\n }]),\n data: company,\n isAPIv2: true,\n }).post().done(_.bind(function (res) {\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this)).fail(_.bind(function (error) {\n if (typeof callback === 'function') {\n callback(false, error);\n }\n }, this));\n },\n archive: function (callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/archive',\n data: this.erpObject,\n isAPIv2: true\n }).post().done(_.bind(function (res) {\n if (res && !res.error) {\n this.erpObject = res;\n }\n\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this));\n },\n removeFromArchive: function (callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/unarchive',\n data: this.erpObject,\n isAPIv2: true\n }).post().done(_.bind(function (res) {\n if (res && !res.error) {\n this.erpObject = res;\n }\n\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this));\n }\n});\n\n//Collections\nPJQ.collections.erpAdmin.ERPObjects = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.erpAdmin.ERPObject,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'objects',\n value: this.options.internalModel\n }\n ], [\n {\n parameter: 'statusIds',\n value: this.options.statusIds\n }\n ]);\n },\n parse: function (models) {\n if (models == null || models.objects == null) {\n return models;\n }\n\n _.each(models.objects, function (model) {\n model.id = model.erpObject.id;\n if (models.projects != null && model.erpObject && model.erpObject.projectId > 0 && model.relatedObjects != null) {\n model.relatedObjects.project = _.findWhere(models.projects, {id: model.erpObject.projectId});\n }\n });\n\n return models.objects;\n },\n getFeatureCounts: function (externalModel, callback) {\n return new Promise((resolve, reject) => {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'objects',\n value: this.options.internalModel\n },\n {\n endpoint: 'count'\n }], [\n {\n parameter: 'externalModel',\n value: externalModel\n }\n ]),\n isAPIv2: true,\n }).get().done(_.bind(function (res) {\n if (typeof callback === 'function') {\n callback(res);\n }\n resolve(res);\n }, this)).fail(_.bind(function (error) {\n if (typeof callback === 'function') {\n callback(null);\n }\n reject(new Error(\"Failed to fetch erp integration sync data\"));\n }, this));\n });\n },\n setInternalModel: function (internalModel) {\n this.options.internalModel = internalModel;\n },\n setStatusIds: function (statusIds) {\n this.options.statusIds = statusIds;\n },\n refreshModels: function (type, callback) {\n return new Promise((resolve, reject) => {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: type\n },\n {\n endpoint: 'refresh'\n }]),\n isAPIv2: true,\n }).post().done(_.bind(function () {\n if (typeof callback === 'function') {\n callback(true);\n }\n resolve(true);\n }, this)).fail(_.bind(function (error) {\n if (typeof callback === 'function') {\n callback(false);\n }\n reject(error);\n }, this));\n });\n },\n linkSuggested: function (externalModel, objs, callback) {\n return new Promise((resolve, reject) => {\n if (objs != null && _.size(objs) === 0) {\n if (typeof callback === 'function') {\n callback([]);\n }\n resolve([]);\n return;\n }\n\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: externalModel + 's'\n },\n {\n endpoint: 'linksuggested'\n }\n ]),\n data: _.size(objs) > 0 ? _.map(objs, (obj) => {\n return {\n id: obj.erpObject.id\n };\n }) : null,\n isAPIv2: true\n }).post().done((res) => {\n if (res && !res.error) {\n let objs = [];\n _.each(res, (model) => {\n objs.push({\n id: model.id,\n erpObject: model,\n relatedObjects: {\n relatedItem: Object.assign({}, model.data)\n }\n });\n });\n\n this.add(objs, {merge: true});\n }\n\n if (typeof callback === 'function') {\n callback(res);\n }\n resolve(res);\n }).fail((error) => {\n if (typeof callback === 'function') {\n callback(null);\n }\n reject(error);\n });\n });\n },\n});","PJQ.constants.erpAdmin.features = {\n cont_comp: {\n canSuggestMatches: true,\n columns: (filter, provider, options) => {\n let columns;\n if (filter === 'readyToImport' || filter === 'archived') {\n columns = [\n {\n \"data\": \"attributes.erpObject.data\",\n \"title\": \"Number\",\n \"width\": \"100px\",\n \"render\": (data, a, row) => {\n return data?.externalNumber ?? data?.id ?? \"\";\n }\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.companyName\",\n \"title\": \"Company\",\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.address1\",\n \"title\": \"Address\",\n \"width\": \"20%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.city\",\n \"title\": \"City\",\n \"width\": \"10%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.state\",\n \"title\": \"State\",\n \"width\": \"5%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.zip\",\n \"title\": \"Zip\",\n \"width\": \"10%\"\n }\n ];\n\n if (options.suggestMatches) {\n columns = _.union([{\n \"title\": '
',\n \"orderable\": false,\n \"searchable\": false,\n \"data\": \"attributes.erpObject\",\n \"visible\": filter !== 'archived',\n \"render\": _.bind(function (erpObj, type, row) {\n let checkedText = _.contains(options.selectedERPItems, row.cid) ? \"checked\" : \"\";\n\n if (erpObj.internalId > 0) {\n return \"\";\n }\n\n return ('
');\n }, this),\n \"width\": '2%'\n },], columns, [{\n \"data\": \"attributes.erpObject.data\",\n \"title\": \"JobPlanner Company\",\n // \"width\": \"10%\",\n \"render\": (data, a, row) => {\n if (data.suggestedId > 0) {\n return '' + data.companyName + ' (' + data.suggestedId.toString() + ')' + '';\n }\n return '';\n }\n }])\n }\n\n columns.push({\n \"data\": \"attributes\",\n \"title\": \"\",\n \"orderable\": false,\n \"width\": \"10%\",\n \"render\": (attr, a, row) => {\n if (attr.erpObject.internalId > 0) {\n return \"
Linked!
\";\n } else if (options.suggestMatches) {\n return '
';\n } else if (filter === 'archived') {\n return '
';\n } else {\n return '
' +\n '
' +\n ' ' +\n '' +\n '
' +\n '
' +\n ' ' +\n '
' +\n 'Archive ' +\n '
' +\n '
' +\n '
';\n }\n },\n });\n if (provider === PJQ.constants.integrations.providers.SAGE300) {\n columns.unshift(\n {\n \"data\": \"attributes.relatedObjects.relatedItem.externalNumber\",\n \"title\": \"Code\",\n \"width\": \"10%\"\n },\n );\n }\n } else {\n columns = [\n {\n \"data\": \"attributes.relatedObjects.relatedItem.companyName\",\n \"title\": \"Company\",\n \"width\": \"20%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.address1\",\n \"title\": \"Address\",\n \"width\": \"20%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.city\",\n \"title\": \"City\",\n \"width\": \"10%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.state\",\n \"title\": \"State\",\n \"width\": \"5%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.zip\",\n \"title\": \"Zip\",\n \"width\": \"10%\"\n }\n ]\n }\n return columns;\n }\n },\n project: {\n enabled: function (integration) {\n if (integration == null) {\n return false;\n }\n\n return integration.getSetting(PJQ.constants.integrations.settings.SYNC_PROJECTS) !== false;\n },\n columns: (filter, provider) => {\n let columns;\n if (filter === 'readyToImport' || filter === 'archived') {\n columns = [\n {\n \"data\": \"attributes.erpObject.data\",\n \"title\": \"Number\",\n \"width\": \"100px\",\n \"render\": (data, a, row) => {\n return data?.externalNumber ?? data?.id ?? \"\";\n }\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.name\",\n \"title\": \"Project Name\",\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.city\",\n \"title\": \"City\",\n \"width\": \"25%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.state\",\n \"title\": \"State\",\n \"width\": \"10%\"\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"width\": \"10%\",\n \"render\": (data, a, row) => {\n if (filter === 'archived') {\n return '
';\n } else {\n return '
' +\n '
' +\n '' +\n '
' +\n '
' +\n ' ' +\n '
' +\n 'Archive ' +\n '
' +\n '
' +\n '
';\n }\n },\n },\n ]\n\n if (provider === PJQ.constants.integrations.providers.SAGE300) {\n columns.unshift(\n {\n \"data\": \"attributes.relatedObjects.relatedItem.externalNumber\",\n \"title\": \"Code\",\n \"width\": \"10%\"\n },\n );\n }\n } else {\n columns = [\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"25%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.project.city\",\n \"title\": \"City\",\n \"width\": \"25%\"\n },\n {\n \"data\": \"attributes.relatedObjects.project.state\",\n \"title\": \"State\",\n \"width\": \"25%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.costCodeCount\",\n \"title\": \"Cost Codes\",\n \"width\": \"25%\"\n },\n ]\n }\n return columns;\n }\n },\n subjob: {\n columns: [\n {\n \"data\": \"attributes.relatedObjects.relatedItem.externalNumber\",\n \"title\": \"Code\",\n \"width\": \"20%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.name\",\n \"title\": \"Name\",\n \"width\": \"30%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.description\",\n \"title\": \"Description\",\n \"width\": \"50%\"\n }\n ]\n },\n costcode: {\n columns: (filter, provider, options) => {\n return [\n {\n \"title\": '
',\n \"orderable\": false,\n \"searchable\": false,\n \"visible\": filter !== 'archived',\n \"render\": _.bind(function (data, type, row) {\n let checkedText = _.contains(options.selectedERPItems, row.cid) ? \"checked\" : \"\";\n\n if (row.isImported) {\n return \"\";\n }\n\n return ('
');\n }, this),\n \"width\": '2%'\n },\n {\n \"data\": \"attributes\",\n \"title\": \"Code\",\n \"width\": \"20%\",\n \"render\": function(data, type, row){\n let item = row.attributes.relatedObjects.relatedItem;\n return item?.externalNumber ?? item?.code ?? \"\";\n }\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.name\",\n \"title\": \"Name\",\n \"width\": \"30%\"\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n if (filter === 'archived') {\n return '
';\n } else {\n if (row.isImported) {\n return \"
Cost Code Created!
\"\n }\n\n return '
' +\n '
' +\n '' +\n '
' +\n '
' +\n ' ' +\n '
' +\n 'Archive ' +\n '
' +\n '
' +\n '
';\n }\n }, this),\n }\n ];\n }\n },\n budget: {\n columns: [\n {\n \"data\": \"attributes.relatedObjects.relatedItem.projectId\",\n \"title\": \"\",\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n return ' View Budget ';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"25%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.estimateAmount\",\n \"title\": \"Total Estimate\",\n \"width\": \"20%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this),\n }\n ]\n },\n contract: {\n enabled: function (integration) {\n if (integration == null) {\n return false;\n }\n\n return integration.getSetting(PJQ.constants.integrations.settings.SYNC_PRIME_CONTRACTS) !== false;\n },\n columns: [\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"20%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.number\",\n \"title\": \"Contract Number\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.description\",\n \"title\": \"Description\",\n \"width\": \"20%\",\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.totalAmount\",\n \"title\": \"Amount\",\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this),\n }\n ]\n },\n pcco: {\n enabled: function (integration) {\n if (integration == null) {\n return false;\n }\n\n return integration.getSetting(PJQ.constants.integrations.settings.SYNC_PRIME_CONTRACT_CHANGE_ORDERS) !== false;\n },\n columns: [\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"20%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.number\",\n \"title\": \"Number\",\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.description\",\n \"title\": \"Description\",\n \"width\": \"20%\",\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.changeReason\",\n \"title\": \"Change Reason\",\n \"width\": \"20%\",\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.totalAmount\",\n \"title\": \"Amount\",\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this),\n }\n ]\n },\n ar_inv: {\n enabled: function (integration) {\n if (integration == null) {\n return false;\n }\n\n return integration.getSetting(PJQ.constants.integrations.settings.SYNC_RECEIVABLE_INVOICES) !== false;\n },\n columns: [\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"20%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.number\",\n \"title\": \"Number\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.billingDate\",\n \"title\": \"Due Date\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.dateHelpers.getDateString(new Date(data), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.totalAmount\",\n \"title\": \"Amount\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this),\n }\n ]\n },\n commitment: {\n enabled: function (integration) {\n if (integration == null) {\n return false;\n }\n\n return integration.getSetting(PJQ.constants.integrations.settings.SYNC_COMMITMENTS) !== false;\n },\n columns: [\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"20%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.number\",\n \"title\": \"Commitment Number\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.description\",\n \"title\": \"Description\",\n \"width\": \"20%\",\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.commitmentType\",\n \"title\": \"Type\",\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.constants.commitments.commitmentTypeNames[data];\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.totalAmount\",\n \"title\": \"Amount\",\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this),\n }\n ]\n },\n cco: {\n enabled: function (integration) {\n if (integration == null) {\n return false;\n }\n\n return integration.getSetting(PJQ.constants.integrations.settings.SYNC_COMMITMENT_CHANGE_ORDERS) !== false;\n },\n columns: [\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"20%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.number\",\n \"title\": \"Number\",\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.description\",\n \"title\": \"Description\",\n \"width\": \"20%\",\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.changeReason\",\n \"title\": \"Change Reason\",\n \"width\": \"20%\",\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.totalAmount\",\n \"title\": \"Amount\",\n \"width\": \"10%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this),\n }\n ]\n },\n ap_inv: {\n enabled: function (integration) {\n if (integration == null) {\n return false;\n }\n\n return integration.getSetting(PJQ.constants.integrations.settings.SYNC_PAYABLE_INVOICES) !== false;\n },\n columns: [\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"20%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.number\",\n \"title\": \"Number\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.billingDate\",\n \"title\": \"Due Date\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.dateHelpers.getDateString(new Date(data), PJQ.helpers.dateHelpers.dateFormats.DATE, true);\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.totalAmount\",\n \"title\": \"Amount\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this),\n }\n ]\n },\n d_cost: {\n enabled: function (integration) {\n if (integration == null) {\n return false;\n }\n\n return integration.getSetting(PJQ.constants.integrations.settings.SYNC_DIRECT_COSTS) !== false;\n },\n columns: [\n {\n \"data\": \"attributes.relatedObjects.project.projectName\",\n \"title\": \"Project\",\n \"width\": \"20%\",\n \"render\": _.bind(function (data, a, row) {\n return '' + data + '';\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.type\",\n \"title\": \"Type\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.constants.directcosts.directCostTypeNames[data]\n }, this),\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.description\",\n \"title\": \"Description\",\n \"width\": \"15%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.amount\",\n \"title\": \"Amount\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, a, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this),\n }\n ]\n }\n}\n\nPJQ.views.erpAdmin.ERPAdminManagement = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'erp-admin-management'),\n subTemplates: {\n approvalItem: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'erp-approval-item'),\n emptyQueue: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'empty-erp-queue'),\n },\n },\n events: {\n 'click .btn-add-project': 'addProjectClicked',\n 'click .btn-link-project': 'linkProjectClicked',\n 'click .feature-nav-item a': 'featureChanged',\n 'click .filter-nav-item a': 'filterChanged',\n 'click .approve-button, .reject-button, .link-button': 'handleApprovalAction',\n 'click .btn-submit-approve': 'approveItem',\n 'click .btn-submit-reject': 'rejectItem',\n 'click .btn-add-vendor': 'addVendorClicked',\n 'click .btn-link-vendor': 'linkVendorClicked',\n 'click .btn-refresh': 'refresh',\n 'click .btn-archive': 'archiveClicked',\n 'click .btn-remove-from-archive': 'removeFromArchiveClicked',\n 'click .select-erp-item': 'erpItemSelected',\n 'click .select-all-erp-items': 'selectAllERPItems',\n 'click .btn-add-cost-code': 'addCostCodeClicked',\n 'click .btn-import-items': 'addCostCodes',\n 'change .cb-suggest-matches': 'suggestMatchesChanged',\n 'click .btn-link-suggested': 'linkSuggestedClicked',\n 'click .btn-link-all-suggested': 'linkAllSuggestedClicked',\n 'click .btn-link-suggested-selected': 'linkSuggestedSelectedClicked',\n },\n beforeFirstRender: async function () {\n this.isFetched = false;\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n\n this.syncData = await this.erpIntegration.fetchSyncData();\n\n let defaultFeature = 'project',\n feature = this.options.feature ? this.options.feature : defaultFeature;\n this.provider = this.erpIntegration.getProvider();\n if (this.provider == null) {\n this.isFetched = true;\n this.render();\n }\n\n if (this.provider.erpAdmin.features[feature] == null) {\n feature = defaultFeature;\n }\n await this.changeFeature(feature);\n\n this.isFetched = true;\n this.render();\n },\n renderData: function () {\n return {\n isFetched: this.isFetched,\n features: this.getFeatures(),\n feature: this.feature,\n filter: this.filter,\n provider: this.provider\n }\n },\n getFeatures: function () {\n if (this.provider == null) {\n return {};\n } else {\n let res = {};\n _.each(this.provider.erpAdmin.features, (ftr, key) => {\n let feature = PJQ.constants.erpAdmin.features[key];\n if (feature == null) {\n return;\n }\n\n if (typeof feature.enabled !== 'function' || feature.enabled(this.erpIntegration)) {\n res[key] = ftr;\n }\n });\n return res;\n }\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.renderFeatureCounts();\n this.renderApprovalItems();\n },\n fetchERPObjects: async function () {\n return new Promise(async (resolve, reject) => {\n if (this.collection == null) {\n this.collection = new PJQ.collections.erpAdmin.ERPObjects();\n }\n this.collection.setInternalModel(this.feature);\n this.collection.setStatusIds(this.statusIds);\n\n await this.collection.fetch({\n data: {\n externalModel: this.provider.erpAdmin.features[this.feature].externalModelName\n }\n }).fail((err) => {\n this.erpIntegration.handleError(err);\n reject(err);\n });\n resolve(true);\n });\n },\n featureChanged: async function (e) {\n let feature = $(e.currentTarget).data('feature');\n await this.changeFeature(feature);\n this.render();\n },\n changeFeature: async function (feature) {\n return new Promise(async (resolve) => {\n if (this.feature !== feature) {\n this.options.suggestMatches = false;\n\n let filters = this.provider.erpAdmin.features[feature].filters;\n this.feature = feature;\n this.filter = filters.readyToImport ? filters.readyToImport.name : filters.readyToExport.name;\n this.statusIds = filters.readyToImport ? [PJQ.constants.integrations.erp.syncStatuses.CACHED] : [PJQ.constants.integrations.erp.syncStatuses.REVIEWING]\n\n PJQ.app.router.navigate('erpadmin/' + this.feature, {\n trigger: false\n });\n\n await this.fetchERPObjects().catch((err) => {\n return;\n });\n\n let externalModel = this.provider.erpAdmin.features[this.feature].externalModelName;\n this.counts = await this.collection.getFeatureCounts(externalModel);\n }\n resolve(true);\n });\n },\n renderFeatureCounts: function () {\n _.each(this.provider.erpAdmin.features[this.feature].filters, function (filter) {\n let $el = this.$('.filter-count[data-filter=\"' + filter.name + '\"]');\n\n switch (filter.name) {\n case 'readyToExport':\n $el.text('(' + this.counts.readyToExportCount + ')');\n break;\n case 'readyToImport':\n $el.text('(' + this.counts.readyToImportCount + ')');\n break;\n case 'failedToExport':\n $el.text('(' + this.counts.failedToExportCount + ')');\n break;\n case 'archived':\n $el.text('(' + this.counts.archivedCount + ')');\n break;\n default:\n $el.text('(0)');\n }\n }, this)\n },\n filterChanged: async function (e) {\n let filter = $(e.currentTarget).data('filter'),\n statusIds = [];\n\n if (this.filter !== filter) {\n switch (filter) {\n case 'readyToImport':\n this.filter = 'readyToImport';\n break;\n case 'readyToExport':\n this.filter = 'readyToExport';\n statusIds.push(PJQ.constants.integrations.erp.syncStatuses.REVIEWING)\n break;\n case 'failedToExport':\n this.filter = 'failedToExport';\n statusIds.push(PJQ.constants.integrations.erp.syncStatuses.FAILED)\n break;\n case 'synced':\n this.filter = 'synced';\n statusIds.push(PJQ.constants.integrations.erp.syncStatuses.SYNCED)\n break;\n case 'archived':\n this.filter = 'archived';\n break;\n default:\n this.filter = 'readyToExport';\n statusIds.push(PJQ.constants.integrations.erp.syncStatuses.REVIEWING)\n break;\n }\n this.statusIds = statusIds;\n await this.fetchERPObjects();\n this.render();\n }\n },\n renderApprovalItems: function () {\n let $featurePane = this.$('.' + this.feature + '-pane');\n\n $featurePane.empty();\n\n this.options.selectedERPItems = [];\n this.filteredModels = [];\n\n // Add View Header\n if (_.size(this.collection.models) > 0) {\n let featureName = this.provider.erpAdmin.features[this.feature].displayName,\n filterName = this.provider.erpAdmin.features[this.feature].filters[this.filter].displayName,\n providerName = this.provider.displayName;\n $featurePane.append($('
').addClass('fs-14 font-italic border-bottom border-light view-header mb-2').text(providerName + ': ' + featureName + ' ' + filterName));\n }\n\n let fnRenderEmptyQueue = () => {\n this.renderSubTemplate(true, this.options.subTemplates.emptyQueue, $featurePane, {\n feature: this.feature,\n filter: this.filter,\n provider: this.provider\n }, () => {\n });\n }\n\n // Render View\n if (this.filter !== 'readyToImport' && this.filter !== 'archived' && _.size(this.collection.models) > 0) {\n // Group Models. Currently only supports grouping by project\n let groupedModels = _.groupBy(this.collection.models, model => {\n return model.project ? model.project.id : null;\n });\n\n _.each(groupedModels, (models, projectId) => {\n if (projectId !== 'null') {\n let project = models[0].project;\n\n $featurePane.append($('
').addClass('fs-18 font-weight-bold mt-3').text(project.projectName));\n }\n\n _.each(models, (model) => {\n let $approvalItemOuter = $('
').addClass('approval-item-outer mb-2').attr('data-cid', model.cid);\n\n $featurePane.append($approvalItemOuter);\n this.renderApprovalItem(model);\n });\n });\n } else if (_.size(this.collection.models) > 0) {\n this.filteredModels = _.filter(this.collection.models, function (model) {\n let match = false,\n statusId = model.get('erpObject').status;\n if (this.filter === 'archived') {\n match = statusId === PJQ.constants.integrations.erp.syncStatuses.ARCHIVED;\n } else if (this.filter === 'readyToImport') {\n match = statusId === PJQ.constants.integrations.erp.syncStatuses.CACHED;\n }\n\n if (this.options.suggestMatches) {\n match = model.attributes.erpObject.data.suggestedId > 0;\n }\n\n return match;\n }, this);\n\n if (_.size(this.filteredModels) > 0 || this.options.suggestMatches) {\n this.renderSubTemplate(true, this.options.subTemplates.approvalItem, $featurePane, {\n provider: this.provider,\n feature: this.feature,\n model: null,\n relatedItem: null,\n filter: this.filter,\n inputs: null,\n syncData: this.syncData,\n options: this.options\n }, (item) => {\n let columns = this.getColumns(),\n ftr = this.provider.erpAdmin.features[this.feature];\n this.itemTable = new PJQ.views.dataTables.DataTable({\n el: this.$(item).find('.item-table'),\n data: this.filteredModels,\n rowId: \"cid\",\n language: {\n emptyTable: 'No ' + ftr.displayName + ' were found',\n zeroRecords: 'No ' + ftr.displayName + ' matched the search criteria'\n },\n isHideSearch: false,\n paging: true,\n order: [1, 'asc'],\n columns: columns,\n contextMenuOptions: {\n actions: this.filter !== 'archived' ? [\n {\n name: 'Import',\n isShown: () => {\n return this.feature !== 'cont_comp' && this.filter !== 'archived';\n },\n onClick: (row) => {\n switch (this.feature) {\n case 'project':\n this.addProject(row.data());\n break;\n case 'costcode':\n this.addCostCode(row.data());\n break;\n }\n }\n },\n {\n name: 'Create New Company',\n isShown: () => {\n return this.feature === 'cont_comp' && this.filter !== 'archived';\n },\n onClick: (row) => {\n this.addVendor(row.data());\n }\n },\n {\n name: 'Link to Existing Company',\n isShown: () => {\n return this.feature === 'cont_comp' && this.filter !== 'archived';\n },\n onClick: (row) => {\n this.linkVendor(row.data());\n }\n },\n {\n name: 'Archive',\n isDanger: true,\n isShown: (row) => {\n return this.filter !== 'archived';\n },\n onClick: (row) => {\n this.archive(row.data());\n }\n }\n ] : [\n {\n name: 'Restore',\n isShown: (row) => {\n return this.filter === 'archived';\n },\n onClick: (row) => {\n this.removeFromArchive(row.data());\n }\n }\n ]\n },\n });\n });\n } else {\n fnRenderEmptyQueue();\n }\n } else {\n fnRenderEmptyQueue();\n }\n },\n renderApprovalItem: function (model) {\n // Find the existing approval-item-outer div using the cid\n let $approvalItemOuter = this.$('.approval-item-outer[data-cid=\"' + model.cid + '\"]');\n\n // If the div was found, proceed to render the item\n if ($approvalItemOuter.length > 0) {\n let inputs = this.provider.erpAdmin.features[this.feature].approvalInputs\n this.renderSubTemplate(false, this.options.subTemplates.approvalItem, $approvalItemOuter, {\n provider: this.provider,\n feature: this.feature,\n model: model,\n relatedItem: model.relatedItem,\n project: model.project,\n filter: this.filter,\n inputs: inputs,\n syncData: this.syncData,\n }, _.bind(function (item) {\n let columns = this.getColumns();\n item.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(item).find('.item-table'),\n data: [model],\n rowId: \"cid\",\n isHideSearch: true,\n paging: false,\n order: [0, 'asc'],\n columns: columns\n });\n\n _.each(inputs, function (input) {\n let field = this.$(item).find('.' + input.className);\n if (input.type === 'date') {\n new PJQ.inputs.Datepicker({\n el: field,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n defaultDate: null\n }\n });\n } else {\n if (input.format) {\n let mask = '';\n if (input.prefix)\n mask += \"\\\\\" + input.prefix;\n\n if (input.format)\n mask += input.format;\n\n field.inputmask({\n definitions: {\n '#': {\n validator: \"[^]\"\n }\n },\n mask: mask,\n placeholder: ''\n });\n }\n }\n }, this)\n }, this));\n }\n },\n handleApprovalAction: function (e) {\n let $target = $(e.currentTarget),\n value = $target.text().trim().toLowerCase(),\n $approvalItem = $target.closest('.approval-item'),\n cid = $approvalItem.data('cid'),\n model = this.collection.get(cid);\n\n // hide all context containers\n $approvalItem.find('.approve-context-container, .reject-context-container').hide().removeClass('d-flex');\n $approvalItem.find('.approve-button, .reject-button').addClass('inactive');\n\n // show the one that corresponds to the clicked button\n if (value === 'approve') {\n $target.removeClass('inactive');\n $approvalItem.find('.reject-button').addClass('inactive');\n $approvalItem.find('.link-button').addClass('inactive');\n let $approveContainer = $approvalItem.find('.approve-context-container');\n $approveContainer.addClass('d-flex').slideDown(200);\n } else if (value === 'reject') {\n $target.removeClass('inactive')\n $approvalItem.find('.approve-button').addClass('inactive');\n $approvalItem.find('.link-button').addClass('inactive');\n $approvalItem.find('.reject-context-container').slideDown(200);\n } else {\n $target.removeClass('inactive')\n $approvalItem.find('.approve-button').addClass('inactive');\n $approvalItem.find('.reject-button').addClass('inactive');\n\n new PJQ.views.erpAdmin.SelectImportVendorModal({\n isSingleChoice: true,\n provider: this.provider,\n onSave: _.bind(function (erpVendor) {\n new PJQ.views.modals.YesNo({\n header: \"Link Vendor\",\n body: \"Are you sure you would like to link this vendor to \" + erpVendor.relatedItem.companyName + \"?\",\n onYes: () => {\n model.linkContactCompany(model.relatedItem, erpVendor.erpObject.externalId, _.bind(function (contactCompany, err) {\n if (contactCompany && contactCompany.externalObject && contactCompany.externalObject.status === PJQ.constants.integrations.erp.syncStatuses.SYNCED) {\n contactCompany.erpObject = contactCompany.externalObject;\n model.set({\n isApproved: true\n });\n model.erpObject = contactCompany.externalObject;\n model.erpObject.successText = \"Company Linked!\";\n this.renderApprovalItem(model);\n } else {\n model.erpObject.error = err ? err : contactCompany.error;\n }\n this.renderApprovalItem(model);\n }, this));\n },\n onNo: () => {\n $target.addClass('inactive')\n },\n });\n }, this)\n });\n }\n },\n approveItem: function (e) {\n let $target = $(e.currentTarget),\n approveContainer = $(e.target).closest('.approve-context-container'),\n cid = $target.closest('.approval-item').data('cid'),\n model = this.collection.get(cid),\n isValid = true,\n data = {};\n\n if (_.size(model.erpObject.externalId) === 0) {\n _.each(this.provider.erpAdmin.features[this.feature].approvalInputs, function (input) {\n let inputEl = approveContainer.find('.' + input.className),\n inputValue = inputEl.val();\n if (_.size(inputValue) > 0) {\n data[input.value] = inputValue\n } else if (input.required) {\n isValid = false;\n PJQ.helpers.inputHelpers.setInputError(inputEl, false);\n }\n }, this);\n } else {\n data = model.erpObject.data;\n }\n\n if (isValid) {\n let loader = new PJQ.Loader($target.closest('.approval-item'));\n model.approve(data, (res, err) => {\n loader.remove();\n if (res == null) {\n this.erpIntegration.handleError(err);\n return;\n }\n\n if (res && !res.error) {\n model.set('isApproved', true);\n this.renderApprovalItem(model);\n } else {\n model.erpObject.error = res ? res.error : 'Something went wrong'\n this.renderApprovalItem(model);\n }\n });\n }\n },\n rejectItem: function (e) {\n let $target = $(e.currentTarget),\n $approvalItem = $target.closest('.approval-item'),\n cid = $approvalItem.data('cid'),\n model = this.collection.get(cid),\n isValid = true,\n rejectReason = $approvalItem.find('.reject-reason').val();\n\n if (isValid) {\n let loader = new PJQ.Loader($approvalItem);\n model.reject(rejectReason, (res) => {\n loader.remove();\n this.renderApprovalItem(model);\n });\n }\n },\n getColumns: function () {\n let ftr = this.feature.toLowerCase(),\n cols = PJQ.constants.erpAdmin.features[ftr].columns;\n return typeof cols === 'function' ? cols(this.filter, this.provider, this.options) : cols;\n },\n erpItemSelected: function (e) {\n if (this.options.selectedERPItems == null) {\n this.options.selectedERPItems = [];\n }\n\n let $target = $(e.currentTarget),\n cid = $target.data('cid'),\n isChecked = $target.prop('checked');\n if (_.size(cid) > 0) {\n if (isChecked) {\n this.options.selectedERPItems.push(cid);\n } else {\n this.options.selectedERPItems = _.reject(this.options.selectedERPItems, function (sCid) {\n return sCid === cid;\n });\n }\n }\n\n this.$('.select-all-erp-items').prop('checked', _.size(this.options.selectedERPItems) === _.size(this.filteredModels) && _.size(this.filteredModels) > 0);\n\n this.handleSelectedERPItemsButtons();\n },\n selectAllERPItems: function (e) {\n let $target = $(e.currentTarget),\n isChecked = $target.prop('checked');\n\n if (!isChecked || this.options.selectedERPItems == null) {\n this.options.selectedERPItems = [];\n }\n\n _.each(this.filteredModels, function (model) {\n let checkbox = this.$('.select-erp-item[data-cid=\"' + model.cid + '\"]');\n\n if (!isChecked) {\n checkbox.prop('checked', false);\n } else {\n checkbox.prop('checked', true);\n\n if (!_.contains(this.options.selectedERPItems, model.cid)) {\n this.options.selectedERPItems.push(model.cid);\n }\n }\n }, this);\n\n this.handleSelectedERPItemsButtons();\n },\n handleSelectedERPItemsButtons: function (alteredModel) {\n // if a model was passed in, it was archived, or imported, so remove it from the filtered models and selected items if it exists there.\n if (alteredModel) {\n this.filteredModels = _.reject(this.filteredModels, function (m) {\n return m === alteredModel;\n });\n this.options.selectedERPItems = _.reject(this.options.selectedERPItems, function (cid) {\n return cid === alteredModel.cid;\n });\n }\n\n this.$('.select-all-erp-items').prop('checked', _.size(this.options.selectedERPItems) === _.size(this.filteredModels) && _.size(this.filteredModels) > 0);\n this.$('.btn-for-selected').attr('disabled', _.size(this.options.selectedERPItems) === 0);\n this.$('.selected-items-count').text(_.size(this.options.selectedERPItems));\n },\n addVendorClicked: function (e) {\n let target = $(e.currentTarget),\n row = target.closest('tr'),\n cid = row[0].id,\n model = this.collection.get(cid);\n\n this.addVendor(model);\n },\n addVendor: function (model) {\n let rowEl = this.$('tr#' + model.cid),\n actionButtonContainer = rowEl.find('.action-button-container'),\n loader = new PJQ.Loader(actionButtonContainer),\n externalId = model.relatedItem.id;\n\n model.createNewContactCompany(externalId, _.bind(function (contactCompany, err) {\n loader.remove();\n if (contactCompany) {\n if (!contactCompany.error) {\n actionButtonContainer.html(\"Company Created!\");\n this.counts.readyToImportCount--;\n this.renderFeatureCounts();\n } else {\n actionButtonContainer.html(\"\" + err ? err : contactCompany.error + \"\");\n }\n } else {\n PJQ.notifications.notify.errorNotify({\n message: 'Failed to Import Contact'\n });\n }\n }, this));\n },\n linkVendorClicked: function (e) {\n let target = $(e.currentTarget),\n row = target.closest('tr'),\n cid = row[0].id,\n model = this.collection.get(cid);\n\n this.linkVendor(model);\n },\n linkVendor: function (model) {\n let rowEl = this.$('tr#' + model.cid),\n actionButtonContainer = rowEl.find('.action-button-container');\n\n new PJQ.views.contacts.SelectContactsModal({\n context: PJQ.constants.contacts.contexts.COMPANIES,\n isSingleChoice: true,\n displayContactsBlock: true,\n onSave: _.bind(function (selectedCompany) {\n let loader = new PJQ.Loader(actionButtonContainer);\n selectedCompany.set('companyId', selectedCompany.get('contactCompanyId'));\n model.linkContactCompany(selectedCompany, model.erpObject.externalId, _.bind(function (contactCompany, err) {\n loader.remove();\n if (contactCompany) {\n if (!contactCompany.error) {\n actionButtonContainer.html(\"Company Linked!\");\n this.counts.readyToImportCount--;\n this.renderFeatureCounts();\n } else {\n actionButtonContainer.html(\"\" + err ? err : contactCompany.error + \"\");\n }\n } else {\n PJQ.notifications.notify.errorNotify({\n message: 'Failed to Import Contact'\n });\n }\n }, this));\n }, this)\n });\n },\n suggestMatchesChanged: function (e) {\n this.options.suggestMatches = $(e.currentTarget).prop('checked');\n this.render();\n },\n linkSuggestedSelectedClicked: function () {\n this.linkSuggested(null, this.collection.get(this.options.selectedERPItems));\n },\n linkSuggestedClicked: function (e) {\n let target = $(e.currentTarget),\n $row = target.closest('tr'),\n row = this.itemTable.getRow($row[0].id);\n this.linkSuggested(row);\n },\n linkAllSuggestedClicked: function () {\n if (null == _.find(this.collection.models, (obj) => {\n return obj.erpObject.data.suggestedId > 0 && !(obj.erpObject.internalId > 0);\n })) {\n return;\n }\n this.linkSuggested();\n },\n toggleLoader: function (show) {\n if (show == null) {\n show = this.loader != null;\n }\n\n if (show && this.loader == null) {\n this.loader = new PJQ.Loader(this.$('.erp-admin-nav'));\n } else if (!show && this.loader != null) {\n this.loader.remove();\n this.loader = null;\n }\n },\n linkSuggested: function (row, objs) {\n let linkObjs = null;\n if (row != null) {\n linkObjs = [row.data()];\n } else if (objs != null) {\n linkObjs = objs;\n }\n\n this.toggleLoader(true);\n\n let externalModel = this.provider.erpAdmin.features[this.feature].externalModelName;\n this.collection.linkSuggested(externalModel, linkObjs, (res) => {\n if (res) {\n if (res.error) {\n return;\n }\n\n this.toggleLoader(false);\n\n let linkedCount = _.size(res);\n this.counts.readyToImportCount = this.counts.readyToImportCount - linkedCount;\n this.renderFeatureCounts();\n\n PJQ.notifications.notify.successNotify({\n message: linkedCount.toString() + ' Contacts Linked to ERP'\n });\n\n if (row != null) {\n // Remove from filtered models and selected items\n this.handleSelectedERPItemsButtons(row.data());\n this.itemTable.refreshRow(row);\n } else {\n this.render();\n }\n } else {\n PJQ.notifications.notify.errorNotify({\n message: 'Failed to Archive'\n });\n }\n });\n },\n archiveClicked: function (e) {\n let target = $(e.currentTarget),\n row = target.closest('tr'),\n cid = row[0].id,\n model = this.collection.get(cid);\n this.archive(model);\n },\n archive: function (model) {\n let rowEl = this.$('tr#' + model.cid),\n actionButtonContainer = rowEl.find('.action-button-container');\n\n model.archive(_.bind(function (res) {\n if (res) {\n if (!res.error) {\n actionButtonContainer.html(\"Archived!\");\n this.counts.readyToImportCount--;\n this.counts.archivedCount++;\n this.renderFeatureCounts();\n // Remove from filtered models and selected items\n this.handleSelectedERPItemsButtons(model);\n } else {\n actionButtonContainer.html(\"\" + res.error + \"\");\n }\n rowEl.find('.select-erp-item').closest('.text-align-center').remove();\n } else {\n PJQ.notifications.notify.errorNotify({\n message: 'Failed to Archive'\n });\n }\n }, this));\n },\n removeFromArchiveClicked: function (e) {\n let target = $(e.currentTarget),\n row = target.closest('tr'),\n cid = row[0].id,\n model = this.collection.get(cid);\n\n this.removeFromArchive(model);\n },\n removeFromArchive: function (model) {\n let rowEl = this.$('tr#' + model.cid),\n actionButtonContainer = rowEl.find('.action-button-container');\n\n model.removeFromArchive(_.bind(function (res) {\n if (res) {\n if (!res.error) {\n actionButtonContainer.html(\"Restored!\");\n this.counts.readyToImportCount++;\n this.counts.archivedCount--;\n this.renderFeatureCounts();\n } else {\n actionButtonContainer.html(\"\" + res.error + \"\");\n }\n } else {\n PJQ.notifications.notify.errorNotify({\n message: 'Failed to Restore'\n });\n }\n }, this));\n },\n addProjectClicked: function (e) {\n let target = $(e.currentTarget),\n row = target.closest('tr'),\n cid = row[0].id,\n model = this.collection.get(cid);\n\n this.addProject(model);\n },\n addProject: function (model) {\n let rowEl = this.$('tr#' + model.cid),\n actionButtonContainer = rowEl.find('.action-button-container');\n\n let loader = new PJQ.Loader(actionButtonContainer);\n\n model.pull((res) => {\n loader.remove();\n if (res) {\n let project = new PJQ.models.projects.Project(res);\n if (project.id > 0) {\n project.save(null, {\n success: () => {\n actionButtonContainer.html(\"
Project Created!
\" +\n \"
\");\n this.counts.readyToImportCount--;\n this.renderFeatureCounts();\n }\n })\n } else {\n actionButtonContainer.html(\"\" + res.error + \"\");\n }\n } else {\n PJQ.notifications.notify.errorNotify({\n message: 'Failed to Import Project'\n });\n }\n });\n },\n linkProjectClicked: function (e) {\n let target = $(e.currentTarget),\n row = target.closest('tr'),\n cid = row[0].id,\n model = this.collection.get(cid);\n\n this.linkProject(model);\n },\n linkProject: function (model) {\n let rowEl = this.$('tr#' + model.cid),\n actionButtonContainer = rowEl.find('.action-button-container');\n\n\n // new PJQ.views.contacts.SelectContactsModal({\n // context: PJQ.constants.contacts.contexts.COMPANIES,\n // isSingleChoice: true,\n // displayContactsBlock: true,\n // onSave: _.bind(function (selectedCompany) {\n // let loader = new PJQ.Loader(actionButtonContainer);\n // selectedCompany.set('companyId', selectedCompany.get('contactCompanyId'));\n // model.linkContactCompany(selectedCompany, model.erpObject.externalId, _.bind(function (contactCompany, err) {\n // loader.remove();\n // if (contactCompany) {\n // if (!contactCompany.error) {\n // actionButtonContainer.html(\"Company Linked!\");\n // this.counts.readyToImportCount--;\n // this.renderFeatureCounts();\n // } else {\n // actionButtonContainer.html(\"\" + err ? err : contactCompany.error + \"\");\n // }\n // } else {\n // PJQ.notifications.notify.errorNotify({\n // message: 'Failed to Import Contact'\n // });\n // }\n // }, this));\n // }, this)\n // });\n },\n addCostCodeClicked: function (e) {\n let target = $(e.currentTarget),\n row = target.closest('tr'),\n cid = row[0].id,\n model = this.collection.get(cid);\n\n this.addCostCode(model);\n },\n addCostCode: function (model) {\n let rowEl = this.$('tr#' + model.cid),\n actionButtonContainer = rowEl.find('.action-button-container'),\n loader = new PJQ.Loader(actionButtonContainer);\n\n this.createNewCostCodes([model.get('erpObject').externalId], (res) => {\n loader.remove();\n if (res) {\n actionButtonContainer.html(\"Cost Code Created!\");\n this.counts.readyToImportCount--;\n\n this.renderFeatureCounts();\n this.handleSelectedERPItemsButtons(model);\n rowEl.find('.select-erp-item').closest('.text-align-center').remove();\n } else {\n PJQ.notifications.notify.errorNotify({\n message: 'Failed to Import Cost Code'\n });\n }\n });\n },\n addCostCodes: function () {\n let loader = new PJQ.Loader(this.$('.costcode-pane')),\n costCodes = [],\n costCodesExternalIds = [];\n\n _.each(this.options.selectedERPItems, _.bind(function (cid) {\n let model = this.collection.get(cid);\n costCodes.push(model);\n costCodesExternalIds.push(model.get('erpObject').externalId)\n }, this));\n\n\n this.createNewCostCodes(costCodesExternalIds, (res) => {\n _.each(costCodes, function (costCode) {\n this.filteredModels = _.reject(this.filteredModels, function (m) {\n return m === costCode;\n });\n this.options.selectedERPItems = _.reject(this.options.selectedERPItems, function (cid) {\n return cid === costCode.cid;\n });\n costCode.isImported = true;\n\n let rowEl = this.$('tr#' + costCode.cid);\n rowEl.find('.action-button-container').html(\"Cost Code Created!\");\n rowEl.find('.select-erp-item').closest('.text-align-center').remove();\n }, this);\n loader.remove();\n this.handleSelectedERPItemsButtons();\n });\n\n },\n createNewCostCodes: function (externalIds, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'costcodes'\n },\n {\n endpoint: 'pull'\n }]),\n data: externalIds,\n isAPIv2: true,\n }).post().done(_.bind(function (res) {\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this)).fail(_.bind(function (error) {\n if (typeof callback === 'function') {\n callback(false, error);\n }\n }, this));\n },\n refresh: async function () {\n this.toggleLoader(true);\n await this.collection.refreshModels(this.provider.erpAdmin.features[this.feature].externalModelName + 's').catch((err) => {\n this.erpIntegration.handleError(err);\n this.toggleLoader(false);\n return;\n });\n\n let date = new Date();\n if (this.feature === this.provider.erpAdmin.features.project.internalModelName) {\n this.syncData.projectsSyncedOn = date.toISOString();\n } else if (this.feature === this.provider.erpAdmin.features.cont_comp.internalModelName) {\n this.syncData.vendorsSyncedOn = date.toISOString();\n } else if (this.feature === this.provider.erpAdmin.features.costcode.internalModelName) {\n this.syncData.costCodesSyncedOn = date.toISOString();\n }\n\n this.toggleLoader(false);\n await this.fetchERPObjects().catch((err) => {\n return;\n });\n this.render();\n }\n});\n\nPJQ.views.erpAdmin.SelectImportVendorModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-select-import-vendor'),\n width: '60%',\n maxWidth: 700,\n onSave: _.noop,\n headerSubText: null\n },\n events: {\n \"change .select-vendor\": \"selectVendor\",\n \"click .btn-save\": \"save\",\n \"click .btn-cancel\": \"cancel\"\n },\n beforeModalCreated: function () {\n this.options.isAdmin = PJQ.app.session.hasPermission('settings.canManageERPAdmin');\n this.selectedVendors = [];\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.erpAdmin.ERPObjects(null, {\n internalModel: this.options.provider.erpAdmin.features.cont_comp.internalModelName,\n statusIds: []\n });\n }\n\n if (this.collection.isFetched) {\n this.render();\n } else {\n this.collection.fetch({\n data: {\n externalModel: this.options.provider.erpAdmin.features.cont_comp.externalModelName\n },\n success: _.bind(function () {\n this.vendors = this.collection.models\n this.render();\n }, this)\n });\n }\n },\n renderData: function () {\n return {\n headerSubText: this.options.headerSubText,\n isSingleChoice: this.options.isSingleChoice\n }\n },\n afterRender: function () {\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('.vendors-table'),\n data: this.vendors,\n order: [],\n columns: [{\n \"data\": \"attributes.isSelected\",\n \"title\": \"\",\n \"orderable\": false,\n \"width\": \"7%\",\n \"searchable\": false,\n \"render\": _.bind(function (data) {\n return ('
');\n }, this)\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.companyName\",\n \"title\": \"Company\",\n \"width\": \"20%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.address1\",\n \"title\": \"Address\",\n \"width\": \"20%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.city\",\n \"title\": \"City\",\n \"width\": \"10%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.state\",\n \"title\": \"State\",\n \"width\": \"5%\"\n },\n {\n \"data\": \"attributes.relatedObjects.relatedItem.zip\",\n \"title\": \"Zip\",\n \"width\": \"10%\"\n }\n ],\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n });\n },\n selectVendor: function (e) {\n let target = $(e.currentTarget),\n vendor = this.dataTable.getRow(target.closest('tr')).data();\n\n if (this.options.isSingleChoice) {\n this.$('.select-vendor').not(target).text('Select').prop('checked', false);\n if (vendor.get('isSelected')) {\n vendor.set('isSelected', false);\n this.selectedVendor = null;\n } else {\n vendor.set('isSelected', true);\n this.selectedVendor = vendor;\n this.collection.get(vendor.id);\n _.each(this.collection.models, _.bind(function (dtVendor) {\n if (vendor.id !== dtVendor.id)\n dtVendor.set('isSelected', false);\n }, this));\n }\n this.$('.btn-save').attr('disabled', this.selectedVendor == null);\n\n if (typeof this.options.onVendorSelected === 'function') {\n this.options.onVendorSelected(this.selectedVendor);\n }\n } else {\n if (vendor.get('isSelected')) {\n target.text('Select').addClass('btn-primary').removeClass('btn-secondary');\n vendor.set('isSelected', false);\n this.selectedVendors = _.reject(this.selectedVendors, function (selVendor) {\n return selVendor.id === vendor.id;\n });\n } else {\n target.text('Deselect').addClass('btn-secondary').removeClass('btn-primary');\n vendor.set('isSelected', true);\n this.selectedVendors.push(vendor);\n }\n this.$('.btn-save').attr('disabled', this.selectedVendors == null);\n\n if (typeof this.options.onVendorSelected === 'function') {\n this.options.onVendorSelected(this.selectedVendors);\n }\n }\n },\n cancel: function () {\n if (this.options.onCancel) {\n this.options.onCancel();\n }\n this.removeModal();\n },\n save: function () {\n if (this.options.onSave) {\n this.options.onSave(this.selectedVendor ? this.selectedVendor : this.selectedVendors);\n this.removeModal();\n }\n }\n});","// Initialize\nPJQ.financialMarkups = {\n models: {},\n collections: {},\n views: {}\n};\n\n// Models\nPJQ.financialMarkups.models.FinancialMarkup = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n\n },\n calculate: function (lineItem, compoundAmt) {\n if (this.get('void') || this.get('isApplied') || this.lineItem != null) {\n return 0;\n }\n\n let amt;\n if (lineItem instanceof PJQ.models.changeRequests.ChangeRequestLineItem) {\n amt = lineItem.get('revenue') ?? 0;\n } else {\n amt = lineItem.get('amount') ?? 0;\n }\n\n if (_.size(this.get('costCodeIds')) > 0) {\n if (!_.contains(this.get('costCodeIds'), lineItem.get('costCodeId'))) {\n return 0;\n }\n }\n\n if (_.size(this.get('costTypeIds')) > 0) {\n if (!_.contains(this.get('costTypeIds'), lineItem.get('costTypeId'))) {\n return 0;\n }\n }\n\n if (this.get('isCompounding')) {\n amt += compoundAmt > 0 ? compoundAmt : 0\n }\n return Math.ceil(amt * (this.get('percent') / 10000))\n // return amt * (this.get('percent') / 10000);\n }\n});\n\n// Collections\nPJQ.financialMarkups.collections.FinancialMarkups = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.financialMarkups.models.FinancialMarkup,\n endpoint: function () {\n\n },\n getMarkups: function (lineItems) {\n let result = [],\n sortedMarkups = _.sortBy(_.filter(this.models, (markup) => {\n return !markup.get('delete') && !markup.get('void')\n }), (model) => {\n return model.get('sortOrder');\n });\n\n let amts = {};\n _.each(lineItems.filter((lineItem) => {\n return !lineItem.get('delete');\n }), (lineItem) => {\n let liMarkup = 0,\n isAppliedLineItem = lineItem.markup != null || lineItem.get('appliedMarkupId') != null;\n\n _.each(sortedMarkups, (markup) => {\n let amt = amts[markup.cid];\n if (amt == null) {\n amt = 0;\n }\n let tMarkup = !isAppliedLineItem ? markup.calculate(lineItem, liMarkup) : 0;\n amts[markup.cid] = amt + tMarkup;\n liMarkup += tMarkup;\n });\n });\n\n _.each(sortedMarkups, (markup) => {\n let amt = amts[markup.cid];\n if (amt == null) {\n amt = 0;\n }\n result.push({\n cid: markup.cid,\n model: markup,\n name: markup.get('name'),\n amount: amt,\n isApplied: markup.get('appliedCostCodeId') != null && markup.get('appliedCostTypeId') != null,\n isVertical: markup.get('isVertical'),\n sortOrder: markup.get('sortOrder')\n });\n });\n return result;\n }\n});\n\n// Views\nPJQ.financialMarkups.views.FinancialMarkupsList = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'financial-markups-list'),\n canEdit: true,\n canVoid: false,\n autoVoid: false\n },\n events: {\n 'click .btn-add-markup': 'addMarkup',\n 'click .btn-edit-markup': 'editMarkupClicked',\n 'click .btn-delete-markup': 'deleteMarkupClicked'\n },\n beforeFirstRender: async function () {\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n this.isFetched = false;\n\n this.subJobs = await this.options.project.fetchSubJobs();\n this.costCodes = await this.options.project.fetchCostCodes();\n this.costTypes = await this.options.project.fetchCostTypes();\n\n this.isFetched = true;\n this.render();\n },\n renderData: function () {\n return {\n canEdit: this.options.canEdit\n };\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n let tableData = _.map(this.collection.models, function (markup) {\n if (!markup.get('delete')) {\n return markup;\n }\n }, this)\n\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('.markup-items-table'),\n data: tableData,\n rowId: \"cid\",\n language: {\n zeroRecords: this.options.canEdit ? 'Click \"Add\" to create a new Markup Item' : 'No markups have been added'\n },\n paging: false,\n isHideSearch: true,\n onRowDoubleClick: (row) => {\n if (this.options.canEdit) {\n this.editMarkup(row.data());\n }\n },\n sortableOptions: this.options.canEdit ? {\n data: this.collection,\n stop: (a, b) => {\n if (this.options.canEdit) {\n let self = this;\n self.$('tr').filter('.odd, .even').each(function (index, html) {\n let row = $(html)[0].id,\n rowData = self.collection.get(row);\n rowData.set('sortOrder', index + 1);\n });\n }\n }\n } : null,\n contextMenuOptions: {\n actions: [\n {\n name: 'Edit',\n onClick: (row) => {\n this.editMarkup(row.data());\n },\n isShown: (row) => {\n return this.options.canEdit;\n },\n },\n {\n name: 'Delete',\n isDanger: true,\n onClick: (row) => {\n this.deleteMarkup(row);\n },\n isShown: (row) => {\n return this.options.canEdit;\n },\n }\n ]\n },\n order: [0, 'asc'],\n columns: [\n {\n \"data\": \"attributes.sortOrder\",\n \"title\": \"\",\n \"searchable\": false,\n \"orderable\": false\n },\n {\n \"title\": \"Name\",\n \"data\": \"attributes.name\",\n \"orderable\": false,\n \"render\": (data, type, row) => {\n return '' + data + ''\n }\n },\n {\n \"title\": \"Percent\",\n \"data\": \"attributes.percent\",\n \"orderable\": false,\n \"render\": (data, type, row) => {\n return PJQ.helpers.formatHelpers.formatDecimal(data / 100, 2) + \"%\";\n }\n },\n {\n \"title\": \"Compounding\",\n \"data\": \"attributes.isCompounding\",\n \"orderable\": false,\n \"render\": (data, type, row) => {\n return data ? \"Yes\" : \"No\";\n }\n },\n {\n \"title\": \"Vertical\",\n \"data\": \"attributes.isVertical\",\n \"orderable\": false,\n \"render\": (data, type, row) => {\n return data ? \"Yes\" : \"No\";\n }\n },\n {\n \"title\": \"Changes Only\",\n \"data\": \"attributes.void\",\n \"orderable\": false,\n \"render\": (data, type, row) => {\n return data ? \"Yes\" : \"No\";\n }\n },\n {\n \"title\": \"Applies To\",\n \"data\": \"attributes.isApplied\",\n \"orderable\": false,\n \"render\": (data, type, row) => {\n let appliedCostCodeId = row.get('appliedCostCodeId');\n if (!(appliedCostCodeId > 0)) {\n return '';\n }\n\n let costCode = _.find(this.costCodes.models, (costCode) => {\n return costCode.id === appliedCostCodeId;\n });\n return costCode?.getDisplayName() ?? '';\n }\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"visible\": this.options.canEdit,\n \"orderable\": false,\n \"searchable\": false,\n \"canResize\": false,\n \"render\": () => {\n if (!this.options.canEdit) {\n return '';\n }\n return '
'\n },\n \"width\": '80px'\n }\n ]\n });\n },\n addMarkup: function () {\n let markup = new PJQ.financialMarkups.models.FinancialMarkup({\n name: \"\",\n percent: 0,\n isCompounding: false,\n isVertical: false,\n sortOrder: this.collection.length + 1,\n costCodeIds: [],\n costTypeIds: [],\n void: this.options.autoVoid === true\n });\n\n this.editMarkup(markup);\n },\n editMarkupClicked: function (e) {\n let $target = $(e.currentTarget).closest('tr'),\n row = this.dataTable.getRow($target),\n markup = row.data();\n\n this.editMarkup(markup);\n },\n editMarkup: function (markup) {\n new PJQ.financialMarkups.views.EditFinancialMarkupModal({\n model: markup,\n canEdit: this.options.canEdit,\n canVoid: this.options.canVoid,\n autoVoid: this.options.autoVoid,\n onSave: (markup) => {\n if (markup.isNew() && !markup.hasBeenAdded) {\n let makeSortable = _.size(_.filter(this.collection.models, (model) => {\n return !model.get('delete')\n })) === 0;\n this.collection.add(markup);\n this.dataTable.addRow(markup);\n markup.hasBeenAdded = true;\n\n if (makeSortable) {\n this.dataTable.makeSortable(this.dataTable.options.sortableOptions);\n }\n } else {\n this.collection.trigger('update');\n this.dataTable.refresh();\n }\n\n if (markup.get('appliedCostCodeId') && markup.get('appliedCostTypeId')) {\n this.collection.trigger('appliedMarkupChanged', markup);\n }\n }\n });\n },\n deleteMarkupClicked: function (e) {\n let $target = $(e.currentTarget).closest('tr'),\n row = this.dataTable.getRow($target);\n\n this.deleteMarkup(row);\n },\n deleteMarkup: function (row) {\n let markup = row.data();\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this markup?\",\n onDelete: () => {\n markup.set('delete', true);\n this.dataTable.removeRow(row);\n this.collection.trigger('update', markup);\n _.each(this.collection.models, function (markupModel) {\n if (!markupModel.get('delete') && markupModel.get('sortOrder') > markup.get('sortOrder')) {\n markupModel.set('sortOrder', markupModel.get('sortOrder') - 1);\n }\n }, this);\n\n }\n });\n }\n});\n\nPJQ.financialMarkups.views.EditFinancialMarkupModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-edit-financial-markup'),\n maxWidth: 600,\n canVoid: false,\n autoVoid: false\n },\n events: {\n 'focus .input-percent': 'selectInput',\n 'click .btn-save': 'save',\n 'click .applied-markup': 'toggleAppliedMarkup'\n },\n beforeModalCreated: async function () {\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n this.isFetched = false;\n\n this.subJobs = await this.options.project.fetchSubJobs();\n this.costCodes = await this.options.project.fetchCostCodes();\n this.costTypes = await this.options.project.fetchCostTypes();\n\n this.isFetched = true;\n this.render();\n },\n renderData: function () {\n return {\n model: this.model,\n canEdit: this.options.canEdit,\n canVoid: this.options.canVoid,\n autoVoid: this.options.autoVoid\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input',\n 'textarea'\n ]\n });\n\n if (_.size(this.model.get('name')) === 0) {\n this.$('.input-name').focus();\n }\n\n this.costCodePicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-cost-codes'),\n defaultValue: this.model.get('costCodeIds') ? this.model.get('costCodeIds') : [],\n noneSelectedText: _.size(this.costCodes.models) > 0 ? 'Select Cost Codes (Optional)' : 'No Cost Codes exist on this project',\n isDisabled: _.size(this.costCodes.models) === 0,\n isMultiple: true,\n isIntChoices: true,\n isLiveSearch: true,\n onChange: _.bind(function (value) {\n value = _.size(value) > 0 ? value : null;\n this.model.set('costCodeIds', value);\n }, this)\n });\n this.populateCostCodePicker();\n\n this.costTypePicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-cost-types'),\n isLiveSearch: true,\n isIntChoices: true,\n isDisabled: _.size(this.costTypes.models) === 0,\n noneSelectedText: _.size(this.costCodes.models) > 0 ? 'Select Cost Types (Optional)' : 'No Cost Types exist',\n isMultiple: true,\n choices: _.map(this.costTypes.models, function (costType) {\n return {\n id: costType.id,\n name: costType.get('name')\n };\n }),\n defaultValue: this.model.get('costTypeIds') ? this.model.get('costTypeIds') : [],\n onChange: _.bind(function (value) {\n value = _.size(value) > 0 ? value : null;\n this.model.set('costTypeIds', value);\n }, this)\n });\n\n // Applied Sub Job Picker\n if (_.size(this.subJobs.models) > 0) {\n this.appliedSubJobPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-applied-subjob'),\n isLiveSearch: true,\n isIntChoices: true,\n noneSelectedText: \"Parent Job\",\n choices: _.union([{\n id: \"\",\n name: 'Parent Job'\n }], _.map(this.subJobs.models, function (subJob) {\n return {\n id: subJob.id,\n name: subJob.get('name')\n };\n })),\n defaultValue: this.model.get('appliedCostCodeId') ? _.find(this.costCodes.models, (costCode) => {\n return costCode.get('subJobId');\n }) : null,\n onChange: (value) => {\n this.model.set('appliedCostCodeId', null);\n this.model.set('appliedCostTypeId', null);\n\n let filteredCostCodes = _.filter(this.costCodes.models, (costCode) => {\n return costCode.get('subJobId') === value;\n });\n this.appliedCostCodePicker.updateChoices(_.map(filteredCostCodes, function (costCode) {\n return {\n id: costCode.id,\n name: costCode.get('name')\n };\n }));\n this.appliedCostCodePicker.setValue(null);\n this.appliedCostTypePicker.setValue(null);\n this.appliedCostTypePicker.disable();\n }\n });\n } else {\n this.$('.applied-subjob').addClass('hidden');\n }\n\n // Applied Cost Code Picker\n let filteredAppliedCostCodes = _.filter(this.costCodes.models, (costCode) => {\n let selectedAppliedSubJob = this.appliedSubJobPicker?.getValue() ?? null;\n return selectedAppliedSubJob ? costCode.get('subJobId') === selectedAppliedSubJob.get('id') : costCode.get('subJobId') == null;\n });\n this.appliedCostCodePicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-applied-cost-code'),\n isLiveSearch: true,\n isIntChoices: true,\n choices: _.map(filteredAppliedCostCodes, function (costCode) {\n return {\n id: costCode.id,\n name: costCode.getDisplayName()\n };\n }),\n defaultValue: this.model.get('appliedCostCodeId'),\n onChange: (value) => {\n this.model.set('appliedCostCodeId', value);\n this.model.set('appliedCostTypeId', null);\n\n let costCode = _.find(this.costCodes.models, (costCode) => {\n return costCode.id === value;\n }),\n filteredCostTypes = costCode.get('costTypeIds') != null ? _.filter(this.costTypes.models, (costType) => {\n return _.contains(costCode.get('costTypeIds'), costType.id);\n }) : this.costTypes.models;\n\n this.appliedCostTypePicker.updateChoices(_.map(filteredCostTypes, function (costType) {\n return {\n id: costType.id,\n name: costType.get('name')\n };\n }));\n this.appliedCostTypePicker.setValue(null);\n this.appliedCostTypePicker.enable();\n }\n });\n\n // Applied Cost Type Picker\n let appliedCostCode = _.find(this.costCodes.models, (costCode) => {\n return costCode.id === this.model.get('appliedCostCodeId');\n }),\n filteredAppliedCostTypes = appliedCostCode != null && appliedCostCode.get('costTypeIds') != null ? _.filter(this.costTypes.models, (costType) => {\n return _.contains(appliedCostCode.get('costTypeIds'), costType.id);\n }) : this.costTypes.models;\n this.appliedCostTypePicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-applied-cost-type'),\n isLiveSearch: true,\n isIntChoices: true,\n isDisabled: this.model.get('appliedCostCodeId') == null,\n choices: _.map(filteredAppliedCostTypes, function (costType) {\n return {\n id: costType.id,\n name: costType.get('name')\n };\n }),\n defaultValue: this.model.get('appliedCostTypeId'),\n onChange: (value) => {\n this.model.set('appliedCostTypeId', value);\n }\n });\n\n PJQ.helpers.inputHelpers.inputMaskPercent(this.$('.input-percent'), 2, true);\n this.toggleAppliedMarkup();\n },\n selectInput: function (e) {\n let el = $(e.currentTarget)[0];\n if (this.focusInput !== el) {\n this.focusInput = el;\n setTimeout(_.bind(function () {\n this.focusInput.select();\n }, this), 100);\n }\n },\n toggleAppliedMarkup: function () {\n let $checkbox = this.$('.applied-markup'),\n $appliedMarkupContainer = this.$('.applied-markup-container'),\n isChecked = $checkbox.is(':checked'),\n isVerticalCheckbox = this.$('.is-vertical');\n\n if (isChecked) {\n\n $appliedMarkupContainer.removeClass('hidden');\n this.model.set('isVertical', false);\n isVerticalCheckbox.prop('checked', false);\n isVerticalCheckbox.prop('disabled', true);\n } else {\n $appliedMarkupContainer.addClass('hidden');\n isVerticalCheckbox.prop('disabled', false);\n this.model.set('appliedCostCodeId', null);\n this.model.set('appliedCostTypeId', null);\n if (this.appliedSubJobPicker) {\n this.appliedSubJobPicker.setValue(null);\n }\n this.appliedCostCodePicker.setValue(null);\n this.appliedCostTypePicker.setValue(null);\n }\n },\n populateCostCodePicker: function () {\n // Group the cost codes by their Sub Job\n let groupedCostCodes = _.groupBy(this.costCodes.models, function (costCode) {\n return costCode.get('subJobId');\n });\n\n // Convert groupedCostCodes to the format that updateChoices expects\n let choices = _.map(groupedCostCodes, function (costCodes, subJobId) {\n let subJob = _.find(this.subJobs.models, function (subJob) {\n return subJob.id === parseInt(subJobId);\n }, this);\n return {\n name: subJob != null ? subJob.get('name') : 'No Sub Job',\n choices: _.map(costCodes, function (costCode) {\n return {\n id: costCode.id,\n name: costCode.get('name')\n };\n })\n };\n }, this);\n\n if (this.costCodePicker != null) {\n this.costCodePicker.updateChoices(choices);\n this.costCodePicker.setValue(this.model.get('costCodeIds') ? this.model.get('costCodeIds') : []);\n if (_.size(this.costCodes.models) > 0 && this.options.canEdit) {\n this.costCodePicker.enable();\n } else {\n this.costCodePicker.disable();\n }\n this.costCodePicker.render();\n }\n },\n validate: function () {\n let isValid = true,\n isAppliedMarkup = this.$('.applied-markup').is(':checked');\n\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-name'), true);\n if (this.model.get('name') == null || this.model.get('name').trim().length === 0) {\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-name'), false);\n isValid = false;\n }\n\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-percent'), true);\n if (this.model.get('percent') == null) {\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-percent'), false);\n isValid = false;\n }\n\n if (isAppliedMarkup) {\n PJQ.helpers.inputHelpers.setInputError(this.$('.select-applied-cost-code'), true);\n if (this.model.get('appliedCostCodeId') == null) {\n PJQ.helpers.inputHelpers.setInputError(this.$('.select-applied-cost-code'), false);\n isValid = false;\n }\n\n PJQ.helpers.inputHelpers.setInputError(this.$('.select-applied-cost-type'), true);\n if (this.model.get('appliedCostTypeId') == null) {\n PJQ.helpers.inputHelpers.setInputError(this.$('.select-applied-cost-type'), false);\n isValid = false;\n }\n }\n\n return isValid;\n },\n save: function () {\n if (!this.validate()) {\n return;\n }\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n this.removeModal();\n }\n }\n});","PJQ.views.budget.AddBudgetLineItemForecastModal = PJQ.views.BaseModal.extend({\n\tdefaults: {\n\t\ttemplate: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-add-forecast'),\n\t\tsubTemplates: {\n\t\t\tlineItems: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'add-forecast-line-item')\n\t\t},\n\t\tmaxWidth: 900,\n\t\tisShowCloseButton: true,\n\t\tonSave: _.noop,\n\t\tcanEdit: true,\n\t\tisAdmin: true\n\t},\n\tevents: {\n\t\t'keyup .input-quantity, .input-unit-price': 'calculateUnitTotal',\n\t\t'click .btn-add-line-item': 'addLineItem',\n\t\t'click .btn-delete-line-item': 'deleteLineItem',\n\t\t'click .btn-save': 'save',\n\t\t'click .btn-cancel': 'cancel',\n\t\t'click .btn-switch-method': 'switchMethod'\n\t},\n\tbeforeModalCreated: function () {\n\t\tthis.options.canEdit = PJQ.app.session.project.hasPermission('budget.canEdit');\n\t\tthis.options.isAdmin = PJQ.app.session.project.hasPermission('budget.isAdmin');\n\n\t\tthis.model.fetch({\n\t\t\tsuccess: _.bind(function(){\n\t\t\t\tPJQ.app.session.project.fetchCostTypes(_.bind(function (costTypes) {\n\t\t\t\t\tthis.costTypes = costTypes;\n\t\t\t\t\tPJQ.app.session.project.fetchUnitsOfMeasure(_.bind(function (unitsOfMeasure) {\n\t\t\t\t\t\tthis.unitsOfMeasure = unitsOfMeasure\n\t\t\t\t\t\tthis.collection = new PJQ.collections.budget.ForecastLineItems(this.model.get('forecastLineItems'));\n\t\t\t\t\t\tthis.render();\n\t\t\t\t\t}, this));\n\t\t\t\t}, this));\n\t\t\t}, this)\n\t\t})\n\n\t},\n\trenderData: function () {\n\t\treturn {\n\t\t\tcollection: this.collection,\n\t\t\tcostTypes: this.costTypes != null ? this.costTypes.models : [],\n\t\t\tunitsOfMeasure: this.unitsOfMeasure != null ? this.unitsOfMeasure.models : [],\n\t\t\taccountingMethod: this.accountingMethod,\n\t\t\tmodel: this.model,\n\t\t\tcanEdit: this.options.canEdit,\n\t\t\tisAdmin: this.options.isAdmin\n\t\t}\n\t},\n\tafterRender: function () {\n\t\tthis.unitOfMeasureSelector = new PJQ.inputs.Selectpicker({\n\t\t\tel: this.$('.select-unit-of-measure'),\n\t\t\tdefaultValue: this.unitsOfMeasure != null && _.size(this.unitsOfMeasure.models) > 0 ? this.unitsOfMeasure.models[0].id : null,\n\t\t\tonChange: _.bind(function (value) {\n\t\t\t\tthis.validateForm();\n\t\t\t}, this),\n\t\t\tisIntChoices: true,\n\t\t\thideDisabled: true\n\t\t});\n\n\t\tPJQ.helpers.inputHelpers.inputMaskCurrency(this.$('.input-dollars-full'), 2, true);\n\n\t\tthis.renderLineItems();\n\t},\n\tvalidateForm: function () {\n\t\tlet quantity = this.$('.input-quantity').val(),\n\t\t\tunitPrice = PJQ.helpers.inputHelpers.getMoneyInputValue(this.$('.input-unit-price')),\n\t\t\tvalid = quantity > 0 && unitPrice > 0;\n\t\tthis.$('.btn-add-line-item').prop('disabled', !valid);\n\t},\n\tcalculateUnitTotal: function () {\n\t\tlet quantity = parseInt(this.$('.input-quantity').val()),\n\t\t\tunitPrice = PJQ.helpers.formatHelpers.numbersOnly(this.$('.input-unit-price').val(), false, true);\n\t\tthis.$('.unit-total').html(PJQ.helpers.formatHelpers.formatCurrency(quantity * unitPrice));\n\t\tthis.validateForm();\n\t},\n\tsetAccountingMethod: function (method) {\n\t\tthis.accountingMethod = method;\n\n\t\tlet $manual = this.$('.method-manual'),\n\t\t\t$calculated = this.$('.method-calculated');\n\t\tif (this.accountingMethod === 0) {\n\t\t\t$manual.removeClass('hidden');\n\t\t\t$calculated.addClass('hidden');\n\t\t}\n\t\telse if (this.accountingMethod === 1) {\n\t\t\t$manual.addClass('hidden');\n\t\t\t$calculated.removeClass('hidden');\n\t\t}\n\t},\n\tresetAddForm: function () {\n\t\tthis.$('.input-budgeted-cost').val('');\n\t\tthis.$('.description').val('');\n\t\tthis.$('.input-unit-price').val('');\n\t\tthis.$('.input-quantity').val('');\n\t\tthis.validateForm();\n\t},\n\tdeleteLineItem: function (e) {\n\t\tlet $target = $(e.currentTarget).closest('.line-item'),\n\t\t\tcid = $target.data('cid'),\n\t\t\titem = this.collection.get(cid);\n\n\t\titem.set('delete', true);\n\t\t$target.closest('.line-item').remove();\n\t\tthis.calculateSubTotal();\n\t},\n\taddLineItem: function () {\n\t\tlet newLineItem = new PJQ.models.budget.ForecastLineItem({\n\t\t\tbudgetId: this.options.budget.id,\n\t\t\taccountingMethod: this.accountingMethod\n\t\t});\n\t\t\tlet quantity = this.$('.input-quantity').val(),\n\t\t\t\tunitPrice = PJQ.helpers.inputHelpers.getMoneyInputValue(this.$('.input-unit-price')),\n\t\t\t\tdescription = this.$('.description').val();\n\t\t\tnewLineItem.set({\n\t\t\t\tunitId: this.unitOfMeasureSelector.getValue(),\n\t\t\t\tquantity: _.size(quantity) > 0 ? parseInt(quantity) : 0,\n\t\t\t\tunitPrice: unitPrice != null ? unitPrice : 0,\n\t\t\t\tdescription: description\n\t\t\t})\n\n\t\tthis.$('.alert').prop('hidden', true);\n\t\tthis.model.set('forecastMethod', 1);\n\t\tthis.collection.add(newLineItem);\n\t\tthis.renderLineItems();\n\t\tthis.resetAddForm();\n\t},\n\trenderLineItems: function ($el, lineItem) {\n\t\tif(this.collection) {\n\t\t\tthis.$('.no-items').addClass('hidden');\n\t\t\tthis.renderSubTemplate(false, this.options.subTemplates.lineItems, this.$('.line-items'), {\n\t\t\t\tlineItems: this.collection.models,\n\t\t\t\tgroups: this.groups,\n\t\t\t\tcostTypes: this.costTypes,\n\t\t\t\tunitsOfMeasure: this.unitsOfMeasure\n\t\t\t}, _.bind(function (el) {\n\t\t\t}, this));\n\n\t\t\tthis.calculateSubTotal();\n\t\t}\n\t},\n\tcalculateSubTotal: function() {\n\t\tlet subtotal = 0;\n\t\t_.each(this.collection.models, function (item) {\n\t\t\tsubtotal += item.get('quantity') * item.get('unitPrice')\n\t\t}, this)\n\t\tthis.$('.subtotal').html(PJQ.helpers.formatHelpers.formatCurrency(subtotal));\n\t},\n\tswitchMethod: function() {\n\t\tif(this.model.get('forecastMethod') === 1) {\n\t\t\tnew PJQ.views.modals.YesNo({\n\t\t\t\theader: \"Set to Automatic Calculation?\",\n\t\t\t\tbody: \"Forecast to Complete will no longer be manually calculated, however any existing line items will still be saved. Would you like to continue?\",\n\t\t\t\tonYes: _.bind(function () {\n\t\t\t\t\tthis.model.set('forecastMethod', 0);\n\t\t\t\t\tthis.render();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t\telse{\n\t\t\tnew PJQ.views.modals.YesNo({\n\t\t\t\theader: \"Switch to Manual Calculation?\",\n\t\t\t\tbody: \"Forecast to Complete will no longer be automatically calculated. Would you like to continue?\",\n\t\t\t\tonYes: _.bind(function () {\n\t\t\t\t\tthis.model.set('forecastMethod', 1);\n\t\t\t\t\tthis.render();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t},\n\tsave: function () {\n\t\tthis.model.set('forecastLineItems', this.collection.toJSON());\n\n\t\tnew PJQ.ajax.Request({\n\t\t\tendpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'budgets',\n\t\t\t\t\tvalue: this.options.budget.id\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'lineitems',\n\t\t\t\t\tvalue: this.model.id\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tendpoint: 'forecast'\n\t\t\t\t}\n\t\t\t]),\n\t\t\tisAPIv2: true,\n\t\t\tdata: this.model\n\t\t}).put().done(_.bind(function (data) {\n\t\t\tPJQ.notifications.notify.successNotify({\n\t\t\t\tmessage: 'Forecast Successfully Changed'\n\t\t\t});\n\t\t\tif(typeof this.options.onSave === 'function'){\n\t\t\t\tthis.options.onSave(false);\n\t\t\t}\n\t\t\tthis.removeModal();\n\t\t}, this)).fail(function() {\n\t\t\tPJQ.notifications.notify.errorNotify({\n\t\t\t\tmessage: 'Failed to modify Forecast'\n\t\t\t});\n\t\t\tif(typeof this.options.onSave === 'function'){\n\t\t\t\tthis.options.onSave(false);\n\t\t\t}\n\t\t});\n\t},\n\tcancel: function () {\n\t\tif(this.model.hasChanged()){\n\t\t\tnew PJQ.views.modals.SaveDontSave({\n\t\t\t\theader: \"Unsaved Changes\",\n\t\t\t\tbody: \"Do you want to save changes?\",\n\t\t\t\tonSave: _.bind(function () {\n\t\t\t\t\tthis.save();\n\t\t\t\t}, this),\n\t\t\t\tonDontSave: _.bind(function () {\n\t\t\t\t\tthis.model.restore();\n\t\t\t\t\tthis.removeModal();\n\t\t\t\t}, this)\n\t\t\t});\n\t\t}\n\t\telse{\n\t\t\tthis.removeModal();\n\t\t}\n\t}\n});\n","PJQ.integrations = {\n views: {},\n models: {},\n collections: {}\n}\n\nPJQ.modules.budget = {\n routes: [\n {\n route: \"budget\",\n name: 'budget',\n callback: function () {\n PJQ.app.initNavigator({\n activeItem: \"budget\"\n });\n }\n },\n {\n route: 'projects/:projectId/budget',\n name: 'budget',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"budget\");\n }\n },\n {\n route: 'projects/:projectId/costcodes',\n name: 'budget',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"costcodes\");\n }\n },\n {\n route: 'projects/:projectId/subjobs',\n name: 'budget',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"subjobs\");\n }\n }\n ]\n};\n\nPJQ.app.addRoutes(PJQ.modules.budget.routes);\n","PJQ.constants.integrations = {\n settings: {\n SYNC_PROJECTS: 'syncProjects',\n SYNC_VENDORS: 'syncVendors',\n SYNC_SUB_JOBS: 'syncSubJobs',\n SYNC_BUDGET: 'syncBudget',\n SYNC_DIRECT_COSTS: 'syncDirectCosts',\n SYNC_COMMITMENTS: 'syncCommitments',\n SYNC_COMMITMENT_CHANGE_ORDERS: 'syncCommitmentChangeOrders',\n SYNC_PRIME_CONTRACTS: 'syncPrimeContracts',\n SYNC_PRIME_CONTRACT_CHANGE_ORDERS: 'syncPrimeContractChangeOrders',\n SYNC_PAYABLE_INVOICES: 'syncPayableInvoices',\n SYNC_RECEIVABLE_INVOICES: 'syncReceivableInvoices'\n },\n actions: {\n CAN_ADD_MARKUPS_AFTER_SYNC: 'CAN_ADD_MARKUPS_AFTER_SYNC',\n PUSH_VENDORS: 'PUSH_VENDORS',\n UNLINK_VENDOR: 'UNLINK_VENDOR',\n PUSH_PROJECT: 'PUSH_PROJECT',\n LINK_PROJECT: 'LINK_PROJECT',\n UNLINK_PROJECT: 'UNLINK_PROJECT',\n PROJECT_SPECIFIC_COST_CODES: 'PROJECT_SPECIFIC_COST_CODES',\n PUSH_SUB_JOBS: 'PUSH_SUB_JOBS',\n PULL_SUB_JOBS: 'PULL_SUB_JOBS',\n PUSH_COMPANY_COST_CODES: 'PUSH_COMPANY_COST_CODES',\n PULL_COMPANY_COST_CODES: 'PULL_COMPANY_COST_CODES',\n PUSH_PROJECT_COST_CODES: 'PUSH_PROJECT_COST_CODES',\n PULL_PROJECT_COST_CODES: 'PULL_PROJECT_COST_CODES',\n PUSH_COMPANY_TAX_CODES: 'PUSH_COMPANY_TAX_CODES',\n PULL_COMPANY_TAX_CODES: 'PULL_COMPANY_TAX_CODES',\n PUSH_COST_TYPES: 'PUSH_COST_TYPES',\n PULL_COST_TYPES: 'PULL_COST_TYPES',\n PUSH_BUDGET: 'PUSH_BUDGET',\n PULL_BUDGET: 'PULL_BUDGET',\n PUSH_COMMITMENTS: 'PUSH_COMMITMENTS',\n PUSH_COMMITMENTS_WITH_VENDOR: 'PUSH_COMMITMENTS_WITH_VENDOR',\n PULL_COMMITMENTS: 'PULL_COMMITMENTS',\n PULL_COMMITMENTS_DOC_CLERK_REQUIRED: 'PULL_COMMITMENTS_DOC_CLERK_REQUIRED',\n UNLINK_COMMITMENTS: 'UNLINK_COMMITMENTS',\n PUSH_COMMITMENT_CHANGE_ORDERS: 'PUSH_COMMITMENT_CHANGE_ORDERS',\n PULL_COMMITMENT_CHANGE_ORDERS: 'PULL_COMMITMENT_CHANGE_ORDERS',\n COMMITMENT_CO_SOV_FILTER_TO_COMMITMENT_SOV: 'COMMITMENT_CO_SOV_FILTER_TO_COMMITMENT_SOV',\n UNLINK_COMMITMENT_CHANGE_ORDERS: 'UNLINK_COMMITMENT_CHANGE_ORDERS',\n PUSH_CHANGE_REQUESTS: 'PUSH_CHANGE_REQUESTS',\n PUSH_PRIME_CONTRACTS: 'PUSH_PRIME_CONTRACTS',\n PUSH_PRIME_CONTRACTS_WITH_CLIENT: 'PUSH_PRIME_CONTRACTS_WITH_CLIENT',\n PULL_PRIME_CONTRACTS: 'PULL_PRIME_CONTRACTS',\n PRIME_CONTRACT_SOV_BUDGET_CODE_NOT_REQUIRED: 'PRIME_CONTRACT_SOV_BUDGET_CODE_NOT_REQUIRED',\n UNLINK_PRIME_CONTRACTS: 'UNLINK_PRIME_CONTRACTS',\n PUSH_PRIME_CONTRACT_CHANGE_ORDERS: 'PUSH_PRIME_CONTRACT_CHANGE_ORDERS',\n PUSH_CONTRACT_CO_WITHOUT_PRIME_CONTRACT: 'PUSH_CONTRACT_CO_WITHOUT_PRIME_CONTRACT',\n PRIME_CONTRACT_CO_SOV_REQUIRE_LINKED_CONTRACT_CO: 'PRIME_CONTRACT_CO_SOV_REQUIRE_LINKED_CONTRACT_CO',\n PRIME_CONTRACT_CO_SOV_BUDGET_CODE_NOT_REQUIRED: 'PRIME_CONTRACT_CO_SOV_BUDGET_CODE_NOT_REQUIRED',\n UNLINK_PRIME_CONTRACT_CHANGE_ORDERS: 'UNLINK_PRIME_CONTRACT_CHANGE_ORDERS',\n PUSH_DIRECT_COSTS: 'PUSH_DIRECT_COSTS',\n PULL_DIRECT_COSTS: 'PULL_DIRECT_COSTS',\n UNLINK_DIRECT_COSTS: 'UNLINK_DIRECT_COSTS',\n PUSH_PAYABLE_INVOICES: 'PUSH_PAYABLE_INVOICES',\n PUSH_PAYABLE_INVOICES_WO_SYNCED_COMMMITMENT: 'PUSH_PAYABLE_INVOICES_WO_SYNCED_COMMMITMENT',\n PULL_PAYABLE_INVOICES: 'PULL_PAYABLE_INVOICES',\n PULL_RECEIVABLE_PAYMENTS: 'PULL_RECEIVABLE_PAYMENTS',\n PULL_PAYABLE_PAYMENTS: 'PULL_PAYABLE_PAYMENTS',\n UNLINK_PAYABLE_INVOICES: 'UNLINK_PAYABLE_INVOICES',\n REQUIRE_SYNCED_COST_TYPES: 'REQUIRE_SYNCED_COST_TYPES',\n REQUIRE_SYNCED_COST_CODES: 'REQUIRE_SYNCED_COST_CODES',\n PUSH_RECEIVABLE_INVOICES: 'PUSH_RECEIVABLE_INVOICES',\n PUSH_RECEIVABLE_INVOICES_WO_SYNCED_CONTRACT: 'PUSH_RECEIVABLE_INVOICES_WO_SYNCED_CONTRACT',\n PULL_RECEIVABLE_INVOICES: 'PULL_RECEIVABLE_INVOICES',\n UNLINK_RECEIVABLE_INVOICES: 'UNLINK_RECEIVABLE_INVOICES',\n CREATE_TAX_CODES: 'CREATE_TAX_CODES',\n DISABLE_EDIT_COST_CODE_TYPE_FILTER: 'DISABLE_EDIT_COST_CODE_TYPE_FILTER',\n RELATE_CCO_LINE_TO_COMMITMENT_LINE: 'RELATE_CCO_LINE_TO_COMMITMENT_LINE',\n },\n providers: {\n ACUMATICA: {\n logoURL: '/assets/modules2/global/images/acumatica.png',\n name: 'ACUMATICA',\n shortName: 'Acumatica',\n displayName: 'Acumatica Cloud ERP',\n description: 'Integrate Acumatica Cloud ERP to work with your job costing tools',\n supportedVersions: [\n '24.200.001',\n '23.200.001',\n '22.200.001',\n ],\n availableActions: [\n 'PUSH_VENDORS',\n 'UNLINK_VENDOR',\n 'PUSH_PROJECT',\n 'LINK_PROJECT',\n 'UNLINK_PROJECT',\n 'PULL_COMPANY_COST_CODES',\n 'PULL_PROJECT_COST_CODES',\n 'PUSH_SUB_JOBS',\n 'PULL_SUB_JOBS',\n 'PUSH_BUDGET',\n 'PULL_BUDGET',\n 'PUSH_PRIME_CONTRACTS',\n 'PUSH_PRIME_CONTRACTS_WITH_CLIENT',\n 'UNLINK_PRIME_CONTRACTS',\n 'PUSH_PRIME_CONTRACT_CHANGE_ORDERS',\n 'UNLINK_PRIME_CONTRACT_CHANGE_ORDERS',\n 'PULL_DIRECT_COSTS',\n 'UNLINK_DIRECT_COSTS',\n 'PUSH_COMMITMENTS',\n 'UNLINK_COMMITMENTS',\n 'PUSH_COMMITMENT_CHANGE_ORDERS',\n 'UNLINK_COMMITMENT_CHANGE_ORDERS',\n 'PUSH_PAYABLE_INVOICES',\n 'UNLINK_PAYABLE_INVOICES',\n 'CREATE_TAX_CODES',\n 'PRIME_CONTRACT_SOV_BUDGET_CODE_NOT_REQUIRED',\n 'PRIME_CONTRACT_CO_SOV_BUDGET_CODE_NOT_REQUIRED',\n 'PUSH_CONTRACT_CO_WITHOUT_PRIME_CONTRACT',\n 'PUSH_RECEIVABLE_INVOICES',\n 'UNLINK_RECEIVABLE_INVOICES',\n 'RELATE_CCO_LINE_TO_COMMITMENT_LINE'\n ],\n options: {\n linkProjectAlert: 'Linking to existing Jobs within Acumatica that have existing transactions is not supported. This may cause discrepancies in your Job Costing data.'\n },\n budgetColumns: [\n {\n name: 'Revised Budgeted Amount',\n source: 'erp:rev_b_amt',\n canCalculate: true,\n format: 'money',\n isErp: true\n },\n {\n name: 'Revised Budgeted Quantity',\n source: 'erp:rev_b_qty',\n canCalculate: true,\n format: 'decimal',\n isErp: true\n },\n {\n name: 'Budgeted CO Amount',\n source: 'erp:b_co_amt',\n canCalculate: true,\n format: 'money',\n isErp: true\n },\n {\n name: 'Budgeted CO Quantity',\n source: 'erp:b_co_qty',\n canCalculate: true,\n format: 'decimal',\n isErp: true\n },\n {\n name: 'Pending Invoice Amount',\n source: 'erp:pnd_inv_amt',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Committed Invoiced Amount',\n source: 'erp:cm_inv_amt',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Actual Amount',\n source: 'erp:act_amt',\n canCalculate: true,\n format: 'money'\n },\n ],\n erpAdmin: {\n features: {\n project: {\n internalModelName: 'project',\n externalModelName: 'project',\n displayName: \"Projects\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Project ID',\n value: 'projectID',\n required: true,\n className: 'input-project-id'\n }\n ]\n },\n subjob: {\n internalModelName: 'subjob',\n externalModelName: 'subjob',\n displayName: \"Sub Jobs\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n }\n },\n cont_comp: {\n internalModelName: 'cont_comp',\n externalModelName: 'vendor',\n displayName: \"Vendors\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Vendor ID',\n value: 'externalNumber',\n required: true,\n format: '#{0,10}',\n className: 'input-vendor-number'\n }\n ]\n },\n costcode: {\n internalModelName: 'costcode',\n externalModelName: 'costcode',\n displayName: \"Cost Codes\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n }\n },\n budget: {\n internalModelName: 'budget',\n displayName: \"Budget\",\n externalModelName: 'costbudget',\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n contract: {\n internalModelName: 'contract',\n externalModelName: 'contract',\n displayName: \"Contracts\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n pcco: {\n internalModelName: 'pcco',\n externalModelName: 'pcco',\n displayName: \"Contract Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n }\n },\n ar_inv: {\n internalModelName: 'ar_inv',\n externalModelName: 'ar_inv',\n displayName: \"Receivable Invoices\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n commitment: {\n internalModelName: 'commitment',\n externalModelName: 'commitment',\n displayName: \"Commitments\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n cco: {\n internalModelName: 'cco',\n externalModelName: 'co_commitment',\n displayName: \"Commitment Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n ap_inv: {\n internalModelName: 'ap_inv',\n externalModelName: 'ap_inv',\n displayName: \"Payable Invoices\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n }\n }\n }\n },\n QBO: {\n logoURL: '/assets/modules2/global/images/QBO_logo.svg',\n buttonClass: 'btn-qbo-connect',\n name: 'QBO',\n shortName: 'QuickBooks',\n buttonText: 'Connect to QuickBooks',\n displayName: 'QuickBooks Online',\n description: 'Integrate QuickBooks Online to work with your job costing tools',\n availableActions: [\n 'UNLINK_PROJECT',\n 'PUSH_VENDORS',\n 'PROJECT_SPECIFIC_COST_CODES',\n 'PUSH_COMPANY_COST_CODES',\n 'PUSH_PROJECT_COST_CODES',\n 'PUSH_COST_TYPES',\n 'PULL_COST_TYPES',\n 'PUSH_COMMITMENTS',\n 'PUSH_COMMITMENTS_WITH_VENDOR',\n 'UNLINK_COMMITMENTS',\n 'PUSH_COMMITMENT_CHANGE_ORDERS',\n 'UNLINK_COMMITMENT_CHANGE_ORDERS',\n 'PUSH_PRIME_CONTRACTS',\n 'PUSH_PRIME_CONTRACTS_WITH_CLIENT',\n 'UNLINK_PRIME_CONTRACTS',\n 'PUSH_PRIME_CONTRACT_CHANGE_ORDERS',\n 'UNLINK_PRIME_CONTRACT_CHANGE_ORDERS',\n 'PULL_BUDGET',\n 'PULL_DIRECT_COSTS',\n 'PUSH_DIRECT_COSTS',\n 'UNLINK_DIRECT_COSTS',\n 'PUSH_PAYABLE_INVOICES',\n 'PUSH_PAYABLE_INVOICES_WO_SYNCED_COMMMITMENT',\n 'UNLINK_PAYABLE_INVOICES',\n 'PUSH_RECEIVABLE_INVOICES',\n 'PUSH_RECEIVABLE_INVOICES_WO_SYNCED_CONTRACT',\n 'UNLINK_RECEIVABLE_INVOICES',\n 'PULL_COMPANY_TAX_CODES',\n 'LINK_PROJECT'\n ],\n options: {\n linkProjectAlert: 'QuickBooks Online limits 3rd party visibility to the last 30 days of expenses. It is strongly recommended that you do not link to a project which has expenses older than this to avoid inconsistencies.'\n },\n erpAdmin: {\n features: {\n project: {\n internalModelName: 'project',\n externalModelName: 'project',\n displayName: \"Projects\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: []\n },\n cont_comp: {\n internalModelName: 'cont_comp',\n externalModelName: 'vendor',\n displayName: \"Vendors\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: []\n },\n contract: {\n internalModelName: 'contract',\n externalModelName: 'contract',\n displayName: \"Contracts\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n pcco: {\n internalModelName: 'pcco',\n externalModelName: 'pcco',\n displayName: \"Contract Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n ar_inv: {\n internalModelName: 'ar_inv',\n externalModelName: 'ar_inv',\n displayName: \"Receivable Invoices\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n commitment: {\n internalModelName: 'commitment',\n externalModelName: 'commitment',\n displayName: \"Commitments\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n cco: {\n internalModelName: 'cco',\n externalModelName: 'cco',\n displayName: \"Commitment Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n ap_inv: {\n internalModelName: 'ap_inv',\n externalModelName: 'ap_inv',\n displayName: \"Payable Invoices\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n d_cost: {\n internalModelName: 'd_cost',\n externalModelName: 'd_cost',\n displayName: \"Direct Costs\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n }\n }\n }\n },\n SAGE100: {\n logoURL: '/assets/modules2/global/images/sage100.png',\n name: 'SAGE100',\n shortName: 'Sage 100',\n displayName: 'Sage 100 Contractor',\n description: 'Integrate Sage 100 Contractor to work with your job costing tools',\n availableActions: [\n 'PUSH_VENDORS',\n 'PUSH_PROJECT',\n 'PULL_COMPANY_COST_CODES',\n 'PUSH_PROJECT_COST_CODES',\n 'PULL_PROJECT_COST_CODES',\n 'PULL_COMPANY_TAX_CODES',\n 'PULL_SUB_JOBS',\n 'PUSH_BUDGET',\n 'PULL_BUDGET',\n 'PUSH_COMMITMENTS',\n 'PUSH_COMMITMENT_CHANGE_ORDERS',\n 'PULL_DIRECT_COSTS',\n 'PUSH_PAYABLE_INVOICES',\n 'REQUIRE_SYNCED_COST_TYPES',\n 'PRIME_CONTRACT_SOV_BUDGET_CODE_NOT_REQUIRED',\n 'PULL_PRIME_CONTRACTS',\n 'PUSH_PRIME_CONTRACT_CHANGE_ORDERS',\n 'PRIME_CONTRACT_CO_SOV_REQUIRE_LINKED_CONTRACT_CO',\n ],\n erpAdmin: {\n features: {\n project: {\n internalModelName: 'project',\n externalModelName: 'job',\n displayName: \"Jobs\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '9{0,8}',\n className: 'input-project-code'\n }\n ]\n\n },\n cont_comp: {\n internalModelName: 'cont_comp',\n externalModelName: 'vendor',\n displayName: \"Vendors\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '9{0,10}',\n className: 'input-vendor-number'\n }\n ]\n },\n costcode: {\n internalModelName: 'costcode',\n externalModelName: 'costcode',\n displayName: \"Cost Codes\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n }\n },\n budget: {\n internalModelName: 'budget',\n displayName: \"Budget\",\n externalModelName: 'estimate',\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n commitment: {\n internalModelName: 'commitment',\n externalModelName: 'commitment',\n displayName: \"Commitments\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n // format: '99999',\n format: '#{0,20}',\n className: 'input-commitment-number'\n }\n ]\n },\n cco: {\n internalModelName: 'cco',\n externalModelName: 'cco',\n displayName: \"Commitment Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n // format: '9999',\n format: '#{0,20}',\n required: true,\n className: 'input-cco-number'\n }\n ]\n },\n ap_inv: {\n internalModelName: 'ap_inv',\n externalModelName: 'ap_inv',\n displayName: \"Payable Invoices\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '*{0,5}',\n className: 'input-payable-invoice-number'\n },\n {\n type: 'date',\n name: 'Approval Date',\n value: 'approvalDate',\n required: false,\n className: 'input-payable-invoice-approval-date'\n }\n ]\n },\n pcco: {\n internalModelName: 'pcco',\n externalModelName: 'pcco',\n displayName: \"Contract Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '9999',\n className: 'input-pcco-number'\n }\n ]\n },\n }\n }\n },\n SAGE300: {\n logoURL: '/assets/modules2/global/images/sage300.png',\n name: 'SAGE300',\n shortName: 'Sage 300',\n displayName: 'Sage 300',\n description: 'Integrate Sage 300 CRE to work with your job costing tools',\n availableActions: [\n 'PUSH_VENDORS',\n 'PUSH_PROJECT',\n 'LINK_PROJECT',\n 'PULL_COMPANY_COST_CODES',\n 'PUSH_PROJECT_COST_CODES',\n 'PULL_PROJECT_COST_CODES',\n 'PULL_COST_TYPES',\n 'PULL_COMPANY_TAX_CODES',\n 'PUSH_SUB_JOBS',\n 'PULL_SUB_JOBS',\n 'PUSH_BUDGET',\n 'PULL_BUDGET',\n 'PUSH_COMMITMENTS',\n 'PULL_COMMITMENTS',\n 'PULL_COMMITMENTS_DOC_CLERK_REQUIRED',\n 'PUSH_COMMITMENT_CHANGE_ORDERS',\n 'PULL_PRIME_CONTRACTS',\n 'PUSH_PRIME_CONTRACT_CHANGE_ORDERS',\n 'PULL_DIRECT_COSTS',\n 'PUSH_PAYABLE_INVOICES',\n 'REQUIRE_SYNCED_COST_TYPES',\n 'CAN_ADD_MARKUPS_AFTER_SYNC',\n 'PRIME_CONTRACT_SOV_BUDGET_CODE_NOT_REQUIRED',\n 'PRIME_CONTRACT_CO_SOV_REQUIRE_LINKED_CONTRACT_CO',\n 'PRIME_CONTRACT_CO_SOV_BUDGET_CODE_NOT_REQUIRED',\n // 'COMMITMENT_CO_SOV_FILTER_TO_COMMITMENT_SOV'\n ],\n options: {\n linkProjectAlert: 'Linking to existing Jobs within Sage 300 that have existing Job Costs transactions is not supported. This may cause discrepancies in your Job Costing data.'\n },\n budgetColumns: [\n {\n name: 'Original Commitment',\n source: 'erp:originalCommitment',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Approved Commitment Changes',\n source: 'erp:approvedCommitmentChanges',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Revised Commitment',\n source: 'erp:revisedCommitment',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Commitment Invoiced',\n source: 'erp:commitmentInvoiced',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Job to Date Cost',\n source: 'erp:jobToDateCost',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Job to Date Units',\n source: 'erp:jobToDateUnits',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Job to Date Dollars Paid',\n source: 'erp:jobToDateDollarsPaid',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Month to Date Cost',\n source: 'erp:monthToDateCost',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Month to Date Units',\n source: 'erp:monthToDateUnits',\n canCalculate: true,\n format: 'money'\n },\n {\n name: 'Month to Date Dollars Paid',\n source: 'erp:monthToDateDollarsPaid',\n canCalculate: true,\n format: 'money'\n }\n ],\n erpAdmin: {\n features: {\n project: {\n internalModelName: 'project',\n externalModelName: 'job',\n displayName: \"Jobs\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '99-999',\n className: 'input-project-code'\n }\n ]\n\n },\n subjob: {\n internalModelName: 'subjob',\n externalModelName: 'subjob',\n displayName: \"Sub Jobs\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '99999',\n className: 'input-subjob-number'\n }\n ]\n },\n cont_comp: {\n internalModelName: 'cont_comp',\n externalModelName: 'vendor',\n displayName: \"Vendors\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '#{0,10}',\n className: 'input-vendor-number'\n }\n ]\n },\n costcode: {\n internalModelName: 'costcode',\n externalModelName: 'costcode',\n displayName: \"Cost Codes\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n }\n },\n budget: {\n internalModelName: 'budget',\n displayName: \"Budget\",\n externalModelName: 'estimate',\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n pcco: {\n internalModelName: 'pcco',\n externalModelName: 'pcco',\n displayName: \"Contract Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '9999',\n className: 'input-pcco-number'\n }\n ]\n },\n commitment: {\n internalModelName: 'commitment',\n externalModelName: 'commitment',\n displayName: \"Commitments\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n className: 'input-commitment-number'\n }\n ]\n },\n cco: {\n internalModelName: 'cco',\n externalModelName: 'cco',\n displayName: \"Commitment Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n format: '9999',\n required: true,\n className: 'input-cco-number'\n }\n ]\n },\n ap_inv: {\n internalModelName: 'ap_inv',\n externalModelName: 'ap_inv',\n displayName: \"Payable Invoices\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: true,\n format: '*{0,5}',\n className: 'input-payable-invoice-number'\n },\n {\n type: 'date',\n name: 'Approval Date',\n value: 'approvalDate',\n required: false,\n className: 'input-payable-invoice-approval-date'\n }\n ]\n },\n }\n }\n },\n INTACCT: {\n logoURL: '/assets/modules2/global/images/sageintacct.png',\n name: 'INTACCT',\n shortName: 'Sage Intacct',\n displayName: 'Sage Intacct',\n description: 'Integrate Sage Intacct CRE to work with your job costing tools',\n availableActions: [\n 'PUSH_VENDORS',\n 'UNLINK_VENDOR',\n 'PUSH_PROJECT',\n 'UNLINK_PROJECT',\n 'PULL_COMPANY_COST_CODES',\n 'PULL_PROJECT_COST_CODES',\n 'PUSH_PROJECT_COST_CODES',\n 'PUSH_SUB_JOBS',\n 'PULL_SUB_JOBS',\n 'PUSH_BUDGET',\n 'PULL_BUDGET',\n 'PUSH_COMMITMENTS',\n 'PUSH_COMMITMENT_CHANGE_ORDERS',\n 'PULL_PRIME_CONTRACTS',\n 'PRIME_CONTRACT_SOV_BUDGET_CODE_NOT_REQUIRED',\n 'PRIME_CONTRACT_CO_SOV_BUDGET_CODE_NOT_REQUIRED',\n 'PRIME_CONTRACT_CO_SOV_REQUIRE_LINKED_CONTRACT_CO',\n 'PUSH_PRIME_CONTRACT_CHANGE_ORDERS',\n 'PUSH_PAYABLE_INVOICES',\n 'PULL_PAYABLE_PAYMENTS',\n 'UNLINK_PRIME_CONTRACTS',\n 'UNLINK_PRIME_CONTRACT_CHANGE_ORDERS',\n 'UNLINK_COMMITMENT_CHANGE_ORDERS',\n 'UNLINK_PAYABLE_INVOICES',\n 'UNLINK_COMMITMENTS',\n 'DISABLE_EDIT_COST_CODE_TYPE_FILTER',\n 'PULL_DIRECT_COSTS'\n ],\n budgetColumns: [],\n erpAdmin: {\n features: {\n project: {\n internalModelName: 'project',\n externalModelName: 'project',\n displayName: \"Projects\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Project ID',\n value: 'id',\n required: true,\n format: '#{0,20}',\n className: 'input-project-code'\n }\n ]\n\n },\n subjob: {\n internalModelName: 'subjob',\n externalModelName: 'subjob',\n displayName: \"Sub Jobs\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n },\n cont_comp: {\n internalModelName: 'cont_comp',\n externalModelName: 'vendor',\n displayName: \"Vendors\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Code',\n value: 'code',\n required: false,\n format: '#{0,10}',\n className: 'input-vendor-number'\n }\n ]\n },\n costcode: {\n internalModelName: 'costcode',\n externalModelName: 'costcode',\n displayName: \"Cost Codes\",\n filters: {\n readyToImport: {\n displayName: 'Ready to Import',\n name: 'readyToImport',\n },\n archived: {\n displayName: 'Archived',\n name: 'archived'\n }\n }\n },\n budget: {\n internalModelName: 'budget',\n displayName: \"Budget\",\n externalModelName: 'estimate',\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n pcco: {\n internalModelName: 'pcco',\n externalModelName: 'pcco',\n displayName: \"Contract Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: [\n {\n type: 'input',\n name: 'Project Change Order ID',\n value: 'projectChangeOrderId',\n required: true,\n format: '#{0,20}',\n className: 'input-pcco-number'\n }\n ]\n },\n commitment: {\n internalModelName: 'commitment',\n externalModelName: 'commitment',\n displayName: \"Commitments\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n cco: {\n internalModelName: 'cco',\n externalModelName: 'cco',\n displayName: \"Commitment Change Orders\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n },\n ap_inv: {\n internalModelName: 'ap_inv',\n externalModelName: 'ap_inv',\n displayName: \"Payable Invoices\",\n filters: {\n readyToExport: {\n displayName: 'Ready to Export',\n name: 'readyToExport',\n statuses: [1]\n },\n failedToExport: {\n displayName: 'Failed to Export',\n name: 'failedToExport',\n statuses: [5]\n }\n },\n approvalInputs: []\n }\n }\n }\n },\n // VIEWPOINT_VISTA: {\n // logoURL: '/assets/modules2/global/images/viewpoint_vista.png',\n // name: 'VIEWPOINT_VISTA',\n // displayName: 'Viewpoint Vista',\n // description: 'Integrate Viewpoint Vista to work with your job costing tools',\n // isAgave: true,\n // agaveSourceSystem: 'vista-hosted',\n // availableActions: [\n // 'PUSH_VENDORS',\n // 'PUSH_PROJECT',\n // 'PULL_COMPANY_COST_CODES',\n // 'PUSH_PROJECT_COST_CODES',\n // 'PULL_PROJECT_COST_CODES',\n // 'PULL_COMPANY_TAX_CODES',\n // 'PUSH_SUB_JOBS',\n // 'PULL_SUB_JOBS',\n // 'PUSH_BUDGET',\n // 'PULL_BUDGET',\n // 'PUSH_COMMITMENTS',\n // 'PUSH_COMMITMENT_CHANGE_ORDERS',\n // 'PULL_PRIME_CONTRACTS',\n // 'PUSH_PRIME_CONTRACT_CHANGE_ORDERS',\n // 'PULL_DIRECT_COSTS',\n // 'PUSH_PAYABLE_INVOICES',\n // 'REQUIRE_SYNCED_COST_TYPES',\n // 'PRIME_CONTRACT_CO_SOV_REQUIRE_LINKED_CONTRACT_CO',\n // 'COMMITMENT_CO_SOV_FILTER_TO_COMMITMENT_SOV'\n // ],\n // erpAdmin: {\n // features: {\n // project: {\n // internalModelName: 'project',\n // externalModelName: 'job',\n // refreshType: 'projects',\n // displayName: \"Jobs\",\n // filters: {\n // readyToImport: {\n // displayName: 'Ready to Import',\n // name: 'readyToImport',\n // },\n // readyToExport: {\n // displayName: 'Ready to Export',\n // name: 'readyToExport',\n // statuses: [1]\n // },\n // failedToExport: {\n // displayName: 'Failed to Export',\n // name: 'failedToExport',\n // statuses: [5]\n // }\n // },\n // approvalInputs: [\n // {\n // type: 'input',\n // name: 'Code',\n // value: 'code',\n // required: true,\n // format: '99-999',\n // className: 'input-project-code'\n // }\n // ]\n //\n // },\n // cont_comp: {\n // internalModelName: 'cont_comp',\n // externalModelName: 'vendor',\n // refreshType: 'vendors',\n // displayName: \"Vendors\",\n // filters: {\n // readyToImport: {\n // displayName: 'Ready to Import',\n // name: 'readyToImport',\n // },\n // readyToExport: {\n // displayName: 'Ready to Export',\n // name: 'readyToExport',\n // statuses: [1]\n // },\n // failedToExport: {\n // displayName: 'Failed to Export',\n // name: 'failedToExport',\n // statuses: [5]\n // }\n // },\n // approvalInputs: [\n // {\n // type: 'input',\n // name: 'Code',\n // value: 'code',\n // required: true,\n // format: '#{0,10}',\n // className: 'input-vendor-number'\n // }\n // ]\n // },\n // budget: {\n // internalModelName: 'budget',\n // displayName: \"Budget\",\n // externalModelName: 'estimate',\n // filters: {\n // readyToExport: {\n // displayName: 'Ready to Export',\n // name: 'readyToExport',\n // statuses: [1]\n // },\n // failedToExport: {\n // displayName: 'Failed to Export',\n // name: 'failedToExport',\n // statuses: [5]\n // }\n // },\n // approvalInputs: []\n // },\n // commitment: {\n // internalModelName: 'commitment',\n // externalModelName: 'commitment',\n // displayName: \"Commitments\",\n // filters: {\n // readyToExport: {\n // displayName: 'Ready to Export',\n // name: 'readyToExport',\n // statuses: [1]\n // },\n // failedToExport: {\n // displayName: 'Failed to Export',\n // name: 'failedToExport',\n // statuses: [5]\n // }\n // },\n // approvalInputs: [\n // {\n // type: 'input',\n // name: 'Code',\n // value: 'code',\n // required: true,\n // format: '99999',\n // className: 'input-commitment-number'\n // }\n // ]\n // },\n // cco: {\n // internalModelName: 'cco',\n // externalModelName: 'cco',\n // displayName: \"Commitment Change Orders\",\n // filters: {\n // readyToExport: {\n // displayName: 'Ready to Export',\n // name: 'readyToExport',\n // statuses: [1]\n // },\n // failedToExport: {\n // displayName: 'Failed to Export',\n // name: 'failedToExport',\n // statuses: [5]\n // }\n // },\n // approvalInputs: [\n // {\n // type: 'input',\n // name: 'Code',\n // value: 'code',\n // format: '9999',\n // required: true,\n // className: 'input-cco-number'\n // }\n // ]\n // },\n // ap_inv: {\n // internalModelName: 'ap_inv',\n // externalModelName: 'ap_inv',\n // displayName: \"Payable Invoices\",\n // filters: {\n // readyToExport: {\n // displayName: 'Ready to Export',\n // name: 'readyToExport',\n // statuses: [1]\n // },\n // failedToExport: {\n // displayName: 'Failed to Export',\n // name: 'failedToExport',\n // statuses: [5]\n // }\n // },\n // approvalInputs: [\n // {\n // type: 'input',\n // name: 'Code',\n // value: 'code',\n // required: true,\n // format: '*{0,5}',\n // className: 'input-payable-invoice-number'\n // },\n // {\n // type: 'date',\n // name: 'Approval Date',\n // value: 'approvalDate',\n // required: false,\n // className: 'input-payable-invoice-approval-date'\n // }\n // ]\n // },\n // pcco: {\n // internalModelName: 'pcco',\n // externalModelName: 'pcco',\n // displayName: \"Contract Change Orders\",\n // filters: {\n // readyToExport: {\n // displayName: 'Ready to Export',\n // name: 'readyToExport',\n // statuses: [1]\n // },\n // failedToExport: {\n // displayName: 'Failed to Export',\n // name: 'failedToExport',\n // statuses: [5]\n // }\n // },\n // approvalInputs: [\n // {\n // type: 'input',\n // name: 'Code',\n // value: 'code',\n // required: true,\n // format: '9999',\n // className: 'input-pcco-number'\n // }\n // ]\n // },\n // }\n // }\n // },\n },\n erp: {\n syncStatuses: {\n STALE: -2,\n CACHED: -1,\n PENDING: 0,\n REVIEWING: 1,\n REJECTED: 2,\n APPROVED: 3,\n SYNCED: 4,\n FAILED: 5,\n ARCHIVED: 6\n },\n syncStatusDescriptions: {\n '-2': 'Changes were made which have not been synced to your ERP system',\n 0: 'ERP sync not started',\n 1: 'ERP sync waiting for approval',\n 2: 'ERP sync rejected',\n 3: 'Approved - Sync to ERP in process',\n 4: 'Synced to ERP',\n 5: 'Sync to ERP failed',\n 6: 'Archived'\n }\n }\n};\n\n\n//Models\nPJQ.integrations.models.Integration = PJQ.models.BaseModel.extend({\n idAttribute: \"id\",\n defaults: {\n isAPIv2: true\n },\n endpoint: function () {\n let endpointArr,\n params = [];\n if (this.id > 0) {\n\n params.push({\n parameter: 'erp',\n value: this.get('erp')\n });\n\n endpointArr = [\n {\n endpoint: 'integrations',\n value: this.get('name')\n }\n ];\n } else {\n if (this.options.erp) {\n params.push({\n parameter: 'erp',\n value: true\n });\n\n if (_.size(this.get(\"name\")) === 0) {\n this.set('name', 'default');\n }\n }\n\n endpointArr = [\n {\n endpoint: 'integrations',\n value: this.get('name')\n }\n ];\n }\n return PJQ.helpers.urlHelpers.generateEndpoint(endpointArr, params);\n },\n parse: function (model) {\n if (model == null) {\n model = {};\n }\n\n if (!model.settings) {\n model.settings = {};\n }\n return model;\n },\n getSetting: function (setting) {\n return this.attributes.settings ? this.attributes.settings[setting] : null;\n },\n setSetting: function (setting, value) {\n if (_.size(setting) === 0) {\n return false;\n }\n\n if (this.attributes.settings == null) {\n this.attributes.settings = {};\n }\n this.attributes.settings[setting] = value;\n return true;\n },\n undoPush: function (obj, callback) {\n let externalObj = obj.get('externalObject');\n if (externalObj == null || !(externalObj.id > 0) || externalObj.status !== PJQ.constants.integrations.erp.syncStatuses.REVIEWING) {\n if (typeof callback === 'function') {\n callback(obj);\n }\n return;\n }\n\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'objects',\n value: externalObj.id\n },\n {\n endpoint: 'undopush'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n obj.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(obj);\n }\n }).fail(function () {\n // todo: error\n });\n },\n fetchSyncData: function (callback) {\n return new Promise((resolve, reject) => {\n if (this.syncData != null) {\n if (typeof callback === 'function') {\n callback(this.syncData);\n }\n resolve(this.syncData);\n return;\n }\n\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'syncdata'\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n this.syncData = res;\n if (typeof callback === 'function') {\n callback(this.syncData);\n }\n resolve(this.syncData);\n }).fail(() => {\n reject(new Error(\"Failed to fetch erp integration sync data\"));\n });\n });\n },\n fetchSettingsData: function (callback, options = null) {\n this.settingsData = {};\n return new Promise((resolve, reject) => {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'settingsdata'\n }\n ], [\n {\n parameter: 'type',\n value: options ? options.type : null\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n this.settingsData = _.extend(this.settingsData, res ?? {});\n if (typeof callback === 'function') {\n callback(res);\n }\n resolve(res);\n }).fail((res) => {\n if (!this.handleError(res)) {\n reject(res);\n }\n });\n });\n },\n pushVendor: function (contact, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'vendors',\n value: contact.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n contact.set({\n companyExternalObject: res,\n externalObject: res\n }, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(contact);\n }\n }).fail(function () {\n // todo: error\n });\n },\n unlinkVendor: function (contactCompany, callback) {\n let contactCompanyId = contactCompany.get('contactCompanyId');\n if (contactCompanyId == null) {\n contactCompanyId = contactCompany.id;\n }\n\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'vendors',\n value: contactCompanyId\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n contactCompany.set({\n companyExternalObject: null,\n externalObject: null\n }, null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((xhr) => {\n // todo: error\n });\n },\n fetchUnlinkedProjects: async function () {\n return await this.fetchProjects(false);\n },\n fetchLinkedProjects: async function () {\n return await this.fetchProjects(true);\n },\n fetchProjects: async function (synced = false) {\n return new Promise((resolve, reject) => {\n if (this.erpProjects == null) {\n this.erpProjects = {};\n }\n\n let result = this.erpProjects[synced];\n if (result != null) {\n resolve(result);\n return;\n }\n\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects'\n }\n ], [{\n parameter: 'synced',\n value: synced\n }]),\n isAPIv2: true\n }).get().done((res) => {\n this.erpProjects[synced] = res;\n resolve(this.erpProjects[synced]);\n }).fail(() => {\n reject(new Error(\"Failed to fetch erp projects\"));\n });\n });\n },\n pushProject: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n project.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(project);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n linkProject: function (project, externalId, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'link'\n }\n ], [{\n parameter: 'externalId',\n value: externalId\n }]),\n isAPIv2: true\n }).post().done((res) => {\n project.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(project);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n unlinkProject: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n project.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n pushSubJobs: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'subjobs'\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullSubJobs: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'subjobs'\n },\n {\n endpoint: 'pull'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n updateCostTypeData: function (obj, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'costtypes'\n },\n {\n endpoint: 'data'\n }\n ]),\n isAPIv2: true,\n data: obj\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pushCostTypes: function (callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'costtypes'\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullCostTypes: function (callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'costtypes'\n },\n {\n endpoint: 'pull'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pushCostCodes: function (options, callback) {\n let params = [];\n if (options) {\n if (options.project && options.project.id > 0) {\n params.push({\n parameter: 'projectId',\n value: options.project.id\n });\n }\n\n if (options.dryRun) {\n params.push({\n parameter: 'dryRun',\n value: true\n });\n }\n }\n\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'costcodes'\n },\n {\n endpoint: 'push'\n }\n ], params),\n isAPIv2: true\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullCostCodes: function (project, callback) {\n let params = [];\n if (project != null) {\n params.push({\n parameter: 'projectId',\n value: project ? project.id : null\n });\n }\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'costcodes'\n },\n {\n endpoint: 'pull'\n }\n ], params),\n isAPIv2: true,\n data: []\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n fetchCostCodes: function (callback, options = null) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'costcodes'\n }\n ], [\n {\n parameter: 'forLinking',\n value: options && options.forLinking ? true : null\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n if (typeof callback === 'function') {\n callback(res);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullTaxCodes: function (project, callback) {\n let params = [];\n if (project != null) {\n params.push({\n parameter: 'projectId',\n value: project ? project.id : null\n });\n }\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'taxcodes'\n },\n {\n endpoint: 'pull'\n }\n ], params),\n isAPIv2: true\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pushBudget: function (budget, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: budget.get('projectId')\n },\n {\n endpoint: 'budget'\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n budget.set({\n externalObject: res,\n isLocked: true\n }, {\n silent: true\n })\n budget.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(budget);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullBudget: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'budget'\n },\n {\n endpoint: 'pull'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pushCommitment: function (commitment, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'commitments',\n value: commitment.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n commitment.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(commitment);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullCommitments: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'commitments'\n },\n {\n endpoint: 'pull'\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n if (typeof callback === 'function') {\n callback(res);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n unlinkCommitment: function (commitment, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'commitments',\n value: commitment.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n commitment.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n pushChangeRequest: function (changeRequest, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'changerequests',\n value: changeRequest.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n changeRequest.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(changeRequest);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n unlinkChangeRequest: function (changeRequest, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'changerequests',\n value: changeRequest.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n changeRequest.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n pushCommitmentChangeOrder: function (changeOrder, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'commitmentchangeorders',\n value: changeOrder.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n changeOrder.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(changeOrder);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullCommitmentChangeOrders: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'commitmentchangeorders'\n },\n {\n endpoint: 'pull'\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n if (typeof callback === 'function') {\n callback(res);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n unlinkCommitmentChangeOrder: function (changeOrder, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'commitmentchangeorders',\n value: changeOrder.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n changeOrder.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n pushPrimeContract: function (primeContract, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'primecontracts',\n value: primeContract.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n primeContract.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(primeContract);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullPrimeContracts: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'primecontracts'\n },\n {\n endpoint: 'pull'\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n if (typeof callback === 'function') {\n callback(res);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n unlinkPrimeContract: function (contract, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'primecontracts',\n value: contract.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n contract.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n pushPrimeContractChangeOrder: function (changeOrder, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'primecontractchangeorders',\n value: changeOrder.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n changeOrder.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(changeOrder);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullPrimeContractChangeOrders: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'primecontractchangeorders'\n },\n {\n endpoint: 'pull'\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n if (typeof callback === 'function') {\n callback(res);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n unlinkPrimeContractChangeOrder: function (changeOrder, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'primecontractchangeorders',\n value: changeOrder.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n changeOrder.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n pushDirectCost: function (directcost, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'directcosts',\n value: directcost.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n directcost.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(directcost);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullDirectCosts: function (project, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'projects',\n value: project.id\n },\n {\n endpoint: 'directcosts'\n },\n {\n endpoint: 'pull'\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n if (typeof callback === 'function') {\n callback(res, null);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n unlinkDirectCost: function (directCost, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'directcosts',\n value: directCost.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n directCost.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n pushPayableInvoice: function (invoice, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'payableinvoices',\n value: invoice.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n invoice.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(invoice);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullPayableInvoicePayments: function (invoice, callback) {\n return new Promise((resolve, reject) => {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'payableinvoicepayments',\n value: invoice.id\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n if (typeof callback === 'function') {\n callback(res);\n }\n resolve(res);\n }).fail((err) => {\n if (typeof callback === 'function') {\n callback(null, err);\n }\n this.handleError(err);\n reject(new Error(\"Failed to fetch invoice payments\"));\n });\n });\n },\n unlinkPayableInvoice: function (invoice, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'payableinvoices',\n value: invoice.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n invoice.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n pushReceivableInvoice: function (invoice, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'receivableinvoices',\n value: invoice.id\n },\n {\n endpoint: 'push'\n }\n ]),\n isAPIv2: true\n }).post().done((res) => {\n invoice.set('externalObject', res, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(invoice);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(null, err);\n });\n },\n pullReceivableInvoicePayments: function (invoice, callback) {\n return new Promise((resolve, reject) => {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'receivableinvoicepayments',\n value: invoice.id\n }\n ]),\n isAPIv2: true\n }).get().done((res) => {\n if (typeof callback === 'function') {\n callback(res);\n }\n resolve(res);\n }).fail((err) => {\n if (typeof callback === 'function') {\n callback(null, err);\n }\n this.handleError(err);\n reject(new Error(\"Failed to fetch invoice payments\"));\n });\n });\n },\n unlinkReceivableInvoice: function (invoice, callback) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'erp'\n },\n {\n endpoint: 'receivableinvoices',\n value: invoice.id\n },\n {\n endpoint: 'unlink'\n }\n ]),\n isAPIv2: true,\n }).post().done(() => {\n invoice.set('externalObject', null, {\n silent: true\n });\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((err) => {\n this.handleError(err);\n callback(false, err);\n });\n },\n getProvider: function () {\n return PJQ.constants.integrations.providers[this.get('name')];\n },\n getShortName: function () {\n let pvd = this.getProvider();\n if (pvd != null) {\n return _.size(pvd.shortName) > 0 ? pvd.shortName : '';\n }\n return '';\n },\n getBudgetColumns: function () {\n let pvd = this.getProvider();\n if (pvd != null) {\n return pvd.budgetColumns != null ? pvd.budgetColumns : [];\n }\n return [];\n },\n hasAvailableAction: function (action) {\n let pvd = this.getProvider();\n if (pvd != null) {\n return pvd.availableActions != null && pvd.availableActions.indexOf(action) !== -1;\n }\n return false;\n },\n authorize: function () {\n return new Promise((resolve, reject) => {\n let type = this.get('name'),\n provider = PJQ.constants.integrations.providers[type];\n if (provider && provider.isAgave) {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'integrations'\n },\n {\n endpoint: 'agave'\n },\n {\n endpoint: 'linktoken'\n }\n ], [\n {\n parameter: 'name',\n value: type\n }\n ]),\n isAPIv2: true\n }).get().done((response) => {\n if (_.size(response.linkToken) > 0) {\n window.AgaveLink.openLink({\n linkToken: response.linkToken,\n sourceSystem: provider.agaveSourceSystem,\n showSandboxSourceSystems: true,\n onSuccess: (publicToken) => {\n this.get('settings').publicToken = publicToken;\n resolve(true);\n }\n });\n } else {\n reject(new Error('Failed to get Agave link token'));\n }\n }).fail(function (err) {\n reject(err)\n });\n return;\n }\n\n switch (type) {\n case PJQ.constants.integrations.providers.ACUMATICA.name:\n case PJQ.constants.integrations.providers.SAGE100.name:\n case PJQ.constants.integrations.providers.SAGE300.name:\n case PJQ.constants.integrations.providers.INTACCT.name:\n resolve(true);\n break;\n case PJQ.constants.integrations.providers.QBO.name:\n default:\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'integrations'\n },\n {\n endpoint: 'authorize'\n }\n ], [\n {\n parameter: 'name',\n value: type\n }\n ]),\n isAPIv2: true\n }).get().done((response) => {\n document.location = response.url;\n resolve(true);\n }).fail(function (res) {\n reject(res);\n });\n break;\n }\n });\n },\n handleError: function (res) {\n // if this function returns true, the error was handled\n // if it returns false, the error was not handled and the caller is expected to handle it\n // this is used to handle errors that are common to all ERP integrations - i.e. authentication for QBO\n if (res && res.responseJSON && res.responseJSON.type === \"APP_NOT_AUTHORIZED\" && this.get('name') === PJQ.constants.integrations.providers.QBO.name) {\n new PJQ.views.modals.YesNo({\n header: \"Authorize QuickBooks Online\",\n body: \"Authorization for QuickBooks Online has expired. You must re-authorize to continue to use the integration features. Would you like to re-authorize now?\",\n onYes: () => {\n this.authorize().catch((err) => {\n\n });\n }\n });\n return true;\n }\n return false;\n }\n});\n\n// Collections\nPJQ.integrations.collections.Integrations = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.integrations.models.Integration,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'integrations'\n }\n ]);\n }\n});\n\n// Models\nPJQ.integrations.models.LinkERPProjectModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-erp-project-link'),\n onCancel: _.noop,\n onSave: _.noop,\n minWidth: '700px'\n },\n events: {\n \"change .select-project\": \"selectProject\",\n \"click .btn-cancel\": \"cancel\",\n \"click .btn-save\": \"save\"\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n this.provider = this.erpIntegration.getProvider();\n\n this.projects = await this.erpIntegration.fetchUnlinkedProjects();\n\n this.isFetched = true;\n\n this.render();\n },\n renderData: function () {\n return {\n isFetched: this.isFetched,\n provider: this.provider\n }\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n let columns = [\n {\n \"data\": \"id\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": (data, type, row) => {\n let isSelected = this.selectedProject && this.selectedProject.id === row.id;\n return ('
');\n }\n },\n {\n \"data\": \"name\",\n \"title\": \"Name\",\n \"render\": (data, type, row) => {\n return row.data.name ?? \"\";\n }\n },\n {\n \"data\": \"city\",\n \"title\": \"City\",\n \"render\": (data, type, row) => {\n return row.data.city ?? \"\";\n }\n },\n {\n \"data\": \"state\",\n \"title\": \"State\",\n \"render\": (data, type, row) => {\n return row.data.state ?? \"\";\n }\n }];\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('.projects-data-table'),\n data: this.projects,\n deferRender: true,\n order: [1, 'asc'],\n columns: columns,\n language: {\n emptyTable: \"No projects were found\",\n zeroRecords: \"No projects match the search criteria\"\n }\n });\n },\n selectProject: function (e) {\n let target = $(e.currentTarget),\n isSelected = target.prop('checked');\n this.$('.select-project').not(target).prop('checked', false);\n if (isSelected) {\n this.selectedProject = this.dataTable.dataTable.row(target.parents('tr')).data();\n } else {\n this.selectedProject = null;\n }\n this.$('.btn-save').prop('disabled', this.selectedProject == null)\n },\n save: function () {\n if (this.options.project != null && this.selectedProject != null && _.size(this.selectedProject.externalId) > 0) {\n this.erpIntegration.linkProject(this.options.project, this.selectedProject.externalId, () => {\n PJQ.notifications.notify.successNotify({\n message: 'Project linked to ERP'\n });\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.options.project);\n }\n });\n }\n\n this.removeModal();\n },\n cancel: function () {\n if (typeof this.options.onCancel === 'function') {\n this.options.onCancel();\n }\n }\n});","PJQ.integrations.views.IntegrationsList = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'integrations')\n },\n events: {\n 'click .btn-settings': 'integrationClicked',\n 'click .btn-connect': 'integrationClicked',\n 'click .btn-disconnect': 'disconnectIntegration'\n },\n beforeFirstRender: function () {\n this.isFetched = false;\n PJQ.app.session.fetchIntegrations(_.bind(function (integrations) {\n this.integrations = integrations;\n this.isFetched = true;\n this.render();\n }, this))\n },\n renderData: function () {\n return {\n integrations: this.integrations,\n getIntegration: this.getIntegration\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n if (this.options.initOptions != null && _.size(this.options.initOptions.integrationName) > 0) {\n this.handleIntegrationType(this.options.initOptions.integrationName);\n this.options.initOptions = null;\n }\n },\n getIntegration: function (type) {\n if (this.integrations == null) {\n return null;\n }\n\n return this.integrations.find((ig) => {\n return ig.get('name') === type.toUpperCase()\n });\n },\n integrationClicked: function (e) {\n let $target = $(e.currentTarget),\n integrationType = $target.data('name');\n this.handleIntegrationType(integrationType);\n },\n handleIntegrationType: function (type, integration) {\n if (integration == null) {\n integration = this.getIntegration(type);\n }\n let enabled = integration != null;\n if (!enabled) {\n this.authorizeIntegration(type);\n return;\n }\n\n switch (type.toUpperCase()) {\n case PJQ.constants.integrations.providers.QBO.name:\n return new PJQ.integrations.views.QBOIntegrationSettings({\n model: integration,\n initOptions: this.options.initOptions\n });\n case PJQ.constants.integrations.providers.SAGE100.name:\n case PJQ.constants.integrations.providers.SAGE300.name:\n return new PJQ.integrations.views.SageHH2IntegrationSettings({\n model: integration,\n initOptions: this.options.initOptions,\n onSave: _.bind(function (integration) {\n this.integrations.add(integration);\n PJQ.app.session.erpIntegration = integration;\n PJQ.app.navigator.refreshCommands();\n this.render();\n }, this)\n });\n case PJQ.constants.integrations.providers.ACUMATICA.name:\n return new PJQ.integrations.views.AcumaticaIntegrationSettings({\n model: integration,\n initOptions: this.options.initOptions,\n onSave: _.bind(function (integration) {\n if (integration.id > 0) {\n this.integrations.add(integration);\n PJQ.app.session.erpIntegration = integration;\n PJQ.app.navigator.refreshCommands();\n }\n this.render();\n }, this)\n });\n case PJQ.constants.integrations.providers.INTACCT.name:\n return new PJQ.integrations.views.SageIntacctIntegrationSettings({\n model: integration,\n initOptions: this.options.initOptions,\n onSave: _.bind(function (integration) {\n this.integrations.add(integration);\n PJQ.app.session.erpIntegration = integration;\n PJQ.app.navigator.refreshCommands();\n this.render();\n }, this)\n });\n\n // case PJQ.constants.integrations.providers.VIEWPOINT_VISTA.name:\n // return new PJQ.integrations.views.VistaIntegrationSettings({\n // model: integration,\n // initOptions: this.options.initOptions,\n // onSave: _.bind(function (integration) {\n // this.integrations.add(integration);\n // PJQ.app.session.erpIntegration = integration;\n // PJQ.app.navigator.refreshCommands();\n // this.render();\n // }, this)\n // });\n }\n },\n authorizeIntegration: function (type) {\n let integration = this.getIntegration(type);\n if (integration == null) {\n integration = new PJQ.integrations.models.Integration({\n name: type,\n erp: true\n });\n }\n\n integration.authorize().then((authorized) => {\n if (authorized) {\n this.handleIntegrationType(type, integration);\n }\n }).catch((err) => {\n\n });\n },\n disconnectIntegration: function (e) {\n let $target = $(e.currentTarget),\n name = $target.data('name'),\n integration = this.integrations.findWhere({\n name: name\n }),\n displayName = PJQ.constants.integrations.providers[integration.get('name')].displayName;\n new PJQ.views.modals.YesNo({\n header: \"Disconnect Integration?\",\n body: \"Are you sure you want to disconnect your \" + displayName + \" integration? This will unlink all synced items and cannot be undone. \",\n onYes: _.bind(function () {\n if (integration != null) {\n integration.destroy({\n success: _.bind(function () {\n PJQ.app.session.erpIntegration = new PJQ.integrations.models.Integration({}, {\n erp: true\n });\n PJQ.app.navigator.refreshCommands();\n PJQ.notifications.notify.successNotify({\n message: 'Integration successfully disconnected'\n });\n this.render();\n }, this)\n });\n }\n }, this)\n });\n }\n});\n\nPJQ.integrations.views.QBOIntegrationSettings = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-integration-settings-qbo'),\n minWidth: 500\n },\n events: {\n 'change .input-projects': 'render',\n 'change .input-import-single-item': 'render',\n 'change .input-export-single-item': 'render',\n 'change .input-sync-costs': 'render',\n 'click .btn-re-auth': 'reAuthorize',\n 'click .btn-save': 'save',\n 'click .btn-cancel': 'cancel',\n 'click .btn-unlink': 'unlink'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n this.costCodes = await PJQ.app.session.fetchCostCodes();\n this.costTypes = await PJQ.app.session.fetchCostTypes();\n this.isFetched = true;\n this.render();\n },\n renderData: function () {\n return {\n integrationName: PJQ.constants.integrations.providers[this.model.get('name')].displayName,\n model: this.model,\n costCodes: this.costCodes,\n costTypes: this.costTypes,\n settings: this.model.get('settings'),\n isFetched: this.isFetched,\n newAuth: this.options.initOptions && this.options.initOptions.authorized\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n if (this.options.initOptions && this.options.initOptions.authorized) {\n PJQ.notifications.notify.successNotify({\n message: 'QuickBooks Online Integration successfully authorized'\n });\n }\n\n new PJQ.Binder(this.$('.modal-body'), this.model.get('settings'), {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ]\n });\n\n let incomeAccount = this.model.getSetting('incomeAccount');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-income-account'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Income Account ' + PJQ.constants.markup.requiredAst,\n title: 'The income account used when pushing Cost Codes to QuickBooks Online Products',\n showSaveButton: false,\n defaultDisplayValue: incomeAccount != null ? incomeAccount.name : null,\n value: incomeAccount != null ? incomeAccount.id : null,\n getChoices: (cb) => {\n this.fetchAccounts(() => {\n cb(_.sortBy(_.map(this.incomeAccounts, function (account) {\n return {\n id: account.id,\n name: account.name\n };\n }), (account) => {\n return account.name;\n }));\n });\n },\n onChange: (value) => {\n let account = this.incomeAccounts.find((item) => item.id === value);\n if (account != null) {\n this.model.setSetting('incomeAccount', account);\n }\n }\n });\n\n let expenseAccount = this.model.getSetting('expenseAccount');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-expense-account'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Expense Account ' + PJQ.constants.markup.requiredAst,\n title: 'The expense account used when pushing Cost Codes to QuickBooks Online Products',\n showSaveButton: false,\n defaultDisplayValue: expenseAccount != null ? expenseAccount.name : null,\n value: expenseAccount != null ? expenseAccount.id : null,\n getChoices: (cb) => {\n this.fetchAccounts(() => {\n cb(_.sortBy(_.map(this.expenseAccounts, function (account) {\n return {\n id: account.id,\n name: account.name\n };\n }), (account) => {\n return account.name;\n }));\n });\n },\n onChange: (value) => {\n let account = this.expenseAccounts.find((item) => item.id === value);\n if (account != null) {\n this.model.setSetting('expenseAccount', account);\n }\n }\n });\n\n let paymentAccount = this.model.getSetting('paymentAccount');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-payment-account'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Payment Account ' + PJQ.constants.markup.requiredAst,\n title: 'The payment account used when pushing Direct Costs to QuickBooks Online Purchases',\n showSaveButton: false,\n defaultDisplayValue: paymentAccount != null ? paymentAccount.name : null,\n value: paymentAccount != null ? paymentAccount.id : null,\n getChoices: (cb) => {\n this.fetchAccounts(() => {\n cb(_.sortBy(_.map(this.paymentAccounts, function (account) {\n return {\n id: account.id,\n name: account.name\n };\n }), (account) => {\n return account.name;\n }));\n });\n },\n onChange: (value) => {\n let account = this.paymentAccounts.find((item) => item.id === value);\n if (account != null) {\n this.model.setSetting('paymentAccount', account);\n }\n }\n });\n\n let incomeDefaultItem = this.model.getSetting('incomeDefaultItem');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-income-default-item'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Default Export Income Product ' + PJQ.constants.markup.requiredAst,\n title: 'The product used when syncing Contracts, Contract Change Orders, and Receivable Invoices to QuickBooks Online',\n showSaveButton: false,\n defaultDisplayValue: incomeDefaultItem != null ? (incomeDefaultItem.name + ' ' + incomeDefaultItem.description) : null,\n value: incomeDefaultItem != null ? incomeDefaultItem.id : null,\n getChoices: (cb) => {\n this.fetchProducts(() => {\n cb(_.sortBy(_.map(_.filter(this.products, function (product) {\n return product.forIncome;\n }), function (product) {\n return {\n id: product.id,\n name: product.name + ' ' + product.description\n };\n }), (product) => {\n return product.name;\n }));\n });\n },\n onChange: (value) => {\n let product = this.products.find((item) => item.id === value);\n if (product != null) {\n this.model.setSetting('incomeDefaultItem', product);\n }\n }\n });\n\n let expenseDefaultItem = this.model.getSetting('expenseDefaultItem');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-expense-default-item'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Default Export Expense Product ' + PJQ.constants.markup.requiredAst,\n title: 'The product used when syncing Commitments, Commitment Change Orders, and Payable Invoices to QuickBooks Online',\n showSaveButton: false,\n defaultDisplayValue: expenseDefaultItem != null ? (expenseDefaultItem.name + ' ' + expenseDefaultItem.description) : null,\n value: expenseDefaultItem != null ? expenseDefaultItem.id : null,\n getChoices: (cb) => {\n this.fetchProducts(() => {\n cb(_.sortBy(_.map(_.filter(this.products, function (product) {\n return product.forExpense;\n }), function (product) {\n return {\n id: product.id,\n name: product.name + ' ' + product.description\n };\n }), (product) => {\n return product.name;\n }));\n });\n },\n onChange: (value) => {\n let product = this.products.find((item) => item.id === value);\n if (product != null) {\n this.model.setSetting('expenseDefaultItem', product);\n }\n }\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-cost-default-group'),\n isLiveSearch: true,\n isIntChoices: true,\n choices: _.map(this.costCodes.models.sort(function (a, b) {\n return PJQ.helpers.sortHelpers.sortAlphaNum(a.get('code'), b.get('code'));\n }), function (costCode) {\n return {\n id: costCode.id,\n name: costCode.getDisplayName()\n };\n }),\n defaultValue: this.model.get('settings').costDefaultGroupId,\n onChange: _.bind(function (value) {\n this.model.get('settings').costDefaultGroupId = value;\n }, this)\n });\n\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-cost-default-cost-type'),\n isLiveSearch: true,\n isIntChoices: true,\n choices: _.map(this.costTypes.models, function (costType) {\n return {\n id: costType.id,\n name: costType.get('name')\n };\n }),\n defaultValue: this.model.get('settings').costDefaultCostTypeId,\n onChange: _.bind(function (value) {\n this.model.get('settings').costDefaultCostTypeId = value;\n }, this)\n });\n },\n fetchAccounts: function (callback) {\n if (this.expenseAccounts != null && this.incomeAccounts != null && this.paymentAccounts != null) {\n if (typeof callback === 'function') {\n callback();\n }\n return;\n }\n\n this.model.fetchSettingsData(null, {\n type: 'accounts'\n }).then((data) => {\n if (data != null) {\n this.expenseAccounts = data.expenseAccounts ?? [];\n this.incomeAccounts = data.incomeAccounts ?? [];\n this.paymentAccounts = data.paymentAccounts ?? [];\n }\n if (typeof callback === 'function') {\n callback();\n }\n }).catch((err) => {\n\n });\n },\n fetchProducts: function (callback) {\n if (this.products != null) {\n if (typeof callback === 'function') {\n callback();\n }\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n if (data != null) {\n this.products = data.products ?? [];\n }\n if (typeof callback === 'function') {\n callback();\n }\n }, {\n type: 'products'\n });\n },\n reAuthorize: function () {\n new PJQ.views.modals.YesNo({\n header: \"Re-Authorize QuickBooks Online Integration?\",\n body: \"Are you sure you want to re-authorize your QuickBooks Online integration? This is usually only necessary if you have made changes to the user you used during setup, or if you are experiencing issues with your integration.\",\n onYes: () => {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n this.model.authorize().then((authorized) => {\n if (authorized) {\n this.render();\n }\n }).catch((err) => {\n loader.remove();\n });\n }\n });\n },\n validate: function () {\n let settings = this.model.get('settings'),\n valid = true;\n\n if (settings.incomeAccount == null) {\n valid = false;\n this.$('.label-income-account').addClass('text-danger');\n }\n\n if (settings.expenseAccount == null) {\n valid = false;\n this.$('.label-expense-account').addClass('text-danger');\n }\n\n if (settings.paymentAccount == null) {\n valid = false;\n this.$('.label-payment-account').addClass('text-danger');\n }\n\n if (settings.exportSingleItem) {\n if (settings.incomeDefaultItem == null) {\n valid = false;\n this.$('.label-income-default-item').addClass('text-danger');\n }\n\n if (settings.expenseDefaultItem == null) {\n valid = false;\n this.$('.label-expense-default-item').addClass('text-danger');\n }\n }\n\n if (settings.syncProjects && settings.syncCosts) {\n if (settings.importSingleItem && settings.costDefaultGroupId == null) {\n valid = false;\n this.$('.label-cost-default-group').addClass('text-danger');\n }\n\n if (settings.costDefaultCostTypeId == null) {\n valid = false;\n this.$('.label-cost-default-cost-type').addClass('text-danger');\n }\n }\n\n return valid;\n },\n cancel: function () {\n if (this.model && this.model.hasChanged()) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n this.model.restore();\n if (typeof this.options.onCancel === 'function') {\n this.options.onCancel(this.model);\n }\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n },\n save: function () {\n if (this.validate()) {\n this.model.save(null, {\n success: _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Settings updated successfully'\n });\n this.removeModal();\n }, this)\n })\n }\n },\n setSettings: function (callback) {\n if (typeof callback === 'function') {\n callback(settings);\n }\n },\n});\n\nPJQ.integrations.views.SageHH2IntegrationSettings = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-integration-settings-sage-hh2'),\n minWidth: 500,\n onSave: null\n },\n events: {\n 'click .btn-save': 'save',\n 'click .btn-cancel': 'cancel',\n 'click .btn-unlink': 'unlink'\n },\n beforeModalCreated: function () {\n this.isFetched = false;\n PJQ.app.session.fetchCostCodes(_.bind(function (costCodes) {\n this.costCodes = costCodes;\n PJQ.app.session.fetchCostTypes(_.bind(function (ct) {\n this.costTypes = ct;\n this.isFetched = true;\n this.render();\n }, this));\n }, this));\n },\n renderData: function () {\n return {\n provider: PJQ.constants.integrations.providers[this.model.get('name')],\n model: this.model,\n settings: this.model.get('settings'),\n isFetched: this.isFetched\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n new PJQ.Binder(this.$('.modal-body'), this.model.get('settings'), {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ],\n afterChange: _.bind(function () {\n this.renderAlerts();\n }, this)\n });\n\n this.renderAlerts();\n },\n renderAlerts: function () {\n\n },\n validate: function () {\n let settings = this.model.get('settings'),\n valid = true;\n return valid;\n },\n cancel: function () {\n if (this.model && this.model.hasChanged()) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n this.model.restore();\n if (typeof this.options.onCancel === 'function') {\n this.options.onCancel(this.model);\n }\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n },\n save: function () {\n if (this.validate()) {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n this.model.save(null, {\n success: () => {\n loader.remove();\n PJQ.notifications.notify.successNotify({\n message: 'Settings updated successfully'\n });\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n\n this.removeModal();\n }\n })\n }\n }\n});\n\nPJQ.integrations.views.AcumaticaIntegrationSettings = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-integration-settings-acumatica'),\n minWidth: 500,\n onSave: null\n },\n events: {\n 'click .btn-save, .btn-authorize': 'save',\n 'click .btn-cancel': 'cancel',\n 'click .btn-unlink': 'unlink',\n 'change .input-export-single-item': 'render',\n 'click .btn-edit-auth': 'editAuthorization',\n 'click .btn-cancel-auth': 'cancelEditingAuthorization'\n },\n beforeModalCreated: function () {\n this.settingsData = {};\n\n this.isFetched = false;\n PJQ.app.session.fetchCostCodes((costCodes) => {\n this.costCodes = costCodes;\n PJQ.app.session.fetchCostTypes((ct) => {\n this.costTypes = ct;\n this.options.isAuthorized = true;\n this.options.editingAuthorization = false;\n\n if (this.model.id == null) {\n this.options.editingAuthorization = true;\n this.options.isAuthorized = false;\n }\n\n if (null == this.model.getSetting(PJQ.constants.integrations.settings.SYNC_PRIME_CONTRACT_CHANGE_ORDERS)) {\n this.model.setSetting(PJQ.constants.integrations.settings.SYNC_PRIME_CONTRACT_CHANGE_ORDERS, this.model.getSetting(PJQ.constants.integrations.settings.SYNC_PRIME_CONTRACTS));\n }\n\n this.isFetched = true;\n this.render();\n });\n });\n },\n renderData: function () {\n return {\n provider: PJQ.constants.integrations.providers[this.model.get('name')],\n model: this.model,\n settings: this.model.get('settings'),\n isFetched: this.isFetched,\n editingAuthorization: this.options.editingAuthorization,\n isAuthorized: this.options.isAuthorized\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n new PJQ.Binder(this.$('.modal-body'), this.model.get('settings'), {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ],\n afterChange: () => {\n this.renderAlerts();\n }\n });\n\n let version = this.model.get('settings').version != null ? this.model.get('settings').version : null;\n new PJQ.inputs.Selectpicker({\n el: this.$('.select-api-version'),\n defaultValue: version ? version : '',\n onChange: (value) => {\n this.model.get('settings').version = value;\n this.renderCustomizationLink();\n }\n });\n this.renderCustomizationLink();\n\n let defaultIncomeAccountGroup = this.model.getSetting('defaultIncomeAccountGroup');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-income-account'),\n isFormInput: true,\n canEdit: !this.options.editingAuthorization,\n editButtonText: \"Change\",\n label: 'Default Income Account Group ' + PJQ.constants.markup.requiredAst,\n title: 'The account group used when syncing Contracts to Acumatica Project Revenue Budgets',\n showSaveButton: false,\n defaultDisplayValue: defaultIncomeAccountGroup != null ? defaultIncomeAccountGroup.accountGroupID : null,\n value: defaultIncomeAccountGroup != null ? defaultIncomeAccountGroup.id : null,\n getChoices: (cb) => {\n let fnCallback = () => {\n let incomeAccounts = _.filter(this.settingsData.accountGroups, function (account) {\n return account.type.toLowerCase() === \"income\";\n })\n cb(_.map(incomeAccounts, function (account) {\n return {\n id: account.id,\n name: account.accountGroupID\n };\n }));\n };\n if (this.settingsData.accountGroups != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'account_groups'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.accountGroups.find((item) => item.id === value);\n if (item != null) {\n this.model.setSetting('defaultIncomeAccountGroup', item);\n }\n }\n });\n\n let defaultSalesSubaccount = this.model.getSetting('defaultSalesSubaccount');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-default-sales-subaccount'),\n isFormInput: true,\n canEdit: !this.options.editingAuthorization,\n editButtonText: \"Change\",\n label: 'Default Sales Subaccount',\n title: 'The subaccount used when syncing projects to Acumatica',\n showSaveButton: false,\n defaultDisplayValue: defaultSalesSubaccount != null ? defaultSalesSubaccount.subaccountID : null,\n value: defaultSalesSubaccount != null ? defaultSalesSubaccount.id : null,\n getChoices: (cb) => {\n let fnCallback = () => {\n let subaccounts = _.filter(this.settingsData.subaccounts, function (subaccount) {\n return true;\n })\n cb(_.map(subaccounts, function (subaccount) {\n return {\n id: subaccount.id,\n name: subaccount.subaccountID\n };\n }));\n };\n if (this.settingsData.subaccounts != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'sub_accounts'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.subaccounts.find((item) => item.id === value);\n if (item != null) {\n this.model.setSetting('defaultSalesSubaccount', item);\n }\n }\n });\n\n let defaultCreditTerms = this.model.getSetting('defaultCreditTerms');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-default-credit-terms'),\n isFormInput: true,\n canEdit: !this.options.editingAuthorization,\n editButtonText: \"Change\",\n label: 'Default Credit Terms ' + PJQ.constants.markup.requiredAst,\n title: 'The Credit Terms used when syncing Commitments to Acumatica Subcontracts and Purchase Orders',\n showSaveButton: false,\n defaultDisplayValue: defaultCreditTerms != null ? defaultCreditTerms.termsID : null,\n value: defaultCreditTerms != null ? defaultCreditTerms.id : null,\n getChoices: (cb) => {\n let fnCallback = () => {\n cb(_.map(this.settingsData.creditTerms, function (cls) {\n return {\n id: cls.id,\n name: cls.termsID\n };\n }));\n };\n if (this.settingsData.creditTerms != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'credit_terms'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.creditTerms.find((item) => item.id === value);\n if (item != null) {\n this.model.setSetting('defaultCreditTerms', item);\n }\n }\n });\n\n let defaultNonStockItem = this.model.getSetting('defaultNonStockItem');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-default-nonstock'),\n isFormInput: true,\n canEdit: !this.options.editingAuthorization,\n editButtonText: \"Change\",\n label: 'Default Non-Stock Item ' + PJQ.constants.markup.requiredAst,\n title: 'The Non-Stock Item used when syncing Commitments to Acumatica Subcontracts and Purchase Orders',\n showSaveButton: false,\n defaultDisplayValue: defaultNonStockItem != null ? defaultNonStockItem.inventoryID : null,\n value: defaultNonStockItem != null ? defaultNonStockItem.id : null,\n getChoices: (cb) => {\n let fnCallback = () => {\n cb(_.map(this.settingsData.nonStockItems, function (item) {\n return {\n id: item.id,\n name: item.inventoryID\n };\n }));\n };\n if (this.settingsData.nonStockItems != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'non_stock_items'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.nonStockItems.find((item) => item.id === value);\n if (item != null) {\n this.model.setSetting('defaultNonStockItem', item);\n }\n }\n });\n\n let primeContractCOClass = this.model.getSetting('primeContractCOClass');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-pcco-class'),\n isFormInput: true,\n canEdit: !this.options.editingAuthorization,\n editButtonText: \"Change\",\n label: 'Default Contract CO Class ' + PJQ.constants.markup.requiredAst,\n showSaveButton: false,\n defaultDisplayValue: primeContractCOClass != null ? primeContractCOClass.classID : null,\n value: primeContractCOClass != null ? primeContractCOClass.id : null,\n getChoices: (cb) => {\n let fnCallback = () => {\n cb(_.map(this.settingsData.primeContractCOClasses, function (cls) {\n return {\n id: cls.id,\n name: cls.classID\n };\n }));\n };\n if (this.settingsData.primeContractCOClasses != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'change_order_class'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.primeContractCOClasses.find((item) => item.id === value);\n if (item != null) {\n this.model.setSetting('primeContractCOClass', item);\n }\n }\n });\n\n let commitmentCOClass = this.model.getSetting('commitmentCOClass');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-cco-class'),\n isFormInput: true,\n canEdit: !this.options.editingAuthorization,\n editButtonText: \"Change\",\n label: 'Default Commitment CO Class ' + PJQ.constants.markup.requiredAst,\n showSaveButton: false,\n defaultDisplayValue: commitmentCOClass != null ? commitmentCOClass.classID : null,\n value: commitmentCOClass != null ? commitmentCOClass.id : null,\n getChoices: (cb) => {\n let fnCallback = () => {\n cb(_.map(this.settingsData.commitmentCOClasses, function (cls) {\n return {\n id: cls.id,\n name: cls.classID\n };\n }));\n };\n if (this.settingsData.commitmentCOClasses != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'change_order_class'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.commitmentCOClasses.find((item) => item.id === value);\n if (item != null) {\n this.model.setSetting('commitmentCOClass', item);\n }\n }\n });\n\n let vendorClass = this.model.getSetting('vendorClass');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-vendor-class'),\n isFormInput: true,\n canEdit: !this.options.editingAuthorization,\n editButtonText: \"Change\",\n label: 'Default Vendor Class ' + PJQ.constants.markup.requiredAst,\n showSaveButton: false,\n defaultDisplayValue: vendorClass != null ? vendorClass.classID : null,\n value: vendorClass != null ? vendorClass.id : null,\n getChoices: (cb) => {\n let fnCallback = () => {\n cb(_.map(this.settingsData.vendorClasses, function (cls) {\n return {\n id: cls.id,\n name: cls.classID\n };\n }));\n };\n if (this.settingsData.vendorClasses != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'vendor_class'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.vendorClasses.find((item) => item.id === value);\n if (item != null) {\n this.model.setSetting('vendorClass', item);\n }\n }\n });\n\n this.renderAlerts();\n },\n renderCustomizationLink: function () {\n let ver = this.model.get('settings').version,\n fileName = '',\n $pkg = this.$('.customization-package');\n if (ver === '24.200.001') {\n fileName = 'JP[24.206.0014][2025.01.10]';\n } else if (ver === '23.200.001') {\n fileName = 'JobPlanner2023R2';\n } else if (ver === '22.200.001') {\n fileName = 'JobPlanner2022R1';\n } else {\n $pkg.empty();\n return;\n }\n $pkg.html('Download Customization Package');\n },\n editAuthorization: function () {\n this.options.editingAuthorization = true;\n this.render();\n },\n cancelEditingAuthorization: function () {\n this.options.editingAuthorization = false;\n this.render();\n },\n renderAlerts: function () {\n\n },\n validate: function () {\n let settings = this.model.get('settings'),\n valid = true;\n\n\n if (settings.defaultIncomeAccountGroup == null && !this.options.editingAuthorization) {\n valid = false;\n this.$('.edit-income-account .form-group > label').addClass('text-danger');\n }\n\n if (settings.defaultCreditTerms == null && !this.options.editingAuthorization) {\n valid = false;\n this.$('.edit-default-credit-terms .form-group > label').addClass('text-danger');\n }\n\n if (settings.defaultNonStockItem == null && !this.options.editingAuthorization) {\n valid = false;\n this.$('.edit-default-nonstock .form-group > label').addClass('text-danger');\n }\n\n if (settings.primeContractCOClass == null && !this.options.editingAuthorization) {\n valid = false;\n this.$('.edit-pcco-class .form-group > label').addClass('text-danger');\n }\n\n if (settings.commitmentCOClass == null && !this.options.editingAuthorization) {\n valid = false;\n this.$('.edit-cco-class .form-group > label').addClass('text-danger');\n }\n\n\n return valid;\n },\n cancel: function () {\n if (this.model && this.model.hasChanged()) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n this.model.restore();\n if (typeof this.options.onCancel === 'function') {\n this.options.onCancel(this.model);\n }\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n },\n save: function () {\n if (this.validate()) {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n this.model.save(null, {\n success: () => {\n loader.remove();\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n if (!this.options.editingAuthorization) {\n PJQ.notifications.notify.successNotify({\n message: 'Settings updated successfully'\n });\n this.removeModal();\n } else {\n PJQ.notifications.notify.successNotify({\n message: 'Successfully Authorized'\n });\n this.options.editingAuthorization = false;\n this.options.isAuthorized = true;\n this.render();\n }\n },\n error: () => {\n loader.remove();\n this.errorAlert = new PJQ.Alert(this.$('.error-container'), {\n type: 'danger',\n text: 'Unable to validate the integration. Double check your information is correct.'\n });\n }\n })\n }\n }\n});\n\nPJQ.integrations.views.VistaIntegrationSettings = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-integration-settings-viewpoint-vista'),\n minWidth: 500,\n onSave: null\n },\n events: {\n 'click .btn-save': 'save',\n 'click .btn-cancel': 'cancel',\n 'click .btn-unlink': 'unlink'\n },\n beforeModalCreated: function () {\n this.isFetched = false;\n PJQ.app.session.fetchCostCodes(_.bind(function (costCodes) {\n this.costCodes = costCodes;\n PJQ.app.session.fetchCostTypes(_.bind(function (ct) {\n this.costTypes = ct;\n this.isFetched = true;\n this.render();\n }, this));\n }, this));\n },\n renderData: function () {\n return {\n provider: PJQ.constants.integrations.providers[this.model.get('name')],\n model: this.model,\n settings: this.model.get('settings'),\n isFetched: this.isFetched\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n new PJQ.Binder(this.$('.modal-body'), this.model.get('settings'), {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ],\n afterChange: _.bind(function () {\n this.renderAlerts();\n }, this)\n });\n\n this.renderAlerts();\n },\n renderAlerts: function () {\n\n },\n validate: function () {\n let settings = this.model.get('settings'),\n valid = true;\n return valid;\n },\n cancel: function () {\n if (this.model && this.model.hasChanged()) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n this.model.restore();\n if (typeof this.options.onCancel === 'function') {\n this.options.onCancel(this.model);\n }\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n },\n save: function () {\n if (this.validate()) {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n this.model.save(null, {\n success: () => {\n loader.remove();\n PJQ.notifications.notify.successNotify({\n message: 'Settings updated successfully'\n });\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n\n this.removeModal();\n }\n })\n }\n }\n});\n\nPJQ.integrations.views.SageIntacctIntegrationSettings = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-integration-settings-sage-intacct'),\n minWidth: 500,\n onSave: null\n },\n events: {\n 'click .btn-save, .btn-authorize': 'save',\n 'click .btn-cancel': 'cancel',\n 'click .btn-unlink': 'unlink',\n 'click .btn-edit-auth': 'editAuthorization',\n 'click .btn-cancel-auth': 'cancelEditingAuthorization'\n },\n beforeModalCreated: function () {\n this.settingsData = {};\n\n this.isFetched = false;\n PJQ.app.session.fetchCostCodes(_.bind(function (costCodes) {\n this.costCodes = costCodes;\n PJQ.app.session.fetchCostTypes(_.bind(function (ct) {\n this.costTypes = ct;\n this.options.isAuthorized = true;\n this.options.editingAuthorization = false;\n\n if (this.model.id == null) {\n this.options.editingAuthorization = true;\n this.options.isAuthorized = false;\n }\n\n if (null == this.model.getSetting(PJQ.constants.integrations.settings.SYNC_PRIME_CONTRACT_CHANGE_ORDERS)) {\n this.model.setSetting(PJQ.constants.integrations.settings.SYNC_PRIME_CONTRACT_CHANGE_ORDERS, this.model.getSetting(PJQ.constants.integrations.settings.SYNC_PRIME_CONTRACTS));\n }\n\n this.isFetched = true;\n this.render();\n }, this));\n }, this));\n },\n renderData: function () {\n return {\n provider: PJQ.constants.integrations.providers[this.model.get('name')],\n model: this.model,\n settings: this.model.get('settings'),\n isFetched: this.isFetched,\n editingAuthorization: this.options.editingAuthorization,\n isAuthorized: this.options.isAuthorized\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n new PJQ.Binder(this.$('.modal-body'), this.model.get('settings'), {\n setDefaultValues: true,\n watchElements: [\n 'input'\n ],\n afterChange: _.bind(function () {\n }, this)\n });\n\n let fnGetAccounts = (cb, options) => {\n let accounts = _.filter(this.settingsData.glAccounts, function (glAccount) {\n return true;\n })\n cb(_.map(_.filter(accounts, (account) => {\n if (!options || !options.normalBalance) {\n return true;\n }\n\n return account.normalBalance === options.normalBalance;\n }), function (account) {\n return {\n id: account.accountNo,\n name: `${account.accountNo} - ${account.title}`\n };\n }));\n },\n defaultPayableAccount = this.model.getSetting('defaultPayableAccount'),\n defaultReceivableAccount = this.model.getSetting('defaultReceivableAccount');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-default-receivable-account'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Default Receivable Account ' + PJQ.constants.markup.requiredAst,\n title: 'The default account used when pushing Contracts to Sage Intacct',\n showSaveButton: false,\n selectPickerOptions: {\n isLiveSearch: true\n },\n defaultDisplayValue: defaultReceivableAccount != null ? `${defaultReceivableAccount.accountNo} - ${defaultReceivableAccount.title}` : null,\n value: defaultReceivableAccount != null ? defaultReceivableAccount.recordNo : null,\n getChoices: (cb) => {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n if (this.settingsData.glAccounts != null) {\n fnGetAccounts(cb, {\n normalBalance: 'debit'\n });\n loader.remove();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnGetAccounts(cb, {\n normalBalance: 'debit'\n });\n loader.remove();\n }, {\n type: 'gl_accounts'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.glAccounts.find((item) => item.accountNo === value);\n if (item != null) {\n this.model.setSetting('defaultReceivableAccount', item);\n }\n }\n });\n\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-default-payable-account'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Default Payable Account ' + PJQ.constants.markup.requiredAst,\n title: 'The default Account used when pushing Payable Invoices (Bills) to Sage Intacct',\n showSaveButton: false,\n selectPickerOptions: {\n isLiveSearch: true\n },\n defaultDisplayValue: defaultPayableAccount != null ? `${defaultPayableAccount.accountNo} - ${defaultPayableAccount.title}` : null,\n value: defaultPayableAccount != null ? defaultPayableAccount.recordNo : null,\n getChoices: (cb) => {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n if (this.settingsData.glAccounts != null) {\n fnGetAccounts(cb, {\n normalBalance: 'credit'\n });\n loader.remove();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnGetAccounts(cb, {\n normalBalance: 'credit'\n });\n loader.remove();\n }, {\n type: 'gl_accounts'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.glAccounts.find((item) => item.accountNo === value);\n if (item != null) {\n this.model.setSetting('defaultPayableAccount', item);\n }\n }\n });\n\n let defaultItem = this.model.getSetting('defaultItem');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-default-item-id'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Default Item ' + PJQ.constants.markup.requiredAst,\n title: 'The default Item used when pushing Contracts to Sage Intacct',\n showSaveButton: false,\n defaultDisplayValue: defaultItem != null ? `${defaultItem.itemId} - ${defaultItem.name}` : null,\n value: defaultItem != null ? defaultItem.recordNo : null,\n getChoices: (cb) => {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n let fnCallback = () => {\n loader.remove();\n let items = _.filter(this.settingsData.items, function (glAccount) {\n return true;\n })\n cb(_.map(items, function (item) {\n return {\n id: item.itemId,\n name: `${item.itemId} - ${item.name}`\n };\n }));\n };\n if (this.settingsData.items != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'items'\n });\n },\n onChange: (value) => {\n let item = this.settingsData.items.find((item) => item.itemId === value);\n if (item != null) {\n this.model.setSetting('defaultItem', item);\n }\n }\n });\n\n let defaultEntity = this.model.getSetting('defaultEntity');\n new PJQ.inputs.SelectPickerEditorInput({\n el: this.$('.edit-default-entity'),\n isFormInput: true,\n editButtonText: \"Change\",\n label: 'Default Entity',\n title: 'The default entity used when pushing new project locations to Sage Intacct',\n showSaveButton: false,\n defaultDisplayValue: defaultEntity != null ? `${defaultEntity.locationId} - ${defaultEntity.name}` : null,\n value: defaultEntity != null ? defaultEntity.recordNo : null,\n getChoices: (cb) => {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n let fnCallback = () => {\n loader.remove();\n let entities = _.filter(this.settingsData.entities, function (glAccount) {\n return true;\n })\n cb(_.map(entities, function (entity) {\n return {\n id: entity.locationId,\n name: `${entity.locationId} - ${entity.name}`\n };\n }));\n };\n if (this.settingsData.entities != null) {\n fnCallback();\n return;\n }\n\n this.model.fetchSettingsData((data) => {\n this.settingsData = _.extend(this.settingsData, data ?? {});\n fnCallback();\n }, {\n type: 'entities'\n });\n },\n onChange: (value) => {\n let entity = this.settingsData.entities.find((entity) => entity.locationId === value);\n if (entity != null) {\n this.model.setSetting('defaultEntity', entity);\n }\n }\n });\n },\n editAuthorization: function () {\n this.options.editingAuthorization = true;\n this.render();\n },\n cancelEditingAuthorization: function () {\n this.options.editingAuthorization = false;\n this.render();\n },\n validate: function () {\n if (this.options.editingAuthorization) {\n return true;\n }\n\n let settings = this.model.get('settings'),\n valid = true;\n if (settings.defaultReceivableAccount == null) {\n valid = false;\n this.$('.edit-default-receivable-account .form-group > label').addClass('text-danger');\n }\n\n if (settings.defaultPayableAccount == null) {\n valid = false;\n this.$('.edit-default-payable-account .form-group > label').addClass('text-danger');\n }\n\n if (settings.defaultItem == null) {\n valid = false;\n this.$('.edit-default-item-id .form-group > label').addClass('text-danger');\n }\n return valid;\n },\n cancel: function () {\n if (this.model && this.model.hasChanged()) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n this.model.restore();\n if (typeof this.options.onCancel === 'function') {\n this.options.onCancel(this.model);\n }\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n },\n save: function () {\n if (this.validate()) {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n this.model.save(null, {\n success: () => {\n loader.remove();\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n if (!this.options.editingAuthorization) {\n PJQ.notifications.notify.successNotify({\n message: 'Settings updated successfully'\n });\n this.removeModal();\n } else {\n PJQ.notifications.notify.successNotify({\n message: 'Successfully Authorized'\n });\n this.options.editingAuthorization = false;\n this.options.isAuthorized = true;\n this.render();\n }\n },\n error: () => {\n loader.remove();\n this.errorAlert = new PJQ.Alert(this.$('.error-container'), {\n type: 'danger',\n text: 'Unable to validate the integration. Double check your information is correct.'\n });\n }\n })\n }\n }\n});","PJQ.views.budget.LineItemsView = PJQ.views.BaseView.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'line-items-view'),\r\n subTemplates: {\r\n invoiceHeader: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'invoice-line-items-header'),\r\n changeRequestHeader: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'change-request-line-items-header'),\r\n actions: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'line-items-actions')\r\n },\r\n isSubmitting: false,\r\n canEdit: true,\r\n canDelete: true,\r\n isAdmin: true,\r\n isCostCodeRequired: true,\r\n isCostTypeRequired: true,\r\n filterToPrimeContractItems: false,\r\n canChangeAccountingMethod: false,\r\n canImportBudget: false,\r\n accountingMethod: PJQ.constants.budget.accountingMethod.AMOUNT,\r\n onAccountingMethodChanged: null,\r\n lineItemModel: PJQ.models.BaseModel,\r\n enableSelection: false,\r\n canSendRFQ: false,\r\n onLineItemAdd: null,\r\n onLineItemChange: null,\r\n onLineItemDelete: null,\r\n onTotalsChanged: null,\r\n enableStoredMaterials: true,\r\n enableRetainage: true,\r\n enableTax: false,\r\n billedToDate: null,\r\n approvedChanges: null,\r\n showMarkup: true,\r\n isBudget: false,\r\n showBilling: false,\r\n showSubTotal: false,\r\n showGrandTotal: false,\r\n showRevenue: false,\r\n copyCostToRevenue: false\r\n },\r\n events: {\r\n 'click .btn-add-standard': 'addStandardCostCodes',\r\n 'click .btn-add-cost-code': 'addCostCodeClicked',\r\n 'click .btn-view-commitment': 'viewCommitment',\r\n 'click .btn-view-change-order': 'viewChangeOrder',\r\n 'click .btn-import-budget': 'importBudget',\r\n 'click .btn-import-file': 'importFile',\r\n 'click .btn-import-contracts': 'importContracts',\r\n 'click .btn-add-line-item': 'addLineItem',\r\n 'click .btn-add-all-line-items': 'addAllPossibleLineItems',\r\n 'click .btn-autofill-amounts': 'autofillAmounts',\r\n 'click .btn-save-line-item': 'saveLineItem',\r\n 'click .btn-delete-line-item': 'deleteLineItemClicked',\r\n 'focus .input-dollars-full,.input-percent,.input-hours': 'selectInput',\r\n 'change .input-progress-percent': 'minimumProgressPercent',\r\n 'click .btn-add-from-change-requests': 'addFromChangeRequests',\r\n 'click .btn-add-from-commitments': 'addFromCommitments',\r\n 'click .select-cr-li': 'lineItemSelected',\r\n 'click .btn-new-commitment': 'createCommitmentFromLineItems',\r\n 'click .btn-existing-commitment': 'addLineItemsToCommitment',\r\n 'click .btn-new-pcco': 'createPCCOFromLineItems',\r\n 'click .btn-existing-pcco': 'addLineItemsToPCCO',\r\n 'click .btn-new-cco': 'createCCOFromLineItems',\r\n 'click .btn-existing-cco': 'addLineItemsToCCO',\r\n 'click .btn-total-fn': 'totalButtonClicked',\r\n 'click .btn-edit-bulk': 'bulkEditLineItems',\r\n 'click .btn-delete-bulk': 'bulkDeleteLineItems',\r\n 'click .select-all-line-items': 'selectAllLineItems',\r\n 'click .btn-edit-line-item-vendor': 'editLineItemVendor',\r\n 'click .btn-send-rfq': 'sendRFQClicked',\r\n 'keyup .input-budgeted-hours': 'lineItemHoursChanged',\r\n },\r\n addStandardCostCodes: function (e) {\r\n let $btn = $(e.currentTarget),\r\n lineItem = this.getLineItemForInput($btn),\r\n subJobId = lineItem.get('subJobId'),\r\n title;\r\n if (subJobId != null) {\r\n title = 'Add Cost Codes To Sub Job';\r\n } else {\r\n title = 'Add Cost Codes To Project'\r\n }\r\n\r\n new PJQ.views.budget.CostCodePickerModal({\r\n title: title,\r\n pickerOptions: {\r\n showDisabledAsSelected: true,\r\n isCostCodeDisabled: _.bind(function (costCode) {\r\n return null != _.find(this.costCodes.models, function (pCostCode) {\r\n return (subJobId == null || pCostCode.get('subJobId') === subJobId) && pCostCode.get('code').toLowerCase() === costCode.get('code').toLowerCase();\r\n })\r\n }, this)\r\n },\r\n onSave: _.bind(function (newCostCodes) {\r\n if (_.size(newCostCodes) > 0) {\r\n this.costCodes.saveBulk(newCostCodes, subJobId, _.bind(function (savedCostCodes) {\r\n if (savedCostCodes) {\r\n if (this.options.project) {\r\n this.options.project.costCodes.add(savedCostCodes);\r\n }\r\n this.renderLineItemsTable();\r\n PJQ.notifications.notify.successNotify({\r\n message: _.size(savedCostCodes).toString() + ' Company Cost Codes added to project'\r\n });\r\n } else {\r\n // todo: error\r\n }\r\n }, this));\r\n }\r\n }, this)\r\n });\r\n },\r\n sendRFQClicked: function () {\r\n if (typeof this.options.onSendRFQ === 'function') {\r\n this.options.onSendRFQ({\r\n selectedIds: this.options.selectedLineItems,\r\n projectCommitments: this.projectCommitments\r\n });\r\n }\r\n },\r\n addCostCodeClicked: function (e) {\r\n let $btn = $(e.currentTarget),\r\n lineItem = this.getLineItemForInput($btn);\r\n new PJQ.views.budget.EditCostCodeModal({\r\n project: PJQ.app.session.project,\r\n onSave: _.bind(function (costCode) {\r\n this.costCodes.add(costCode);\r\n lineItem.set('costCodeId', costCode.id);\r\n this.renderLineItemsTable();\r\n }, this)\r\n });\r\n },\r\n beforeFirstRender: async function () {\r\n this.options.project = this.options.project != null ? this.options.project : PJQ.app.session.project;\r\n this.options.addingNewContractLineItems = [];\r\n this.isReceivableInvoices = this.options.lineItemModel === PJQ.models.invoicing.ReceivableInvoiceLineItem;\r\n this.isInvoices = this.options.lineItemModel === PJQ.models.invoicing.PayableInvoiceLineItem\r\n || this.isReceivableInvoices;\r\n this.isDirectCosts = this.options.lineItemModel === PJQ.models.directcosts.LineItem;\r\n this.isChangeRequests = this.options.lineItemModel === PJQ.models.changeRequests.ChangeRequestLineItem;\r\n this.isPCCO = this.options.lineItemModel === PJQ.models.primeContracts.ChangeOrderLineItem;\r\n this.isCCO = this.options.lineItemModel === PJQ.models.commitments.ChangeOrderLineItem;\r\n this.isCommitments = this.options.lineItemModel === PJQ.models.commitments.CommitmentLineItem;\r\n\r\n this.isFetched = false;\r\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\r\n if (this.erpIntegration != null && this.options.project.isERPSynced()) {\r\n if (this.options.lineItemModel === PJQ.models.commitments.ChangeOrderLineItem) {\r\n this.options.filterToCommitmentCostCodes = this.options.commitmentId > 0 && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.COMMITMENT_CO_SOV_FILTER_TO_COMMITMENT_SOV);\r\n }\r\n\r\n if (this.options.lineItemModel === PJQ.models.primeContracts.ChangeOrderLineItem || this.options.lineItemModel === PJQ.models.changeRequests.ChangeRequestLineItem) {\r\n this.options.filterToPrimeContractItems = this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PRIME_CONTRACT_CO_SOV_REQUIRE_LINKED_CONTRACT_CO);\r\n\r\n if (this.options.filterToPrimeContractItems && this.options.lineItemModel === PJQ.models.primeContracts.ChangeOrderLineItem) {\r\n this.options.requirePrimeContractItem = true;\r\n }\r\n\r\n this.options.isCostCodeRequired = this.options.isCostTypeRequired = !(true === this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PRIME_CONTRACT_CO_SOV_BUDGET_CODE_NOT_REQUIRED));\r\n } else if (this.options.lineItemModel === PJQ.models.primeContracts.LineItem) {\r\n this.options.isCostCodeRequired = this.options.isCostTypeRequired = !(true === this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PRIME_CONTRACT_SOV_BUDGET_CODE_NOT_REQUIRED));\r\n }\r\n }\r\n\r\n if (this.options.project.hasPermission('budget.canView')) {\r\n this.budget = await this.options.project.fetchBudget();\r\n }\r\n this.subJobs = await this.options.project.fetchSubJobs();\r\n this.costCodes = await this.options.project.fetchCostCodes();\r\n this.costTypes = await this.options.project.fetchCostTypes();\r\n\r\n if (this.options.enableTax) {\r\n this.taxCodes = await this.options.project.fetchTaxCodes();\r\n this.options.enableTax = _.size(this.taxCodes.models) > 0;\r\n }\r\n\r\n this.unitsOfMeasure = await this.options.project.fetchUnitsOfMeasure();\r\n\r\n if (this.options.project && this.isChangeRequests && this.options.canEdit) {\r\n this.projectCommitments = new PJQ.collections.commitments.Commitments([], {\r\n projectId: this.options.project.id,\r\n withLineItems: true\r\n });\r\n await this.projectCommitments.fetch();\r\n }\r\n\r\n this.isFetched = true;\r\n this.render(true);\r\n },\r\n beforeRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n\r\n this.canAddCommitments = this.options.project.hasPermission('commitments.canAdd');\r\n this.canAddCommitmentChangeOrders = this.options.project.hasPermission('commitmentChangeOrders.canAdd');\r\n this.canAddContractChangeOrders = this.options.project.hasPermission('primeContractChangeOrders.canAdd');\r\n },\r\n renderData: function () {\r\n return {\r\n project: PJQ.app.session.project,\r\n subJobs: this.subJobs,\r\n costCodes: this.costCodes,\r\n costTypes: this.costTypes,\r\n isInvoices: this.isInvoices,\r\n isDirectCosts: this.isDirectCosts,\r\n isChangeRequests: this.isChangeRequests,\r\n canApplyChangeRequestCosts: this.options.canApplyChangeRequestCosts,\r\n canApplyChangeRequestRevenue: this.options.canApplyChangeRequestRevenue,\r\n enableSelection: this.options.enableSelection,\r\n canSendRFQ: this.options.canSendRFQ,\r\n onSendRFQ: null,\r\n isReceivableInvoices: this.isReceivableInvoices,\r\n canImportBudget: this.options.canImportBudget,\r\n canChangeAccountingMethod: this.options.canChangeAccountingMethod,\r\n canEdit: this.options.canEdit,\r\n isBudget: this.options.isBudget,\r\n isFetched: this.isFetched,\r\n isCCO: this.isCCO,\r\n isPCCO: this.isPCCO,\r\n showRevenue: this.options.showRevenue,\r\n selectedLineItems: this.options.selectedLineItems,\r\n isCommitments: this.isCommitments,\r\n canAddCommitments: this.canAddCommitments,\r\n canAddCommitmentChangeOrders: this.canAddCommitmentChangeOrders,\r\n canAddContractChangeOrders: this.canAddContractChangeOrders\r\n };\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n this.accountingMethodPicker = new PJQ.inputs.Selectpicker({\r\n el: this.$('.select-accounting-method'),\r\n isIntChoices: true,\r\n defaultValue: this.options.accountingMethod,\r\n canEdit: this.options.canEdit && _.size(this.getVisibleLineItems()) === 0,\r\n onChange: _.bind(function (value) {\r\n this.options.accountingMethod = value;\r\n if (typeof this.options.onAccountingMethodChanged === 'function') {\r\n this.options.onAccountingMethodChanged(value);\r\n }\r\n this.renderLineItemsTable();\r\n }, this)\r\n });\r\n this.renderActions();\r\n this.renderLineItemsTable();\r\n this.updateAccountingMethodSelector();\r\n this.renderTotals();\r\n },\r\n minimumProgressPercent: function (e) {\r\n let $input = $(e.currentTarget),\r\n lineItem = this.getLineItemForInput($input);\r\n if (lineItem != null) {\r\n let percent = lineItem.get('progressPercent'),\r\n totalProgressPercent = lineItem.get('progressPercentTotal');\r\n if (percent < totalProgressPercent) {\r\n $input.val(PJQ.helpers.formatHelpers.formatPercent(totalProgressPercent));\r\n lineItem.set('progressPercent', totalProgressPercent);\r\n }\r\n }\r\n },\r\n selectInput: function (e) {\r\n let el = $(e.currentTarget)[0];\r\n if (this.focusInput !== el) {\r\n this.focusInput = el;\r\n setTimeout(_.bind(function () {\r\n this.focusInput.select();\r\n }, this), 100);\r\n }\r\n },\r\n importBudget: function () {\r\n PJQ.app.session.project.fetchBudget(_.bind(function (budget) {\r\n let newLineItems = [],\r\n counter = 1;\r\n _.each(_.sortBy(budget.lineItems.models, function (lineItem) {\r\n return lineItem.get('sortOrder');\r\n }), function (lineItem) {\r\n newLineItems.push(new this.options.lineItemModel({\r\n subJobId: lineItem.get('subJobId'),\r\n costCodeId: lineItem.get('costCodeId'),\r\n costTypeId: lineItem.get('costTypeId'),\r\n amount: lineItem.get('budgetedCost'),\r\n description: '',\r\n number: counter,\r\n accountingMethod: this.options.accountingMethod\r\n }));\r\n counter++;\r\n }, this);\r\n this.collection.reset(newLineItems);\r\n this.renderLineItemsTable();\r\n }, this));\r\n },\r\n importFile: function () {\r\n this.renderUploader();\r\n },\r\n importContracts: function () {\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: PJQ.app.session.project.id\r\n },\r\n {\r\n endpoint: 'budgets',\r\n value: 'lineitems'\r\n },\r\n {\r\n endpoint: 'import',\r\n value: 'contracts'\r\n }\r\n ]),\r\n isAPIv2: true,\r\n }).get().done(_.bind(function (data) {\r\n this.collection.add(_.filter(data, (lineItem) => {\r\n return null == this.collection.findWhere({\r\n costCodeId: lineItem.costCodeId,\r\n costTypeId: lineItem.costTypeId\r\n });\r\n }));\r\n this.renderLineItemsTable();\r\n if (typeof this.options.onLineItemAdd === 'function') {\r\n this.options.onLineItemAdd();\r\n }\r\n }, this)).fail(_.bind(function (data) {\r\n\r\n }, this));\r\n },\r\n getVisibleLineItems: function () {\r\n return _.filter(this.collection.models, function (model) {\r\n return !model.get('delete');\r\n });\r\n },\r\n renderUploader: function () {\r\n let $uploader = this.$('.import-uploader');\r\n if (this.fileUploader == null) {\r\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\r\n el: $uploader,\r\n useApiV2: true,\r\n allowedExtensions: ['xls', 'xlsx', 'csv'],\r\n uploadTemplateCallback: () => {\r\n PJQ.files.downloadFile(PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'budgets'\r\n },\r\n {\r\n endpoint: 'lineitems'\r\n },\r\n {\r\n endpoint: 'import'\r\n },\r\n {\r\n endpoint: 'template'\r\n }\r\n ]), {isAPIv2: true});\r\n },\r\n maxFiles: 1,\r\n style: 'grid',\r\n onSuccess: _.bind(function (file) {\r\n let loader = new PJQ.Loader($uploader);\r\n let uploadId = file.uploadId;\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'projects',\r\n value: PJQ.app.session.project.id,\r\n },\r\n {\r\n endpoint: 'budgets'\r\n },\r\n {\r\n endpoint: 'lineitems'\r\n },\r\n {\r\n endpoint: 'import',\r\n value: uploadId\r\n }\r\n ]),\r\n isAPIv2: true\r\n }).post().done(_.bind(function (result) {\r\n loader.remove();\r\n this.fileUploader.remove();\r\n this.subJobs.add(result.subJobs);\r\n this.costCodes.add(result.costCodes);\r\n this.costTypes.add(result.costTypes);\r\n this.collection.add(result.lineItems);\r\n this.renderLineItemsTable();\r\n if (typeof this.options.onLineItemAdd === 'function') {\r\n this.options.onLineItemAdd();\r\n }\r\n }, this)).fail((err) => {\r\n if (err && err.responseJSON) {\r\n loader.remove();\r\n let file = this.fileUploader.collection.models[0];\r\n this.fileUploader.collection.remove(file);\r\n this.fileUploader.render();\r\n this.fileUploader.showError(err.responseJSON.message, 10000);\r\n }\r\n });\r\n }, this)\r\n });\r\n } else {\r\n // Hide file uploader if button is clicked again\r\n $uploader.attr('hidden', !$uploader.attr('hidden'));\r\n }\r\n let self = this;\r\n $uploader.find('.btn-download-template').off('click').on('click', self.downloadImportTemplate);\r\n },\r\n updateAccountingMethodSelector: function () {\r\n if (this.accountingMethodPicker != null) {\r\n if (!this.options.canEdit || _.size(this.getVisibleLineItems()) > 0) {\r\n this.accountingMethodPicker.disable();\r\n } else {\r\n this.accountingMethodPicker.enable();\r\n }\r\n }\r\n },\r\n renderTotals: function () {\r\n let amount = 0,\r\n billed = 0;\r\n _.each(this.collection.models.filter((lineItem) => {\r\n return !lineItem.get('delete');\r\n }), function (lineItem) {\r\n billed += lineItem.get('progressAmount');\r\n if (this.isInvoices) {\r\n amount += lineItem.get('progressAmount') + lineItem.get('materialsNew') - lineItem.get('workRetainage') - lineItem.get('materialRetainage') + lineItem.get('workRetainageReleased') + lineItem.get('materialRetainageReleased');\r\n } else if (this.options.isBudget) {\r\n amount += lineItem.get('budgetedCost');\r\n } else {\r\n amount += lineItem.get('amount');\r\n }\r\n }, this);\r\n\r\n this.$('.line-items-amount').text(PJQ.helpers.formatHelpers.formatCurrency(amount));\r\n if (!this.isInvoices) {\r\n this.$('.line-items-billed').text(PJQ.helpers.formatHelpers.formatCurrency(billed));\r\n this.$('.line-items-remaining').text(PJQ.helpers.formatHelpers.formatCurrency((amount - billed)));\r\n }\r\n\r\n if (typeof this.options.onTotalsChanged === 'function') {\r\n this.options.onTotalsChanged();\r\n }\r\n\r\n this.renderTableFooter();\r\n },\r\n getColumns: function () {\r\n let columns = [];\r\n if (this.options.enableSelection && (this.options.canApplyChangeRequestRevenue || this.options.canApplyChangeRequestCosts || this.options.canSendRFQ || this.isInvoices)) {\r\n columns.push({\r\n \"title\": '
',\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"render\": _.bind(function (data, type, row) {\r\n let enable = !row.get('revenueLineItemId') || !row.get('costLineItemId');\r\n\r\n if (!row.markup && !row.get('appliedMarkupId')) {\r\n return ('
');\r\n } else {\r\n return '';\r\n }\r\n }, this),\r\n \"width\": '4%'\r\n });\r\n }\r\n\r\n let fnBudgetCodeCols = () => {\r\n if (this.isInvoices) {\r\n return [\r\n {\r\n \"columnData\": \"costCodeId\",\r\n \"title\": \"Budget Code\",\r\n \"titleSettings\": \"Budget Code\",\r\n \"width\": this.isChangeRequests ? '15%' : '20%',\r\n \"render\": (data, type, row) => {\r\n if (this.options.canEdit && row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let costCode = this.costCodes.get(row.get('costCodeId')),\r\n costType = this.costTypes.get(row.get('costTypeId'));\r\n return '
' + (costCode ? costCode.getDisplayName() : '') + '
' + '
' + (costType ? costType.get('name') : '') + '
';\r\n }\r\n }];\r\n } else if (this.options.canEdit) {\r\n return [{\r\n \"columnData\": \"costCodeId\",\r\n \"title\": \"Cost Code\",\r\n \"width\": this.isChangeRequests ? '15%' : '20%',\r\n \"render\": (data, type, row) => {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && row.isNew() && (!this.isChangeRequests && !row.get('changeRequestLineItemId') || this.isChangeRequests && !row.get('costLineItemId') && !row.get('revenueLineItemId')) && markup == null) {\r\n let res = '
';\r\n if (PJQ.app.session.project.hasPermission('budget.isAdmin')) {\r\n // res += ``\r\n\r\n if ((PJQ.app.session.erpIntegration == null || (PJQ.app.session.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_PROJECT_COST_CODES) && PJQ.app.session.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PROJECT_SPECIFIC_COST_CODES)))) {\r\n res += `
\r\n \r\n \r\n
`;\r\n } else {\r\n res += ``;\r\n }\r\n }\r\n res += '
';\r\n return res;\r\n } else {\r\n let costCode = this.costCodes.get(row.get('costCodeId'));\r\n return costCode ? costCode.getDisplayName() : '';\r\n }\r\n }\r\n },\r\n {\r\n \"columnData\": \"costTypeId\",\r\n \"title\": \"Type\",\r\n \"titleSettings\": \"Cost Type\",\r\n \"width\": this.isChangeRequests ? \"7%\" : \"10%\",\r\n \"render\": (data, type, row) => {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && row.isNew() && (!this.isChangeRequests && !row.get('changeRequestLineItemId') || this.isChangeRequests && !row.get('costLineItemId') && !row.get('revenueLineItemId')) && markup == null) {\r\n return '';\r\n } else {\r\n let costType = this.costTypes.get(row.get('costTypeId'));\r\n return costType ? costType.get('name') : '';\r\n }\r\n }\r\n }];\r\n } else {\r\n return [\r\n {\r\n \"columnData\": \"costCodeId\",\r\n \"title\": \"Budget Code\",\r\n \"titleSettings\": \"Budget Code\",\r\n \"width\": this.isChangeRequests ? '15%' : '20%',\r\n \"render\": (data, type, row) => {\r\n if (this.isInvoices && row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n let costCode = this.costCodes.get(row.get('costCodeId')),\r\n costType = this.costTypes.get(row.get('costTypeId'));\r\n return '
' + (costCode ? costCode.getDisplayName() : '') + '
' + '
' + (costType ? costType.get('name') : '') + '
';\r\n }\r\n }];\r\n }\r\n }\r\n\r\n if (this.isInvoices) {\r\n columns.push(...[\r\n {\r\n \"columnData\": \"attributes.number\",\r\n \"title\": \"#\",\r\n \"width\": \"50px\",\r\n \"render\": (data, type, row, opt) => {\r\n let self = this;\r\n\r\n return `
${(opt.row + 1).toString()}
`;\r\n }\r\n },\r\n {\r\n \"columnData\": \"attributes.id\",\r\n \"title\": \"Source\",\r\n \"render\": _.bind(function (data, type, row) {\r\n let result;\r\n if (row.get('commitmentId') > 0) {\r\n result = '' + row.get('commitmentNumber') + '';\r\n } else if (row.get('primeContractId') > 0) {\r\n result = '' + row.get('primeContractNumber') + '';\r\n } else if (row.get('changeOrderId') > 0) {\r\n result = '' + row.get('changeOrderNumber') + '';\r\n } else {\r\n result = '';\r\n }\r\n return '
' + result + '
';\r\n }, this)\r\n },\r\n {\r\n \"columnData\": \"subJobId\",\r\n \"title\": \"Sub Job\",\r\n \"visible\": _.size(this.subJobs.models) > 0,\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n let subJob = this.subJobs.get(row.get('subJobId'));\r\n return '
' + (subJob ? subJob.get('name') : '') + '
';\r\n }, this)\r\n },\r\n ...fnBudgetCodeCols(),\r\n {\r\n \"columnData\": \"description\",\r\n \"data\": \"attributes.description\",\r\n \"title\": \"Description\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n return '
' + row.get('description') + '
';\r\n }, this)\r\n },\r\n {\r\n \"columnData\": \"committedAmount\",\r\n \"data\": \"\",\r\n \"title\": \"Scheduled Value\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n return '
' + PJQ.helpers.formatHelpers.formatCurrency(row.get('committedAmount')) + '
'\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('committedAmount');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"progressAmountTotal\",\r\n \"data\": \"attributes.progressAmountTotal\",\r\n \"title\": \"$\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n return '
' + PJQ.helpers.formatHelpers.formatCurrency(row.get('progressAmountTotal')) + '
';\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('progressAmountTotal');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"progressPercentTotal\",\r\n \"data\": \"attributes.progressPercentTotal\",\r\n \"title\": \"%\",\r\n \"format\": \"percent\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n return '
' + PJQ.helpers.formatHelpers.formatPercent(row.get('progressPercentTotal')) + '
';\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n if (_.size(data) > 0) {\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('progressPercentTotal');\r\n });\r\n amt = amt / _.size(data)\r\n }\r\n return PJQ.helpers.formatHelpers.formatPercent(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"progressAmount\",\r\n \"data\": \"attributes.progressAmount\",\r\n \"title\": \"$\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n if (this.options.canEdit) {\r\n return '';\r\n } else {\r\n return '
' + PJQ.helpers.formatHelpers.formatCurrency(row.get('progressAmount')) + '
';\r\n }\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('progressAmount');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"progressPercent\",\r\n \"data\": \"attributes.progressPercent\",\r\n \"title\": \"%\",\r\n \"format\": \"percent\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit) {\r\n result = ''\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatPercent(row.get('progressPercent'));\r\n }\r\n return result;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n if (_.size(data) > 0) {\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('progressPercent');\r\n });\r\n amt = amt / _.size(data)\r\n }\r\n return PJQ.helpers.formatHelpers.formatPercent(Math.round(amt * 100) / 100);\r\n }\r\n }]);\r\n if (this.options.enableStoredMaterials) {\r\n columns.push(...[{\r\n \"columnData\": \"materialsNew\",\r\n \"data\": \"attributes.materialsNew\",\r\n \"title\": \"New\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit) {\r\n result = '';\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatCurrency(row.get('materialsNew'));\r\n }\r\n return result;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('materialsNew');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"materialsStored\",\r\n \"data\": \"attributes.materialsStored\",\r\n \"title\": \"Stored\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n return '
' + PJQ.helpers.formatHelpers.formatCurrency(Math.max(0, row.getMaterialsStored(this.model))) + '
'\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('materialsStored');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n }]);\r\n }\r\n\r\n if (this.options.enableTax) {\r\n columns.push({\r\n \"columnData\": \"taxAmount\",\r\n \"data\": \"attributes.taxAmount\",\r\n \"width\": \"10%\",\r\n \"title\": \"Tax\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (this.isInvoices && row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n let taxAmount = PJQ.helpers.formatHelpers.formatCurrency(row.get('taxAmount'));\r\n if (this.options.canEdit) {\r\n return '' + taxAmount + '';\r\n }\r\n return taxAmount;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('taxAmount');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n });\r\n }\r\n\r\n columns.push(...[{\r\n \"columnData\": \"\",\r\n \"data\": \"\",\r\n \"title\": \"Total Completed and Stored\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return ''\r\n }\r\n\r\n return '
' + PJQ.helpers.formatHelpers.formatCurrency(row.getTotalCompleteAndStored(this.model)) + '
'\r\n }, this),\r\n \"renderFooter\": _.bind(function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.getTotalCompleteAndStored(this.model);\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }, this)\r\n },\r\n {\r\n \"columnData\": \"\",\r\n \"data\": \"\",\r\n \"title\": \"Balance To Finish\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n return '
' + PJQ.helpers.formatHelpers.formatCurrency(row.getBalanceToFinish(this.model)) + '
'\r\n }, this),\r\n \"renderFooter\": _.bind(function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.getBalanceToFinish(this.model);\r\n }, this);\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }, this)\r\n }]);\r\n if (this.options.enableRetainage) {\r\n columns.push(...[{\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.workRetainage\",\r\n \"title\": \"$\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit && !this.options.isSubmitting) {\r\n result = '';\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatCurrency(row.get('workRetainage'));\r\n }\r\n return result;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('workRetainage');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.workRetainagePercent\",\r\n \"title\": \"%\",\r\n \"format\": \"percent\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit && !this.options.isSubmitting) {\r\n result = ''\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatPercent(row.get('workRetainagePercent'));\r\n }\r\n return result\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n if (_.size(data) > 0) {\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('workRetainagePercent');\r\n });\r\n amt = amt / _.size(data)\r\n }\r\n return PJQ.helpers.formatHelpers.formatPercent(Math.round(amt * 100) / 100);\r\n }\r\n }]);\r\n if (this.options.enableStoredMaterials) {\r\n columns.push(...[{\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.materialRetainage\",\r\n \"title\": \"$\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit && !this.options.isSubmitting) {\r\n result = '';\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatCurrency(row.get('materialRetainage'));\r\n }\r\n return result\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('materialRetainage');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.materialRetainagePercent\",\r\n \"title\": \"%\",\r\n \"format\": \"percent\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit && !this.options.isSubmitting) {\r\n result = ''\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatPercent(row.get('materialRetainagePercent'));\r\n }\r\n return result\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n if (_.size(data) > 0) {\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('materialRetainagePercent');\r\n });\r\n amt = amt / _.size(data)\r\n }\r\n return PJQ.helpers.formatHelpers.formatPercent(Math.round(amt * 100) / 100);\r\n }\r\n }]);\r\n }\r\n columns.push(...[{\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.workRetainageReleased\",\r\n \"title\": \"$\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit) {\r\n result = '';\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatCurrency(row.get('workRetainageReleased'));\r\n }\r\n return result;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('workRetainageReleased');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.workRetainageReleasedPercent\",\r\n \"title\": \"%\",\r\n \"format\": \"percent\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit) {\r\n result = ''\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatPercent(row.get('workRetainageReleasedPercent'));\r\n }\r\n return result;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n if (_.size(data) > 0) {\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('workRetainageReleasedPercent');\r\n });\r\n amt = amt / _.size(data)\r\n }\r\n return PJQ.helpers.formatHelpers.formatPercent(Math.round(amt * 100) / 100);\r\n }\r\n }]);\r\n if (this.options.enableStoredMaterials) {\r\n columns.push(...[{\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.materialRetainageReleased\",\r\n \"title\": \"$\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit) {\r\n result = '';\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatCurrency(row.get('materialRetainageReleased'));\r\n }\r\n return result;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('materialRetainageReleased');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n },\r\n {\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.materialRetainageReleasedPercent\",\r\n \"title\": \"%\",\r\n \"format\": \"percent\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n\r\n let result;\r\n if (this.options.canEdit) {\r\n result = ''\r\n } else {\r\n result = PJQ.helpers.formatHelpers.formatPercent(row.get('materialRetainageReleasedPercent'));\r\n }\r\n return result;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n if (_.size(data) > 0) {\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('materialRetainageReleasedPercent');\r\n });\r\n amt = amt / _.size(data)\r\n }\r\n return PJQ.helpers.formatHelpers.formatPercent(Math.round(amt * 100) / 100);\r\n }\r\n }]);\r\n }\r\n columns.push({\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.workRetainageTotal\",\r\n \"title\": \"$\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n return '
' + PJQ.helpers.formatHelpers.formatCurrency(row.getWorkRetainageRemaining(this.model)) + '
';\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.getWorkRetainageRemaining(this.model);\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n });\r\n if (this.options.enableStoredMaterials) {\r\n columns.push({\r\n \"columnData\": \"\",\r\n \"data\": \"attributes.materialRetainageTotal\",\r\n \"title\": \"$\",\r\n \"format\": \"money\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n if (row.get('lineItemId') == null) {\r\n return '';\r\n }\r\n return '
' + PJQ.helpers.formatHelpers.formatCurrency(row.getMaterialRetainageRemaining(this.model)) + '
';\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.getMaterialRetainageRemaining(this.model);\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n });\r\n }\r\n }\r\n } else {\r\n columns.push(...[\r\n {\r\n \"columnData\": \"attributes.number\",\r\n \"title\": \"#\",\r\n \"width\": `5%`,\r\n \"render\": _.bind(function (data, type, row, opt) {\r\n let isAppliedLineItem = row.markup != null || row.get('appliedMarkupId') != null,\r\n html = '
';\r\n if (row.get('changeRequestLineItemId')) {\r\n html += ''\r\n }\r\n\r\n if (isAppliedLineItem) {\r\n html += ''\r\n }\r\n\r\n html += (opt.row + 1).toString();\r\n\r\n return `${html}
`;\r\n }, this)\r\n },\r\n {\r\n \"columnData\": \"attributes\",\r\n \"title\": \"Contract Item\",\r\n \"visible\": this.options.filterToPrimeContractItems,\r\n \"render\": _.bind(function (data, type, row) {\r\n if (this.options.canEdit && (!this.isChangeRequests || (this.isChangeRequests && !row.get('costLineItemId') && !row.get('revenueLineItemId')))) {\r\n if (this.options.addingNewContractLineItems.includes(row.cid)) {\r\n return ''\r\n } else {\r\n return '';\r\n }\r\n } else {\r\n return row.get('description');\r\n }\r\n }, this)\r\n },\r\n {\r\n \"columnData\": \"attributes\",\r\n \"title\": \"Commitment Line Item\",\r\n \"width\": '10%',\r\n \"visible\": this.isCCO && PJQ.app.session.erpIntegration?.hasAvailableAction(PJQ.constants.integrations.actions.RELATE_CCO_LINE_TO_COMMITMENT_LINE) === true,\r\n \"render\": _.bind(function (data, type, row) {\r\n let commitmentLineItemId = row.get('commitmentLineItemId'),\r\n commitmentLineItem = commitmentLineItemId > 0 ? this.options.commitment?.lineItems.findWhere({id: commitmentLineItemId}) : null;\r\n\r\n if (this.options.canEdit) {\r\n return '';\r\n } else {\r\n if (commitmentLineItem != null) {\r\n let costCode = this.costCodes.get(commitmentLineItem.get('costCodeId')),\r\n costType = this.costTypes.get(commitmentLineItem.get('costTypeId'));\r\n\r\n return `${costCode.get('name')} - ${costType.get('name')} | ${PJQ.helpers.formatHelpers.formatCurrency(commitmentLineItem.get('totalAmount'))}`\r\n } else {\r\n return '';\r\n }\r\n }\r\n }, this)\r\n },\r\n {\r\n \"columnData\": \"subJobId\",\r\n \"title\": \"Sub Job\",\r\n \"visible\": _.size(this.subJobs.models) > 0,\r\n \"width\": this.isChangeRequests ? \"10%\" : \"15%\",\r\n \"render\": _.bind(function (data, type, row) {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && row.isNew() && (!this.isChangeRequests && !row.get('changeRequestLineItemId') || (this.isChangeRequests && !row.get('costLineItemId') && !row.get('revenueLineItemId'))) && markup == null) {\r\n return '';\r\n } else {\r\n let subJob = this.subJobs.get(row.get('subJobId'));\r\n return subJob ? (subJob.get('code') + ' - ' + subJob.get('name')) : '';\r\n }\r\n }, this)\r\n },\r\n ...fnBudgetCodeCols()]);\r\n\r\n if (this.isChangeRequests) {\r\n if (this.options.showRevenue) {\r\n columns.push({\r\n \"columnData\": \"pccoId\",\r\n \"title\": \"Contract CO\",\r\n \"width\": \"140px\",\r\n \"visible\": this.isChangeRequests,\r\n \"render\": _.bind(function (data, type, row) {\r\n let pccoId = row.get('pccoId'),\r\n html = '';\r\n\r\n if (row.get('revenueLineItemId') > 0) {\r\n html += ''\r\n }\r\n\r\n if (row.get('revenueLineItemId') > 0 && pccoId > 0) {\r\n if (pccoId > 0) {\r\n html += '';\r\n }\r\n }\r\n return '
' + html + '
';\r\n }, this)\r\n });\r\n }\r\n\r\n columns.push(...[\r\n {\r\n \"columnData\": \"vendor\",\r\n \"title\": \"Company\",\r\n \"width\": \"140px\",\r\n \"visible\": this.isChangeRequests,\r\n \"render\": _.bind(function (data, type, row) {\r\n let vendor = row.get('vendor') ?? null,\r\n html = \"\",\r\n markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && markup == null) {\r\n html += '';\r\n } else if (vendor != null) {\r\n html += PJQ.helpers.contacts.getContactAnchor({contact: vendor, useCompanyName: true});\r\n } else {\r\n html += '
Not Assigned
';\r\n }\r\n\r\n return \"
\" + html + \"
\"\r\n }, this)\r\n },\r\n {\r\n \"columnData\": \"commitmentId\",\r\n \"title\": \"Commitment\",\r\n \"width\": \"140px\",\r\n \"visible\": this.isChangeRequests,\r\n \"render\": (data, type, row) => {\r\n let commitmentId = row.get('commitmentId'),\r\n ccoId = row.get('ccoId'),\r\n html = '',\r\n markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n\r\n if (row.get('costLineItemId') > 0) {\r\n html += ''\r\n }\r\n\r\n if (row.get('costLineItemId') > 0 || !this.options.canEdit || markup != null) {\r\n if (commitmentId > 0) {\r\n html += '';\r\n } else if (ccoId > 0) {\r\n html += '';\r\n }\r\n } else if (this.options.canEdit) {\r\n html += '';\r\n }\r\n return '
' + html + '
';\r\n }\r\n }\r\n ]);\r\n }\r\n\r\n columns.push(...[\r\n {\r\n \"columnData\": \"description\",\r\n \"visible\": !this.options.filterToPrimeContractItems,\r\n \"data\": \"attributes.description\",\r\n \"width\": this.isChangeRequests && this.options.canApplyChangeRequestRevenue ? \"20%\" : null,\r\n \"title\": \"Description\",\r\n \"render\": _.bind(function (data, type, row) {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && markup == null) {\r\n return '';\r\n } else {\r\n return row.get('description');\r\n }\r\n }, this)\r\n }\r\n ]);\r\n\r\n if (this.options.isBudget) {\r\n columns.push({\r\n \"data\": \"attributes.budgetedHours\",\r\n \"width\": \"120px\",\r\n \"title\": \"Hours\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": (data, type, row) => {\r\n let hrs = row.get('budgetedHours');\r\n if (this.options.canEdit) {\r\n return '';\r\n }\r\n return hrs;\r\n }\r\n },);\r\n }\r\n\r\n if ((this.options.showMarkup !== false || this.options.canEdit) && this.options.accountingMethod === PJQ.constants.budget.accountingMethod.UNIT_QUANTITY) {\r\n columns.push(...[\r\n {\r\n \"columnData\": \"quantity\",\r\n \"data\": \"attributes.quantity\",\r\n \"width\": \"5%\",\r\n \"title\": \"Quantity\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": (data, type, row) => {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && (!this.isChangeRequests && !row.get('changeRequestLineItemId') || (this.isChangeRequests && !row.get('revenueLineItemId') && !row.get('costLineItemId'))) && markup == null) {\r\n return '';\r\n } else {\r\n return row.get('quantity');\r\n }\r\n }\r\n },\r\n {\r\n \"columnData\": \"unitOfMeasure\",\r\n \"data\": \"attributes.unitId\",\r\n \"title\": \"Unit\",\r\n \"width\": \"5%\",\r\n \"className\": \"text-align-center\",\r\n \"render\": (data, type, row) => {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && (!this.isChangeRequests && !row.get('changeRequestLineItemId') || (this.isChangeRequests && !row.get('revenueLineItemId') && !row.get('costLineItemId'))) && markup == null) {\r\n return '';\r\n } else {\r\n let unitOfMeasure = this.unitsOfMeasure.get(row.get('unitId'));\r\n return unitOfMeasure ? unitOfMeasure.get('name') : '';\r\n }\r\n }\r\n },\r\n {\r\n \"columnData\": \"unitPrice\",\r\n \"data\": \"attributes.unitPrice\",\r\n \"width\": \"10%\",\r\n \"title\": \"Unit Price\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": (data, type, row) => {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && (!this.isChangeRequests && !row.get('changeRequestLineItemId') || (this.isChangeRequests && !row.get('revenueLineItemId') && !row.get('costLineItemId'))) && markup == null) {\r\n return '';\r\n } else {\r\n return '' + PJQ.helpers.formatHelpers.formatCurrency(row.get('unitPrice')) + '';\r\n }\r\n }\r\n }\r\n ]);\r\n } else if (this.options.showMarkup !== false || this.options.canEdit) {\r\n columns.push({\r\n \"columnData\": \"amount\",\r\n \"data\": \"attributes.amount\",\r\n \"width\": \"10%\",\r\n \"title\": this.isChangeRequests ? \"Cost\" : \"Amount\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && (!this.isChangeRequests || (!row.get('revenueLineItemId') && !row.get('costLineItemId'))) && markup == null) {\r\n if (this.options.accountingMethod === PJQ.constants.budget.accountingMethod.AMOUNT) {\r\n if (this.options.isBudget) {\r\n return '';\r\n } else {\r\n return '';\r\n }\r\n }\r\n return '' + PJQ.helpers.formatHelpers.formatCurrency(row.get('amount')) + '';\r\n }\r\n\r\n return '' + PJQ.helpers.formatHelpers.formatCurrency(row.get('amount')) + '';\r\n }, this),\r\n \"renderFooter\": _.bind(function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n if (this.options.isBudget) {\r\n amt += lineItem.get('budgetedCost')\r\n } else {\r\n amt += lineItem.get('amount')\r\n }\r\n }, this);\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }, this)\r\n });\r\n }\r\n\r\n if (this.isChangeRequests && this.options.showRevenue) {\r\n columns.push({\r\n \"columnData\": \"revenue\",\r\n \"data\": \"attributes.revenue\",\r\n \"width\": \"10%\",\r\n \"title\": \"Revenue\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n let markup = row.markup ? row.markup : this.options.financialMarkups?.findWhere({id: row.get('appliedMarkupId')});\r\n if (this.options.canEdit && !row.get('revenueLineItemId') && markup == null) {\r\n return '';\r\n }\r\n\r\n return '' + PJQ.helpers.formatHelpers.formatCurrency(row.get('revenue')) + '';\r\n }, this),\r\n \"renderFooter\": _.bind(function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('revenue');\r\n }, this);\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }, this)\r\n });\r\n }\r\n\r\n if (!this.options.isBudget && !this.isDirectCosts) {\r\n if (this.options.financialMarkups != null && this.options.showMarkup) {\r\n _.each(this.options.financialMarkups.models, (markup) => {\r\n if (markup.get('isVertical') || markup.get('delete') || markup.get('void') || (markup.get('appliedCostCodeId') && markup.get('appliedCostTypeId'))) {\r\n return;\r\n }\r\n\r\n columns.push({\r\n \"columnData\": \"markupAmount\",\r\n \"data\": \"attributes.markupAmount\",\r\n \"title\": markup.get('name') + ' (' + PJQ.helpers.formatHelpers.formatPercent(markup.get('percent') / 100) + ')',\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": (data, type, row) => {\r\n let isAppliedLineItem = row.markup != null || row.get('appliedMarkupId') != null,\r\n amt = row.getMarkupAmount(this.options.financialMarkups, {\r\n cid: markup.cid,\r\n isAppliedLineItem: isAppliedLineItem\r\n });\r\n return '' + PJQ.helpers.formatHelpers.formatCurrency(amt) + '';\r\n },\r\n \"renderFooter\": (data) => {\r\n let amt = 0;\r\n\r\n _.each(data, (lineItem) => {\r\n let isAppliedLineItem = lineItem.markup != null || lineItem.get('appliedMarkupId') != null;\r\n amt += lineItem.getMarkupAmount(this.options.financialMarkups, {\r\n cid: markup.cid,\r\n isAppliedLineItem: isAppliedLineItem\r\n });\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n });\r\n });\r\n }\r\n\r\n if (this.options.enableTax) {\r\n columns.push(...[{\r\n \"columnData\": \"taxCode\",\r\n \"data\": \"attributes.taxCodeId\",\r\n \"width\": \"8%\",\r\n \"title\": \"Tax Code\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": (data, type, row) => {\r\n let isAppliedLineItem = row.markup != null || row.get('appliedMarkupId') != null;\r\n\r\n if (this.options.canEdit && !isAppliedLineItem) {\r\n return '
';\r\n }\r\n\r\n let taxCode = this.taxCodes.get(row.get('taxCodeId'));\r\n if (taxCode != null) {\r\n return taxCode.get('code') + ' (' + PJQ.helpers.formatHelpers.formatPercent(taxCode.get('rate') / 100) + ')'\r\n }\r\n return 'N/A';\r\n },\r\n \"renderFooter\": function (data) {\r\n return '';\r\n }\r\n }, {\r\n \"columnData\": \"taxAmount\",\r\n \"data\": \"attributes.taxAmount\",\r\n \"width\": \"10%\",\r\n \"title\": \"Tax\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n let taxAmount = PJQ.helpers.formatHelpers.formatCurrency(row.get('taxAmount'));\r\n if (this.options.canEdit) {\r\n return '' + taxAmount + '';\r\n }\r\n return taxAmount;\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('taxAmount');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n }]);\r\n }\r\n\r\n if (!this.isChangeRequests && this.options.showBilling) {\r\n columns.push(...[\r\n {\r\n \"columnData\": \"billedToDate\",\r\n \"data\": \"attributes.billedToDate\",\r\n \"width\": \"10%\",\r\n \"title\": \"Billed to Date\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"text-align-center\",\r\n \"render\": _.bind(function (data, type, row) {\r\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('progressAmount'));\r\n }, this),\r\n \"renderFooter\": function (data) {\r\n let amt = 0;\r\n _.each(data, function (lineItem) {\r\n amt += lineItem.get('progressAmount');\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n }]);\r\n }\r\n\r\n columns.push({\r\n \"columnData\": \"subTotal\",\r\n \"data\": \"attributes.amount\",\r\n \"title\": \"Subtotal\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"width\": \"150px\",\r\n \"className\": \"text-align-center\",\r\n \"render\": (data, type, row) => {\r\n let isAppliedLineItem = row.markup != null || row.get('appliedMarkupId') != null,\r\n subtotal = PJQ.helpers.formatHelpers.formatCurrency(row.getSubTotal(this.options.financialMarkups, {\r\n costs: this.isChangeRequests && !this.options.showRevenue,\r\n isAppliedLineItem: isAppliedLineItem,\r\n lineItems: this.collection\r\n }));\r\n if (this.options.canEdit) {\r\n return '' + subtotal + '';\r\n }\r\n return subtotal;\r\n },\r\n \"renderFooter\": (data) => {\r\n let amt = 0;\r\n _.each(data, (lineItem) => {\r\n let isAppliedLineItem = lineItem.markup != null || lineItem.get('appliedMarkupId') != null;\r\n\r\n amt += lineItem.getSubTotal(this.options.financialMarkups, {\r\n costs: this.isChangeRequests && !this.options.showRevenue,\r\n isAppliedLineItem: isAppliedLineItem,\r\n lineItems: this.collection\r\n });\r\n });\r\n return PJQ.helpers.formatHelpers.formatCurrency(amt);\r\n }\r\n });\r\n }\r\n }\r\n if (this.options.canEdit) {\r\n columns.push({\r\n data: \"id\",\r\n title: \"\",\r\n orderable: false,\r\n searchable: false,\r\n width: 50,\r\n className: 'text-align-center',\r\n render: _.bind(function (data, type, row) {\r\n let html = '
',\r\n isAppliedLineItem = row.markup != null || row.get('appliedMarkupId') != null\r\n if (this.options.canDelete && !isAppliedLineItem && (!this.isChangeRequests || (!row.get('revenueLineItemId') && !row.get('costLineItemId')) || row.isNew())) {\r\n html += '';\r\n }\r\n html += '
';\r\n return html;\r\n }, this)\r\n });\r\n }\r\n return columns;\r\n },\r\n lineItemHoursChanged: function (e) {\r\n let $input = $(e.currentTarget),\r\n lineItem = this.getLineItemForInput($input);\r\n lineItem.set('budgetedHours', Math.ceil(parseFloat($input.val()) * 60));\r\n },\r\n renderLineItemsTable: function () {\r\n this.data = _.sortBy(_.filter(this.collection.models, (model) => {\r\n return !model.get('delete');\r\n }), (model) => {\r\n return model.get('appliedMarkupId') > 0 ? model.id + 100000 : model.id;\r\n });\r\n let $dataTable = this.$('.line-items-table')\r\n this.dataTable = new PJQ.views.dataTables.DataTable({\r\n el: $dataTable,\r\n data: this.data,\r\n autoWidth: false,\r\n fixedHeader: {\r\n header: false,\r\n footer: false\r\n },\r\n hasFooter: true,\r\n extraClasses: this.isInvoices ? 'table-invoice-line-items' : '',\r\n isHideSearch: true,\r\n paging: false,\r\n order: [],\r\n language: {\r\n emptyTable: this.options.canEdit ? 'Click \"Add Line Item\" to create a new Line item' : 'No line items have been added yet'\r\n },\r\n columns: this.getColumns(),\r\n afterDataTableRender: _.bind(function () {\r\n this.renderInputs();\r\n if (this.isInvoices) {\r\n this.renderSubTemplate(true, this.options.subTemplates.invoiceHeader, this.$('thead').first(), {\r\n subJobs: this.subJobs,\r\n enableStoredMaterials: this.options.enableStoredMaterials,\r\n enableRetainage: this.options.enableRetainage,\r\n enableTax: this.options.enableTax,\r\n canEdit: this.options.canEdit,\r\n enableSelection: this.options.enableSelection\r\n }, {\r\n prepend: true\r\n });\r\n } else if (this.isChangeRequests && this.options.accountingMethod === PJQ.constants.budget.accountingMethod.UNIT_QUANTITY) {\r\n this.renderSubTemplate(true, this.options.subTemplates.changeRequestHeader, this.$('thead').first(), {\r\n subJobs: this.subJobs,\r\n enableSelection: this.options.enableSelection,\r\n canEdit: this.options.canEdit,\r\n accountingMethod: this.options.accountingMethod\r\n }, {\r\n prepend: true\r\n });\r\n }\r\n this.renderTableFooter(this.data);\r\n }, this),\r\n onRowRemoved: _.bind(function () {\r\n this.renderInputs();\r\n }, this),\r\n contextMenuOptions: {\r\n actions: [\r\n {\r\n name: 'Delete',\r\n isDanger: true,\r\n onClick: _.bind(function (row) {\r\n this.deleteLineItem(row);\r\n }, this),\r\n isShown: _.bind(function (row) {\r\n this.options.canEdit\r\n }, this),\r\n }\r\n ]\r\n },\r\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\r\n });\r\n },\r\n totalButtonClicked: function (e) {\r\n let $btn = $(e.currentTarget),\r\n fnName = $btn.data('fn'),\r\n fn = this.options[fnName];\r\n if (typeof fn === 'function') {\r\n fn();\r\n }\r\n },\r\n renderTableFooter: function () {\r\n if (this.dataTable && this.data) {\r\n let $footer = this.$('tfoot').first(),\r\n visibleCols = _.filter(this.getColumns(), function (column) {\r\n return column.visible !== false;\r\n });\r\n\r\n $footer.find('tr').remove();\r\n // _.each(visibleCols, function (column, index) {\r\n // if (typeof column.renderFooter === 'function') {\r\n // let $footerCol = $footer.find('th').eq(index);\r\n // $footerCol.html('
' + column.renderFooter(this.data) + '
');\r\n // }\r\n // }, this);\r\n\r\n let totalRows = [],\r\n lineItems = this.collection.models.filter((lineItem) => {\r\n return !lineItem.get('delete');\r\n });\r\n if (this.options.showSubTotal) {\r\n let sTotal = 0;\r\n _.each(lineItems, (lineItem) => {\r\n let isAppliedLineItem = lineItem.markup != null || lineItem.get('appliedMarkupId') != null;\r\n\r\n sTotal += lineItem.getSubTotal(this.options.financialMarkups, {\r\n costs: this.isChangeRequests && !this.options.showRevenue,\r\n isAppliedLineItem: isAppliedLineItem,\r\n lineItems: this.collection\r\n });\r\n });\r\n totalRows.push({\r\n label: 'Subtotal',\r\n amount: sTotal\r\n });\r\n }\r\n\r\n if (this.options.financialMarkups != null && this.options.showMarkup) {\r\n let markups = this.options.financialMarkups.getMarkups(lineItems);\r\n _.each(_.sortBy(_.filter(markups, (markup) => {\r\n return markup.isVertical;\r\n }), (markup) => {\r\n return markup.sortOrder;\r\n }), (vMarkup) => {\r\n totalRows.push({\r\n label: vMarkup.name + ' (' + PJQ.helpers.formatHelpers.formatPercent(vMarkup.model.get('percent') / 100) + ')',\r\n amount: vMarkup.amount\r\n });\r\n });\r\n }\r\n\r\n if (this.isInvoices) {\r\n if (this.options.enableRetainage) {\r\n let rtTotal = 0,\r\n rrTotal = 0;\r\n _.each(lineItems, (lineItem) => {\r\n rtTotal += lineItem.getRetainage();\r\n rrTotal += lineItem.getRetainageReleased();\r\n });\r\n\r\n if (rtTotal > 0) {\r\n totalRows.push({\r\n label: 'Retainage',\r\n amount: -rtTotal,\r\n extraClasses: 'text-danger'\r\n });\r\n }\r\n\r\n if (rrTotal > 0) {\r\n totalRows.push({\r\n label: 'Retainage Released',\r\n amount: rrTotal\r\n });\r\n }\r\n }\r\n }\r\n\r\n if (this.options.enableTax) {\r\n let tTotal = 0;\r\n _.each(lineItems, (lineItem) => {\r\n tTotal += lineItem.getTaxAmount();\r\n });\r\n totalRows.push({\r\n label: 'Tax',\r\n amount: tTotal\r\n });\r\n }\r\n\r\n let grandTotal = 0;\r\n if (this.options.showGrandTotal) {\r\n _.each(lineItems, (lineItem) => {\r\n grandTotal += lineItem.getGrandTotal(this.options.financialMarkups, {\r\n totalMarkups: true,\r\n costs: this.isChangeRequests && !this.options.showRevenue\r\n });\r\n });\r\n }\r\n if (this.options.approvedChanges != null) {\r\n if (this.options.showGrandTotal) {\r\n totalRows.push({\r\n label: 'Original Contract',\r\n amount: grandTotal\r\n });\r\n }\r\n\r\n totalRows.push({\r\n label: 'Approved Changes',\r\n amount: this.options.approvedChanges,\r\n clickFn: typeof this.options.onApprovedChangesClicked === 'function' ? 'onApprovedChangesClicked' : null\r\n });\r\n\r\n if (this.options.showGrandTotal) {\r\n totalRows.push({\r\n label: 'Contract Total',\r\n amount: grandTotal + this.options.approvedChanges,\r\n bold: true\r\n });\r\n }\r\n } else if (this.options.showGrandTotal) {\r\n totalRows.push({\r\n bold: true,\r\n label: 'Grand Total',\r\n amount: grandTotal\r\n });\r\n }\r\n\r\n if (this.options.billedToDate != null) {\r\n let billed = null;\r\n if (typeof this.options.billedToDate === 'function') {\r\n billed = this.options.billedToDate();\r\n } else if (typeof this.options.billedToDate === 'number') {\r\n billed = this.options.billedToDate;\r\n }\r\n if (billed != null) {\r\n totalRows.push({\r\n label: 'Billed to Date',\r\n amount: billed,\r\n clickFn: typeof this.options.onBilledToDateClicked === 'function' ? 'onBilledToDateClicked' : null\r\n });\r\n }\r\n }\r\n\r\n _.each(totalRows, (item) => {\r\n if (_.size(item.label) === 0) {\r\n return;\r\n }\r\n\r\n let $totalRow = $(''),\r\n colOffset = this.options.canEdit ? 2 : 1;\r\n $totalRow.append('' + item.label + ':');\r\n\r\n let txt = '';\r\n if (_.size(item.clickFn) > 0) {\r\n txt = '' + PJQ.helpers.formatHelpers.formatCurrency(item.amount) + '';\r\n } else {\r\n txt = '' + PJQ.helpers.formatHelpers.formatCurrency(item.amount) + '';\r\n }\r\n\r\n $totalRow.append(' 1 ? ' border-right-0' : '') + '\">' + txt + '');\r\n if (colOffset > 1) {\r\n $totalRow.append('');\r\n }\r\n\r\n $footer.append($totalRow);\r\n });\r\n }\r\n },\r\n updateCommitmentForChangeRequestLineItem: function (lineItem, commitment) {\r\n if (!(lineItem.id > 0) && commitment != null && !(lineItem.get('costCodeId') > 0)) {\r\n let budgetCodes = _.uniq(_.map(commitment.lineItems.models, (lineItem) => {\r\n return lineItem.get('costCodeId') + '|' + lineItem.get('costTypeId');\r\n }));\r\n if (_.size(budgetCodes) === 1) {\r\n let bcSplit = budgetCodes[0].split('|'),\r\n costCodeId = parseInt(bcSplit[0]),\r\n costTypeId = parseInt(bcSplit[1]);\r\n lineItem.set({\r\n costCodeId: costCodeId,\r\n costTypeId: costTypeId\r\n })\r\n }\r\n }\r\n\r\n lineItem.set({\r\n vendor: commitment?.contractedContact?.toJSON(),\r\n vendorId: commitment?.contractedContact?.id,\r\n commitmentId: commitment?.id,\r\n commitmentNumber: commitment?.get('number')\r\n });\r\n\r\n lineItem.vendor = commitment?.contractedContact;\r\n },\r\n renderInputs: function () {\r\n PJQ.helpers.inputHelpers.inputMaskCurrency(this.$('.input-dollars-full'), 2, true);\r\n PJQ.helpers.inputHelpers.inputMaskPercent(this.$('.input-percent'), 2, true);\r\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-decimal'), 2);\r\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-hours'), 1);\r\n\r\n this.addListeners();\r\n if (!this.binder) {\r\n this.binder = new PJQ.Binder(this.$el, this.collection, {\r\n delegate: true,\r\n modelSelectorAttribute: 'id',\r\n idAttribute: 'cid',\r\n useDecimalPercentFields: true,\r\n watchElements: [\r\n 'input'\r\n ]\r\n });\r\n }\r\n\r\n if (this.isCCO && PJQ.app.session.erpIntegration?.hasAvailableAction(PJQ.constants.integrations.actions.RELATE_CCO_LINE_TO_COMMITMENT_LINE) === true) {\r\n let fnCommitmentLineToChoice = (lineItem) => {\r\n let costCode = this.costCodes.get(lineItem.get('costCodeId')),\r\n costType = this.costTypes.get(lineItem.get('costTypeId'));\r\n return {\r\n id: lineItem.id,\r\n name: `${costCode.get('name')} - ${costType.get('name')} | ${PJQ.helpers.formatHelpers.formatCurrency(lineItem.get('totalAmount'))}`\r\n };\r\n };\r\n this.commitmentLinePickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-commitment-line',\r\n valueAttribute: 'commitmentLineItemId',\r\n selectPickerOptions: {\r\n isBlockSubtext: true,\r\n size: 5,\r\n choices: (model) => {\r\n if (model.get('costCodeId') > 0) {\r\n let suggested = [],\r\n others = [];\r\n _.each(this.options.commitment.lineItems.models, (lineItem) => {\r\n if (lineItem.get('costCodeId') === model.get('costCodeId')) {\r\n suggested.push(lineItem);\r\n } else {\r\n others.push(lineItem);\r\n }\r\n });\r\n if (_.size(suggested) > 0) {\r\n return [{\r\n name: 'Suggested',\r\n choices: _.map(suggested, fnCommitmentLineToChoice)\r\n }, {\r\n name: '',\r\n choices: _.map(others, fnCommitmentLineToChoice)\r\n }];\r\n }\r\n }\r\n return _.map(this.options.commitment.lineItems.models, fnCommitmentLineToChoice);\r\n }\r\n },\r\n onChange: (model, value) => {\r\n model.set('commitmentLineItemId', value);\r\n }\r\n });\r\n }\r\n\r\n if (this.isChangeRequests && this.options.canEdit) {\r\n let fnCommitmentToChoice = (commitment) => {\r\n return {\r\n id: commitment.id,\r\n name: '' + commitment.get('number') + '' + ' | ' + PJQ.helpers.formatHelpers.formatCurrency(commitment.getGrandTotal()) + '',\r\n subtext: commitment.contractedContact?.get('companyName') ?? ''\r\n };\r\n };\r\n this.commitmentPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-commitment',\r\n valueAttribute: 'commitmentId',\r\n selectPickerOptions: {\r\n isBlockSubtext: true,\r\n size: 8,\r\n choices: (model) => {\r\n let costCodeId = model.get('costCodeId'),\r\n vendorId = model.get('vendorId');\r\n if (costCodeId > 0 || vendorId > 0) {\r\n let suggested = [],\r\n others = [];\r\n _.each(this.projectCommitments.models, (commitment) => {\r\n if (vendorId != null && commitment.contractedContact?.id !== vendorId) {\r\n return;\r\n }\r\n\r\n if (null != costCodeId &&\r\n null != commitment.lineItems.findWhere({costCodeId: costCodeId})) {\r\n suggested.push(commitment);\r\n } else {\r\n others.push(commitment);\r\n }\r\n });\r\n if (_.size(suggested) > 0) {\r\n return [{\r\n name: 'Suggested',\r\n choices: _.map(suggested, fnCommitmentToChoice)\r\n }, {\r\n name: '',\r\n choices: _.map(others, fnCommitmentToChoice)\r\n }];\r\n } else if (_.size(others) > 0) {\r\n return _.map(others, fnCommitmentToChoice);\r\n }\r\n }\r\n return _.map(this.projectCommitments.models, fnCommitmentToChoice);\r\n }\r\n },\r\n onChange: (model, value) => {\r\n let commitment = this.projectCommitments.get(value);\r\n this.updateCommitmentForChangeRequestLineItem(model, commitment);\r\n\r\n let row = this.dataTable.getRow(model.cid);\r\n if (row) {\r\n this.dataTable.refreshRow(row);\r\n }\r\n\r\n this.renderLineItemsTable();\r\n }\r\n });\r\n\r\n let fnVendorToChoice = (commitment) => {\r\n return {\r\n id: commitment.contractedContact.id,\r\n name: '' + commitment.contractedContact.get('companyName') + '',\r\n subtext: commitment.contractedContact.get('contactName') ?? ''\r\n };\r\n };\r\n this.vendorPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-vendor',\r\n valueAttribute: 'vendorId',\r\n selectPickerOptions: {\r\n // isBlockSubtext: true,\r\n size: 8,\r\n isIntChoices: true,\r\n choices: (model) => {\r\n let foundIds = [],\r\n suggested = [],\r\n others = [],\r\n costCodeId = model.get('costCodeId') > 0;\r\n _.each(this.projectCommitments.models, (commitment) => {\r\n if (commitment.contractedContact == null || -1 !== foundIds.indexOf(commitment.contractedContact.id)) {\r\n return;\r\n }\r\n\r\n foundIds.push(commitment.contractedContact.id);\r\n if (costCodeId > 0 && null != commitment.lineItems.findWhere({\r\n costCodeId: costCodeId\r\n })) {\r\n suggested.push(commitment);\r\n } else {\r\n others.push(commitment);\r\n }\r\n });\r\n if (_.size(suggested) > 0) {\r\n return [{\r\n name: 'Suggested',\r\n choices: _.map(suggested, fnVendorToChoice)\r\n }, {\r\n name: '',\r\n choices: _.map(others, fnVendorToChoice)\r\n }];\r\n }\r\n return _.map(others, fnVendorToChoice);\r\n }\r\n },\r\n onChange: (model, value) => {\r\n let commitment = null,\r\n currentCommitment = this.projectCommitments.get(model.get('commitmentId')),\r\n matchCommitments;\r\n if (currentCommitment && currentCommitment.contractedContact && currentCommitment.contractedContact.id === value) {\r\n commitment = currentCommitment\r\n matchCommitments = this.projectCommitments.filter((commitment) => {\r\n return commitment.contractedContact && commitment.contractedContact.id === value;\r\n });\r\n } else {\r\n matchCommitments = this.projectCommitments.filter((commitment) => {\r\n return commitment.contractedContact && commitment.contractedContact.id === value;\r\n });\r\n }\r\n\r\n this.updateCommitmentForChangeRequestLineItem(model, commitment);\r\n\r\n if (_.size(matchCommitments) > 0) {\r\n let vendor = matchCommitments[0].contractedContact;\r\n model.set({\r\n vendorId: value,\r\n vendor: vendor?.toJSON()\r\n });\r\n model.vendor = vendor;\r\n }\r\n\r\n let row = this.dataTable.getRow(model.cid);\r\n if (row) {\r\n this.dataTable.refreshRow(row);\r\n }\r\n\r\n this.renderLineItemsTable();\r\n\r\n this.nextInput('vendor', model);\r\n }\r\n });\r\n }\r\n\r\n if (this.isInvoices) {\r\n if (this.possibleLineItems != null) {\r\n this.lineItemPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-line-item',\r\n valueAttribute: 'lineItemId',\r\n selectPickerOptions: {\r\n isBlockSubtext: true,\r\n size: 5,\r\n choices: this.getPossibleLineItemOptions()\r\n },\r\n onChange: (model, value) => {\r\n let selectedItem = this.possibleLineItems.get(value);\r\n if (selectedItem != null) {\r\n model.set(selectedItem.attributes, {\r\n silent: true\r\n });\r\n let row = this.dataTable.getRow(model.cid);\r\n this.dataTable.refreshRow(row);\r\n\r\n this.nextInput('lineItem', model);\r\n }\r\n }\r\n });\r\n }\r\n } else {\r\n if (this.options.filterToPrimeContractItems && this.$('.select-prime-contract-item').length > 0) {\r\n this.fetchPrimeContract(() => {\r\n this.primeContractLineItemPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-prime-contract-item',\r\n valueAttribute: 'description',\r\n selectPickerOptions: {\r\n noneSelectedText: 'Select Item',\r\n isLiveSearch: true,\r\n isIntChoices: false,\r\n size: 8,\r\n isDisabled: (model) => {\r\n return !this.options.canEdit;\r\n },\r\n choices: this.getPrimeContractItemChoices()\r\n },\r\n onChange: (model, value) => {\r\n if (value === \"c652db68-5944-433e-99de-17c7d26bae45\") {\r\n this.options.addingNewContractLineItems.push(model.cid);\r\n this.dataTable.render();\r\n\r\n this.toggleInput('contractItem', model);\r\n } else {\r\n model.set('description', value);\r\n this.nextInput('pc_lineItem', model);\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n if (_.size(this.subJobs.models) > 0) {\r\n this.subJobPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-sub-job',\r\n valueAttribute: 'subJobId',\r\n selectPickerOptions: {\r\n noneSelectedText: 'Parent Job',\r\n isLiveSearch: true,\r\n isIntChoices: true,\r\n size: 8,\r\n isDisabled: _.bind(function (model) {\r\n return !model.isNew() || !this.options.canEdit;\r\n }, this),\r\n choices: _.union([{name: '', choices: {id: 0, name: 'Parent Job'}}], [{\r\n name: 'Sub Jobs', choices: _.map(this.subJobs.models, function (subJob) {\r\n return {\r\n id: subJob.id,\r\n name: subJob.get('name'),\r\n subtext: subJob.get('code')\r\n }\r\n }, this)\r\n }])\r\n },\r\n onChange: _.bind(function (model, value) {\r\n model.set('subJobId', value > 0 ? value : null);\r\n model.set('costCodeId', 0);\r\n\r\n let costCodePicker = this.costCodeSelectorCollection.pickers[model.cid];\r\n costCodePicker.render();\r\n\r\n this.nextInput('subJob', model);\r\n }, this)\r\n });\r\n }\r\n\r\n this.costCodeSelectorCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-cost-code',\r\n valueAttribute: 'costCodeId',\r\n selectPickerOptions: {\r\n isLiveSearch: true,\r\n isIntChoices: true,\r\n hideDisabled: false,\r\n isDisabled: _.bind(function (model) {\r\n return !model.isNew() || !this.options.canEdit;\r\n }, this),\r\n choices: _.bind(function (model) {\r\n return this.getCostCodeOptions(model)\r\n }, this)\r\n },\r\n onChange: _.bind(function (model, value) {\r\n model.set('costCodeId', value);\r\n\r\n let costCode = this.costCodes.get(value),\r\n allowedCostTypeIds = costCode.get('costTypeIds');\r\n if (_.size(allowedCostTypeIds) > 0 && allowedCostTypeIds.indexOf(model.get('costTypeId')) === -1) {\r\n model.set('costTypeId', 0);\r\n }\r\n\r\n let costTypeSelector = this.costTypeSelectorCollection.pickers[model.cid];\r\n costTypeSelector.render();\r\n\r\n this.nextInput('costCode', model);\r\n }, this)\r\n });\r\n\r\n this.costTypeSelectorCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-cost-type',\r\n valueAttribute: 'costTypeId',\r\n selectPickerOptions: {\r\n isIntChoices: true,\r\n isDisabled: _.bind(function (model) {\r\n return !model.isNew() || !this.options.canEdit || !(model.get('costCodeId') > 0);\r\n }, this),\r\n choices: _.bind(function (model) {\r\n return this.getCostTypeOptions(model)\r\n }, this)\r\n },\r\n onChange: _.bind(function (model, value) {\r\n model.set('costTypeId', value);\r\n\r\n if (typeof model.resetMarkup === 'function') {\r\n model.resetMarkup();\r\n }\r\n\r\n if (this.options.isBudget) {\r\n let hasSubJobs = _.size(this.subJobs) > 0,\r\n budgetLineItem = _.find(this.budget.lineItems.models, function (li) {\r\n if (hasSubJobs && li.get('subJobId') !== model.get('subJobId')) {\r\n return false;\r\n } else if (li.get('accountingMethod') === PJQ.constants.budget.accountingMethod.AMOUNT && this.options.accountingMethod !== li.get('accountingMethod')) {\r\n return false;\r\n }\r\n return li.get('costCodeId') === model.get('costCodeId')\r\n && li.get('costTypeId') === model.get('costTypeId');\r\n }, this);\r\n if (budgetLineItem != null) {\r\n let $line = this.getLineItemElement(model),\r\n budgetedCost = budgetLineItem.get('budgetedCost'),\r\n description = budgetLineItem.get('description');\r\n if (this.options.accountingMethod === PJQ.constants.budget.accountingMethod.UNIT_QUANTITY) {\r\n let quantity = budgetLineItem.get('quantity'),\r\n unitId = budgetLineItem.get('unitId'),\r\n unitPrice = budgetLineItem.get('unitPrice');\r\n model.set({\r\n description: description,\r\n quantity: quantity,\r\n unitId: unitId,\r\n unitPrice: unitPrice,\r\n budgetedCost: budgetedCost\r\n });\r\n $line.find('.input-quantity').val(quantity);\r\n $line.find('select.select-unit-type').val(unitId > 0 ? unitId.toString() : \"\").change();\r\n $line.find('.input-unit-price').val(PJQ.helpers.formatHelpers.formatCurrency(unitPrice));\r\n } else {\r\n model.set({\r\n description: budgetLineItem.get('description'),\r\n budgetedCost: budgetedCost\r\n });\r\n $line.find('.input-amount').val(PJQ.helpers.formatHelpers.formatCurrency(model.get('budgetedCost')));\r\n }\r\n $line.find('.input-description').val(model.get('description'));\r\n }\r\n }\r\n this.nextInput('costType', model);\r\n }, this)\r\n });\r\n\r\n this.taxCodeSelectorCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-tax-code',\r\n valueAttribute: 'taxCodeId',\r\n selectPickerOptions: {\r\n isLiveSearch: true,\r\n isIntChoices: true,\r\n isDisabled: (model) => {\r\n return !this.options.canEdit;\r\n },\r\n choices: (model) => {\r\n return [{\r\n id: 0,\r\n name: 'N/A'\r\n }, ..._.map(this.taxCodes.models, function (taxCode) {\r\n return {\r\n id: taxCode.id,\r\n name: taxCode.get('code') + \" (\" + PJQ.helpers.formatHelpers.formatPercent(taxCode.get('rate') / 100) + \")\"\r\n }\r\n }, this)];\r\n }\r\n },\r\n onChange: _.bind(function (model, value) {\r\n let taxCode = this.taxCodes.get(value);\r\n model.set({\r\n taxCodeId: taxCode ? taxCode.id : null,\r\n taxRate: taxCode ? taxCode.get('rate') : 0\r\n });\r\n\r\n this.nextInput('taxCode', model);\r\n }, this)\r\n });\r\n\r\n new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\r\n pickerSelector: '.select-unit-type',\r\n valueAttribute: 'unitId',\r\n selectPickerOptions: {\r\n isIntChoices: true,\r\n isDisabled: function (model) {\r\n return !model.isNew();\r\n },\r\n choices: _.bind(function (model) {\r\n return _.map(this.unitsOfMeasure.models, function (unit) {\r\n return {\r\n id: unit.id,\r\n name: unit.get('name')\r\n }\r\n });\r\n }, this)\r\n },\r\n onChange: _.bind(function (model, value) {\r\n model.set('unitId', value);\r\n\r\n this.nextInput('unitType', model);\r\n }, this)\r\n });\r\n }\r\n\r\n if (this.options.canEdit && this.focusLineItem != null) {\r\n if (this.isInvoices) {\r\n this.toggleInput('lineItem', this.focusLineItem);\r\n } else if (this.options.filterToPrimeContractItems) {\r\n this.toggleInput('pc_lineItem', this.focusLineItem);\r\n } else if (_.size(this.subJobs) > 0) {\r\n this.toggleInput('subJob', this.focusLineItem);\r\n } else {\r\n this.toggleInput('costCode', this.focusLineItem);\r\n }\r\n this.focusLineItem = null;\r\n }\r\n },\r\n updateLineItemRow: function (lineItem) {\r\n let $line = this.getLineItemElement(lineItem),\r\n isAppliedLineItem = lineItem.markup != null || lineItem.get('appliedMarkupId') != null;\r\n\r\n if (this.options.isBudget) {\r\n $line.find('.label-amount').text(PJQ.helpers.formatHelpers.formatCurrency(this.options.isBudget ? lineItem.get('budgetedCost') : lineItem.get('amount')));\r\n return;\r\n }\r\n\r\n let subTotal = lineItem.getSubTotal(this.options.financialMarkups, {\r\n costs: this.isChangeRequests && !this.options.showRevenue,\r\n isAppliedLineItem: isAppliedLineItem,\r\n lineItems: this.collection\r\n }),\r\n progress = lineItem.get('progressAmount');\r\n if (progress != null) {\r\n let amtRemain = subTotal - progress;\r\n $line.find('.label-amount-remaining').text(PJQ.helpers.formatHelpers.formatCurrency(amtRemain));\r\n }\r\n\r\n if (this.options.financialMarkups != null) {\r\n _.each(this.options.financialMarkups.models, (markup) => {\r\n if (markup.get('void')) {\r\n return;\r\n }\r\n\r\n let amt = lineItem.getMarkupAmount(this.options.financialMarkups, {\r\n cid: markup.cid,\r\n isAppliedLineItem: isAppliedLineItem\r\n });\r\n $line.find('.label-markup-amount-' + markup.cid.toString()).text(PJQ.helpers.formatHelpers.formatCurrency(amt));\r\n });\r\n }\r\n\r\n if (this.options.enableTax) {\r\n $line.find('.label-tax-amount').text(PJQ.helpers.formatHelpers.formatCurrency(lineItem.get('taxAmount')));\r\n }\r\n\r\n $line.find('.label-subtotal').text(PJQ.helpers.formatHelpers.formatCurrency(subTotal));\r\n $line.find('.label-amount').text(PJQ.helpers.formatHelpers.formatCurrency(lineItem.get('amount')));\r\n $line.find('.label-unit-price').text(PJQ.helpers.formatHelpers.formatCurrency(lineItem.get('unitPrice')));\r\n },\r\n nextInput: function (prevInput, lineItem) {\r\n switch (prevInput) {\r\n case 'pc_lineItem':\r\n if (this.subJobPickerCollection != null) {\r\n this.toggleInput('subJob', lineItem);\r\n } else {\r\n this.toggleInput('costCode', lineItem);\r\n }\r\n break;\r\n case 'subJob':\r\n this.toggleInput('costCode', lineItem);\r\n break;\r\n case 'costCode':\r\n if (lineItem.get('costCodeId') > 0 && !(lineItem.get('costTypeId') > 0)) {\r\n this.toggleInput('costType', lineItem);\r\n }\r\n break;\r\n case 'costType':\r\n if (this.isChangeRequests) {\r\n this.toggleInput('vendor', lineItem);\r\n } else {\r\n this.toggleInput('description', lineItem);\r\n }\r\n break;\r\n case 'vendor':\r\n if (lineItem.get('commitmentId') == null) {\r\n this.toggleInput('commitment', lineItem);\r\n } else {\r\n this.toggleInput('description', lineItem);\r\n }\r\n break;\r\n case 'commitment':\r\n this.toggleInput('description', lineItem);\r\n break;\r\n case 'taxCode':\r\n\r\n break;\r\n case 'unitType':\r\n\r\n break;\r\n }\r\n },\r\n getPrimeContractItemChoices: function () {\r\n let choices = _.map(_.union(this.options.primeContract.lineItems.models, _.filter(this.collection.models, (lineItem) => {\r\n return _.size(lineItem.get('description')) > 0;\r\n })).sort((a, b) => {\r\n return PJQ.helpers.sortHelpers.sortAlphaNum(a.get('description') ?? \"\", b.get('description') ?? \"\");\r\n }), (lineItem) => {\r\n return {\r\n id: lineItem.get('description'),\r\n name: lineItem.get('description')\r\n };\r\n });\r\n\r\n choices.unshift({\r\n id: \"c652db68-5944-433e-99de-17c7d26bae45\",\r\n name: 'New Item'\r\n })\r\n\r\n return choices;\r\n },\r\n toggleInput: function (input, lineItem) {\r\n if (!this.options.canEdit) {\r\n return false;\r\n }\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n switch (input) {\r\n case 'lineItem':\r\n if (this.lineItemPickerCollection == null) {\r\n return false;\r\n }\r\n\r\n let lineItemPicker = this.lineItemPickerCollection.getPickerForId(lineItem.cid);\r\n if (lineItemPicker != null) {\r\n setTimeout(() => {\r\n lineItemPicker.toggle();\r\n }, 100);\r\n }\r\n break;\r\n case 'pc_lineItem':\r\n if (this.primeContractLineItemPickerCollection == null) {\r\n return false;\r\n }\r\n\r\n let pcLineItemPicker = this.primeContractLineItemPickerCollection.getPickerForId(lineItem.cid);\r\n if (pcLineItemPicker != null) {\r\n setTimeout(() => {\r\n pcLineItemPicker.toggle();\r\n }, 100);\r\n }\r\n break;\r\n case 'subJob':\r\n if (this.subJobPickerCollection == null) {\r\n return false;\r\n }\r\n\r\n let subJobPicker = this.subJobPickerCollection.getPickerForId(lineItem.cid);\r\n if (subJobPicker != null) {\r\n setTimeout(() => {\r\n subJobPicker.toggle();\r\n }, 100);\r\n }\r\n break;\r\n case 'costCode':\r\n if (this.costCodeSelectorCollection == null) {\r\n return false;\r\n }\r\n\r\n let costCodePicker = this.costCodeSelectorCollection.getPickerForId(lineItem.cid);\r\n if (costCodePicker != null) {\r\n setTimeout(() => {\r\n costCodePicker.toggle();\r\n }, 100);\r\n }\r\n break;\r\n case 'costType':\r\n if (this.costTypeSelectorCollection == null) {\r\n return false;\r\n }\r\n\r\n let costTypePicker = this.costTypeSelectorCollection.getPickerForId(lineItem.cid);\r\n if (costTypePicker != null) {\r\n setTimeout(() => {\r\n costTypePicker.toggle();\r\n }, 100);\r\n }\r\n break\r\n case 'vendor':\r\n if (this.vendorPickerCollection == null) {\r\n return false;\r\n }\r\n\r\n let vendorPicker = this.vendorPickerCollection.getPickerForId(lineItem.cid);\r\n if (vendorPicker != null) {\r\n setTimeout(() => {\r\n vendorPicker.toggle();\r\n }, 100)\r\n }\r\n break;\r\n case 'commitment':\r\n if (this.commitmentPickerCollection == null) {\r\n return false;\r\n }\r\n\r\n let commitmentPicker = this.commitmentPickerCollection.getPickerForId(lineItem.cid);\r\n if (commitmentPicker != null) {\r\n setTimeout(() => {\r\n commitmentPicker.toggle();\r\n }, 100)\r\n }\r\n break;\r\n case 'description':\r\n $line.find('.input-description').focus();\r\n break;\r\n case 'contractItem':\r\n $line.find('.input-contract-item').focus();\r\n break;\r\n case 'amount':\r\n $line.find('.input-amount').focus();\r\n break;\r\n case 'revenue':\r\n $line.find('.input-revenue').focus();\r\n break;\r\n case 'taxCode':\r\n\r\n break;\r\n case 'unitType':\r\n\r\n break;\r\n }\r\n\r\n return true;\r\n },\r\n addListeners: function () {\r\n this.stopListening(this.collection);\r\n this.stopListening(this.options.financialMarkups)\r\n if (!this.isInvoices) {\r\n this.listenTo(this.collection, 'change:amount change:taxRate change:costCodeId change:costTypeId', (lineItem) => {\r\n if (typeof lineItem.resetMarkup === 'function') {\r\n lineItem.resetMarkup();\r\n }\r\n\r\n if (lineItem.get('taxRate') > 0 || lineItem.get('taxAmount') > 0) {\r\n lineItem.set('taxAmount', lineItem.getTaxAmount());\r\n }\r\n\r\n this.updateLineItemRow(lineItem);\r\n\r\n _.each(this.options.financialMarkups?.models ?? [], (markup) => {\r\n let lineItem = markup.isNew() || markup.lineItem ? markup.lineItem : this.collection.findWhere({appliedMarkupId: markup.id});\r\n\r\n if (lineItem) {\r\n this.updateLineItemRow(lineItem);\r\n }\r\n });\r\n\r\n this.renderTotals();\r\n });\r\n\r\n this.listenTo(this.collection, 'change', _.bind(function (lineItem) {\r\n this.updateAccountingMethodSelector();\r\n this.updateLineItemRow(lineItem);\r\n\r\n _.each(this.options.financialMarkups?.models ?? [], (markup) => {\r\n let lineItem = markup.isNew() || markup.lineItem ? markup.lineItem : this.collection.findWhere({appliedMarkupId: markup.id});\r\n\r\n if (lineItem) {\r\n this.updateLineItemRow(lineItem);\r\n }\r\n });\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:quantity change:unitPrice', _.bind(function (lineItem) {\r\n let amount = lineItem.get('unitPrice') * lineItem.get('quantity');\r\n if (this.options.isBudget) {\r\n lineItem.set({\r\n budgetedCost: amount\r\n });\r\n } else {\r\n lineItem.set({\r\n amount: amount\r\n });\r\n }\r\n this.updateLineItemRow(lineItem);\r\n\r\n _.each(this.options.financialMarkups?.models ?? [], (markup) => {\r\n let lineItem = markup.isNew() || markup.lineItem ? markup.lineItem : this.collection.findWhere({appliedMarkupId: markup.id});\r\n\r\n if (lineItem) {\r\n this.updateLineItemRow(lineItem);\r\n }\r\n });\r\n }, this));\r\n\r\n if (this.isChangeRequests) {\r\n this.listenTo(this.collection, 'change:amount change:revenue', (lineItem) => {\r\n let cost = lineItem.get('amount');\r\n if (this.options.copyCostToRevenue && lineItem.get('costLineItemId') == null) {\r\n lineItem.set({\r\n revenue: cost ?? 0\r\n });\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-revenue').val(PJQ.helpers.formatHelpers.formatCurrency(cost));\r\n }\r\n\r\n this.updateLineItemRow(lineItem);\r\n\r\n _.each(this.options.financialMarkups?.models ?? [], (markup) => {\r\n let lineItem = markup.isNew() || markup.lineItem ? markup.lineItem : this.collection.findWhere({appliedMarkupId: markup.id});\r\n\r\n if (lineItem) {\r\n this.updateLineItemRow(lineItem);\r\n }\r\n });\r\n\r\n this.renderTotals();\r\n });\r\n }\r\n } else {\r\n if (this.options.enableTax) {\r\n this.listenTo(this.collection, 'change', _.bind(function (lineItem) {\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.label-tax-amount').text(PJQ.helpers.formatHelpers.formatCurrency(lineItem.get('taxAmount')));\r\n }, this));\r\n }\r\n\r\n this.listenTo(this.collection, 'change:workRetainage change:materialRetainage change:workRetainageReleased change:materialRetainageReleased', _.bind(function (lineItem) {\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.label-work-retainage-remaining').text(PJQ.helpers.formatHelpers.formatCurrency(lineItem.getWorkRetainageRemaining(this.model)));\r\n $line.find('.label-material-retainage-remaining').text(PJQ.helpers.formatHelpers.formatCurrency(lineItem.getMaterialRetainageRemaining(this.model)));\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:materialsNew change:progressAmount', _.bind(function (lineItem) {\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.label-total-completed').text(PJQ.helpers.formatHelpers.formatCurrency(lineItem.getTotalCompleteAndStored(this.model)));\r\n $line.find('.label-balance-to-finish').text(PJQ.helpers.formatHelpers.formatCurrency(lineItem.getBalanceToFinish(this.model)));\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:progressAmount', _.bind(function (lineItem, id, opts) {\r\n if (opts && opts.percentUpdate) {\r\n return;\r\n }\r\n\r\n let $line = this.getLineItemElement(lineItem),\r\n amount = lineItem.get('progressAmount'),\r\n stored = lineItem.get('materialsStoredTotal'),\r\n nem = lineItem.get('materialsNew'),\r\n committed = lineItem.get('committedAmount'),\r\n totalProgress = amount + lineItem.get('progressAmountTotal');\r\n if (totalProgress > committed) {\r\n amount = committed - lineItem.get('progressAmountTotal') - stored - nem;\r\n lineItem.set('progressAmount', amount);\r\n\r\n totalProgress = amount + lineItem.get('progressAmountTotal');\r\n\r\n $line.find('.input-progress-amount').val(PJQ.helpers.formatHelpers.formatCurrency(amount));\r\n }\r\n\r\n let percent = (totalProgress / (committed - stored - nem)) * 100;\r\n percent = Math.round(percent * 100) / 100;\r\n\r\n $line.find('.input-progress-percent').val(PJQ.helpers.formatHelpers.formatPercent(percent));\r\n lineItem.set('progressPercent', percent, {\r\n silent: true\r\n });\r\n\r\n if (lineItem.get('taxRate') > 0 || lineItem.get('taxAmount') > 0) {\r\n lineItem.set('taxAmount', lineItem.getTaxAmount());\r\n }\r\n\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:progressPercent change:materialsNew', _.bind(function (lineItem) {\r\n let percent = lineItem.get('progressPercent'),\r\n // totalProgressPercent = lineItem.get('progressPercentTotal'),\r\n $line = this.getLineItemElement(lineItem);\r\n\r\n if (percent > 100) {\r\n percent = 100;\r\n lineItem.set('progressPercent', percent);\r\n $line.find('.input-progress-percent').val(PJQ.helpers.formatHelpers.formatPercent(percent));\r\n }\r\n\r\n let committed = lineItem.get('committedAmount'),\r\n totalProgress = lineItem.get('progressAmountTotal'),\r\n stored = lineItem.get('materialsStoredTotal'),\r\n nem = lineItem.get('materialsNew'),\r\n amount = Math.round(((committed - stored - nem) * (percent / 100)) - totalProgress);\r\n\r\n let billableNow = committed - stored - nem - totalProgress;\r\n if ((billableNow < 0 && amount < billableNow) || (billableNow > 0 && amount > billableNow)) {\r\n amount = 0;\r\n }\r\n\r\n if (lineItem.get('taxRate') > 0 || lineItem.get('taxAmount') > 0) {\r\n lineItem.set('taxAmount', lineItem.getTaxAmount());\r\n }\r\n\r\n $line.find('.input-progress-amount').val(PJQ.helpers.formatHelpers.formatCurrency(amount));\r\n lineItem.set({\r\n progressAmount: amount\r\n }, {\r\n percentUpdate: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:materialsNew', _.bind(function (lineItem, id, opts) {\r\n if (opts.percentUpdate) {\r\n return;\r\n }\r\n\r\n let stored = lineItem.get('materialsStoredTotal'),\r\n nem = lineItem.get('materialsNew'),\r\n percent = lineItem.get('materialRetainagePercent'),\r\n materialRetainage = (stored + nem) * (percent / 100);\r\n\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-material-retainage-amount').val(materialRetainage / 100);\r\n lineItem.set({\r\n materialRetainage: materialRetainage\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:workRetainage', _.bind(function (lineItem, id, opts) {\r\n if (opts.percentUpdate) {\r\n return;\r\n }\r\n\r\n let amount = lineItem.get('workRetainage'),\r\n percent = (amount / lineItem.get('progressAmount')) * 100;\r\n percent = Math.round(percent * 100) / 100;\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-work-retainage-percent').val(PJQ.helpers.formatHelpers.formatPercent(percent));\r\n lineItem.set({\r\n workRetainagePercent: percent\r\n }, {\r\n silent: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:workRetainagePercent change:progressAmount', _.bind(function (lineItem) {\r\n let percent = lineItem.get('workRetainagePercent'),\r\n amount = Math.round(lineItem.get('progressAmount') * (percent / 100));\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-work-retainage-amount').val(PJQ.helpers.formatHelpers.formatCurrency(amount));\r\n lineItem.set({\r\n workRetainage: amount\r\n }, {\r\n percentUpdate: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:materialRetainage', _.bind(function (lineItem, id, opts) {\r\n if (opts.percentUpdate) {\r\n return;\r\n }\r\n\r\n let amount = lineItem.get('materialRetainage'),\r\n percent = (amount / lineItem.get('materialsNew')) * 100;\r\n percent = Math.round(percent * 100) / 100;\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-material-retainage-percent').val(PJQ.helpers.formatHelpers.formatPercent(percent));\r\n lineItem.set({\r\n materialRetainagePercent: percent\r\n }, {\r\n silent: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:materialRetainagePercent', _.bind(function (lineItem) {\r\n let percent = lineItem.get('materialRetainagePercent'),\r\n amount = Math.round(lineItem.get('materialsNew') * (percent / 100));\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-material-retainage-amount').val(PJQ.helpers.formatHelpers.formatCurrency(amount));\r\n lineItem.set({\r\n materialRetainage: amount\r\n }, {\r\n percentUpdate: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:workRetainageReleased', _.bind(function (lineItem, id, opts) {\r\n if (opts.percentUpdate) {\r\n return;\r\n }\r\n\r\n let amount = lineItem.get('workRetainageReleased'),\r\n retainage = lineItem.getWorkRetainageTotal(),\r\n percent = (amount / retainage) * 100;\r\n percent = Math.round(percent * 100) / 100;\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-work-retainage-released-percent').val(PJQ.helpers.formatHelpers.formatPercent(percent));\r\n lineItem.set({\r\n workRetainageReleasedPercent: percent\r\n }, {\r\n silent: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:workRetainageReleasedPercent change:workRetainage', _.bind(function (lineItem) {\r\n let percent = lineItem.get('workRetainageReleasedPercent'),\r\n retainage = lineItem.getWorkRetainageTotal(),\r\n amount = Math.round(retainage * (percent / 100));\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-work-retainage-released-amount').val(PJQ.helpers.formatHelpers.formatCurrency(amount));\r\n lineItem.set({\r\n workRetainageReleased: amount\r\n }, {\r\n percentUpdate: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:materialRetainageReleased', _.bind(function (lineItem, id, opts) {\r\n if (opts.percentUpdate) {\r\n return;\r\n }\r\n\r\n let amount = lineItem.get('materialRetainageReleased'),\r\n retainage = lineItem.getMaterialRetainageTotal(),\r\n percent = (amount / retainage) * 100;\r\n\r\n percent = Math.round(percent * 100) / 100;\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-material-retainage-released-percent').val(PJQ.helpers.formatHelpers.formatPercent(percent));\r\n lineItem.set({\r\n materialRetainageReleasedPercent: percent\r\n }, {\r\n silent: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n\r\n this.listenTo(this.collection, 'change:materialRetainageReleasedPercent change:materialRetainage', _.bind(function (lineItem) {\r\n let percent = lineItem.get('materialRetainageReleasedPercent'),\r\n retainage = lineItem.getMaterialRetainageTotal(),\r\n amount = Math.round(retainage * (percent / 100));\r\n\r\n let $line = this.getLineItemElement(lineItem);\r\n $line.find('.input-material-retainage-released-amount').val(PJQ.helpers.formatHelpers.formatCurrency(amount));\r\n lineItem.set({\r\n materialRetainageReleased: amount\r\n }, {\r\n percentUpdate: true\r\n });\r\n this.renderTotals();\r\n }, this));\r\n }\r\n\r\n if (this.options.financialMarkups) {\r\n this.listenTo(this.options.financialMarkups, 'appliedMarkupChanged', (markup) => {\r\n if (!markup.get('void') && !markup.get('lineItemId') && !markup.lineItem) {\r\n markup.lineItem = new this.collection.model({\r\n costCodeId: markup.get('appliedCostCodeId'),\r\n costTypeId: markup.get('appliedCostTypeId'),\r\n description: markup.get('name'),\r\n quantity: 1,\r\n unitPrice: 0\r\n });\r\n markup.lineItem.markup = markup;\r\n\r\n this.collection.add(markup.lineItem);\r\n this.renderLineItemsTable();\r\n if (typeof this.options.onLineItemAdd === 'function') {\r\n this.options.onLineItemAdd(markup.lineItem);\r\n }\r\n this.updateLineItemRow(markup.lineItem);\r\n } else {\r\n let lineItem = markup.lineItem;\r\n if (lineItem == null) {\r\n lineItem = this.collection.get(markup.get('lineItemId'));\r\n }\r\n console.log(lineItem);\r\n\r\n if (markup.get('void')) {\r\n let row = this.dataTable.getRow(lineItem.cid);\r\n if (row) {\r\n this.dataTable.removeRow(row);\r\n }\r\n this.collection.remove(lineItem);\r\n this.renderTotals();\r\n } else {\r\n this.updateLineItemRow(lineItem);\r\n }\r\n }\r\n });\r\n }\r\n },\r\n getPossibleLineItems: function () {\r\n let result = [];\r\n _.each(this.possibleLineItems.models, function (pLineItem) {\r\n let exists = null != _.find(this.model.lineItems.models, function (li) {\r\n return !li.get('delete') && li.get('lineItemId') === pLineItem.get('lineItemId')\r\n && (li.get('commitmentId') === pLineItem.get('commitmentId')\r\n || li.get('changeOrderId') === pLineItem.get('changeOrderId'));\r\n });\r\n if (!exists) {\r\n result.push(pLineItem);\r\n }\r\n }, this);\r\n return result;\r\n },\r\n getPossibleLineItemOptions: function () {\r\n let contractNumber = '',\r\n contractLines = [],\r\n changes = {};\r\n _.each(this.getPossibleLineItems(), function (pLineItem) {\r\n let costCode = this.costCodes.get(pLineItem.get('costCodeId')),\r\n costType = this.costTypes.get(pLineItem.get('costTypeId'));\r\n if (costCode != null && costType != null) {\r\n let choice = {\r\n id: pLineItem.cid,\r\n name: '' + costCode.getDisplayName() + '' + ' - ' + costType.get('name'),\r\n subtext: PJQ.helpers.formatHelpers.formatCurrency(pLineItem.get('committedAmount'))\r\n };\r\n let changeOrderId = pLineItem.get('changeOrderId');\r\n if (changeOrderId > 0) {\r\n if (changes[changeOrderId] == null) {\r\n changes[changeOrderId] = {\r\n name: pLineItem.get('changeOrderNumber'),\r\n choices: []\r\n };\r\n }\r\n changes[changeOrderId].choices.push(choice);\r\n } else {\r\n contractNumber = _.size(pLineItem.get('commitmentNumber')) > 0 ? pLineItem.get('commitmentNumber') : pLineItem.get('primeContractNumber');\r\n contractLines.push(choice);\r\n }\r\n }\r\n }, this);\r\n return [\r\n {\r\n name: contractNumber ?? \"\",\r\n choices: contractLines\r\n },\r\n ..._.map(changes, (obj) => {\r\n return obj;\r\n })\r\n ];\r\n },\r\n getCostCodeOptions: function (model) {\r\n let subJob = this.subJobs.get(model.get('subJobId')),\r\n budgeted = [],\r\n unBudgeted = [],\r\n filteredCostCodes = _.filter(this.costCodes.models, function (costCode) {\r\n if (subJob == null) {\r\n return costCode.get('subJobId') == null\r\n }\r\n return costCode.get('subJobId') === subJob.id;\r\n });\r\n\r\n if (this.options.filterToCommitmentCostCodes && this.options.commitment != null) {\r\n filteredCostCodes = _.filter(filteredCostCodes, (costCode) => {\r\n return null != this.options.commitment.lineItems.findWhere({costCodeId: costCode.id});\r\n });\r\n }\r\n\r\n if (_.size(filteredCostCodes) === 0) {\r\n return [{\r\n id: 0,\r\n name: 'No cost codes found',\r\n disabled: true\r\n }];\r\n }\r\n\r\n _.each(filteredCostCodes.sort((c1, c2) => {\r\n return PJQ.helpers.sortHelpers.sortAlphaNum(c1.get('code'), c2.get('code'));\r\n }), function (costCode) {\r\n let choice = {\r\n id: costCode.id,\r\n name: costCode.getDisplayName()\r\n };\r\n if (this.budget != null && null == _.find(this.budget.lineItems.models, function (lineItem) {\r\n return !lineItem.get('isUnBudgeted') && lineItem.get('costCodeId') === costCode.id\r\n && ((subJob == null && !(lineItem.get('subJobId') > 0)) || lineItem.get('subJobId') === subJob.id);\r\n })) {\r\n unBudgeted.push(choice);\r\n } else {\r\n budgeted.push(choice);\r\n }\r\n }, this);\r\n return [\r\n {\r\n name: \"Budgeted\",\r\n choices: budgeted\r\n },\r\n {\r\n name: \"Un-Budgeted\",\r\n choices: unBudgeted\r\n }\r\n ];\r\n },\r\n getCostTypeOptions: function (model) {\r\n let costCode = this.costCodes.get(model.get('costCodeId'));\r\n if (costCode == null) {\r\n return [];\r\n }\r\n\r\n let budgeted = [],\r\n unBudgeted = [],\r\n allowedCostTypes = costCode.get('costTypeIds'),\r\n filteredCostTypes = _.filter(this.costTypes.models, function (costType) {\r\n return (_.size(allowedCostTypes) === 0 || allowedCostTypes.indexOf(costType.id) !== -1);\r\n });\r\n\r\n if (this.options.filterToCommitmentCostCodes && this.options.commitment != null) {\r\n filteredCostTypes = _.filter(this.costTypes.models, (costType) => {\r\n return null != this.options.commitment.lineItems.findWhere({costTypeId: costType.id});\r\n });\r\n }\r\n\r\n if (this.options.project\r\n && PJQ.app.session.erpIntegration\r\n && PJQ.app.session.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.REQUIRE_SYNCED_COST_TYPES)) {\r\n let filterUnsyncedCostTypes = _.bind(function () {\r\n if (this.options.project.get('externalObject') != null) {\r\n filteredCostTypes = _.filter(filteredCostTypes, (costType) => {\r\n return costType.get('externalObject') != null;\r\n })\r\n }\r\n }, this)\r\n\r\n if (!this.options.project.erpObjectFetched) {\r\n this.options.project.fetchERPObject(filterUnsyncedCostTypes());\r\n } else {\r\n filterUnsyncedCostTypes();\r\n }\r\n }\r\n\r\n if (this.budget == null) {\r\n return _.map(filteredCostTypes, (costType) => {\r\n return {\r\n id: costType.id,\r\n name: costType.get('name')\r\n };\r\n });\r\n }\r\n\r\n _.each(filteredCostTypes, function (costType) {\r\n let choice = {\r\n id: costType.id,\r\n name: costType.get('name')\r\n };\r\n if (null == _.find(this.budget.lineItems.models, function (lineItem) {\r\n return !lineItem.get('isUnBudgeted') && lineItem.get('costCodeId') === costCode.id\r\n && lineItem.get('costTypeId') === costType.id;\r\n })) {\r\n unBudgeted.push(choice);\r\n } else {\r\n budgeted.push(choice);\r\n }\r\n }, this);\r\n return [\r\n {\r\n name: \"Budgeted\",\r\n choices: budgeted\r\n },\r\n {\r\n name: \"Un-Budgeted\",\r\n choices: unBudgeted\r\n }\r\n ];\r\n },\r\n getLineItemForInput: function ($input) {\r\n if ($input == null || this.dataTable == null) {\r\n return null;\r\n }\r\n let row = this.dataTable.getRow($input.closest('tr'));\r\n if (row) {\r\n return row.data();\r\n }\r\n return null;\r\n },\r\n getLineItemRow: function (lineItem) {\r\n if (lineItem == null || this.dataTable == null) {\r\n return null;\r\n }\r\n return this.dataTable.getRow(lineItem.cid);\r\n },\r\n getLineItemElement: function (lineItem) {\r\n let row = this.getLineItemRow(lineItem);\r\n if (row) {\r\n return $(row.node());\r\n }\r\n return null;\r\n },\r\n addLineItem: function (e) {\r\n let newLineItem = new this.options.lineItemModel({\r\n description: '',\r\n quantity: 0,\r\n unitPrice: 0,\r\n amount: 0,\r\n taxAmount: 0,\r\n budgetedHours: 0,\r\n taxRate: 0,\r\n amountRemaining: 0,\r\n billedToDate: 0,\r\n accountingMethod: this.options.accountingMethod\r\n });\r\n\r\n let fnAdd = () => {\r\n this.focusLineItem = newLineItem;\r\n this.collection.add(newLineItem);\r\n this.renderLineItemsTable();\r\n if (typeof this.options.onLineItemAdd === 'function') {\r\n this.options.onLineItemAdd(newLineItem);\r\n }\r\n }\r\n if (this.isInvoices) {\r\n this.model.fetchPossibleLineItems(_.bind(function (pLineItems) {\r\n this.possibleLineItems = pLineItems;\r\n\r\n if (_.size(this.getPossibleLineItems()) === 0) {\r\n new PJQ.Alert(this.$('.line-items-table'), {\r\n type: 'warning',\r\n text: 'All line items from the related commitment and change orders are already added',\r\n timeout: 3000,\r\n extraClasses: ['mt-2'],\r\n isPrepend: true\r\n });\r\n this.$('.btn-grp-add-line-item').prop('disabled', true);\r\n } else {\r\n fnAdd();\r\n }\r\n }, this));\r\n } else if (this.options.filterToCommitmentCostCodes && (this.options.commitment != null || this.options.commitmentId > 0)) {\r\n if (this.options.commitment == null) {\r\n this.options.commitment = new PJQ.models.commitments.Commitment({\r\n id: this.options.commitmentId\r\n });\r\n }\r\n\r\n if (!this.options.commitment.isFetched) {\r\n this.options.commitment.fetch({\r\n success: _.bind(function () {\r\n fnAdd();\r\n }, this)\r\n });\r\n } else {\r\n fnAdd();\r\n }\r\n } else if (this.options.filterToPrimeContractItems && (this.options.primeContract != null || this.options.primeContractId > 0)) {\r\n this.fetchPrimeContract(fnAdd);\r\n } else {\r\n fnAdd();\r\n }\r\n },\r\n fetchPrimeContract: function (callback) {\r\n if (this.options.primeContract == null) {\r\n this.options.primeContract = new PJQ.models.primeContracts.PrimeContract({\r\n id: this.options.primeContractId\r\n });\r\n }\r\n\r\n if (!this.options.primeContract.isFetched) {\r\n this.options.primeContract.fetch({\r\n success: () => {\r\n callback();\r\n }\r\n });\r\n } else {\r\n callback();\r\n }\r\n },\r\n addFromChangeRequests: function () {\r\n new PJQ.views.changeRequests.SelectChangeRequestsModal({\r\n isSingleChoice: false,\r\n project: this.options.project,\r\n primeContractId: this.options.primeContractId,\r\n headerSubText: 'Select the Change Requests you would like to add line items from.',\r\n filterStatuses: PJQ.constants.changeRequests.changeRequestStatus.APPROVED,\r\n onSave: _.bind(function (changeRequests) {\r\n let changeRequestIds = _.map(changeRequests, function (model) {\r\n return model.id;\r\n }, this);\r\n\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'changerequests'\r\n },\r\n {\r\n endpoint: 'lineitems'\r\n }\r\n ]),\r\n data: changeRequestIds,\r\n isAPIv2: true\r\n }).post().done((lineItems) => {\r\n let availableLineItems = _.filter(lineItems, function (lineItem) {\r\n if (null != this.collection.findWhere((li) => {\r\n return li.get('changeRequestLineItemId') === lineItem.id;\r\n })) {\r\n return false;\r\n } else if (this.isCCO || this.isCommitments) {\r\n return lineItem.costLineItemId == null\r\n } else {\r\n return lineItem.revenueLineItemId == null;\r\n }\r\n }, this);\r\n\r\n if (_.size(availableLineItems) > 0) {\r\n _.each(availableLineItems, function (lineItem) {\r\n let lineItemModel = new this.options.lineItemModel({\r\n changeRequestLineItemId: lineItem.id,\r\n amount: lineItem.amount,\r\n markupAmount: lineItem.markupAmount,\r\n taxAmount: lineItem.taxAmount,\r\n number: lineItem.number,\r\n costCodeId: lineItem.costCodeId,\r\n costTypeId: lineItem.costTypeId,\r\n subJobId: lineItem.subJobId,\r\n description: lineItem.description,\r\n unitId: lineItem.unitId,\r\n quantity: lineItem.quantity,\r\n unitPrice: lineItem.unitPrice,\r\n progressQuantity: lineItem.progressQuantity,\r\n progressPercent: lineItem.progressPercent,\r\n progressAmount: lineItem.progressAmount,\r\n workRetainage: lineItem.workRetainage,\r\n workRetainageReleased: lineItem.workRetainageReleased,\r\n materialRetainage: lineItem.materialRetainage,\r\n materialRetainageReleased: lineItem.materialRetainageReleased,\r\n taxCodeId: lineItem.taxCodeId\r\n });\r\n this.collection.add(lineItemModel);\r\n\r\n if (typeof this.options.onLineItemAdd === 'function') {\r\n this.options.onLineItemAdd(lineItemModel);\r\n }\r\n }, this);\r\n\r\n this.renderLineItemsTable();\r\n this.renderTotals();\r\n } else {\r\n new PJQ.Alert(this.$('.line-items-table'), {\r\n type: 'warning',\r\n text: 'All line items from the selected Change Requests have already been assigned',\r\n timeout: 5000,\r\n extraClasses: ['mt-2'],\r\n isPrepend: true\r\n });\r\n }\r\n });\r\n }, this)\r\n });\r\n },\r\n addFromCommitments: function () {\r\n new PJQ.views.commitments.SelectCommitmentsModal({\r\n isSingleChoice: false,\r\n project: this.options.project,\r\n headerSubText: 'Select the Commitments you would like to add line items from.',\r\n filterStatuses: PJQ.constants.commitments.commitmentStatus.APPROVED,\r\n onSave: (commitments) => {\r\n let commitmentIds = _.map(commitments, function (model) {\r\n return model.id;\r\n }, this);\r\n\r\n new PJQ.ajax.Request({\r\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\r\n {\r\n endpoint: 'commitments'\r\n },\r\n {\r\n endpoint: 'lineitems'\r\n }\r\n ]),\r\n data: commitmentIds,\r\n isAPIv2: true\r\n }).post().done(_.bind(function (lineItems) {\r\n let availableLineItems = _.filter(lineItems, function (lineItem) {\r\n return lineItem.changeRequestLineItemId == null;\r\n }, this);\r\n\r\n if (_.size(availableLineItems) > 0) {\r\n _.each(availableLineItems, function (lineItem) {\r\n let lineItemModel = new this.options.lineItemModel({\r\n commitmentId: lineItem.commitmentId,\r\n amount: lineItem.amount,\r\n number: lineItem.number,\r\n costCodeId: lineItem.costCodeId,\r\n costTypeId: lineItem.costTypeId,\r\n subJobId: lineItem.subJobId,\r\n description: lineItem.description,\r\n unitId: lineItem.unitId,\r\n quantity: lineItem.quantity,\r\n unitPrice: lineItem.unitPrice,\r\n markup: lineItem.markup,\r\n progressQuantity: lineItem.progressQuantity,\r\n progressPercent: lineItem.progressPercent,\r\n progressAmount: lineItem.progressAmount,\r\n workRetainage: lineItem.workRetainage,\r\n workRetainageReleased: lineItem.workRetainageReleased,\r\n materialRetainage: lineItem.materialRetainage,\r\n materialRetainageReleased: lineItem.materialRetainageReleased,\r\n taxCodeId: lineItem.taxCodeId\r\n });\r\n this.collection.add(lineItemModel);\r\n\r\n if (typeof this.options.onLineItemAdd === 'function') {\r\n this.options.onLineItemAdd(lineItemModel);\r\n }\r\n }, this);\r\n\r\n this.renderLineItemsTable();\r\n this.renderTotals();\r\n } else {\r\n new PJQ.Alert(this.$('.line-items-table'), {\r\n type: 'warning',\r\n text: 'All line items from the selected Commitment have already been assigned',\r\n timeout: 5000,\r\n extraClasses: ['mt-2'],\r\n isPrepend: true\r\n });\r\n }\r\n }, this));\r\n }\r\n });\r\n },\r\n addAllPossibleLineItems: function () {\r\n this.model.fetchPossibleLineItems(_.bind(function (pLineItems) {\r\n this.possibleLineItems = pLineItems;\r\n let changed = false,\r\n newLineItems = [];\r\n _.each(this.possibleLineItems.models, function (pLineItem) {\r\n let existingLineItem = _.find(this.model.lineItems.models, function (li) {\r\n return li.get('lineItemId') === pLineItem.get('lineItemId')\r\n && ((li.get('commitmentId') === pLineItem.get('commitmentId'))\r\n || (li.get('changeOrderId') === pLineItem.get('changeOrderId')))\r\n });\r\n if (existingLineItem) {\r\n if (existingLineItem.get('delete')) {\r\n existingLineItem.set('delete', false);\r\n changed = true;\r\n }\r\n } else {\r\n newLineItems.push(pLineItem);\r\n changed = true;\r\n }\r\n }, this)\r\n if (changed) {\r\n if (_.size(newLineItems) > 0) {\r\n this.collection.add(newLineItems);\r\n }\r\n this.renderLineItemsTable();\r\n }\r\n }, this));\r\n },\r\n autofillAmounts: function () {\r\n if (typeof this.model.getAutofillAmounts === 'function') {\r\n this.model.getAutofillAmounts((lineItems) => {\r\n if (lineItems != null && _.size(lineItems.models) > 0) {\r\n _.each(lineItems.models, function (autoFillItem) {\r\n let invoiceItem = _.find(this.collection.models, function (li) {\r\n return li.get('costCodeId') === autoFillItem.get('costCodeId')\r\n && li.get('costTypeId') === autoFillItem.get('costTypeId');\r\n });\r\n if (invoiceItem != null) {\r\n invoiceItem.set({\r\n progressAmount: autoFillItem.get('progressAmount'),\r\n progressPercent: autoFillItem.get('progressPercent'),\r\n materialsNew: autoFillItem.get('materialsNew'),\r\n workRetainage: autoFillItem.get('workRetainage'),\r\n workRetainagePercent: autoFillItem.get('workRetainagePercent'),\r\n materialRetainage: autoFillItem.get('materialRetainage'),\r\n materialRetainagePercent: autoFillItem.get('materialRetainagePercent')\r\n })\r\n } else {\r\n this.collection.add(autoFillItem);\r\n }\r\n }, this);\r\n this.renderLineItemsTable();\r\n\r\n PJQ.notifications.notify.successNotify({\r\n message: 'Line items auto-filled successfully'\r\n });\r\n } else {\r\n PJQ.notifications.notify.warningNotify({\r\n message: 'Found 0 line items to auto-fill'\r\n });\r\n }\r\n });\r\n }\r\n },\r\n validateLineItem: function (lineItem) {\r\n if (this.dataTable == null) {\r\n return true;\r\n }\r\n\r\n let row = this.dataTable.getRow(lineItem.cid),\r\n data = row.data(),\r\n result = true,\r\n updateCell = _.bind(function ($cell, isValid) {\r\n if (isValid) {\r\n $cell.removeClass('bg-danger-transparent');\r\n } else {\r\n $cell.addClass('bg-danger-transparent');\r\n }\r\n result = result && isValid;\r\n }, this);\r\n\r\n if (data == null || data.get('delete')) {\r\n return true;\r\n }\r\n\r\n if (row != null) {\r\n if (!this.isInvoices) {\r\n let costCodeCol = 1,\r\n costTypeCol = 2,\r\n uomCol = 5;\r\n if (_.size(this.subJobs) > 0) {\r\n costCodeCol++;\r\n costTypeCol++;\r\n uomCol++;\r\n }\r\n\r\n let contractItemCol = null;\r\n if (this.options.filterToPrimeContractItems) {\r\n costCodeCol++;\r\n costTypeCol++;\r\n uomCol++;\r\n\r\n contractItemCol = this.options.enableSelection ? 2 : 1;\r\n }\r\n\r\n if (this.options.requirePrimeContractItem && contractItemCol != null) {\r\n updateCell($(row.nodes()[0]).find('td:eq(' + contractItemCol + ')'), _.size(lineItem.get('description')) > 0);\r\n }\r\n\r\n if (this.options.isCostCodeRequired !== false) {\r\n updateCell($(row.nodes()[0]).find('td:eq(' + costCodeCol + ')'), lineItem.get('costCodeId') > 0);\r\n }\r\n\r\n if (this.options.isCostTypeRequired !== false) {\r\n updateCell($(row.nodes()[0]).find('td:eq(' + costTypeCol + ')'), lineItem.get('costTypeId') > 0);\r\n }\r\n\r\n if (this.options.accountingMethod === PJQ.constants.budget.accountingMethod.UNIT_QUANTITY) {\r\n updateCell($(row.nodes()[0]).find('td:eq(' + uomCol + ')'), lineItem.get('unitId') > 0 || lineItem.markup || lineItem.get('appliedMarkupId') > 0);\r\n }\r\n } else {\r\n\r\n }\r\n }\r\n return result;\r\n },\r\n validate: function () {\r\n this.wasValidated = true;\r\n\r\n let result = true;\r\n _.each(this.collection.models, function (lineItem) {\r\n result = result && this.validateLineItem(lineItem);\r\n }, this);\r\n return result;\r\n },\r\n saveLineItem: function (e) {\r\n if (e && e.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n },\r\n deleteLineItem: function (row) {\r\n if (row == null) {\r\n return;\r\n }\r\n\r\n let item = row.data();\r\n if (this.collection != null) {\r\n if (item.isNew()) {\r\n this.collection.remove(item);\r\n } else {\r\n item.set('delete', true);\r\n }\r\n this.dataTable.removeRow(row);\r\n this.renderTotals();\r\n this.$('.btn-grp-add-line-item').prop('disabled', false);\r\n }\r\n\r\n if (typeof this.options.onLineItemDelete === 'function') {\r\n this.options.onLineItemDelete(item);\r\n }\r\n },\r\n deleteLineItemClicked: function (e) {\r\n e.stopPropagation();\r\n let row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\r\n if (row != null) {\r\n let item = row.data();\r\n if (item && item.get('changeRequestLineItemId') && !item.isNew()) {\r\n new PJQ.views.modals.DeleteCancel({\r\n header: \"Confirm Deletion\",\r\n body: \"This line item was created from a Change Request. This line item will still exist on the Change Request, but it will no longer be assigned. Are you sure you want to delete this line item?\",\r\n onDelete: _.bind(function () {\r\n this.deleteLineItem(row);\r\n }, this)\r\n });\r\n } else {\r\n this.deleteLineItem(row);\r\n }\r\n }\r\n },\r\n bulkDeleteLineItems: function () {\r\n let lineItems = _.map(this.options.selectedLineItems, (cid) => {\r\n return this.collection.get(cid);\r\n });\r\n new PJQ.views.modals.DeleteCancel({\r\n header: \"Confirm Deletion\",\r\n body: \"You're about to delete \" + _.size(lineItems) + \" line items. Are you sure you want to delete these line items?\",\r\n onDelete: _.bind(function () {\r\n _.each(lineItems, (lineItem) => {\r\n this.deleteLineItem(this.getLineItemRow(lineItem));\r\n })\r\n }, this)\r\n });\r\n },\r\n bulkEditLineItems: function () {\r\n let lineItems = _.map(this.options.selectedLineItems, (cid) => {\r\n return this.collection.get(cid);\r\n });\r\n\r\n new PJQ.views.budget.BulkEditLineItemsModal({\r\n lineItems: lineItems,\r\n enableRetainage: this.options.enableRetainage,\r\n enableStoredMaterials: this.options.enableStoredMaterials,\r\n onSave: () => {\r\n this.options.selectedLineItems = [];\r\n this.renderActions();\r\n this.renderLineItemsTable();\r\n this.renderTotals();\r\n }\r\n })\r\n },\r\n viewCommitment: function (e) {\r\n let id = $(e.currentTarget).data('id');\r\n if (typeof this.options.onCommitmentView === 'function') {\r\n this.options.onCommitmentView(id);\r\n }\r\n if (id > 0) {\r\n new PJQ.views.commitments.CommitmentEditModal({\r\n model: new PJQ.models.commitments.Commitment({\r\n id: id\r\n })\r\n });\r\n }\r\n },\r\n viewChangeOrder: function (e) {\r\n let id = $(e.currentTarget).data('id'),\r\n type = $(e.currentTarget).data('type');\r\n if (typeof this.options.onChangeOrderView === 'function') {\r\n this.options.onChangeOrderView(id);\r\n }\r\n\r\n if (id > 0 && _.size(type) > 0) {\r\n if (this.isReceivableInvoices || type === 'pcco') {\r\n new PJQ.views.primeContracts.ChangeOrderEditModal({\r\n model: new PJQ.models.primeContracts.ChangeOrder({\r\n id: id\r\n })\r\n });\r\n } else {\r\n new PJQ.views.commitments.ChangeOrderEditModal({\r\n model: new PJQ.models.commitments.ChangeOrder({\r\n id: id\r\n })\r\n });\r\n }\r\n }\r\n },\r\n lineItemSelected: function (e) {\r\n if (this.options.selectedLineItems == null) {\r\n this.options.selectedLineItems = [];\r\n }\r\n\r\n let $target = $(e.currentTarget),\r\n cid = $target.data('cid'),\r\n isChecked = $target.prop('checked');\r\n if (_.size(cid) > 0) {\r\n if (isChecked) {\r\n this.options.selectedLineItems.push(cid);\r\n } else {\r\n this.options.selectedLineItems = _.reject(this.options.selectedLineItems, function (sCid) {\r\n return sCid === cid;\r\n });\r\n }\r\n }\r\n\r\n this.$('.select-all-line-items').prop('checked', _.size(this.options.selectedLineItems) === _.size(this.collection.models));\r\n\r\n this.renderActions();\r\n },\r\n selectAllLineItems: function (e) {\r\n let $target = $(e.currentTarget),\r\n isChecked = $target.prop('checked');\r\n\r\n if (!isChecked || this.options.selectedLineItems == null) {\r\n this.options.selectedLineItems = [];\r\n }\r\n\r\n _.each(this.collection.models, function (model) {\r\n if (model.markup || model.get('appliedMarkupId') > 0) {\r\n return;\r\n }\r\n\r\n let checkbox = this.$('.select-cr-li[data-cid=\"' + model.cid + '\"]');\r\n\r\n if (!isChecked) {\r\n checkbox.prop('checked', false);\r\n } else {\r\n checkbox.prop('checked', true);\r\n\r\n if (!_.contains(this.options.selectedLineItems, model.cid)) {\r\n this.options.selectedLineItems.push(model.cid);\r\n }\r\n }\r\n }, this);\r\n\r\n this.renderActions();\r\n },\r\n renderActions: function () {\r\n let disableCommitmentsButtons = true,\r\n disableContractsButtons = true;\r\n if (_.size(this.options.selectedLineItems) > 0) {\r\n this.$('.btn-create-new').removeClass('disabled');\r\n\r\n _.each(this.collection.get(this.options.selectedLineItems), (lineItem) => {\r\n if (!(lineItem.get('costLineItemId') > 0)) {\r\n disableCommitmentsButtons = false;\r\n }\r\n\r\n if (!(lineItem.get('revenueLineItemId') > 0)) {\r\n disableContractsButtons = false;\r\n }\r\n });\r\n }\r\n this.renderSubTemplate(false, this.options.subTemplates.actions, this.$('.line-items-actions'), _.extend(this.renderData(), {\r\n disableCommitmentsButtons: disableCommitmentsButtons,\r\n disableContractsButtons: disableContractsButtons\r\n }), () => {\r\n if (this.accountingMethodPicker) {\r\n this.accountingMethodPicker.remove();\r\n }\r\n this.accountingMethodPicker = new PJQ.inputs.Selectpicker({\r\n el: this.$('.select-accounting-method'),\r\n isIntChoices: true,\r\n defaultValue: this.options.accountingMethod,\r\n canEdit: this.options.canEdit && _.size(this.getVisibleLineItems()) === 0,\r\n onChange: _.bind(function (value) {\r\n this.options.accountingMethod = value;\r\n if (typeof this.options.onAccountingMethodChanged === 'function') {\r\n this.options.onAccountingMethodChanged(value);\r\n }\r\n this.renderLineItemsTable();\r\n }, this)\r\n });\r\n });\r\n },\r\n addLineItemsToCommitment: function () {\r\n if (_.size(this.options.selectedLineItems) === 0) {\r\n return;\r\n }\r\n\r\n let commitmentIds = this.getSelectedCommitmentIds(),\r\n selCommitmentId = null;\r\n if (_.size(commitmentIds) === 1) {\r\n selCommitmentId = commitmentIds[0];\r\n }\r\n\r\n new PJQ.views.commitments.SelectCommitmentsModal({\r\n isSingleChoice: true,\r\n project: this.options.project,\r\n selectedCommitmentId: selCommitmentId,\r\n headerSubText: 'Select the Commitment you would like to add these line items to',\r\n filterStatuses: [\r\n PJQ.constants.commitments.commitmentStatus.DRAFT,\r\n PJQ.constants.commitments.commitmentStatus.PURCHASE_ORDER_PROCESSING,\r\n PJQ.constants.commitments.commitmentStatus.SUBCONTRACT_OUT_FOR_BID,\r\n PJQ.constants.commitments.commitmentStatus.OUT_FOR_SIGNATURE,\r\n PJQ.constants.commitments.commitmentStatus.SUBMITTED,\r\n PJQ.constants.commitments.commitmentStatus.PURCHASE_ORDER_PARTIALLY_RECEIVED,\r\n PJQ.constants.commitments.commitmentStatus.PURCHASE_ORDER_RECEIVED\r\n ],\r\n onSave: async (commitment) => {\r\n if (commitment == null) {\r\n return;\r\n }\r\n\r\n await commitment.fetch();\r\n\r\n let selLineItems = this.collection.get(this.options.selectedLineItems);\r\n _.each(selLineItems, function (lineItem) {\r\n if (lineItem.get('costLineItemId') == null) {\r\n commitment.lineItems.add(_.extend(lineItem.attributes, {\r\n id: null,\r\n commitmentId: commitment.id,\r\n changeRequestLineItemId: lineItem.id\r\n }));\r\n }\r\n }, this);\r\n\r\n new PJQ.views.commitments.CommitmentEditModal({\r\n model: commitment,\r\n fetch: false,\r\n onSave: _.bind(function (commitment) {\r\n if (typeof this.options.onCreateFromLineItems === 'function') {\r\n this.options.onCreateFromLineItems();\r\n }\r\n }, this),\r\n });\r\n }\r\n });\r\n },\r\n createCommitmentFromLineItems: function (e) {\r\n if (_.size(this.options.selectedLineItems) === 0) {\r\n return;\r\n }\r\n\r\n let commitmentType = $(e.currentTarget).hasClass('new-po') ? PJQ.constants.commitments.commitmentType.PURCHASE_ORDER : PJQ.constants.commitments.commitmentType.SUBCONTRACT,\r\n lineItems = [],\r\n selLineItems = this.collection.get(this.options.selectedLineItems),\r\n vendors = [],\r\n vendorIds = [];\r\n _.each(selLineItems, function (lineItem) {\r\n if (lineItem.get('costLineItemId') == null) {\r\n lineItems.push(_.extend(lineItem.attributes, {\r\n id: null,\r\n changeRequestLineItemId: lineItem.id\r\n }));\r\n\r\n let liVendor = lineItem.get('vendor');\r\n if (vendors == null) {\r\n return;\r\n } else if (liVendor && vendorIds.indexOf(liVendor.id) === -1) {\r\n vendors.length > 0 ? null : vendors.push(liVendor);\r\n }\r\n }\r\n }, this);\r\n\r\n if (_.size(lineItems) > 0) {\r\n new PJQ.views.commitments.CommitmentEditModal({\r\n model: null,\r\n fromChangeRequest: this.model,\r\n contractedContact: vendors.length > 0 ? vendors[0] : null,\r\n commitmentType: commitmentType,\r\n lineItems: lineItems,\r\n onSave: _.bind(function (commitment) {\r\n if (typeof this.options.onCreateFromLineItems === 'function') {\r\n this.options.onCreateFromLineItems();\r\n }\r\n }, this),\r\n });\r\n }\r\n },\r\n addLineItemsToPCCO: function () {\r\n if (_.size(this.options.selectedLineItems) === 0) {\r\n return;\r\n }\r\n\r\n new PJQ.views.primeContracts.SelectChangeOrdersModal({\r\n isSingleChoice: true,\r\n project: this.options.project,\r\n headerSubText: 'Select the Contract Change Orders you would like to add these line items to.',\r\n filterStatuses: [\r\n PJQ.constants.primeContracts.changeOrderStatus.DRAFT,\r\n PJQ.constants.primeContracts.changeOrderStatus.NO_CHARGE,\r\n PJQ.constants.primeContracts.changeOrderStatus.IN_REVIEW,\r\n PJQ.constants.primeContracts.changeOrderStatus.NOT_PRICING,\r\n PJQ.constants.primeContracts.changeOrderStatus.PRICING,\r\n PJQ.constants.primeContracts.changeOrderStatus.NOT_PROCEEDING,\r\n PJQ.constants.primeContracts.changeOrderStatus.PROCEEDING,\r\n PJQ.constants.primeContracts.changeOrderStatus.REVISED\r\n ],\r\n onSave: async (changeOrder) => {\r\n if (changeOrder == null) {\r\n return;\r\n }\r\n\r\n await changeOrder.fetch();\r\n\r\n let selLineItems = this.collection.get(this.options.selectedLineItems);\r\n _.each(selLineItems, function (lineItem) {\r\n if (lineItem.get('revenueLineItemId') == null) {\r\n changeOrder.lineItems.add(_.extend(lineItem.attributes, {\r\n id: null,\r\n changeOrderId: changeOrder.id,\r\n changeRequestLineItemId: lineItem.id\r\n }));\r\n }\r\n }, this);\r\n\r\n new PJQ.views.primeContracts.ChangeOrderEditModal({\r\n model: changeOrder,\r\n onSave: _.bind(function (changeOrder) {\r\n if (typeof this.options.onCreateFromLineItems === 'function') {\r\n this.options.onCreateFromLineItems();\r\n }\r\n }, this),\r\n });\r\n }\r\n });\r\n },\r\n createPCCOFromLineItems: async function () {\r\n if (_.size(this.options.selectedLineItems) === 0) {\r\n return;\r\n }\r\n\r\n let primeContract = new PJQ.models.primeContracts.PrimeContract({\r\n id: this.options.changeRequest.get('primeContractId')\r\n });\r\n await primeContract.fetch();\r\n\r\n let lineItems = [],\r\n selLineItems = this.collection.get(this.options.selectedLineItems);\r\n _.each(selLineItems, function (lineItem) {\r\n if (!lineItem.get('revenueLineItemId')) {\r\n lineItems.push(_.extend(lineItem.attributes, {\r\n id: null,\r\n amount: lineItem.get('revenue'),\r\n changeRequestLineItemId: lineItem.id\r\n }));\r\n }\r\n }, this);\r\n\r\n if (_.size(lineItems) > 0) {\r\n new PJQ.views.primeContracts.ChangeOrderEditModal({\r\n primeContract: primeContract,\r\n lineItems: lineItems,\r\n onSave: _.bind(function (commitment) {\r\n if (typeof this.options.onCreateFromLineItems === 'function') {\r\n this.options.onCreateFromLineItems();\r\n }\r\n }, this),\r\n });\r\n }\r\n },\r\n addLineItemsToCCO: function () {\r\n if (_.size(this.options.selectedLineItems) === 0) {\r\n return;\r\n }\r\n\r\n new PJQ.views.commitments.SelectCommitmentChangeOrdersModal({\r\n isSingleChoice: true,\r\n project: this.options.project,\r\n headerSubText: 'Select the Commitment Change Orders you would like to add these line items to.',\r\n filterStatuses: [\r\n PJQ.constants.commitments.changeOrderStatus.DRAFT,\r\n PJQ.constants.commitments.changeOrderStatus.NO_CHARGE,\r\n PJQ.constants.commitments.changeOrderStatus.IN_REVIEW,\r\n PJQ.constants.commitments.changeOrderStatus.NOT_PRICING,\r\n PJQ.constants.commitments.changeOrderStatus.PRICING,\r\n PJQ.constants.commitments.changeOrderStatus.NOT_PROCEEDING,\r\n PJQ.constants.commitments.changeOrderStatus.PROCEEDING,\r\n PJQ.constants.commitments.changeOrderStatus.REVISED\r\n ],\r\n onSave: async (changeOrder) => {\r\n if (changeOrder == null) {\r\n return;\r\n }\r\n\r\n await changeOrder.fetch();\r\n\r\n let selLineItems = this.collection.get(this.options.selectedLineItems);\r\n _.each(selLineItems, function (lineItem) {\r\n if (lineItem.get('costLineItemId') == null) {\r\n changeOrder.lineItems.add(_.extend(lineItem.attributes, {\r\n id: null,\r\n changeOrderId: changeOrder.id,\r\n changeRequestLineItemId: lineItem.id\r\n }));\r\n }\r\n }, this);\r\n\r\n new PJQ.views.commitments.ChangeOrderEditModal({\r\n model: changeOrder,\r\n onSave: _.bind(function (changeOrder) {\r\n if (typeof this.options.onCreateFromLineItems === 'function') {\r\n this.options.onCreateFromLineItems();\r\n }\r\n }, this),\r\n });\r\n }\r\n });\r\n },\r\n getSelectedCommitmentIds: function () {\r\n let commitmentIds = _.uniq(_.map(this.options.selectedLineItems, (liCid) => {\r\n let lineItem = this.collection.get(liCid);\r\n return lineItem.get('commitmentId');\r\n }));\r\n return commitmentIds;\r\n },\r\n createCCOFromLineItems: function () {\r\n if (_.size(this.options.selectedLineItems) === 0) {\r\n return;\r\n }\r\n\r\n let commitmentIds = this.getSelectedCommitmentIds(),\r\n selCommitmentId = null;\r\n if (_.size(commitmentIds) === 1) {\r\n selCommitmentId = commitmentIds[0];\r\n }\r\n\r\n new PJQ.views.commitments.SelectCommitmentsModal({\r\n isSingleChoice: true,\r\n project: this.options.project,\r\n selectedCommitmentId: selCommitmentId,\r\n filterStatuses: PJQ.constants.commitments.commitmentStatus.APPROVED,\r\n headerSubText: 'Select the Commitment you would like to create a Change Order for.',\r\n onSave: async (commitment) => {\r\n if (commitment == null) {\r\n return;\r\n }\r\n\r\n await commitment.fetch();\r\n\r\n let selLineItems = this.collection.get(this.options.selectedLineItems),\r\n lineItems = [];\r\n _.each(selLineItems, function (lineItem) {\r\n if (lineItem.get('costLineItemId') == null) {\r\n lineItems.push(_.extend(lineItem.attributes, {\r\n id: null,\r\n changeRequestLineItemId: lineItem.id\r\n }));\r\n }\r\n }, this);\r\n\r\n if (_.size(lineItems) > 0) {\r\n new PJQ.views.commitments.ChangeOrderEditModal({\r\n commitment: commitment,\r\n fromChangeRequest: this.model,\r\n lineItems: lineItems,\r\n onSave: _.bind(function (changeOrder) {\r\n if (typeof this.options.onCreateFromLineItems === 'function') {\r\n this.options.onCreateFromLineItems();\r\n }\r\n }, this),\r\n });\r\n }\r\n }\r\n });\r\n }\r\n});","PJQ.collections.productionQuantities = PJQ.collections.productionQuantities ? PJQ.collections.productionQuantities : {};\nPJQ.models.productionQuantities = PJQ.models.productionQuantities ? PJQ.models.productionQuantities : {};\nPJQ.views.productionQuantities = PJQ.views.productionQuantities ? PJQ.views.productionQuantities : {};\n\nPJQ.modules.productionQuantities = {\n routes: [\n {\n route: 'projects/:projectId/productionquantities',\n name: 'productionquantities',\n callback: function (projectId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"productionquantities\");\n }\n },\n {\n route: 'projects/:projectId/productionquantities/:productionQuantityId',\n name: 'productionquantity',\n callback: function (projectId, productionQuantityId) {\n PJQ.modules.projectWall.initProjectNavigator(parseInt(projectId), \"productionquantities\", {\n productionQuantityId: parseInt(productionQuantityId)\n });\n }\n }\n ]\n};\n\nPJQ.app.addRoutes(PJQ.modules.productionQuantities.routes);","PJQ.views.productionQuantities.ProductionQuantitiesAddModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-production-quantities-add'),\n width: '95%',\n maxWidth: 1000,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-cancel': 'close',\n 'click .btn-add-production-quantity': 'addProductionQuantity',\n 'click .btn-save': 'saveProductionQuantities',\n 'click .btn-import': 'importFile'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.productionQuantities.ProductionQuantities(null, {\n projectId: this.options.project.id\n });\n }\n\n this.costCodes = await this.options.project.fetchCostCodes();\n this.unitsOfMeasure = await this.options.project.fetchUnitsOfMeasure();\n this.subJobs = await this.options.project.fetchSubJobs();\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n },\n renderData: function () {\n return {\n collection: this.collection,\n isFetched: this.isFetched\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.dataTable = new PJQ.views.productionQuantities.AddProductionQuantitiesDatatable({\n el: this.$('.add-production-quantities-data'),\n rowId: \"cid\",\n columns: this.getColumns(),\n data: this.collection.models,\n costCodes: this.costCodes,\n unitsOfMeasure: this.unitsOfMeasure,\n subJobs: this.subJobs,\n paging: false,\n afterDataTableRender: _.bind(function () {\n this.renderInputs();\n }, this),\n onRowRemoved: _.bind(function () {\n this.renderInputs();\n }, this),\n headerData: _.bind(function () {\n return {\n project: this.options.project\n };\n }, this),\n onDeleteProductionQuantity: (row) => {\n this.deleteProductionQuantity(row);\n },\n order: [[1, 'asc']],\n contextMenuOptions: {\n actions: [\n {\n name: 'Delete',\n onClick: (row) => {\n this.deleteProductionQuantity(row.data());\n },\n isDanger: true\n }\n ]\n }\n });\n },\n getColumns: function (includeAllColumns = false) {\n return [\n {\n \"columnData\": \"subJobId\",\n \"title\": \"Sub Job\",\n \"visible\": _.size(this.subJobs.models) > 0,\n \"width\": \"15%\",\n \"render\": _.bind(function (data, type, row) {\n return '';\n }, this)\n },\n {\n \"columnData\": \"costCodeId\",\n \"title\": \"Cost Code\",\n \"width\": '15%',\n \"render\": (data, type, row) => {\n let res = '
';\n\n res += '
';\n return res;\n }\n },\n {\n \"columnData\": \"description\",\n \"data\": \"attributes.description\",\n \"width\": '20%',\n \"title\": \"Description\",\n \"render\": _.bind(function (data, type, row) {\n return '';\n }, this)\n },\n {\n \"columnData\": \"unitOfMeasure\",\n \"data\": \"attributes.unitId\",\n \"title\": \"Unit\",\n \"width\": \"20%\",\n \"className\": \"text-align-center\",\n \"render\": (data, type, row) => {\n return '';\n }\n },\n {\n \"columnData\": \"quantity\",\n \"data\": \"attributes.quantity\",\n \"width\": \"10%\",\n \"title\": \"Quantity\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"text-align-center\",\n \"render\": (data, type, row) => {\n return '';\n }\n },\n {\n \"title\": '',\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"10%\",\n \"className\": \"text-center\",\n \"visible\": true,\n \"render\": _.bind(function (data, type, row) {\n return `
`;\n }, this)\n }\n ];\n },\n renderInputs: function () {\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-decimal'), 2);\n\n if (!this.binder) {\n this.binder = new PJQ.Binder(this.$el, this.collection, {\n delegate: true,\n modelSelectorAttribute: 'id',\n idAttribute: 'cid',\n useDecimalPercentFields: true,\n watchElements: [\n 'input'\n ]\n });\n }\n\n if (_.size(this.subJobs.models) > 0) {\n this.subJobPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\n pickerSelector: '.select-sub-job',\n valueAttribute: 'subJobId',\n selectPickerOptions: {\n noneSelectedText: 'Parent Job',\n isLiveSearch: true,\n isIntChoices: true,\n size: 8,\n isDisabled: _.bind(function (model) {\n return false;\n }, this),\n choices: _.union([{name: '', choices: {id: 0, name: 'Parent Job'}}], [{\n name: 'Sub Jobs', choices: _.map(this.subJobs.models, function (subJob) {\n return {\n id: subJob.id,\n name: subJob.get('name'),\n subtext: subJob.get('code')\n }\n }, this)\n }])\n },\n onChange: _.bind(function (model, value) {\n model.set('subJobId', value > 0 ? value : null);\n model.set('costCodeId', 0);\n\n let costCodePicker = this.costCodeSelectorCollection.pickers[model.cid];\n costCodePicker.render();\n\n // this.nextInput('subJob', model);\n }, this)\n });\n }\n\n this.costCodeSelectorCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\n pickerSelector: '.select-cost-code',\n valueAttribute: 'costCodeId',\n selectPickerOptions: {\n isLiveSearch: true,\n isIntChoices: true,\n hideDisabled: false,\n isDisabled: _.bind(function (model) {\n return false;\n }, this),\n choices: _.bind(function (model) {\n return this.getCostCodeOptions(model)\n }, this)\n },\n onChange: _.bind(function (model, value) {\n model.set('costCodeId', value);\n\n // this.nextInput('costCode', model);\n }, this)\n });\n\n new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\n pickerSelector: '.select-unit-type',\n valueAttribute: 'unitId',\n selectPickerOptions: {\n isIntChoices: true,\n isDisabled: function (model) {\n return !model.isNew();\n },\n choices: _.bind(function (model) {\n return _.map(this.unitsOfMeasure.models, function (unit) {\n return {\n id: unit.id,\n name: unit.get('name')\n }\n });\n }, this)\n },\n onChange: _.bind(function (model, value) {\n model.set('unitId', value);\n\n // this.nextInput('unitType', model);\n }, this)\n });\n },\n getCostCodeOptions: function (model) {\n let subJob = this.subJobs.get(model.get('subJobId')),\n costCodes = [],\n filteredCostCodes = _.filter(this.costCodes.models, function (costCode) {\n if (subJob == null) {\n return costCode.get('subJobId') == null\n }\n return costCode.get('subJobId') === subJob.id;\n });\n\n if (_.size(filteredCostCodes) === 0) {\n return [{\n id: 0,\n name: 'No cost codes found',\n disabled: true\n }];\n }\n\n _.each(filteredCostCodes.sort((c1, c2) => {\n return PJQ.helpers.sortHelpers.sortAlphaNum(c1.get('code'), c2.get('code'));\n }), function (costCode) {\n let choice = {\n id: costCode.id,\n name: costCode.getDisplayName()\n };\n costCodes.push(choice);\n }, this);\n return costCodes\n },\n addProductionQuantity: function () {\n let newModel = new PJQ.models.productionQuantities.ProductionQuantity({\n projectId: this.options.project.id,\n quantity: 0,\n description: ''\n });\n this.collection.add(newModel);\n this.dataTable.addRow(newModel)\n this.dataTable.render();\n },\n saveProductionQuantities: function () {\n if (!this.validate())\n return;\n let loader = new PJQ.Loader(this.$('.modal-body'));\n\n let newModels = _.filter(this.collection.models, (model) => model.isNew()),\n newModelsJSON = _.map(newModels, (model) => model.toJSON());\n\n this.collection.saveBulk(newModelsJSON, (newProductionQuantities) => {\n if (typeof this.options.onSave == 'function') {\n this.options.onSave(newProductionQuantities);\n }\n loader.remove();\n this.removeModal();\n })\n },\n importFile: function () {\n this.renderUploader();\n },\n renderUploader: function () {\n let $uploader = this.$('.import-uploader');\n if (this.fileUploader == null) {\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: $uploader,\n useApiV2: true,\n allowedExtensions: ['xls', 'xlsx', 'csv'],\n uploadTemplateCallback: () => {\n PJQ.files.downloadFile(PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'productionquantities'\n },\n {\n endpoint: 'import'\n },\n {\n endpoint: 'template'\n }\n ]), {isAPIv2: true});\n },\n maxFiles: 1,\n style: 'grid',\n onSuccess: _.bind(function (file) {\n let loader = new PJQ.Loader($uploader);\n let uploadId = file.uploadId;\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: PJQ.app.session.project.id,\n },\n {\n endpoint: 'productionquantities'\n },\n {\n endpoint: 'import',\n value: uploadId\n }\n ]),\n isAPIv2: true\n }).post().done(_.bind(function (result) {\n loader.remove();\n this.fileUploader.remove();\n this.subJobs.add(result.subJobs);\n this.costCodes.add(result.costCodes);\n this.collection.add(result.lineItems);\n this.dataTable.render();\n }, this)).fail((err) => {\n if (err && err.responseJSON) {\n loader.remove();\n let file = this.fileUploader.collection.models[0];\n this.fileUploader.collection.remove(file);\n this.fileUploader.render();\n this.fileUploader.showError(err.responseJSON.message, 10000);\n }\n });\n }, this)\n });\n } else {\n // Hide file uploader if button is clicked again\n $uploader.attr('hidden', !$uploader.attr('hidden'));\n }\n let self = this;\n $uploader.find('.btn-download-template').off('click').on('click', self.downloadImportTemplate);\n },\n validate: function () {\n let isValid = true;\n\n _.each(this.collection.models, (model) => {\n isValid = isValid && this.validateProductionQuantity(model);\n })\n\n return isValid;\n },\n validateProductionQuantity: function (productionQuantity) {\n if (this.dataTable == null) {\n return true;\n }\n\n let row = this.dataTable.getRow(productionQuantity.cid),\n data = row?.data(),\n result = true,\n updateCell = _.bind(function ($cell, isValid) {\n if (isValid) {\n $cell.removeClass('bg-danger-transparent');\n } else {\n $cell.addClass('bg-danger-transparent');\n }\n result = result && isValid;\n }, this);\n\n if (data == null || data.get('delete')) {\n return true;\n }\n\n if (row != null) {\n let costCodeCol = 0,\n uomCol = 2;\n if (_.size(this.subJobs.models) > 0) {\n costCodeCol++;\n uomCol++;\n }\n\n updateCell($(row.nodes()[0]).find('td:eq(' + costCodeCol + ')'), productionQuantity.get('costCodeId') > 0);\n updateCell($(row.nodes()[0]).find('td:eq(' + uomCol + ')'), productionQuantity.get('unitId') > 0);\n }\n return result;\n },\n deleteProductionQuantity: function (row) {\n let productionQuantity = row.data();\n productionQuantity.destroy();\n this.dataTable.removeRow(row);\n },\n close: function () {\n if (_.size(this.collection.models) > 0) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.saveProductionQuantities();\n this.removeModal();\n }, this),\n onDontSave: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});\n\nPJQ.views.productionQuantities.InstalledQuantitiesAddModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-installed-quantities-add'),\n width: '95%',\n maxWidth: 1000,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-cancel': 'close',\n 'click .btn-save': 'save'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.productionQuantities.InstalledQuantities(null, {\n projectId: this.options.project.id\n });\n }\n\n if (this.options.productionQuantities == null) {\n this.options.productionQuantities = new PJQ.collections.productionQuantities.ProductionQuantities(null, {\n projectId: this.options.project.id\n })\n }\n\n this.costCodes = await this.options.project.fetchCostCodes();\n this.unitsOfMeasure = await this.options.project.fetchUnitsOfMeasure();\n this.subJobs = await this.options.project.fetchSubJobs();\n\n if (!this.options.productionQuantities.isFetched) {\n this.options.productionQuantities.fetch({\n success: _.bind(function () {\n if (this.options.productionQuantityId > 0) {\n this.productionQuantity = this.options.productionQuantities.get(this.options.productionQuantityId);\n }\n\n this.isFetched = true;\n this.render();\n }, this)\n });\n } else {\n this.isFetched = true;\n this.render();\n }\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.options.canEdit = this.options.project.permissions.hasPermission('productionQuantities.canEdit');\n this.options.canAdd = this.options.project.permissions.hasPermission('productionQuantities.canAdd');\n this.options.isAdmin = this.options.project.permissions.hasPermission('productionQuantities.isAdmin');\n },\n renderData: function () {\n return {\n collection: this.collection,\n productionQuantities: this.options.productionQuantities,\n productionQuantity: this.productionQuantity,\n costCodes: this.costCodes,\n isFetched: this.isFetched,\n canAdd: this.options.canAdd,\n canEdit: this.options.canEdit,\n isAdmin: this.options.isAdmin\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.addInstalledQuantitiesView = new PJQ.views.productionQuantities.InstalledQuantitiesAdd({\n el: this.$('.installed-quantities-view'),\n collection: this.collection,\n productionQuantityId: this.options.productionQuantityId,\n productionQuantities: this.options.productionQuantities,\n timeCardId: this.options.timeCardId,\n project: this.options.project,\n onSave: (newQuantities) => {\n if(typeof this.options.onSave === 'function') {\n this.options.onSave(newQuantities);\n }\n\n this.removeModal();\n }\n })\n },\n save: function () {\n this.addInstalledQuantitiesView.saveQuantities();\n },\n close: function () {\n if (_.size(this.collection.models) > 0 && (this.options.canAdd || this.options.canEdit)) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.addInstalledQuantitiesView.saveQuantities();\n }, this),\n onDontSave: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});\n\nPJQ.views.productionQuantities.TimeCardQuantitiesAddModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-time-card-quantities-add'),\n subTemplates: {\n timeCardQuantities: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'time-card-quantities')\n },\n width: '95%',\n maxWidth: 1000,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-cancel': 'close',\n 'click .btn-save': 'save'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.productionQuantities.InstalledQuantities(null, {\n projectId: this.options.project.id\n });\n }\n\n if (this.options.productionQuantities == null) {\n this.options.productionQuantities = new PJQ.collections.productionQuantities.ProductionQuantities(null, {\n projectId: this.options.project.id\n });\n }\n\n this.costCodes = await this.options.project.fetchCostCodes();\n this.unitsOfMeasure = await this.options.project.fetchUnitsOfMeasure();\n this.subJobs = await this.options.project.fetchSubJobs();\n\n if (!this.options.productionQuantities.isFetched) {\n this.options.productionQuantities.fetch({\n success: _.bind(function () {\n this.isFetched = true;\n this.render();\n }, this)\n });\n } else {\n this.isFetched = true;\n this.render();\n }\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n },\n renderData: function () {\n return {\n collection: this.collection,\n productionQuantities: this.options.productionQuantities,\n productionQuantity: this.productionQuantity,\n costCodes: this.costCodes,\n isFetched: this.isFetched\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.quantityViews = [];\n\n let $outer = this.$('.time-card-quantity-views');\n $outer.empty();\n _.each(this.options.timeCards.models, (timeCard) => {\n this.renderSubTemplate(true, this.options.subTemplates.timeCardQuantities, $outer, {\n timeCard: timeCard,\n collapse: _.size(this.options.timeCards.models) > 2,\n contact: timeCard.get('contact')\n }, _.bind(function (el) {\n let quantitiesView = new PJQ.views.productionQuantities.InstalledQuantitiesAdd({\n el: el.find('.quantities-outer'),\n project: this.options.project,\n timeCardId: timeCard.id\n });\n\n this.quantityViews.push(quantitiesView);\n }, this));\n });\n },\n validate: function() {\n let isValid = true;\n _.each(this.quantityViews, (view) => {\n isValid = isValid && view.validate();\n });\n\n return isValid;\n },\n save: function () {\n if(!this.validate()) {\n return;\n }\n\n _.each(this.quantityViews, (view) => {\n if(_.size(view.collection.models) > 0) {\n this.collection.add(view.collection.models);\n }\n });\n\n if(_.size(this.collection.models) > 0){\n this.collection.saveBulk(_.map(this.collection.models, (model) => model.toJSON()), (newQuantities) => {\n PJQ.notifications.notify.successNotify({\n message: 'Quantities saved successfully'\n });\n\n if(typeof this.options.onSave === 'function') {\n this.options.onSave(newQuantities);\n }\n this.removeModal();\n });\n }\n },\n close: function () {\n let isDirty = _.find(this.quantityViews, (view) => {\n return _.size(view.collection.models) > 0;\n });\n if (isDirty) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});\n\nPJQ.views.productionQuantities.InstalledQuantitiesAdd = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'installed-quantities-add'),\n model: null,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-add-quantity': 'addQuantity',\n 'click .btn-delete-quantity': 'deleteQuantityClicked',\n 'click .btn-import': 'importFile'\n },\n beforeFirstRender: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.productionQuantities.InstalledQuantities(null, {\n projectId: this.options.project.id\n });\n }\n\n if (this.options.productionQuantities == null) {\n this.options.productionQuantities = new PJQ.collections.productionQuantities.ProductionQuantities(null, {\n projectId: this.options.project.id\n })\n }\n\n this.costCodes = await this.options.project.fetchCostCodes();\n this.unitsOfMeasure = await this.options.project.fetchUnitsOfMeasure();\n this.subJobs = await this.options.project.fetchSubJobs();\n\n if (!this.options.productionQuantities.isFetched) {\n this.options.productionQuantities.fetch({\n success: _.bind(function () {\n if (this.options.productionQuantityId > 0) {\n this.productionQuantity = this.options.productionQuantities.get(this.options.productionQuantityId);\n }\n\n this.isFetched = true;\n this.render();\n }, this)\n });\n } else {\n this.isFetched = true;\n this.render();\n }\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.options.canEdit = this.options.project.permissions.hasPermission('productionQuantities.canEdit');\n this.options.canAdd = this.options.project.permissions.hasPermission('productionQuantities.canAdd');\n this.options.isAdmin = this.options.project.permissions.hasPermission('productionQuantities.isAdmin');\n },\n renderData: function () {\n return {\n canAdd: this.options.canAdd\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.renderDatatable();\n },\n renderDatatable: function() {\n this.dataTable = new PJQ.views.productionQuantities.AddInstalledQuantitiesDatatable({\n el: this.$('.add-production-quantity-installed-quantities-data'),\n rowId: \"cid\",\n columns: this.getColumns(),\n data: this.collection.models.filter((model) => !model.get('delete')),\n costCodes: this.costCodes,\n unitsOfMeasure: this.unitsOfMeasure,\n subJobs: this.subJobs,\n paging: false,\n afterDataTableRender: _.bind(function () {\n this.renderInputs();\n }, this),\n onRowRemoved: _.bind(function () {\n this.renderInputs();\n }, this),\n headerData: _.bind(function () {\n return {\n project: this.options.project\n };\n }, this),\n order: [[1, 'asc']],\n contextMenuOptions: {\n actions: [\n {\n name: 'Delete',\n onClick: (row) => {\n this.deleteQuantity(row.data());\n },\n isDanger: true\n }\n ]\n }\n });\n },\n getColumns: function () {\n let includedColumns = ['subJobId', 'costCodeId', 'unitOfMeasure', 'quantity', 'description', 'installedOn'],\n columns = [];\n\n if (this.options.productionQuantityId > 0) {\n includedColumns = ['quantity', 'description', 'installedOn'];\n }\n\n _.each(includedColumns, (column) => {\n switch (column) {\n case 'subJobId':\n columns.push({\n \"columnData\": \"subJobId\",\n \"title\": \"Sub Job\",\n \"visible\": _.size(this.subJobs.models) > 0,\n \"width\": \"15%\",\n \"render\": _.bind(function (data, type, row) {\n return '';\n }, this)\n });\n break;\n case 'costCodeId':\n columns.push({\n \"columnData\": \"costCodeId\",\n \"title\": \"Cost Code\",\n \"width\": '25%',\n \"render\": (data, type, row) => {\n let res = '
';\n\n res += '
';\n return res;\n }\n });\n break;\n case 'unitOfMeasure':\n columns.push({\n \"columnData\": \"unitOfMeasure\",\n \"data\": \"attributes.unitId\",\n \"title\": \"Unit\",\n \"width\": \"100px\",\n \"className\": \"text-align-center\",\n \"render\": (data, type, row) => {\n return '';\n }\n });\n break;\n case 'quantity':\n columns.push({\n \"columnData\": \"quantity\",\n \"data\": \"attributes.quantity\",\n \"title\": \"Quantity Installed\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"text-align-center\",\n \"render\": (data, type, row) => {\n return '';\n }\n });\n break;\n case 'description':\n columns.push({\n \"columnData\": \"description\",\n \"data\": \"attributes.description\",\n \"width\": '20%',\n \"title\": \"Description\",\n \"render\": _.bind(function (data, type, row) {\n return '';\n }, this)\n });\n break;\n case 'installedOn':\n columns.push({\n \"columnData\": \"installedOn\",\n \"data\": \"attributes.installedOn\",\n \"title\": \"Installed On\",\n \"width\": '120px',\n \"render\": (data, type, row) => {\n return '
';\n }\n });\n break;\n }\n });\n\n columns.push({\n \"title\": '',\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"80px\",\n \"className\": \"text-center\",\n \"visible\": true,\n \"render\": _.bind(function (data, type, row) {\n if(row.isNew() || this.options.isAdmin) {\n return `
`;\n }\n\n return '';\n }, this)\n })\n\n return columns;\n },\n renderInputs: function () {\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-decimal'), 2);\n\n let filteredCostCodes = _.filter(this.costCodes.models, (costCode) => {\n return this.options.productionQuantities.findWhere({costCodeId: costCode.get('id')}) != null;\n });\n\n let filteredSubJobs = _.filter(this.subJobs.models, (subJob) => {\n return _.find(filteredCostCodes, (costCode) => {\n return costCode.get('subJobId') === subJob.get('id');\n });\n });\n\n if (!this.binder) {\n this.binder = new PJQ.Binder(this.$el, this.collection, {\n delegate: true,\n modelSelectorAttribute: 'id',\n idAttribute: 'cid',\n useDecimalPercentFields: true,\n watchElements: [\n 'input'\n ]\n });\n }\n\n if (_.size(this.subJobs.models) > 0) {\n this.subJobPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\n pickerSelector: '.select-sub-job',\n valueAttribute: 'subJobId',\n selectPickerOptions: {\n noneSelectedText: 'Parent Job',\n isLiveSearch: true,\n isIntChoices: true,\n defaultValue: (model) => {\n if(model.get('subJobId') > 0) {\n return model.get('subJobId');\n }\n let productionQuantity = this.options.productionQuantities.findWhere({id: model.get('productionQuantityId')}),\n costCode = this.costCodes.get(productionQuantity?.get('costCodeId'));\n\n return costCode?.get('subJobId');\n },\n size: 8,\n isDisabled: _.bind(function (model) {\n return !model.isNew();\n }, this),\n choices: _.union([{name: '', choices: {id: 0, name: 'Parent Job'}}], [{\n name: 'Sub Jobs', choices: _.map(filteredSubJobs, function (subJob) {\n return {\n id: subJob.id,\n name: subJob.get('name'),\n subtext: subJob.get('code')\n }\n }, this)\n }])\n },\n onChange: _.bind(function (model, value) {\n model.set('subJobId', value > 0 ? value : null);\n model.set('costCodeId', 0);\n model.set('unitId', 0);\n model.set('productionQuantityId', 0);\n\n let costCodePicker = this.costCodeSelectorCollection.pickers[model.cid],\n uomPicker = this.uomSelectorCollection.pickers[model.cid];\n costCodePicker.render();\n uomPicker.render();\n\n // this.nextInput('subJob', model);\n }, this)\n });\n }\n\n this.costCodeSelectorCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\n pickerSelector: '.select-cost-code',\n valueAttribute: 'costCodeId',\n selectPickerOptions: {\n isLiveSearch: true,\n isIntChoices: true,\n hideDisabled: false,\n defaultValue: (model) => {\n if(model.get('costCodeId') > 0) {\n return model.get('costCodeId');\n }\n let productionQuantity = this.options.productionQuantities.findWhere({id: model.get('productionQuantityId')});\n\n return productionQuantity?.get('costCodeId');\n },\n isDisabled: _.bind(function (model) {\n return !model.isNew();\n }, this),\n choices: _.bind(function (model) {\n return this.getCostCodeOptions(model)\n }, this)\n },\n onChange: _.bind(function (model, value) {\n model.set('costCodeId', value);\n model.set('unitId', 0);\n model.set('productionQuantityId', 0);\n\n let uomPicker = this.uomSelectorCollection.pickers[model.cid];\n uomPicker.render();\n\n // this.nextInput('costCode', model);\n }, this)\n });\n\n this.uomSelectorCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.collection.models, {\n pickerSelector: '.select-unit-type',\n valueAttribute: 'unitId',\n selectPickerOptions: {\n isIntChoices: true,\n isDisabled: function (model) {\n return !model.isNew();\n },\n defaultValue: (model) => {\n if(model.get('unitId') > 0) {\n return model.get('unitId');\n }\n\n let productionQuantity = this.options.productionQuantities.findWhere({id: model.get('productionQuantityId')});\n\n return productionQuantity?.get('unitId');\n },\n choices: _.bind(function (model) {\n let productionQuantity = model.get('productionQuantityId') > 0 ? this.options.productionQuantities.findWhere({id: model.get('productionQuantityId')}) : null,\n selectedCostCode = this.costCodes.get(productionQuantity ? productionQuantity.get('costCodeId') : model.get('costCodeId'));\n\n if (selectedCostCode == null) {\n return [];\n }\n\n let filteredUOM = _.filter(this.unitsOfMeasure.models, (unit) => {\n let productionQuantity = this.options.productionQuantities.findWhere({\n costCodeId: selectedCostCode.get('id'),\n unitId: unit.get('id')\n });\n\n return productionQuantity != null;\n });\n\n return _.map(filteredUOM, function (unit) {\n return {\n id: unit.id,\n name: unit.get('name')\n };\n });\n }, this)\n },\n onChange: _.bind(function (model, value) {\n let productionQuantity = this.options.productionQuantities.findWhere({\n costCodeId: model.get('costCodeId'),\n unitId: value\n });\n model.set('unitId', value);\n model.set('productionQuantityId', productionQuantity.id);\n\n // this.nextInput('unitType', model);\n }, this)\n });\n\n new PJQ.inputs.DatePickerCollection(this.$el, this.collection.models, {\n pickerSelector: '.input-installed-on',\n valueAttribute: 'installedOn',\n datePickerOptions: {\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE\n },\n },\n onChange: _.bind(function (model, value) {\n model.set('installedOn', value);\n ``\n // this.nextInput('unitType', model);\n }, this)\n });\n },\n importFile: function () {\n this.renderUploader();\n },\n renderUploader: function () {\n let $uploader = this.$('.import-uploader');\n if (this.fileUploader == null) {\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: $uploader,\n useApiV2: true,\n allowedExtensions: ['xls', 'xlsx', 'csv'],\n uploadTemplateCallback: () => {\n PJQ.files.downloadFile(PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: PJQ.app.session.project.id,\n },\n {\n endpoint: 'productionquantities'\n },\n {\n endpoint: 'installed'\n },\n {\n endpoint: 'import'\n },\n {\n endpoint: 'template'\n }\n ]), {isAPIv2: true});\n },\n maxFiles: 1,\n style: 'grid',\n onSuccess: _.bind(function (file) {\n let loader = new PJQ.Loader($uploader);\n let uploadId = file.uploadId;\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: PJQ.app.session.project.id,\n },\n {\n endpoint: 'productionquantities'\n },\n {\n endpoint: 'installed'\n },\n {\n endpoint: 'import',\n value: uploadId\n }\n ]),\n isAPIv2: true\n }).post().done(_.bind(function (result) {\n loader.remove();\n this.fileUploader.remove();\n this.collection.add(result.lineItems);\n this.renderDatatable();\n }, this)).fail((err) => {\n if (err && err.responseJSON) {\n loader.remove();\n let file = this.fileUploader.collection.models[0];\n this.fileUploader.collection.remove(file);\n this.fileUploader.render();\n this.fileUploader.showError(err.responseJSON.message, 10000);\n }\n });\n }, this)\n });\n } else {\n // Hide file uploader if button is clicked again\n $uploader.attr('hidden', !$uploader.attr('hidden'));\n }\n let self = this;\n $uploader.find('.btn-download-template').off('click').on('click', self.downloadImportTemplate);\n },\n getCostCodeOptions: function (model) {\n let subJob = this.subJobs.get(model.get('subJobId')),\n costCodes = [],\n filteredCostCodes = _.filter(this.costCodes.models, (costCode) => {\n let productionQuantity = this.options.productionQuantities.findWhere({costCodeId: costCode.get('id')});\n if (subJob == null) {\n return costCode.get('subJobId') == null && productionQuantity != null;\n }\n return costCode.get('subJobId') === subJob.id && productionQuantity != null;\n });\n\n if (_.size(filteredCostCodes) === 0) {\n return [{\n id: 0,\n name: 'No cost codes found',\n disabled: true\n }];\n }\n\n _.each(filteredCostCodes.sort((c1, c2) => {\n return PJQ.helpers.sortHelpers.sortAlphaNum(c1.get('code'), c2.get('code'));\n }), function (costCode) {\n let choice = {\n id: costCode.id,\n name: costCode.getDisplayName()\n };\n costCodes.push(choice);\n }, this);\n return costCodes\n },\n addQuantity: function () {\n let newModel = new PJQ.models.productionQuantities.InstalledQuantity({\n projectId: this.options.project.id,\n quantity: 0,\n description: '',\n productionQuantityId: this.options.productionQuantityId,\n timeCardId: this.options.timeCardId,\n installedOn: new Date()\n });\n this.collection.add(newModel);\n this.renderDatatable();\n },\n saveQuantities: function () {\n if (!this.validate())\n return;\n\n let modelsToSave = _.filter(this.collection.models, (model) => {\n return model.isNew() || model.hasChanged();\n });\n\n let modelsToSaveJSON = _.map(modelsToSave, (model) => model.toJSON());\n\n if(_.size(modelsToSaveJSON) > 0) {\n this.collection.saveBulk(modelsToSaveJSON, (savedQuantities) => {\n PJQ.notifications.notify.successNotify({\n message: 'Quantities saved successfully'\n });\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(savedQuantities);\n }\n });\n } else{\n if (typeof this.options.onSave === 'function') {\n this.options.onSave([]);\n }\n }\n },\n\n validate: function () {\n let isValid = true;\n\n _.each(this.collection.models, (model) => {\n isValid = isValid && this.validateQuantity(model);\n })\n\n return isValid;\n },\n validateQuantity: function (quantity) {\n if (this.dataTable == null) {\n return true;\n }\n\n let row = this.dataTable.getRow(quantity.cid),\n data = row?.data(),\n result = true,\n updateCell = _.bind(function ($cell, isValid) {\n if (isValid) {\n $cell.removeClass('bg-danger-transparent');\n } else {\n $cell.addClass('bg-danger-transparent');\n }\n result = result && isValid;\n }, this);\n\n if (data == null || data.get('delete')) {\n return true;\n }\n\n if (row != null) {\n let costCodeCol = 0,\n uomCol = 1,\n installedOnCol = 4;\n if (_.size(this.subJobs.models) > 0) {\n costCodeCol++;\n uomCol++;\n installedOnCol++;\n }\n\n if(this.options.productionQuantityId > 0 && quantity.get('productionQuantityId') == null) {\n quantity.set('productionQuantityId', this.options.productionQuantityId);\n }\n\n if(this.options.timeCardId > 0 && quantity.get('timeCardId') == null) {\n quantity.set('timeCardId', this.options.timeCardId);\n }\n\n let productionQuantity = this.options.productionQuantities.findWhere({id: quantity.get('productionQuantityId')});\n if (this.options.productionQuantityId > 0) {\n installedOnCol = installedOnCol - (_.size(this.subJobs.models) > 0 ? 3 : 2);\n } else if(productionQuantity == null) {\n updateCell($(row.nodes()[0]).find('td:eq(' + costCodeCol + ')'), quantity.get('costCodeId') > 0);\n updateCell($(row.nodes()[0]).find('td:eq(' + uomCol + ')'), quantity.get('unitId') > 0);\n }\n\n updateCell($(row.nodes()[0]).find('td:eq(' + installedOnCol + ')'), quantity.get('installedOn') != null);\n }\n return result;\n },\n deleteQuantityClicked: function (e) {\n let row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n this.deleteQuantity(row.data());\n },\n deleteQuantity: function (quantity) {\n let row = this.dataTable.getRow(quantity.cid);\n\n if(quantity.isNew()){\n quantity.destroy();\n } else {\n quantity.set('delete', true);\n }\n this.dataTable.removeRow(row);\n }\n});","PJQ.views.productionQuantities.ProductionQuantitiesDatatable = PJQ.views.dataTables.DataTable.extend({\n defaults: {\n language: {\n emptyTable: 'No Production Quantities have been created yet',\n zeroRecords: \"No Production Quantities matched the search criteria\"\n },\n subTemplates: {\n header: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'data-table-header-production-quantities')\n },\n toggleRowClass: '.production-quantity-toggle-row'\n },\n events: {\n 'click .btn-edit-production-quantity': 'viewProductionQuantityClicked',\n 'click .btn-delete-production-quantity': 'deleteProductionQuantityClicked'\n },\n beforeRender: function () {\n this.options.order = _.size(this.options.subJobs) > 0 ? [[1, 'asc']] : [[0, 'asc']];\n },\n afterSearch: function () {\n if (typeof this.options.afterSearch === 'function') {\n this.options.afterSearch();\n }\n },\n getColumns: function (includeAllColumns = false) {\n let columns = [],\n includeColumns = ['subJob', 'costCode', 'quantity', 'installedQuantity', 'remainingQuantity', 'description'];\n\n if (this.options.subJobs == null || _.size(this.options.subJobs) === 0) {\n includeColumns = _.without(includeColumns, 'subJob');\n }\n\n _.each(includeColumns, _.bind(function (columnName) {\n switch (columnName) {\n case 'subJob':\n columns.push({\n \"columnData\": \"subJob\",\n \"data\": \"attributes.costCodeId\",\n \"title\": \"Sub Job\",\n \"width\": \"15%\",\n \"render\": _.bind(function (data, type, row) {\n let costCode = this.options.costCodes.get(row.get('costCodeId')),\n subJob;\n\n if (costCode.get('subJobId')) {\n subJob = this.options.subJobs.get(costCode.get('subJobId'));\n }\n\n return subJob ? subJob.get('name') : \"\";\n }, this)\n })\n break;\n case 'costCode':\n columns.push({\n \"columnData\": \"costCode\",\n \"data\": \"attributes.costCodeId\",\n \"title\": \"Cost Code\",\n \"width\": \"300px\",\n \"render\": _.bind(function (data, type, row) {\n let costCode = this.options.costCodes.get(data);\n return costCode ? `${costCode.get('code')} - ${costCode.get('name')}` : \"\";\n }, this)\n });\n break;\n case 'quantity':\n columns.push({\n \"columnData\": \"quantity\",\n \"data\": \"attributes.quantity\",\n \"title\": \"Budgeted\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n let unit = this.options.unitsOfMeasure.get(row.get('unitId')),\n uom = unit != null ? unit.get('code') : \"\",\n res = (data ?? 0).toLocaleString('en-US', {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2\n });\n return res + \" \" + (uom ?? \"\");\n }, this)\n });\n break;\n case 'installedQuantity':\n columns.push({\n \"columnData\": \"installedQuantity\",\n \"data\": \"\",\n \"title\": \"Installed\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n let unit = this.options.unitsOfMeasure.get(row.get('unitId')),\n uom = unit != null ? unit.get('code') : \"\",\n total = 0;\n\n _.each(row.installedQuantities.models, (installedQuantity) => {\n total += installedQuantity.get('quantity');\n })\n\n let res = total.toLocaleString('en-US', {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2\n });\n return res + \" \" + (uom ?? \"\");\n }, this)\n });\n break;\n case 'remainingQuantity':\n columns.push({\n \"columnData\": \"remainingQuantity\",\n \"data\": \"\",\n \"title\": \"Remaining\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n let installed = 0;\n _.each(row.installedQuantities.models, (installedQuantity) => {\n installed += installedQuantity.get('quantity');\n });\n\n let total = ((row.get('quantity') ?? 0) - installed)\n\n if (total < 0) {\n total = 0;\n }\n\n let unit = this.options.unitsOfMeasure.get(row.get('unitId')),\n uom = unit != null ? unit.get('code') : \"\",\n res = total.toLocaleString('en-US', {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2\n });\n return res + \" \" + (uom ?? \"\");\n }, this)\n });\n break;\n case 'description':\n columns.push({\n \"columnData\": \"description\",\n \"data\": \"attributes.description\",\n \"title\": \"Description\",\n \"render\": _.bind(function (data, type, row) {\n return data;\n }, this)\n });\n break;\n }\n }, this));\n\n if (!includeAllColumns) {\n columns.push({\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n let canDelete = this.options.isAdmin,\n res = '
';\n\n if (canDelete) {\n res += '';\n }\n\n return `${res}
`;\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"8%\",\n \"className\": \"text-center\",\n \"visible\": true\n });\n }\n\n return columns;\n },\n viewProductionQuantityClicked: function (e) {\n let row = this.getRow((e.currentTarget).closest('tr'));\n this.viewProductionQuantity(row.data());\n },\n viewProductionQuantity: function (productionQuantity) {\n if (productionQuantity == null) {\n return;\n }\n\n if (typeof this.options.onViewProductionQuantity === 'function') {\n this.options.onViewProductionQuantity(productionQuantity);\n }\n },\n deleteProductionQuantityClicked: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr'));\n this.deleteProductionQuantity(row.data());\n },\n deleteProductionQuantity: function (productionQuantity) {\n if (productionQuantity == null) {\n return;\n }\n\n if (typeof this.options.onDeleteProductionQuantity === 'function') {\n this.options.onDeleteProductionQuantity(productionQuantity);\n }\n }\n});\n\nPJQ.views.productionQuantities.AddProductionQuantitiesDatatable = PJQ.views.dataTables.DataTable.extend({\n defaults: {\n language: {\n emptyTable: 'Click \"Add Budgeted Quantity\" to create a new Budgeted Quantity'\n }\n },\n events: {\n 'click .btn-delete-production-quantity': 'deleteProductionQuantityClicked'\n },\n beforeRender: function () {\n this.options.isHideSearch = true;\n },\n deleteProductionQuantityClicked: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr'));\n this.deleteProductionQuantity(row);\n },\n deleteProductionQuantity: function (row) {\n if (row == null) {\n return;\n }\n\n if (typeof this.options.onDeleteProductionQuantity === 'function') {\n this.options.onDeleteProductionQuantity(row);\n }\n }\n});\n\nPJQ.views.productionQuantities.InstalledQuantitiesDatatable = PJQ.views.dataTables.DataTable.extend({\n defaults: {\n language: {\n emptyTable: 'No Installed Quantities have been added yet',\n zeroRecords: \"No Installed Quantities matched the search criteria\"\n },\n subTemplates: {\n header: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'data-table-header-installed-quantities')\n },\n },\n events: {\n 'click .btn-view-quantity': 'viewQuantityClicked',\n 'click .btn-delete-quantity': 'deleteQuantityClicked',\n 'click .btn-view-time-card': 'viewTimeCardClicked'\n },\n beforeRender: function () {\n this.options.project = this.options.project ?? PJQ.app.session.project;\n\n this.canViewTimeCard = this.options.project.permissions.hasPermission('timeCards.canView');\n this.timeCardSettings = new PJQ.models.timecards.TimeCardSettings(null, {\n project: PJQ.app.session.project\n });\n },\n afterSearch: function () {\n if (typeof this.options.afterSearch === 'function') {\n this.options.afterSearch();\n }\n },\n getColumns: function () {\n let columns = [],\n includeColumns = ['description', 'quantity', 'installedOn', 'source'];\n\n _.each(includeColumns, _.bind(function (columnName) {\n switch (columnName) {\n case 'description':\n columns.push({\n \"columnData\": \"description\",\n \"data\": \"attributes.description\",\n \"title\": \"Description\",\n \"render\": _.bind(function (data, type, row) {\n return data;\n }, this)\n });\n break;\n case 'quantity':\n columns.push({\n \"columnData\": \"quantity\",\n \"data\": \"attributes.quantity\",\n \"title\": \"Installed Quantity\",\n \"width\": \"80px\",\n \"render\": _.bind(function (data, type, row) {\n let total = 0;\n total += data;\n\n return total.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});\n }, this)\n });\n break;\n case 'installedOn':\n columns.push({\n \"columnData\": \"installedOn\",\n \"data\": \"attributes.installedOn\",\n \"title\": \"Installed On\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return data ? moment(data).format('MM/DD/YYYY') : \"N/A\";\n }, this)\n });\n break;\n case 'source':\n columns.push({\n \"columnData\": \"source\",\n \"data\": \"\",\n \"title\": \"Source\",\n \"width\": \"80px\",\n \"render\": _.bind(function (data, type, row) {\n let timeCardId = row.get('timeCardId'),\n html;\n\n if (timeCardId > 0 && this.canViewTimeCard) {\n html = ''\n } else {\n html = 'Manual Entry';\n }\n\n return '
' + html + '
';\n }, this)\n });\n }\n }, this));\n\n return columns;\n },\n viewTimeCardClicked: function (e) {\n let row = this.getRow((e.currentTarget).closest('tr'));\n this.viewTimeCard(row.data());\n },\n viewTimeCard: function (quantity) {\n let timeCardId = quantity.get('timeCardId');\n\n if (!timeCardId || !this.canViewTimeCard) {\n return;\n }\n\n let fnRenderTimeCard = () => {\n let model = new PJQ.models.timecards.TimeCard({\n timeCardId: timeCardId\n });\n\n model.fetch({\n success: () => {\n new PJQ.views.timecards.TimeCardDetailsModal({\n project: this.options.project,\n model: model,\n settings: this.timeCardSettings\n });\n }\n });\n }\n\n if (!this.timeCardSettings.isFetched) {\n this.timeCardSettings.fetch({\n success: () => {\n fnRenderTimeCard();\n }\n });\n } else {\n fnRenderTimeCard();\n }\n },\n viewQuantityClicked: function (e) {\n let row = this.getRow((e.currentTarget).closest('tr'));\n this.viewQuantity(row.data());\n },\n viewQuantity: function (quantity) {\n if (quantity == null) {\n return;\n }\n\n if (typeof this.options.onViewQuantity === 'function') {\n this.options.onViewQuantity(quantity);\n }\n },\n deleteQuantityClicked: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr'));\n this.deleteQuantity(row.data());\n },\n deleteQuantity: function (quantity) {\n if (quantity == null) {\n return;\n }\n\n if (typeof this.options.onDeleteQuantity === 'function') {\n this.options.onDeleteQuantity(quantity);\n }\n }\n});\n\nPJQ.views.productionQuantities.AddInstalledQuantitiesDatatable = PJQ.views.dataTables.DataTable.extend({\n defaults: {\n language: {\n emptyTable: 'Click \"Add Quantity\" to create a new Installed Quantity'\n }\n },\n beforeRender: function () {\n this.options.isHideSearch = true;\n },\n deleteQuantityClicked: function (e) {\n let row = this.getRow($(e.currentTarget).closest('tr'));\n this.deleteQuantity(row);\n },\n deleteQuantity: function (row) {\n if (row == null) {\n return;\n }\n\n if (typeof this.options.onDeleteQuantity === 'function') {\n this.options.onDeleteQuantity(row);\n }\n }\n});","PJQ.views.productionQuantities.ProductionQuantityEditModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-production-quantity-edit'),\n width: '95%',\n maxWidth: 600,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-close': 'close',\n 'click .btn-save': 'saveProductionQuantity',\n 'click .btn-delete': 'deleteProductionQuantity',\n 'click .btn-add-installed-quantities': 'addInstalledQuantities'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.model == null) {\n this.model = new PJQ.models.productionQuantities.ProductionQuantity({\n projectId: PJQ.app.session.project.id,\n quantity: 0,\n description: ''\n });\n }\n\n if (!this.model.isNew()) {\n await this.model.fetch();\n }\n\n this.costCodes = await this.options.project.fetchCostCodes();\n this.unitsOfMeasure = await this.options.project.fetchUnitsOfMeasure();\n this.subJobs = await this.options.project.fetchSubJobs();\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.options.canAdd = this.options.project.permissions.hasPermission('productionQuantities.canAdd');\n this.options.canEdit = this.options.project.permissions.hasPermission('productionQuantities.canEdit');\n this.options.isAdmin = this.options.project.permissions.hasPermission('productionQuantities.isAdmin');\n this.options.canDelete = this.options.isAdmin;\n\n if (!this.isFetched || this.model.isNew()) {\n return;\n }\n },\n renderData: function () {\n return {\n model: this.model,\n canAdd: this.options.canAdd,\n canEdit: this.options.canEdit,\n canDelete: this.options.canDelete,\n isAdmin: this.options.isAdmin,\n isFetched: this.isFetched\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n new PJQ.Binder(this.$el, this.model, {\n watchElements: [\n 'input'\n ]\n });\n\n this.costCodePicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-cost-code'),\n defaultValue: this.model.get('costCodeId'),\n noneSelectedText: 'Select Cost Code',\n isDisabled: _.size(this.costCodes.models) === 0 || !this.model.isNew() || !this.options.canEdit,\n isMultiple: false,\n isIntChoices: true,\n isLiveSearch: true,\n onChange: _.bind(function (value) {\n value = value > 0 ? value : null;\n this.model.set('costCodeId', value);\n }, this)\n });\n this.populateCostCodePicker();\n\n PJQ.helpers.inputHelpers.inputMaskDecimal(this.$('.input-quantity'), 2);\n\n this.unitOfMeasureSelector = new PJQ.inputs.Selectpicker({\n el: this.$('.select-unit-of-measure'),\n defaultValue: this.model.get('unitId'),\n isDisabled: !this.model.isNew() || !this.options.canEdit,\n choices: _.map(this.unitsOfMeasure.models, function (unit) {\n return {\n name: unit.get('name'),\n id: unit.id\n };\n }),\n onChange: _.bind(function (value) {\n this.model.set('unitId', value);\n }, this),\n isIntChoices: true,\n hideDisabled: true\n });\n\n this.dataTable = new PJQ.views.productionQuantities.InstalledQuantitiesDatatable({\n el: this.$('.installed-quantities-data'),\n rowId: \"cid\",\n project: this.options.project,\n data: this.model.installedQuantities.models,\n isAdmin: false,\n order: [2, 'desc'],\n canAdd: false,\n headerData: _.bind(function () {\n return {\n project: this.options.project,\n isAdmin: this.options.isAdmin,\n canAdd: this.options.canAdd,\n model: this.model\n };\n }, this)\n });\n },\n addInstalledQuantities: function () {\n new PJQ.views.productionQuantities.InstalledQuantitiesAddModal({\n project: this.options.project,\n productionQuantityId: this.model.id,\n onSave: (newQuantities) => {\n this.model.installedQuantities?.add(newQuantities);\n this.dataTable.render();\n }\n });\n },\n populateCostCodePicker: function () {\n // Group the cost codes by their Sub Job\n let groupedCostCodes = _.groupBy(this.costCodes.models, function (costCode) {\n return costCode.get('subJobId');\n });\n\n // Convert groupedCostCodes to the format that updateChoices expects\n let choices = _.map(groupedCostCodes, function (costCodes, subJobId) {\n let subJob = _.find(this.subJobs.models, function (subJob) {\n return subJob.id === parseInt(subJobId);\n }, this);\n return {\n name: subJob != null ? subJob.get('name') : 'No Sub Job',\n choices: _.map(costCodes, function (costCode) {\n return {\n id: costCode.id,\n name: costCode.get('name')\n };\n })\n };\n }, this);\n\n if (this.costCodePicker != null) {\n this.costCodePicker.updateChoices(choices);\n this.costCodePicker.setValue(this.model.get('costCodeIds') ? this.model.get('costCodeIds') : []);\n if (_.size(this.costCodes.models) > 0 && this.options.canEdit && this.model.isNew()) {\n this.costCodePicker.enable();\n } else {\n this.costCodePicker.disable();\n }\n this.costCodePicker.render();\n }\n },\n saveProductionQuantity: function () {\n let isNew = this.model.isNew();\n this.save(() => {\n PJQ.notifications.notify.successNotify({\n message: 'Production Quantity saved successfully'\n });\n\n if (!isNew) {\n this.removeModal();\n }\n });\n },\n validate: function () {\n let isValid = true;\n\n if (this.model.get('costCodeId') == null) {\n this.costCodePicker.showError(\"Cost Code is required\");\n isValid = false;\n }\n\n if (this.model.get('unitId') == null) {\n this.unitOfMeasureSelector.showError(\"Unit of Measure is required\");\n isValid = false;\n }\n\n return isValid;\n },\n save: function (callback) {\n if (!this.validate())\n return;\n\n this.model.save(null, {\n success: _.bind(function () {\n this.render();\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n\n PJQ.app.session.project.trigger('productionQuantityChanged', this.model);\n if (typeof callback === 'function') {\n callback(true);\n }\n }, this)\n });\n },\n deleteProductionQuantity: function () {\n let productionQuantityId = this.model.id\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Delete\",\n body: \"Are you sure you want to delete this Production Quantity?\",\n onDelete: _.bind(function () {\n this.model.destroy({\n success: _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Production Quantity deleted successfully'\n });\n\n if (typeof this.options.onDelete === 'function')\n this.options.onDelete(productionQuantityId);\n\n this.removeModal();\n }, this)\n });\n }, this)\n });\n },\n close: function () {\n if (this.model.hasChanged() && this.options.canEdit) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.saveProductionQuantity();\n this.removeModal();\n }, this),\n onDontSave: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});","PJQ.views.productionQuantities.ProductionQuantitiesList = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'production-quantities-list'),\n productionQuantityId: null\n },\n events: {\n 'click .btn-add-production-quantity': 'addProductionQuantity',\n 'click .add-budgeted-quantities': 'addBudgetedQuantities',\n 'click .add-installed-quantities': 'addInstalledQuantities',\n 'click .btn-delete-production-quantity': 'deleteProductionQuantityClicked',\n 'click .btn-export': 'export'\n },\n beforeFirstRender: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.productionQuantities.ProductionQuantities(null, {\n projectId: this.options.project.get('projectId')\n });\n }\n\n if (!this.collection.isFetched) {\n await this.collection.fetch();\n }\n\n this.costCodes = await this.options.project.fetchCostCodes();\n this.unitsOfMeasure = await this.options.project.fetchUnitsOfMeasure();\n this.subJobs = await this.options.project.fetchSubJobs();\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.options.canAdd = this.options.project.permissions.hasPermission('productionQuantities.canAdd');\n this.options.canEdit = this.options.project.permissions.hasPermission('productionQuantities.canEdit');\n this.options.isAdmin = this.options.project.permissions.hasPermission('productionQuantities.isAdmin');\n },\n renderData: function () {\n return {\n collection: this.collection,\n isFetched: this.isFetched,\n canAdd: this.options.canAdd,\n canEdit: this.options.canEdit,\n isAdmin: this.options.isAdmin,\n hideHeader: this.options.hideHeader\n }\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.renderView();\n\n PJQ.app.session.project.off('productionQuantityChanged');\n PJQ.app.session.project.on('productionQuantityChanged', function (productionQuantity) {\n this.collection.add(productionQuantity);\n this.render();\n }, this);\n\n if (this.options.productionQuantityId > 0) {\n let initProductionQuantity = this.collection.get(this.options.productionQuantityId);\n if (initProductionQuantity != null) {\n this.viewProductionQuantity(initProductionQuantity);\n this.options.productionQuantityId = null;\n }\n }\n },\n renderView: function () {\n if (this.dataTable) {\n this.dataTable.remove();\n this.dataTable = null;\n }\n\n this.dataTable = new PJQ.views.productionQuantities.ProductionQuantitiesDatatable({\n el: this.$('.production-quantities-data'),\n rowId: \"cid\",\n data: this.collection.models,\n paging: false,\n isAdmin: this.options.isAdmin,\n orderCookie: PJQ.constants.cookies.PRODUCTION_QUANTITIES_ORDER_COOKIE,\n columnWidthCookie: PJQ.constants.cookies.PRODUCTION_QUANTITIES_COLUMNS_WIDTH,\n costCodes: this.costCodes,\n unitsOfMeasure: this.unitsOfMeasure,\n subJobs: this.subJobs,\n headerData: _.bind(function () {\n return {\n project: this.options.project,\n isAdmin: this.options.isAdmin,\n canAdd: this.options.canAdd,\n canEdit: this.options.canEdit\n };\n }, this),\n onDeleteProductionQuantity: (productionQuantity) => {\n this.deleteProductionQuantity(productionQuantity);\n },\n order: [[1, 'asc']],\n onViewProductionQuantity: (productionQuantity) => {\n this.viewProductionQuantity(productionQuantity);\n },\n onRowDoubleClick: (row) => {\n this.viewProductionQuantity(row.data());\n },\n contextMenuOptions: {\n actions: [\n {\n name: 'View',\n onClick: _.bind(function (row) {\n this.viewProductionQuantity(row.data());\n }, this)\n },\n {\n name: 'Delete',\n onClick: (row) => {\n this.deleteProductionQuantity(row.data());\n },\n isDanger: true,\n isShown: (row) => {\n return this.options.isAdmin;\n }\n }\n ]\n }\n });\n },\n export: function (e) {\n let $target = $(e.currentTarget),\n type = $target.data('type');\n\n if (this.options.project == null) {\n return;\n }\n\n let orderCookie = PJQ.helpers.cookieHelpers.getCookie(PJQ.constants.cookies.PRODUCTION_QUANTITIES_ORDER_COOKIE),\n order = orderCookie != null ? JSON.parse(orderCookie) : null,\n report = new PJQ.models.reports.NewReport({\n type: PJQ.constants.reports.reportTypes.PRODUCTION_QUANTITIES.type,\n projectId: this.options.project ? this.options.project.id : null,\n options: {\n columns: [\"subJob\", \"costCode\", \"quantity\", \"installedQuantity\", \"unit\", \"description\"],\n columnOrder: order,\n }\n });\n\n report.export({format: type?.toLowerCase() ?? \"pdf\" });\n },\n viewProductionQuantityClicked: function (e) {\n let row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n this.viewProductionQuantity(row.data());\n },\n viewProductionQuantity: function (productionQuantity) {\n let isNew = productionQuantity == null;\n\n new PJQ.views.productionQuantities.ProductionQuantityEditModal({\n model: productionQuantity,\n onSave: _.bind(function (productionQuantity) {\n if (isNew) {\n this.collection.add(productionQuantity);\n }\n this.renderView();\n }, this),\n onDelete: _.bind(function (productionQuantity) {\n this.collection.remove(productionQuantity);\n this.renderView();\n }, this)\n });\n },\n addBudgetedQuantities: function () {\n new PJQ.views.productionQuantities.ProductionQuantitiesAddModal({\n project: this.options.project,\n onSave: (productionQuantities) => {\n this.collection.add(productionQuantities);\n this.renderView();\n }\n });\n },\n addInstalledQuantities: function () {\n new PJQ.views.productionQuantities.InstalledQuantitiesAddModal({\n project: this.options.project,\n onSave: (newQuantities) => {\n _.each(newQuantities, (quantity) => {\n let productionQuantity = this.collection.get(quantity.productionQuantityId);\n\n if(productionQuantity != null){\n productionQuantity.installedQuantities.add(quantity);\n }\n });\n\n this.renderView();\n }\n });\n },\n deleteProductionQuantityClicked: function (e) {\n let row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n this.deleteProductionQuantity(row.data());\n },\n deleteProductionQuantity: function (productionQuantity) {\n let row = this.dataTable.getRow(productionQuantity.cid);\n\n if (row != null) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete Production Quantity\",\n body: \"Are you sure you want to delete this Production Quantity?\",\n onDelete: _.bind(function () {\n productionQuantity.destroy({\n success: _.bind(function () {\n this.dataTable.removeRow(row);\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(productionQuantity);\n }\n }, this)\n });\n }, this)\n });\n }\n }\n});","//Models\nPJQ.models.productionQuantities.ProductionQuantity = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n let arr = [];\n if (this.isNew()) {\n arr.push({\n endpoint: 'projects',\n value: this.get('projectId')\n });\n }\n arr.push({\n endpoint: 'productionquantities',\n value: this.id\n });\n return PJQ.helpers.urlHelpers.generateEndpoint(arr);\n },\n parse: function (model) {\n if (!model)\n return model;\n\n\n this.installedQuantities = new PJQ.collections.productionQuantities.InstalledQuantities(model.installedQuantities);\n\n return model;\n },\n beforeSave: function () {\n this.set({\n installedQuantities: this.installedQuantities.toJSON()\n });\n }\n});\n\nPJQ.models.productionQuantities.InstalledQuantity = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id'\n});\n\n//Collections\nPJQ.collections.productionQuantities.ProductionQuantities = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.productionQuantities.ProductionQuantity,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.projectId\n },\n {\n endpoint: 'productionquantities'\n }\n ]);\n },\n saveBulk: function(productionQuantities, callback) {\n let endpoint = `${this.endpoint()}/bulk`;\n\n new PJQ.ajax.Request({\n endpoint: endpoint,\n isAPIv2: true,\n data: productionQuantities\n }).post().done(_.bind(function (data) {\n if (typeof callback === 'function') {\n callback(data);\n }\n }, this)).fail(function () {\n if (typeof callback === 'function') {\n callback(null);\n }\n });\n }\n});\n\nPJQ.collections.productionQuantities.InstalledQuantities = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.productionQuantities.InstalledQuantity,\n endpoint: function () {\n let params = [];\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'productionquantities',\n value: this.options.productionQuantityId\n },\n {\n endpoint: 'installed'\n }\n ], params);\n },\n saveBulk: function(installedQuantities, callback) {\n let endpoint = `${this.endpoint()}/bulk`;\n\n new PJQ.ajax.Request({\n endpoint: endpoint,\n isAPIv2: true,\n data: installedQuantities\n }).post().done(_.bind(function (data) {\n if (typeof callback === 'function') {\n callback(data);\n }\n }, this)).fail(function () {\n if (typeof callback === 'function') {\n callback(null);\n }\n });\n }\n});","PJQ.views.budget.ProjectBudgetDataTable = PJQ.views.dataTables.DataTable.extend({\n childRowToggle: function (sender, rowOverride) {\n let $target = rowOverride ? $(rowOverride.selector.rows).find(this.options.toggleRowClass) : $(sender.currentTarget),\n id = $target.data('id'),\n tr = $target.closest('tr'),\n row = this.getRow(tr);\n if (row.child.isShown() && rowOverride == null) {\n // This row is already open - close it\n this.options.childDataTables = _.filter(this.options.childDataTables, _.bind(function (childDt) {\n return childDt.options.parentId !== id;\n }, this));\n row.child.hide();\n tr.removeClass('shown');\n $target.removeClass('fa-minus-circle').addClass('fa-plus-circle');\n } else {\n $target.removeClass('fa-plus-circle').addClass('fa-minus-circle');\n\n this.renderChildRow(row, id);\n }\n },\n toggleChildRow: function (row) {\n let tr = $(row.node()),\n id = row.data()[this.options.rowId],\n $icon = tr.find(this.options.toggleRowClass);\n if (row.child.isShown()) {\n // This row is already open - close it\n this.options.childDataTables = _.filter(this.options.childDataTables, _.bind(function (childDt) {\n return childDt.options.parentId !== id;\n }, this));\n row.child.hide();\n tr.removeClass('shown');\n $icon.removeClass('fa-minus-circle').addClass('fa-plus-circle');\n } else {\n $icon.removeClass('fa-plus-circle').addClass('fa-minus-circle');\n\n this.renderChildRow(row, id);\n }\n },\n renderChildRow: function (row, parentId) {\n //row.child.hide();\n let childClass = 'subgrid-' + parentId.toString(),\n $childTable = $('
', {\n class: childClass + ' p-2'\n });\n row.child($childTable).show();\n\n let childData = this.getRowChildData(row);\n if (childData != null) {\n let fnRender = _.bind(function () {\n let childTable = this.getRowChildTable({\n el: $childTable,\n data: PJQ.helpers.objectHelpers.isBackboneCollection(childData) ? childData.models : childData,\n isHideSearch: true,\n parentId: parentId,\n parentData: row.data()\n });\n this.options.childDataTables = _.filter(this.options.childDataTables, _.bind(function (childDt) {\n return childDt.options.parentId !== parentId;\n }, this));\n this.options.childDataTables.push(childTable);\n }, this);\n\n if (PJQ.helpers.objectHelpers.isBackboneModel(childData)) {\n childData.fetch({\n success: _.bind(function () {\n // loader.remove();\n fnRender();\n }, this)\n });\n } else {\n fnRender();\n }\n }\n },\n getRowChildTable: function (opts) {\n if (typeof this.options.getRowChildTable === 'function') {\n return this.options.getRowChildTable(opts);\n }\n return null;\n },\n getRowChildData: function (row) {\n if (typeof this.options.getRowChildData === 'function') {\n return this.options.getRowChildData(row);\n }\n return {};\n },\n});\n\nPJQ.views.budget.ProjectBudget = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'project-budget'),\n canEdit: true,\n isAdmin: true,\n groupByCookie: 'budget_group_by',\n groupBy: ['division', 'costcode']\n },\n events: {\n // 'click .expand-item': 'expandTableClicked',\n 'click .btn-push-erp': 'pushERP',\n 'click .btn-undo-push-erp': 'undoPushERP',\n 'click .btn-pull-erp': 'pullERP',\n 'click .btn-link-erp': 'linkERP',\n 'click .btn-add-line-items': 'addLineItems',\n 'click .btn-edit-budget': 'editLineItemBudgetClicked',\n 'click .btn-edit-forecast': 'editLineItemForecastClicked',\n 'click .btn-view-modifications': 'viewLineItemModificationsClicked',\n 'click .btn-view-prime-contracts': 'viewLineItemPrimeContractsClicked',\n 'click .btn-view-commitments': 'viewLineItemCommitmentsClicked',\n 'click .btn-view-cco': 'viewLineItemCommitmentChangeOrdersClicked',\n 'click .btn-view-pcco': 'viewLineItemPrimeContractChangeOrdersClicked',\n 'click .btn-view-receivable-invoices': 'viewLineItemReceivableInvoicesClicked',\n 'click .btn-view-payable-invoices': 'viewLineItemPayableInvoicesClicked',\n 'click .btn-view-direct-costs': 'viewLineItemDirectCostsClicked',\n 'click .btn-add-modification': 'addBudgetModifications',\n 'click .btn-lock-budget': 'lockBudget',\n 'click .btn-unlock-budget': 'unlockBudget',\n 'keyup .budget-search': 'searchBudget',\n 'click .btn-export': 'exportBudget',\n 'click .expand-all-items': 'expandAllClicked'\n },\n beforeFirstRender: async function () {\n this.isFetched = false;\n\n this.options.project = this.options.project != null ? this.options.project : PJQ.app.session.project;\n\n this.options.canEdit = PJQ.app.session.project.hasPermission('budget.canEdit');\n this.options.isAdmin = PJQ.app.session.project.hasPermission('budget.isAdmin');\n\n let gbCookie = PJQ.helpers.cookieHelpers.getCookie(this.options.groupByCookie);\n if (gbCookie != null) {\n this.options.groupBy = _.size(gbCookie) > 0 ? gbCookie.split(',') : [];\n }\n\n this.expandedItems = [-1];\n\n this.subJobs = await this.options.project.fetchSubJobs();\n\n this.costCodes = await this.options.project.fetchCostCodes();\n this.options.hasDivisions = this.costCodes.hasDivisions();\n\n this.costTypes = await this.options.project.fetchCostTypes();\n\n this.budget = await this.options.project.fetchBudget(null, {\n force: true\n });\n this.currentBudget = this.budget;\n\n this.snapshots = await this.options.project.fetchBudgetSnapshots();\n\n this.budgetViews = await this.options.project.fetchBudgetViews();\n this.setActiveView();\n\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n\n await this.options.project.fetchERPObject();\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n this.childDataTables = [];\n },\n renderData: function () {\n return {\n model: this.model,\n canUnlock: this.canUnlock,\n isFetched: this.isFetched\n }\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.renderERP();\n\n this.options.groupBy = _.without(this.options.groupBy, 'subjob');\n if (_.size(this.subJobs.models) > 0) {\n this.options.groupBy = _.union(['subjob'], this.options.groupBy);\n }\n\n if (!this.options.hasDivisions && this.options.groupBy.indexOf('division') !== -1) {\n this.options.groupBy = _.without(this.options.groupBy, 'division');\n }\n\n this.fetchBudgetForActiveView(_.bind(function () {\n let data = this.getDataForLevel(0);\n this.renderDatatable(this.$(\".budget-table\"), data);\n }, this));\n },\n renderERP: function () {\n if (!this.options.project.isERPSynced() || this.budget.get('snapshotOfId') != null) {\n return;\n }\n\n let hasUnsynced = false;\n _.each(this.budget.lineItems.models, function (lineItem) {\n let status = lineItem.erpSyncStatus();\n if (status !== PJQ.constants.integrations.erp.syncStatuses.APPROVED && status !== PJQ.constants.integrations.erp.syncStatuses.SYNCED) {\n hasUnsynced = true;\n }\n });\n\n let $erp = this.$('.erp-sync'),\n budgetStatus = this.budget.erpSyncStatus(),\n reviewing = PJQ.constants.integrations.erp.syncStatuses.REVIEWING,\n synced = PJQ.constants.integrations.erp.syncStatuses.SYNCED,\n approved = PJQ.constants.integrations.erp.syncStatuses.APPROVED,\n status;\n if (budgetStatus === reviewing) {\n status = reviewing;\n } else if (hasUnsynced && budgetStatus === synced) {\n status = PJQ.constants.integrations.erp.syncStatuses.STALE;\n } else {\n status = budgetStatus;\n }\n\n if (budgetStatus == null) {\n budgetStatus = PJQ.constants.integrations.erp.syncStatuses.PENDING;\n }\n\n this.erpButtons = PJQ.helpers.erp.renderERPButtons($erp, {\n pushSupported: this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_BUDGET),\n canPush: hasUnsynced && budgetStatus !== reviewing,\n disablePushReason: !hasUnsynced ? 'All budget updates have been pushed to ERP' : '',\n pullSupported: this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_BUDGET),\n canPull: budgetStatus !== approved,\n status: status\n });\n\n let badge = PJQ.helpers.erp.getERPBadge(status, this.budget.get('externalObject'));\n if (_.size(badge) > 0) {\n this.$('.erp-badge').html('' + badge + '');\n }\n },\n setActiveView: function (viewId) {\n this.view = _.find(this.budgetViews.models, function (budgetView) {\n if (viewId == null) {\n return budgetView.get('isDefault');\n }\n return budgetView.id === viewId;\n });\n\n if (this.view == null) {\n // we didn't find a default view or a view matching the argument viewId\n // here we use the standard budget view\n this.view = _.find(this.budgetViews.models, function (budgetView) {\n return budgetView.get('companyId') === -1;\n });\n }\n this.budgetView = null;\n },\n fetchBudgetForActiveView: function (callback) {\n if (this.budgetView == null) {\n this.budget.fetchForView(this.view.id, _.bind(function (res) {\n this.budgetView = res;\n callback(this.budgetView);\n }, this));\n } else {\n if (typeof callback === 'function') {\n callback(this.budgetView);\n }\n }\n },\n getDataForLevel: function (level, parentData = null) {\n let groupByLevel = _.size(this.options.groupBy) >= level + 1 ? this.options.groupBy[level] : null;\n if (groupByLevel == null) {\n let groupByCostCode = this.options.groupBy.indexOf('costcode') !== -1;\n return _.map(_.filter(this.budgetView.lineItems, function (lineItem) {\n return parentData == null || parentData.lineItemIds.indexOf(lineItem.id) !== -1;\n }), function (lineItem) {\n let costCode = this.costCodes.get(lineItem.costCodeId),\n costType = this.costTypes.get(lineItem.costTypeId),\n budgetCode;\n if (groupByCostCode) {\n budgetCode = costType.get('name');\n } else {\n budgetCode = '
' + costCode.getDisplayName() + '
' + costType.get('name') + '
'\n }\n return _.defaults({\n costCode: costCode,\n costType: costType,\n budgetCode: budgetCode\n }, lineItem);\n }, this);\n } else {\n let parents = {};\n _.each(this.budgetView.lineItems, function (lineItem) {\n if (parentData != null && parentData.lineItemIds.indexOf(lineItem.id) === -1) {\n return;\n }\n\n let parent;\n if (groupByLevel === 'subjob') {\n let subJob = this.subJobs.get(lineItem.subJobId),\n subJobId = subJob ? subJob.id : -1;\n if (parents[subJobId] != null) {\n parents[subJobId].lineItemIds.push(lineItem.id);\n } else {\n parents[subJobId] = ({\n id: PJQ.helpers.guid(),\n budgetCode: subJob ? subJob.get('name') : this.options.project.get('projectName'),\n lineItemIds: [lineItem.id],\n columnData: []\n });\n }\n\n parent = parents[subJobId];\n } else if (groupByLevel === 'division') {\n let costCode = this.costCodes.get(lineItem.costCodeId);\n if (parents[costCode.get('division')] != null) {\n parents[costCode.get('division')].lineItemIds.push(lineItem.id);\n } else {\n parents[costCode.get('division')] = ({\n id: PJQ.helpers.guid(),\n budgetCode: costCode.get('division'),\n lineItemIds: [lineItem.id],\n columnData: []\n });\n }\n\n parent = parents[costCode.get('division')];\n } else if (groupByLevel === 'costcode') {\n let costCode = this.costCodes.get(lineItem.costCodeId);\n if (parents[costCode.id] != null) {\n parents[costCode.id].lineItemIds.push(lineItem.id);\n } else {\n parents[costCode.id] = ({\n id: PJQ.helpers.guid(),\n budgetCode: costCode.getDisplayName(),\n costCode: costCode,\n costCodeId: lineItem.costCodeId,\n lineItemIds: [lineItem.id],\n columnData: []\n });\n }\n\n parent = parents[costCode.id];\n }\n\n if (parent != null) {\n _.each(this.budgetView.columns, function (column, index) {\n let val;\n if (column.format === 'money' || column.format === 'decimal' || column.format === 'integer' || column.format === 'percent' || column.format === 'time') {\n if (_.size(parent.columnData) >= index + 1) {\n val = parent.columnData[index];\n } else {\n val = 0;\n }\n\n let liVal = lineItem.columnData[index] ?? 0;\n if (column.format === 'money') {\n val += parseInt(PJQ.helpers.formatHelpers.numbersOnly(liVal, false, true));\n } else if (column.source === 'TimeCardValues') {\n if (!Array.isArray(val)) {\n val = [];\n }\n\n val.push(liVal);\n } else {\n val += liVal;\n }\n } else {\n val = '';\n }\n parent.columnData[index] = val;\n });\n }\n }, this);\n\n _.each(parents, function (parent) {\n _.each(this.budgetView.columns, function (column, index) {\n if (column.format === 'money') {\n parent.columnData[index] = PJQ.helpers.formatHelpers.formatCurrency(parent.columnData[index]);\n } else if (column.format === 'integer' || column.format === 'decimal' || column.format === 'percent' || column.format === 'time') {\n parent.columnData[index] = parent.columnData[index];\n }\n });\n }, this);\n\n let data = [];\n _.each(parents, function (lineItem) {\n data.push(lineItem);\n })\n\n return data;\n }\n },\n renderDatatable: function ($element, data, level = 0, parentTable = null) {\n let contextMenuActions = [],\n isLastLevel = level === _.size(this.options.groupBy),\n groupBy = isLastLevel ? null : this.options.groupBy[level];\n if (groupBy === null) {\n contextMenuActions = [\n {\n name: 'Add to Budget',\n isShown: _.bind(function (row) {\n let lineItem = this.budget.lineItems.get(row.data().id);\n return lineItem.get('isUnBudgeted');\n }, this),\n onClick: _.bind(function (row) {\n let lineItem = this.budget.lineItems.get(row.data().id);\n this.addLineItemToBudget(lineItem);\n }, this)\n },\n {\n name: 'Edit Original Budget',\n isShown: _.bind(function (row) {\n return !this.budget.get('isLocked') && this.options.canEdit;\n }, this),\n onClick: _.bind(function (row) {\n this.editLineItemBudget(row.data().id);\n }, this)\n },\n {\n name: 'View Modifications',\n isShown: _.bind(function (row) {\n return this.budget.get('isLocked');\n }, this),\n onClick: _.bind(function (row) {\n let lineItem = this.budget.lineItems.get(row.data().id);\n this.viewLineItemModifications(lineItem);\n }, this)\n },\n {\n name: 'Edit Forecast',\n // isShown: _.bind(function (row) {\n // \treturn this.budget.get('isLocked');\n // }, this),\n onClick: _.bind(function (row) {\n this.editLineItemForecast(row.data().id)\n }, this),\n isShown: _.bind(function (row) {\n return !this.budget.get('isLocked') && this.options.canEdit;\n }, this)\n\n },\n {\n name: 'Delete',\n isShown: _.bind(function (row) {\n return !this.budget.get('isLocked') && this.options.isAdmin;\n }, this),\n onClick: _.bind(function (row) {\n let lineItem = this.budget.lineItems.get(row.data().id);\n this.deleteLineItem(lineItem);\n }, this)\n }\n ];\n }\n\n let dt = new PJQ.views.budget.ProjectBudgetDataTable({\n rowId: \"id\",\n el: $element,\n data: data,\n isHideSearch: level > 0,\n paging: false,\n order: [1, 'asc'],\n extraClasses: !isLastLevel ? 'rows-muted' : '',\n language: {\n zeroRecords: '',\n emptyTable: ''\n },\n rowCallback: function (row, data) {\n if (data.isUnBudgeted) {\n $(row).attr('style', 'background-color: #ffefbe !important');\n }\n },\n drawCallback: _.bind(function (settings) {\n if (parentTable != null) {\n // If you open up a bunch of child rows, an ugly border starts to form between them all growing with every new child row opened.\n // need to collapse the group-start every time to prevent this\n this.$('.group-start').attr('style', 'visibility: collapse;');\n // Remove child tables header\n $element.find('thead').attr('style', 'visibility: collapse;');\n }\n\n if (level === 0) {\n this.snapshotSelect = new PJQ.inputs.Selectpicker({\n el: this.$('.select-snapshot'),\n defaultValue: this.budget === this.currentBudget ? -1 : this.budget.get('id'),\n isIntChoices: true,\n onChange: _.bind(function (value) {\n if (value === -2) {\n this.createSnapshot();\n this.snapshotSelect.setValue(-1)\n } else if (value === -1) {\n this.budget = this.currentBudget;\n this.budgetView = null;\n this.render();\n } else {\n this.budget = new PJQ.models.budget.Budget({id: value});\n this.budget.fetch({\n success: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n })\n }\n }, this)\n });\n\n this.groupBySelector = new PJQ.inputs.Selectpicker({\n el: this.$('.budget-group-by'),\n hideDisabled: false,\n isMultiple: true,\n noneSelectedText: 'No Grouping',\n defaultValue: this.options.groupBy,\n onChange: _.bind(function (value) {\n this.setGroupBy(value);\n }, this)\n });\n\n this.viewSelector = new PJQ.inputs.Selectpicker({\n el: this.$('.budget-view-select'),\n defaultValue: this.view.id,\n isIntChoices: true,\n onChange: _.bind(function (value) {\n if (value === -1) {\n this.viewSelector.setValue(this.view.id);\n this.manageViews();\n } else {\n this.setActiveView(value);\n this.budgetView = null;\n this.render();\n }\n }, this)\n });\n }\n }, this),\n subTemplates: {\n header: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'data-table-header-budget')\n },\n headerData: _.bind(function () {\n let erpStatus = this.budget.erpSyncStatus(),\n erpReviewing = erpStatus === PJQ.constants.integrations.erp.syncStatuses.APPROVED || erpStatus === PJQ.constants.integrations.erp.syncStatuses.REVIEWING;\n return {\n subJobs: this.subJobs,\n hasDivisions: this.options.hasDivisions,\n isLocked: this.budget.get('isLocked'),\n erpReviewing: erpReviewing,\n views: this.budgetViews,\n snapshots: this.snapshots,\n isAdmin: this.options.isAdmin,\n canEdit: this.options.canEdit,\n isSnapshot: this.budget.get('snapshotOfId') != null,\n erpIntegration: this.erpIntegration,\n project: PJQ.app.session.project\n };\n }, this),\n hasFooter: level === 0,\n afterDataTableRender: _.bind(function () {\n if (_.size(this.expandedItems) > 0) {\n this.expandChildTables(dt, level + 1);\n }\n\n if (level === 0) {\n this.renderTableFooter();\n }\n }, this),\n afterHeaderRender: () => {\n this.renderERP();\n },\n contextMenuOptions: {\n actions: contextMenuActions\n },\n columns: this.getColumns(level)\n });\n\n if (parentTable != null) {\n parentTable.options.childDataTables.push(dt);\n } else {\n this.dataTable = dt;\n }\n\n if (_.size(this.expandedItems) > 0) {\n this.expandChildTables(dt, level + 1);\n }\n\n this.$el.on('click', '.expand-item', _.bind(function (e) {\n let $target = $(e.currentTarget),\n tr = $target.closest('tr'),\n row = dt.getRow(tr);\n if (row.data()) {\n this.renderChildTable(row, dt, level + 1);\n }\n }, this));\n },\n setGroupBy: function (value) {\n this.options.groupBy = value;\n PJQ.helpers.cookieHelpers.setCookie(this.options.groupByCookie, _.size(value) > 0 ? value.join(',') : '');\n\n if (this.dataTable != null) {\n this.render();\n }\n },\n renderTableFooter: function () {\n let $footer = this.$('tfoot').first(),\n $totalTextCol = $footer.find('th').eq(1);\n $totalTextCol.html(\"Grand Total\");\n _.each(this.budgetView.columns, function (column, index) {\n if (column.format == null) {\n return;\n }\n\n let format = column.format.toLowerCase();\n if (format === 'money' || format === 'decimal' || format === 'integer' || format === 'percent' || format === 'time') {\n let total = 0;\n _.each(this.budgetView.lineItems, function (lineItem) {\n if (lineItem.columnData != null) {\n if (column.source === 'TimeCardValues') {\n let minutes = PJQ.helpers.dateHelpers.getMinutesFromHoursDecimal(lineItem.columnData[index] / 100);\n total += minutes;\n } else {\n let cVal = lineItem.columnData[index];\n if (typeof cVal === 'string') {\n cVal = PJQ.helpers.formatHelpers.numbersOnly(cVal, true, true);\n }\n total += parseFloat(cVal);\n }\n }\n });\n\n // we add a +2 offset because there is always an actions and \"Description\" column on the left\n let $footerCol = $footer.find('th').eq(index + 2);\n if (format === 'money') {\n $footerCol.text(PJQ.helpers.formatHelpers.formatCurrency(total));\n } else if (format === 'integer') {\n $footerCol.text(total);\n } else if (format === 'decimal') {\n if (column.source === 'TimeCardValues') {\n $footerCol.text(PJQ.helpers.timecards.getFormattedTime(total));\n } else {\n $footerCol.text((total).toFixed(2));\n }\n } else if (format === 'time') {\n $footerCol.text(PJQ.helpers.timecards.getFormattedTime(total));\n } else if (format === 'percent') {\n $footerCol.text((total / 100).toFixed(2) + '%');\n }\n }\n }, this);\n },\n lockBudget: function () {\n this.budget.updateLocked(true, _.bind(function (success) {\n if (success) {\n this.render();\n }\n }, this));\n },\n linkERP: function () {\n new PJQ.integrations.models.LinkERPProjectModal({\n project: PJQ.app.session.project,\n onSave: _.bind(function (erpProject) {\n if (erpProject != null && _.size(erpProject.id) > 0) {\n PJQ.app.session.project.linkERP(erpProject.id, _.bind(function (res) {\n if (res != null) {\n this.render();\n }\n }, this));\n }\n }, this)\n });\n },\n pushERP: function () {\n if (this.options.project != null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_BUDGET)) {\n this.erpButtons?.pushing(true);\n this.erpIntegration.pushBudget(this.budget, _.bind(function () {\n this.erpButtons?.pushing(false);\n PJQ.notifications.notify.successNotify({\n message: 'Budget pushed to ERP'\n });\n this.render();\n }, this));\n }\n },\n pullERP: function () {\n if (this.options.project != null && this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_BUDGET)) {\n this.erpButtons?.pulling(true);\n\n this.erpIntegration.pullBudget(this.options.project, (res, err) => {\n this.erpButtons?.pulling(false);\n\n if (res == null) {\n return;\n }\n\n PJQ.notifications.notify.successNotify({\n message: 'Budget pulled from ERP'\n });\n\n this.budgetView = null;\n PJQ.app.session.project.fetchCostCodes(_.bind(function (costCodes) {\n this.costCodes = costCodes;\n this.options.hasDivisions = this.costCodes.hasDivisions();\n PJQ.app.session.project.fetchCostTypes(_.bind(function (costTypes) {\n this.costTypes = costTypes;\n this.render();\n }, this), true);\n }, this), true);\n });\n }\n },\n undoPushERP: function () {\n if (this.budget.erpSyncStatus() === PJQ.constants.integrations.erp.syncStatuses.REVIEWING) {\n this.erpIntegration.undoPush(this.budget, _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'Budget removed from ERP approval'\n });\n this.render();\n }, this));\n }\n },\n exportBudget: function () {\n PJQ.files.downloadFile(PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: PJQ.app.session.project.id\n },\n {\n endpoint: 'budgets',\n value: this.budget.get('id')\n },\n {\n endpoint: 'export'\n }\n ], [\n {\n parameter: 'viewId',\n value: this.view.id\n }\n ]), {isAPIv2: true});\n },\n searchBudget: function () {\n let searchVal = this.$('.budget-search').val(),\n filteredIds = [];\n if (this.options.hasDivisions) {\n this.dataTable.dataTable.search(searchVal).draw();\n } else {\n _.each(this.childDataTables, function (dt) {\n dt.dataTable.search(searchVal).draw();\n _.each(dt.dataTable.rows({search: 'applied'}).data(), function (row) {\n filteredIds.push(row.id);\n }, this);\n }, this);\n\n _.each(this.dataTable.dataTable.rows().data(), function (data, index, dt) {\n let column = this.$('tr#' + (data.id)),\n isValid = false,\n row = this.dataTable.getRow(data.id);\n _.each(filteredIds, function (id) {\n if (_.contains(data.lineItemIds, id)) {\n isValid = true;\n }\n }, this)\n\n if (isValid) {\n column.show();\n row.child.show();\n } else {\n column.hide();\n row.child.hide()\n }\n }, this)\n }\n },\n unlockBudget: function () {\n // deleteModifications\n this.budget.updateLocked(false, _.bind(function (success) {\n if (success) {\n this.render();\n }\n }, this));\n },\n getColumns: function (level) {\n let isLastLevel = level === _.size(this.options.groupBy),\n columns = [\n {\n // \"data\": \"\",\n \"title\": ' 0 ? 'fa-minus-circle' : 'fa-plus-circle') + ' expand-all-items\" style=\"cursor: pointer\">',\n \"orderable\": false,\n \"render\": _.bind(function (data, type, row) {\n // budgetId is an attribute that only exists if it's a line item\n let html = '';\n if (!isLastLevel) {\n html = '';\n } else if (row.isUnBudgeted) {\n html = ' '\n }\n\n return '
' + html + '
';\n }, this)\n }\n ],\n canClickColumnData = _.size(this.options.groupBy) === level;\n columns.push({\n \"title\": \"Budget Code\",\n \"width\": \"250px\",\n \"data\": \"budgetCode\",\n \"type\": 'num',\n \"render\": _.bind(function (data, type, row) {\n if (type === 'sort') {\n let sValue = row.costCode ? row.costCode.get('code') : row.budgetCode,\n numOnly = PJQ.helpers.formatHelpers.numbersOnly(sValue, false);\n return _.size(numOnly) > 0 ? parseInt(numOnly) : sValue;\n }\n\n let classes = '';\n if (!isLastLevel) {\n classes = 'font-weight-bold';\n }\n\n let padding = level * 5;\n return '
' + data + '
';\n }, this)\n });\n\n _.each(this.budgetView.columns, function (column, index) {\n columns.push({\n \"data\": \"\",\n \"title\": column.name,\n \"orderable\": false,\n \"render\": _.bind(function (data, type, row) {\n let val = row.columnData[index],\n extraClasses = '';\n if (column.format === 'money') {\n let rawVal = PJQ.helpers.formatHelpers.numbersOnly(val, false, true);\n // extraClasses += 'wd-80p '\n if (rawVal < 0) {\n extraClasses += 'text-danger ';\n }\n } else if (column.format === 'decimal' || column.format === 'percent') {\n if ((column.source === 'TimeCardValues') && Array.isArray(val)) {\n let totalMinutes = _.reduce(val, function (total, timeValue) {\n let timeDecimal = Math.floor(timeValue / 100) + (timeValue % 100) / 100;\n\n let hours = Math.floor(timeDecimal);\n let minutes = Math.round((timeDecimal - hours) * 100 * 60 / 100);\n\n return total + (hours * 60) + minutes;\n }, 0);\n\n val = totalMinutes / 60;\n } else if (column.source === 'TimeCardValues') {\n val = ((val ?? 0) / 100).toFixed(2);\n } else {\n val = (val ?? 0).toFixed(2);\n if (column.format === 'percent') {\n val = val + '%';\n }\n }\n } else if (column.format === 'time') {\n val = PJQ.helpers.timecards.getFormattedTime(val);\n }\n\n if (column.source === 'TimeCardValues') {\n let minutes = PJQ.helpers.dateHelpers.getMinutesFromHoursDecimal(val);\n val = PJQ.helpers.timecards.getFormattedTime(minutes);\n }\n\n if (canClickColumnData) {\n let statuses = column.options && column.options.statuses ? column.options.statuses.join(',') : '',\n result = val;\n switch (column.source) {\n case \"CommitmentValues\":\n result = '' + val.toString() + ''\n break;\n case \"BudgetedCost\":\n if (this.options.canEdit) {\n result = '' + val.toString() + ''\n } else {\n result = val.toString();\n }\n break;\n case \"BudgetedHours\":\n if (this.options.canEdit) {\n result = '' + val.toString() + ''\n } else {\n result = val.toString();\n }\n break;\n case \"ForecastToComplete\":\n result = '' + val.toString() + ''\n break;\n case \"BudgetModification\":\n result = '' + val.toString() + ''\n break;\n case \"PrimeContractValues\":\n result = '' + val.toString() + ''\n break;\n case \"CommitmentChangeOrderValues\":\n result = '' + val.toString() + ''\n break;\n case \"PrimeContractChangeOrderValues\":\n result = '' + val.toString() + ''\n break;\n case \"DirectCostValues\":\n result = '' + val.toString() + ''\n break;\n case \"PayableInvoiceValues\":\n result = '' + val.toString() + ''\n break;\n case \"ReceivableInvoiceValues\":\n result = '' + val.toString() + ''\n break;\n }\n return '' + result + '';\n } else {\n return '' + val + '';\n }\n }, this)\n })\n }, this)\n return columns;\n },\n createSnapshot: function () {\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'budgets',\n value: this.budget.get('id')\n },\n {\n endpoint: 'snapshot'\n }\n ]),\n isAPIv2: true,\n }).post().done(_.bind(function (data) {\n data.createdOn = new Date()\n this.snapshots.add(data);\n this.render();\n PJQ.notifications.notify.successNotify({\n message: 'Snapshot successfully created'\n });\n }, this));\n },\n expandChildTables: function (dataTable, level, expand = null) {\n let self = this,\n hasChildren = _.size(this.options.groupBy) >= level;\n if (hasChildren && dataTable && dataTable.dataTable) {\n dataTable.dataTable.rows().every(function () {\n self.renderChildTable(this, dataTable, level, expand != null ? expand : true);\n });\n }\n },\n renderChildTable: function (row, parentTable, level, expand = null) {\n let $tr = $(row.node()),\n $expandIcon = $tr.find('.expand-item'),\n id = row.data().id;\n if (row.child.isShown() || expand === false) {\n // This row is already open - close it\n row.child.hide();\n $tr.removeClass('shown');\n $expandIcon.removeClass('fa-minus-circle').addClass('fa-plus-circle');\n } else {\n $expandIcon.removeClass('fa-plus-circle').addClass('fa-minus-circle');\n let childClass = 'subgrid-' + id.toString(),\n $childTable = $('
', {\n class: childClass + ' p-2'\n });\n row.child($childTable).show();\n\n let parent = row.data(),\n childData = this.getDataForLevel(level, parent);\n if (childData != null) {\n this.renderDatatable($childTable, childData, level, parentTable);\n }\n }\n },\n expandAllClicked: function () {\n let $expandIcon = this.$('.expand-all-items');\n if (_.size(this.expandedItems) > 0) {\n this.expandedItems = [];\n $expandIcon.removeClass('fa-minus-circle').addClass('fa-plus-circle');\n this.expandChildTables(this.dataTable, 1, false);\n } else {\n this.expandedItems = [-1];\n $expandIcon.removeClass('fa-plus-circle').addClass('fa-minus-circle');\n this.expandChildTables(this.dataTable, 1, true);\n }\n },\n editLineItemBudgetClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id');\n this.editLineItemBudget(id);\n },\n editLineItemBudget: function (id) {\n let lineItem = this.budget.lineItems.get(id);\n new PJQ.views.budget.EditLineItemBudgetModal({\n model: lineItem,\n budget: this.budget,\n onSave: _.bind(function () {\n lineItem.set('modifiedOn', new Date());\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n addLineItemToBudget: function (lineItem) {\n lineItem.save(null, {\n success: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n })\n },\n editLineItemForecastClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id');\n this.editLineItemForecast(id);\n },\n editLineItemForecast: function (lineItemId) {\n let lineItem = this.budget.lineItems.get(lineItemId);\n new PJQ.views.budget.AddBudgetLineItemForecastModal({\n model: lineItem,\n budget: this.budget,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n viewLineItemReceivableInvoicesClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n statusIds = $target.data('statuses').toString();\n\n if (_.size(statusIds.trim()) > 0) {\n statusIds = _.map(statusIds.split(','), statusId => parseInt(statusId));\n }\n\n this.viewLineItemReceivableInvoices(id, statusIds);\n },\n viewLineItemReceivableInvoices: function (lineItemId, statusIds) {\n let lineItem = this.budget.lineItems.get(lineItemId);\n new PJQ.views.invoicing.ModalViewReceivableInvoices({\n model: lineItem,\n budget: this.budget,\n project: this.options.project,\n showAllBillingPeriods: true,\n statusIds: statusIds,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n viewLineItemPayableInvoicesClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n statusIds = $target.data('statuses').toString();\n\n if (_.size(statusIds.trim()) > 0) {\n statusIds = _.map(statusIds.split(','), statusId => parseInt(statusId));\n }\n\n this.viewLineItemPayableInvoices(id, statusIds);\n },\n viewLineItemPayableInvoices: function (lineItemId, statusIds) {\n let lineItem = this.budget.lineItems.get(lineItemId);\n new PJQ.views.invoicing.ModalViewPayableInvoices({\n model: lineItem,\n budget: this.budget,\n project: this.options.project,\n showAllBillingPeriods: true,\n statusIds: statusIds,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n viewLineItemPrimeContractsClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n statusIds = $target.data('statuses').toString();\n\n if (_.size(statusIds.trim()) > 0) {\n statusIds = _.map(statusIds.split(','), statusId => parseInt(statusId));\n }\n\n this.viewLineItemPrimeContracts(id, statusIds);\n },\n viewLineItemPrimeContracts: function (lineItemId, statusIds) {\n let lineItem = this.budget.lineItems.get(lineItemId);\n new PJQ.views.primeContracts.ModalViewPrimeContracts({\n model: lineItem,\n budget: this.budget,\n project: this.options.project,\n statusIds: statusIds,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n viewLineItemPrimeContractChangeOrdersClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n statusIds = $target.data('statuses').toString();\n\n if (_.size(statusIds.trim()) > 0) {\n statusIds = _.map(statusIds.split(','), statusId => parseInt(statusId));\n }\n\n this.viewLineItemPrimeContractChangeOrders(id, statusIds);\n },\n viewLineItemPrimeContractChangeOrders: function (lineItemId, statusIds) {\n let lineItem = this.budget.lineItems.get(lineItemId);\n new PJQ.views.primeContracts.ModalViewChangeOrders({\n model: lineItem,\n budget: this.budget,\n project: this.options.project,\n statusIds: statusIds,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n viewLineItemCommitmentChangeOrdersClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n statusIds = $target.data('statuses').toString();\n\n if (_.size(statusIds.trim()) > 0) {\n statusIds = _.map(statusIds.split(','), statusId => parseInt(statusId));\n }\n\n this.viewLineItemCommitmentChangeOrders(id, statusIds);\n },\n viewLineItemCommitmentChangeOrders: function (lineItemId, statusIds) {\n let lineItem = this.budget.lineItems.get(lineItemId);\n new PJQ.views.commitments.ModalViewChangeOrders({\n model: lineItem,\n statusIds: statusIds,\n budget: this.budget,\n project: this.options.project,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n viewLineItemCommitmentsClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n statusIds = $target.data('statuses').toString();\n\n if (_.size(statusIds.trim()) > 0) {\n statusIds = _.map(statusIds.split(','), statusId => parseInt(statusId));\n }\n\n this.viewLineItemCommitments(id, statusIds);\n },\n viewLineItemCommitments: function (lineItemId, statusIds) {\n let lineItem = this.budget.lineItems.get(lineItemId);\n new PJQ.views.commitments.ModalViewCommitments({\n model: lineItem,\n budget: this.budget,\n statusIds: statusIds,\n project: this.options.project,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n viewLineItemDirectCostsClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n statusIds = $target.data('statuses').toString();\n\n if (_.size(statusIds.trim()) > 0) {\n statusIds = _.map(statusIds.split(','), statusId => parseInt(statusId));\n }\n\n this.viewLineItemDirectCosts(id, statusIds);\n },\n viewLineItemDirectCosts: function (lineItemId, statusIds) {\n let lineItem = this.budget.lineItems.get(lineItemId);\n new PJQ.views.directcosts.ModalViewDirectCosts({\n model: lineItem,\n budget: this.budget,\n project: this.options.project,\n statusIds: statusIds,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n addLineItems: function () {\n new PJQ.views.budget.AddBudgetLineItemsModal({\n budget: this.budget,\n costCodes: this.costCodes,\n onSave: _.bind(function () {\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n filterLineItems: function (lineItemIds, filterText) {\n if (_.size(lineItemIds) > 0 || _.size(filterText) > 0) {\n return _.filter(this.budgetView.lineItems, function (lineItem) {\n let costCode = this.costCodes.get(lineItem.costCodeId);\n return (_.size(lineItemIds) === 0 || lineItemIds.indexOf(lineItem.id) !== -1) &&\n (_.size(filterText) === 0 || costCode.getDisplayName().indexOf(filterText) !== -1 || costCode.get('division').indexOf(filterText) !== -1);\n }, this)\n }\n\n return this.budgetView.lineItems;\n },\n deleteLineItem: function (lineItem) {\n lineItem.destroy({\n wait: true,\n notify: false,\n success: _.bind(function () {\n this.budgetView.lineItems = _.filter(this.budgetView.lineItems, function (itm) {\n return itm.id !== lineItem.id;\n })\n this.render();\n }, this),\n error: function (model, xhr) {\n if (xhr.responseJSON != null && xhr.responseJSON.type === 'delete_line_item_with_costs') {\n PJQ.notifications.notify.warningNotify({\n message: 'You can not delete line items with committed or pending costs or contracts'\n });\n }\n }\n });\n },\n addBudgetModifications: function () {\n new PJQ.views.budget.AddBudgetModificationsModal({\n budget: this.budget,\n onSave: _.bind(function (modifications) {\n _.each(modifications, (modification) => {\n let fromLine = this.budget.lineItems.get(modification.get('fromLineItemId'));\n if (fromLine != null) {\n fromLine.set('modifiedOn', new Date());\n }\n\n let toLine = this.budget.lineItems.get(modification.get('toLineItemId'));\n if (toLine != null) {\n toLine.set('modifiedOn', new Date());\n }\n });\n this.budgetView = null;\n this.render();\n }, this)\n });\n },\n viewLineItemModificationsClicked: function (e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n lineItem = this.budget.lineItems.get(id);\n this.viewLineItemModifications(lineItem);\n },\n viewLineItemModifications: function (lineItem) {\n new PJQ.views.budget.ViewBudgetModificationsModal({\n budget: this.budget,\n lineItem: lineItem\n });\n },\n manageViews: function () {\n let fnUpdateChoices = _.bind(function (views) {\n this.budgetViews = views;\n if (this.viewSelector != null) {\n this.viewSelector.updateChoices(_.map(this.budgetViews.models, function (bv) {\n return {\n value: bv.id,\n name: bv.get('name')\n }\n }));\n }\n }, this)\n new PJQ.views.budget.BudgetsViewsEditorModal({\n budget: this.budget,\n budgetViews: this.budgetViews,\n onSave: _.bind(function (vw, views) {\n this.budgetViews = views;\n // fnUpdateChoices(views);\n if (vw.id === this.view.id) {\n this.setActiveView(vw.id);\n // this.render();\n }\n this.render();\n }, this),\n onDelete: _.bind(function (vw, views) {\n this.budgetViews = views;\n // fnUpdateChoices(views);\n if (vw.id === this.view.id) {\n this.setActiveView();\n // this.render();\n }\n this.render();\n }, this)\n });\n }\n});\n","PJQ.collections.rfq = PJQ.collections.rfq ? PJQ.collections.rfq : {};\nPJQ.models.rfq = PJQ.models.rfq ? PJQ.models.rfq : {};\nPJQ.views.rfq = PJQ.views.rfq ? PJQ.views.rfq : {};","PJQ.views.rfq.RFQBatchModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-rfq-batch'),\n maxWidth: 1200,\n isShowCloseButton: true,\n onSave: _.noop()\n },\n events: {\n 'click .btn-close': 'close',\n 'click .btn-save': 'save',\n 'click .cb-send': 'sendChanged',\n 'click .cb-send-all': 'sendAllChanged',\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n this.batch = {\n changeRequestId: this.options.changeRequest?.id ?? 0,\n title: this.options.changeRequest ? (this.options.changeRequest.get('number') + ' - ' + this.options.changeRequest.get('title')) : '',\n description: this.options.changeRequest?.get('description') ?? '',\n dueDate: new Date(),\n attachments: new PJQ.collections.rfq.Attachments(),\n requests: _.map(this.options.lineItems ?? [], (lineItem) => {\n let vendor = lineItem.get('vendor');\n return {\n id: lineItem.id,\n changeRequestId: lineItem.get('changeRequestId'),\n lineItem: lineItem,\n lineItemId: lineItem.id,\n scope: lineItem.get('description'),\n contractedContact: vendor,\n contractedContactId: vendor?.id,\n assignees: vendor != null ? [vendor] : [],\n assigneeIds: vendor != null ? [vendor.id] : [],\n distributeToIds: PJQ.app.session.user != null ? [-PJQ.app.session.user.id] : [],\n commitmentId: lineItem.get('commitmentId'),\n commitmentNumber: lineItem.get('commitmentNumber'),\n send: true\n };\n })\n }\n\n this.isFetched = true;\n },\n beforeRender: function () {\n\n },\n renderData: function () {\n return {\n batch: this.batch,\n isFetched: this.isFetched\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.renderForm();\n\n this.renderDataTable();\n },\n sendAllChanged: function (e) {\n let $target = $(e.currentTarget),\n checked = $target.prop('checked');\n _.each(this.batch.requests, (request) => {\n let checkbox = this.$('.cb-send[data-id=\"' + request.id + '\"]');\n checkbox.prop('checked', checked);\n request.send = checked;\n });\n },\n renderForm: function () {\n if (!this.binder) {\n this.binder = new PJQ.Binder(this.$('.details-outer'), this.batch, {\n watchElements: [\n 'input',\n 'textarea'\n ]\n });\n }\n\n new PJQ.inputs.Datepicker({\n el: this.$('.input-due-date'),\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n defaultDate: this.batch.dueDate\n },\n onChange: (newDate) => {\n this.batch.dueDate = newDate;\n }\n });\n\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: this.$('.rfq-file-uploader'),\n collection: this.batch.attachments,\n useApiV2: true,\n onDelete: (attachment, callback) => {\n if (attachment.get('id') > 0) {\n attachment.set('delete', true);\n } else {\n attachment.destroy();\n }\n\n callback();\n }\n });\n },\n renderInputs: function () {\n if (!this.lineBinder) {\n this.lineBinder = new PJQ.Binder(this.$el, this.batch.requests, {\n delegate: true,\n modelSelectorAttribute: 'id',\n idAttribute: 'id',\n watchElements: [\n 'input'\n ],\n afterChange: (el, attribute, value) => {\n let $el = $(el),\n id = $el.data('id'),\n model = _.findWhere(this.batch.requests, {\n id: id\n });\n\n if (model) {\n model[attribute] = value;\n }\n }\n });\n }\n let fnCommitmentToChoice = (commitment) => {\n return {\n id: commitment.id,\n name: '' + commitment.get('number') + '' + ' | ' + PJQ.helpers.formatHelpers.formatCurrency(commitment.getGrandTotal()),\n subtext: commitment.contractedContact?.get('companyName') ?? ''\n };\n };\n this.commitmentPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.batch.requests, {\n pickerSelector: '.select-commitment',\n valueAttribute: 'commitmentId',\n idAttribute: 'id',\n selectPickerOptions: {\n isBlockSubtext: true,\n size: 5,\n choices: (model) => {\n if (model.lineItem.get('costCodeId') > 0) {\n let suggested = [],\n others = [];\n _.each(this.options.projectCommitments.models, (commitment) => {\n if (null != commitment.lineItems.findWhere({\n costCodeId: model.lineItem.get('costCodeId')\n })) {\n suggested.push(commitment);\n } else {\n others.push(commitment);\n }\n });\n if (_.size(suggested) > 0) {\n return [{\n name: 'Suggested',\n choices: _.map(suggested, fnCommitmentToChoice)\n }, {\n name: '',\n choices: _.map(others, fnCommitmentToChoice)\n }];\n }\n }\n return _.map(this.options.projectCommitments.models, fnCommitmentToChoice);\n }\n },\n onChange: (model, value) => {\n let commitment = this.options.projectCommitments.get(value);\n model.commitment = commitment;\n model.commitmentId = commitment?.id;\n model.commitmentNumber = model.commitment?.get('number');\n model.contractedContact = commitment.contractedContact;\n model.contractedContactId = model.contractedContact?.id;\n model.assignees = commitment.contractedContact ? [commitment.contractedContact] : [];\n model.assigneeIds = commitment.contractedContact ? [commitment.contractedContact?.id] : [];\n this.renderDataTable();\n }\n });\n\n let fnVendorToChoice = (commitment) => {\n return {\n id: commitment.contractedContact.id,\n name: '' + commitment.contractedContact.get('companyName') + '',\n subtext: commitment.contractedContact.get('contactName') ?? ''\n };\n };\n this.companyPickerCollection = new PJQ.inputs.SelectPickerCollection(this.$el, this.batch.requests, {\n pickerSelector: '.select-company',\n valueAttribute: 'contractedContactId',\n idAttribute: 'id',\n selectPickerOptions: {\n isBlockSubtext: true,\n size: 5,\n isIntChoices: true,\n choices: (model) => {\n let foundIds = [],\n suggested = [],\n others = [],\n costCodeId = model.lineItem.get('costCodeId') > 0;\n _.each(this.options.projectCommitments.models, (commitment) => {\n if (commitment.contractedContact == null || -1 !== foundIds.indexOf(commitment.contractedContact.id)) {\n return;\n }\n\n if (costCodeId > 0 && null != commitment.lineItems.findWhere({\n costCodeId: costCodeId\n })) {\n suggested.push(commitment);\n } else {\n others.push(commitment);\n }\n });\n if (_.size(suggested) > 0) {\n return [{\n name: 'Suggested',\n choices: _.map(suggested, fnVendorToChoice)\n }, {\n name: '',\n choices: _.map(others, fnVendorToChoice)\n }];\n }\n return _.map(others, fnVendorToChoice);\n }\n },\n onChange: (model, value) => {\n let commitment = null,\n currentCommitment = this.options.projectCommitments.get(model.commitmentId),\n matchCommitments;\n if (currentCommitment?.contractedContact?.id === value) {\n commitment = currentCommitment\n matchCommitments = this.options.projectCommitments.filter((commitment) => {\n return commitment.contractedContact && commitment.contractedContact.id === value;\n });\n } else {\n matchCommitments = this.options.projectCommitments.filter((commitment) => {\n return commitment.contractedContact && commitment.contractedContact.id === value;\n });\n }\n\n let contractedContact = null;\n if (_.size(matchCommitments) > 0) {\n contractedContact = matchCommitments[0].contractedContact ?? matchCommitments[0].invoiceContact;\n }\n model.commitment = commitment;\n model.commitmentId = commitment?.id;\n model.commitmentNumber = model.commitment?.get('number');\n model.contractedContact = contractedContact;\n model.assignees = contractedContact ? [contractedContact] : [];\n model.assigneeIds = contractedContact? [contractedContact.id] : [];\n model.contractedContactId = model.contractedContact?.id;\n\n this.renderDataTable();\n }\n });\n },\n getColumns: function () {\n return [\n {\n \"data\": \"send\",\n \"columnData\": \"send\",\n \"title\": 'Send',\n \"orderable\": false,\n \"searchable\": false,\n \"render\": (data, type, row) => {\n if (type === 'sort') {\n return data.id;\n }\n\n return ('
');\n },\n \"width\": '4%'\n },\n {\n \"columnData\": \"scope\",\n \"data\": \"scope\",\n \"title\": \"Scope\",\n \"render\": (data, type, row) => {\n return '';\n }\n },\n {\n \"columnData\": \"contractedContact\",\n \"title\": `Company ${PJQ.constants.markup.requiredAst}`,\n \"width\": \"15%\",\n \"render\": (data, type, row) => {\n return \"
\";\n }\n },\n {\n \"columnData\": \"commitmentId\",\n \"title\": `Commitment ${PJQ.constants.markup.requiredAst}`,\n \"width\": \"20%\",\n \"render\": (data, type, row) => {\n return '
';\n }\n },\n {\n \"columnData\": \"assignees\",\n \"title\": \"Assignees\",\n \"width\": \"20%\",\n \"visible\": false,\n \"render\": (data, type, row) => {\n return '
';\n }\n },\n {\n data: \"id\",\n title: \"\",\n orderable: false,\n searchable: false,\n width: 50,\n className: 'text-align-center',\n render: (data, type, row) => {\n return '
';\n }\n }\n ];\n },\n sendChanged: function(e) {\n let $target = $(e.currentTarget),\n id = $target.data('id'),\n request = _.findWhere(this.batch.requests, {\n id: id\n });\n\n if(request){\n request.send = $target.prop('checked');\n }\n },\n renderDataTable: function () {\n let data = _.sortBy(this.batch.requests, (model) => {\n return model.id;\n });\n let $dataTable = this.$('.line-items-table')\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: $dataTable,\n data: data,\n rowId: 'id',\n order: [],\n // autoWidth: false,\n // fixedHeader: {\n // header: false,\n // footer: false\n // },\n // hasFooter: true,\n // extraClasses: this.isInvoices ? 'table-invoice-line-items' : '',\n isHideSearch: true,\n paging: false,\n // order: [],\n // language: {\n // emptyTable: this.options.canEdit ? 'Click \"Add Line Item\" to create a new Line item' : 'No line items have been added yet'\n // },\n columns: this.getColumns(),\n afterDataTableRender: () => {\n this.renderInputs();\n },\n onRowRemoved: () => {\n this.renderInputs();\n },\n contextMenuOptions: {\n actions: [\n {\n name: 'Delete',\n isDanger: true,\n onClick: (row) => {\n this.deleteLineItem(row);\n }\n }\n ]\n },\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n });\n },\n deleteLineItem: function (row) {\n if (row == null) {\n return;\n }\n\n let item = row.data();\n this.batch.requests = _.reject(this.batch.requests, (request) => {\n return request.id === item.id;\n });\n this.render();\n },\n validateBatchItem: function(batchItem){\n if (this.dataTable == null) {\n return true;\n }\n\n let row = this.dataTable.getRow(batchItem.cid),\n data = row.data(),\n result = true,\n updateCell = _.bind(function ($cell, isValid) {\n if (isValid) {\n $cell.removeClass('bg-danger-transparent');\n } else {\n $cell.addClass('bg-danger-transparent');\n }\n result = result && isValid;\n }, this);\n\n if (data == null) {\n return true;\n }\n if (row != null) {\n let companyCol = 2,\n commitmentCol = 3,\n companyNode = $(row.nodes()[0]).find(`td:eq(${companyCol})`),\n commitmentNode = $(row.nodes()[0]).find(`td:eq(${commitmentCol})`);\n\n updateCell(companyNode, data.contractedContact != null);\n updateCell(commitmentNode, data.commitmentId != null);\n }\n\n return result;\n },\n validate: function () {\n let isValid = true;\n\n _.each(this.batch.requests, function (request) {\n isValid = isValid && this.validateBatchItem(request);\n }, this);\n\n return isValid;\n },\n save: function () {\n if (!this.validate()) {\n return;\n }\n\n let loader = new PJQ.Loader(this.$('.modal-content'));\n new PJQ.ajax.Request({\n endpoint: PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.project.id\n },\n {\n endpoint: 'rfq'\n },\n {\n endpoint: 'batch'\n }]),\n isAPIv2: true,\n data: {\n changeRequestId: this.batch.changeRequestId,\n attachments: this.batch.attachments.toJSON(),\n requests: _.map(this.batch.requests, (req) => {\n return _.defaults({\n id: null,\n title: this.batch.title,\n description: this.batch.description,\n dueDate: this.batch.dueDate\n }, req);\n })\n }\n }).post().done((batchRes) => {\n if (_.size(batchRes.requests) > 0) {\n PJQ.notifications.notify.successNotify({\n message: _.size(batchRes.requests).toString() + ' RFQs were created'\n });\n } else {\n PJQ.notifications.notify.warningNotify({\n message: 'No RFQs were created'\n });\n }\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(batchRes);\n }\n this.removeModal();\n }).fail((err) => {\n loader.remove();\n PJQ.notifications.notify.warningNotify({\n message: 'Encountered an error while creating RFQs. Please contact customer service.'\n });\n });\n },\n close: function () {\n new PJQ.views.modals.YesNo({\n header: \"Cancel creating RFQs?\",\n body: \"Are you sure you want to cancel creating RFQs? All unsaved changes will be lost.\",\n onYes: () => {\n this.removeModal();\n }\n });\n }\n});","PJQ.views.rfq.RFQDataTable = PJQ.views.dataTables.DataTable.extend({\n defaults: {\n language: {\n emptyTable: 'No RFQs have been created yet',\n zeroRecords: \"No RFQs matched the search criteria\"\n },\n subTemplates: {\n header: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'data-table-header-rfq')\n },\n toggleRowClass: '.rfq-toggle-row',\n onViewChangeRequest: null\n },\n events: {\n 'click .btn-view-rfq': 'viewRFQClicked',\n 'click .btn-view-change-request': 'viewChangeRequestClicked'\n },\n getDefaultFilter: function () {\n let defaultFilter = {};\n defaultFilter = [];\n return defaultFilter;\n },\n afterSearch: function () {\n if(typeof this.options.afterSearch === 'function'){\n this.options.afterSearch();\n }\n },\n afterHeaderRender: function (){\n new PJQ.inputs.Selectpicker({\n el: this.$('.rfq-status-filter'),\n defaultValue: this.getDefaultFilter(),\n isIntChoices: true,\n isMultiple: true,\n noneSelectedText: 'No Filters',\n onChange: _.bind(function (value) {\n this.setFilter(PJQ.constants.rfq.filterType.STATUS_FILTER, value);\n }, this)\n });\n this.setFilter(PJQ.constants.rfq.filterType.STATUS_FILTER, this.getDefaultFilter());\n },\n getFilterData: function () {\n let statusFilter = this.getFilter(PJQ.constants.rfq.filterType.STATUS_FILTER);\n if (_.size(statusFilter) === 0) {\n return this.options.data;\n }\n\n return _.filter(this.options.data, function (row) {\n return (_.size(statusFilter) === 0 || _.contains(statusFilter, row.get('statusId')));\n });\n },\n getColumns: function (includeAllColumns = false) {\n this.options.canViewChangeRequests = PJQ.app.session.project.hasPermission('changeRequests.canView');\n\n let columns = [],\n includeColumns = ['status', 'changeRequest', 'title', 'number', 'description', 'assignees', 'amount'];\n\n columns.push({\n \"columnData\": \"childData\",\n \"data\": null,\n \"title\": \"\",\n \"width\": \"20px\",\n \"orderable\": false,\n \"searchable\": false,\n \"defaultContent\": '',\n \"render\": function (data, type, row) {\n return PJQ.helpers.erp.getERPIcon(row.erpSyncStatus());\n }\n });\n\n _.each(includeColumns, _.bind(function (columnName) {\n switch (columnName) {\n case 'status':\n columns.push({\n \"columnData\": \"status\",\n \"data\": \"attributes.statusId\",\n \"title\": \"Status\",\n \"width\": \"100px\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.constants.rfq.rfqStatusNames[row.get('statusId')]\n }, this)\n });\n break;\n case 'changeRequest':\n columns.push({\n \"columnData\": \"changeRequest\",\n \"title\": \"Change Request\",\n \"data\": \"attributes.changeRequestId\",\n \"orderable\": true,\n \"render\": _.bind(function (data, type, row) {\n if(this.options.canViewChangeRequests){\n return '' + row.get('changeRequestNumber') + '';\n }\n return data;\n }, this)\n },);\n break;\n case 'number':\n columns.push({\n \"columnData\": \"number\",\n \"data\": \"attributes.number\",\n \"title\": \"Number\",\n \"render\": _.bind(function (data, type, row) {\n return '' + row.get('number') + '';\n }, this)\n });\n break;\n case 'title':\n columns.push({\n \"columnData\": \"title\",\n \"data\": \"attributes.title\",\n \"title\": \"Title\"\n });\n break;\n case 'description':\n columns.push({\n \"columnData\": \"description\",\n \"data\": \"attributes.description\",\n \"title\": \"Description\"\n });\n break;\n case 'createdOn':\n columns.push({\n \"columnData\": \"createdOn\",\n \"data\": \"attributes.createdOn\",\n \"title\": 'Created',\n \"width\": '90px',\n \"render\": _.bind(function (data, type, row) {\n if(_.size(data) === 0){\n return '';\n }\n return PJQ.helpers.dateHelpers.getDateString(new Date(data), PJQ.helpers.dateHelpers.dateFormats.DATE_TIME);\n }, this)\n });\n break;\n case 'assignees':\n columns.push({\n \"columnData\": \"assignees\",\n \"title\": \"Assigned To\",\n \"titleSettings\": \"Assigned To\",\n \"render\": _.bind(function (data, type, row) {\n if (_.size(row.assignees.models) === 0) {\n return 'Nobody';\n }\n\n return _.map(row.assignees.models, function (assignee) {\n let res = assignee.get('contactName');\n return _.size(res) > 0 ? res : assignee.get('companyName');\n }).join(', ');\n }, this)\n });\n break;\n case 'amount':\n columns.push({\n \"columnData\": \"amount\",\n \"data\": \"attributes.amount\",\n \"width\": \"10%\",\n \"title\": \"Amount\",\n \"className\": \"text-align-right\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(row.get('amount'));\n }, this)\n });\n break;\n }\n }, this));\n\n if (!includeAllColumns) {\n columns.push({\n \"title\": '',\n \"render\": _.bind(function (data, type, row) {\n return '
';\n }, this),\n \"orderable\": false,\n \"searchable\": false,\n \"width\": \"90px\",\n \"className\": \"text-center\",\n \"visible\": true\n });\n }\n\n return columns;\n },\n viewRFQClicked: function (e){\n if(typeof(this.options.onViewRFQ) === 'function'){\n let row = this.getRow((e.currentTarget).closest('tr')),\n rfq = row.data();\n if(rfq != null){\n this.options.onViewRFQ(rfq);\n }\n }\n },\n viewChangeRequestClicked: function (e) {\n let row = this.getRow((e.currentTarget).closest('tr'));\n this.viewChangeRequest(row.data().get('changeRequestId'));\n },\n viewChangeRequest: function(changeRequestId) {\n new PJQ.views.changeRequests.ChangeRequestEditModal({\n model: new PJQ.models.changeRequests.ChangeRequest({\n id: changeRequestId\n })\n });\n }\n});","PJQ.views.rfq.RFQEditModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-rfq-edit'),\n width: '95%',\n maxWidth: 1500,\n model: null,\n isShowCloseButton: true,\n onSave: _.noop(),\n onDelete: _.noop()\n },\n events: {\n 'click .btn-view-change-request': 'viewChangeRequest',\n 'click .btn-close': 'close',\n 'click .btn-save': 'saveRFQ',\n 'click .btn-delete': 'deleteRFQ',\n 'click .btn-send-request': 'sendRequest',\n 'click .btn-update-response': 'updateResponseClicked',\n 'click .impact-response>button': 'impactResponseChanged'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.options.changeRequest == null) {\n this.options.changeRequest = new PJQ.models.changeRequests.ChangeRequest({\n id: this.model.get('changeRequestId')\n });\n }\n\n if (this.model == null) {\n if (!this.options.changeRequest.isFetched) {\n await this.options.changeRequest.fetch();\n }\n\n this.model = new PJQ.models.rfq.RFQ({\n title: \"\",\n description: this.options.changeRequest.get('description'),\n changeRequestId: this.options.changeRequest.id,\n changeRequestNumber: this.options.changeRequest.get('number'),\n projectId: this.options.changeRequest.get('projectId'),\n statusId: PJQ.constants.rfq.rfqStatus.DRAFT,\n amount: 0\n });\n }\n\n if (!this.model.isNew()) {\n await this.model.fetch();\n }\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n let pContactId = this.options.project.permissions?.get('contactId');\n this.options.isAssignee = pContactId > 0 && (this.model.contractedContact?.id === pContactId || this.model.assignees.get(this.options.project.get('contactId')));\n this.options.canAdd = this.options.project.hasPermission('changeRequests.canAdd');\n this.options.isAdmin = this.options.project.hasPermission('changeRequests.isAdmin');\n this.options.canViewChangeRequests = this.options.isAdmin;\n this.options.canEdit = this.options.isAdmin && this.model.get('statusId') !== PJQ.constants.rfq.rfqStatus.APPROVED && this.model.get('statusId') !== PJQ.constants.rfq.rfqStatus.CLOSED;\n this.options.canRespond = (this.options.isAdmin || this.options.isAssignee) && (this.model.get('statusId') === PJQ.constants.rfq.rfqStatus.PRICING || this.model.get('statusId') === PJQ.constants.rfq.rfqStatus.REVISE);\n this.options.canDelete = this.options.isAdmin && this.model.get('statusId') !== PJQ.constants.rfq.rfqStatus.APPROVED;\n this.options.canEditStatus = this.options.isAdmin && !this.model.isNew();\n this.options.canSendRequest = this.options.isAdmin && !this.model.isNew() && (this.options.canEdit || this.options.canRespond) && (this.model.get('statusId') === PJQ.constants.rfq.rfqStatus.DRAFT || this.model.get('statusId') === PJQ.constants.rfq.rfqStatus.PRICING || this.model.get('statusId') === PJQ.constants.rfq.rfqStatus.REVISE);\n\n if (!this.isFetched || this.model.isNew()) {\n return;\n }\n\n let status = this.model.get('statusId');\n if (status === PJQ.constants.rfq.rfqStatus.APPROVED\n || status === PJQ.constants.rfq.rfqStatus.VOID) {\n this.options.canEdit = false;\n this.options.canDelete = false;\n } else if (status == PJQ.constants.rfq.rfqStatus.PRICING\n || status == PJQ.constants.rfq.rfqStatus.REVISE) {\n this.options.canEdit = false;\n }\n },\n renderData: function () {\n return {\n model: this.model,\n isAssignee: this.options.isAssignee,\n canAdd: this.options.canAdd,\n canEdit: this.options.canEdit,\n canDelete: this.options.canDelete,\n isAdmin: this.options.isAdmin,\n canRespond: this.options.canRespond,\n canViewChangeRequests: this.options.canViewChangeRequests,\n isFetched: this.isFetched,\n activeView: this.options.activeView,\n canSendRequest: this.options.canSendRequest,\n views: this.views\n }\n },\n afterRender: function () {\n if (!this.isFetched)\n return;\n\n this.renderGeneral();\n this.renderResponse();\n },\n renderGeneral: function () {\n new PJQ.Binder(this.$el, this.model, {\n useDecimalPercentFields: true,\n watchElements: [\n 'input',\n 'textarea'\n ]\n });\n\n PJQ.helpers.inputHelpers.inputMaskCurrency(this.$('.input-dollars-full'), 2, true);\n\n let choices = _.map(PJQ.constants.rfq.rfqStatus, (st) => {\n return {\n id: st,\n name: PJQ.constants.rfq.rfqStatusNames[st],\n disabled: false\n }\n });\n this.statusPicker = new PJQ.inputs.Selectpicker({\n el: this.$('.select-status'),\n choices: choices,\n isIntChoices: true,\n defaultValue: this.model.get('statusId'),\n canEdit: this.options.canEditStatus,\n onChange: (value) => {\n let newStatus = value,\n fnSave = () => {\n this.model.set('statusId', newStatus);\n if (!this.model.isNew()) {\n this.model.save(null, {\n success: _.bind(function () {\n this.model.dirtyAttributes = {};\n if (typeof this.options.onSave === 'function')\n this.options.onSave(this.model, false);\n this.render();\n PJQ.notifications.notify.successNotify({\n message: 'RFQ saved successfully'\n });\n\n if (newStatus === PJQ.constants.rfq.rfqStatus.PRICING || newStatus === PJQ.constants.rfq.rfqStatus.REVISE) {\n this.sendRequest();\n }\n }, this)\n })\n }\n };\n\n if (newStatus === PJQ.constants.rfq.rfqStatus.APPROVED && this.model.get('hasCostImpact')) {\n let oldStatus = this.model.get('statusId');\n\n new PJQ.views.modals.YesNo({\n header: \"Approve RFQ?\",\n body: \"Approving this RFQ will apply the quote amount to it's related change request item revenue and cost. Would you like to continue?\",\n onYes: () => {\n fnSave();\n },\n onNo: () => {\n this.model.set('statusId', oldStatus);\n this.render();\n }\n });\n return;\n }\n\n fnSave();\n }\n });\n\n this.companyPicker = new PJQ.views.contacts.ContactsSelectInput({\n el: this.$('.contracted-contact'),\n context: PJQ.constants.contacts.contexts.PROJECTCONTACTS,\n hideUsers: true,\n selectedContact: this.model.contractedContact,\n isSingleChoice: true,\n canViewContacts: this.options.project.hasPermission('projectContacts.canView'),\n canEdit: this.model.isNew() || this.model.contractedContact == null,\n onChange: (selectedContact) => {\n this.model.contractedContact = selectedContact;\n this.model.set('contractedContactId', selectedContact?.id);\n\n this.render();\n }\n });\n\n this.assigneePicker = new PJQ.views.contacts.ContactsSelectInput({\n el: this.$('.assigned-to'),\n context: PJQ.constants.contacts.contexts.PROJECTCONTACTS,\n hideUsers: true,\n selectedContact: this.model.assignees.models,\n isSingleChoice: false,\n canViewContacts: this.options.project.hasPermission('projectContacts.canView'),\n canEdit: this.options.canEdit && this.options.isAdmin,\n onChange: (selectedContacts) => {\n this.model.assignees.reset(selectedContacts);\n this.model.set('assigneeIds', _.pluck(selectedContacts || [], 'id'));\n }\n });\n\n this.distributeToPicker = new PJQ.views.contacts.ContactsSelectInput({\n el: this.$('.distribute-to'),\n context: PJQ.constants.contacts.contexts.PROJECTCONTACTS,\n hideUsers: true,\n selectedContact: this.model.distributeTo.models,\n isSingleChoice: false,\n canViewContacts: this.options.project.hasPermission('projectContacts.canView'),\n canEdit: this.options.canEdit && this.options.isAdmin,\n onChange: (selectedContacts) => {\n this.model.distributeTo.reset(selectedContacts);\n this.model.set('distributeToIds', _.pluck(selectedContacts || [], 'id'));\n }\n });\n\n new PJQ.inputs.Datepicker({\n el: this.$('.due-date'),\n canEdit: this.options.canEdit,\n datepickerOptions: {\n format: PJQ.helpers.dateHelpers.dateFormats.datePicker.DATE,\n defaultDate: this.model.get('dueDate') != null ? PJQ.helpers.dateHelpers.parseDateString(this.model.get('dueDate'), false) : null\n },\n onChange: _.bind(function (newDate) {\n this.model.set('dueDate', newDate);\n }, this)\n });\n\n if (_.size(this.model.dirtyAttributes) === 1 && this.model.dirtyAttributes.hasOwnProperty('dueDate')) {\n this.model.dirtyAttributes = {};\n this.model.isDirty = false;\n }\n\n this.fileUploader = new PJQ.views.files.FileUploaderGrid({\n el: this.$('.rfq-file-uploader'),\n collection: this.model.attachments,\n canUpload: this.options.isAdmin && this.model.get('statusId') !== PJQ.constants.rfq.rfqStatus.APPROVED && this.model.get('statusId') !== PJQ.constants.rfq.rfqStatus.CLOSED,\n useApiV2: true,\n canDelete: this.options.isAdmin && this.model.get('statusId') !== PJQ.constants.rfq.rfqStatus.APPROVED && this.model.get('statusId') !== PJQ.constants.rfq.rfqStatus.CLOSED,\n previewImageDimension: 150,\n onSuccess: _.bind(function (file) {\n this.model.isDirty = true;\n }, this),\n onDelete: _.bind(function (attachment, callback) {\n if (attachment.get('id') > 0) {\n attachment.set('delete', true);\n } else {\n attachment.destroy();\n }\n\n this.model.isDirty = true;\n callback();\n }, this)\n });\n },\n renderResponse: function () {\n if (!this.model.get('hasCostImpact')) {\n return;\n }\n\n if (_.size(this.model.responseAttachments.models) > 0) {\n new PJQ.views.files.FileUploaderGrid({\n el: this.$('.rfq-response-file-uploader'),\n collection: this.model.responseAttachments,\n canUpload: false,\n useApiV2: true,\n canDelete: false\n });\n }\n },\n updateResponseClicked: function () {\n this.updateResponse();\n },\n updateResponse: function (hasCostImpact = null) {\n new PJQ.views.rfq.RFQResponseModal({\n model: this.model,\n hasCostImpact: hasCostImpact,\n onSubmit: (data) => {\n this.model.set(data.response);\n this.model.responseAttachments = data.attachments;\n this.submitResponse(() => {\n this.render();\n });\n }\n });\n },\n impactResponseChanged: function (e) {\n let hasCostImpact = $(e.currentTarget).data('value');\n if (!hasCostImpact) {\n new PJQ.views.modals.YesNo({\n header: \"Submit Response?\",\n body: \"Are you sure you want to submit the response of no impact for this RFQ?\",\n onYes: () => {\n this.model.set('hasCostImpact', hasCostImpact);\n this.submitResponse(() => {\n this.render();\n });\n }\n });\n return;\n }\n\n this.updateResponse(hasCostImpact);\n },\n submitResponse: function (callback) {\n let loader = new PJQ.Loader(this.$('.modal-content'));\n this.model.respond((result) => {\n loader.remove();\n if (result) {\n PJQ.notifications.notify.successNotify({\n message: 'RFQ response submitted'\n });\n\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n\n PJQ.app.session.project.trigger('rfqChanged', this.model);\n\n this.render();\n\n if (typeof callback === 'function') {\n callback();\n }\n }\n });\n },\n sendRequest: function () {\n let message = \"Would you like to send this RFQ to the assigned contact?\";\n if (this.model.get('statusId') === PJQ.constants.rfq.rfqStatus.DRAFT) {\n message += ' This will also set the status to ' + PJQ.constants.rfq.rfqStatusNames[PJQ.constants.rfq.rfqStatus.PRICING] + '.';\n }\n\n new PJQ.views.modals.YesNo({\n header: \"Send Request?\",\n body: message,\n onYes: () => {\n this.model.sendQuoteRequest((success) => {\n if (success) {\n PJQ.notifications.notify.successNotify({\n message: 'RFQ sent successfully'\n });\n this.model.set('requestLastSentOn', new Date());\n this.render();\n } else {\n PJQ.notifications.notify.errorNotify({\n message: 'Failed to send RFQ'\n });\n }\n });\n }\n });\n },\n viewChangeRequest: function () {\n this.removeModal();\n new PJQ.views.changeRequests.ChangeRequestEditModal({\n model: this.options.changeRequest\n });\n },\n saveRFQ: function () {\n let isNew = this.model.isNew(),\n quoteAmount = PJQ.helpers.inputHelpers.getMoneyInputValue(this.$('.input-quote-amount'));\n this.model.set('amount', quoteAmount != null ? quoteAmount : 0);\n this.save(() => {\n PJQ.notifications.notify.successNotify({\n message: 'RFQ saved successfully'\n });\n\n if (!isNew) {\n this.removeModal();\n }\n });\n },\n validate: function () {\n let isValid = true;\n\n if (!this.assigneePicker.validate()) {\n isValid = false;\n }\n\n if (this.model.get('statusId') === PJQ.constants.rfq.rfqStatus.PRICING || this.model.get('statusId') === PJQ.constants.rfq.rfqStatus.REVISE) {\n let quoteAmount = PJQ.helpers.inputHelpers.getMoneyInputValue(this.$('.input-quote-amount'));\n if (quoteAmount == null || quoteAmount.trim() === '') {\n isValid = false;\n PJQ.helpers.inputHelpers.setInputError(this.$('.input-quote-amount'), false);\n }\n }\n\n return isValid;\n },\n save: function (callback) {\n if (!this.validate())\n return;\n\n this.model.save(null, {\n success: _.bind(function () {\n this.render();\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n\n PJQ.app.session.project.trigger('rfqChanged', this.model);\n if (typeof callback === 'function') {\n callback(true);\n }\n }, this)\n });\n },\n deleteRFQ: function () {\n let rfqId = this.model.id\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Delete\",\n body: \"Are you sure you want to delete this RFQ?\",\n onDelete: _.bind(function () {\n this.model.destroy({\n success: _.bind(function () {\n PJQ.notifications.notify.successNotify({\n message: 'RFQ deleted successfully'\n });\n\n if (typeof this.options.onDelete === 'function')\n this.options.onDelete(rfqId);\n\n this.removeModal();\n }, this)\n });\n }, this)\n });\n },\n close: function () {\n if (this.model.hasChanged() && this.options.canEdit) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.saveRFQ();\n this.removeModal();\n }, this),\n onDontSave: _.bind(function () {\n this.removeModal();\n }, this)\n });\n } else {\n this.removeModal();\n }\n }\n});","PJQ.views.rfq.RFQList = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'rfq-list'),\n rfqId: null\n },\n events: {\n 'click .btn-add-rfq': 'addRFQ',\n 'click .btn-delete-rfq': 'deleteRFQClicked'\n },\n beforeFirstRender: async function () {\n this.isFetched = false;\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.rfq.RFQs(null, {\n projectId: this.options.project.get('projectId')\n });\n }\n\n if(!this.collection.isFetched) {\n await this.collection.fetch();\n }\n\n this.erpIntegration = await PJQ.app.session.fetchERPIntegration();\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function(){\n if (!this.isFetched) {\n return;\n }\n\n this.options.isAdmin = PJQ.app.session.project.hasPermission('changeRequests.isAdmin');\n },\n renderData: function () {\n return {\n collection: this.collection,\n isFetched: this.isFetched,\n isAdmin: this.options.isAdmin,\n hideHeader: this.options.hideHeader\n }\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n this.renderView();\n\n PJQ.app.session.project.off('rfqChanged');\n PJQ.app.session.project.on('rfqChanged', function (rfq) {\n this.collection.add(rfq);\n this.render();\n }, this);\n\n if (this.options.rfqId > 0) {\n let initRFQ = this.collection.get(this.options.rfqId);\n if (initRFQ != null) {\n this.viewRFQ(initRFQ);\n this.options.rfqId = null;\n }\n }\n },\n renderView: function () {\n if (this.dataTable) {\n this.dataTable.remove();\n this.dataTable = null;\n }\n\n this.dataTable = this.getDataTableInstance();\n },\n getDataTableInstance: function () {\n return new PJQ.views.rfq.RFQDataTable({\n el: this.$('.rfq-data'),\n rowId: \"cid\",\n data: this.collection.models,\n isAdmin: this.options.isAdmin,\n headerData: _.bind(function () {\n return {\n project: this.options.project,\n isAdmin: this.options.isAdmin\n };\n }, this),\n order: [[1, 'asc']],\n onViewRFQ: (rfq) => {\n this.viewRFQ(rfq);\n },\n onRowDoubleClick: (row) => {\n this.viewRFQ(row.data());\n },\n contextMenuOptions: {\n actions: [\n {\n name: 'View',\n onClick: _.bind(function (row) {\n this.viewRFQ(row.data());\n }, this)\n }\n ]\n }\n });\n },\n viewRFQClicked: function (e) {\n let row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n this.viewRFQ(row.data());\n },\n viewRFQ: function (rfq) {\n isNew = rfq == null;\n new PJQ.views.rfq.RFQEditModal({\n model: rfq,\n changeRequest: this.options.changeRequest,\n onSave: _.bind(function (rfq) {\n if (isNew) {\n this.collection.add(rfq);\n }\n this.renderView();\n }, this),\n onDelete: _.bind(function (rfq) {\n this.collection.remove(rfq);\n this.renderView();\n }, this)\n });\n },\n addRFQ: function() {\n this.viewRFQ();\n },\n deleteRFQClicked: function (e) {\n let row = this.dataTable.getRow($(e.currentTarget).closest('tr'));\n this.deleteRFQ(row);\n },\n deleteRFQ: function (row) {\n if (row != null) {\n let rfq = row.data();\n if (rfq != null) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Delete RFQ\",\n body: \"Are you sure you want to delete this RFQ?\",\n onDelete: _.bind(function () {\n rfq.destroy({\n success: _.bind(function () {\n this.dataTable.removeRow(row);\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(rfq);\n }\n }, this)\n });\n }, this)\n });\n }\n }\n }\n});\n\nPJQ.views.rfq.SelectRFQModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-select-rfqs'),\n width: '50%',\n maxWidth: 700,\n onSave: _.noop\n },\n events: {\n \"change .select-rfq\": \"selectRFQ\",\n \"click .btn-save\": \"save\",\n \"click .btn-cancel\": \"cancel\"\n },\n beforeModalCreated: function () {\n this.options.isAdmin = PJQ.app.session.project.hasPermission('changeRequests.isAdmin');\n this.selectedRFQs = [];\n\n if (this.collection == null) {\n this.collection = new PJQ.collections.rfq.RFQs();\n }\n\n this.render()\n\n },\n renderData: function() {\n return {\n headerSubText: this.options.headerSubText,\n isSingleChoice: this.options.isSingleChoice\n }\n },\n afterRender: function () {\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$('.rfqs-table'),\n data: this.rfqs,\n isHideSearch: true,\n order: [],\n columns: [{\n \"data\": \"attributes.isSelected\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"render\": _.bind(function (data) {\n return ('
');\n }, this)\n },\n {\n \"data\": \"attributes.number\",\n \"title\": \"Number\",\n \"orderable\": true\n },\n {\n \"data\": \"attributes.client.companyName\",\n \"title\": \"Client\",\n \"orderable\": true\n },\n {\n \"data\": \"attributes.description\",\n \"title\": \"Description\",\n \"orderable\": false\n },\n {\n \"data\": \"attributes.amount\",\n \"title\": \"Amount\",\n \"orderable\": false,\n \"className\": \"text-align-right\",\n \"render\": _.bind(function (data, type, row) {\n return PJQ.helpers.formatHelpers.formatCurrency(data);\n }, this)\n }],\n dom: '<\"top\"<\"clear\">>rt<\"bottom\"p<\"clear\">>'\n });\n },\n selectRFQ: function (e) {\n let target = $(e.currentTarget),\n rfq = this.dataTable.getRow(target.closest('tr')).data();\n\n if (this.options.isSingleChoice) {\n this.$('.select-rfq').not(target).text('Select').prop('checked', false);\n if (rfq.get('isSelected')) {\n rfq.set('isSelected', false);\n this.selectedRFQ = null;\n } else {\n rfq.set('isSelected', true);\n this.selectedRFQ = rfq;\n this.collection.get(rfq.id);\n _.each(this.collection.models, _.bind(function (dtRFQ) {\n if (rfq.id !== dtRFQ.id)\n dtRFQ.set('isSelected', false);\n }, this));\n }\n this.$('.btn-save').attr('disabled', this.selectedRFQ == null);\n\n if(typeof this.options.onRFQSelected === 'function') {\n this.options.onRFQSelected(this.selectedRFQ);\n }\n } else {\n if (rfq.get('isSelected')) {\n target.text('Select').addClass('btn-primary').removeClass('btn-secondary');\n rfq.set('isSelected', false);\n this.selectedRFQs = _.reject(this.selectedRFQs, function (selRFQ) {\n return selRFQ.id === rfq.id;\n });\n } else {\n target.text('Deselect').addClass('btn-secondary').removeClass('btn-primary');\n rfq.set('isSelected', true);\n this.selectedRFQ.push(rfq);\n }\n this.$('.btn-save').attr('disabled', this.selectedRFQs == null);\n\n if(typeof this.options.onRFQSelected === 'function') {\n this.options.onRFQSelected(this.selectedRFQs);\n }\n }\n },\n cancel: function () {\n if (this.options.onCancel) {\n this.options.onCancel();\n }\n this.removeModal();\n },\n save: function () {\n if (this.options.onSave) {\n this.options.onSave(this.selectedRFQ ? this.selectedRFQ : this.selectedRFQs);\n this.removeModal();\n }\n }\n});","// Models\nPJQ.models.rfq.RFQ = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id',\n endpoint: function () {\n let arr = [];\n if (this.isNew()) {\n arr.push({\n endpoint: 'projects',\n value: this.get('projectId')\n });\n }\n arr.push({\n endpoint: 'rfq',\n value: this.id\n });\n return PJQ.helpers.urlHelpers.generateEndpoint(arr);\n },\n parse: function (model) {\n if (!model)\n return model;\n\n this.attachments = new PJQ.collections.rfq.Attachments(model.attachments);\n this.responseAttachments = new PJQ.collections.rfq.Attachments(model.responseAttachments);\n\n if (model && model.contractedContact) {\n this.contractedContact = new PJQ.models.contacts.Contact(model.contractedContact);\n } else {\n this.contractedContact = null;\n }\n\n if (model && model.responseBy) {\n this.responseBy = new PJQ.models.contacts.Contact(model.responseBy);\n } else {\n this.responseBy = null;\n }\n\n this.assignees = new PJQ.collections.contacts.Contacts(model.assignees);\n\n this.distributeTo = new PJQ.collections.contacts.Contacts(model.distributeTo);\n\n return model;\n },\n beforeSave: function () {\n this.set({\n assignees: this.assignees.toJSON(),\n contractedContactId: this.contractedContact?.get('id'),\n contractedContact: this.contractedContact ? this.contractedContact.toJSON() : null,\n attachments: this.attachments.toJSON(),\n responseAttachments: this.responseAttachments.toJSON()\n });\n },\n sendQuoteRequest: function (callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/send',\n isAPIv2: true,\n }).post().done((response) => {\n this.set(this.parse(response));\n if (typeof callback === 'function') {\n callback(true);\n }\n }).fail((response) => {\n if (typeof callback === 'function') {\n callback(false);\n }\n });\n },\n respond: function (callback) {\n this.beforeSave();\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/respond',\n isAPIv2: true,\n data: this.toJSON()\n }).post().done(_.bind(function (response) {\n if (typeof callback === 'function') {\n this.set(this.parse(response));\n callback(true);\n }\n }, this)).fail(_.bind(function (response) {\n if (typeof callback === 'function') {\n callback(false);\n }\n }, this));\n },\n syncERP: function (callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/syncerp',\n isAPIv2: true,\n }).post().done(_.bind(function (res) {\n if (res && _.size(res.externalId) > 0) {\n this.set('externalObject', res);\n }\n if (typeof callback === 'function') {\n callback(res);\n }\n }, this)).fail(_.bind(function (xhr, err, result) {\n if (typeof callback === 'function') {\n callback(null);\n }\n }, this));\n },\n unlinkERP: function (callback) {\n new PJQ.ajax.Request({\n endpoint: this.endpoint() + '/unlinkerp',\n isAPIv2: true,\n }).post().done(_.bind(function () {\n this.set('externalObject', null);\n if (typeof callback === 'function') {\n callback(true);\n }\n }, this)).fail(_.bind(function (xhr) {\n if (typeof callback === 'function') {\n let err;\n if (xhr.responseJSON != null) {\n err = xhr.responseJSON.type;\n } else {\n err = null;\n }\n callback(false, err);\n }\n }, this));\n },\n makeERPUrl: function (integration) {\n let externalId = this.externalId();\n if (_.size(externalId) === 0) {\n return '';\n }\n\n switch (integration.get('name')) {\n case PJQ.constants.integrations.providers.QBO.name:\n // TODO: QBO Integration URL\n return 'https://app.sandbox.qbo.intuit.com/app/purchaseorder?txnId=' + externalId;\n default:\n return '';\n }\n }\n});\n\nPJQ.models.rfq.Attachment = PJQ.models.files.File.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'id'\n});\n\n// Collections\nPJQ.collections.rfq.RFQs = PJQ.collections.BaseCollection.extend({\n defaults: {\n isAPIv2: true\n },\n endpoint: function () {\n let params = [];\n if (this.options.changeRequestId > 0) {\n params.push({\n parameter: 'changeRequestId',\n value: this.options.changeRequestId\n });\n }\n\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'projects',\n value: this.options.projectId\n },\n {\n endpoint: 'rfq'\n }\n ], params);\n },\n model: PJQ.models.rfq.RFQ\n});\n\nPJQ.collections.rfq.Attachments = PJQ.collections.files.Files.extend({\n defaults: {\n isAPIv2: true\n },\n model: PJQ.models.rfq.Attachment,\n endpoint: function () {\n return PJQ.helpers.urlHelpers.generateEndpoint([\n {\n endpoint: 'rfq',\n value: this.options.rfqId\n },\n {\n endpoint: 'attachments'\n }\n ]);\n }\n});","PJQ.views.rfq.RFQResponseModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-rfq-response'),\n maxWidth: 600,\n isShowCloseButton: true,\n onSubmit: _.noop()\n },\n events: {\n 'click .btn-close': 'close',\n 'click .btn-submit': 'submitResponse',\n 'click .impact-response>button': 'impactResponseChanged'\n },\n beforeModalCreated: async function () {\n this.isFetched = false;\n\n this.options.project = this.options.project ? this.options.project : PJQ.app.session.project;\n this.options.isAdmin = this.options.project.hasPermission('changeRequests.isAdmin');\n\n this.hasChanged = false;\n this.response = {\n hasCostImpact: this.options.hasCostImpact ?? this.model.get('hasCostImpact'),\n amount: this.model.get('amount') ?? null,\n comment: this.model.get('comment') ?? null\n };\n this.attachments = this.model.responseAttachments.clone();\n\n this.isFetched = true;\n this.render();\n },\n beforeRender: function () {\n\n },\n renderData: function () {\n return {\n model: this.model,\n response: this.response,\n isFetched: this.isFetched\n }\n },\n afterRender: function () {\n if (!this.isFetched || !this.response.hasCostImpact)\n return;\n\n new PJQ.Binder(this.$el, this.response, {\n watchElements: [\n 'input'\n ],\n afterChange: () => {\n this.hasChanged = true;\n }\n });\n\n new PJQ.views.files.FileUploaderGrid({\n el: this.$('.rfq-response-file-uploader'),\n collection: this.attachments,\n useApiV2: true,\n canDelete: this.options.isAdmin,\n onSuccess: (file) => {\n this.hasChanged = true;\n },\n onDelete: (attachment, callback) => {\n this.hasChanged = true;\n\n if (attachment.get('id') > 0) {\n attachment.set('delete', true);\n } else {\n attachment.destroy();\n }\n\n callback();\n }\n });\n\n let self = this;\n this.$('.impact-response>button').each(function () {\n if ($(this).data('value') === self.response.hasCostImpact) {\n $(this).removeClass('inactive').addClass('font-weight-normal');\n } else {\n $(this).addClass('inactive').removeClass('font-weight-normal');\n }\n });\n\n PJQ.helpers.inputHelpers.inputMaskCurrency(this.$('.input-dollars-full'), 2, true);\n },\n impactResponseChanged: function (e) {\n this.response.hasCostImpact = $(e.currentTarget).data('value');\n this.render();\n },\n validate: function () {\n let err = null;\n if (this.response.hasCostImpact == null) {\n err = 'Please select a response';\n }\n\n this.$('.error-outer').html(err);\n\n return err == null;\n },\n submitResponse: function () {\n if (!this.validate()) {\n return;\n }\n\n if(!this.response.hasCostImpact){\n this.response.amount = null;\n this.response.comment = null;\n }\n\n this.options.onSubmit({\n response: this.response,\n attachments: this.attachments\n })\n this.removeModal();\n },\n close: function () {\n new PJQ.views.modals.YesNo({\n header: \"Cancel Response?\",\n body: \"Are you sure you want to cancel your response?\",\n onYes: () => {\n this.removeModal();\n }\n });\n }\n});","PJQ.models.budget.Settings = PJQ.models.BaseModel.extend({\n defaults: {\n isAPIv2: true\n },\n idAttribute: 'settingId',\n parseNumberFormat: function (numberFormat, project, additionalData) {\n let result = '';\n\n _.each(numberFormat, _.bind(function (token) {\n if (token.isText)\n result += token.label;\n else if (token.token === 'today')\n result += this.parseDateFormatToken(new Date(), token.dateFormatId);\n else if (token.token === 'project.projectId')\n result += project.get('projectId').toString();\n else if (token.token === 'project.startDate')\n result += this.parseDateFormatToken(PJQ.helpers.dateHelpers.parseDateString(project.get('startDate'), false), token.dateFormatId);\n else if (token.token === 'counter')\n result += additionalData.counter.toString().padStart(4, '0');\n else if (token.token.startsWith('fieldValue')) {\n let fieldNumber = parseInt(token.token.substr(10));\n _.each(PJQ.app.session.project.customFields.models, _.bind(function (customField) {\n if (customField.get('fieldNumber') === fieldNumber) {\n _.each(PJQ.app.session.project.get('customFields'), _.bind(function (fieldValue) {\n if (fieldValue.fieldNumber === fieldNumber) {\n switch (customField.get('fieldType')) {\n case PJQ.constants.customFields.fieldTypes.TEXT:\n case PJQ.constants.customFields.fieldTypes.INT:\n result += fieldValue.value.toString();\n break;\n case PJQ.constants.customFields.fieldTypes.CHOICE:\n _.each(customField.get('choices'), _.bind(function (choice) {\n if (choice.id === fieldValue.value)\n result += choice.choiceName;\n }, this));\n break;\n case PJQ.constants.customFields.fieldTypes.DATE:\n result += this.parseDateFormatToken(PJQ.helpers.dateHelpers.parseDateString(fieldValue.value, false), token.dateFormatId);\n break;\n case PJQ.constants.customFields.fieldTypes.DATETIME:\n result += this.parseDateFormatToken(PJQ.helpers.dateHelpers.parseDateString(fieldValue.value, true), token.dateFormatId);\n break;\n }\n }\n }, this));\n }\n }, this));\n }\n }, this));\n\n return result.replaceAll(' ', '');\n },\n parseDateFormatToken: function (input, dateFormatId) {\n let result = null;\n\n switch (dateFormatId) {\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.DD:\n result = input.getDate().toString().padStart(2, '0');\n break;\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.MM:\n result = (input.getMonth() + 1).toString().padStart(2, '0');\n break;\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.YY:\n result = input.getFullYear().toString().substr(2);\n break;\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.YYYY:\n result = input.getFullYear().toString();\n break;\n case PJQ.constants.commitments.commitmentNumberTokenDateFormat.MMDDYYYY:\n //PJQ.helpers.dateHelpers.getDateString(startDate, PJQ.helpers.dateHelpers.dateFormats.DATE_YMD, false) + ' 00:00:00');\n result = PJQ.helpers.dateHelpers.getDateString(input, PJQ.helpers.dateHelpers.dateFormats.URL_DATE, false).replaceAll('-', '');\n break;\n }\n\n return result;\n }\n});","PJQ.views.budget.SubJobSettings = PJQ.views.BaseView.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'sub-job-settings'),\r\n enableSubJobsChanged: null\r\n },\r\n events: {\r\n 'click .btn-add-sub-job': 'addClicked',\r\n 'click .btn-edit-sub-job': 'editClicked',\r\n 'click .btn-delete-sub-job': 'deleteClicked',\r\n 'click .btn-edit-cost-codes': 'editCostCodesClicked',\r\n 'click .btn-push-erp': 'pushERP',\r\n 'click .btn-pull-erp': 'pullERP',\r\n },\r\n beforeFirstRender: function () {\r\n this.isFetched = false;\r\n\r\n let fnRender = _.bind(function () {\r\n this.isFetched = true;\r\n this.render();\r\n }, this);\r\n if (this.options.project != null) {\r\n this.options.project.fetchBudget(_.bind(function (budget) {\r\n this.budget = budget;\r\n PJQ.app.session.fetchERPIntegration(_.bind(function (erp) {\r\n this.erpIntegration = erp;\r\n this.options.project.fetchSubJobs(_.bind(function (subJobs) {\r\n this.subJobs = subJobs;\r\n this.options.project.fetchCostCodes(_.bind(function (costCodes) {\r\n this.costCodes = costCodes;\r\n if (this.erpIntegration != null && this.erpIntegration.getSetting('syncProjects')) {\r\n this.options.project.fetchERPObject(_.bind(function () {\r\n fnRender();\r\n }, this));\r\n } else {\r\n fnRender();\r\n }\r\n }, this));\r\n }, this));\r\n }, this));\r\n }, this));\r\n }\r\n },\r\n renderData: function () {\r\n return {\r\n erpIntegration: this.erpIntegration,\r\n project: this.options.project,\r\n subJobs: this.subJobs,\r\n costCodes: this.costCodes,\r\n isFetched: this.isFetched\r\n };\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n this.renderERP();\r\n this.renderSubJobTable();\r\n },\r\n renderERP: function () {\r\n if (this.erpIntegration == null || (this.options.project != null && !this.options.project.isERPSynced())) {\r\n return;\r\n }\r\n\r\n let pushSupported = this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_SUB_JOBS),\r\n pullSupported = this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_SUB_JOBS),\r\n hasUnsynced = null != _.find(this.subJobs.models, function (subJob) {\r\n let st = subJob.erpSyncStatus();\r\n return st !== PJQ.constants.integrations.erp.syncStatuses.APPROVED && st !== PJQ.constants.integrations.erp.syncStatuses.SYNCED;\r\n }), btn = '';\r\n this.erpButtons = PJQ.helpers.erp.renderERPButtons(this.$('.erp-sync'), {\r\n pushSupported: pushSupported,\r\n canPush: hasUnsynced,\r\n disablePushReason: !hasUnsynced ? 'All sub jobs have been pushed to ERP' : '',\r\n pullSupported: pullSupported,\r\n status: status\r\n });\r\n\r\n let badge = PJQ.helpers.erp.getERPBadge(status);\r\n this.$('.erp-badge').html('' + badge + '');\r\n },\r\n pushERP: function () {\r\n if (this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PUSH_SUB_JOBS)) {\r\n this.erpButtons.pushing(true);\r\n this.erpIntegration.pushSubJobs(this.options.project, _.bind(function (subJobs) {\r\n this.erpButtons.pushing(false);\r\n PJQ.notifications.notify.successNotify({\r\n message: _.size(subJobs).toString() + ' Sub Jobs pushed to ERP'\r\n });\r\n this.render();\r\n }, this));\r\n }\r\n },\r\n pullERP: function () {\r\n if (this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_SUB_JOBS)) {\r\n this.erpButtons.pulling(true);\r\n this.erpIntegration.pullSubJobs(this.options.project, (subJobs, err) => {\r\n this.erpButtons.pulling(false);\r\n if (subJobs == null) {\r\n return;\r\n }\r\n\r\n let newSubJobsCount = _.size(subJobs) - _.size(this.subJobs.models);\r\n this.subJobs.reset(subJobs);\r\n PJQ.notifications.notify.successNotify({\r\n message: newSubJobsCount.toString() + ' Sub Jobs pulled from ERP'\r\n });\r\n this.render();\r\n });\r\n }\r\n },\r\n renderSubJobTable: function () {\r\n if (this.dataTable && this.dataTable.dataTable) {\r\n this.dataTable.dataTable.destroy();\r\n this.dataTable = null;\r\n }\r\n\r\n this.dataTable = new PJQ.views.dataTables.DataTable({\r\n el: this.$(\".sub-jobs-table\"),\r\n data: this.subJobs.models,\r\n rowId: \"cid\",\r\n language: {\r\n zeroRecords: 'Click \"Add Sub Job\" to create a new Sub Job'\r\n },\r\n order: [1, 'asc'],\r\n onRowDoubleClick: _.bind(function (row) {\r\n this.editSubJob(row.data());\r\n }, this),\r\n contextMenuOptions: {\r\n actions: [\r\n {\r\n name: 'Edit',\r\n onClick: (row) => {\r\n this.editSubJob(row.data());\r\n }\r\n },\r\n {\r\n name: 'Edit Cost Codes',\r\n onClick: (row) => {\r\n this.editCostCodes(row.data());\r\n }\r\n },\r\n {\r\n name: 'Delete',\r\n isDanger: true,\r\n isShown: (row) => {\r\n return null == this.budget.lineItems.findWhere({subJobId: row.data().id});\r\n },\r\n onClick: (row) => {\r\n this.deleteSubJob(row.data());\r\n }\r\n }\r\n ]\r\n },\r\n columns: [\r\n {\r\n \"width\": \"15px\",\r\n \"columnData\": \"division\",\r\n \"data\": null,\r\n \"title\": \"\",\r\n \"className\": \"dt-center\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"defaultContent\": '',\r\n \"render\": (data, type, row) => {\r\n if (row.isERPSynced()) {\r\n return PJQ.helpers.erp.getERPIcon(row.erpSyncStatus());\r\n }\r\n return '';\r\n }\r\n },\r\n {\r\n \"data\": \"attributes.name\",\r\n \"title\": \"Name\",\r\n \"render\": (data, type, model) => {\r\n return '' + data + '';\r\n }\r\n },\r\n {\r\n \"data\": \"attributes.code\",\r\n \"title\": \"Code\"\r\n },\r\n {\r\n \"data\": \"attributes.description\",\r\n \"title\": \"Description\"\r\n },\r\n {\r\n \"data\": \"id\",\r\n \"title\": \"Cost Codes\",\r\n \"render\": (data, type, model) => {\r\n let costCodeCount = _.size(this.costCodes.where({subJobId: model.id}));\r\n return '' + costCodeCount.toString() + ' Cost Codes';\r\n }\r\n },\r\n {\r\n \"data\": \"\",\r\n \"title\": \"\",\r\n \"orderable\": false,\r\n \"searchable\": false,\r\n \"className\": \"p-2\",\r\n \"width\": \"80px\",\r\n \"render\": (data, type, model) => {\r\n let canDelete = null == this.budget.lineItems.findWhere({subJobId: model.id}),\r\n res = '
';\r\n if (canDelete) {\r\n res += '';\r\n } else {\r\n res += '';\r\n }\r\n return res + '
';\r\n }\r\n }\r\n ]\r\n });\r\n },\r\n addClicked: function () {\r\n this.editSubJob(null);\r\n },\r\n editClicked: function (e) {\r\n let id = $(e.currentTarget).closest('tr').attr('id');\r\n if (_.size(id) > 0) {\r\n let subJob = this.subJobs.get(id);\r\n if (subJob != null) {\r\n this.editSubJob(subJob);\r\n }\r\n }\r\n },\r\n editSubJob: function (subJob) {\r\n new PJQ.views.budget.EditSubJobModal({\r\n model: subJob,\r\n project: this.options.project,\r\n subJobs: this.subJobs,\r\n onSave: _.bind(function (subJob) {\r\n this.subJobs.add(subJob);\r\n this.renderSubJobTable();\r\n }, this),\r\n onDelete: _.bind(function (subJob) {\r\n this.deleteSubJob(subJob);\r\n }, this)\r\n });\r\n },\r\n editCostCodesClicked: function (e) {\r\n let target = $(e.currentTarget),\r\n row = this.dataTable.getRow(target.closest('tr')),\r\n subJob = row.data();\r\n this.editCostCodes(subJob);\r\n },\r\n editCostCodes: function (subJob) {\r\n new PJQ.views.budget.CostCodeSettingsModal({\r\n project: this.options.project,\r\n subJob: subJob\r\n });\r\n },\r\n deleteClicked: function (e) {\r\n let target = $(e.currentTarget),\r\n row = this.dataTable.getRow(target.closest('tr'));\r\n this.deleteSubJob(row.data());\r\n },\r\n deleteSubJob: function (subJob) {\r\n new PJQ.views.modals.DeleteCancel({\r\n header: \"Confirm Deletion\",\r\n body: \"Are you sure you want to delete this Sub Job?\",\r\n onDelete: _.bind(function () {\r\n subJob.destroy({\r\n notify: false,\r\n success: _.bind(function () {\r\n this.subJobs.remove(subJob);\r\n this.renderSubJobTable();\r\n }, this),\r\n error: function (model, xhr) {\r\n if (xhr.responseJSON != null && xhr.responseJSON.type === 'delete_sub_job_with_line_item') {\r\n PJQ.notifications.notify.warningNotify({\r\n message: 'This sub job cannot be deleted because it has budget line items associated with it.'\r\n });\r\n }\r\n }\r\n });\r\n }, this)\r\n });\r\n }\r\n});\r\n\r\nPJQ.views.budget.EditSubJobModal = PJQ.views.BaseModal.extend({\r\n defaults: {\r\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-edit-sub-job'),\r\n maxWidth: 600\r\n },\r\n events: {\r\n 'click .btn-save': 'save',\r\n 'click .btn-close': 'close',\r\n 'click .btn-delete': 'delete'\r\n },\r\n beforeModalCreated: function () {\r\n if (this.model == null) {\r\n this.model = new PJQ.models.budget.SubJob({\r\n projectId: this.options.project ? this.options.project.id : null\r\n });\r\n }\r\n\r\n this.isFetched = true;\r\n this.render();\r\n },\r\n renderData: function () {\r\n return {\r\n model: this.model,\r\n isFetched: this.isFetched\r\n };\r\n },\r\n afterRender: function () {\r\n if (!this.isFetched) {\r\n return;\r\n }\r\n\r\n new PJQ.Binder(this.$el, this.model, {\r\n setDefaultValues: true,\r\n watchElements: [\r\n 'input',\r\n 'select'\r\n ]\r\n });\r\n },\r\n close: function () {\r\n if (this.model.hasChanged()) {\r\n new PJQ.views.modals.SaveDontSave({\r\n header: \"Unsaved Changes\",\r\n body: \"Do you want to save changes?\",\r\n onSave: _.bind(function () {\r\n this.save();\r\n }, this),\r\n onDontSave: _.bind(function () {\r\n if (this.options.onClose) {\r\n this.options.onClose(this.model);\r\n }\r\n this.removeModal();\r\n }, this)\r\n });\r\n } else if (this.options.onClose) {\r\n this.options.onClose(this.model);\r\n this.removeModal();\r\n }\r\n },\r\n validate: function () {\r\n let $name = this.$('.input-name'),\r\n name = $name.val(),\r\n isNameValid = true,\r\n errorText = '';\r\n if (_.size(name) === 0) {\r\n isNameValid = false;\r\n } else if (null != _.find(this.options.subJobs.models, function (sj) {\r\n return sj.id !== this.model.id && sj.get('name').toLowerCase() === name.toLowerCase();\r\n }, this)) {\r\n isNameValid = false;\r\n errorText = 'This sub job name already exists'\r\n }\r\n PJQ.helpers.inputHelpers.setInputError($name, isNameValid, {\r\n errorText: errorText\r\n });\r\n return isNameValid;\r\n },\r\n save: function () {\r\n if (this.validate()) {\r\n this.model.save(null, {\r\n success: _.bind(function () {\r\n if (typeof this.options.onSave === 'function') {\r\n this.options.onSave(this.model);\r\n }\r\n if (this.options.project != null) {\r\n if (this.options.project.subJobs != null) {\r\n this.options.project.subJobs.add(this.model);\r\n }\r\n }\r\n this.removeModal();\r\n PJQ.notifications.notify.successNotify({\r\n message: 'Sub Job saved'\r\n });\r\n }, this)\r\n });\r\n }\r\n },\r\n delete: function () {\r\n new PJQ.views.modals.DeleteCancel({\r\n header: \"Confirm Deletion\",\r\n body: \"Are you sure you want to delete this Sub Job?\",\r\n onDelete: _.bind(function () {\r\n if (typeof this.options.onDelete === 'function') {\r\n this.options.onDelete(this.model);\r\n }\r\n this.removeModal();\r\n }, this)\r\n });\r\n }\r\n});","PJQ.views.budget.TaxCodeSettings = PJQ.views.BaseView.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'tax-code-settings')\n },\n events: {\n 'click .btn-pull-erp': 'pullERP',\n 'click .btn-add-tax-code': 'addClicked',\n 'click .btn-edit-tax-code': 'editClicked',\n 'click .btn-delete-tax-code': 'deleteClicked'\n },\n beforeFirstRender: function () {\n this.isFetched = false;\n PJQ.app.session.fetchERPIntegration(_.bind(function (erp) {\n this.erpIntegration = erp;\n PJQ.app.session.fetchTaxCodes(_.bind(function (taxCodes) {\n this.taxCodes = taxCodes;\n\n this.isFetched = true;\n this.render();\n }, this));\n }, this));\n return false;\n },\n renderData: function () {\n return {\n project: this.options.project,\n taxCodes: this.taxCodes,\n isFetched: this.isFetched,\n erpIntegration: this.erpIntegration\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n this.renderTaxCodeTable();\n this.renderERP();\n },\n renderTaxCodeTable: function () {\n if (this.dataTable && this.dataTable.dataTable) {\n this.dataTable.dataTable.destroy();\n this.dataTable = null;\n }\n\n this.dataTable = new PJQ.views.dataTables.DataTable({\n el: this.$(\".tax-codes-table\"),\n data: this.taxCodes.models,\n order: [1, 'asc'],\n onRowDoubleClick: _.bind(function (row) {\n this.editTaxCode(row.data());\n }, this),\n rowId: 'cid',\n paging: false,\n contextMenuOptions: {\n actions: [\n {\n name: 'Edit',\n onClick: (row) => {\n this.editTaxCode(row.data());\n }\n },\n {\n name: 'Delete',\n isDanger: true,\n isShown: (row) => {\n return false;\n },\n onClick: (row) => {\n this.deleteTaxCode(row.data());\n }\n }\n ]\n },\n columns: [\n {\n \"title\": \"\",\n \"data\": \"attributes.externalObject\",\n \"width\": \"5%\",\n \"orderable\": false,\n \"searchable\": false,\n \"defaultContent\": '',\n \"render\": (data, type, row) => {\n if (data) {\n return '';\n }\n return '';\n }\n },\n {\n \"data\": \"attributes.code\",\n \"title\": \"Code\",\n \"width\": \"15%\"\n },\n {\n \"data\": \"attributes.description\",\n \"title\": \"Description\"\n },\n {\n \"data\": \"attributes.rate\",\n \"title\": \"Rate\",\n \"render\": (data, type, model) => {\n return PJQ.helpers.formatHelpers.formatPercent(data/100);\n }\n },\n {\n \"data\": \"\",\n \"title\": \"\",\n \"orderable\": false,\n \"searchable\": false,\n \"className\": \"p-2\",\n \"width\": \"80px\",\n \"render\": (data, type, model) => {\n let canDelete = false,\n res = '
';\n if (canDelete) {\n res += '';\n } else {\n // res += '';\n }\n return res + '
';\n }\n }\n ],\n language: {\n zeroRecords: 'Click \"Add Tax Code\" to create a new Tax Code'\n }\n });\n },\n addClicked: function () {\n this.editTaxCode(null);\n },\n editClicked: function (e) {\n let id = $(e.currentTarget).closest('tr').attr('id');\n if (_.size(id) > 0) {\n let taxCode = this.taxCodes.get(id);\n if (taxCode != null) {\n this.editTaxCode(taxCode);\n }\n }\n },\n editTaxCode: function (taxCode) {\n new PJQ.views.budget.EditTaxCodeModal({\n model: taxCode,\n project: this.options.project,\n onSave: _.bind(function (taxCode) {\n this.taxCodes.add(taxCode);\n this.render();\n }, this),\n onDelete: _.bind(function (taxCode) {\n if (taxCode.id > 0) {\n this.deleteTaxCode(taxCode, false);\n }\n }, this)\n });\n },\n deleteClicked: function (e) {\n let target = $(e.currentTarget),\n cid = target.closest('tr').attr('id'),\n taxCode = this.taxCodes.get(cid);\n this.deleteTaxCode(taxCode);\n },\n deleteTaxCode: function (taxCode, showDialogue = true) {\n if(showDialogue) {\n new PJQ.views.modals.DeleteCancel({\n header: \"Confirm Deletion\",\n body: \"Are you sure you want to delete this Tax Code?\",\n onDelete: _.bind(function () {\n taxCode.destroy({\n notify: false,\n success: _.bind(function () {\n this.taxCodes.remove(taxCode);\n this.render();\n }, this)\n });\n }, this)\n });\n }\n else{\n taxCode.destroy({\n notify: false,\n success: _.bind(function () {\n this.taxCodes.remove(taxCode);\n this.render();\n }, this)\n });\n }\n },\n renderERP: function () {\n if (this.erpIntegration == null) {\n return;\n }\n\n PJQ.helpers.erp.renderERPButtons(this.$('.erp-sync'), {\n pushSupported: false,\n pullSupported: this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_COMPANY_TAX_CODES),\n status: PJQ.constants.integrations.erp.syncStatuses.SYNCED\n });\n\n let badge = PJQ.helpers.erp.getERPBadge(status);\n this.$('.erp-badge').html('' + badge + '');\n },\n pullERP: function () {\n if (this.erpIntegration.hasAvailableAction(PJQ.constants.integrations.actions.PULL_COMPANY_TAX_CODES)) {\n this.erpIntegration.pullTaxCodes(this.options.project, (newTaxCodes, err) => {\n if(newTaxCodes == null){\n return;\n }\n\n this.taxCodes.reset(newTaxCodes);\n PJQ.notifications.notify.successNotify({\n message: _.size(newTaxCodes).toString() + ' Tax Codes pulled from ERP'\n });\n this.render();\n });\n }\n }\n});\n\nPJQ.views.budget.EditTaxCodeModal = PJQ.views.BaseModal.extend({\n defaults: {\n template: new PJQ.templating.Template(PJQ.constants.modules.BUDGET, 'modal-edit-tax-code'),\n maxWidth: 600\n },\n events: {\n 'click .btn-save': 'save',\n 'click .btn-close': 'close',\n 'click .btn-delete': 'delete'\n },\n beforeModalCreated: function () {\n if (this.model == null) {\n this.model = new PJQ.models.budget.TaxCode({\n projectId: this.options.project ? this.options.project.id : null,\n rate: 0\n });\n }\n\n this.isFetched = true;\n },\n renderData: function () {\n return {\n model: this.model,\n isFetched: this.isFetched\n };\n },\n afterRender: function () {\n if (!this.isFetched) {\n return;\n }\n\n new PJQ.Binder(this.$el, this.model, {\n setDefaultValues: true,\n watchElements: [\n 'input',\n 'select'\n ]\n });\n\n this.$(\".input-name\").inputmask({\n \"mask\": \"a\".repeat(50),\n placeholder: \"\",\n definitions: {\n 'a': {\n validator: \".\",\n cardinality: 1\n }\n }\n });\n\n this.$(\".input-code\").inputmask({\n \"mask\": \"a\".repeat(20),\n placeholder: \"\",\n definitions: {\n 'a': {\n validator: \"[0-9a-zA-Z]\",\n cardinality: 1\n }\n }\n });\n\n PJQ.helpers.inputHelpers.inputMaskPercent(this.$('.input-percent'), 2, true);\n },\n close: function () {\n if (this.model.hasChanged()) {\n new PJQ.views.modals.SaveDontSave({\n header: \"Unsaved Changes\",\n body: \"Do you want to save changes?\",\n onSave: _.bind(function () {\n this.save();\n }, this),\n onDontSave: _.bind(function () {\n if (this.options.onClose) {\n this.options.onClose(this.model);\n }\n this.removeModal();\n }, this)\n });\n } else if (this.options.onClose) {\n this.options.onClose(this.model);\n this.removeModal();\n }\n },\n validate: function () {\n let isValid = true;\n\n let $code = this.$('.input-code');\n PJQ.helpers.inputHelpers.setInputError($code, true);\n if (this.model.get('code') == null || this.model.get('code').length === 0) {\n PJQ.helpers.inputHelpers.setInputError($code, false);\n isValid = false;\n }\n\n return isValid;\n },\n save: function () {\n if (this.validate()) {\n this.model.save(null, {\n success: _.bind(function () {\n if (typeof this.options.onSave === 'function') {\n this.options.onSave(this.model);\n }\n this.removeModal();\n PJQ.notifications.notify.successNotify({\n message: 'Tax Code saved'\n });\n }, this)\n });\n }\n },\n delete: function () {\n if (typeof this.options.onDelete === 'function') {\n this.options.onDelete(this.model);\n }\n this.removeModal();\n }\n});"]}